Commit Graph
80733 Commits
Author SHA1 Message Date
Yu Watanabe 37edefb33f socket-proxy: use event_source_hash_ops for managing event sources 2025-04-13 04:28:35 +09:00
Yu Watanabe 94dd3a569c event-util: use DEFINE_HASH_OPS_WITH_VALUE_DESTRUCTOR() to define event_source_hash_ops
Currently, the hash_ops is only used by set, so this does not change
anything. But, there are several benefits,
- we can drop cast in the definition,
- the hash_ops can be also used by hashmap.
2025-04-13 04:28:35 +09:00
Yu Watanabe f4a717aa4d socket-proxy: use hash_ops with destructor for managing Connection
This also renames context_clear() -> context_done(), to follow our
recent coding style.
2025-04-13 04:28:35 +09:00
Yu Watanabe 234b86a444 socket-proxy: make connection_free() return NULL
To make it follow our coding style.
2025-04-13 04:28:35 +09:00
Yu Watanabe 10e41cdddc socket-proxy: use event_reset_time_relative()
Also, split out context_reset_timer() from connection_release().
No functional change. Preparation for later change.
2025-04-13 04:28:35 +09:00
Luca Boccassi 9f091f098a TODO: drop getenv item, done where needed 2025-04-12 11:49:00 +01:00
Busayo Dada a51804a5ff Use secure_getenv() instead of getenv() where appropriate 2025-04-12 11:48:22 +01:00
Luca Boccassi a681435015 busctl: several cleanups for introspect command (#37103) 2025-04-12 11:46:58 +01:00
Yu Watanabe c63899c149 busctl: use table to format result of introspect command 2025-04-12 12:23:13 +09:00
Yu Watanabe b2bba933b6 busctl: use set_dump_sorted() and FOREACH_ARRAY() 2025-04-12 12:23:13 +09:00
Yu Watanabe 922828a4e2 busctl: use strdup_to() and set_consume() 2025-04-12 12:23:13 +09:00
Yu Watanabe d48966ccd1 busctl: set destructor to member_hash_ops
Then, we can drop the custom destructor of 'Set *mmebers'.
2025-04-12 12:23:13 +09:00
Yu Watanabe 67bdb6bee0 network/netdev: remove support of netdevsim
netdevsim device creation by networkd was deprecated by
59a9ef1022 (v246), and it does not work
since kernel v5.2:
https://github.com/torvalds/linux/commit/e05b2d141fef22cfac1928cf0eb6890e5dae4216

Now our baseline for the kernel is v5.4. Let's completely kill the
feature.
2025-04-12 09:23:27 +09:00
Yu Watanabe 012d76ab79 test: also wait for all queued events being processed
Otherwise, if already 'remove' uevent for the device is queued, then
the device node may not exist any more when 'udevadm wait' command succeeds.

Follow-up for 90941d458a.
2025-04-12 09:22:27 +09:00
Yu Watanabe 644c934348 core: drop cgroup v1 synthetic empty event logic (#37099) 2025-04-12 09:21:29 +09:00
Luca Boccassi 386b94e6f6 fido2: hook up with plymouth for notifications (#37089)
Show notifications for fido2 messages in plymouth, so that they
show up in the initrd like the passphrase prompt already does.
2025-04-12 01:06:31 +01:00
Luca Boccassi 633f07e7c9 mkosi: update debian commit reference to 91a4d114e0b5a01385477f8862caedc1056fa68b
* 91a4d114e0 Install new file for upstream profile
2025-04-11 23:07:38 +01:00
Luca Boccassi 988fae8024 mkosi: enable autologin also with --console=gui 2025-04-11 23:07:38 +01:00
Luca Boccassi fc35f5280f fido2: hook up with plymouth for notifications
Show notifications for fido2 messages in plymouth, so that they
show up in the initrd like the passphrase prompt already does.
2025-04-11 23:07:38 +01:00
Mike Yuan 66f83537f9 core: unit_watch_pidref() gracefully handles EEXIST
No need to check that at callsite.
2025-04-11 23:50:50 +02:00
Mike Yuan 55e4df21ef core: drop cgroup v1 synthetic empty event logic
cgroup v2's empty events are reliable, hence we'd not bother
with validating it again in unit_add_to_cgroup_empty_queue()
either.
2025-04-11 23:50:50 +02:00
Yu Watanabe 1dcdad57ce udev-rules: add more verbose messages for ATTR{} and ATTRS{}
This also makes udevd/udevadm mention that the parent device rules
also tested with the device currently processing.

With the following rules file:
```
ATTRS{idVendor}=="0001", ATTRS{idProduct}=="44ff", MODE="0666", GROUP="input",
```

Before:
```
event0: /tmp/hoge.rules:1 Checking conditions for parent devices: ATTRS{idVendor}=="0001", ATTRS{idProduct}=="44ff"
event0: /tmp/hoge.rules:1 No parent device passed parent conditions.
```
After:
```
event0: /tmp/hoge.rules:1 Checking conditions for parent devices (including self): ATTRS{idVendor}=="0001", ATTRS{idProduct}=="44ff"
event0: /tmp/hoge.rules:1 ATTRS{idVendor}=="0001": Cannot read sysfs attribute: No such file or directory
input0: /tmp/hoge.rules:1 ATTRS{idVendor}=="0001": Cannot read sysfs attribute: No such file or directory
PNP0C0E:00: /tmp/hoge.rules:1 ATTRS{idVendor}=="0001": Cannot read sysfs attribute: No such file or directory
LNXSYBUS:00: /tmp/hoge.rules:1 ATTRS{idVendor}=="0001": Cannot read sysfs attribute: No such file or directory
LNXSYSTM:00: /tmp/hoge.rules:1 ATTRS{idVendor}=="0001": Cannot read sysfs attribute: No such file or directory
event0: /tmp/hoge.rules:1 No parent device passed parent conditions.
```

Prompted by #37063.
2025-04-12 06:48:09 +09:00
Yu Watanabe 09e98a3d74 udev: support reverting/serializing/deserializing configurations set by 'udevadm control' (#37067)
Previously, log level, properties, maximum number of worker processes,
and so on set by 'udevadm control' are discarded on restart. This makes
the configuration serialized on stop and deserialized in next
invocation. Also, this introduces 'udevadm control --revert' to clear
previous configurations.
2025-04-12 06:47:16 +09:00
Mike Yuan c9eff0bcfc core/cgroup: drop v1 handling in unit_attach_pids_to_cgroup() 2025-04-11 23:44:24 +02:00
Mike Yuan 512e89e750 mount-setup: swap MountMode and condition_fn in struct
To avoid unnecessary 'NULL's in structured initializer.
2025-04-11 23:44:24 +02:00
Yu Watanabe c50606aa56 TEST-17-UDEV: add test cases for reverting/serializing/deserializing config 2025-04-12 05:08:20 +09:00
Yu Watanabe 49120a7a8f udev-config: serialize/deserialize dynamical configurations
Previously, configurations set by 'udevadm control' such as log level,
maximum number of childrens, global properties, and so on were discarded
on restart. This makes udevd serialize those configurations on stop, and
deserialize them in the next invocation.
2025-04-12 05:08:20 +09:00
Yu Watanabe 8b078c5b86 daemon-util: expose notify_remove_fd_warn() 2025-04-12 05:08:20 +09:00
Yu Watanabe c53d155d8d udevadm: introduce --revert option to call io.systemd.service.Revert 2025-04-12 05:08:16 +09:00
Yu Watanabe 1043ae3bc2 udev-varlink: introduce io.systemd.Udev.Revert method
It reverts dynamically set configurations.
2025-04-12 04:55:03 +09:00
Daan De Meyer 0a893ef3f3 mkosi: update fedora commit reference to 6646d13acae64665f63354cd60ecf963ee563b96 (#37065)
* 6646d13aca fmf: Run tests from systemd-tests rpm if possible
2025-04-11 13:46:20 +02:00
Daan De Meyer 8318cac68b mkosi: update fedora commit reference to 6646d13acae64665f63354cd60ecf963ee563b96
* 6646d13aca fmf: Run tests from systemd-tests rpm if possible
2025-04-11 12:13:31 +02:00
Daan De Meyer fc4f9c5f8b test: Work around bug in meson when installing directory symlinks
Installing symlinks pointing to directories with install_subdir() is
broken (see https://github.com/mesonbuild/meson/pull/14471). Let's work
around the issue for now by manually installing the standalone directory
until the issue is fixed upstream and available in meson in all supported
distributions.
2025-04-11 12:13:31 +02:00
Daan De Meyer 96e7472dcd meson: Fix installation directory for integration-tests when using rsync 2025-04-11 11:42:04 +02:00
Yu Watanabe 7a5a667b1a JSON User/Group records: Add properties for UUIDs (#37024)
It is useful to have stable and unique identifiers for a security
principal. The majority of identitiy management systems in use with Unix
systems today (e.g. Active Directory objectGUID, FreeIPA ipaUniqueID,
Kanidm UUIDs) assign each account and group a unique UUID and exposing
that to applications allows them to refer to accounts in a stable
manner.

At this time we are merely adding the properties to the user/group
records. Adding ways to perform lookups by these IDs is left for a
future PR.

See [discussion](https://mastodon.social/@pid_eins/114283987142625086) and
[this comment](https://github.com/systemd/systemd/issues/24032#issuecomment-2745246757).

I'm sure there are wording aspects which could be improved, but I
believe this is a reasonable initial stab at the problem.
2025-04-11 07:10:56 +09:00
Daan De Meyer 9c8646646c integration-tests: Don't enable tpm for every single test 2025-04-11 06:20:25 +09:00
Daan De Meyer beecd4e344 test: Fix typing error in integration-test-wrapper.py 2025-04-11 06:20:25 +09:00
Daan De Meyer 1df41e6a38 mkosi: Make sure the mkosi image can be built without the source tree available (#37068)
Let's make sure the mkosi can be built (with `NO_BUILD` enabled) without
the source tree available. This allows running the integration tests
when only distribution packages are available but the source tree is
not.
2025-04-10 16:35:16 +02:00
Luca Boccassi dd85fbf6aa Some cleanups and a CI fix for test-sd-device (#37083) 2025-04-10 14:47:02 +01:00
Daan De Meyer e2b01571d0 mkosi: Move TEST-24-CRYPTSETUP files to mkosi/ directory
If the integration tests have been installed in the systemd-tests
package, the path to these in mkosi.postinst.chroot will be wrong.
Let's fix the issue by moving these files into the mkosi/ directory
as they're only used by mkosi regardless so they make more sense to
be there anyway.
2025-04-10 15:09:29 +02:00
Daan De Meyer 8b1c66f72c mkosi: Rely on tmpfiles to put nsswitch.conf in place
Let's rely on tmpfiles to put our nsswitch.conf in place instead of
doing it in the post-install script. This moves us one step closer
to being able to build the mkosi image without having the source
tree available when NO_BUILD is used.
2025-04-10 15:09:29 +02:00
Daan De Meyer 5ec2ba5d2f mkosi: update debian commit reference to 11efce9445f987f1e588719c182a93794eba2565
* 11efce9445 Install /usr/share/factory for upstream profile
* 4c3d753649 d/t/upstream: copy mkosi key from mkosi/ subdir if it exists
* 00f2ab1bce Install etc.conf tmpfiles.d in upstream builds
* dcf5869729 Refresh patch for upstream review changes
* f94714d8cc d/copyright: use GPL URL instead of old FSF postal address
* bf005e69f5 Update changelog for 257.5-2 release
* 709e474e5b Backport new patch to workaround /lib64 symlink incompatibility
* fa6c61db40 Update changelog for 257.5-1 release
* 9c9ca29ceb Remove conflicts with dracut:arm64 and build nspawn:arm64 again
* 5899bcc55d Update changelog for 257.5-1 release
* dd5cb92d08 Drop backports, included in 257.5
* c1373fb99e d/t/upstream: run mkosi genkey before summary
* 223d7a412a Install new files for upstream
* b9d337abd9 Use Conflicts instead of Breaks/Replaces for file move
* 9379847813 d/t/upstream: write mkosi.local.conf in subdir if the rest of the configs are in subdir
* 86fc24b565 d/t/upstream: do not fail if 10-root.conf is not present
2025-04-10 15:09:13 +02:00
Zbigniew Jędrzejewski-Szmek 74cb65e45f test-sd-device: limit the number of iterations when testing device parent/child functions
The test "hangs" and times out on some arm64 machines. It actually works as
expected, but the machine has 2016 children under /sys/devices/system/memory/,
and the tests do a double loop over this, which is slow enough to hit the 120 s
limit. Add a limit on the number of iterations.

Another option would be to exclude "memory" subsystem. But we may have other
subsystems which have the same problem in the future, so I think it'll be more
robust to not try to limit the fix to a specific subsystem.
2025-04-10 13:59:27 +02:00
Zbigniew Jędrzejewski-Szmek a9cded655b test-sd-device: dedeplicate common setup fragment 2025-04-10 13:59:27 +02:00
Nick Labich 3d115fb6c8 repart: mkfs.btrfs --subvol option format change
Adapt repart mkfs.btrfs invocation to match the latest format:
(btrfs-progs@8ba72e45c8a6da1275b448ad4912d96e0a2c54b5)

Fixes #37074
2025-04-10 18:20:59 +09:00
Christian Hesse e1a932f3c5 man: mention special functionality for reload-or-restart with --marked (#37076)
We had a downstream discussion on what `systemctl reload-or-restart
--marked` does, until upstream chimed in and pointed on very special
behavior for that combination. 😜

The second references the first, but not vice versa. Let's fix this.
2025-04-10 18:19:00 +09:00
ZIHCO 1ab010cbad nspawn: replace prefix_roota() with chase() 2025-04-10 00:36:06 +02:00
Nick Labich 3b31b2e4cc vmspawn: fix --extra-drive= option
Follow-up for 369655330d.

Fixes #36807.
2025-04-10 04:38:51 +09:00
Mario Limonciello 9a224c307b backlight: Drop support for actual_brightness
Some AMD systems have support for features like custom brightness
curve or adaptive backlight management.  These features allow the
display driver to adjust the brightness based upon other factors
than just the user brightness request.

The user's brightness request is indicated in the 'brightness' file
but the effective result of the logic in the display driver is stored
in the 'actual_brightness' file.

This leads to problems when shutting the system down because the value
of 'actual_brightness' may be lower than 'brightness' and the wrong value
gets stored for the next boot.

For example if the brightness a user requested was 150, the actual_brightness
might be 130. So the next boot the brightness will be "set" to 130, but the
actual brightness might be 115. If the user reboots again it will be set to 115
for the next boot but the actual brightness might be 100. That is this gets worse
and worse each reboot cycle until the system eventually boots up at minimum
brightness.

Furthermore the kernel documentation indicates that the brightness and
actual_brightness files are not guaranteed to be the same values.

Due to this; drop the use of 'actual_brightness' when saving/restoring brightness
and instead rely only upon 'brightness'.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
2025-04-10 04:31:46 +09:00
Yu Watanabe 62146da6ce core,run0: fixlets/tweaks around $SHELL handling (#37052)
Fixes #35007
2025-04-10 04:29:30 +09:00