]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 weeks agotest: call bash with -o pipefail when piping commands in TEST-50-DISSECT 39331/head
Luca Boccassi [Wed, 15 Oct 2025 21:58:18 +0000 (22:58 +0100)] 
test: call bash with -o pipefail when piping commands in TEST-50-DISSECT

We want the tests to fail if one of the intermediate commands fails,
otherwise it is hard to spot failures

3 weeks agotest: install bsdextrautils in debian minimal img
Luca Boccassi [Wed, 15 Oct 2025 21:54:14 +0000 (22:54 +0100)] 
test: install bsdextrautils in debian minimal img

'rev' moved to bsdextrautils and TEST-50-DISSECT uses it, so it now
fails:

[   83.534905] bash[3581]: +++ grep '^now' /proc/timer_list
[   83.535479] bash[3582]: +++ cut '-d ' -f3
[   83.535774] bash[3583]: +++ rev
[   83.535774] bash[3583]: bash: line 1: rev: command not found

3 weeks agocore: Delete redundant log_parse_environment(), v2 (#39278)
Zbigniew Jędrzejewski-Szmek [Wed, 15 Oct 2025 15:50:59 +0000 (17:50 +0200)] 
core: Delete redundant log_parse_environment(), v2 (#39278)

Reworked version of #39175.

3 weeks agocore: delete redundant log_parse_environment() 39278/head
huyubiao [Tue, 30 Sep 2025 07:26:43 +0000 (15:26 +0800)] 
core: delete redundant log_parse_environment()

Fixes https://github.com/systemd/systemd/issues/38895.

Fix the confusing behavior where when an incorrect configuration item such as
'ManagerEnvironment=SYSTEMD_LOG_LEVEL=' is set, the first daemon-reload uses
old environment variables while the second daemon-reload uses LogLevel=.

Co-authored-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
The difference in behaviour is that the operations that were done between the
first log_parse_environment() and the second one might not be logged now, e.g.
if the environment enabled debug logging. That is unfortunate, but parsing the
environment twice and not having the explicit configuration take effect until a
second daemon-reload is confusing. We will always have some window where the
configuration for logging does not apply, in particular this must be true when
parsing the logging configuration. To make that window smaller, move operations
that could log after the call to log_parse_environment() as far as possible.

3 weeks agoman/systemd-systemd.conf: describe DefaultEnvironment= and ManagerEnvironment= better
Zbigniew Jędrzejewski-Szmek [Fri, 10 Oct 2025 16:28:09 +0000 (18:28 +0200)] 
man/systemd-systemd.conf: describe DefaultEnvironment= and ManagerEnvironment= better

The description of ME= said "see above", but it was actually above the other
one. So change the order. But while reading this, I found it very hard to
understand. So reword things, hopefully in a way that is easier to understand.
The current behaviour is rather complex and unintuitive, but this description
just tries to describe it truthfully.

3 weeks agoRevert "machine: restrict register-machine action again"
Luca Boccassi [Tue, 14 Oct 2025 17:07:50 +0000 (18:07 +0100)] 
Revert "machine: restrict register-machine action again"

Now that we have landed several fixes, this should be safe to do
again, so allow logged in users to register machines without
authentication prompts

This reverts commit 65badde82e0c77875a23f084cf3251c052e042e2.

3 weeks agoUse verity sharing for user services and nspawn too (#39313)
Luca Boccassi [Wed, 15 Oct 2025 10:01:57 +0000 (11:01 +0100)] 
Use verity sharing for user services and nspawn too (#39313)

https://github.com/systemd/systemd/pull/39168 made verity sharing
opt-in, and enabled it for system services.
Also enable it for user services for RootImage/etc, and for nspawn, for
the same reasons.

3 weeks agonetwork: add DHCP server domain name option support (#39260)
Govind Venugopal [Wed, 15 Oct 2025 09:20:41 +0000 (02:20 -0700)] 
network: add DHCP server domain name option support (#39260)

Implements DHCP option 15 (Domain Name) for systemd-networkd's DHCP
server, allowing administrators to configure the DNS default domain that
clients should use.

This addresses the feature request in issue #37077, where users needed
to manually configure domain names using
SendOption=15:string:example.com as a workaround.

This adds two new configuration options to the [DHCPServer] section:
- EmitDomain= (boolean): whether to send domain name to clients
- Domain= (string): the domain name to send (e.g., "example.com")

Example configuration:
  [DHCPServer] EmitDomain=yes Domain=example.com

This eliminates the need for manual workarounds using
SendOption=15:string:...

Fixes #37077

3 weeks agoimportd: change untar logic to be based on libarchive rather than shelling out to...
Lennart Poettering [Wed, 15 Oct 2025 09:12:23 +0000 (11:12 +0200)] 
importd: change untar logic to be based on libarchive rather than shelling out to gnu tar (#39143)

Let's use libarchive consistently everywhere, both for tarring and
untarring.

Note that there's an existing test case that validates untarring. Now,
it will validate libarchive rather than gnu tar.

Split out of #38728

3 weeks agomountfsd: make MountDirectory() work with systemd-homed
Lennart Poettering [Sat, 23 Aug 2025 06:15:01 +0000 (08:15 +0200)] 
mountfsd: make MountDirectory() work with systemd-homed

systemd-homed already applies an idmap to its mounts, hence we need to
undo it before we can create our own.

3 weeks agonsresource: fix varlink method dispatch table
Yu Watanabe [Wed, 15 Oct 2025 01:25:11 +0000 (10:25 +0900)] 
nsresource: fix varlink method dispatch table

Follow-up for 716bf93c4bde07c1870b9b0837f2ec33f36686f1 (v258).

3 weeks agodissect-image: when autoprobing insist on vfat for XBOOTLDR
Lennart Poettering [Thu, 9 Oct 2025 09:01:48 +0000 (11:01 +0200)] 
dissect-image: when autoprobing insist on vfat for XBOOTLDR

Let's reduce our attack surface by insisting that XBOOTLDR is vfat when
auto-probing, just like we do for the ESP. Given neither can
realistically be integrity protected (because firmware needs to access
them) let's insist on a vfat which has a much smaller attack surface,
and one we have to accept (for now) anyway, given that the ESP must be
VFAT.

This only applies to auto-probing of course. If people mount things
explicitly via fstab none of this matters. But we really shouldn't
automount a btrfs/xfs/ext4 partition as XBOOTLDR just because it looks
like one, as that would really defeat our otherwise possibly very strict
image policies.

This also introduces a new env var $SYSTEMD_DISSECT_FSTYPE_<DESIGNATOR>
environment variable that may override this hardcoding. This is in
particular useful in our testcases, since various actually do use ext4
as XBOOTLDR case. The tests are updated to make use of the new env var,
both as a mechanism to test this and to keep the tests working.

3 weeks agonspawn: enable verity sharing 39313/head
Luca Boccassi [Tue, 14 Oct 2025 17:46:08 +0000 (18:46 +0100)] 
nspawn: enable verity sharing

Just like RootImage=, ExtensionImages= etc, nspawn can make use of
this to save a lot of time when starting containers that use an already
open image, since the default was changed to disabled.

Follow-up for 57d1ceffb3d98f69c2da511ed59a420a1cfa7e40

3 weeks agodissect-image: pass through DISSECT_IMAGE_VERITY_SHARE to mountfsd via varlink if set
Luca Boccassi [Tue, 14 Oct 2025 17:44:32 +0000 (18:44 +0100)] 
dissect-image: pass through DISSECT_IMAGE_VERITY_SHARE to mountfsd via varlink if set

This ensures user services using RootImage=, ExtensionImages= etc. also
try to reuse existing verity devices, like system services.

Follow-up for 57d1ceffb3d98f69c2da511ed59a420a1cfa7e40

3 weeks agomountfsd: add boolean parameter to let callers enable verity sharing
Luca Boccassi [Tue, 14 Oct 2025 17:37:30 +0000 (18:37 +0100)] 
mountfsd: add boolean parameter to let callers enable verity sharing

3 weeks agomountfsd: json format unsigned types as unsigned
Luca Boccassi [Tue, 14 Oct 2025 19:14:39 +0000 (20:14 +0100)] 
mountfsd: json format unsigned types as unsigned

sizes/offsets are unsigned ints, so use the appropriate macros
to build the json messages, otherwise UINT64T_MAX is sent as -1

3 weeks agotest: enable TEST-06-SELINUX in openSUSE
Antonio Alvarez Feijoo [Tue, 14 Oct 2025 14:57:57 +0000 (16:57 +0200)] 
test: enable TEST-06-SELINUX in openSUSE

openSUSE switched to SELinux by default for quite some time now, so this test is
also successful.

3 weeks agoudev: create symlinks for s390 PTP devices
Miroslav Lichvar [Tue, 14 Oct 2025 09:03:01 +0000 (11:03 +0200)] 
udev: create symlinks for s390 PTP devices

Similarly to the udev rules handling KVM and Hyper-V PTP devices, create
symlinks for the s390-specific STCKE and Physical clocks (supported
since Linux 6.13) to have some stable names that can be specified in
default configurations of PTP/NTP applications.

3 weeks agotimer: rebase the next elapse timestamp only if timer didn't already run (#39296)
Lennart Poettering [Tue, 14 Oct 2025 16:30:23 +0000 (18:30 +0200)] 
timer: rebase the next elapse timestamp only if timer didn't already run (#39296)

3 weeks agocore: allow split /usr/local/s?sbin with merged /usr/s?bin
Zbigniew Jędrzejewski-Szmek [Fri, 10 Oct 2025 12:29:50 +0000 (14:29 +0200)] 
core: allow split /usr/local/s?sbin with merged /usr/s?bin

Previously, we used either the fully split path or the fully merged path,
treating "split sbin" as a boolean condition. The idea was that conversion to
to merged bin would be a single event, so we don't need to care about the
details of the transition. But it turns out that some systems may be converted
in disparate steps. In https://bugzilla.redhat.com/show_bug.cgi?id=2400220,
there was a lengthy discussion about a coreos system where
/usr/local/{bin,sbin} were created as separate directories. Since /usr/local is
not part of the packaged system, it might remain split for a longer time. So
check /usr/local/s?bin separately and stop adding /usr/sbin to $PATH if only
/usr/local/s?bin is split. (I don't think it makes sense to handle the reverse
case, i.e. only /usr/s?bin being split, since that should be much rarer.)

Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=2400220.

3 weeks agomkosi: explicitly pull in libz1 on OpenSUSE
Frantisek Sumsal [Tue, 14 Oct 2025 12:23:55 +0000 (14:23 +0200)] 
mkosi: explicitly pull in libz1 on OpenSUSE

Otherwise it pulls in libz-ng-compat1 which isn't 100% compatible with
libz1, and more importantly it requires an ldconfig drop-in in /etc/
(/etc/ld.so.conf.d/zlib-ng-compat-x86_64.conf) which breaks hermetic-usr
and TEST-07-PID1:

systemd[5582]: /usr/lib/systemd/systemd: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

3 weeks agotimer: rebase the next elapse timestamp only if timer didn't already run 39296/head
Frantisek Sumsal [Mon, 13 Oct 2025 15:36:55 +0000 (17:36 +0200)] 
timer: rebase the next elapse timestamp only if timer didn't already run

The test added in f4c3c107d9be4e922a080fc292ed3889c4e0f4a5 uncovered a
corner case while recalculating the next elapse timestamp of a timer unit
that uses RandomizedDelaySec= during deserialization.

If the scheduled time (without RandomizedDelaySec=) already elapsed,
systemd "rebases" the next elapse timestamp to the time when systemd
first started, to make the RandomizedDelaySec= feature work even at
boot. However, since it was done unconditionally, it always overrode the
next elapse timestamp, which could then cause the final next elapse
timestamp to fall out of the expected window.

With a couple of additional debug logs one of the test fail looks like
this:

[  132.129815] TEST-53-TIMER.sh[384]: + : 'Next elapse timestamp after daemon-reload, try #328'
[  132.129815] TEST-53-TIMER.sh[384]: + systemctl daemon-reload
[  132.136352] systemd[1]: Reload requested from client PID 16399 ('systemctl') (unit TEST-53-TIMER.service)...
[  132.136636] systemd[1]: Reloading...
[  132.446160] systemd[1]: Rebasing next elapse timestamp
[  132.446168] systemd[1]: v->next_elapse: Tue 2025-10-14 00:10:00 CEST
[  132.446170] systemd[1]: rebased: Tue 2025-10-14 00:10:56 CEST
[  132.446172] systemd[1]: v->next_elapse after rebase: Tue 2025-10-14 00:10:56 CEST
[  132.447361] systemd[1]: Reloading finished in 310 ms.
[  132.484041] TEST-53-TIMER.sh[384]: + check_elapse_timestamp
[  132.484041] TEST-53-TIMER.sh[384]: + systemctl status timer-RandomizedDelaySec-16377.timer
[  132.533657] TEST-53-TIMER.sh[16440]: ● timer-RandomizedDelaySec-16377.timer
[  132.533657] TEST-53-TIMER.sh[16440]:      Loaded: loaded (/run/systemd/system/timer-RandomizedDelaySec-16377.timer; static)
[  132.533657] TEST-53-TIMER.sh[16440]:      Active: active (waiting) since Mon 2025-10-13 23:00:00 CEST; 1h 13min ago
[  132.533657] TEST-53-TIMER.sh[16440]:  Invocation: 5555d4f060114a5493ff228013830d17
[  132.533657] TEST-53-TIMER.sh[16440]:     Trigger: Tue 2025-10-14 22:10:04 CEST; 21h left
[  132.533657] TEST-53-TIMER.sh[16440]:    Triggers: ● timer-RandomizedDelaySec-16377.service
[  132.533657] TEST-53-TIMER.sh[16440]: Oct 14 00:13:07 H systemd[1]: timer-RandomizedDelaySec-16377.timer: Changed dead -> waiting
[  132.533657] TEST-53-TIMER.sh[16440]: Oct 14 00:13:07 H systemd[1]: timer-RandomizedDelaySec-16377.timer: Adding 15h 35min 1.230173s random time.
[  132.533657] TEST-53-TIMER.sh[16440]: Oct 14 00:13:07 H systemd[1]: timer-RandomizedDelaySec-16377.timer: Realtime timer elapses at Tue 2025-10-14 15:45:58 CEST.
[  132.533657] TEST-53-TIMER.sh[16440]: Oct 14 00:13:07 H systemd[1]: timer-RandomizedDelaySec-16377.timer: Changed dead -> waiting
[  132.533657] TEST-53-TIMER.sh[16440]: Oct 14 00:13:08 H systemd[1]: timer-RandomizedDelaySec-16377.timer: Adding 16h 29min 44.084409s random time.
[  132.533657] TEST-53-TIMER.sh[16440]: Oct 14 00:13:08 H systemd[1]: timer-RandomizedDelaySec-16377.timer: Realtime timer elapses at Tue 2025-10-14 16:40:41 CEST.
[  132.533657] TEST-53-TIMER.sh[16440]: Oct 14 00:13:08 H systemd[1]: timer-RandomizedDelaySec-16377.timer: Changed dead -> waiting
[  132.533657] TEST-53-TIMER.sh[16440]: Oct 14 00:13:08 H systemd[1]: timer-RandomizedDelaySec-16377.timer: Adding 21h 59min 7.955828s random time.
[  132.533657] TEST-53-TIMER.sh[16440]: Oct 14 00:13:08 H systemd[1]: timer-RandomizedDelaySec-16377.timer: Realtime timer elapses at Tue 2025-10-14 22:10:04 CEST.
[  132.533657] TEST-53-TIMER.sh[16440]: Oct 14 00:13:08 H systemd[1]: timer-RandomizedDelaySec-16377.timer: Changed dead -> waiting
[  132.535386] TEST-53-TIMER.sh[384]: + systemctl show -p InactiveExitTimestamp timer-RandomizedDelaySec-16377.timer
[  132.537727] TEST-53-TIMER.sh[16442]: InactiveExitTimestamp=Mon 2025-10-13 23:00:00 CEST
[  132.540317] TEST-53-TIMER.sh[16444]: ++ systemctl show -P NextElapseUSecRealtime timer-RandomizedDelaySec-16377.timer
[  132.547745] TEST-53-TIMER.sh[384]: + NEXT_ELAPSE_REALTIME='Tue 2025-10-14 22:10:04 CEST'
[  132.548020] TEST-53-TIMER.sh[16445]: ++ date '--date=Tue 2025-10-14 22:10:04 CEST' +%s
[  132.550218] TEST-53-TIMER.sh[384]: + NEXT_ELAPSE_REALTIME_S=1760472604
[  132.550218] TEST-53-TIMER.sh[384]: + : 'Next elapse timestamp should be Tue 2025-10-14 00:10:00 CEST <= Tue 2025-10-14 22:10:04 CEST <= Tue 2025-10-14 22:10:00 CEST'
[  132.550218] TEST-53-TIMER.sh[384]: + assert_ge 1760472604 1760393400
[  132.550555] TEST-53-TIMER.sh[16446]: + set +ex
[  132.550702] TEST-53-TIMER.sh[384]: + assert_le 1760472604 1760472600
[  132.550832] TEST-53-TIMER.sh[16447]: + set +ex
[  132.551091] TEST-53-TIMER.sh[16447]: FAIL: '1760472604' > '1760472600'

Here the original next elapse timestamp was Tue 2025-10-14 00:10:00 CEST
as expected, but it was overridden by the rebased timestamp:
Tue 2025-10-14 00:10:56 CEST. And when a new randomized delay was added
to it (21h 59min 7.955828s) the final next elapse timestamp fell out of
the expected window, i.e. Tue 2025-10-14 00:10:00 (scheduled time) <
Tue 2025-10-14 22:10:04 CEST (rebased elapse timestamp + randomized
delay) < Tue 2025-10-14 22:10:00 CEST (scheduled time + maximum from
RandomizedDelaySec=, i.e. 22h).

By limiting the timestamp rebase only the case where the unit hasn't
already run should prevent this from happening during daemon-reload.

3 weeks agovmspawn: Use virtio-blk-pci for extra drives
Nick Labich [Wed, 8 Oct 2025 23:35:25 +0000 (19:35 -0400)] 
vmspawn: Use virtio-blk-pci for extra drives

Fixes #39262

3 weeks agoRevert "meson: fail build when encountering unused variables"
Zbigniew Jędrzejewski-Szmek [Fri, 10 Oct 2025 08:02:49 +0000 (10:02 +0200)] 
Revert "meson: fail build when encountering unused variables"

This reverts commit e1e1ef09f9bc7d2ca1f6876f4f4d13268be5a50d.

This change was misguided. The warning is enough during development and will
get fixed, but turning this into a hard failure just makes WIP harder. Also, a
hard error increases the likelyhood of a build failure in scenarios where
somebody is disabling components (as seen e.g. in
ba8801a07640205778c5a62539597c68d7bdb211). We already are not very good at
keeping our codebase compile correctly as it ages, because of changes in
compilers and dependencies, and we should not go out of our way to increase the
probability of failure. Such scenarios are painful for downstream builds.

3 weeks agomeson: stop probing for paths of programs in /usr/sbin
Zbigniew Jędrzejewski-Szmek [Thu, 9 Oct 2025 12:53:22 +0000 (14:53 +0200)] 
meson: stop probing for paths of programs in /usr/sbin

We dropped support for split-usr a while ago, which means that the programs
will be in /usr/sbin, which actually may be the same as /usr/bin on merged-bin
systems. So the whole checking is mostly pointless in the usual case. OTOH, on
Nix the paths will be totally different and need to be set through the option
anyway. So save time during builds by using the "fallback" path unless the
option is specified.

This avoid some busywork during the slow serial build phase.

3 weeks agovarlink: Always link to documentation for current version
Daan De Meyer [Tue, 14 Oct 2025 07:18:11 +0000 (09:18 +0200)] 
varlink: Always link to documentation for current version

3 weeks agolibsystemd: drop "const" decorators on public inline functions
Lennart Poettering [Tue, 14 Oct 2025 09:17:27 +0000 (11:17 +0200)] 
libsystemd: drop "const" decorators on public inline functions

The point of the "const" attribute is to give the compiler hints about
behaviour of functions if it only has the function prototype but no body
around. But inline functions are the ones where the compiler *always*
has the body around, hence the "const" decorator is really just noise:
the compuler can determine the constness on its own, just by looking at
the code.

Hence, drop the decorators, it's just noise. And a source of errors, as
675fa49f69943b0f009c973ed3d1e90afc1d88b1 has shown.

Follow-up for: #39289

3 weeks agonspawn: register containers in both user and system machined if applicable (#39145)
Lennart Poettering [Tue, 14 Oct 2025 09:58:29 +0000 (11:58 +0200)] 
nspawn: register containers in both user and system machined if applicable (#39145)

3 weeks agoimportd: port untarring logic over to libarchive 39143/head
Lennart Poettering [Thu, 17 Jul 2025 06:27:21 +0000 (08:27 +0200)] 
importd: port untarring logic over to libarchive

This way we have can expose identical behaviour everywhere, can make use
of our atomic replacement calls, and openat() logic, and later apply
additional tracks while unpacking, such as putting limits on UID ranges
and similar.

3 weeks agostat-util: add fd_verify_symlink() helper
Lennart Poettering [Thu, 17 Jul 2025 05:56:57 +0000 (07:56 +0200)] 
stat-util: add fd_verify_symlink() helper

3 weeks agostat-util: add helper inode_type_can_hardlink()
Lennart Poettering [Thu, 21 Aug 2025 12:27:05 +0000 (14:27 +0200)] 
stat-util: add helper inode_type_can_hardlink()

3 weeks agoxattr: add helper that detect special purpose xattrs
Lennart Poettering [Thu, 21 Aug 2025 11:36:12 +0000 (13:36 +0200)] 
xattr: add helper that detect special purpose xattrs

3 weeks agodissect image policy tweaks (#39168)
Lennart Poettering [Tue, 14 Oct 2025 08:25:34 +0000 (10:25 +0200)] 
dissect image policy tweaks (#39168)

3 weeks agocore/service: properly handle freezer action -> watchdog propagation (#39222)
Mike Yuan [Mon, 13 Oct 2025 22:49:12 +0000 (00:49 +0200)] 
core/service: properly handle freezer action -> watchdog propagation (#39222)

3 weeks agotest: make sure TEST-50-DISSECT.mountfsd.sh can run standalone 39168/head
Lennart Poettering [Mon, 29 Sep 2025 08:45:14 +0000 (10:45 +0200)] 
test: make sure TEST-50-DISSECT.mountfsd.sh can run standalone

3 weeks agodissect-image: take policy into consideration when unlocking verity, too
Lennart Poettering [Fri, 19 Sep 2025 16:12:55 +0000 (18:12 +0200)] 
dissect-image: take policy into consideration when unlocking verity, too

Previously, we'd take the image policy only into consideration when
dissecting the mage, but for the unlock/verity step we'd go via best
effort. Change that. This means we can now enforce policies such as
activating by root hash only even if a signature exists and similar.

Also, introduce a separate error code if we try to unlock a Verity
volume but have no root hash. Previously we'd return ENOKEY for that,
exactly like we do for encrypted volumes where we have no passparse. The
interctive unlock loop dissected_image_decrypt_interactively() is
otherwise very confused and will ask for a root hash, which makes no
sense. Hence use two distinct errors for this.

3 weeks agodissect-image: turn verity device sharing into opt-in
Lennart Poettering [Fri, 19 Sep 2025 15:57:37 +0000 (17:57 +0200)] 
dissect-image: turn verity device sharing into opt-in

Sharing verity volumes is problematic for a veriety of reasons, for
example because it might pin the wrong backing device at the wrong time.

Let's hence turn this around: unless verity sharing is enabled, leave it
off, and turn $SYSTEMD_VERITY_SHARING into a true boolean that can be
set both ways.

The primary usecase for verity sharing is RootImage=, where it probably
makes sense to leave on, hence set the flag there.

This is crucial when putting together installers which install an OS on
a second disk: if verity sharing is always on we might mount the wrong
of the two disks at the wrong time.

3 weeks agotest: format the min/max timestamps in "systemd" style
Frantisek Sumsal [Mon, 13 Oct 2025 15:35:02 +0000 (17:35 +0200)] 
test: format the min/max timestamps in "systemd" style

Before:
  Next elapse timestamp should be Sun Oct 12 00:10:00 UTC 2025 <= Sun 2025-10-12 05:43:04 UTC <= Sun Oct 12 22:10:00 UTC

After:
  Next elapse timestamp should be Tue 2025-10-14 00:10:00 CEST <= Tue 2025-10-14 19:39:11 CEST <= Tue 2025-10-14 22:10:00 CEST

3 weeks agosd-id128: Drop _sd_const_ from sd_id128_in_setv()
Daan De Meyer [Mon, 13 Oct 2025 08:43:16 +0000 (10:43 +0200)] 
sd-id128: Drop _sd_const_ from sd_id128_in_setv()

Both the const and pure attributes disallow modifying input arguments
but sd_id128_in_setv() clearly modifies its ap input argument by iterating
over it with va_arg() so drop the _sd_const_ attribute from
sd_id128_in_setv().

3 weeks agotest-kernel-install: support the case when custom default locale is specified
Yu Watanabe [Sat, 27 Sep 2025 18:54:00 +0000 (03:54 +0900)] 
test-kernel-install: support the case when custom default locale is specified

This also makes 'diff' command output to stderr, otherwise the
difference is eaten by meson by default, so hard to debug.

3 weeks agomkosi: avoid infinite reboot on failure
Yu Watanabe [Mon, 29 Sep 2025 12:58:36 +0000 (21:58 +0900)] 
mkosi: avoid infinite reboot on failure

If systemd-pcrphase-initrd.service and friends failed for some reasons,
the test VM will reboot infinitely and the test will timeout. Let's
propagate the failure to the host and fail the test earlier in that case.

3 weeks agoFix build fail when add option "-fstack-protector-all"
Duy Nguyen Van [Tue, 7 Oct 2025 04:09:19 +0000 (13:09 +0900)] 
Fix build fail when add option "-fstack-protector-all"

When using canary check with "-fstack-protector-all" option. It causes a configure
error in systemd-boot when meson.build executes compile simple code to test linker option
"-static-pie" because -nolibstd option prevents using libc. It need for
canary to provide some function as "__stack_chk_guard". So need to turn off
canary check when compile sanity check.

3 weeks agomkosi: install test dependencies for EnterNamespace= test (#39268)
Zbigniew Jędrzejewski-Szmek [Mon, 13 Oct 2025 08:10:36 +0000 (10:10 +0200)] 
mkosi: install test dependencies for EnterNamespace= test (#39268)

The test for the EnterNamespace= feature [0] has been both broken and
disabled since the migration to the mkosi framework, as it's missing the
libdw.pc file for pkg-config, so the test is skipped completely, and
it's also missing gcc to actually build the test binary.

[0] Part of TEST-87-AUX-UTILS-VM.coredump.sh

3 weeks agoremove Nulea M501 usb entry from hwdb
Daniel Brackenbury [Fri, 10 Oct 2025 04:44:37 +0000 (00:44 -0400)] 
remove Nulea M501 usb entry from hwdb

conflict with other mice using same generic dongle identified (e.g. Protoarc EM11)

3 weeks agoinclude: update kernel headers from v6.17.1
Yu Watanabe [Tue, 7 Oct 2025 08:58:33 +0000 (17:58 +0900)] 
include: update kernel headers from v6.17.1

3 weeks agotest: temporarily skip the EnterNamespace= test w/o embedded debuginfo 39268/head
Frantisek Sumsal [Fri, 10 Oct 2025 18:09:51 +0000 (20:09 +0200)] 
test: temporarily skip the EnterNamespace= test w/o embedded debuginfo

The EnterNamespace= feature currently doesn't work if the debuginfo is
separated from the crashing binary. Until that's resolved, let's run the
test only if the test binary has embedded debuginfo (.debug_info
section; e.g. when systemd is built without WITH_DEBUG=1) or it contains
MiniDebugInfo (.gnu_debugdata section; default on Fedora and CentOS).

See: https://github.com/systemd/systemd/pull/39268#issuecomment-3390745718

3 weeks agomkosi: install test dependencies for EnterNamespace= test
Frantisek Sumsal [Thu, 9 Oct 2025 15:54:58 +0000 (17:54 +0200)] 
mkosi: install test dependencies for EnterNamespace= test

The test for the EnterNamespace= feature [0] has been both broken and
disabled since the migration to the mkosi framework, as it's missing the
libdw.pc file for pkg-config, so the test is skipped completely, and
it's also missing gcc to actually build the test binary.

[0] Part of TEST-87-AUX-UTILS-VM.coredump.sh

3 weeks agotest: exclude test-stacktrace(-not)?-symbolized from the coredump check
Frantisek Sumsal [Thu, 9 Oct 2025 15:57:25 +0000 (17:57 +0200)] 
test: exclude test-stacktrace(-not)?-symbolized from the coredump check

As they are expected coredumps from the EnterNamespace= feature test.

3 weeks agotest: build the crashing test binary outside of the test
Frantisek Sumsal [Thu, 9 Oct 2025 21:08:19 +0000 (23:08 +0200)] 
test: build the crashing test binary outside of the test

So we don't have to pull in gcc and other stuff into it.

Also, make the test itself a bit more robust and debug-able.

3 weeks agopidfd-util: add missing trailing argument for ioctl(PIDFD_GET_*_NAMESPACE)
Yu Watanabe [Fri, 10 Oct 2025 06:14:07 +0000 (15:14 +0900)] 
pidfd-util: add missing trailing argument for ioctl(PIDFD_GET_*_NAMESPACE)

Otherwise, it always fails with EINVAL.

3 weeks agoman/crypttab: avoid using jargon spelling
Zbigniew Jędrzejewski-Szmek [Thu, 9 Oct 2025 10:17:09 +0000 (12:17 +0200)] 
man/crypttab: avoid using jargon spelling

3 weeks agoman/systemd.service: Improve OOMPolicy documentation (#39212) 33360/head
Taylan Kammer [Fri, 10 Oct 2025 13:50:56 +0000 (15:50 +0200)] 
man/systemd.service: Improve OOMPolicy documentation (#39212)

3 weeks agohwdb: drop trailing whitespace
Zbigniew Jędrzejewski-Szmek [Fri, 10 Oct 2025 10:19:04 +0000 (12:19 +0200)] 
hwdb: drop trailing whitespace

Fixup for 63254ed696d129cc46752e639ae761b758d7b251.

4 weeks agocreds: fix return type from normalize_separator()
Antonio Alvarez Feijoo [Thu, 9 Oct 2025 08:33:02 +0000 (10:33 +0200)] 
creds: fix return type from normalize_separator()

Follow-up for 097374f3b904e0649db8b0385b3ee66e1bf0a7d6

4 weeks agohwdb.d/70-mouse.hwdb: Add Nulea M501 trackball flags for USB Dongle + Bluetooth ...
Lennart Poettering [Thu, 9 Oct 2025 07:40:41 +0000 (09:40 +0200)] 
hwdb.d/70-mouse.hwdb: Add Nulea M501 trackball flags for USB Dongle + Bluetooth (#39241)

Adds an entry for the Nulea M501 trackball in both USB and Bluetooth
mode, such that it is correctly recognised as a trackball.

Note added to flag a potential issue arise with other mouse using the
same dongle w/ generic name.

Initially noted in #39230

4 weeks agologind: emit PropertiesChanged when lingering is enabled/disabled
Jelle van der Waa [Wed, 8 Oct 2025 10:29:04 +0000 (12:29 +0200)] 
logind: emit PropertiesChanged when lingering is enabled/disabled

Cockpit's podman plugin needs to know the lingering status so the UI can
advertise enabling `podman-restart` (which depends on lingering to
work). Currently it relies on watching `/var/lib/systemd/linger/${user}`
but that isn't a public API.

Related: #22244

4 weeks agodocs: two clarifications for release process (#39246)
Lennart Poettering [Thu, 9 Oct 2025 07:37:23 +0000 (09:37 +0200)] 
docs: two clarifications for release process (#39246)

doc was slightly out of sync with current practice, so update it to
match

4 weeks agoDrop `machine-id` OSC event field if /etc/machine-id doesn't exist
Justin Kromlinger [Wed, 8 Oct 2025 14:55:09 +0000 (16:55 +0200)] 
Drop `machine-id` OSC event field if /etc/machine-id doesn't exist

While we can safely assume that `/proc/sys/kernel/random/boot_id`
exists, the same can't be said for `/etc/machine-id` in environments
where systemd is installed, but not running. An example would be OCI
containers like with the official Arch Linux image, see [0].

Without this check the prompt would constantly output `/etc/machine-id:
no such file or directory` with the OSC events introduced in dadbb34
(v258).

[0] https://gitlab.archlinux.org/archlinux/archlinux-docker/-/issues/107

4 weeks agoman: fix description of .membership files
Lennart Poettering [Wed, 8 Oct 2025 09:50:02 +0000 (11:50 +0200)] 
man: fix description of .membership files

First, let's say "must" rather than "shall" regarding creation of these
files, because without them group memberships will not work.

Secondly, suggest placing an empty JSON object in them, rather than
making them empty, simply to avoid issues with older systems that didn't
backport d6570eafe3b86584ca42979d1ced5bfd2228a5c7.

Fixes: #38943
4 weeks agoman/userdbctl: fixup version info
Mike Yuan [Wed, 8 Oct 2025 20:17:38 +0000 (22:17 +0200)] 
man/userdbctl: fixup version info

Follow-up for 466562c69b75cec197176f556b940a43bb8350f2

4 weeks agologind: cast various calls that return errors we ignore to (void)
Jelle van der Waa [Wed, 8 Oct 2025 16:00:04 +0000 (18:00 +0200)] 
logind: cast various calls that return errors we ignore to (void)

4 weeks agomute-console: several follow-ups (#39229)
Mike Yuan [Wed, 8 Oct 2025 18:35:10 +0000 (20:35 +0200)] 
mute-console: several follow-ups (#39229)

4 weeks agoman: fix a missing word
Frantisek Sumsal [Wed, 8 Oct 2025 15:23:31 +0000 (17:23 +0200)] 
man: fix a missing word

Follow-up for 6d48c7cf736ced70c1c2fef1e1f03618911d04bc.

4 weeks agoman/factory-reset: fix typo in EFI variable name
Antonio Alvarez Feijoo [Wed, 8 Oct 2025 13:05:06 +0000 (15:05 +0200)] 
man/factory-reset: fix typo in EFI variable name

4 weeks agoremove bonus line 39241/head
helpvisa [Wed, 8 Oct 2025 11:18:48 +0000 (07:18 -0400)] 
remove bonus line

4 weeks agoupdate TODO
Lennart Poettering [Wed, 8 Oct 2025 10:40:04 +0000 (12:40 +0200)] 
update TODO

4 weeks agouserdb: add support for looking up users or groups by uuid. (#37097)
Lennart Poettering [Wed, 8 Oct 2025 10:03:14 +0000 (12:03 +0200)] 
userdb: add support for looking up users or groups by uuid. (#37097)

Followon to #37024.

This implements (mostly) what was suggested there, except that only a
single UUID is accepted (modifying things to support multiple is a
relatively straightforward change from here)

I'm not really convinced this is the right approach:

* I can't really think of any cases where you'd need to query by
multiple UUIDs (I guess you might want to lookup multiple users, but in
that case why aren't there "usernames" or "uids" arrays?)
* If I specify username "foo" and UID 1234 and UID 1234 exists and has
username "bar", I get back the error `ConflictingRecordFound`
* If I specify username "foo" and UUID abcdef... and username "foo"
exists but has UUID 123456..., I get back the error
`NonMatchingRecordFound`

This makes the two ID types behave differently.

Additionally, when querying by `uuid`, the multiplexer will always sends
`more: true`, which is fine but a little unexpected.

I do think unifying things through the `UserDBMatch` struct could make
sense, but in that case I think it would make sense to unify all query
types in that way (username, uid, uuid), identify when the filter is for
a single or multiple records, and centralise determination of conflict
vs non matching record errors.

`userdb_by_name`/`userdb_by_uid` could then become helper functions for
the simple case where no additional filtering is needed.

Thoughts?

One other thought: Should the multiplexer just pass through all
parameters, even unknown ones, to the backend services? Even if it
doesn't know how to filter by every property, the backends might, and it
would be useful to allow them to optimise things. (I realise the
disadvantage of this, ofc, is loss of error checking)

4 weeks agodocs: document creating new CI branch for the new stable branch after a release 39246/head
Luca Boccassi [Wed, 8 Oct 2025 10:00:06 +0000 (11:00 +0100)] 
docs: document creating new CI branch for the new stable branch after a release

4 weeks agodocs: document uploading manpages for new dev version after release
Luca Boccassi [Wed, 8 Oct 2025 09:56:43 +0000 (10:56 +0100)] 
docs: document uploading manpages for new dev version after release

This adds the new 'in development' section to the drop-down menu

4 weeks agotest-varlink-idl: add all missing IDL fragments
Lennart Poettering [Fri, 5 Sep 2025 20:15:08 +0000 (22:15 +0200)] 
test-varlink-idl: add all missing IDL fragments

Let's also order the output alphabetically

4 weeks agosystemd-creds: varlink null key handling (#39239)
Lennart Poettering [Wed, 8 Oct 2025 08:41:43 +0000 (10:41 +0200)] 
systemd-creds: varlink null key handling (#39239)

This is split out of #38764 but makes a ton of sense on its own.

4 weeks agojson-util: use JSON_VARIANT_ARRAY_FOREACH where appropriate
Mike Yuan [Tue, 7 Oct 2025 14:09:45 +0000 (16:09 +0200)] 
json-util: use JSON_VARIANT_ARRAY_FOREACH where appropriate

4 weeks agokernel-install: drop unneeded empty_to_root()
Mike Yuan [Fri, 4 Apr 2025 12:57:36 +0000 (14:57 +0200)] 
kernel-install: drop unneeded empty_to_root()

4 weeks agocreds: normalize definition of "tpm2-absent" legacy key type 39239/head
Lennart Poettering [Wed, 8 Oct 2025 07:16:42 +0000 (09:16 +0200)] 
creds: normalize definition of "tpm2-absent" legacy key type

This is just an alias, say so and clean up the name of the enum to match
the name of the string representation.

4 weeks agocreds: add explicit control on whether to allow null key decryption
Lennart Poettering [Tue, 7 Oct 2025 16:37:07 +0000 (18:37 +0200)] 
creds: add explicit control on whether to allow null key decryption

The ability to encrypt/authenticate encryption with a null key was
originally just a fallback concept for cases where during early boot we
have no host key, but the local system has no TPM2. Nowadays it is used
for other stuff as well, such as pcrlock data propagation (i.e. data
that needs no protection itself and required to properly to TPM key
derivation).

Let's give better, explicit control over null key usage, i.e. let's make
it a tristate both on the systemd-creds command line and in the Varlink
IPC to control three cases:

- the default that we allow it only if SecureBoot is off
- explicitly allowed
- explicitly refused (this is new)

Ideally systemd-creds --allow-null switch would take a boolean argument
to control this as a tristate. Alas, that would be a compat break, hence
I added --refuse-null instead (which also maps to the low-level flag for
this).

This also normalizes that the null key is always called "null key" in
messages, and not sometimes "empty key" or "fallback key".

4 weeks agotest: add testcase for withKey varlink option
Lennart Poettering [Tue, 7 Oct 2025 14:55:45 +0000 (16:55 +0200)] 
test: add testcase for withKey varlink option

4 weeks agocreds: allow varlink clients to choose --with-key= like on the command line
Lennart Poettering [Wed, 10 Sep 2025 20:45:57 +0000 (22:45 +0200)] 
creds: allow varlink clients to choose --with-key= like on the command line

4 weeks agocreds: define a proper varlink type for the credential scope
Lennart Poettering [Tue, 7 Oct 2025 13:52:38 +0000 (15:52 +0200)] 
creds: define a proper varlink type for the credential scope

4 weeks agoremove extra space from new hwdb.d/70-mouse.hwdb entries to fix failing test
Daniel Brackenbury [Tue, 7 Oct 2025 22:55:57 +0000 (18:55 -0400)] 
remove extra space from new hwdb.d/70-mouse.hwdb entries to fix failing test

4 weeks agoadd comment to 70-mouse.hwdb regarding generic name for Nulea M501 USB dongle
Daniel Brackenbury [Tue, 7 Oct 2025 22:04:56 +0000 (18:04 -0400)] 
add comment to 70-mouse.hwdb regarding generic name for Nulea M501 USB dongle

4 weeks agoAdd Nulea M501 trackball to hwdb
Daniel Brackenbury [Tue, 7 Oct 2025 22:00:57 +0000 (18:00 -0400)] 
Add Nulea M501 trackball to hwdb

4 weeks agoadd two new json dispatchers (#39237)
Lennart Poettering [Tue, 7 Oct 2025 18:58:06 +0000 (20:58 +0200)] 
add two new json dispatchers (#39237)

Split out of #38764. But the 2nd one at least makes sense on its own I
guess.

4 weeks agojson-util: don't use assert_return() 39237/head
Lennart Poettering [Tue, 7 Oct 2025 16:57:26 +0000 (18:57 +0200)] 
json-util: don't use assert_return()

assert_return() exists for gracefully handling programmng errors in
public APIs. But these are internal APIs, hence just use a tough
assert().

4 weeks agojson: add generic dispatchers for version strings
Lennart Poettering [Tue, 9 Sep 2025 09:22:46 +0000 (11:22 +0200)] 
json: add generic dispatchers for version strings

4 weeks agojson: add new json_dispatch_strv_path() helper
Lennart Poettering [Fri, 29 Aug 2025 13:17:28 +0000 (15:17 +0200)] 
json: add new json_dispatch_strv_path() helper

4 weeks agobasic/log-context: mark global vars as static
Mike Yuan [Tue, 7 Oct 2025 12:34:41 +0000 (14:34 +0200)] 
basic/log-context: mark global vars as static

4 weeks agolicensing: update address of FSF
Zbigniew Jędrzejewski-Szmek [Tue, 7 Oct 2025 11:04:47 +0000 (13:04 +0200)] 
licensing: update address of FSF

rpmlint complains about the old address, even though it totally
doesn't matter and nobody cares.

4 weeks agomute-console: don't unmute twice when not running as varlink service 39229/head
Mike Yuan [Mon, 6 Oct 2025 20:07:19 +0000 (22:07 +0200)] 
mute-console: don't unmute twice when not running as varlink service

This also avoids the spurious "not restoring" logs if we fail
to dispatch varlink call.

4 weeks agomute-console: if muting is disabled, suppress "not restoring" messages
Mike Yuan [Mon, 6 Oct 2025 20:19:36 +0000 (22:19 +0200)] 
mute-console: if muting is disabled, suppress "not restoring" messages

4 weeks agomute-console: honor Context rather than arg_*
Mike Yuan [Mon, 6 Oct 2025 20:34:42 +0000 (22:34 +0200)] 
mute-console: honor Context rather than arg_*

4 weeks agomute-console: fix typo
Mike Yuan [Mon, 6 Oct 2025 19:54:39 +0000 (21:54 +0200)] 
mute-console: fix typo

4 weeks agosystem-systemd\x2dmute\x2dconsole.slice: do not disable default deps
Mike Yuan [Mon, 6 Oct 2025 19:39:22 +0000 (21:39 +0200)] 
system-systemd\x2dmute\x2dconsole.slice: do not disable default deps

The only default dep for slice units is exactly what's outlined
here: Conflicts= + Before=shutdown.target. Hence just drop
custom deps.

4 weeks agounits: enable MaxConnectionsPerSource= for all our Accept=yes units (-ng)
Mike Yuan [Mon, 6 Oct 2025 19:47:42 +0000 (21:47 +0200)] 
units: enable MaxConnectionsPerSource= for all our Accept=yes units (-ng)

Apply 5d1e8cd3e057261c6db3fb3d7de39b7ca48efd3b on newly-added sockets.

4 weeks agonspawn: register containers with both the system-wide and the per-user machined instance 39145/head
Lennart Poettering [Wed, 27 Aug 2025 12:14:18 +0000 (14:14 +0200)] 
nspawn: register containers with both the system-wide and the per-user machined instance

Let's make sure each container run by unpriv users is known by both
instances. Making it known by the host instance ensures it is resovlable
by nss-myhostname (and various other tools), but making it known by the
per-user instance means the user can fully manage it on their own.

This simplifies the code a bit too, i.e. we always allocate a scope
ourselves now, and just register it, instead of letting machined do that
under some circumstances. THere's little value in that and it simplifies
things for us quite a bit.

4 weeks agonspawn: support .nspawn files in per-user mode
Lennart Poettering [Tue, 26 Aug 2025 15:00:17 +0000 (17:00 +0200)] 
nspawn: support .nspawn files in per-user mode

4 weeks agobootspec: also process uki-url boot loader spec field
Lennart Poettering [Mon, 6 Oct 2025 06:52:21 +0000 (08:52 +0200)] 
bootspec: also process uki-url boot loader spec field

Let's also add support for "uki-url", which was added at the same time to
the spec as "uki".

Follow-up for: 4a94a1b83f8857b906bc7924b3f853768b5499b5

4 weeks agosysctl: support reading configuration from stdin and command line arguments (#39219)
Lennart Poettering [Mon, 6 Oct 2025 14:12:11 +0000 (16:12 +0200)] 
sysctl: support reading configuration from stdin and command line arguments (#39219)

This makes systemd-sysctl support following syntax, like
systemd-sysusers and systemd-tmpfiles:
```sh
$ /usr/lib/systemd/systemd-sysctl --inline 'foo.bar=42'
$ /usr/lib/systemd/systemd-sysctl - <<EOF
foo.bar=42
EOF
```

4 weeks agomute-console: remove unimplemented option
Antonio Alvarez Feijoo [Mon, 6 Oct 2025 10:42:27 +0000 (12:42 +0200)] 
mute-console: remove unimplemented option

```
$ build/systemd-mute-console -q
Code should not be reached at src/mute-console/mute-console.c:103, function parse_argv(). Aborting. 💥
Aborted (core dumped)
```

4 weeks agocopilot: Tell the AI to be thorough
Daan De Meyer [Mon, 6 Oct 2025 10:59:44 +0000 (12:59 +0200)] 
copilot: Tell the AI to be thorough

At least when doing a local review, asking it to be thorough results
in a lot more comments on coding style violation so let's add such an
instruction to the global instructions.

4 weeks agodocs: Mention newline requirement for multi-line function decl
Daan De Meyer [Mon, 6 Oct 2025 10:44:09 +0000 (12:44 +0200)] 
docs: Mention newline requirement for multi-line function decl