Commit Graph
81696 Commits
Author SHA1 Message Date
Yu Watanabe c2fcfda20f hwdb: merge entries for Ettus Research B200
Follow-up for 9dad00ef94.
2025-05-24 01:57:12 +09:00
Yu Watanabe 9a277f7106 hostname: two trivial cleanups (#37583) 2025-05-24 01:56:25 +09:00
Mike Yuan 4108529d3e core: renames in io.systemd.Manager (#37582)
1. rename sources to follow `core/varlink-*` patter per @YHNdnzj's
comment in
https://github.com/systemd/systemd/pull/35098#issuecomment-2876509919
2. camelCase Context/Runtime in varlink spec. Varlink fields are
camelCase unless well defined config names.
2025-05-23 17:46:26 +02:00
Lennart Poettering 3ae6e64641 loginctl,machinectl: use LESS_BY() where appropriate
And while we are at it, add a lower bound of the display output to 10
for all three cases, because it's pointless outputting someting with
less space.
2025-05-24 00:23:14 +09:00
Yu Watanabe 5b207b3cbf path-util: add flavour of path_startswith() that leaves a leading slash in place (#37572) 2025-05-24 00:20:40 +09:00
AsciiWolf f6f8c6e9fd hwdb: add RTL-SDR devices 2025-05-24 00:11:21 +09:00
Yu Watanabe dda0e5aa95 hostname: use FOREACH_ARGUMENT() at one more place
Follow-up for 29a352e8c1.
2025-05-23 23:24:38 +09:00
Yu Watanabe 2af3cad0cd hostname: use proper type 2025-05-23 23:19:40 +09:00
Yu Watanabe 2c1cc93840 hostname: add hardware family, sku and version (#36956)
Add support for the hardware family, SKU (Stock-Keeping Unit) and
version. The values are read from the file /etc/machine-info or DMI as
fallback.

The entries are useful to provide an unified interface to collect detail
hardware information. The /etc/machine-info entries enable embedded
devices without UEFI support to provide the information via a common
interface.

Fixes: #31134
2025-05-23 23:17:01 +09:00
Ivan Kruglov 9ffa967413 core: lowercase Context/Runtime
Varlink fields are camelCase unless well defined config names.
2025-05-23 06:32:49 -07:00
Ivan Kruglov 7a3c7344fa core: manager-varlink.{c,h} -> varlink-manager.{c,h} 2025-05-23 06:31:46 -07:00
AsciiWolf 9dad00ef94 hwdb: add Ettus Research SDR devices 2025-05-23 12:15:12 +01:00
Luca Boccassi 7c7aeb9b8d boot: do not stop parsing profiles if .cmdline is missing
When profiles were added with a new interation this was left as
a return statement instead of a continue

Follow-up for 382e4da4a5
2025-05-23 09:53:03 +02:00
Lennart Poettering ceed11e465 path-util: invert PATH_STARTSWITH_ACCEPT_DOT_DOT flag
As requested: https://github.com/systemd/systemd/pull/37572#pullrequestreview-2861928094
2025-05-23 06:51:45 +02:00
Lennart Poettering 482107724f cgroup: port some code over to path_startswith_full() 2025-05-23 06:51:43 +02:00
Lennart Poettering ee19edbb9f path-util: add flavour of path_startswith() that leaves a leading slash in place 2025-05-23 06:50:30 +02:00
Ivan Kruglov 738a47fd98 tests: fix TEST-74-AUX-UTILS.varlinkctl.sh (#37562)
per Daan's explanation:
other subtests running as testuser apparently use systemd-run --user
--machine testuser@.host which turns user tracking in logind into "by
pin" mode. when the last pinning session exits it terminates the user.
2025-05-22 22:40:30 +01:00
Daan De Meyer e647407afa More header cleanups (#37571)
Split out of #37344
2025-05-22 21:49:14 +02:00
Daan De Meyer 1e35e81b2c tree-wide: Clean up includes
Preparation for cleaning up includes in src/shared.
2025-05-22 21:10:15 +02:00
Daan De Meyer 6b436ebace meson: Make sure <sys/socket.h> is included in af-from-name.gperf 2025-05-22 21:10:15 +02:00
Daan De Meyer bba27cd746 basic: Add missing process-util.h include to origin-id.h 2025-05-22 21:10:15 +02:00
Lennart Poettering b179ae57a4 logind: fix serialization of display user field
Follow-up for: 232f4e12fe
2025-05-22 18:09:54 +02:00
Daan De Meyer b2ae2119c5 forward: Add more forward declarations
CGroupMask was erronously added to core-forward.h even though it
comes from src/basic so we move it to the right location.
2025-05-22 17:26:43 +02:00
Zbigniew Jędrzejewski-Szmek 61d78f1788 Restore compatibility for coredump --backtrace (#37559) 2025-05-22 13:40:29 +02:00
Daan De Meyer ababb70245 Clang tidy headers (#37566) 2025-05-22 12:01:57 +02:00
Daan De Meyer 54b59d914e meson: Run clang-tidy on libsystemd headers as well 2025-05-22 11:25:32 +02:00
Daan De Meyer 5ea01af240 meson: Use .inc for generated code meant to be included in other files
These files use the .h extension but are not standalone so let's not
make it appear like they are proper headers and instead use the .inc
extension.
2025-05-22 11:25:29 +02:00
Daan De Meyer c60a8c72d1 boot: Clean up includes
Instead of introducing efi-forward.h, we use efi.h for the same purpose
in the boot/ folder.
2025-05-22 11:10:20 +02:00
Luca Boccassi c3c79aeb52 Revert "logind: always enclose list fields (that may contain spaces) in quotes"
This breaks GNOME on Wayland, login no longer works:

gnome-shell[2250]: Running GNOME Shell (using mutter 48.2) as a Wayland display server
gnome-shell[2250]: Failed to setup: Failed to find any matching session
systemd[2054]: org.gnome.Shell@wayland.service: Failed with result 'protocol'.
systemd[2054]: Failed to start org.gnome.Shell@wayland.service - GNOME Shell on Wayland.

This reverts commit b0555149de.
2025-05-22 10:00:52 +01:00
Daan De Meyer bf7476233a Various cleanups (#37564) 2025-05-22 10:40:35 +02:00
Daan De Meyer 6ae1ba8a84 core: Clean up includes
Follow up for 836e4e7ea8
2025-05-22 09:41:18 +02:00
Daan De Meyer f848cb8d3e test: Remove unused includes 2025-05-22 09:41:18 +02:00
Daan De Meyer 6cc59a2de6 machine: Fix comment 2025-05-22 09:41:18 +02:00
Daan De Meyer 836e4e7ea8 core: Clean up includes
Split out of #37344.
2025-05-22 09:37:20 +02:00
Matteo Croce 6288739eaf networkd: print a meaningful error on failure
test_keep_configuration_on_restart() works, but the error printed is
misleading because self.assertNotEmpty() doesn't exist.

Add a working assert statement so, when the unmanaged interface is
altered, the test fails with a meaningful error, like:

        ### ip monitor dev unmanaged0 BEGIN
        222:33::/64 proto kernel metric 256 pref medium
        FAIL
        [...]
        Traceback (most recent call last):
          File "/work/src/test/test-network/systemd-networkd-tests.py", line 5085, in test_keep_configuration_on_restart
            self.assertEqual(line, '')
        AssertionError: '222:33::/64 proto kernel metric 256 pref medium' != ''
        - 222:33::/64 proto kernel metric 256 pref medium

While at it, strip the trailing newline so we can print easily the
string (and in future build more a robust regexp which uses the $ token)
2025-05-22 09:33:39 +02:00
Stefan Herbrechtsmeier 29a352e8c1 hostname: add hardware version
Add support for the hardware version. The version describes a distinct
version of compatibility hardware. The value is read from the file
/etc/machine-info or DMI as fallback.

The integration provides an unified interface to collect detail hardware
information. The /etc/machine-info entry enables embedded devices
without UEFI support to read the information from a custom store.
2025-05-22 09:00:14 +02:00
Stefan Herbrechtsmeier 79e9fb68a3 hostname: add hardware Stock-Keeping Unit
Add support for the hardware Stock-Keeping Unit (SKU). The SKU describes
a distinct type of hardware for sale, purchase or inventory management.
The value is read from the file /etc/machine-info or DMI as fallback.

The integration provides an unified interface to collect detail hardware
information. The /etc/machine-info entry enables embedded devices
without UEFI support to read the information from a custom store.
2025-05-22 09:00:14 +02:00
Mike Yuan 9daa1dbcce Several minor follow-ups for #33995 (#37558) 2025-05-22 00:22:00 +02:00
Zbigniew Jędrzejewski-Szmek c673f1f67a coredump: wrap long lines, fix grammar in comments 2025-05-21 23:51:31 +02:00
Zbigniew Jędrzejewski-Szmek ded0aac389 coredump: restore compatibility with older patterns
This was broken in f45b801551. Unfortunately
the review does not talk about backward compatibility at all. There are
two places where it matters:
- During upgrades, the replacement of kernel.core_pattern is asynchronous.
  For example, during rpm upgrades, it would be updated a post-transaction
  file trigger. In other scenarios, the update might only happen after
  reboot. We have a potentially long window where the old pattern is in
  place. We need to capture coredumps during upgrades too.
- With --backtrace. The interface of --backtrace, in hindsight, is not
  great. But there are users of --backtrace which were written to use
  a specific set of arguments, and we can't just break compatiblity.
  One example is systemd-coredump-python, but there are also reports of
  users using --backtrace to generate coredump logs.

Thus, we require the original set of args, and will use the additional args if
found.

A test is added to verify that --backtrace works with and without the optional
args.
2025-05-21 23:45:14 +02:00
Yu Watanabe 2fbbf6c4c7 unit-def: reindent comments
Prompted by dfdeb0b1cb.
2025-05-22 05:15:08 +09:00
Yu Watanabe fe6a2c8a6c test-vpick: use more strict check
Follow-up for 4fc9940760.
2025-05-22 05:11:14 +09:00
Daan De Meyer 847e9fc366 logind: Add missing include
Follow up for 1aa202dd24
2025-05-21 21:23:06 +02:00
Yu Watanabe 276ddd8a91 logind: state serialization fixes (#37555)
Turns out our escaping was really broken when saving/restoring
session/seat/user state. Let's fix that.
2025-05-22 03:54:40 +09:00
Daan De Meyer 4bde87437a analyze: Clean up includes
Split out of #37344.
2025-05-22 03:06:46 +09:00
Matteo Croce bcb9e72b6b networkd: ensure that unmanaged interfaces aren't touched
Extend the test_keep_configuration_on_restart in order to check
that the unmanaged interface isn't altered in any way.
2025-05-22 03:04:40 +09:00
Lennart Poettering c450027d14 env-file: rework write_env_file() to make use of O_TMPFILE 2025-05-22 02:50:48 +09:00
Lennart Poettering dfc9fd0147 logind: rename EnableWallMessages= configuration knob to WallMessages= (#37553)
We generally frown on config options that are called
EnableXYZ=/DisableXYZ=, hence drop this here too. Note that the original
sin was that the pre-existing D-Bus property already used the prefix.
But given that D-Bus properties are substantially more low-level (i.e.
developer focused) than the config knobs, let's bite the bullet and
name the configuration option cleanly, even if the dbus property carries
the damn prefix.

The knob was added post v257, hence this is not a compat break.

Follow-up for: 130698dc20
2025-05-22 02:47:57 +09:00
Lennart Poettering 3c70cbae0f machined: call pidref_verify() in some cases this was missing
We need to protect us from recycled PIDs here like everywhere else: once
we read data from /proc/$PID/ we need to validate that $PID still points
to the original pidfd.
2025-05-22 02:38:38 +09:00
Daan De Meyer acca52ab24 core: Make various ActivationDetails functions take a const argument 2025-05-22 02:17:39 +09:00