]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 months agouser-runtime-dir: fix logged quota size 38496/head
Yu Watanabe [Wed, 6 Aug 2025 03:45:45 +0000 (12:45 +0900)] 
user-runtime-dir: fix logged quota size

'v' is a number of blocks, rather than bytes.

3 months agouser-runtime-dir: skip setting quota if not requested
Yu Watanabe [Wed, 6 Aug 2025 03:42:27 +0000 (12:42 +0900)] 
user-runtime-dir: skip setting quota if not requested

Fixes the following spurious warning:

systemd-user-runtime-dir[865]: Failed to set disk quota limit to '15.9P' on /tmp for UID 991, ignoring: Numerical result out of range

Fixes #38493.

3 months agotest: ensure printf builtin buffers and does a single write when piping into socat
Luca Boccassi [Tue, 5 Aug 2025 18:34:49 +0000 (19:34 +0100)] 
test: ensure printf builtin buffers and does a single write when piping into socat

Should hopefully solve this:

[  111.084463] systemd[1]: testservice-50k.service: Got notification message from PID 2651: RELOADING=1
[  111.085980] systemd[1]: testservice-50k.service: Got notification message from PID 2651: MONOTONIC_USEC=111072508

ie, pid1 receives RELOADING=1 and MONOTONIC_USEC= in different messages instead
of a single one, and reload-notify breaks

Follow-up for 3998b30a040d1494918e11c78ef3eae72532bbca

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

3 months agomeson: update version numbers for v258~rc2 v258-rc2
Luca Boccassi [Tue, 5 Aug 2025 16:16:07 +0000 (17:16 +0100)] 
meson: update version numbers for v258~rc2

3 months agoNEWS: update date
Luca Boccassi [Tue, 5 Aug 2025 15:39:39 +0000 (16:39 +0100)] 
NEWS: update date

3 months agoNEWS: update list of contributors
Luca Boccassi [Tue, 5 Aug 2025 15:39:27 +0000 (16:39 +0100)] 
NEWS: update list of contributors

3 months agoNEWS: fix typo
Yu Watanabe [Tue, 5 Aug 2025 16:12:12 +0000 (01:12 +0900)] 
NEWS: fix typo

3 months agoupdatectl: allow interactive authorization
Abderrahim Kitouni [Mon, 9 Dec 2024 08:20:02 +0000 (09:20 +0100)] 
updatectl: allow interactive authorization

3 months agostub: also pickup global .raw sysexts, like per-UKI ones
Luca Boccassi [Mon, 4 Aug 2025 23:30:18 +0000 (00:30 +0100)] 
stub: also pickup global .raw sysexts, like per-UKI ones

It is extremely confusing to use different filenames for different
locations, so pick up the same images for both per-UKI and global
extensions

Follow-up for 9f7e3820e9b3959fca31fb4f00fae9e3b2543b76

3 months agoTEST-64-UDEV-STORAGE: mdadm --zero-superblock seems to not support symlink
Yu Watanabe [Mon, 4 Aug 2025 18:48:55 +0000 (03:48 +0900)] 
TEST-64-UDEV-STORAGE: mdadm --zero-superblock seems to not support symlink

On CentOS 9:
```
TEST-64-UDEV-STORAGE.sh[522]: + mdadm -v --zero-superblock --force /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm0 ...
TEST-64-UDEV-STORAGE.sh[1014]: mdadm: Unrecognised md component device - /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadmlvm4
```

This also adds `udevadm settle` before clearing superblocks for safety.

Follow-up for 5ad6fe9850e0ecad7415bfbdd547d07b9b1177c7.

3 months agoudev/spawn: continue to read stdout even if the result buffer is full
Yu Watanabe [Mon, 4 Aug 2025 17:44:18 +0000 (02:44 +0900)] 
udev/spawn: continue to read stdout even if the result buffer is full

Previously, when the stdout of a spawned process (e.g. dmi_memory_id) is
truncated, the event source was not re-enabled, that will cause the process
to remain in a write-blocked state if the stdout buffer is full, and the
process will time out:
```
Spawned process 'dmi_memory_id' [1116] timed out after 2min 59s, killing.
Process 'dmi_memory_id' terminated by signal KILL.
```

The solution is to continue enabling the event source so that on_spawn_io()
can continue reading the stdout buffer. When the result buffer is full, the
local `buf` variable will be used to drain remaining stdout.

Co-authored-by: Deli Zhang <deli.zhang@cloud.com>
3 months agopo: Translated using Weblate (Kabyle)
ButterflyOfFire [Tue, 5 Aug 2025 01:31:01 +0000 (01:31 +0000)] 
po: Translated using Weblate (Kabyle)

Currently translated at 4.5% (12 of 264 strings)

Co-authored-by: ButterflyOfFire <butterflyoffire@users.noreply.translate.fedoraproject.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/kab/
Translation: systemd/main

3 months agoChores for RC2 (#38473)
Luca Boccassi [Mon, 4 Aug 2025 17:09:40 +0000 (18:09 +0100)] 
Chores for RC2 (#38473)

3 months agoNEWS: update date 38473/head
Luca Boccassi [Mon, 4 Aug 2025 11:22:44 +0000 (12:22 +0100)] 
NEWS: update date

3 months agoNEWS: update contributors list
Luca Boccassi [Mon, 4 Aug 2025 11:22:30 +0000 (12:22 +0100)] 
NEWS: update contributors list

3 months agoNEWS: note new items since RC1
Luca Boccassi [Mon, 4 Aug 2025 11:21:29 +0000 (12:21 +0100)] 
NEWS: note new items since RC1

3 months agohwdb: update autosuspend rules
Luca Boccassi [Mon, 4 Aug 2025 11:25:07 +0000 (12:25 +0100)] 
hwdb: update autosuspend rules

ninja -C build update-hwdb-autosuspend

3 months agohwdb: update
Luca Boccassi [Mon, 4 Aug 2025 11:24:29 +0000 (12:24 +0100)] 
hwdb: update

ninja -C build update-hwdb

3 months agotest-dns-question: use ASSERT_OK_POSITIVE/ZERO() rather than ASSERT_TRUE/FALSE()
Yu Watanabe [Sun, 3 Aug 2025 07:52:31 +0000 (16:52 +0900)] 
test-dns-question: use ASSERT_OK_POSITIVE/ZERO() rather than ASSERT_TRUE/FALSE()

Similar to 100a98960ac2ea8d1d7297e35960cd9c33b0ce19.

E.g. dns_question_contains_key() may return negative errno, hence we
should not use ASSERT_TRUE/FALSE() for the function.

This also has bunch of cleanups:
- call functions in ASSERT_NOT_NULL(),
- add short comments for constant function arguments,
- merge several test cases,
- use memstream, rather than temporal files.

Fixes CID#1619185.

3 months agotest: include unistd.h for _exit() used in ASSERT_SIGNAL()
Yu Watanabe [Mon, 4 Aug 2025 04:29:19 +0000 (13:29 +0900)] 
test: include unistd.h for _exit() used in ASSERT_SIGNAL()

Similar to c56e251d3f444b78e877eae27a0f82dcde5e9fe5.

3 months agoman: fix typo
Yu Watanabe [Sun, 3 Aug 2025 20:29:51 +0000 (05:29 +0900)] 
man: fix typo

3 months agotest-dns-answer: fix misuse of ASSERT_TRUE/FALSE()
Yu Watanabe [Fri, 1 Aug 2025 19:42:33 +0000 (04:42 +0900)] 
test-dns-answer: fix misuse of ASSERT_TRUE/FALSE()

E.g. dns_answer_match_key() may return negative errno, hence we should
use ASSERT_OK_POSITIVE/ZERO().

This also has bunch of cleanups:
- call functions in ASSERT_NOT_NULL(),
- add short comments for constant function arguments,
- merge several test cases,
- use memstream, rather than temporal files.

3 months agobuild(deps): bump github/codeql-action from 3.29.2 to 3.29.5
dependabot[bot] [Fri, 1 Aug 2025 09:18:15 +0000 (09:18 +0000)] 
build(deps): bump github/codeql-action from 3.29.2 to 3.29.5

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.29.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/181d5eefc20863364f96762470ba6f862bdef56b...51f77329afa6477de8c49fc9c7046c15b9a4e79d)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agobuild(deps): bump meson from 1.8.2 to 1.8.3 in /.github/workflows
dependabot[bot] [Fri, 1 Aug 2025 09:27:45 +0000 (09:27 +0000)] 
build(deps): bump meson from 1.8.2 to 1.8.3 in /.github/workflows

Bumps [meson](https://github.com/mesonbuild/meson) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/1.8.2...1.8.3)

---
updated-dependencies:
- dependency-name: meson
  dependency-version: 1.8.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agobuild(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.2
dependabot[bot] [Fri, 1 Aug 2025 09:18:19 +0000 (09:18 +0000)] 
build(deps): bump ossf/scorecard-action from 2.4.1 to 2.4.2

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.1 to 2.4.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/f49aabe0b5af0936a0987cfb85d86b75731b0186...05b42c624433fc40578a4040d5cf5e36ddca8cde)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-version: 2.4.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
3 months agosd-bus/bus-track: use install_callback in sd_bus_track_add_name()
Michal Sekletar [Thu, 31 Jul 2025 16:26:09 +0000 (18:26 +0200)] 
sd-bus/bus-track: use install_callback in sd_bus_track_add_name()

Previously we didn't provide any install_callback to
sd_bus_add_match_async() so in case AddMatch() method call timed out we
destroyed the bus connection. This seems overly aggressive and simply
updating the sd_bus_track object accordingly should be enough.

Follow-up for 37ce3fd2b7dd8f81f6f4bca2003961a92b2963dc.

Fixes #32381

3 months agobpf-dlopen: degrade log_level to LOG_DEBUG in initrd
Christian Hesse [Fri, 1 Aug 2025 14:56:25 +0000 (16:56 +0200)] 
bpf-dlopen: degrade log_level to LOG_DEBUG in initrd

That's what it used to behave before
4d2b9abbe11131d25aea4966a9c25a06703c6183.

3 months agomkosi: update mkosi commit reference to 655baf24474a6f0732ec1b82a71c2f6fe4eeeb49
Yu Watanabe [Fri, 1 Aug 2025 11:18:41 +0000 (20:18 +0900)] 
mkosi: update mkosi commit reference to 655baf24474a6f0732ec1b82a71c2f6fe4eeeb49

655baf2447 mkosi-initrd: move udev rules files for dm and md
dec7c3e754 mkosi-vm: Drop tpm_tis change
021e3af926 shim: fix log message of installed binary
07c24a7d42 mkosi-initrd/vm: ensure TPM2 core modules are installed in the initrd

3 months agoCorrect order for implied time & date specifications.
Graham Clinch [Fri, 1 Aug 2025 11:16:08 +0000 (12:16 +0100)] 
Correct order for implied time & date specifications.

The text now reads as:
[if] time specification is omitted, 00:00:00 is implied
[if] date specification is omitted, *-*-* is implied

3 months agovirt: Actually use DMI detection on RISC-V as well
Fabian Vogt [Fri, 1 Aug 2025 08:59:09 +0000 (10:59 +0200)] 
virt: Actually use DMI detection on RISC-V as well

When booting Linux with ACPI in QEMU, the device tree is not used and
the DT based detection will not work. DMI values are accurate though
and indicate QEMU.

While detect_vm_dmi_vendor() was enabled for RISC-V in a previous commit,
it missed detect_vm_dmi(), so it was never actually used. Fix that.

Signed-off-by: Fabian Vogt <fvogt@suse.de>
3 months agoTEST-13-NSPAWN: wait for a few seconds after markers found
Yu Watanabe [Thu, 31 Jul 2025 23:29:19 +0000 (08:29 +0900)] 
TEST-13-NSPAWN: wait for a few seconds after markers found

Otherwise, the scope that the nspawn container belonging to may be
removed before the grandchild process of the machined exits and it may
be SIGKILLed.
```
[  100.829613] systemd-machined[678]: Successfully forked off '(sd-bindmnt)' as PID 2962.
[  100.833366] systemd-nspawn[2953]: Inner child finished, invoking payload.
[  100.836111] (sd-bindmnt)[2962]: Skipping PR_SET_MM, as we don't have privileges.
[  100.836401] (sd-bindmnt)[2962]: Successfully forked off '(sd-bindmnt-inner)' as PID 2964.
[  100.846498] (sd-bindmnt)[2962]: (sd-bindmnt-inner) terminated by signal KILL.
[  100.848846] systemd[1]: machine-TEST\x2d13\x2dNSPAWN.machinectl\x2dbind.7ye.scope: cgroup is empty
[  100.849303] systemd[1]: machine-TEST\x2d13\x2dNSPAWN.machinectl\x2dbind.7ye.scope: Deactivated successfully.
[  100.849317] systemd[1]: machine-TEST\x2d13\x2dNSPAWN.machinectl\x2dbind.7ye.scope: Changed running -> dead
[  100.849752] systemd[1]: machine-TEST\x2d13\x2dNSPAWN.machinectl\x2dbind.7ye.scope: Consumed 91ms CPU time, 1.3M memory peak.
[  100.850399] systemd-machined[678]: (sd-bindmnt) failed with exit status 1.
[  100.850414] systemd-machined[678]: Child failed.
[  100.854574] systemd-machined[678]: Failed to mount /tmp/marker-varlink on /tmp/marker-varlink in the namespace of machine 'TEST-13-NSPAWN.machinectl-bind.7ye': Protocol error
```

Hopefully fixes #38434.

3 months agobasic: do not use PROJECT_FILE in one more generated file
Yu Watanabe [Fri, 1 Aug 2025 04:37:11 +0000 (13:37 +0900)] 
basic: do not use PROJECT_FILE in one more generated file

Fixes the following build warning:
```
In file included from ../../../home/runner/work/systemd/systemd/src/basic/assert-util.h:4,
                 from ../../../home/runner/work/systemd/systemd/src/basic/forward.h:17,
                 from ../../../home/runner/work/systemd/systemd/src/basic/filesystems.h:4,
                 from src/basic/filesystem-sets.c:2:
src/basic/filesystem-sets.c: In function ‘fs_in_group’:
../../../home/runner/work/systemd/systemd/src/fundamental/assert-fundamental.h:76:9: warning: array subscript 42 is above array bounds of ‘const char[28]’ [-Warray-bounds=]
   76 |         log_assert_failed_unreachable(PROJECT_FILE, __LINE__, __func__)
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/basic/filesystem-sets.c:559:18: note: in expansion of macro ‘assert_not_reached’
  559 |         default: assert_not_reached();
      |                  ^~~~~~~~~~~~~~~~~~
```

Follow-up for aca4353ab2b928e669e1b649a9f6987df1efb084.
Similar to fc4a9c9ce6eebbc472fc2947ae371f5925011545.

3 months agocg: get attribute for requested controller in cg_is_empty
Luca Boccassi [Thu, 31 Jul 2025 21:05:57 +0000 (22:05 +0100)] 
cg: get attribute for requested controller in cg_is_empty

This was changed SYSTEMD_CGROUP_CONTROLLER instead of the provided
parameter, which broke sd-cgls. Change it back.

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

Follow-up for c3f900770d0cff0cdf89751b614397b5e226194a

3 months agoudev/node: fix issue in removing device node symlink (#38419)
Luca Boccassi [Thu, 31 Jul 2025 22:20:05 +0000 (23:20 +0100)] 
udev/node: fix issue in removing device node symlink (#38419)

Fixes #37823.

3 months agojournald: add debug logs around offlining/archiving/rotating/varlink operations
Luca Boccassi [Thu, 31 Jul 2025 12:23:59 +0000 (13:23 +0100)] 
journald: add debug logs around offlining/archiving/rotating/varlink operations

It is not easy to understand what happens to a journal file
even with debug logs enabled. Add more dbg messages around operations
started by users to make it possible to follow the flow of operations.

3 months agotest: run test-journal-append binary with info level logging
Luca Boccassi [Thu, 31 Jul 2025 15:30:09 +0000 (16:30 +0100)] 
test: run test-journal-append binary with info level logging

It is ran thousands of times so the logs are overwhelming otherwise

3 months agohwdb: disable Asus ROG keyboards sending poweroff
RocketDev [Thu, 31 Jul 2025 17:31:11 +0000 (01:31 +0800)] 
hwdb: disable Asus ROG keyboards sending poweroff

Asus ROG keyboards seems to send power off key code when keyboard wake
up. Reserve the key codes could suppress this problem.

Devices added: ROG Falchion & ROG Scope

Based on the work by Jon Nettleton:
https://gist.github.com/jnettlet/afb20a048b8720f3b4eb8506d8b05643

3 months agohwdb: several cleanups
Yu Watanabe [Thu, 31 Jul 2025 20:08:06 +0000 (05:08 +0900)] 
hwdb: several cleanups

- drop trailing spaces,
- replace tabs with spaces,
- align comments.

3 months agoTEST-64-UDEV-STORAGE: add stress tests for creating/removing device node symlinks 38419/head
Yu Watanabe [Wed, 30 Jul 2025 12:44:04 +0000 (21:44 +0900)] 
TEST-64-UDEV-STORAGE: add stress tests for creating/removing device node symlinks

For issue #37823.

3 months agoTEST-64-UDEV-STORAGE: several cleanups
Yu Watanabe [Wed, 30 Jul 2025 12:43:06 +0000 (21:43 +0900)] 
TEST-64-UDEV-STORAGE: several cleanups

- drop unused variables,
- adjust number of partitions, interations, and timeout,
- clear partitions on each test case finished,
- check if unnecessary devlinks are removed,
- several coding style cleanups.

3 months agoTEST-64-UDEV-STORAGE: several fixlets for check_device_units()
Yu Watanabe [Thu, 31 Jul 2025 18:35:55 +0000 (03:35 +0900)] 
TEST-64-UDEV-STORAGE: several fixlets for check_device_units()

To suppress the following warnings in case check_device_unit() failed e.g.
when the device is already removed:
```
sed: couldn't write 130 items to stdout: Broken pipe
awk: write failure (Broken pipe)
awk: close failed on file "/dev/stdout" (Broken pipe)
```

3 months agoudev/node: check the target device node of devlink on removal
Yu Watanabe [Thu, 31 Jul 2025 17:06:08 +0000 (02:06 +0900)] 
udev/node: check the target device node of devlink on removal

If the removal of the devlink is requested due to this is a 'remove' event,
it is trivial that the devlink will not be owned by this device anymore.
Let's read the devlink and if it points to our device node, then we need
to update the devlink. If it points to another device node, then it is already
owned by another device, hence we should not touch it and keep it as is.

Fixes #37823.

3 months agoudev/node: split out link_search_and_update() and reduce indentation
Yu Watanabe [Thu, 31 Jul 2025 11:18:54 +0000 (20:18 +0900)] 
udev/node: split out link_search_and_update() and reduce indentation

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

3 months agojournal-gatewayd: fix busy loop when following way beyond journal end
Jan Čermák [Wed, 30 Jul 2025 17:18:13 +0000 (19:18 +0200)] 
journal-gatewayd: fix busy loop when following way beyond journal end

Fix regression introduced in a7bfb9f76b96888d60b4f287f29dcbf758ba34c0,
where busy loop can be started with a request for following logs with a
range header set with num_skip value pointing beyond the end of the
journal. In that case the reader callback returns 0 and is called
immediately again, usually causing an endless loop that is not recovered
even when new journal events are added.

The bug does not occur if num_skip is not set - in that case if no
journal entries matching the filters are added, the tight loop is
avoided by the sd_journal_wait().

To fix the issue, when no matching journal events are available, set a
flag and reuse the backoff mechanism using the sd_journal_wait().

Link: https://github.com/home-assistant/operating-system/issues/4190
3 months agoukify: fix hwids section reproducibility
Luca Boccassi [Wed, 30 Jul 2025 23:04:33 +0000 (00:04 +0100)] 
ukify: fix hwids section reproducibility

When there are multiple json files the glob list output is
not stable. Sort it before use.

Follow-up for 0333b9d5892983efc690d444fb8783624a1ef476

3 months agotest: send trailing newlines in notify messages in TEST-50-DISSECT
Luca Boccassi [Wed, 30 Jul 2025 17:53:09 +0000 (18:53 +0100)] 
test: send trailing newlines in notify messages in TEST-50-DISSECT

It seems the failing test in https://github.com/systemd/systemd/issues/37626
is due to MONOTONIC_USEC= being somehow lost. Add a trailing newline when
sending messages with socat, hopefully ensuring it is delivered and read.

3 months agoDouble journal field hash table size (#38416)
Yu Watanabe [Wed, 30 Jul 2025 20:43:21 +0000 (05:43 +0900)] 
Double journal field hash table size (#38416)

3 months agonetwork: add new DHCPv6 message types and options
ssoss [Wed, 30 Jul 2025 15:42:45 +0000 (10:42 -0500)] 
network: add new DHCPv6 message types and options

Gives enum definitions for the DHCPv6 options from RFC9527 and RFC 9686
and the new message types defined in RFC 9686.

3 months agoresolve: bump *_SEARCH_DOMAIN_MAX to 1024
Yu Watanabe [Wed, 30 Jul 2025 11:57:56 +0000 (20:57 +0900)] 
resolve: bump *_SEARCH_DOMAIN_MAX to 1024

As prompted by #38393, search domains may be large when a complicated
network setting is used, especially when VPN is used. Let's bump the
limit to 1024.

Note, this does not bump the maximum number of DNS servers, as setting
thousands of DNS servers is spurious and mostly meaningless. Let's keep
the maximum for a while until someone requests to also bump them.

Continuation of b950ee06e647d753db2047c1bb5345c94391be3e.

Closes #38393.

3 months agotest: set -x in TEST-50-DISSECT test unit
Luca Boccassi [Wed, 30 Jul 2025 15:26:07 +0000 (16:26 +0100)] 
test: set -x in TEST-50-DISSECT test unit

Need to see what is actually being written down socat
to debug https://github.com/systemd/systemd/issues/37626

3 months agotest: several cleanups for DeferReactivation=
Yu Watanabe [Wed, 30 Jul 2025 00:51:55 +0000 (09:51 +0900)] 
test: several cleanups for DeferReactivation=

- move to TEST-07-PID1, as it is a timer setting,
- rename the timer and service, to emphasize they are for testing
  DeferReactivation=,
- use timeout command to wait for the timer being triggered several times,
- stop the timer when not necessary,
- accept 9 seconds as delta, as there are fluctuations.

Fixes the following failure:
```
TEST-74-AUX-UTILS.sh[422]: + last=
TEST-74-AUX-UTILS.sh[422]: + read -r time
TEST-74-AUX-UTILS.sh[422]: + '[' -n '' ']'
TEST-74-AUX-UTILS.sh[422]: + last=1753779616
TEST-74-AUX-UTILS.sh[422]: + read -r time
TEST-74-AUX-UTILS.sh[422]: + '[' -n 1753779616 ']'
TEST-74-AUX-UTILS.sh[422]: + delta=9
TEST-74-AUX-UTILS.sh[422]: + '[' 9 -lt 10 ']'
TEST-74-AUX-UTILS.sh[422]: + echo 'Timer fired too early: 9 < 10'
```

Fixes #38403.

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.