]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 months agojournal: treble field hash table size 38416/head
Zbigniew Jędrzejewski-Szmek [Wed, 30 Jul 2025 09:52:26 +0000 (11:52 +0200)] 
journal: treble field hash table size

As discussed in https://github.com/systemd/systemd/issues/38399, "ordinary"
systems can have the field table with a large number of values, causing journal
rotation to occur early. For example, audit generates a log of fields:
$ journalctl --fields | rg -c '^_?AUDIT'
114

It seems that the "structured log" capabilities of the journal are being use
more than in the past. Looking at some journal files on my system, it seems
the field hash table field is quite high in many cases:
$ build/test-journal-dump /var/log/journal/*/* | rg 'table fill'
Data hash table fill: 15.1%
Field hash table fill: 69.1%
Data hash table fill: 4.9%
Field hash table fill: 32.4%
Data hash table fill: 10.2%
Field hash table fill: 34.2%
Data hash table fill: 9.9%
Field hash table fill: 37.2%
Data hash table fill: 26.8%
Field hash table fill: 21.9%
Data hash table fill: 35.6%
Field hash table fill: 22.8%
Data hash table fill: 25.5%
Field hash table fill: 54.1%
Data hash table fill: 3.4%
Field hash table fill: 43.8%
Data hash table fill: 75.0%
Field hash table fill: 70.3%
Data hash table fill: 75.0%
Field hash table fill: 63.1%
Data hash table fill: 75.0%
Field hash table fill: 74.2%
Data hash table fill: 35.6%
Field hash table fill: 43.2%
Data hash table fill: 35.5%
Field hash table fill: 75.4%
Data hash table fill: 75.0%
Field hash table fill: 59.8%
Data hash table fill: 75.0%
Field hash table fill: 56.5%
Data hash table fill: 16.9%
Field hash table fill: 76.3%
Data hash table fill: 18.1%
Field hash table fill: 76.9%
Data hash table fill: 75.0%
Field hash table fill: 42.0%
Data hash table fill: 75.0%
Field hash table fill: 22.8%
Data hash table fill: 75.0%
Field hash table fill: 22.8%
Data hash table fill: 75.0%
Field hash table fill: 22.8%
Data hash table fill: 75.0%
Field hash table fill: 22.8%
Data hash table fill: 75.0%
Field hash table fill: 32.1%
Data hash table fill: 75.0%
Field hash table fill: 21.9%
Data hash table fill: 75.0%
Field hash table fill: 21.9%
Data hash table fill: 75.0%
Field hash table fill: 21.9%
Data hash table fill: 75.0%
Field hash table fill: 22.8%
Data hash table fill: 75.0%
Field hash table fill: 22.8%
Data hash table fill: 75.0%
Field hash table fill: 21.9%
Data hash table fill: 75.0%
Field hash table fill: 22.5%
Data hash table fill: 9.6%
Field hash table fill: 53.8%
Data hash table fill: 75.0%
Field hash table fill: 22.2%
Data hash table fill: 75.0%
Field hash table fill: 22.2%
Data hash table fill: 75.0%
Field hash table fill: 22.2%
Data hash table fill: 35.6%
Field hash table fill: 75.1%
Data hash table fill: 33.6%
Field hash table fill: 50.2%
Data hash table fill: 75.0%
Field hash table fill: 26.7%
Data hash table fill: 75.0%
Field hash table fill: 25.8%
Data hash table fill: 75.0%
Field hash table fill: 29.1%
Data hash table fill: 75.0%
Field hash table fill: 25.8%
Data hash table fill: 75.0%
Field hash table fill: 31.8%
Data hash table fill: 75.0%
Field hash table fill: 18.9%
Data hash table fill: 75.0%
Field hash table fill: 22.2%
Data hash table fill: 75.0%
Field hash table fill: 20.1%
Data hash table fill: 75.0%
Field hash table fill: 29.1%
Data hash table fill: 75.0%
Field hash table fill: 30.9%
Data hash table fill: 75.0%
Field hash table fill: 28.5%
Data hash table fill: 75.0%
Field hash table fill: 28.5%
Data hash table fill: 75.0%
Field hash table fill: 25.8%
Data hash table fill: 75.0%
Field hash table fill: 25.2%
Data hash table fill: 75.0%
Field hash table fill: 39.3%
Data hash table fill: 50.2%
Field hash table fill: 75.1%
Data hash table fill: 75.0%
Field hash table fill: 61.9%
Data hash table fill: 75.0%
Field hash table fill: 56.5%
Data hash table fill: 75.0%
Field hash table fill: 58.6%
Data hash table fill: 48.9%
Field hash table fill: 79.6%
Data hash table fill: 75.0%
Field hash table fill: 71.5%
Data hash table fill: 75.0%
Field hash table fill: 60.1%
Data hash table fill: 31.4%
Field hash table fill: 75.7%
Data hash table fill: 27.0%
Field hash table fill: 69.4%
Data hash table fill: 28.9%
Field hash table fill: 76.6%
Data hash table fill: 60.2%
Field hash table fill: 79.9%
Data hash table fill: 8.8%
Field hash table fill: 78.7%
Data hash table fill: 5.8%
Field hash table fill: 61.3%
Data hash table fill: 75.0%
Field hash table fill: 64.0%
Data hash table fill: 61.4%
Field hash table fill: 63.4%
Data hash table fill: 29.7%
Field hash table fill: 61.9%
Data hash table fill: 18.9%
Field hash table fill: 30.9%
Data hash table fill: 1.4%
Field hash table fill: 22.2%
Data hash table fill: 0.4%
Field hash table fill: 13.5%
Data hash table fill: 2.6%
Field hash table fill: 37.5%
Data hash table fill: 1.3%
Field hash table fill: 23.4%
Data hash table fill: 0.6%
Field hash table fill: 15.3%
Data hash table fill: 18.7%
Field hash table fill: 33.9%
Data hash table fill: 7.4%
Field hash table fill: 37.5%
Data hash table fill: 20.2%
Field hash table fill: 44.1%
Data hash table fill: 1.3%
Field hash table fill: 33.0%
Data hash table fill: 75.0%
Field hash table fill: 19.2%
Data hash table fill: 42.2%
Field hash table fill: 23.4%
Data hash table fill: 1.6%
Field hash table fill: 87.1%
Data hash table fill: 0.1%
Field hash table fill: 98.8%
Data hash table fill: 0.2%
Field hash table fill: 128.8%
Data hash table fill: 15.4%
Field hash table fill: 31.2%
Data hash table fill: 7.4%
Field hash table fill: 22.5%
Data hash table fill: 10.5%
Field hash table fill: 38.7%
Data hash table fill: 2.8%
Field hash table fill: 18.0%
Data hash table fill: 1.5%
Field hash table fill: 15.9%
Data hash table fill: 0.0%
Field hash table fill: 7.5%
Data hash table fill: 0.1%
Field hash table fill: 12.0%
Data hash table fill: 0.2%
Field hash table fill: 10.8%
Data hash table fill: 0.2%
Field hash table fill: 15.6%
Data hash table fill: 0.1%
Field hash table fill: 11.7%
Data hash table fill: 0.1%
Field hash table fill: 12.0%
Data hash table fill: 0.0%
Field hash table fill: 6.6%
Data hash table fill: 1.4%
Field hash table fill: 18.0%
Data hash table fill: 0.7%
Field hash table fill: 16.8%
Data hash table fill: 1.1%
Field hash table fill: 18.0%
Data hash table fill: 0.2%
Field hash table fill: 10.8%
Data hash table fill: 0.1%
Field hash table fill: 10.8%
Data hash table fill: 0.4%
Field hash table fill: 11.1%

Since filling of the field hash table to 75% normally causes file rotation,
let's double the default to make rotation happen less often.
We'll use 11kB more for the hash table, which should be fine, considering
that journal files are usually at least 8 MB.

Closes https://github.com/systemd/systemd/issues/38399.

3 months agojournal: store counts, not byte sizes, in table size constants
Zbigniew Jędrzejewski-Szmek [Wed, 30 Jul 2025 09:39:35 +0000 (11:39 +0200)] 
journal: store counts, not byte sizes, in table size constants

It's easier to think about the size in "objects", not bytes. Let's convert to
bytes at the last moment.

Also drop some of the pointless size suffixes. In general, it's the size of the
variable that matters, not the constant that is written to it.

No functional change.

3 months agotest-journal-dump: dump the headers of journal files
Zbigniew Jędrzejewski-Szmek [Wed, 30 Jul 2025 09:33:35 +0000 (11:33 +0200)] 
test-journal-dump: dump the headers of journal files

We have journal_file_print_header(), but it's not exposed anywhere in
a way that it is easy to call.

3 months agoSeveral fixlets for PTY forwarder and systemd-run (#38385)
Luca Boccassi [Wed, 30 Jul 2025 09:29:06 +0000 (10:29 +0100)] 
Several fixlets for PTY forwarder and systemd-run (#38385)

Hopefully fixes #38237.

3 months agohwdb: Acer Nitro ANV15-51 Nitro Sense Toggle
SoloSaravanan [Wed, 30 Jul 2025 05:07:56 +0000 (10:37 +0530)] 
hwdb: Acer Nitro ANV15-51 Nitro Sense Toggle

This fixes Acer Nitro ANV15-51 Nitro sense toggle

Event: time 1753852156.475850, -------------- SYN_REPORT ------------
Event: time 1753852156.565054, type 4 (EV_MSC), code 4 (MSC_SCAN), value f5
Event: time 1753852156.565054, type 1 (EV_KEY), code 148 (KEY_PROG1), value 0

3 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN))
Jesse Guo [Tue, 29 Jul 2025 19:53:39 +0000 (19: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

3 months agopo: Translated using Weblate (Turkish)
Emir SARI [Tue, 29 Jul 2025 19:53:39 +0000 (19:53 +0000)] 
po: Translated using Weblate (Turkish)

Currently translated at 98.1% (259 of 264 strings)

Co-authored-by: Emir SARI <emir_sari@icloud.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/tr/
Translation: systemd/main

3 months agopo: Translated using Weblate (Swedish)
Luna Jernberg [Tue, 29 Jul 2025 19:53:39 +0000 (19:53 +0000)] 
po: Translated using Weblate (Swedish)

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Luna Jernberg <bittin@reimu.nl>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sv/
Translation: systemd/main

3 months agocore: merging errno usage in access_init()
Ivan Kruglov [Tue, 29 Jul 2025 20:56:41 +0000 (22:56 +0200)] 
core: merging errno usage in access_init()

3 months agoTEST-71-HOSTNAME: specify job mode for the stop job (#38413)
Zbigniew Jędrzejewski-Szmek [Tue, 29 Jul 2025 23:25:28 +0000 (01:25 +0200)] 
TEST-71-HOSTNAME: specify job mode for the stop job (#38413)

The CI run is failing in the stop command:
```
[ 4841.936906] TEST-71-HOSTNAME.sh[140]: + stop_hostnamed
[ 4841.936906] TEST-71-HOSTNAME.sh[140]: + systemctl stop systemd-hostnamed.service
[ 4845.959747] TEST-71-HOSTNAME.sh[226]: Job for systemd-hostnamed.service canceled.
[ 4846.013286] systemd[1]: TEST-71-HOSTNAME.service: Main process exited, code=exited, status=1/FAILURE
[ 4846.013792] systemd[1]: TEST-71-HOSTNAME.service: Failed with result 'exit-code'.
[ 4846.021821] systemd[1]: Failed to start TEST-71-HOSTNAME.service - TEST-71-HOSTNAME.
```
This happens when we create the stop job, but while we're waiting for
it to finish, something triggers a start of the unit and we lose to competing
start job.

Hopefully fixes #36089.

3 months agologin: fix typo
Yu Watanabe [Tue, 29 Jul 2025 23:18:46 +0000 (08:18 +0900)] 
login: fix typo

3 months agoUse ERRNO_NAME in most places to figure out errno names (#38409)
Yu Watanabe [Tue, 29 Jul 2025 22:05:43 +0000 (07:05 +0900)] 
Use ERRNO_NAME in most places to figure out errno names (#38409)

3 months agopam_systemd: never reset existing $XDG_RUNTIME_DIR for non-area logins (#38405)
Yu Watanabe [Tue, 29 Jul 2025 22:05:03 +0000 (07:05 +0900)] 
pam_systemd: never reset existing $XDG_RUNTIME_DIR for non-area logins (#38405)

3 months agodocs: Add policy on AI generated code to contributing doc
DaanDeMeyer [Mon, 14 Jul 2025 13:30:21 +0000 (15:30 +0200)] 
docs: Add policy on AI generated code to contributing doc

Contributors making use of AI should clearly mention so in their
PR descriptions and include the prompt used to generate the pull
request.

3 months agoselinux fixes for varlink (#38404)
Zbigniew Jędrzejewski-Szmek [Tue, 29 Jul 2025 16:30:37 +0000 (18:30 +0200)] 
selinux fixes for varlink (#38404)

- fixes `mac_selinux_unit_access_check_varlink` macro
- more usage of `log_selinux_enforcing_errno()` for consistency

3 months agorun: make PTY forwarder honor vhangup() after service finished 38385/head
Yu Watanabe [Mon, 28 Jul 2025 19:34:01 +0000 (04:34 +0900)] 
run: make PTY forwarder honor vhangup() after service finished

Like we already do in machinectl.

3 months agoptyfwd,run: make pty_forward_drain() trigger defer event to call shovel()
Yu Watanabe [Mon, 28 Jul 2025 20:13:30 +0000 (05:13 +0900)] 
ptyfwd,run: make pty_forward_drain() trigger defer event to call shovel()

drained() checks PTYForward.master_readable flag, but it may be
tentatively unset due to a tentative error like EAGAIN in the previous
IO event. Let's try to call shovel() one more time, which re-read the
master and call drained() at the end. Otherwise, we may lost some data.

3 months agoptyfwd: do not try to read master if already disconnected
Yu Watanabe [Mon, 28 Jul 2025 15:47:45 +0000 (00:47 +0900)] 
ptyfwd: do not try to read master if already disconnected

When PTYForward.done is set, the PTYForward.master is already
disconnected. Let's not try to read the already closed file descriptor.

Also, if we previously received vhangup, then it is not necessary to
re-read the device to check vhangup, as we already know.

This also make the check slightly delayed, and use a defer event source,
to make the function can be called safely in another event source.

3 months agoptyfwd: replace pty_forward_set_ignore_vhangup() with pty_forward_honor_vhangup()
Yu Watanabe [Mon, 28 Jul 2025 15:59:46 +0000 (00:59 +0900)] 
ptyfwd: replace pty_forward_set_ignore_vhangup() with pty_forward_honor_vhangup()

Currently, pty_forward_set_ignore_vhangup() is only used for disabling
the flag. To make the function also disable PTY_FORWARD_IGNORE_INITIAL_VHANGUP
flag, this renames it to pty_forward_honor_vhangup().

Also, for consistency, pty_forward_get_ignore_vhangup() and
ignore_vhangup() are replaced with pty_forward_vhangup_honored().

3 months agoptyfwd: split-out shovel_force()
Yu Watanabe [Mon, 28 Jul 2025 19:51:33 +0000 (04:51 +0900)] 
ptyfwd: split-out shovel_force()

No functional change. Preparation for later change.

3 months agoptyfwd: do not call pty_forward_done() in do_shovel()
Yu Watanabe [Mon, 28 Jul 2025 19:44:41 +0000 (04:44 +0900)] 
ptyfwd: do not call pty_forward_done() in do_shovel()

Previously, do_shovel() sometimes call pty_forward_done(), and
its caller shovel() also call pty_forward_done(). Let's move all
pty_forward_done() calls to shovel(), and do_shovel() not call it.

No functional change, just refactoring.

3 months agosd-bus: drop unnecessary check 38409/head
Zbigniew Jędrzejewski-Szmek [Tue, 29 Jul 2025 16:04:24 +0000 (18:04 +0200)] 
sd-bus: drop unnecessary check

errno_name_no_fallback() (and errno_to_name() before that) already
handle negative errnos properly.

3 months agotree-wide: use ERRNO_NAME almost everywhere
Zbigniew Jędrzejewski-Szmek [Tue, 29 Jul 2025 15:59:04 +0000 (17:59 +0200)] 
tree-wide: use ERRNO_NAME almost everywhere

We had errno_to_name() which works for "known" errnos, and returns NULL for
unknown ones, and then ERRNO_NAME which always returns an answer, possibly just
a number as a string, but requires a helper buffer.

It is possible for the kernel to add a new errno. We recently learned that some
architectures define custom errno names. Or for some function to unexpectedly
return a bogus errno value. In almost all cases it's better to print that value
rather than "n/a" or "(null)". So let's use ERRNO_NAME is most error handling
code. Noteably, our code wasn't very good in handling the potential NULL, so
in various places we could print "(null)". Since this is supposed to be used
most of the time, let's shorten the names to ERRNO_NAME/errno_name.

There are a few places where we don't want to use the fallback path, in
particular for D-Bus error names or when saving the error name. Let's rename
errno_to_name() to errno_name_no_fallback() to make the distinction clearer.

3 months agocore: more use of log_selinux_enforcing_errno() in selinux-access.c 38404/head
Ivan Kruglov [Fri, 11 Jul 2025 12:03:58 +0000 (05:03 -0700)] 
core: more use of log_selinux_enforcing_errno() in selinux-access.c

3 months agopam_systemd: never reset existing $XDG_RUNTIME_DIR for non-area logins 38405/head
Mike Yuan [Tue, 29 Jul 2025 13:16:05 +0000 (15:16 +0200)] 
pam_systemd: never reset existing $XDG_RUNTIME_DIR for non-area logins

Follow-up for cfb7abc7fc8a7a3a79d44d0511e65a40566f1949

For whatever reason, ly is setting $XDG_RUNTIME_DIR before invoking
PAM session on its own
(https://github.com/fairyglade/ly/blob/v1.1.1/src/auth.zig#L45),
which after the offending commit will potentially be unset again
by pam_systemd. Let's restore the previous behavior if not switching area.

Fixes #38402

3 months agopam_systemd: use update_environment() where appropriate
Mike Yuan [Tue, 29 Jul 2025 13:33:41 +0000 (15:33 +0200)] 
pam_systemd: use update_environment() where appropriate

3 months agocore: fix mac_selinux_unit_access_check_varlink() macro
Ivan Kruglov [Fri, 11 Jul 2025 12:23:05 +0000 (05:23 -0700)] 
core: fix mac_selinux_unit_access_check_varlink() macro

3 months agoPrint location of loader.conf in bootctl status and related updates (#38389)
Yu Watanabe [Tue, 29 Jul 2025 13:34:16 +0000 (22:34 +0900)] 
Print location of loader.conf in bootctl status and related updates (#38389)

3 months agoRevert "errno-list: fallback to use our errno name table"
Zbigniew Jędrzejewski-Szmek [Tue, 29 Jul 2025 13:14:27 +0000 (15:14 +0200)] 
Revert "errno-list: fallback to use our errno name table"

This reverts commit c4ffd0a02075f14c6124b1da2219e15f7e4fd64b.

With this change we fully duplicate the functionality in glibc. This patch
was motivated by glibc missing some names, but those are in the process of
being added:
https://sourceware.org/pipermail/libc-alpha/2025-July/169007.html

3 months agodocs/ENVIRONMENT: fix typo and adjust grammar 38389/head
Zbigniew Jędrzejewski-Szmek [Tue, 29 Jul 2025 09:33:29 +0000 (11:33 +0200)] 
docs/ENVIRONMENT: fix typo and adjust grammar

3 months agoman/systemd-boot: recommend holding space by default
Zbigniew Jędrzejewski-Szmek [Mon, 28 Jul 2025 13:14:57 +0000 (15:14 +0200)] 
man/systemd-boot: recommend holding space by default

https://github.com/systemd/systemd/pull/15509/files#r2234113960 complains that the
advice is still not clear enough. systemd-boot itself says
  "Menu hidden. Hold down key at bootup to show menu."
so let's do the same and tell users to hold down space as the first option.
This should work fine for 99% of people. Then invert the following advice to
try repeated pressing as the alternative option.

Also, fix the advice about --boot-loader-menu=. The whole para is about getting
the menu to show, so 0 is not a good value.

Follow-up for https://github.com/systemd/systemd/pull/15509.

3 months agoman/systemd-boot: describe which keys use EFI variables
Zbigniew Jędrzejewski-Szmek [Mon, 28 Jul 2025 12:57:09 +0000 (14:57 +0200)] 
man/systemd-boot: describe which keys use EFI variables

Some keys have only a transient effect, e.g. 'e', but some have a persistent
effect, e.g. 'd'. This is important informations, but the reader might be
forgiven for not finding that at all obvious when reading the descriptions of
the keys.

Also, mention in loader.conf man page that the settings there might be overriden
by EFI variables. This is another thing that is important but not obvious.

3 months agoman/loader.conf: wrap some very wrong lines
Zbigniew Jędrzejewski-Szmek [Mon, 28 Jul 2025 12:38:56 +0000 (14:38 +0200)] 
man/loader.conf: wrap some very wrong lines

3 months agoman: fix confusion in loader.conf
Zbigniew Jędrzejewski-Szmek [Mon, 28 Jul 2025 12:38:39 +0000 (14:38 +0200)] 
man: fix confusion in loader.conf

For some reason, the man page for loader.conf also mentioned type#1 entries
in passing. Except for using the same file extension, those files are in a
completely different format and with a different purpose. This mixup was
first introduced in f37d3835828c45b3a92ed12d9a6a30796c0a4a27, was then
reported in #10923, which was closed by cbae79b8d07327051c1e1f438f7086ab634b93f8,
but that didn't fix the actual issue.

Really fixes #10923.

While at it, simplify and improve the wording a bit.

3 months agobootctl: print location/status of loader.conf
Zbigniew Jędrzejewski-Szmek [Mon, 28 Jul 2025 12:32:03 +0000 (14:32 +0200)] 
bootctl: print location/status of loader.conf

The usual pattern of using colors to distinguish the mount path (/efi/)
and the rest is used. If the file cannot be read for reasons other than
-ENOENT, the error message is highlighted.

I considered a few places where to add this, but this section seems the
most reaosonable. We already print the 'token' there, which is also part of
the configuration.

Boot Loader Entry Locations:
          ESP: /efi (/dev/disk/by-partuuid/31659406-5a17-46ec-8195-0dea1667db58)
       config: /efi//loader/loader.conf
     XBOOTLDR: /boot (/dev/disk/by-partuuid/4f8a8fe9-4b45-4070-9e9b-a681be51c902, $BOOT)
        token: fedora

3 months agotest: add workaround for unexpected VM restart (#38397)
Luca Boccassi [Tue, 29 Jul 2025 08:52:37 +0000 (09:52 +0100)] 
test: add workaround for unexpected VM restart (#38397)

Workarounds for issue #38240.

3 months agoTEST-03-JOBS: modernize test code and extend timeout
Yu Watanabe [Tue, 29 Jul 2025 02:07:35 +0000 (11:07 +0900)] 
TEST-03-JOBS: modernize test code and extend timeout

- use timeout command more,
- use `(! cmd)` rather than `cmd && exit 1`,
- drop unnecessary `|| exit 1`,
- extend timeout to support slow test environment.

Fixes #38395.

3 months agoTEST-64-UDEV-STORAGE: clear MD superblock on exit 38397/head
Yu Watanabe [Tue, 29 Jul 2025 04:02:25 +0000 (13:02 +0900)] 
TEST-64-UDEV-STORAGE: clear MD superblock on exit

Workaround for issue #38240.

3 months agoTEST-46-HOMED: remove unnecessary users
Yu Watanabe [Tue, 29 Jul 2025 03:29:12 +0000 (12:29 +0900)] 
TEST-46-HOMED: remove unnecessary users

Workaround for issue #38240.

3 months agoTEST-46-HOMED: modernize test
Yu Watanabe [Tue, 29 Jul 2025 03:27:18 +0000 (12:27 +0900)] 
TEST-46-HOMED: modernize test

- use command to check the existence of homectl,
- use timeout for waiting user,
- use 4ch indentation.

3 months agoci: add test coverage for secure boot and addons, and shim integration (#38377)
Yu Watanabe [Tue, 29 Jul 2025 03:08:42 +0000 (12:08 +0900)] 
ci: add test coverage for secure boot and addons, and shim integration (#38377)

Now that we can enable SB on GHA do it by default in mkosi images with
selfenroll, and add a smoke test.
Also add one CI job that tests the shim integration. This will catch
regressions like https://github.com/systemd/systemd/issues/38349

3 months agoTEST-04-JOURNAL: add one more missing journalctl --sync
Yu Watanabe [Mon, 28 Jul 2025 23:25:23 +0000 (08:25 +0900)] 
TEST-04-JOURNAL: add one more missing journalctl --sync

Fixes the following failure:
```
TEST-04-JOURNAL.sh[124]: + add_logs_filtering_override delegated-cgroup-filtering.service 01-discard-hello '~hello'
TEST-04-JOURNAL.sh[124]: + local unit=delegated-cgroup-filtering.service
TEST-04-JOURNAL.sh[124]: + local override_name=01-discard-hello
TEST-04-JOURNAL.sh[124]: + local 'log_filter=~hello'
TEST-04-JOURNAL.sh[124]: + mkdir -p /run/systemd/system/delegated-cgroup-filtering.service.d/
TEST-04-JOURNAL.sh[124]: + echo -ne '[Service]\nLogFilterPatterns=~hello'
TEST-04-JOURNAL.sh[124]: + NEEDS_RELOAD=1
TEST-04-JOURNAL.sh[1408]: ++ run_service_and_fetch_logs delegated-cgroup-filtering.service
TEST-04-JOURNAL.sh[1408]: ++ local unit=delegated-cgroup-filtering.service
TEST-04-JOURNAL.sh[1408]: ++ [[ -n 1 ]]
TEST-04-JOURNAL.sh[1408]: ++ systemctl daemon-reload
TEST-04-JOURNAL.sh[1408]: ++ NEEDS_RELOAD=
TEST-04-JOURNAL.sh[1408]: ++ systemctl start delegated-cgroup-filtering.service
TEST-04-JOURNAL.sh[1408]: ++ journalctl --sync
TEST-04-JOURNAL.sh[1408]: ++ journalctl -q -u delegated-cgroup-filtering.service -I -p notice
TEST-04-JOURNAL.sh[124]: + [[ -z Jul 28 22:41:41 H delegated_cgroup_filtering_payload.sh[1448]: child_process: hello, world!
TEST-04-JOURNAL.sh[124]: Jul 28 22:41:41 H delegated_cgroup_filtering_payload.sh[1448]: child_process: hello, people! ]]
TEST-04-JOURNAL.sh[124]: + at_exit
```

3 months agoci: test integration with shim in debian jobs 38377/head
Luca Boccassi [Sun, 27 Jul 2025 20:25:10 +0000 (21:25 +0100)] 
ci: test integration with shim in debian jobs

Debian provides a signed shim that trusts sdboot and can be
installed without pulling in grub automatically. Install it
in the debian mkosi CI job, and build a custom efivars with
the mkosi cert enrolled in MOK but not DB, to test those
code paths.

3 months agobasic: follow-ups for CHASE_MUST_BE_DIRECTORY/REGULAR (#38390)
Luca Boccassi [Mon, 28 Jul 2025 22:16:53 +0000 (23:16 +0100)] 
basic: follow-ups for CHASE_MUST_BE_DIRECTORY/REGULAR (#38390)

Follow-up for 90b9f7a07e6f57825f416f6ce2db0a9f2086754b.

3 months agoTranslations update from Fedora Weblate (#38387)
Luca Boccassi [Mon, 28 Jul 2025 22:12:54 +0000 (23:12 +0100)] 
Translations update from Fedora Weblate (#38387)

3 months agotest: add a secureboot test with an addon
Luca Boccassi [Sun, 27 Jul 2025 20:23:17 +0000 (21:23 +0100)] 
test: add a secureboot test with an addon

3 months agomkosi: enable secure boot and autoenroll by default
Luca Boccassi [Sun, 27 Jul 2025 12:17:04 +0000 (13:17 +0100)] 
mkosi: enable secure boot and autoenroll by default

With GHA now fixed, just always enable SB so that we get extra
coverage

3 months agotest: preserve ESP when testing bootctl
Luca Boccassi [Sun, 27 Jul 2025 12:16:23 +0000 (13:16 +0100)] 
test: preserve ESP when testing bootctl

3 months agotest: do not fail TEST-70-TPM2 when secure boot is enabled
Luca Boccassi [Mon, 28 Jul 2025 00:55:27 +0000 (01:55 +0100)] 
test: do not fail TEST-70-TPM2 when secure boot is enabled

[  183.037401] TEST-70-TPM2.sh[2876]: + systemd-creds decrypt --name=pcrlock.arch /tmp/fakexbootldr/loader/credentials/pcrlock.arch.cred
[  183.054755] TEST-70-TPM2.sh[3003]: Found container virtualization none.
[  183.083789] TEST-70-TPM2.sh[3003]: Reading EFI variable /sys/firmware/efi/efivars/LoaderTpm2ActivePcrBanks-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f.
[  183.094377] TEST-70-TPM2.sh[3003]: Detected slow EFI variable read access on LoaderTpm2ActivePcrBanks-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f: 55.799ms
[  183.095353] TEST-70-TPM2.sh[3003]: Reading EFI variable /sys/firmware/efi/efivars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c.
[  183.099653] TEST-70-TPM2.sh[3003]: Credential uses fixed key for fallback use when TPM2 is absent — but TPM2 is present, and SecureBoot is enabled, refusing.

3 months agomkosi: update mkosi commit reference to cb1a3c90490922441548d09b09c7b76426e4bc20
Luca Boccassi [Mon, 28 Jul 2025 22:10:03 +0000 (23:10 +0100)] 
mkosi: update mkosi commit reference to cb1a3c90490922441548d09b09c7b76426e4bc20

cb1a3c9049 FirmwareVariables: allow generating during image build
6104923534 env: export $EFI_ARCHITECTURE in hook scripts on EFI arches
fef33f96a2 mkosi-tools: ukify moved to systemd-ukify in openSUSE
ec4475a846 ensure builds with cache over device boundaries
7be5159f24 Change UnifiedKernelImages to enum and accept signed/unsigned
071ac4a575 mkosi-vm: install systemd-boot-efi-signed where available
1865be628e opensuse: Install OpenSUSE-release if another release package is not installed
0381b17819 qemu: Disable hpet for x86 VMs
4f63700eb3 mkosi-tools: install systemd-boot-tools for bootctl
1230ed333b man: remove duplicate 'the' in FirmwareVariables description

3 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN)) 38387/head
Jesse Guo [Mon, 28 Jul 2025 17:25:53 +0000 (17:25 +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

3 months agopo: Translated using Weblate (Indonesian)
Andika Triwidada [Mon, 28 Jul 2025 17:25:53 +0000 (17:25 +0000)] 
po: Translated using Weblate (Indonesian)

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Andika Triwidada <andika@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/id/
Translation: systemd/main

3 months agopo: Translated using Weblate (Catalan)
naly zzwd [Mon, 28 Jul 2025 17:25:53 +0000 (17:25 +0000)] 
po: Translated using Weblate (Catalan)

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: naly zzwd <xeanhort007@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ca/
Translation: systemd/main

3 months agoman: correct the number of active unit states
Brett Holman [Mon, 28 Jul 2025 19:14:41 +0000 (13:14 -0600)] 
man: correct the number of active unit states

3 months agoconf-files: CHASE_MUST_BE_DIRECTORY can be set with CHASE_NONEXISTENT 38390/head
Yu Watanabe [Mon, 28 Jul 2025 18:36:36 +0000 (03:36 +0900)] 
conf-files: CHASE_MUST_BE_DIRECTORY can be set with CHASE_NONEXISTENT

With the previous commit, now CHASE_MUST_BE_DIRECTORY can be set with
CHASE_NONEXISTENT. Let's unconditionally set the flag to chase the
directory part of the conf file.

3 months agochase: check the result is a directory or regular file only when the resolved path...
Yu Watanabe [Mon, 28 Jul 2025 18:25:17 +0000 (03:25 +0900)] 
chase: check the result is a directory or regular file only when the resolved path exists

Otherwise, if it is called with CHASE_NONEXISTENT, when we call
stat_verify_directory()/_regular() the struct stat is for one of the
parent directory, rather than for the result path.

With this change, we can safely specify CHASE_MUST_BE_DIRECTORY/REGULAR
with CHASE_NONEXISTENT.

More importantly, chaseat() internally sets CHASE_MUST_BE_DIRECTORY when
the input path ends with "/", "/,", "/..". Hence, without this change,
we cannot specify CHASE_NONEXISTENT safely.

Follow-up for 90b9f7a07e6f57825f416f6ce2db0a9f2086754b.

3 months agoefi-api: cast before shift
Yu Watanabe [Mon, 28 Jul 2025 17:00:44 +0000 (02:00 +0900)] 
efi-api: cast before shift

Fixes the following error when running with sanitizers:
```
TEST-87-AUX-UTILS-VM.sh[670]: + bootctl install --make-entry-directory=yes
TEST-87-AUX-UTILS-VM.sh[695]: Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed" to "/boot/EFI/systemd/systemd-bootx64.efi".
TEST-87-AUX-UTILS-VM.sh[695]: Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi.signed" to "/boot/EFI/BOOT/BOOTX64.EFI".
TEST-87-AUX-UTILS-VM.sh[695]: Created "/boot/fedora".
TEST-87-AUX-UTILS-VM.sh[695]: Random seed file /boot/loader/random-seed successfully refreshed (32 bytes).
TEST-87-AUX-UTILS-VM.sh[695]: ../src/shared/efi-api.c:618:38: runtime error: left shift of 243 by 24 places cannot be represented in type 'int'
```

3 months agoshell-completion: drop deprecated systemd-efi-options from suggestions
Zbigniew Jędrzejewski-Szmek [Mon, 28 Jul 2025 11:22:20 +0000 (13:22 +0200)] 
shell-completion: drop deprecated systemd-efi-options from suggestions

3 months agoTEST-23-UNIT-FILE: do not wait indefinitely but set a reasonable timeout
Yu Watanabe [Mon, 28 Jul 2025 13:57:07 +0000 (22:57 +0900)] 
TEST-23-UNIT-FILE: do not wait indefinitely but set a reasonable timeout

Otherwise, the test does not finish until the global timeout is reached.

This is for making the test fail earlier when something spurious happens:
```
[FAILED] Failed to start TEST-23-UNIT-FILE-short-lived.service - Shortlived Unit.
TEST-23-UNIT-FILE.sh[776]: + '[' 0 -eq 0 ']'
TEST-23-UNIT-FILE.sh[776]: + sleep .5
(snip)
58/98 systemd:integration-tests / TEST-23-UNIT-FILE  TIMEOUT  1800.52s  killed by signal 9 SIGKILL
```

3 months agojournal: fix log filtering for syslog message (#38372)
Luca Boccassi [Mon, 28 Jul 2025 13:24:14 +0000 (14:24 +0100)] 
journal: fix log filtering for syslog message (#38372)

Fixes #38361.

3 months agoTEST-87-AUX-UTILS-VM: make coredumps stored in archived journal file 38372/head
Yu Watanabe [Mon, 28 Jul 2025 07:40:27 +0000 (16:40 +0900)] 
TEST-87-AUX-UTILS-VM: make coredumps stored in archived journal file

Fixes the following race:
```
TEST-87-AUX-UTILS-VM.sh[839]: + coredumpctl -1
TEST-87-AUX-UTILS-VM.sh[1169]: TIME                        PID UID GID SIG     COREFILE EXE             SIZE
TEST-87-AUX-UTILS-VM.sh[1169]: Sun 2025-07-27 23:22:02 UTC 885   0   0 SIGABRT present  /tmp/test-dump 19.9K
TEST-87-AUX-UTILS-VM.sh[839]: + coredumpctl -n 1
TEST-87-AUX-UTILS-VM.sh[1172]: Journal file /var/log/journal/a8285330872602d1377cbaaf68869946/system.journal is truncated, ignoring file.
TEST-87-AUX-UTILS-VM.sh[1172]: No coredumps found.
```

3 months agoTEST-04-JOURNAL: add test case for log filtering through syslog
Yu Watanabe [Sun, 27 Jul 2025 19:52:37 +0000 (04:52 +0900)] 
TEST-04-JOURNAL: add test case for log filtering through syslog

For issue #38361.

3 months agoTEST-04-JOURNAL: several cleanups
Yu Watanabe [Sun, 27 Jul 2025 15:33:28 +0000 (00:33 +0900)] 
TEST-04-JOURNAL: several cleanups

- move scripts from test/units/ to the test specific units directory,
- drop meaningless true from silent-success.service,
- call journalctl from the same bash invocation of echo.

No functional change, just refactoring and preparation for the next
commit.

3 months agojournal: check filtering after parsing timestamp, identifier, pid, and so on
Yu Watanabe [Sun, 27 Jul 2025 15:23:21 +0000 (00:23 +0900)] 
journal: check filtering after parsing timestamp, identifier, pid, and so on

Otherwise, filtering regex with '^' does not work.

Fixes a bug in 87a13dabbd81c2e31fd5ac7b81cce61baf23e59c (v253).
Fixes #38361.

3 months agoinclude: update kernel headers from v6.16-rc7
Yu Watanabe [Sun, 27 Jul 2025 20:42:43 +0000 (05:42 +0900)] 
include: update kernel headers from v6.16-rc7

- netfilter changes in v6.16-rc1 were reverted,
- vm_sockets.h now includes sys/socket.h, hence our workaround is not
  necessary anymore.

3 months agostub: fix passing kernel cmdline when loading via shim
Luca Boccassi [Sun, 27 Jul 2025 19:51:43 +0000 (20:51 +0100)] 
stub: fix passing kernel cmdline when loading via shim

This was mistakenly dropped when the custom PE loader was added.
Add it back, otherwise no smbios/addon cmdline options are passed
through.

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

Follow-up for 40aabfae72619e313f8bcc038e57e0d3a5433d1a

3 months agoRework file system group magic lookups (#38340)
Yu Watanabe [Sun, 27 Jul 2025 18:39:34 +0000 (03:39 +0900)] 
Rework file system group magic lookups (#38340)

3 months agotest: skip verification for racy test cases
Yu Watanabe [Sun, 27 Jul 2025 12:42:12 +0000 (21:42 +0900)] 
test: skip verification for racy test cases

FORMAT_LIFETIME() internally calls now(), hence we cannot provide any
reliable verifications for finite lifetime.

3 months agoRework file system group lookups 38340/head
Zbigniew Jędrzejewski-Szmek [Fri, 25 Jul 2025 15:08:56 +0000 (17:08 +0200)] 
Rework file system group lookups

We want to check if the magic we got from statfs() is one of the magics listed
for one of the file systems in the given group. To do this, we'd iteratate over
the file system names, convert each name to an array of magics, and compare
those to the one we got. We were using gperf-generated lookup table for this,
so the string lookups were quick, but still this seems unnecessarily complex.
Let's just generate a simple lookup function, because we can:

$ src/basic/filesystem-sets.py fs-in-group
bool fs_in_group(const struct statfs *st, FilesystemGroups fs_group) {
        switch (fs_group) {
        case FILESYSTEM_SET_BASIC_API:
                return F_TYPE_EQUAL(st->f_type, CGROUP2_SUPER_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, CGROUP_SUPER_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, DEVPTS_SUPER_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, MQUEUE_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, PROC_SUPER_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, SYSFS_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, TMPFS_MAGIC);
        case FILESYSTEM_SET_ANONYMOUS:
                return F_TYPE_EQUAL(st->f_type, ANON_INODE_FS_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, PIPEFS_MAGIC)
                    || F_TYPE_EQUAL(st->f_type, SOCKFS_MAGIC);
...

We flatten the nested lookup of group=>fs=>magic into a single level.
The compiler can work its magic here to make the lookup quick.

3 months agomeson: rework generation of file system lookup helpers
Zbigniew Jędrzejewski-Szmek [Fri, 25 Jul 2025 14:29:10 +0000 (16:29 +0200)] 
meson: rework generation of file system lookup helpers

Previously, the gperf table was the main "source of truth", and additional
information (e.g. which file system names are obsolete) was scattered in
various files. We would then parse the gperf file, using python, awk, grep, and
bash, and use the results in various ways. This is hard to understand and
maintain. Let's replace all of this with a single python script that generates
the requested outputs as appropriate.

$ diff -u <(git show @{u}:src/basic/filesystems-gperf.gperf) \
          <(src/basic/filesystem-sets.py gperf)
shows that the outputs are the same except for comments.

Similarly, 'src/basic/filesystem-sets.py fs-type-to-string' and
'src/basic/filesystem-sets.py filesystem-sets' can be used to view
the generated code.

The check that the kernel doesn't define any new file system magics is
converted into a normal test. It doesn't seem necessary to fail the build
when that happens.

3 months agobasic/stat-util: avoid access syscall
Zbigniew Jędrzejewski-Szmek [Thu, 24 Jul 2025 13:09:58 +0000 (15:09 +0200)] 
basic/stat-util: avoid access syscall

I was looking at strace for systemd-getty-generator and noticed the call to
faccessat2(3</sys>, "", W_OK, AT_EMPTY_PATH), even though we already did
fstatfs(3</sys>), which should give us all the necessary information. Let's
only do this additional check when it's likely to yield something useful, i.e.
for network fses and otherwise skip the syscall.

The call to statvfs is replaced by statfs because that gives us the .f_type
field and allows is_network_fs() to be called.

I'm a bit worried that the is_network_fs() is somewhat costly. This will be
improved in later commits.

3 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN))
Jesse Guo [Sun, 27 Jul 2025 09:55:23 +0000 (09:55 +0000)] 
po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

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

3 months agosd-bus: escape invalid characters in error message
Yu Watanabe [Sat, 26 Jul 2025 18:55:16 +0000 (03:55 +0900)] 
sd-bus: escape invalid characters in error message

At many places, we pass arguments of dbus method calls to
sd_bus_error_setf(), and produces unprintable log messages.
Let's always escape the generated error message.

This fixes something like the following:
```
[ 1921.875668] systemd-logind[611]: Got message type=method_call sender=:1.46 destination=:1.6 path=/org/freedesktop/login1 interface=org.freedesktop.login1.Manager member=GetSeat  cookie=1344 reply_cookie=0 signature=s error-name=n/a error-message=n/a
[ 1921.875758] systemd-logind[611]: [725B blob data]
[ 1921.875777] systemd-logind[611]: [768B blob data]
```

3 months agoTEST-21-DFUZZER: improve stability of the test, and enable services to be tested...
Luca Boccassi [Sun, 27 Jul 2025 09:33:12 +0000 (10:33 +0100)] 
TEST-21-DFUZZER: improve stability of the test, and enable services to be tested (#37862)

Fixes #37834.

3 months agoNEWS: announce legacy iptables/libiptc support will be dropped in v259
Yu Watanabe [Fri, 25 Jul 2025 19:18:37 +0000 (04:18 +0900)] 
NEWS: announce legacy iptables/libiptc support will be dropped in v259

nftables is available since kernel 3.13 (released on 19 January 2014).
Major distributions have already provided nftables, and marked/called
iptables as deprecated or legacy.

Moreover, currently, iptables/libiptc backend does not support IPv6.

Hence, it is not necessary to keep iptables/libiptc backend anymore.
Let's drop it in the next release.

Note, fedora/centos have already disabled iptables/libiptc support since v249.

3 months agopcrlock: Return positive exit status
Valentin David [Sat, 26 Jul 2025 10:36:18 +0000 (12:36 +0200)] 
pcrlock: Return positive exit status

Follow-up for 89e83aada829a6d92e29f321168d2bb1462c678d.

`is-supported` expects to return a positive exit status.
To achieve that, verb_make_policy() needs to return 0 on success.

Finishes the fix for #38019.

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
3 months agoTEST-04-JOURNAL: add more test cases for LogFilterPatterns=
Yu Watanabe [Sat, 26 Jul 2025 22:10:36 +0000 (07:10 +0900)] 
TEST-04-JOURNAL: add more test cases for LogFilterPatterns=

For issue #38361.

3 months agotest: several cleanups for TEST-74-AUX-UTILS.socket-activate.sh
Yu Watanabe [Sat, 26 Jul 2025 21:56:02 +0000 (06:56 +0900)] 
test: several cleanups for TEST-74-AUX-UTILS.socket-activate.sh

- wait after kill,
- try --now only once,
- ignore error in reading /proc/$PID/comm when --now is set,
  as the process may be already died.

Follow-up for 9e0d0c3fdfe5043d71a8d54f1e6fcc152fbc3e58.

Hopefully fixes #38352.

3 months agolocale: escape invalid keymap on logging
Yu Watanabe [Sat, 26 Jul 2025 19:04:27 +0000 (04:04 +0900)] 
locale: escape invalid keymap on logging

The keymap string may come from dbus method and may contain invalid
characters.

3 months agoman/repart: fix the required btrfs-progs version
Yu Watanabe [Sat, 26 Jul 2025 19:30:40 +0000 (04:30 +0900)] 
man/repart: fix the required btrfs-progs version

Follow-up for 12c29e5b3a1d9294f2a1c0a4a83335fa23c272b8.

Prompted by #38355.

3 months agoTEST-21-DFUZZER: suppress debugging logs from homed, nsresourced, and userdbd 37862/head
Yu Watanabe [Sat, 26 Jul 2025 14:19:50 +0000 (23:19 +0900)] 
TEST-21-DFUZZER: suppress debugging logs from homed, nsresourced, and userdbd

3 months agoTEST-21-DFUZZER: enable services to be tested
Yu Watanabe [Mon, 16 Jun 2025 18:17:36 +0000 (03:17 +0900)] 
TEST-21-DFUZZER: enable services to be tested

Since e19e17df579823093238edb60470b29a2c5e24a6, timesyncd is disabled by
default, and fuzzing for timesyncd failed.

```
[  754.247451] TEST-21-DFUZZER.sh[658]: Bus: org.freedesktop.timesync1 (system)
[  754.247725] TEST-21-DFUZZER.sh[658]: + systemd-run --pipe --wait -- dfuzzer -b 10000 -n org.freedesktop.timesync1
[  754.282237] TEST-21-DFUZZER.sh[3236]: Running as unit: run-p3236-i3237.service
[  754.348983] TEST-21-DFUZZER.sh[3238]: [SESSION BUS]
[  754.350443] TEST-21-DFUZZER.sh[3238]: Bus not found.
[  754.350705] TEST-21-DFUZZER.sh[3238]: [SYSTEM BUS]
[  754.359249] TEST-21-DFUZZER.sh[3238]: Error while calling method 'GetConnectionUnixProcessID': GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: The connection does not exist
[  754.359520] TEST-21-DFUZZER.sh[3238]: Couldn't get the PID of the tested process
[  754.359764] TEST-21-DFUZZER.sh[3238]: Exit status: 4
[  754.386721] TEST-21-DFUZZER.sh[3236]:           Finished with result: exit-code
[  754.387331] TEST-21-DFUZZER.sh[3236]: Main processes terminated with: code=exited, status=4/NOPERMISSION
[  754.387537] TEST-21-DFUZZER.sh[3236]:                Service runtime: 74ms
[  754.387706] TEST-21-DFUZZER.sh[3236]:              CPU time consumed: 21ms
[  754.389210] TEST-21-DFUZZER.sh[3236]:                    Memory peak: 12.9M (swap: 0B)
```

Also, create dummy interface for networkd and resolved.

Fixes #37834.

3 months agoTEST-21-DFUZZER: first test session bus, then service bus, finally system bus
Yu Watanabe [Thu, 19 Jun 2025 10:01:57 +0000 (19:01 +0900)] 
TEST-21-DFUZZER: first test session bus, then service bus, finally system bus

3 months agoTEST-21-DFUZZER: update the list of destructive methods
Yu Watanabe [Thu, 19 Jun 2025 09:42:03 +0000 (18:42 +0900)] 
TEST-21-DFUZZER: update the list of destructive methods

3 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN))
Jesse Guo [Sat, 26 Jul 2025 20:30:00 +0000 (20:30 +0000)] 
po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

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

3 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN))
Jesse Guo [Sat, 26 Jul 2025 19:27:30 +0000 (19:27 +0000)] 
po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (264 of 264 strings)

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

3 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN))
Jesse Guo [Sat, 26 Jul 2025 18:51:46 +0000 (18:51 +0000)] 
po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 99.6% (263 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

3 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN))
Jesse Guo [Sat, 26 Jul 2025 15:53:09 +0000 (15:53 +0000)] 
po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 99.2% (262 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

3 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN))
Jesse Guo [Sat, 26 Jul 2025 15:17:14 +0000 (15:17 +0000)] 
po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 98.8% (261 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

3 months agoTEST-64-UDEV-STORAGE: wait for partition devices being created before calling udevadm...
Yu Watanabe [Sat, 26 Jul 2025 06:08:21 +0000 (15:08 +0900)] 
TEST-64-UDEV-STORAGE: wait for partition devices being created before calling udevadm trigger

For some reasons, kernel or sfdisk once remove the created partitions
and recreated them. And if 'udevadm trigger' triggers devices currently
being removed, the udevd does not receive the triggered events, and the
command stuck.

```
[   33.150452] TEST-64-UDEV-STORAGE.sh[546]: + sfdisk --wipe=always /dev/md/mdmirpar
[   33.478336] systemd-udevd[442]: md127: Device is queued (SEQNUM=2163, ACTION=change)
[   33.480153] kernel:  md127: p1 p2 p3
[   33.483772] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2164, ACTION=add)
[   33.483914] systemd-udevd[442]: md127p2: Device is queued (SEQNUM=2165, ACTION=add)
[   33.484999] systemd-udevd[442]: md127p3: Device is queued (SEQNUM=2166, ACTION=add)
[   33.485564] systemd-udevd[442]: md127: Received inotify event of watch handle 164.
[   33.503016] TEST-64-UDEV-STORAGE.sh[546]: + SYSTEMD_LOG_LEVEL=debug
[   33.503016] TEST-64-UDEV-STORAGE.sh[546]: + timeout 30 udevadm trigger --settle --parent-match /dev/md/mdmirpar
[   33.485905] systemd-udevd[442]: Successfully forked off '(udev-synth)' as PID 3208.
[   33.486067] systemd-udevd[442]: md127: Removing watch handle 164.
[   33.489035] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2167, ACTION=remove)
[   33.489048] systemd-udevd[442]: Received inotify event about removal of watch handle 164.
[   33.489507] systemd-udevd[442]: md127p2: Device is queued (SEQNUM=2168, ACTION=remove)
[   33.496298] systemd-udevd[442]: md127p3: Device is queued (SEQNUM=2169, ACTION=remove)
[   33.500628] systemd-udevd[442]: md127: Device is queued (SEQNUM=2170, ACTION=change)
[   33.502355] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2171, ACTION=add)
[   33.509371] TEST-64-UDEV-STORAGE.sh[3211]: md127: Triggered device with action 'change'.
[   33.509371] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Triggered device with action 'change'.
[   33.509371] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Triggered device with action 'change'.
[   33.512532] systemd-udevd[442]: md127: Device is queued (SEQNUM=2172, ACTION=change, UUID=a0b75692-08ad-428a-859b-9ef8772874d7)
[   33.512666] systemd-udevd[442]: md127p1: Device is queued (SEQNUM=2173, ACTION=change, UUID=4cd75a91-aa5b-4678-878c-0420b6c2e1e9)
[   33.512796] systemd-udevd[442]: md127p2: Device is queued (SEQNUM=2174, ACTION=add)
[   33.512910] systemd-udevd[442]: md127p3: Device is queued (SEQNUM=2175, ACTION=add)
[   33.531834] TEST-64-UDEV-STORAGE.sh[3211]: md127: Got uevent without UUID, ignoring: No such file or directory
[   33.553563] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Got uevent without UUID, ignoring: No such file or directory
[   33.561262] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Got uevent without UUID, ignoring: No such file or directory
[   33.562468] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Got uevent without UUID, ignoring: No such file or directory
[   33.563143] TEST-64-UDEV-STORAGE.sh[3211]: md127p3: Got uevent without UUID, ignoring: No such file or directory
[   33.564174] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Got uevent without UUID, ignoring: No such file or directory
[   33.567614] TEST-64-UDEV-STORAGE.sh[3211]: md127p3: Got uevent without UUID, ignoring: No such file or directory
[   33.597750] TEST-64-UDEV-STORAGE.sh[3211]: md127: Got uevent without UUID, ignoring: No such file or directory
[   33.623522] TEST-64-UDEV-STORAGE.sh[3211]: md127p1: Got uevent without UUID, ignoring: No such file or directory
[   33.676268] TEST-64-UDEV-STORAGE.sh[3211]: md127p3: Got uevent without UUID, ignoring: No such file or directory
[   33.686088] TEST-64-UDEV-STORAGE.sh[3211]: md127p2: Got uevent without UUID, ignoring: No such file or directory
```

Let's wait for partition devices being actually created, and wait for
all queued events being processed. Then, call 'udevadm trigger'.

3 months agotree-wide: bunch of fixlets raised by coverity (#38341)
Luca Boccassi [Sat, 26 Jul 2025 10:10:00 +0000 (11:10 +0100)] 
tree-wide: bunch of fixlets raised by coverity (#38341)

3 months agopo: Translated using Weblate (Korean)
김인수 [Sat, 26 Jul 2025 09:04:14 +0000 (09:04 +0000)] 
po: Translated using Weblate (Korean)

Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ko/
Translation: systemd/main

3 months agofs-util: avoid overflow in MODE_TO_PTR() with MODE_INVALID 38341/head
Yu Watanabe [Fri, 25 Jul 2025 18:38:56 +0000 (03:38 +0900)] 
fs-util: avoid overflow in MODE_TO_PTR() with MODE_INVALID

Note, currently MODE_TO_PTR() and PTR_TO_MODE() are only used in
src/udev/udev-rules.c .

Fixes CID#1548060.

3 months agoinstall: skip later first_word() calls if one of earlier calls passes
Yu Watanabe [Fri, 25 Jul 2025 18:24:51 +0000 (03:24 +0900)] 
install: skip later first_word() calls if one of earlier calls passes

Prompted by CID#1587764, that is false-positive.

3 months agofuzz-efi-string: add missing OOM check
Yu Watanabe [Fri, 25 Jul 2025 18:05:20 +0000 (03:05 +0900)] 
fuzz-efi-string: add missing OOM check

Fixes CID#1610113 and CID#1610114.

3 months agodelta: add missing error check
Yu Watanabe [Fri, 25 Jul 2025 18:02:50 +0000 (03:02 +0900)] 
delta: add missing error check

Follow-up for 59829bb37a44a01c4394301fd65478037e6b01d8.
Fixes CID#1611425.

3 months agoordered-set: avoid overflow
Yu Watanabe [Fri, 25 Jul 2025 17:58:01 +0000 (02:58 +0900)] 
ordered-set: avoid overflow

Previously, ordered_set_put_strdupv() and friends returns the number of
pushed entries, but that is potentially larger than INT_MAX (of course,
realistically, OOM is triggered in that case).

No caller uses the number of the new entries. Let's return 1 when at
least one element is added.

Fixes CID#1611523.

3 months agotest: add explicit test cases for cpu_set_add() and cpu_set_add_range()
Yu Watanabe [Fri, 25 Jul 2025 17:31:37 +0000 (02:31 +0900)] 
test: add explicit test cases for cpu_set_add() and cpu_set_add_range()

cpu_set_add_range() is used in parse_cpu_set(), hence already tested.
But it is better to test these functions explicitly.

For CID#1611787 and CID#1611788, that should be false-positive.

3 months agocpu-set-util: check if cpu set is already allocated
Yu Watanabe [Fri, 25 Jul 2025 17:23:52 +0000 (02:23 +0900)] 
cpu-set-util: check if cpu set is already allocated

Prompted by CID#1611789, CID#1611790, and CID#1611791.

3 months agobootctl: automatically set --graceful when running in chroot
Luca Boccassi [Fri, 25 Jul 2025 10:30:51 +0000 (11:30 +0100)] 
bootctl: automatically set --graceful when running in chroot

Installing stuff in a chroot should not fail because efivars are
not available. When running in a container touching efivars is
completely disabled, but there are some cases (recovery) where
it is needed to touch them in a chroot, so don't disable them but
avoid failing the run instead.