]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 months agotest: re-enable journal checks for varlink-idl and so on 38809/head
Yu Watanabe [Wed, 3 Sep 2025 21:01:52 +0000 (06:01 +0900)] 
test: re-enable journal checks for varlink-idl and so on

Previously, we have checked journal after TEST-XX-YYYYY.sh, but it was
forgotten when we switched to mkosi.
This re-enable the check but through ExecStartPost=, and drops unnecessary
workarounds for end.service. Then, this drops unnecessary end.service
and testsuite.target.

2 months agonetwork: remove unnecessary fd saved in fd-store
Yu Watanabe [Wed, 3 Sep 2025 23:40:48 +0000 (08:40 +0900)] 
network: remove unnecessary fd saved in fd-store

Fixes the following warning:
```
[  130.968170] H systemd-networkd[4288]: Restart operation initiated.
[  130.968265] H systemd-networkd[4288]: Serializing...
[  130.968274] H systemd-networkd[4288]: There is nothing to serialize.
(snip)
[  130.978756] H systemd[1]: Stopped systemd-networkd.service.
(snip)
[  130.991407] H systemd[1]: Starting systemd-networkd.service...
(snip)
[  131.077440] H systemd-networkd[4318]: Enumeration completed.
[  131.077471] H systemd-networkd[4318]: Deserializing...
[  131.077491] H systemd-networkd[4318]: Failed to parse json (line=0, column=0): No data available
[  131.077524] H systemd-networkd[4318]: Failed to deserialize the previous invocation, ignoring: No data available
```

2 months agotest: do not call GetUserRecord without "service" argument
Yu Watanabe [Wed, 3 Sep 2025 23:20:17 +0000 (08:20 +0900)] 
test: do not call GetUserRecord without "service" argument

Otherwise, following debugging log will be saved and the checker for
the varlink-idl log triggers failure:
```
systemd-userwork: processing[3110]: varlink-6-6: Parameters for method
  io.systemd.UserDatabase.GetUserRecord() didn't pass validation on field 'service': No anode
```

2 months agocore/varlink: do not call io.systemd.oom.ReportManagedOOMCGroups() with empty "cgroup...
Yu Watanabe [Thu, 4 Sep 2025 09:38:38 +0000 (18:38 +0900)] 
core/varlink: do not call io.systemd.oom.ReportManagedOOMCGroups() with empty "cgroups" parameter

Fixes the following varlink IDL validation error:
```
systemd-oomd[1687]: varlink-11-11: Parameters for method io.systemd.oom.ReportManagedOOMCGroups()
  didn't pass validation on field 'cgroups': No anode
```

2 months agocore/varlink: do not send unrealized cgroups to oomd
Yu Watanabe [Thu, 4 Sep 2025 09:49:21 +0000 (18:49 +0900)] 
core/varlink: do not send unrealized cgroups to oomd

Follow-ups for 23ac08115af83e3a0a937fa207fc52511aba2ffa.

Since the commit, the cgroup path is set only when it is realized.

Fixes the following varlink IDL validation failure:
```
systemd-oomd[1687]: Varlink-IDL: Mandatory field 'path' is null or missing on object, refusing.
```

2 months agohostname: add missing varlink IDL fields
Yu Watanabe [Wed, 3 Sep 2025 23:09:16 +0000 (08:09 +0900)] 
hostname: add missing varlink IDL fields

Follow-up for bc60034f43ad47a9f5f60d572cf47f062d0dd21f.

2 months agobootctl: add missing varlink IDL entries
Yu Watanabe [Thu, 4 Sep 2025 00:15:01 +0000 (09:15 +0900)] 
bootctl: add missing varlink IDL entries

Follow-up for f2751d757f76f6e50e452431815370a3a45fdfc0.

2 months agoCleanups for test/units directory (#38807)
Yu Watanabe [Thu, 4 Sep 2025 09:11:27 +0000 (18:11 +0900)] 
Cleanups for test/units directory (#38807)

2 months agoinstall: follow-up for initrd presets (#38790)
Yu Watanabe [Thu, 4 Sep 2025 09:03:21 +0000 (18:03 +0900)] 
install: follow-up for initrd presets (#38790)

Follow up for 4a8c395167c1631224c02d990c847955a2bf23b0.

2 months agorepart: add test case for btrfs specific options and MountPoint=, and update man...
Daan De Meyer [Thu, 4 Sep 2025 07:00:09 +0000 (09:00 +0200)] 
repart: add test case for btrfs specific options and MountPoint=, and update man page (#38756)

Closes #38749.

2 months agocore/transaction: fix issue in dropping unmergeable jobs (#38776)
Daan De Meyer [Thu, 4 Sep 2025 06:57:59 +0000 (08:57 +0200)] 
core/transaction: fix issue in dropping unmergeable jobs (#38776)

Fixes #38765.

2 months agoinstall: Fall back to system presets if there are no initrd presets 38790/head
Daan De Meyer [Tue, 2 Sep 2025 09:58:17 +0000 (11:58 +0200)] 
install: Fall back to system presets if there are no initrd presets

We might be operating with a newer systemctl on an image with older
systemd and thus without an initrd-preset directory. Before
4a8c395167c1631224c02d990c847955a2bf23b0, we would use the system
presets, let's make sure we keep doing that if we're operating on an
image without initrd presets.

Follow up for 4a8c395167c1631224c02d990c847955a2bf23b0.

2 months agoinstall: Coding style fixlet
Daan De Meyer [Tue, 2 Sep 2025 09:57:03 +0000 (11:57 +0200)] 
install: Coding style fixlet

2 months agocore: fix segfault by drop-in config for masked unit (#38810)
Daan De Meyer [Thu, 4 Sep 2025 06:41:26 +0000 (08:41 +0200)] 
core: fix segfault by drop-in config for masked unit (#38810)

2 months agoTEST-87-AUX-UTILS-VM: rotate journal at one more place
Yu Watanabe [Thu, 4 Sep 2025 05:19:40 +0000 (14:19 +0900)] 
TEST-87-AUX-UTILS-VM: rotate journal at one more place

Follow-ups for ab56a96194d102cb4ec279fc4eb181d16c1251ea.

Fixes the following failure:
```
TEST-87-AUX-UTILS-VM.sh[1196]: + systemd-run --user --wait --pipe -M testuser@.host -- coredumpctl
TEST-87-AUX-UTILS-VM.sh[1840]: Running as unit: run-p1840-i1841.service; invocation ID: 325a026377aa4cffb046c5a63a8906ab
TEST-87-AUX-UTILS-VM.sh[1853]: Hint: You are currently not seeing messages from other users and the system.
TEST-87-AUX-UTILS-VM.sh[1853]:       Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
TEST-87-AUX-UTILS-VM.sh[1853]:       Pass -q to turn off this notice.
TEST-87-AUX-UTILS-VM.sh[1853]: Journal file /var/log/journal/6835d335b6684b6197bf071ad66f2678/user-4711.journal is truncated, ignoring file.
TEST-87-AUX-UTILS-VM.sh[1853]: No coredumps found.
TEST-87-AUX-UTILS-VM.sh[1840]:           Finished with result: exit-code
TEST-87-AUX-UTILS-VM.sh[1840]: Main processes terminated with: code=exited, status=1/FAILURE
TEST-87-AUX-UTILS-VM.sh[1840]:                Service runtime: 154ms
TEST-87-AUX-UTILS-VM.sh[1840]:              CPU time consumed: 78ms
TEST-87-AUX-UTILS-VM.sh[1840]:                    Memory peak: 21.9M (swap: 0B)
```

2 months agotest: move test units to their own directories 38807/head
Yu Watanabe [Wed, 3 Sep 2025 20:12:21 +0000 (05:12 +0900)] 
test: move test units to their own directories

This also add test cases for verifying loopy.service and friends,
which was added by e66047ff62c971eefa32b42373420d61e3f2a9c1 but never
used in integration tests.

2 months agotest: add comment about custom autorelabel.service
Yu Watanabe [Wed, 3 Sep 2025 21:17:22 +0000 (06:17 +0900)] 
test: add comment about custom autorelabel.service

Salvaged from ead814a0b0f64c572282b9e27a0a995893f10cf0.

2 months agoTEST-07-PID1: add test cases for mask/unmask unit 38810/head
Yu Watanabe [Wed, 3 Sep 2025 18:21:45 +0000 (03:21 +0900)] 
TEST-07-PID1: add test cases for mask/unmask unit

For issue #38802.

2 months agocore/unit: do not load drop-in configs for masked unit files
Yu Watanabe [Thu, 4 Sep 2025 01:13:17 +0000 (10:13 +0900)] 
core/unit: do not load drop-in configs for masked unit files

Otherwise, ExecXYZ= given by drop-ins may be added to a masked unit,
then commands may be unexpectedly executed. For example, if an ExecStop=
is set in a drop-in for a running unit, then 'systemctl mask --now' for
the unit try to invoke the command specified in ExecStop=.

Fixes #38802.

2 months agopo: Translated using Weblate (Finnish)
Ricky Tigg [Thu, 4 Sep 2025 00:52:21 +0000 (00:52 +0000)] 
po: Translated using Weblate (Finnish)

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fi/
Translation: systemd/main

2 months agorepart: fix memleak 38756/head
Yu Watanabe [Wed, 3 Sep 2025 21:52:01 +0000 (06:52 +0900)] 
repart: fix memleak

Fixes a bug in 1a0541d44c78ced78a566051ec8f63417370aeaa (v256).

2 months agotest: add test case for issue #38765 38776/head
Yu Watanabe [Wed, 3 Sep 2025 15:49:34 +0000 (00:49 +0900)] 
test: add test case for issue #38765

2 months agocore/transaction: first drop unmergable jobs for anchor jobs
Yu Watanabe [Sun, 31 Aug 2025 20:08:45 +0000 (05:08 +0900)] 
core/transaction: first drop unmergable jobs for anchor jobs

As you can see, something spurious happens in the logs below.
```
initrd-switch-root.target: Trying to enqueue job initrd-switch-root.target/start/isolate
systemd-repart.service: Looking at job systemd-repart.service/stop conflicted_by=no
systemd-repart.service: Looking at job systemd-repart.service/start conflicted_by=no
systemd-repart.service: Fixing conflicting jobs systemd-repart.service/stop,systemd-repart.service/start by deleting job systemd-repart.service/stop
initrd-switch-root.target: Fixing conflicting jobs initrd-switch-root.target/stop,initrd-switch-root.target/start by deleting job initrd-switch-root.target/stop
systemd-repart.service: Deleting job systemd-repart.service/start as dependency of job initrd-switch-root.target/stop
```

The two conflicting jobs for systemd-repart.service are initially queued
as the following:
- initrd-switch-root.target has Wants=initrd-root-fs.target, and
  initrd-root-fs.target has Wants=systemd-repart.service (through symlink),
  hence starting initrd-switch-root.target tries to start
  systemd-repart.service,
- systemd-repart.service has Conflicts=initrd-switch-root.target, hence
  starting initrd-switch-root.target tries to stop
  systemd-repart.service.

As similar, interestingly(?) starting initrd-switch-root.target tries to
stop initrd-switch-root.target.

So, now there are at least two pairs of conflicting jobs:
- systemd-repart.service: start vs stop,
- initrd-switch-root.target: start vs stop.

As these jobs are induced by starting initrd-switch-root.target, of course
the most important one is the start job for initrd-switch-root.target.

Previously, as you can see in the logs at the beginning, even if
the start job for initrd-switch-root.target is important, we may first
try to resolve the conflict in systemd-repart.service, and may drop the
stop job for systemd-repart.service even if it is relevant to the start
job of initrd-switch-root.target.

This makes first we solve the pair of conflicting jobs for anchor task.
So the stop job for initrd-switch-root.target is dropped first, and the
induced start job for systemd-repart.service is automatically removed,
thus it is not necessary to solve the conflict in systemd-repart.service
anymore.

This is especially important for services that are enabled both in initrd
and after switching root. If a stop job for one of the service is
unexpectedly dropped during switching root, then the service is not stopped
before switching root, and will never start after that.

Fixes #38765.

2 months agoman/repart.d: mention each field of MountPoint= needs to be quoted when contains...
Yu Watanabe [Wed, 3 Sep 2025 16:42:48 +0000 (01:42 +0900)] 
man/repart.d: mention each field of MountPoint= needs to be quoted when contains colon

Closes #38749.

2 months agoTEST-58-REPART: add test case for btrfs specific options and MountPoint=
Yu Watanabe [Wed, 3 Sep 2025 10:30:34 +0000 (19:30 +0900)] 
TEST-58-REPART: add test case for btrfs specific options and MountPoint=

2 months agoTEST-58-REPART: make sector size test as a normal test case
Yu Watanabe [Wed, 3 Sep 2025 16:33:47 +0000 (01:33 +0900)] 
TEST-58-REPART: make sector size test as a normal test case

2 months agomkosi: update mkosi commit reference to d45142e329550abc9c6fc63c1f1f86e5286d3d67
Luca Boccassi [Wed, 3 Sep 2025 11:48:23 +0000 (12:48 +0100)] 
mkosi: update mkosi commit reference to d45142e329550abc9c6fc63c1f1f86e5286d3d67

786b8fe1c8 Return false from want_efi() for UKI outputs
fac86dbc93 mkosi-tools: add qemu/pipewire packages for gui profile for debian
3bb98f0e6e Add ncdu to tools tree packages
1332b32cb4 config: Fix type for devicetree setting
eff03569ee initrd: Add intel_pmc_ssram_telemetry module by default
e04305b030 Make Bootable= determine whether we build a UKI for esp images
7252146429 mkosi-obs: use --force also for unzstd
f58e31e228 mkosi-obs: do not fail if there are no bootloaders in the ESP
fac3bd4bf1 rhel: Look up entitlement keys and certificates in sandbox
da814d9634 opensuse: Add support for RISC-V for Tumbleweed
b1d66c88d0 fedora: Rework rawhide GPG key logic
b9360f25df Include {sys,conf}ext info in metadata file
94c6db6148 Set MakeInitrd=yes in documentation for building custom initrd
d134013ca8 mkosi-tools: add grub2-common to openSUSE tools tree
c97d345395 mkosi-tools: virtiofsd is only available on a subset of architectures on debian/ubuntu

2 months agoTranslations update from Fedora Weblate (#38792)
Zbigniew Jędrzejewski-Szmek [Wed, 3 Sep 2025 11:07:19 +0000 (13:07 +0200)] 
Translations update from Fedora Weblate (#38792)

Translations update from [Fedora
Weblate](https://translate.fedoraproject.org) for
[systemd/main](https://translate.fedoraproject.org/projects/systemd/main/).

Current translation status:

![Weblate translation
status](https://translate.fedoraproject.org/widget/systemd/main/horizontal-auto.svg)

2 months agopo: Translated using Weblate (Russian) 38792/head
Sergey A [Wed, 3 Sep 2025 09:14:24 +0000 (09:14 +0000)] 
po: Translated using Weblate (Russian)

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Sergey A <Ser82-png@yandex.ru>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ru/
Translation: systemd/main

2 months agopo: Added translation using Weblate (Cornish)
Jasmine Andrever-Wright [Wed, 3 Sep 2025 09:14:24 +0000 (09:14 +0000)] 
po: Added translation using Weblate (Cornish)

Co-authored-by: Jasmine Andrever-Wright <cam.jpw@gmail.com>
2 months agoman: add docs for ssh.ephemeral-authorized_keys-all
Allison Karlitskaya [Wed, 3 Sep 2025 08:29:39 +0000 (10:29 +0200)] 
man: add docs for ssh.ephemeral-authorized_keys-all

This was added in 071155a1fbac ("ssh-generator: support
ssh.ephemeral-key.all-users") without corresponding documentation.  Add
the missing docs now.

2 months agomkosi: Relax separate branch check in mkosi.sync
Daan De Meyer [Wed, 3 Sep 2025 09:25:57 +0000 (11:25 +0200)] 
mkosi: Relax separate branch check in mkosi.sync

There's no guarantee that $GIT_BRANCH is always the same across
stable release branches and main. But we still need to make sure
we switch commits if we're switching between main and release branches.

To make this work, let's not check if the current HEAD commit is an
ancestor of the currently configured origin branch. Instead, let's
check if any of the origin branches contains the current HEAD commit.
This still makes sure that we won't switch commits if we're working
on a local branch while making sure that we do switch commits if we're
switching between main and stable release branches with different
git branches configured for the packaging repo checkout.

2 months agopcrlock: use WRITE_STRING_FILE_LABEL
Yu Watanabe [Tue, 26 Aug 2025 16:31:36 +0000 (01:31 +0900)] 
pcrlock: use WRITE_STRING_FILE_LABEL

Fixes #38727.

2 months agoTEST-45-TIMEDATE: rotate journal before parsing log message
Yu Watanabe [Mon, 1 Sep 2025 23:34:26 +0000 (08:34 +0900)] 
TEST-45-TIMEDATE: rotate journal before parsing log message

Similar to 04ade57a4233750f45fbc5fa2b5f52adfb435de5.

Fixes the following failure (long line is wrapped):
```
TEST-45-TIMEDATE.sh[234]: + journalctl --sync
TEST-45-TIMEDATE.sh[234]: + for _ in {0..9}
TEST-45-TIMEDATE.sh[234]: + journalctl -q -n 1 '--since=2025-09-01 17:09:25.442936' -p info -t busctl --grep .
TEST-45-TIMEDATE.sh[363]: Sep 01 17:09:25 H busctl[351]: {"type":"signal","endian":"l","flags":1,"version":1,
  "cookie":67,"timestamp-realtime":1756746565578529,"sender":":1.11","path":"/org/freedesktop/timedate1",
  "interface":"org.freedesktop.DBus.Properties","member":"PropertiesChanged","payload":{"type":"sa{sv}as",
    "data":["org.freedesktop.timedate1",{"NTP":{"type":"b","data":false}},[]]}}
TEST-45-TIMEDATE.sh[366]: ++ journalctl -q -n 1 '--since=2025-09-01 17:09:25.442936' -p info -t busctl -o cat
TEST-45-TIMEDATE.sh[367]: ++ jq -r '.payload.data[1].NTP.data'
TEST-45-TIMEDATE.sh[366]: Journal file /run/log/journal/07946b7846564ac0ad1c86e8cabed329/system.journal is truncated, ignoring file.
TEST-45-TIMEDATE.sh[234]: + [[ '' == \f\a\l\s\e ]]
```

2 months agoNEWS: mention ACLs by "uaccess" is always set by udevd
Yu Watanabe [Mon, 1 Sep 2025 03:07:34 +0000 (12:07 +0900)] 
NEWS: mention ACLs by "uaccess" is always set by udevd

Follow-up for c960ca2be1cfd183675df581f049a0c022c1c802 (#36444).
Prompted by https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1112660.

2 months agopo: Translated using Weblate (Russian)
Sergey A [Sun, 31 Aug 2025 14:53:40 +0000 (14:53 +0000)] 
po: Translated using Weblate (Russian)

Currently translated at 99.2% (262 of 264 strings)

Co-authored-by: Sergey A <Ser82-png@yandex.ru>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ru/
Translation: systemd/main

2 months agoman: loader.conf(5): document auto-reboot/auto-poweroff
Felix Pehla [Sat, 30 Aug 2025 14:09:53 +0000 (16:09 +0200)] 
man: loader.conf(5): document auto-reboot/auto-poweroff

These options were added in v255 with commit
cb341090d061084accc9a45ec4b1d258954adba2, but were not documented as
standalone options in loader.conf. See #29440 for more information.

2 months agoNEWS: Extend note on /run/lock to recommend locking devices directly
Josh Triplett [Sat, 30 Aug 2025 00:33:59 +0000 (17:33 -0700)] 
NEWS: Extend note on /run/lock to recommend locking devices directly

2 months agoNEWS: add note about removal of /run/lock/ from our tmpfiles.d
Luca Boccassi [Fri, 29 Aug 2025 13:53:57 +0000 (14:53 +0100)] 
NEWS: add note about removal of /run/lock/ from our tmpfiles.d

2 months agounits: portabled requires /dev/loop-control
Yu Watanabe [Thu, 28 Aug 2025 20:34:32 +0000 (05:34 +0900)] 
units: portabled requires /dev/loop-control

Fixes #38692.

2 months agohomed: AddSigningKey: only feed data to OpenSSL _after_ Polkit auth
Matthias Gerstner [Wed, 27 Aug 2025 08:18:41 +0000 (10:18 +0200)] 
homed: AddSigningKey: only feed data to OpenSSL _after_ Polkit auth

As a hardening measure it makes sense not to process potentially crafted
data in `openssl_pubkey_to_pem()` before we know that the caller is
authorized to perform the action.

2 months agotree-wide: some trivial fixes around `table_*()` result check (#38753)
Yu Watanabe [Thu, 28 Aug 2025 20:23:26 +0000 (05:23 +0900)] 
tree-wide: some trivial fixes around `table_*()` result check (#38753)

2 months agotree-wide: avoid logging 2 error messages if table_print_with_pager() fails 38753/head
Antonio Alvarez Feijoo [Thu, 28 Aug 2025 12:09:50 +0000 (14:09 +0200)] 
tree-wide: avoid logging 2 error messages if table_print_with_pager() fails

`table_print_with_pager()` already calls `table_log_print_error()` internally if
there is an error.

2 months agoresolvectl: add missing error check
Antonio Alvarez Feijoo [Thu, 28 Aug 2025 12:09:14 +0000 (14:09 +0200)] 
resolvectl: add missing error check

Follow-up for 45817e9245d48ad8807de2b1604bc64b9dd39a1d

2 months agoanalyze: fix unit-shell/unit-gdb when target unit has exited
Luca Boccassi [Wed, 27 Aug 2025 19:16:11 +0000 (20:16 +0100)] 
analyze: fix unit-shell/unit-gdb when target unit has exited

Follow-up for 9a08000d186396bc8bcb8fe057720417543c3bf0
Follow-up for ad6e02e7b42db35178305614e643be7a62568d87

2 months agotest: ensure that reload updates DNSSEC and DNSOverTLS on link scopes
Nick Rosbrook [Fri, 22 Aug 2025 17:36:48 +0000 (13:36 -0400)] 
test: ensure that reload updates DNSSEC and DNSOverTLS on link scopes

2 months agotest: use numeric prefixes in resolved.conf.d overrides
Nick Rosbrook [Fri, 22 Aug 2025 19:00:38 +0000 (15:00 -0400)] 
test: use numeric prefixes in resolved.conf.d overrides

There are a lot of resolved.conf.d drop-ins used in these tests. Use
proper numeric prefixes, especially to avoid confusion with sorting
relative to test.conf.

Make the test base config 10-test.conf, and use 90-*.conf elsewhere.

2 months agoresolve: re-create link unicast scopes on reload
Nick Rosbrook [Fri, 22 Aug 2025 14:46:50 +0000 (10:46 -0400)] 
resolve: re-create link unicast scopes on reload

On reload, resolved does not apply new DNSSEC= (or DNSOverTLS=) settings
on links, because the link unicast scopes are not re-created. However,
the servers and link states are updated correctly, so resolvectl and link
state files do show the new setting, leading users to believe the change
took effect immediately, the same way `resolvectl dnssec` does.

Fix this by freeing all of the link unicast scopes during reload, so
that they are re-created with the new settings in link_allocate_scopes().

2 months agoresolve: include DNSSEC and DNSOverTLS modes in dumps
Nick Rosbrook [Fri, 22 Aug 2025 15:34:17 +0000 (11:34 -0400)] 
resolve: include DNSSEC and DNSOverTLS modes in dumps

This is useful for testing and debugging. E.g., one can examine the
active DNSSEC mode of the scope using:

$ resolvectl show-cache

2 months agoshell-completion: support -i option for journalctl
Yu Watanabe [Tue, 26 Aug 2025 17:39:00 +0000 (02:39 +0900)] 
shell-completion: support -i option for journalctl

Follow-up for dde54b8a8578cecb3ce90e56aeeaf749dd9e1058.

2 months agoupdate TODO
Lennart Poettering [Tue, 26 Aug 2025 15:34:56 +0000 (17:34 +0200)] 
update TODO

2 months agobootctl: do not fail on removing unfied kernel image
Yu Watanabe [Mon, 25 Aug 2025 16:43:10 +0000 (01:43 +0900)] 
bootctl: do not fail on removing unfied kernel image

A boot loader entry for a unified kernel image has
BootEntry.kernel : path to the image relative to ESP or XBOOTLDR,
BootEntry.path   : path to the image.
Hence, these two effectively point to the same file.

Hence, by unlink command, the image is removed by
```
deref_unlink_file(&known_files, e->kernel, e->root);
```
then later tried again by
```
r = chase_and_unlink(e->path, root, ...);
```
and of course it fails with -ENOENT.

Let's ignore the failure there. We already ignore ENOENT on removal
at various places, especially in deref_unlink_file().

Fixes #38706.
Follow-ups for 8702496bfb0205764569782a9a2ebd11fd80e5e8.

2 months agonsresourced: use a hashed rather than a mangled name as fallback
Lennart Poettering [Tue, 26 Aug 2025 07:00:06 +0000 (09:00 +0200)] 
nsresourced: use a hashed rather than a mangled name as fallback

If we are asked to come up with our own name for the namespace to
allocate (because client enabled "mangle"), then we so far created a
randomized name if shortening what was proposed didn't work. This broke
polkit authorization however, because when polkit is in the mix, we
process method calls twice, submitting the polkit request on the first
and then assuming a response is known on the second invocation. But if
we generate a randomized name for the two checks we'll not be ablet to
match up the requests because it's going to be different. Let's fix that
by not using a randomized name, but one hashed from the socket
connection we are processing mixed with the client provided name. This
will ensure that for the same method call we'll generate the same name,
but different calls (i.e. calls with different names on the same socket,
or with any name on any socket) we'll end up with different names,
minimizing chance of collision.

This ensures PK starts to work with nsresourced userns registration when
a bad or no name is specified, which previously would end up in a PK
query loop.

2 months agoimport-generator: disable timeout for downloaded images
Lennart Poettering [Tue, 26 Aug 2025 06:59:49 +0000 (08:59 +0200)] 
import-generator: disable timeout for downloaded images

Downloading images can take arbitrary amounts of time, hence disable the
timeout for it.

Inspired by https://github.com/systemd/particleos/issues/80

2 months ago70-mouse.hwdb: Add Razer Basilisk V3, Asus Cerberus, +2 more
Kamil Páral [Mon, 25 Aug 2025 20:00:47 +0000 (22:00 +0200)] 
70-mouse.hwdb: Add Razer Basilisk V3, Asus Cerberus, +2 more

All mice were measured using mouse-dpi-tool, and the measurements match vendors
specs, with the exception of Asus Cerberus (it officially has
500/*1000/1500/2500 DPI, but my measurements were quite different, so I opted
to include the real values).

2 months agopo: Translated using Weblate (Khmer (Central))
kanitha chim [Mon, 25 Aug 2025 23:45:53 +0000 (23:45 +0000)] 
po: Translated using Weblate (Khmer (Central))

Currently translated at 41.2% (109 of 264 strings)

Co-authored-by: kanitha chim <kchim@redhat.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/km/
Translation: systemd/main

2 months agoman: add note about extending machine-info to man page (#38652)
Zbigniew Jędrzejewski-Szmek [Tue, 26 Aug 2025 08:55:20 +0000 (10:55 +0200)] 
man: add note about extending machine-info to man page (#38652)

2 months agoudev: fix grammar
Yu Watanabe [Mon, 25 Aug 2025 20:58:22 +0000 (05:58 +0900)] 
udev: fix grammar

Follow-up for 7e50402aa367d9d8b1a72e81795984dda704dab4.

2 months agocore: fix typo
Yu Watanabe [Mon, 25 Aug 2025 19:54:16 +0000 (04:54 +0900)] 
core: fix typo

Follow-up for b3415f5daef49642be3d5f417b8880c078420ff7.

2 months agoudev: fix typo
Yu Watanabe [Mon, 25 Aug 2025 19:48:42 +0000 (04:48 +0900)] 
udev: fix typo

Follow-up for 32333754ae9a0352cd1850d2071e8c7676bc810d.

2 months agotmpfiles: don't relabel files in dry run mode
Jan Fooken [Fri, 22 Aug 2025 09:26:25 +0000 (11:26 +0200)] 
tmpfiles: don't relabel files in dry run mode

tmpfiles attempts to correct the label of a file during various actions
via the function fd_set_perms().  Currently, said function generally
respects the dry-run mode.  However, it attempts to fix the label of a
given file regardless of the state of said dry-run mode.

This causes problems, because a user could attempt to run tmpfiles with
elevated permissions and dry run enabled, expecting the tool to not
modify their system.  Instead, tmpfiles would falsely relabel a file,
modifying their system.

This commit explicitly checks for when dry-run is enabled and skips the
file relabelling process.  Furthermore, I added logging for both cases.
I found helpful during debugging.  That said, I don't think it's
necessary to use the level LOG_INFO on the dry-run path, as it would
always produce an info log.

2 months agoimport-generator: fix crash with no remote string in systemd.pull=
Luca Boccassi [Sun, 24 Aug 2025 16:57:34 +0000 (17:57 +0100)] 
import-generator: fix crash with no remote string in systemd.pull=

SYSTEMD_PROC_CMDLINE=rd.systemd.pull=raw,machine,blockdev,bootorigin:rootdisk systemd-import-generator

Follow-up for 0c892214f73584e55bfa3fd8f0d54f631cb527b0

2 months agonspawn: the second time on_orderly_shutdown() is called userdata is NULL (#38709)
Lennart Poettering [Mon, 25 Aug 2025 18:08:01 +0000 (20:08 +0200)] 
nspawn: the second time on_orderly_shutdown() is called userdata is NULL (#38709)

We know that it is, because we set it to NULL in the very same
on_orderly_shutdown() call.

2 months agoboot: also remember auto-generated entries
Luca Boccassi [Sun, 24 Aug 2025 10:34:02 +0000 (11:34 +0100)] 
boot: also remember auto-generated entries

Windows/OSX/shell/etc entries are autogenerated, and should be remembered too
as the previous choice, together with Linux ones.

Follow-up for d870ae47b767183c1312ad7e3196696cf38e3b9e

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

2 months agohwdb: sort SDR devices by vendor name
AsciiWolf [Mon, 25 Aug 2025 09:14:28 +0000 (11:14 +0200)] 
hwdb: sort SDR devices by vendor name

2 months agocore/unit: use UNIT_FOREACH_DEPENDENCY_SAFE() at several more places
Yu Watanabe [Thu, 21 Aug 2025 17:06:43 +0000 (02:06 +0900)] 
core/unit: use UNIT_FOREACH_DEPENDENCY_SAFE() at several more places

manager_add_job() -> transaction_add_job_and_dependencies() may update
dependencies when a unit is not loaded yet. Hence, we need to restart
dependency loop in that case.

Follow-up for b7777d08846033859c5b734317fbbbfcca4cafcb (#37465).
Fixes #38676.

2 months agosystemd-boot: don't always log NX_COMPAT info
Felix Pehla [Thu, 21 Aug 2025 17:06:07 +0000 (19:06 +0200)] 
systemd-boot: don't always log NX_COMPAT info

Commit 70b7e03 introduced 3 calls to log_debug() about the presence or
absence of NX_COMPAT support. Since sd-boot does not yet have the
ability to only print messages above a certain loglevel, these will
always be printed, even on top of the configured splash screen. This
commit removes the log_debug() call after a success and only prints
those for missing firmware support if the UEFI should support them in
the first place (i.e. starting with version 2.10).

2 months agoman: unify spelling of OS-specific 38652/head
Jörg Behrmann [Mon, 25 Aug 2025 12:37:15 +0000 (14:37 +0200)] 
man: unify spelling of OS-specific

2 months agotools: ignore root element explicitly in check-version-history
Jörg Behrmann [Wed, 20 Aug 2025 13:47:28 +0000 (15:47 +0200)] 
tools: ignore root element explicitly in check-version-history

Currently these messages (broken for length)

    2025-08-20T12:04:15.9609277Z
    /home/runner/work/systemd/systemd/tools/check-version-history.py:26:
    FutureWarning: This search incorrectly ignores the root element, and will be fixed in a future version.
    If you rely on the current behaviour, change it to './/funcprototype/funcdef/function'

can be seen in CI output. So let's apply the suggestion.

2 months agoman: add note about extending machine-info to man page
Jörg Behrmann [Wed, 20 Aug 2025 11:56:00 +0000 (13:56 +0200)] 
man: add note about extending machine-info to man page

2 months agohwdb: enable autosuspend for Dell DW5826e WWAN modem
Jack Wu [Fri, 22 Aug 2025 09:23:46 +0000 (17:23 +0800)] 
hwdb: enable autosuspend for Dell DW5826e WWAN modem

2 months agoTEST-46-HOMED: improve stability of the test (#38659)
Luca Boccassi [Fri, 22 Aug 2025 22:37:52 +0000 (23:37 +0100)] 
TEST-46-HOMED: improve stability of the test (#38659)

Fixes #38643.

2 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN))
Jesse Guo [Fri, 22 Aug 2025 10:53:40 +0000 (10:53 +0000)] 
po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Jesse Guo <jesseguotech@outlook.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main

2 months agoTEST-46-HOMED: homectl unregister and friends needs the target is inactive or absent 38659/head
Yu Watanabe [Wed, 20 Aug 2025 18:07:26 +0000 (03:07 +0900)] 
TEST-46-HOMED: homectl unregister and friends needs the target is inactive or absent

Hence, we need to wait for the previous operation finished.
Fixes the following failure:
```
TEST-46-HOMED.sh[107]: + homectl unregister signtest
TEST-46-HOMED.sh[1449]: Failed to unregister home: Home signtest is currently being used, or an operation on home signtest is currently being executed.
```

Fixes #38643

2 months agoTEST-46-HOMED: cleanup homedsshtest earlier
Yu Watanabe [Wed, 20 Aug 2025 18:14:29 +0000 (03:14 +0900)] 
TEST-46-HOMED: cleanup homedsshtest earlier

2 months agoupdate TODO
Lennart Poettering [Thu, 21 Aug 2025 09:44:50 +0000 (11:44 +0200)] 
update TODO

2 months agohomed: do not print sensitive data when debug logging is enabled
Yu Watanabe [Wed, 20 Aug 2025 18:36:36 +0000 (03:36 +0900)] 
homed: do not print sensitive data when debug logging is enabled

2 months agoAdd Razer Cobra mouse to hwdb
Christopher Head [Thu, 21 Aug 2025 06:52:38 +0000 (23:52 -0700)] 
Add Razer Cobra mouse to hwdb

The DPI values are based on the product’s printed documentation. The
frequency values are based on the endpoint descriptor reported by lsusb
(the mouse is a full-speed USB device and bInterval is 1 at all DPI
settings). Both sets of values are for a mouse that has *not* been
touched by the vendor’s configuration tool.

2 months agomeson: update version numbers for v258~rc3 v258-rc3
Luca Boccassi [Wed, 20 Aug 2025 14:16:42 +0000 (15:16 +0100)] 
meson: update version numbers for v258~rc3

2 months agoChores for RC3 (#38653)
Luca Boccassi [Wed, 20 Aug 2025 14:16:03 +0000 (15:16 +0100)] 
Chores for RC3 (#38653)

2 months agoNEWS: update date 38653/head
Luca Boccassi [Wed, 20 Aug 2025 12:09:08 +0000 (13:09 +0100)] 
NEWS: update date

2 months agoNEWS: update contributors list
Luca Boccassi [Wed, 20 Aug 2025 12:08:57 +0000 (13:08 +0100)] 
NEWS: update contributors list

2 months agoUpdate syscalls tables
Luca Boccassi [Wed, 20 Aug 2025 12:06:58 +0000 (13:06 +0100)] 
Update syscalls tables

ninja -C build update-syscall-tables update-syscall-header

2 months agohwdb: update autosuspend rules
Luca Boccassi [Wed, 20 Aug 2025 12:06:08 +0000 (13:06 +0100)] 
hwdb: update autosuspend rules

ninja -C build update-hwdb-autosuspend

2 months agohwdb: update rules
Luca Boccassi [Wed, 20 Aug 2025 12:05:25 +0000 (13:05 +0100)] 
hwdb: update rules

ninja -C build update-hwdb

2 months agoRevert "resolved: don't wait for TLS close_notify replies unnecessarily"
Luca Boccassi [Mon, 18 Aug 2025 12:38:32 +0000 (13:38 +0100)] 
Revert "resolved: don't wait for TLS close_notify replies unnecessarily"

This change introduced a regression that stops DNSOverTLS from working
after some time. Revert it for now, as there's no fixup available at
the moment.

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

This reverts commit 4b6dbd4ea5d08bf2013f3590ec828399f0e8b66c.

2 months agochase: trigger autofs only when explicitly requested (#38641)
Zbigniew Jędrzejewski-Szmek [Wed, 20 Aug 2025 12:02:45 +0000 (14:02 +0200)] 
chase: trigger autofs only when explicitly requested (#38641)

Replaces #38569.
Fixes #38565.

2 months agoNEWS: reword notice about planned req version bumps
Zbigniew Jędrzejewski-Szmek [Wed, 20 Aug 2025 11:40:58 +0000 (13:40 +0200)] 
NEWS: reword notice about planned req version bumps

2 months agocoredump: drop RestrictSUIDSGID= option (#38640)
Michal Sekletar [Wed, 20 Aug 2025 10:42:30 +0000 (12:42 +0200)] 
coredump: drop RestrictSUIDSGID= option (#38640)

systemd-coredump sandbox already has ProtectSystem=strict hence all non
API filesystems are made read-only, thus RestrictSUIDSGID= doesn't buy
us much.

On top of that systemd-coredump's EnterNamespace= feature requires
openat2() to work correctly and that is implicitly blocked by
RestrictSUIDSGID=.

Follow-up for 8f8148cb08bf9f2c0e1f7fe6a5e6eb383115957b

2 months agonspawn: fix --link-journal=host with --private-users=pick and friends
Yu Watanabe [Mon, 18 Aug 2025 15:13:48 +0000 (00:13 +0900)] 
nspawn: fix --link-journal=host with --private-users=pick and friends

Fixes #38611.

2 months agotest: fix typo
Yu Watanabe [Tue, 19 Aug 2025 21:30:16 +0000 (06:30 +0900)] 
test: fix typo

2 months agoNEWS: announce bump of required minimum version of several components in next release
Yu Watanabe [Sun, 17 Aug 2025 16:27:26 +0000 (01:27 +0900)] 
NEWS: announce bump of required minimum version of several components in next release

Distro            EOL     kernel  glibc meson  python  openssl cryptsetup util-linux elfutils libxcrypt libfido2 libseccomp
Ubuntu 24.04 LTS  2029-06 6.8     2.39  1.3.2  3.12.3  3.0.13  2.7.0      2.39.3     0.190    4.4.36    1.14.0   2.5.5
Ubuntu 25.04      2026-01 6.14    2.41  1.7.0  3.13.3  3.4.1   2.7.5      2.40.2     0.192    4.4.38    1.15.0   2.5.5
Ubuntu 25.10      2026-07 6.16    2.41  1.7.0  3.13.5  3.5.0   2.8.0      2.41       0.193    4.4.38    1.16.0   2.6.0
CentOS 9          2027-05 5.14.0  2.34  0.63.3 3.9.23  3.5.1   2.7.2      2.37.4     0.193    4.4.18    1.13.0   2.5.2
CentOS 10         2030-01 6.12.0  2.39  1.4.1  3.12.11 3.5.1   2.7.5      2.40.2     0.193    4.4.36    1.14.0   2.5.6
Debian 12         2026-06 6.12.38 2.36  1.7.0  3.11.2  3.0.17  2.6.1      2.38.1     0.192    4.4.33    1.12.0   2.5.4
Debian 13         2028-08 6.12.41 2.41  1.7.0  3.13.5  3.5.1   2.7.5      2.41       0.192    4.4.38    1.15.0   2.6.0

kernel releases: https://en.wikipedia.org/wiki/Linux_kernel_version_history
glibc releases: https://en.wikipedia.org/wiki/Glibc
python releases: https://en.wikipedia.org/wiki/History_of_Python
openssl releases: https://en.wikipedia.org/wiki/OpenSSL

See also #38608.

2 months agochase: trigger automount only when explicitly requested 38641/head
Yu Watanabe [Thu, 14 Aug 2025 16:22:30 +0000 (17:22 +0100)] 
chase: trigger automount only when explicitly requested

Since c5de7b14ae2e08d267d8d75bc88934ac6aa7dcd6
file searching implies a new mount api syscall by default,
to trigger automounts.

But, this is not necessary in most cases, e.g. when chasing
syspath in sd-device (actually this causes regression in umockdev,
see https://github.com/martinpitt/umockdev/issues/271).
Another example is reading unit files, especially .network files,
as automount may trigger mounting network filesystems...

Also, when this is used in NSS plugins, programs that load the
plugins may fail because of spuriously configured seccomp. See #38565.

Let's not trigger automount by default, and do only when explicitly
requested.

This introduces CHASE_TRIGGER_AUTOFS, and use it in
- service manager,
- bootctl and finding ESP/xbootldr,
- sysupdate,
- mountfsd,
- systemd-mount.

There may be several more places we should trigger automount, but let's
do that later.

Follow-up for c5de7b14ae2e08d267d8d75bc88934ac6aa7dcd6.
Fixes #38565.
Replaces #38569.

Co-authored-by: Luca Boccassi <luca.boccassi@gmail.com>
2 months agochase: introduce CHASE_NO_SHORTCUT_MASK
Yu Watanabe [Tue, 19 Aug 2025 14:45:40 +0000 (23:45 +0900)] 
chase: introduce CHASE_NO_SHORTCUT_MASK

2 months agoRevert "chase: invert CHASE_NO_AUTOFS and only set it where needed"
Yu Watanabe [Tue, 19 Aug 2025 15:09:34 +0000 (00:09 +0900)] 
Revert "chase: invert CHASE_NO_AUTOFS and only set it where needed"

This reverts commit 490aa05ca1ba8e3e2a5ed13e1a77f5ea9f1c93b0.

As commented https://github.com/systemd/systemd/pull/38569#discussion_r2284978273,
the commit makes autofs check bypassed. Before the commit, when
CHASE_NO_AUTOFS is set, we did not shortcut chasing paths, and refused
any autofs mount points in the path. However, with the commit, the flag
was swapped but even when CHASE_AUTOFS is unset, the autofs check may be
skipped.

To fix the issue, rather than swapping the flag, we should introduce
another flag, say CHASE_TRIGGER_AUTOFS. This revert the commit, and in a
later commit, the new flag will be introduced.

2 months agoAdd padding to sbat section (#38621)
Luca Boccassi [Tue, 19 Aug 2025 16:49:07 +0000 (17:49 +0100)] 
Add padding to sbat section (#38621)

2 months agosd-stub: use memory proto if available and set kernel memory to RX with NX_COMPAT
Luca Boccassi [Mon, 11 Aug 2025 14:33:35 +0000 (15:33 +0100)] 
sd-stub: use memory proto if available and set kernel memory to RX with NX_COMPAT

When NX_COMPAT gets enabled, firmwares will enforce that executable
memory is either writable or executable.
This needs kernel compatibility, when it will happen the kernel will
have the NX_COMPAT bit set. If it is, set the memory buffer to RO.

Note that this must be undone on failure, as EDK2 in some configurations
overwrites memory ranges that are returned with FreePages() with a
fixed pattern, so if the pages are RO it will crash.

This is only an issue with the new custom PE loader, as LoadImage()
and StartImage() will always do the right thing automatically.

https://microsoft.github.io/mu/WhatAndWhy/enhancedmemoryprotection/
https://www.kraxel.org/blog/2023/12/uefi-nx-linux-boot/

Follow-up for cab9c7b5a42effa8a45611fc6b8556138c869b5f

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

2 months agochase: invert CHASE_NO_AUTOFS and only set it where needed
Luca Boccassi [Thu, 14 Aug 2025 16:22:30 +0000 (17:22 +0100)] 
chase: invert CHASE_NO_AUTOFS and only set it where needed

Since https://github.com/systemd/systemd/commit/c5de7b14ae2e08d267d8d75bc88934ac6aa7dcd6
file searching implies a new mount api syscall by default,
to trigger automounts.

This is problematic in NSS plugins, as they are dlopen'ed inside
processes by glibc, for two reasons.

First of all, potentially searching on a networked filesystem
automount could lead to nasty surprises, such as the process
responsible for setting up the network filesystem trying to
search on that same filesystem.

More importantly, the new mount api syscall was never part of
the filesystem seccomp filter that we provide by default, and
given mounting/remounting/bind mounting is one of the possible
ways to bypass sandboxing it is very likely not allowed when
custom filters are used in sandboxed processes, if they don't
need to do these operations otherwise.
The filesystem seccomp mask we provide has been updated, however
this only takes effect on the next restart of a service. When
systemd is upgraded via a package upgrade, the new nss plugin is
installed and will be immediately dlopen'ed by glibc when needed,
without waiting for the process to restart, which means the existing
seccomp filter applies, causing the filter to trigger.
Given it's not really possible for any arbitrary program to
predict which NSS modules glibc will load, given programs do not
configure that and instead nsswitch is set up by the sysadmin,
it's impossible to handle at each process level. It's also not
possible to know when it will be triggered, given the plugin
is not linked in each binary tools like need-restart cannot
even pre-emptively restart services that may be affected.

This means in practice, upgrading from systemd << v258 to >= v258
requires a reboot to avoid either subtle or catastrophic system
failures.

By avoiding to trigger automounts in nss-systemd we can avoid
both issues.

userdb drop-ins are searched for in:

/etc/userdb/
/run/userdb/
/run/host/userdb/
/usr/local/lib/userdb/
/usr/lib/userdb/

none of which are supported as automounts anyway.

Note that this happens only when the userdbd service is not running,
as otherwise nss-systemd will go through the varlink IPC, rather than
doing the searches in-process.

So invert CHASE_NO_AUTOFS to CHASE_AUTOFS and set it in the places where
we do want to trigger automounts, like looking for the ESP.

Follow-up for https://github.com/systemd/systemd/commit/c5de7b14ae2e08d267d8d75bc88934ac6aa7dcd6
Fixes https://github.com/systemd/systemd/issues/38565

2 months agohwdb: map FN key on TongFang X4SP4NAL laptops
Alexander Bruy [Tue, 19 Aug 2025 10:05:00 +0000 (11:05 +0100)] 
hwdb: map FN key on TongFang X4SP4NAL laptops

2 months agotest: also edit /etc/os-release if it's not a symlink when patching /usr/lib/os-relea...
Luca Boccassi [Tue, 19 Aug 2025 11:32:00 +0000 (12:32 +0100)] 
test: also edit /etc/os-release if it's not a symlink when patching /usr/lib/os-release (#38628)

mkosi patches up /etc/os-release to add local IDs and fixup certain
issues, so when tests patch /usr/lib/ on the fly, copy to the version in
/etc/ too to avoid test failures when querying

6370s 10/98 systemd:integration-tests / TEST-07-PID1 FAIL 31.03s exit
status 1
6370s 25/98 systemd:integration-tests / TEST-29-PORTABLE FAIL 12.76s
exit status 1
6370s 33/98 systemd:integration-tests / TEST-43-PRIVATEUSER-UNPRIV FAIL
6.57s exit status 1
6370s 37/98 systemd:integration-tests / TEST-50-DISSECT FAIL 16.97s exit
status 1

This is particularly an issue when running these tests on debian unstable,
where mkosi has to fixup os-release to make it valid and avoid further
breakages:

https://github.com/systemd/mkosi/blob/main/mkosi/distributions/debian.py#L234