]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 months agofstab-generator: honor x-systemd.validatefs from kernel cmdline too 37109/head
Mike Yuan [Sat, 12 Apr 2025 13:22:05 +0000 (15:22 +0200)] 
fstab-generator: honor x-systemd.validatefs from kernel cmdline too

7 months agofstab/gpt-auto: hook up validatefs to /sysroot/usr/ rather than /sysusr/usr/
Mike Yuan [Sat, 12 Apr 2025 13:06:36 +0000 (15:06 +0200)] 
fstab/gpt-auto: hook up validatefs to /sysroot/usr/ rather than /sysusr/usr/

We carry a special logic for /usr/ in initrd that it initially gets
mounted to /sysusr/usr/ and later bind mounted to /sysroot/usr/.
When hooking up validatefs it is hence necessary to wait for
the bind mount and validate that, rather than the /sysusr/usr/
established as intermediate transport.

Alternative to #37102

7 months agogpt-auto: do not add /sysusr/usr/ -> /sysroot/usr/ after switch-root
Mike Yuan [Sat, 12 Apr 2025 12:50:46 +0000 (14:50 +0200)] 
gpt-auto: do not add /sysusr/usr/ -> /sysroot/usr/ after switch-root

Follow-up for 7852e301e0eb839adf4bf45aa41e39c0dfc03403

7 months agoTODO: drop getenv item, done where needed
Luca Boccassi [Sat, 12 Apr 2025 10:49:00 +0000 (11:49 +0100)] 
TODO: drop getenv item, done where needed

7 months agoUse secure_getenv() instead of getenv() where appropriate
Busayo Dada [Wed, 9 Apr 2025 16:23:23 +0000 (17:23 +0100)] 
Use secure_getenv() instead of getenv() where appropriate

7 months agobusctl: several cleanups for introspect command (#37103)
Luca Boccassi [Sat, 12 Apr 2025 10:46:58 +0000 (11:46 +0100)] 
busctl: several cleanups for introspect command (#37103)

7 months agobusctl: use table to format result of introspect command 37103/head
Yu Watanabe [Sat, 12 Apr 2025 01:57:33 +0000 (10:57 +0900)] 
busctl: use table to format result of introspect command

7 months agobusctl: use set_dump_sorted() and FOREACH_ARRAY()
Yu Watanabe [Sat, 12 Apr 2025 01:17:33 +0000 (10:17 +0900)] 
busctl: use set_dump_sorted() and FOREACH_ARRAY()

7 months agobusctl: use strdup_to() and set_consume()
Yu Watanabe [Sat, 12 Apr 2025 01:04:41 +0000 (10:04 +0900)] 
busctl: use strdup_to() and set_consume()

7 months agobusctl: set destructor to member_hash_ops
Yu Watanabe [Sat, 12 Apr 2025 03:18:40 +0000 (12:18 +0900)] 
busctl: set destructor to member_hash_ops

Then, we can drop the custom destructor of 'Set *mmebers'.

7 months agonetwork/netdev: remove support of netdevsim
Yu Watanabe [Fri, 11 Apr 2025 22:10:51 +0000 (07:10 +0900)] 
network/netdev: remove support of netdevsim

netdevsim device creation by networkd was deprecated by
59a9ef102240adad039f58524cfa5774f9e78a7d (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.

7 months agotest: also wait for all queued events being processed
Yu Watanabe [Fri, 11 Apr 2025 20:50:32 +0000 (05:50 +0900)] 
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 90941d458a2f6b03cb782ab55c16f605b44c4fd8.

7 months agocore: drop cgroup v1 synthetic empty event logic (#37099)
Yu Watanabe [Sat, 12 Apr 2025 00:21:29 +0000 (09:21 +0900)] 
core: drop cgroup v1 synthetic empty event logic (#37099)

7 months agofido2: hook up with plymouth for notifications (#37089)
Luca Boccassi [Sat, 12 Apr 2025 00:06:31 +0000 (01:06 +0100)] 
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.

7 months agomkosi: update debian commit reference to 91a4d114e0b5a01385477f8862caedc1056fa68b 37089/head
Luca Boccassi [Thu, 10 Apr 2025 22:31:10 +0000 (23:31 +0100)] 
mkosi: update debian commit reference to 91a4d114e0b5a01385477f8862caedc1056fa68b

91a4d114e0 Install new file for upstream profile

7 months agomkosi: enable autologin also with --console=gui
Luca Boccassi [Thu, 10 Apr 2025 22:30:50 +0000 (23:30 +0100)] 
mkosi: enable autologin also with --console=gui

7 months agofido2: hook up with plymouth for notifications
Luca Boccassi [Thu, 10 Apr 2025 22:10:37 +0000 (23:10 +0100)] 
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.

7 months agocore: unit_watch_pidref() gracefully handles EEXIST 37099/head
Mike Yuan [Fri, 11 Apr 2025 21:43:25 +0000 (23:43 +0200)] 
core: unit_watch_pidref() gracefully handles EEXIST

No need to check that at callsite.

7 months agocore: drop cgroup v1 synthetic empty event logic
Mike Yuan [Sun, 16 Mar 2025 20:09:25 +0000 (21:09 +0100)] 
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.

7 months agoudev-rules: add more verbose messages for ATTR{} and ATTRS{}
Yu Watanabe [Fri, 11 Apr 2025 11:28:25 +0000 (20:28 +0900)] 
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.

7 months agoudev: support reverting/serializing/deserializing configurations set by 'udevadm...
Yu Watanabe [Fri, 11 Apr 2025 21:47:16 +0000 (06:47 +0900)] 
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.

7 months agocore/cgroup: drop v1 handling in unit_attach_pids_to_cgroup()
Mike Yuan [Sat, 5 Apr 2025 21:49:12 +0000 (23:49 +0200)] 
core/cgroup: drop v1 handling in unit_attach_pids_to_cgroup()

7 months agomount-setup: swap MountMode and condition_fn in struct
Mike Yuan [Fri, 4 Apr 2025 15:40:15 +0000 (17:40 +0200)] 
mount-setup: swap MountMode and condition_fn in struct

To avoid unnecessary 'NULL's in structured initializer.

7 months agoTEST-17-UDEV: add test cases for reverting/serializing/deserializing config 37067/head
Yu Watanabe [Mon, 7 Apr 2025 20:26:09 +0000 (05:26 +0900)] 
TEST-17-UDEV: add test cases for reverting/serializing/deserializing config

7 months agoudev-config: serialize/deserialize dynamical configurations
Yu Watanabe [Mon, 7 Apr 2025 19:33:14 +0000 (04:33 +0900)] 
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.

7 months agodaemon-util: expose notify_remove_fd_warn()
Yu Watanabe [Sat, 5 Apr 2025 13:41:28 +0000 (22:41 +0900)] 
daemon-util: expose notify_remove_fd_warn()

7 months agoudevadm: introduce --revert option to call io.systemd.service.Revert
Yu Watanabe [Mon, 7 Apr 2025 20:06:22 +0000 (05:06 +0900)] 
udevadm: introduce --revert option to call io.systemd.service.Revert

7 months agoudev-varlink: introduce io.systemd.Udev.Revert method
Yu Watanabe [Mon, 7 Apr 2025 19:58:01 +0000 (04:58 +0900)] 
udev-varlink: introduce io.systemd.Udev.Revert method

It reverts dynamically set configurations.

7 months agomkosi: update fedora commit reference to 6646d13acae64665f63354cd60ecf963ee563b96...
Daan De Meyer [Fri, 11 Apr 2025 11:46:20 +0000 (13:46 +0200)] 
mkosi: update fedora commit reference to 6646d13acae64665f63354cd60ecf963ee563b96 (#37065)

6646d13aca fmf: Run tests from systemd-tests rpm if possible

7 months agomkosi: update fedora commit reference to 6646d13acae64665f63354cd60ecf963ee563b96 37065/head
Daan De Meyer [Wed, 9 Apr 2025 12:30:13 +0000 (14:30 +0200)] 
mkosi: update fedora commit reference to 6646d13acae64665f63354cd60ecf963ee563b96

6646d13aca fmf: Run tests from systemd-tests rpm if possible

7 months agotest: Work around bug in meson when installing directory symlinks
Daan De Meyer [Fri, 11 Apr 2025 10:12:12 +0000 (12:12 +0200)] 
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.

7 months agomeson: Fix installation directory for integration-tests when using rsync
Daan De Meyer [Fri, 11 Apr 2025 09:41:48 +0000 (11:41 +0200)] 
meson: Fix installation directory for integration-tests when using rsync

7 months agoJSON User/Group records: Add properties for UUIDs (#37024)
Yu Watanabe [Thu, 10 Apr 2025 22:10:56 +0000 (07:10 +0900)] 
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.

7 months agointegration-tests: Don't enable tpm for every single test
Daan De Meyer [Thu, 10 Apr 2025 18:39:12 +0000 (20:39 +0200)] 
integration-tests: Don't enable tpm for every single test

7 months agotest: Fix typing error in integration-test-wrapper.py
Daan De Meyer [Thu, 10 Apr 2025 18:38:49 +0000 (20:38 +0200)] 
test: Fix typing error in integration-test-wrapper.py

7 months agomkosi: Make sure the mkosi image can be built without the source tree available ...
Daan De Meyer [Thu, 10 Apr 2025 14:35:16 +0000 (16:35 +0200)] 
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.

7 months agoSome cleanups and a CI fix for test-sd-device (#37083)
Luca Boccassi [Thu, 10 Apr 2025 13:47:02 +0000 (14:47 +0100)] 
Some cleanups and a CI fix for test-sd-device (#37083)

7 months agomkosi: Move TEST-24-CRYPTSETUP files to mkosi/ directory 37068/head
Daan De Meyer [Wed, 9 Apr 2025 13:31:21 +0000 (15:31 +0200)] 
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.

7 months agomkosi: Rely on tmpfiles to put nsswitch.conf in place
Daan De Meyer [Wed, 9 Apr 2025 13:27:51 +0000 (15:27 +0200)] 
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.

7 months agomkosi: update debian commit reference to 11efce9445f987f1e588719c182a93794eba2565
Daan De Meyer [Thu, 10 Apr 2025 13:09:13 +0000 (15:09 +0200)] 
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

7 months agotest-sd-device: limit the number of iterations when testing device parent/child functions 37083/head
Zbigniew JÄ™drzejewski-Szmek [Thu, 10 Apr 2025 11:51:21 +0000 (13:51 +0200)] 
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.

7 months agotest-sd-device: dedeplicate common setup fragment
Zbigniew JÄ™drzejewski-Szmek [Thu, 10 Apr 2025 11:34:52 +0000 (13:34 +0200)] 
test-sd-device: dedeplicate common setup fragment

7 months agorepart: mkfs.btrfs --subvol option format change
Nick Labich [Wed, 9 Apr 2025 19:32:11 +0000 (19:32 +0000)] 
repart: mkfs.btrfs --subvol option format change

Adapt repart mkfs.btrfs invocation to match the latest format:
(btrfs-progs@8ba72e45c8a6da1275b448ad4912d96e0a2c54b5)

Fixes #37074

7 months agoman: mention special functionality for reload-or-restart with --marked (#37076)
Christian Hesse [Wed, 9 Apr 2025 21:03:06 +0000 (23:03 +0200)] 
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.

7 months agonspawn: replace prefix_roota() with chase()
ZIHCO [Wed, 9 Apr 2025 09:45:42 +0000 (10:45 +0100)] 
nspawn: replace prefix_roota() with chase()

7 months agovmspawn: fix --extra-drive= option
Nick Labich [Thu, 3 Apr 2025 15:11:55 +0000 (11:11 -0400)] 
vmspawn: fix --extra-drive= option

Follow-up for 369655330d57a82b6f346a77798968f135221c99.

Fixes #36807.

7 months agobacklight: Drop support for actual_brightness
Mario Limonciello [Fri, 28 Mar 2025 14:19:23 +0000 (09:19 -0500)] 
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>
7 months agocore,run0: fixlets/tweaks around $SHELL handling (#37052)
Yu Watanabe [Wed, 9 Apr 2025 19:29:30 +0000 (04:29 +0900)] 
core,run0: fixlets/tweaks around $SHELL handling (#37052)

Fixes #35007

7 months agotest: Two fixes for running the integration tests standalone (#37073)
Daan De Meyer [Wed, 9 Apr 2025 19:25:40 +0000 (21:25 +0200)] 
test: Two fixes for running the integration tests standalone (#37073)

7 months agotest: Make sure symlinks in integration-tests are properly installed 37073/head
Daan De Meyer [Wed, 9 Apr 2025 18:47:30 +0000 (20:47 +0200)] 
test: Make sure symlinks in integration-tests are properly installed

meson follows symlinks by default, so make sure we use
follow_symlinks=False if meson is new enough and rsync otherwise like
we already do for other testdata subdirectories.

7 months agotest: Drop version from standalone meson file
Daan De Meyer [Wed, 9 Apr 2025 18:23:26 +0000 (20:23 +0200)] 
test: Drop version from standalone meson file

The file won't exist if we're running tests from the systemd-tests
package so let's drop it as it's not used for anything.

7 months agomkosi: update mkosi commit reference to 7e4ec15aee6b98300b2ee14265bc647a716a9f8a
Daan De Meyer [Wed, 9 Apr 2025 14:25:49 +0000 (16:25 +0200)] 
mkosi: update mkosi commit reference to 7e4ec15aee6b98300b2ee14265bc647a716a9f8a

7e4ec15aee Generate key-cert pair in config directory (fixes #3655)
5793e64958 Don't use gen_kernel_images() in run_depmod()
bc497f1d17 Fix typing due to recent changes in typeshed
e6a603a21a Add "plymouth" initrd profile

7 months agoshared/calendarspec: fix normalization when DST is negative
kmeaw [Sun, 30 Mar 2025 12:08:38 +0000 (13:08 +0100)] 
shared/calendarspec: fix normalization when DST is negative

When trying to calculate the next firing of 'hourly', we'd lose the
tm_isdst value on the next iteration.

On most systems in Europe/Dublin it would cause a 100% cpu hang due to
timers restarting.

This happens in Europe/Dublin because Ireland defines the Irish Standard Time
as UTC+1, so winter time is encoded in tzdata as negative 1 hour of daylight
saving.

Before this patch:
$ env TZ=IST-1GMT-0,M10.5.0/1,M3.5.0/1 systemd-analyze calendar --base-time='Sat 2025-03-29 22:00:00 UTC' --iterations=5 'hourly'
  Original form: hourly
Normalized form: *-*-* *:00:00
    Next elapse: Sat 2025-03-29 23:00:00 GMT
       (in UTC): Sat 2025-03-29 23:00:00 UTC
       From now: 13h ago
   Iteration #2: Sun 2025-03-30 00:00:00 GMT
       (in UTC): Sun 2025-03-30 00:00:00 UTC
       From now: 12h ago
   Iteration #3: Sun 2025-03-30 00:00:00 GMT  <-- note every next iteration having the same firing time
       (in UTC): Sun 2025-03-30 00:00:00 UTC
       From now: 12h ago
...

With this patch:
$ env TZ=IST-1GMT-0,M10.5.0/1,M3.5.0/1 systemd-analyze calendar --base-time='Sat 2025-03-29 22:00:00 UTC' --iterations=5 'hourly'
  Original form: hourly
Normalized form: *-*-* *:00:00
    Next elapse: Sat 2025-03-29 23:00:00 GMT
       (in UTC): Sat 2025-03-29 23:00:00 UTC
       From now: 13h ago
   Iteration #2: Sun 2025-03-30 00:00:00 GMT
       (in UTC): Sun 2025-03-30 00:00:00 UTC
       From now: 12h ago
   Iteration #3: Sun 2025-03-30 02:00:00 IST  <-- the expected 1 hour jump
       (in UTC): Sun 2025-03-30 01:00:00 UTC
       From now: 11h ago
...

This bug isn't reproduced on Debian and Ubuntu because they mitigate it by
using the rearguard version of tzdata. ArchLinux and NixOS don't, so it would
cause pid1 to spin during DST transition.

This is how the affected tzdata looks like:
$ zdump -V -c 2024,2025 Europe/Dublin
Europe/Dublin  Sun Mar 31 00:59:59 2024 UT = Sun Mar 31 00:59:59 2024 GMT isdst=1 gmtoff=0
Europe/Dublin  Sun Mar 31 01:00:00 2024 UT = Sun Mar 31 02:00:00 2024 IST isdst=0 gmtoff=3600
Europe/Dublin  Sun Oct 27 00:59:59 2024 UT = Sun Oct 27 01:59:59 2024 IST isdst=0 gmtoff=3600
Europe/Dublin  Sun Oct 27 01:00:00 2024 UT = Sun Oct 27 01:00:00 2024 GMT isdst=1 gmtoff=0

Compare it to Europe/London:
$ zdump -V -c 2024,2025 Europe/London
Europe/London  Sun Mar 31 00:59:59 2024 UT = Sun Mar 31 00:59:59 2024 GMT isdst=0 gmtoff=0
Europe/London  Sun Mar 31 01:00:00 2024 UT = Sun Mar 31 02:00:00 2024 BST isdst=1 gmtoff=3600
Europe/London  Sun Oct 27 00:59:59 2024 UT = Sun Oct 27 01:59:59 2024 BST isdst=1 gmtoff=3600
Europe/London  Sun Oct 27 01:00:00 2024 UT = Sun Oct 27 01:00:00 2024 GMT isdst=0 gmtoff=0

Fixes #32039.

7 months agotest: add test case for PAMName= $SHELL acquisition for root 37052/head
Mike Yuan [Tue, 8 Apr 2025 23:38:52 +0000 (01:38 +0200)] 
test: add test case for PAMName= $SHELL acquisition for root

7 months agocore/exec-invoke: consult NSS for root user creds if SetLoginEnvironment=/PAMName=
Mike Yuan [Tue, 8 Apr 2025 13:20:21 +0000 (15:20 +0200)] 
core/exec-invoke: consult NSS for root user creds if SetLoginEnvironment=/PAMName=

7 months agocore/exec-invoke: never override acquired user cred with fallback one
Mike Yuan [Tue, 8 Apr 2025 14:43:28 +0000 (16:43 +0200)] 
core/exec-invoke: never override acquired user cred with fallback one

7 months agorun0: make sure we submit $SHELL to remote
Mike Yuan [Tue, 8 Apr 2025 20:35:14 +0000 (22:35 +0200)] 
run0: make sure we submit $SHELL to remote

Normally, the service manager sets $SHELL to the target user's
login shell, but run0 always overrides that with either
originating user's shell or value from --setenv=SHELL=. In both cases
$SHELL needs to be sent.

Fixes #35007

7 months agoTwo fixes to reduce the number of unnecessary rebuilds (#37069)
Daan De Meyer [Wed, 9 Apr 2025 15:12:07 +0000 (17:12 +0200)] 
Two fixes to reduce the number of unnecessary rebuilds (#37069)

7 months agomkosi: Set time-epoch= to fixed value 37069/head
Daan De Meyer [Wed, 9 Apr 2025 14:12:30 +0000 (16:12 +0200)] 
mkosi: Set time-epoch= to fixed value

Turns out makepkg sets $SOURCE_DATE_EPOCH= to the current time for
every build if not set explicitly which causes full rebuilds if we
don't set time-epoch explicitly ourselves, so let's do that everywhere
to avoid unnecessary rebuilds.

7 months agoelf2efi: Deal properly with empty $SOURCE_DATE_EPOCH
Daan De Meyer [Wed, 9 Apr 2025 13:00:28 +0000 (15:00 +0200)] 
elf2efi: Deal properly with empty $SOURCE_DATE_EPOCH

7 months agomeson: Use custom_target() instead of vcs_tag()
Daan De Meyer [Wed, 9 Apr 2025 11:54:22 +0000 (13:54 +0200)] 
meson: Use custom_target() instead of vcs_tag()

vsc_tag() always reruns even if the vcs-tag option is disabled. Let's
use custom_target() instead so that we can only enable build_always_stale
if the vcs-tag option is enabled.

7 months agoexec-invoke: Fix two log messages
Daan De Meyer [Wed, 9 Apr 2025 10:50:03 +0000 (12:50 +0200)] 
exec-invoke: Fix two log messages

7 months agomkosi: drop os-release symlink for minimal-base image
Luca Boccassi [Tue, 8 Apr 2025 19:32:32 +0000 (20:32 +0100)] 
mkosi: drop os-release symlink for minimal-base image

[  385s] ERROR: link target doesn't exist (neither in build root nor in installed system):
[  385s]   /usr/lib/systemd/tests/mkosi/mkosi.images/minimal-base/mkosi.extra/etc/os-release -> ../usr/lib/os-release

It shouldn't be even needed, everything should look in /usr/lib/os-release too

Follow-up for a0ce5e642ff4fcfcd7da25a585bfbd83b5737235

7 months agoudev: several trivial cleanups (#37059)
Luca Boccassi [Wed, 9 Apr 2025 09:32:42 +0000 (10:32 +0100)] 
udev: several trivial cleanups (#37059)

7 months agotest: drop unnecessary comparison and use correct assertion macros
Yu Watanabe [Wed, 9 Apr 2025 04:31:42 +0000 (13:31 +0900)] 
test: drop unnecessary comparison and use correct assertion macros

Follow-up for 8951706784c0534f821600fda2fb1e89f875f823.
Fixes CID#1608873 and CID#1608874.

7 months agopo: Translated using Weblate (Chinese (Traditional) (zh_TW))
hsu zangmen [Wed, 9 Apr 2025 02:53:35 +0000 (02:53 +0000)] 
po: Translated using Weblate (Chinese (Traditional) (zh_TW))

Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: hsu zangmen <chzang55@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_TW/
Translation: systemd/main

7 months agoudev-manager: move functions to place related functions closer together 37059/head
Yu Watanabe [Tue, 8 Apr 2025 21:34:41 +0000 (06:34 +0900)] 
udev-manager: move functions to place related functions closer together

No functional change, just refactoring.

7 months agoudev: merge manager_init() into manager_main()
Yu Watanabe [Tue, 8 Apr 2025 20:44:36 +0000 (05:44 +0900)] 
udev: merge manager_init() into manager_main()

It is not necessary to read cgroup path and passed fds earlier,
especially when legacy --daemon option is specified.

7 months agoudev-config: restore log level set by systemd.log_level on reload
Yu Watanabe [Mon, 7 Apr 2025 21:26:12 +0000 (06:26 +0900)] 
udev-config: restore log level set by systemd.log_level on reload

If previously log level was specified in udev.conf but not now,
then let's make 'udevadm control --reload' sets the log level
specified by systemd.log_level.

7 months agoshell-completion/udevadm: support dissect_image builtin
Yu Watanabe [Tue, 8 Apr 2025 23:54:16 +0000 (08:54 +0900)] 
shell-completion/udevadm: support dissect_image builtin

Follow-up for a8b2302bc12364662ec0576f0ef28345e079679f.

7 months agotest: Improve coverage in test-memfd-util and use ASSERT_OK() macro and friends
Busayo Dada [Wed, 26 Mar 2025 14:04:05 +0000 (15:04 +0100)] 
test: Improve coverage in test-memfd-util and use ASSERT_OK() macro and friends

7 months agoudev-watch: add inotify watch by manager process (#37023)
Yu Watanabe [Tue, 8 Apr 2025 21:43:24 +0000 (06:43 +0900)] 
udev-watch: add inotify watch by manager process (#37023)

This solves potential race in simultaneous addition of inotify watches
and removal of target device(s).

7 months agoudev: adjust event source priorities 37023/head
Yu Watanabe [Thu, 27 Mar 2025 04:52:53 +0000 (13:52 +0900)] 
udev: adjust event source priorities

7 months agoudev-watch: add inotify watch by manager process
Yu Watanabe [Thu, 27 Mar 2025 03:57:30 +0000 (12:57 +0900)] 
udev-watch: add inotify watch by manager process

Previously, inotify watch on a device node was added/removed by a
worker process processing the relevant uevent. However, that could not
avoid races. For example,
1. A device node X is removed by the kernel (e.g. unplug USB memory), and
   the kernel removes the inotify watch for the device node and produces
   IN_IGNORED event and 'remove' uevent for the device.
2. Before udevd processes the 'remove' uevent of the device, a worker
   process may try to add an inotify watch on another device node Y.
   As the inotify watch on X has been already removed, the worker may
   acquire the same watch handle that was previously assigned to X.
3. Since the 'remove' uevent for X is not processed yet, the symlink
   named with the watch handle still exists and points to X. So, the
   worker process for Y cannot add the symlink...

To avoid such races, let's sequentially add/remove inotify watch by the
manager process.

Note, this potentially reduces performance on boot when there exists
huge amount of disks and/or partitions.

7 months agomkosi: Set mitigations=off
Daan De Meyer [Tue, 8 Apr 2025 16:56:39 +0000 (18:56 +0200)] 
mkosi: Set mitigations=off

Might as well disable mitigations for these VMs. Who knows, maybe it'll
speed something up.

7 months agobasic/namespace-util: obtain uid and gid before unsharing user namespace
Michal Sekletar [Fri, 7 Feb 2025 19:18:49 +0000 (20:18 +0100)] 
basic/namespace-util: obtain uid and gid before unsharing user namespace

Getting user and group after unsharing user namespace is too late
because without any mapping, i.e. just after unshare(), we are mapped to
nobody.

7 months agomkosi: Make MinimumVersion= a git commit
Daan De Meyer [Tue, 8 Apr 2025 11:02:54 +0000 (13:02 +0200)] 
mkosi: Make MinimumVersion= a git commit

With the latest mkosi it's possible for MinimumVersion= to be a git
commit so let's start making use of that. This will make mkosi fail
if it's executed within the systemd repository and the checked out
commit is too old.

Putting the mkosi commit sha in mkosi/mkosi.conf also allows retrieving
it without having the full source tree available.

We also make a bunch of improvements to the fetch-mkosi.py script.

7 months agouserdb: add support for printing the UUID from user and group records 37024/head
Erin Shepherd [Tue, 8 Apr 2025 12:07:46 +0000 (12:07 +0000)] 
userdb: add support for printing the UUID from user and group records

7 months agotest: Install files required to run integration tests standalone
Daan De Meyer [Tue, 8 Apr 2025 09:00:20 +0000 (11:00 +0200)] 
test: Install files required to run integration tests standalone

Let's make it possible to run the integration tests without requiring
the sources by installing the mkosi and integration-tests directories.

7 months agoTEST-04-JOURNAL: include util.sh before calling cgroupfs_supports_user_xattrs() ...
Luca Boccassi [Tue, 8 Apr 2025 08:52:13 +0000 (09:52 +0100)] 
TEST-04-JOURNAL: include util.sh before calling cgroupfs_supports_user_xattrs() (#37039)

Fixes a bug introduced by 46322f27427ab10ef4fca4d189f8eed27d1b5eaf
(v256).
Fixes #36991.

7 months agoTEST-17-UDEV: several follow-ups (#37042)
Yu Watanabe [Tue, 8 Apr 2025 07:43:03 +0000 (16:43 +0900)] 
TEST-17-UDEV: several follow-ups (#37042)

7 months agoudev: fix potential stuck on exit (#37022)
Luca Boccassi [Mon, 7 Apr 2025 22:54:23 +0000 (23:54 +0100)] 
udev: fix potential stuck on exit (#37022)

If an event is requeued after termination is requested, previously
systemd-udevd never called sd_event_exit() and stuck.

7 months agofstab-generator: fix options in systemd.mount-extra= arg
Jules Lamur [Mon, 7 Apr 2025 16:49:26 +0000 (18:49 +0200)] 
fstab-generator: fix options in systemd.mount-extra= arg

Fixes a bug introduced by 55365b0a233ae3024411fd0815ad930e20f6a3d6 (v254).

The arguments `(rd.)systemd.mount-extra` take a value that looks like
`WHAT:WHERE[:FSTYPE[:OPTIONS]]`. The `OPTIONS` were parsed into a nulstr
where a comma-separated c-string was expected. This leads to a bug where
only the first option was taken into account by the generator.

For example, if you passed `systemd.mount-extra=/x:/y:baz:ro,defaults`
to the kernel, `systemd-fstab-generator` would translate that into a
nulstr: `ro\0defaults\0`.
Since methods processing options in the generator expected a
comma-separated c-string, they would only see the first option, `ro` in
this case.

7 months agotest: switch to new config keyword for bind9 >= 9.21
Luca Boccassi [Mon, 7 Apr 2025 19:55:41 +0000 (20:55 +0100)] 
test: switch to new config keyword for bind9 >= 9.21

bind9 9.21 removed the deprecated 'managed-keys', swap it with
'trust-anchors' if the version is 9.21 or newer

[   20.654086] TEST-75-RESOLVED.sh[1217]: + delv -a /etc/bind.keys @ns1.unsigned.test signed.test
[   20.654425] TEST-75-RESOLVED.sh[1218]: + tee /tmp/tmp.D4LNomAKqY
[   20.672599] TEST-75-RESOLVED.sh[1218]: ;; /etc/bind.keys:1: option 'managed-keys' no longer exists

7 months agoTEST-04-JOURNAL: sync journal in test script, and find journal with invocation ID 37039/head
Yu Watanabe [Mon, 7 Apr 2025 21:56:40 +0000 (06:56 +0900)] 
TEST-04-JOURNAL: sync journal in test script, and find journal with invocation ID

Hopefully improve the stability of the test.

7 months agoJSON User/Group records: Add properties for UUIDs
Erin Shepherd [Sat, 5 Apr 2025 19:40:08 +0000 (21:40 +0200)] 
JSON User/Group records: Add properties for UUIDs

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.

This change does not implement user or group lookup by UUID; that is left for
a later PR.

7 months agoTEST-04-JOURNAL: include util.sh before calling cgroupfs_supports_user_xattrs()
Yu Watanabe [Mon, 7 Apr 2025 17:49:07 +0000 (02:49 +0900)] 
TEST-04-JOURNAL: include util.sh before calling cgroupfs_supports_user_xattrs()

Fixes a bug introduced by 46322f27427ab10ef4fca4d189f8eed27d1b5eaf (v256).
Fixes #36991.

7 months agoTEST-17-UDEV: fd may be >= 10 37042/head
Yu Watanabe [Mon, 7 Apr 2025 20:46:20 +0000 (05:46 +0900)] 
TEST-17-UDEV: fd may be >= 10

Follow-up for db5d89309a6df2b505c52d70bf5a638190777027.

7 months agoTEST-17-UDEV: update rules filename
Yu Watanabe [Mon, 7 Apr 2025 09:19:34 +0000 (18:19 +0900)] 
TEST-17-UDEV: update rules filename

Follow-up for 40959dcc028a6884fbea00c11d89217a77716d4d.

7 months agonspawn-oci: replace use of deprecated cgroup v1 properties with v2 ones (#37038)
Yu Watanabe [Mon, 7 Apr 2025 20:28:11 +0000 (05:28 +0900)] 
nspawn-oci: replace use of deprecated cgroup v1 properties with v2 ones (#37038)

7 months agobase-filesystem: avoid creating /lib64 symlink on existing rootfs
Luca Boccassi [Mon, 7 Apr 2025 13:50:39 +0000 (14:50 +0100)] 
base-filesystem: avoid creating /lib64 symlink on existing rootfs

While all distributions agree on where the basic rootfs symlinks
(/bin /sbin /lib) should point to, not all of them agree on the
target of /lib64. Debian and derivatives, expect something different
than Fedora et al. This is mostly due to the different way multiarch
vs multilib are designed.

This can lead to the situation where running systemd-nspawn on Fedora
to boot a Debian container creates an incompatible symlink in the guest
persistent, pre-created and pre-populated root filesystem, causing
issues due to these incompatibilities.

While it would be great if Debian and derivatives had the same
expectations as the rest of the world, this is baked in many places
and not likely to ever be fixable, as the multiarch vs multilib
behaviours are now very entrenched, and changing it would break
compatibilities left and right.

The core purpose of base-filesystem was to allow bringing up a system
with an empty/ephemeral/etc rootfs (and a /usr/ image on top). So as
a workaround, create /lib64 only if we detect that we have created
/bin /lib and /sbin, as that's a sure sign we are booting into an
empty rootfs that needs to be populated.
Conversely, if the filesystem _already_ has /bin /sbin and /lib,
it means it is not ephemeral and it is pre-prepared and persistent,
so it's a good idea to avoid second-guessing the image builder tool
or the package manager and override what it does, and just let them
carry on with the system however they configured it.

Reworked and reworded, original author: Helmut Grohne <helmut@subdivi.de>

7 months agoman: mention "overlay" as a possible option for systemd.volatile
Vitaly Kuznetsov [Mon, 7 Apr 2025 15:45:54 +0000 (17:45 +0200)] 
man: mention "overlay" as a possible option for systemd.volatile

systemd.volatile=overlay is described in the text below, however, it
is missing in the enclosed list of possible options in the beginning.

7 months agonspawn/oci: replace use of deprecated BlockIOWeight/BlockIODeviceWeight with IOWeight... 37038/head
Yu Watanabe [Mon, 7 Apr 2025 16:50:50 +0000 (01:50 +0900)] 
nspawn/oci: replace use of deprecated BlockIOWeight/BlockIODeviceWeight with IOWeight/IODeviceWeight

7 months agonspawn/oci: replace use of deprecated CPUShares with CPUWeight
Yu Watanabe [Mon, 7 Apr 2025 16:29:15 +0000 (01:29 +0900)] 
nspawn/oci: replace use of deprecated CPUShares with CPUWeight

7 months agonspawn/oci: also set CPUQuotaPeriodUSec DBus property
Yu Watanabe [Mon, 7 Apr 2025 16:28:17 +0000 (01:28 +0900)] 
nspawn/oci: also set CPUQuotaPeriodUSec DBus property

7 months agotest-notify-recv: fix message string
Yu Watanabe [Mon, 7 Apr 2025 14:47:33 +0000 (23:47 +0900)] 
test-notify-recv: fix message string

Follow-up for 2351bc991e3a4f1fbdaa2d53900980b6703babbd.
Addresses https://github.com/systemd/systemd/pull/37016#discussion_r2031363409.

7 months agoudev: drop unnecessary discardment of queued events 37022/head
Yu Watanabe [Sat, 5 Apr 2025 17:06:12 +0000 (02:06 +0900)] 
udev: drop unnecessary discardment of queued events

With the previous commit, now on_post_exit() checks only events
currently being processed. Hence, it is not necessary to discard
queued events in manager_exit().

Also, as already SIGTERM is sent to all workers, kill workers timer
is not necessary anymore after manager_exit(), hence disable it.

This mostly does not change any behavior. Just refactoring and
preparation for later change.

7 months agoudev: do not wait for event queue being empty on exit
Yu Watanabe [Sat, 5 Apr 2025 17:04:06 +0000 (02:04 +0900)] 
udev: do not wait for event queue being empty on exit

When the manager process is requested to terminate, if a worker process
try to lock a block device and failed, then the worker returns a
TRY_AGAIN notification and the event is requeued. Hence, the event queue
may have pending events even after manager_exit() is called. In such
situation, sd_event_exit() will never called, and udevd will stuck.

This makes, after termination is requested, it only checks whether there
are any events currently being processed.

7 months agoudev: unconditionally send signals to workers
Yu Watanabe [Sat, 5 Apr 2025 16:49:30 +0000 (01:49 +0900)] 
udev: unconditionally send signals to workers

It is not necessary to wait for a worker processing an event before
sending SIGTERM. Workers will handle SIGTERM after they finish events
that they are currently processing. Let's send SIGTERM whenever it
necessary.

7 months agoudev: split out two functions from on_post()
Yu Watanabe [Sat, 5 Apr 2025 16:01:41 +0000 (01:01 +0900)] 
udev: split out two functions from on_post()

No functional change, just refactoring and preparation for later change.