]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
11 months agotest/README: Environment= setting for mkosi should be in [Build] section
Yu Watanabe [Sun, 15 Dec 2024 17:02:30 +0000 (02:02 +0900)] 
test/README: Environment= setting for mkosi should be in [Build] section

Otherwise, we get the following warning:

mkosi.local.conf: Setting Environment should be configured in [Build], not [Content].

(cherry picked from commit 78ef3959474a760679e50eb57b52563cb6f9b66d)

11 months agoTEST-35-LOGIN: check only tty session
Yu Watanabe [Sun, 15 Dec 2024 08:42:10 +0000 (17:42 +0900)] 
TEST-35-LOGIN: check only tty session

For some reasons, another session logind-test-user may be started.
===
Dec 13 07:04:16 systemd-logind[2140]: Got message type=method_call ... member=CreateSessionWithPIDFD ...
(snip)
Dec 13 07:04:16 systemd-logind[2140]: New session 15 of user logind-test-user.
Dec 13 07:04:16 systemd-logind[2140]: VT changed to 2
Dec 13 07:04:16 systemd-logind[2140]: rfkill: Found udev node /dev/rfkill for seat seat0
Dec 13 07:04:16 systemd-logind[2140]: udmabuf: Found udev node /dev/udmabuf for seat seat0
Dec 13 07:04:16 systemd-logind[2140]: Found static node /dev/snd/timer for seat seat0
Dec 13 07:04:16 systemd-logind[2140]: Found static node /dev/snd/seq for seat seat0
Dec 13 07:04:16 systemd-logind[2140]: Changing ACLs at /dev/snd/timer for seat seat0 (uid 0→4712 add)
Dec 13 07:04:16 systemd-logind[2140]: Changing ACLs at /dev/rfkill for seat seat0 (uid 0→4712 add)
Dec 13 07:04:16 systemd-logind[2140]: Changing ACLs at /dev/udmabuf for seat seat0 (uid 0→4712 add)
Dec 13 07:04:16 systemd-logind[2140]: Changing ACLs at /dev/snd/seq for seat seat0 (uid 0→4712 add)
Dec 13 07:04:16 systemd[1]: user-4712.slice: Changed dead -> active
Dec 13 07:04:16 systemd[1]: user-4712.slice: Job 5951 user-4712.slice/start finished, result=done
Dec 13 07:04:16 systemd[1]: Created slice user-4712.slice.
Dec 13 07:04:16 systemd-logind[2140]: Electing new display for user logind-test-user
Dec 13 07:04:16 systemd-logind[2140]: Choosing session 15 in preference to -
(snip)
Dec 13 07:04:16 systemd-logind[2140]: Got message type=method_call ... member=CreateSessionWithPIDFD ...
(snip)
Dec 13 07:04:16 systemd-logind[2140]: New session 16 of user logind-test-user.
Dec 13 07:04:16 systemd-logind[2140]: Electing new display for user logind-test-user
Dec 13 07:04:16 systemd-logind[2140]: Ignoring session 16
===
Let's track only session for the user with tty, which we explicitly created.

Fixes #35597.

(cherry picked from commit 26f65dc0c76f59eb3896014346652885c493ae71)

11 months agonetwork: don't warn with no NSID assigned
Ronan Pigott [Sat, 14 Dec 2024 21:39:26 +0000 (14:39 -0700)] 
network: don't warn with no NSID assigned

This is nothing interesting to warn about. Also use the symbolic
constant name when testing for this condition.

(cherry picked from commit e803e95760be87588533f9affd76db6ad0b5fac8)

11 months agotest-time-util: fix truncation of usec to sec
Yu Watanabe [Sat, 14 Dec 2024 07:49:54 +0000 (16:49 +0900)] 
test-time-util: fix truncation of usec to sec

Also
- use ASSERT_XYZ() macros,
- log tzname[] on failure.

(cherry picked from commit 3f1d499964abb6a4c0141d7ea8f852829880adff)

11 months agomkosi: fix section for WithNetwork=
Luca Boccassi [Sat, 14 Dec 2024 10:57:34 +0000 (10:57 +0000)] 
mkosi: fix section for WithNetwork=

/tmp/autopkgtest.L6NPL0/build.doZ/src/mkosi.conf.d/10-debian-ubuntu/mkosi.conf.d/network.conf: Setting WithNetwork should be configured in [Build], not [Content]

(cherry picked from commit 301c159ce526933d048b9fd02ad7e2adfb4a6c58)

11 months agoRevert "semaphore: skip some tests"
Luca Boccassi [Fri, 13 Dec 2024 23:43:28 +0000 (23:43 +0000)] 
Revert "semaphore: skip some tests"

This reverts commit e19cae12ff2e832ce7d79aa483e1aa27ed0ea1f4.

(cherry picked from commit 7406e0a3afafc1e1c994a88a4e988e94177e5550)

11 months agosemaphore: bump timeout
Luca Boccassi [Fri, 13 Dec 2024 22:08:27 +0000 (22:08 +0000)] 
semaphore: bump timeout

When semaphore is overloaded tests can take more than 1hr, bump
timeout

(cherry picked from commit 1855064d4eb95abe6909a93f72bee46658dad36b)

11 months agotmpfiles: reduce quoting in warning message
Zbigniew Jędrzejewski-Szmek [Thu, 7 Nov 2024 14:45:24 +0000 (15:45 +0100)] 
tmpfiles: reduce quoting in warning message

We printed:
systemd-tmpfiles[705]: /usr/lib/tmpfiles.d/20-systemd-shell-extra.conf:10: Unknown modifiers in command 'L$'.
systemd-tmpfiles[705]: /usr/lib/tmpfiles.d/systemd-network.conf:10: Unknown modifiers in command 'd$'.
systemd-tmpfiles[705]: /usr/lib/tmpfiles.d/systemd-network.conf:11: Unknown modifiers in command 'd$'.
...

There's a lot of additional characters here make the message harder to parse. We know
that the command is a word without any whitespace, so quoting isn't really necessary.

Change this to:
... unknown modifiers in command: L$

(cherry picked from commit 390bab53923eea822ac525d0e4aa4b7f86d8cd92)

11 months agologind: let system-wide idle begin at the time logind was initialized
Florian Schmaus [Sat, 16 Nov 2024 09:29:35 +0000 (10:29 +0100)] 
logind: let system-wide idle begin at the time logind was initialized

Initialize the start of the system-wide idle time with the time logind was
initialized and not with the start of the Unix epoch. This means that systemd
will not repport a unreasonable long idle time (around 54 years at the time of
writing this), especially at in the early boot, while no login manager session,
e.g,. gdm, had a chance to provide a more accurate start of the idle period.

Fixes #35163

(cherry picked from commit 718b31138b9a93f262259f297ad6b521454decc6)

11 months agoshell-completion: add smbios11 verb to systemd-analyze
Luca Boccassi [Thu, 12 Dec 2024 12:41:45 +0000 (12:41 +0000)] 
shell-completion: add smbios11 verb to systemd-analyze

Follow-up for 8c5045f9b2681774e8731dc0d142c207b61aedf6

(cherry picked from commit e7fce6a370894de3a3ded32910e0a4b251d805df)

11 months agomkosi: update debian commit reference
Luca Boccassi [Thu, 12 Dec 2024 16:46:11 +0000 (16:46 +0000)] 
mkosi: update debian commit reference

e8b7c9a4dd Install 81-net-bridge.rules
50d2997a07 Install systemd-creds bash completion
ff0c42823c test: fix flaky boot-and-services test
2a19dee4ba test: fix flaky boot-and-services test
a15a0bfe60 Update changelog for 257-2 release
c24eafcb7e Backport patches to fix test failures
29840f9b68 udev: install dmi_memory_id and its rules on riscv64
44893bdb32 Update changelog for 257-1 release
7f71d995fb Update symbols file for v257
2dd2b80499 Update upstream source from tag 'upstream/257'
51a3271a85 Update changelog for 257~rc3-1 release
8e687227c5 Update symbols for 257~rc3
c9bae527d6 Drop patches, merged upstream
e8cf329870 Update upstream source from tag 'upstream/257_rc3'
794457516d autopkgtest: fix one more tzdata dependency
16bb143da1 Bump version in tzdata dependency due to p-u upload
f2ddf70604 sysctl: Add file trigger on /usr/lib/sysctl.d to restart systemd-sysctl
79260cb0f4 Increase minimum sections in stub PE header on arm64/armhf/riscv64 to 500
ed3af24635 systemd-ukfy: recommend systemd-boot-efi for the stub

(cherry picked from commit 8d20606eec236232fb003594b3e6c88131744f6b)

11 months agotest-loop-block: return -77 on skip in more places
Luca Boccassi [Wed, 13 Nov 2024 14:20:34 +0000 (14:20 +0000)] 
test-loop-block: return -77 on skip in more places

(cherry picked from commit 81e0693465402d2e72cb3ba1b28e25e3c4c0206a)

11 months agobattery-check: parse options before checking for kernel command line
Luca Boccassi [Fri, 8 Nov 2024 12:23:37 +0000 (12:23 +0000)] 
battery-check: parse options before checking for kernel command line

Otherwise --help/--version/etc which exit immediately will do pointless work

(cherry picked from commit 60d23b7f4ae26d934e5748d30bb7ae956f3ad83d)

11 months agounits: use PrivateTmp=disconnected instead of 'yes' if DefaultDependencies=no
Luca Boccassi [Thu, 12 Dec 2024 11:48:52 +0000 (11:48 +0000)] 
units: use PrivateTmp=disconnected instead of 'yes' if DefaultDependencies=no

Avoids subtle race conditions such as the one described at
#35582.

Fixes #35582

(cherry picked from commit 1ca315be0097bccc9ff55e09ac339a48fdb9a040)

11 months agomkosi: Fix opensuse build
Daan De Meyer [Thu, 12 Dec 2024 11:58:42 +0000 (11:58 +0000)] 
mkosi: Fix opensuse build

The opensuse spec still looks for README.testsuite so hack it to look
for README.md instead now that we changed the name in the repo.

(cherry picked from commit 3aa725732161f11788a51405f9c5204190e7a0e9)

11 months agoexec-util: allow to invoke polkit/ask-password agent even if STDIN is not a tty
Yu Watanabe [Sun, 1 Dec 2024 08:36:33 +0000 (17:36 +0900)] 
exec-util: allow to invoke polkit/ask-password agent even if STDIN is not a tty

Closes #35018.

(cherry picked from commit 0f81c8406f0f47175c699715e84de8291057033c)

11 months agomanager: add list of subscribers to dump info
Ronan Pigott [Thu, 28 Nov 2024 19:52:45 +0000 (12:52 -0700)] 
manager: add list of subscribers to dump info

This is handy for debugging.

(cherry picked from commit 91713841491d0d4775566ed59f621f0f9a2413b5)

11 months agodbus: log disconnect on api and system busses
Ronan Pigott [Thu, 28 Nov 2024 19:51:38 +0000 (12:51 -0700)] 
dbus: log disconnect on api and system busses

This is an interesting event. Let's log about it.

(cherry picked from commit 11ee1bab60abde67cd0edc470c93c1afe10d975d)

11 months agojournalctl: honor --quiet with --setup-keys
Yu Watanabe [Tue, 10 Dec 2024 00:40:43 +0000 (09:40 +0900)] 
journalctl: honor --quiet with --setup-keys

Closes #35504.

(cherry picked from commit a5b2973850e5952b9dffdfa3f6a0ef486957cb17)

11 months agomeson.version: change to 257.1
Luca Boccassi [Thu, 12 Dec 2024 13:11:51 +0000 (13:11 +0000)] 
meson.version: change to 257.1

This is used to detect in various CIs that we are on a stable branch,
so set the new version early, otherwise some scripts will think it's
running in main

11 months agoREADME: drop CentOS CI badges
Yu Watanabe [Thu, 12 Dec 2024 02:58:24 +0000 (11:58 +0900)] 
README: drop CentOS CI badges

CentOS CIs are disabled after ead814a0b0f64c572282b9e27a0a995893f10cf0.

(cherry picked from commit 1fe583861feb5796fa0be937dc7f4c2ce07bcde5)

11 months agotest: add more coverage for extensions and verity
Luca Boccassi [Thu, 12 Dec 2024 00:50:45 +0000 (00:50 +0000)] 
test: add more coverage for extensions and verity

(cherry picked from commit c7fcb08324774c62bd2a786b03a7104a33049db6)

11 months agocore: fix loading verity settings for MountImages=
Luca Boccassi [Thu, 12 Dec 2024 00:24:05 +0000 (00:24 +0000)] 
core: fix loading verity settings for MountImages=

The MountEntry logic was refactored to store the verity
settings, and updated for ExtensionImages=, but not for
MountImages=.

Follow-up for a1a40297dbfa5bcd926d1a19320deb73c033c6f5

(cherry picked from commit 59a83e11887e13a35d88fd7dc71a13b450433715)

11 months agoshell completion: add systemd-creds
Luca Boccassi [Tue, 10 Dec 2024 22:19:09 +0000 (22:19 +0000)] 
shell completion: add systemd-creds

(cherry picked from commit 783f794e89996ae7f2ae1872d65c515a672437fa)

11 months agosemaphore: skip some tests
Luca Boccassi [Wed, 11 Dec 2024 20:44:25 +0000 (20:44 +0000)] 
semaphore: skip some tests

semaphore CI runs are always very close to the limit of 1hr, and often
time out when it's particularly oversubscribed.
Skip some low-value test cases to shorten the runtime.

(cherry picked from commit e19cae12ff2e832ce7d79aa483e1aa27ed0ea1f4)

11 months agosystemd-cryptenroll.xml: fix typo
Carlo Teubner [Wed, 11 Dec 2024 22:40:07 +0000 (22:40 +0000)] 
systemd-cryptenroll.xml: fix typo

(cherry picked from commit dfbd4d8bc5f18746051929e32f772078d6782e90)

11 months agoman: update example in systemd-measure.xml (#35506)
cvlc12 [Wed, 11 Dec 2024 21:09:11 +0000 (22:09 +0100)] 
man: update example in systemd-measure.xml (#35506)

In the example from systemd-measure(1), do not bind to PCR 7 in
addition to the PCR policy.

As long as this is still done by default, see #35280.

(cherry picked from commit 693038fce47a819c5eebeb4fce39c9ac991acf84)

11 months agotest-bpf-restrict-fs: Migrate to new assertion macros
Daan De Meyer [Wed, 11 Dec 2024 12:44:26 +0000 (12:44 +0000)] 
test-bpf-restrict-fs: Migrate to new assertion macros

(cherry picked from commit 1c658c639db1c902266735754f2e2883fe67d1d9)

11 months agoFixing VLAN ranges in man systemd.network.
andrejpodzimek [Wed, 11 Dec 2024 12:46:43 +0000 (12:46 +0000)] 
Fixing VLAN ranges in man systemd.network.

Otherwise it doesn't hold that VLANs 100-400 are allowed (because 201-299 are disallowed).

(cherry picked from commit ae2f3af63962ba6e2f67cfce07c9fee61722e30e)

11 months agoprofile.d: don't bail if $SHELL_* variables are unset
Tobias Klauser [Wed, 11 Dec 2024 14:10:39 +0000 (15:10 +0100)] 
profile.d: don't bail if $SHELL_* variables are unset

If - for whatever reason - a script uses set -u (nounset) and includes
/etc/profile.d/70-systemd-shell-extra.sh (e.g. transitively via
/etc/profile) the script would fail with:

    /etc/profile.d/70-systemd-shell-extra.sh: line 15: SHELL_PROMPT_PREFIX: unbound variable

For example:

    $ cat > foo.sh <<EOF
    #!/bin/sh
    set -u

    source /etc/profile
    EOF
    $ chmod 700 foo.sh
    $ ./foo.sh
    /etc/profile.d/70-systemd-shell-extra.sh: line 15: SHELL_PROMPT_PREFIX: unbound variable

Fix this by using shell parameter substitution[^1] (which is a POSIX
shell concept) to set the $SHELL_* variables to the empty string if
undefined.

[^1]: https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/V3_chap02.html

(cherry picked from commit 12e33d332b3f8754f4d5d0d21d5d3f0de8adc54c)

11 months agoman: document unprivileged is not for reading properties
Katariina Lounento [Mon, 9 Dec 2024 14:09:13 +0000 (16:09 +0200)] 
man: document unprivileged is not for reading properties

Document the fact that read-only properties may not have the flag
SD_BUS_VTABLE_UNPRIVILEGED as that is not obvious especially given the
flag is accepted for writable properties.

Based on the check in `add_object_vtable_internal` called by
`sd_bus_add_object_vtable` (as of the current tip of the main branch
f7f5ba019206cacd486b0892fec76f70f525e04d):

    case _SD_BUS_VTABLE_PROPERTY: {
            [...]
            if ([...] ||
                [...]
                (v->flags & SD_BUS_VTABLE_UNPRIVILEGED && v->type == _SD_BUS_VTABLE_PROPERTY)) {
                    r = -EINVAL;
                    goto fail;
            }

(where `_SD_BUS_VTABLE_PROPERTY` means read-only property whereas
`_SD_BUS_VTABLE_WRITABLE_PROPERTY` maps to writable property).

This was implemented in the commit
adacb9575a09981fcf11279f2f661e3fc21e58ff ("bus: introduce "trusted" bus
concept and encode access control in object vtables") where
`SD_BUS_VTABLE_UNPRIVILEGED` was introduced:

    Writable properties are also subject to SD_BUS_VTABLE_UNPRIVILEGED
    and SD_BUS_VTABLE_CAPABILITY() for controlling write access to them.
    Note however that read access is unrestricted, as PropertiesChanged
    messages might send out the values anyway as an unrestricted
    broadcast.

(cherry picked from commit 3ca09aa4dd57327989eceb1298754601046ac041)

11 months agomkosi: use inetutils package instead of hostname for Archlinux
Luca Boccassi [Wed, 11 Dec 2024 11:48:09 +0000 (11:48 +0000)] 
mkosi: use inetutils package instead of hostname for Archlinux

In Arch the hostname binary is in a different package

Follow-up for cf48bde7aea52b18ac3fa218d3f60fd3d533ef66

(cherry picked from commit 446d737cba3652a9f3dbd07cea9cb4082350b241)

11 months agotest-fd-util: compare FDs to /bin/sh instead of /dev/null
Luca Boccassi [Wed, 11 Dec 2024 13:40:10 +0000 (13:40 +0000)] 
test-fd-util: compare FDs to /bin/sh instead of /dev/null

/dev/null is a character device, so same_fd() in the fallback path
that compares fstat will fail, as that bails out if the fd refers
to a char device. This happens on kernels without F_DUPFD_QUERY and
without kcmp.

/* test_same_fd */
Assertion 'same_fd(d, e) > 0' failed at src/test/test-fd-util.c:111, function test_same_fd(). Aborting.

Fixes #35552

(cherry picked from commit 3b32d333e88f2a66651d58e32e01599fa84c3d19)

11 months agotest-fd-util: skip test when lacking privileges to create a new namespace
Luca Boccassi [Wed, 11 Dec 2024 12:01:18 +0000 (12:01 +0000)] 
test-fd-util: skip test when lacking privileges to create a new namespace

To reproduce, as an unprivileged user start a docker container and build
and run the unit tests inside it:

$ docker run --rm -ti debian:bookworm bash
...
/* test_close_all_fds */
Successfully forked off '(caf-plain)' as PID 10496.
Skipping PR_SET_MM, as we don't have privileges.
(caf-plain) succeeded.
Failed to fork off '(caf-noproc)': Operation not permitted
Assertion 'r >= 0' failed at src/test/test-fd-util.c:392, function test_close_all_fds(). Aborting.

Partially fixes #35552

(cherry picked from commit 630a2e7ee195ca96e102acac8df67a278a879124)

11 months agotest-capability: CAP_LINUX_IMMUTABLE is not available in unprivileged containers
Luca Boccassi [Wed, 11 Dec 2024 12:10:13 +0000 (12:10 +0000)] 
test-capability: CAP_LINUX_IMMUTABLE is not available in unprivileged containers

have ambient caps: yes
Capabilities:cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_net_bind_service,cap_net_raw,cap_sys_chroot,cap_mknod,cap_audit_write,cap_setfcap=ep
Failed to drop auxiliary groups list: Operation not permitted
Failed to change group ID: Operation not permitted
Capabilities:cap_dac_override,cap_net_raw=ep
Capabilities:cap_dac_override=ep
Successfully forked off '(getambient)' as PID 12505.
Skipping PR_SET_MM, as we don't have privileges.
Ambient capability cap_linux_immutable requested but missing from bounding set, suppressing automatically.
Assertion 'x < 0 || FLAGS_SET(c, UINT64_C(1) << CAP_LINUX_IMMUTABLE)' failed at src/test/test-capability.c:273, function test_capability_get_ambient(). Aborting.
(getambient) terminated by signal ABRT.
src/test/test-capability.c:258: Assertion failed: expected "r" to succeed, but got error: Protocol error

Partially fixes #35552

(cherry picked from commit 058a07635f3ff70cc99943dcf4f2a079bc9c28b9)

11 months agotest: set nsec3-salt-length=8 in knot.conf
Nick Rosbrook [Tue, 10 Dec 2024 21:48:59 +0000 (16:48 -0500)] 
test: set nsec3-salt-length=8 in knot.conf

TEST-75-RESOLVED fails on Ubuntu autopkgtest due to this warning from
knot:

 notice: config, policy 'auto_rollover_nsec3' depends on default nsec3-salt-length=8, since version 3.5 the default becomes 0

Explicitly set nsec3-salt-length=8 to silence.

(cherry picked from commit 59e5108fb4e61957cb40bb15ac7966d085d13af2)

11 months agoanalyze: add missing --mask option to --help text
Lennart Poettering [Wed, 11 Dec 2024 09:31:58 +0000 (10:31 +0100)] 
analyze: add missing --mask option to --help text

Follow-up for: 3e7a029c2856e7814b930443cc2d4fb089377592

(cherry picked from commit 4d09f976f6c10729619c7f4c87dd121aa34d019b)

11 months agoanalyze: tab fix
Lennart Poettering [Wed, 11 Dec 2024 09:31:41 +0000 (10:31 +0100)] 
analyze: tab fix

(cherry picked from commit 7167bee6c672f9a0729631ba1f7459dd5e18f549)

11 months agoman/systemd-cryptenroll: sort --fido2-credential-algorithm after --fido2-device
Antonio Alvarez Feijoo [Wed, 11 Dec 2024 06:32:04 +0000 (07:32 +0100)] 
man/systemd-cryptenroll: sort --fido2-credential-algorithm after --fido2-device

And also fix a typo.

(cherry picked from commit 62b7b70bb78f85198509b3327cb29b83ed9218ec)

11 months agotest: also generate list of symbols from header files
Yu Watanabe [Thu, 12 Dec 2024 04:18:59 +0000 (13:18 +0900)] 
test: also generate list of symbols from header files

To make the generated tests able to detect issues like #35554.

(cherry picked from commit 0b39dc23ba2d8d3e99f5dc30c3da5d0f6baf10d7)

11 months agotest: modernize generate-sym-test.py
Yu Watanabe [Thu, 12 Dec 2024 01:01:48 +0000 (10:01 +0900)] 
test: modernize generate-sym-test.py

(cherry picked from commit 6e399ece1fd6dc8cbf5830c263a118b58d36acac)

11 months agosd-json,sd-varlink: drop unexported functions from public headers
Yu Watanabe [Thu, 12 Dec 2024 10:42:48 +0000 (19:42 +0900)] 
sd-json,sd-varlink: drop unexported functions from public headers

These functions are exported by e11f5aa7226253bf31b2ed61be8599bb213c1819
and 5fcabde35b8d2592e4ba3f4915839a54d2f246ba in upstream after v257.

Fixes #35554 in v257.

11 months agoCreate CNAME
Luca Boccassi [Tue, 10 Dec 2024 19:39:23 +0000 (19:39 +0000)] 
Create CNAME

11 months agoFinalize NEWS and meson.version for v257 v257
Luca Boccassi [Tue, 10 Dec 2024 19:22:47 +0000 (19:22 +0000)] 
Finalize NEWS and meson.version for v257

11 months agoChores for v257 (#35525)
Luca Boccassi [Tue, 10 Dec 2024 19:21:43 +0000 (19:21 +0000)] 
Chores for v257 (#35525)

11 months agocopy: do not try to copy zero size data
Yu Watanabe [Tue, 10 Dec 2024 15:47:26 +0000 (00:47 +0900)] 
copy: do not try to copy zero size data

Hopefully fixes the following sanitizer issue:
===
[ 3754.797377] systemd-journald[776]: ../src/src/shared/copy.c:463:37: runtime error: variable length array bound evaluates to non-positive value 0
[ 3755.101713] systemd-journald[776]: Received SIGTERM from PID 1 (systemd).
[ 3755.124580] systemd-journald[776]: Journal stopped
Found 1 sanitizer issues (0 internal, 0 asan, 0 ubsan, 0 msan).
===

11 months agoTEST-07-PID: wait for sleep command being executed by sd-executor
Yu Watanabe [Tue, 10 Dec 2024 15:28:45 +0000 (00:28 +0900)] 
TEST-07-PID: wait for sleep command being executed by sd-executor

Hopefully fixes #35528.

11 months agosd-varlink: add function to configure server object info (#35519)
Luca Boccassi [Tue, 10 Dec 2024 15:26:24 +0000 (15:26 +0000)] 
sd-varlink: add function to configure server object info (#35519)

11 months agoNEWS: update list of contributors 35525/head
Luca Boccassi [Tue, 10 Dec 2024 11:31:25 +0000 (11:31 +0000)] 
NEWS: update list of contributors

11 months agoUpdate hwdb
Luca Boccassi [Tue, 10 Dec 2024 11:27:41 +0000 (11:27 +0000)] 
Update hwdb

ninja -C build update-hwdb

11 months agotest: skip TEST-13-NSPAWN.nspawn/machined, TEST-86-MULTI-PROFILE-UKI and TEST-07...
Luca Boccassi [Tue, 10 Dec 2024 12:13:06 +0000 (12:13 +0000)] 
test: skip TEST-13-NSPAWN.nspawn/machined, TEST-86-MULTI-PROFILE-UKI and TEST-07-PID1.private-pids.sh

These new tests are flaky, so disable them temporarily, until after
the release, to avoid pushing out new flakiness to consumers. They
will be re-enabled immediately after.

11 months agotest: add TEST_SKIP_SUBTESTS/TEST_SKIP_TESTCASES
Luca Boccassi [Tue, 10 Dec 2024 11:56:04 +0000 (11:56 +0000)] 
test: add TEST_SKIP_SUBTESTS/TEST_SKIP_TESTCASES

Inverse of the TEST_MATCH_SUBTEST/TEST_MATCH_TESTCASE variables

11 months agoCryptenroll pager and tweaks (#35517)
Luca Boccassi [Tue, 10 Dec 2024 14:07:26 +0000 (14:07 +0000)] 
Cryptenroll pager and tweaks (#35517)

11 months agotest: use mkdir -p in TEST-25-IMPORT
Luca Boccassi [Tue, 10 Dec 2024 10:51:44 +0000 (10:51 +0000)] 
test: use mkdir -p in TEST-25-IMPORT

[   15.896174] TEST-25-IMPORT.sh[473]: + mkdir /var/tmp/scratch
[   15.902524] TEST-25-IMPORT.sh[519]: mkdir: cannot create directory ‘/var/tmp/scratch’: File exists

https://github.com/systemd/systemd/actions/runs/12248114409/job/34167155679?pr=35520

11 months agoUpdate syscall tables (#35520)
Zbigniew Jędrzejewski-Szmek [Tue, 10 Dec 2024 11:21:01 +0000 (12:21 +0100)] 
Update syscall tables (#35520)

11 months agohostnamectl: respect SYSTEMD_COLORS
Sebastian Gross [Tue, 10 Dec 2024 08:09:41 +0000 (09:09 +0100)] 
hostnamectl: respect SYSTEMD_COLORS

Instead of the wrapper functions the color defines where used directly.
This was especially a problem for ANSI_HIGHLIGHT_YELLOW which is not
legible at all for light themes such as solarized. The 16 color palette
fallback can be set to a sane yellow or orange on that matter but it was
not used though `SYSTEMD_COLORS=16` was set.

Use the proper wrapper functions and let the right color be selected the
way other components do it already.

11 months agocryptsetup: add debug message 35517/head
Zbigniew Jędrzejewski-Szmek [Mon, 9 Dec 2024 17:05:11 +0000 (18:05 +0100)] 
cryptsetup: add debug message

11 months agocryptenroll: show which devices support "hmac secret"
Zbigniew Jędrzejewski-Szmek [Mon, 9 Dec 2024 15:30:04 +0000 (16:30 +0100)] 
cryptenroll: show which devices support "hmac secret"

We'd silently skip devices which don't have the feature in the list.
This looked wrong esp. if no devices were suitable. Instead, list them
and show which ones are usable.

$ build/systemd-cryptenroll --fido2-device=list
PATH          MANUFACTURER PRODUCT                HMAC SECRET
/dev/hidraw7  Yubico       YubiKey OTP+FIDO+CCID  ✓
/dev/hidraw10 Yubico       Security Key by Yubico ✗
/dev/hidraw5  Yubico       Security Key by Yubico ✗
/dev/hidraw9  Yubico       Yubikey 4 OTP+U2F+CCID ✗

11 months agosd-varlink: modernize pointer style in function signatures 35519/head
Zbigniew Jędrzejewski-Szmek [Mon, 9 Dec 2024 19:54:08 +0000 (20:54 +0100)] 
sd-varlink: modernize pointer style in function signatures

11 months agovarious: set info on varlink server object
Zbigniew Jędrzejewski-Szmek [Mon, 9 Dec 2024 19:23:29 +0000 (20:23 +0100)] 
various: set info on varlink server object

The values that were previously hardcoded in sd-varlink.c are now defined
in new varlink_set_info_systemd() and that function is called everywhere
where we create a server.

11 months agosd-varlink: add sd_varlink_server_set_info
Zbigniew Jędrzejewski-Szmek [Mon, 9 Dec 2024 19:08:33 +0000 (20:08 +0100)] 
sd-varlink: add sd_varlink_server_set_info

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

As reported in the bug, the values were hardcoded for the systemd project.
https://varlink.org/Service lists vendor, product, version, url, and interfaces
as the mandatory parameters, so add an interface to set the first four. The
last field is set automatically based on the registered interfaces as before.

If the values are not filled in, we return empty strings. With NULL,
'varlinkctl info' would say:
  (string):1:25: Object field 'vendor' has wrong type null, expected string.

11 months agomkosi: several improvements for running with sanitizers (#35480)
Yu Watanabe [Tue, 10 Dec 2024 04:35:22 +0000 (13:35 +0900)] 
mkosi: several improvements for running with sanitizers (#35480)

11 months agoseccomp-util: add getxattrat and friends 35520/head
Yu Watanabe [Tue, 10 Dec 2024 02:16:40 +0000 (11:16 +0900)] 
seccomp-util: add getxattrat and friends

The new syscalls are added in kernel-6.13:
https://github.com/torvalds/linux/commit/6140be90ec70c39fa844741ca3cc807dd0866394

11 months agobasic: update syscall tables
Yu Watanabe [Tue, 10 Dec 2024 02:15:48 +0000 (11:15 +0900)] 
basic: update syscall tables

11 months agotest: use systemd-asan-env environment file at more places 35480/head
Yu Watanabe [Sat, 7 Dec 2024 19:01:48 +0000 (04:01 +0900)] 
test: use systemd-asan-env environment file at more places

11 months agotest-network: check status of networkd after everything cleared on tear down
Yu Watanabe [Thu, 5 Dec 2024 23:42:41 +0000 (08:42 +0900)] 
test-network: check status of networkd after everything cleared on tear down

Otherwise, if networkd is failed, e.g. .network files that triggered the
failure will remain, and the next test case will start with previous
.network files. So, most subsequent test will fail.

11 months agomkosi/sanitizers: add more ASAN options
Yu Watanabe [Thu, 5 Dec 2024 18:42:09 +0000 (03:42 +0900)] 
mkosi/sanitizers: add more ASAN options

This adds the following three options:
- detect_invalid_pointer_pairs=2
- handle_ioctl=1
- print_cmdline=1

Note, these options were used in the CentOS CI job.

11 months agotest: extract sanitizer reports from journal
Yu Watanabe [Sat, 7 Dec 2024 04:36:39 +0000 (13:36 +0900)] 
test: extract sanitizer reports from journal

11 months agomkosi: move drop-in config for sanitizers
Yu Watanabe [Sun, 8 Dec 2024 19:18:17 +0000 (04:18 +0900)] 
mkosi: move drop-in config for sanitizers

11 months agoRevert "test: tentatively disable SELinux tests"
Yu Watanabe [Sun, 8 Dec 2024 03:59:16 +0000 (12:59 +0900)] 
Revert "test: tentatively disable SELinux tests"

This reverts commit 261a3d191ed53498e7672ad4da5936a881866088.

11 months agohwdb: Add Chuwi MiniBook X trackpad fuzz
Greg Heartsfield [Mon, 9 Dec 2024 16:32:15 +0000 (10:32 -0600)] 
hwdb: Add Chuwi MiniBook X trackpad fuzz

This adds X/Y fuzz for the Chuwi MiniBook X trackpad.  There is
significant trackpad jitter without this setting applied.

11 months agomkosi: Use rawhide tools tree in CI
Daan De Meyer [Mon, 9 Dec 2024 16:00:24 +0000 (17:00 +0100)] 
mkosi: Use rawhide tools tree in CI

To build rawhide images we might need more recent tools from rawhide
itself. While Arch would generally be up-to-date enough as well, it
doesn't provide the selinux tools so we use Fedora Rawhide instead.

11 months agocryptenroll: advertise device autodetection and listing
Zbigniew Jędrzejewski-Szmek [Mon, 9 Dec 2024 15:15:49 +0000 (16:15 +0100)] 
cryptenroll: advertise device autodetection and listing

11 months agosystemd-cryptenroll: drop unnecessary {}
Zbigniew Jędrzejewski-Szmek [Mon, 9 Dec 2024 15:04:40 +0000 (16:04 +0100)] 
systemd-cryptenroll: drop unnecessary {}

11 months agosystemd-cryptenroll: use pager for --help, add --no-pager option
Zbigniew Jędrzejewski-Szmek [Mon, 9 Dec 2024 15:04:25 +0000 (16:04 +0100)] 
systemd-cryptenroll: use pager for --help, add --no-pager option

11 months agojournalctl: show coredumps again when --unit= is specified
Yu Watanabe [Fri, 6 Dec 2024 19:08:59 +0000 (04:08 +0900)] 
journalctl: show coredumps again when --unit= is specified

This is a revised version of cbd5f5d7d6d652d52a18170123f5d08baf7e9862,
which is reverted by 560412148fa62d779ea522d43960dd3acd44b261.

The filter condition for _UID= field was added by
fdcd37df3b97abc381c7b7a29b81cc013c7a3230. However, after
888e378da2dbf4520e68a9d7e59712a3cd5a830f, coredumps for system services are
stored by systemd-coredump user. Hence, _UID=0 does not match anything anymore.

When we are reading the system journal, let's set _UID=<systemd-coredump>,
then we can show coredumps for system services again. When we are reading
an external journal, then the uid of systemd-coredump may be different
from the one on the current system, so let's drop the filter condition
for _UID= in that case.

11 months agosystemctl: use correct runtime scope
Lennart Poettering [Mon, 9 Dec 2024 10:38:26 +0000 (11:38 +0100)] 
systemctl: use correct runtime scope

11 months agoboot: exclude the trailing padding from initrd size in initrd_prepare()
Zbigniew Jędrzejewski-Szmek [Fri, 6 Dec 2024 12:11:02 +0000 (13:11 +0100)] 
boot: exclude the trailing padding from initrd size in initrd_prepare()

This is a follow-up for f8fa4222c9ac3e74e91c64e25e9532c99559cf99 (boot: Make
initrd_prepare() semantically equivalent to combine_initrds()). That commit
changed the way that the initrd is prepared for type#1 boot loader entries,
also effectively rounding up the sizes to a multiple of 4. In [1], downstream
packagers report that the trailing zeroes result in the calculated hash being
different. To restore compatibility with previous hash calculations and
signatures, change the reported size by excluding the trailing padding. This
should restore the calculation results for the case where only one initrd is
used.

This patch doesn't touch the stub, i.e. doesn't change behaviour for UKIs. The
seems fine, since we didn't change that recently, so any changes there would
break compatiblity. The measurement results for type#1 and type#2 entries are
generally going to be different anyway. ukify and systemd-measure are also out
of scope here, because they are for UKIs.

Fixes https://github.com/systemd/systemd/issues/35439.
The other changes to the way the initrd is constructed are kept, so hopefully
the original issue with booting in qemu is not recreated.

[1] https://bugzilla.suse.com/show_bug.cgi?id=1233752

My simple test: I'm booting a QEMU VM with systemd-boot and a type#1 entry.
With old systemd-boot:
$ sudo systemd-pcrlock log | grep 'kernel-initrd.*event-tag'
  9 █ kernel-initrd  event-tag  - a337a8321bf81de5c53a842843e8f9a926f73a676e5620ff76df94d1c66bc931 F   - Linux: kernel command line
  9 █ kernel-initrd  event-tag  - aec1aee5358bde36f5498f2dc243dec2b103f81242de57b887a11f53677f1272 F   - Linux: initrd
With updated systemd-boot:
$ sudo systemd-pcrlock log | grep 'kernel-initrd.*event-tag'
  9 █ kernel-initrd  event-tag  - a337a8321bf81de5c53a842843e8f9a926f73a676e5620ff76df94d1c66bc931 F   - Linux: kernel command line
  9 █ kernel-initrd  event-tag  - 3ccaa710304aef8734a20265ea7fd3dd67d5461c6b3309c6d30d5c7d2a3ae7f9 F   - Linux: initrd
This matches the initrd hash:
$ sudo sha256sum /efi//26f948d2082e4ae89f5a3af351b63149/6.12.0-rc4+/initrd-dracut
3ccaa710304aef8734a20265ea7fd3dd67d5461c6b3309c6d30d5c7d2a3ae7f9  /efi//26f948d2082e4ae89f5a3af351b63149/6.12.0-rc4+/initrd-dracut

11 months agomkosi: various improvements (#35491)
Daan De Meyer [Sun, 8 Dec 2024 15:12:21 +0000 (16:12 +0100)] 
mkosi: various improvements (#35491)

11 months agomkosi: Set meson --max-lines= to 300 in CI 35491/head
Daan De Meyer [Fri, 6 Dec 2024 14:21:29 +0000 (15:21 +0100)] 
mkosi: Set meson --max-lines= to 300 in CI

By default meson only shows the last 100 lines of output for failed
tests. Let's bump this to 300 with the new --max-lines= option I added
so we get more useful output on test failures.

11 months agomkosi: Use mkosi sandbox in CI with Fedora tools tree
Daan De Meyer [Fri, 6 Dec 2024 14:20:15 +0000 (15:20 +0100)] 
mkosi: Use mkosi sandbox in CI with Fedora tools tree

This gives us a newer meson which will allow us to use the new
--max-lines= feature I added in meson 1.5.0.

11 months agotest: Set kernel loglevel to INFO when running tests unattended
Daan De Meyer [Fri, 6 Dec 2024 14:13:16 +0000 (15:13 +0100)] 
test: Set kernel loglevel to INFO when running tests unattended

This makes sure all kernel log messages are logged to the console.
This should be helpful during shutdown to detect possible issues with
journald when the logs can't be written to the journal itself anymore
but are written to kmsg.

11 months agomkosi: Move leak sanitizer supressions file to sanitizers extra tree
Daan De Meyer [Fri, 6 Dec 2024 14:07:35 +0000 (15:07 +0100)] 
mkosi: Move leak sanitizer supressions file to sanitizers extra tree

11 months agomkosi: Reduce kernel command line size
Daan De Meyer [Fri, 6 Dec 2024 14:04:56 +0000 (15:04 +0100)] 
mkosi: Reduce kernel command line size

The kernel command line has a size limit and we've hit it before so
let's move some stuff to configuration files or scripts to reduce the
kernel command line size a bit.

11 months agomkosi: Update to latest
Daan De Meyer [Sun, 8 Dec 2024 11:55:35 +0000 (12:55 +0100)] 
mkosi: Update to latest

11 months agotest: tentatively disable SELinux tests
Yu Watanabe [Sun, 8 Dec 2024 00:22:23 +0000 (09:22 +0900)] 
test: tentatively disable SELinux tests

Currently, mkosi GitHub action complains the following:
===
Could not find 'setfiles' which is required to relabel files.
===
Let's tentatively disable SELinux test.

11 months agosysupdate: fix typo in DBus config
Abderrahim Kitouni [Sat, 7 Dec 2024 08:10:59 +0000 (09:10 +0100)] 
sysupdate: fix typo in DBus config

11 months agotest: Remove old bash test runner
Daan De Meyer [Thu, 5 Sep 2024 18:37:37 +0000 (20:37 +0200)] 
test: Remove old bash test runner

We put a timeline of 257 to remove the old bash test runner so since
we're about to release 257, let's remove the old bash test runner in
favor of the meson + mkosi test runner.

11 months agoRevert "journalctl: show coredumps again when --unit= is specified"
Zbigniew Jędrzejewski-Szmek [Fri, 6 Dec 2024 10:11:24 +0000 (11:11 +0100)] 
Revert "journalctl: show coredumps again when --unit= is specified"

This reverts commit cbd5f5d7d6d652d52a18170123f5d08baf7e9862.

11 months agojournalctl: show coredumps again when --unit= is specified
Yu Watanabe [Thu, 5 Dec 2024 21:57:39 +0000 (06:57 +0900)] 
journalctl: show coredumps again when --unit= is specified

This effectively reverts fdcd37df3b97abc381c7b7a29b81cc013c7a3230.

After 888e378da2dbf4520e68a9d7e59712a3cd5a830f, coredumps for system
services are stored by systemd-coredump user. Henve, _UID=0 does not
match anything anymore.

Before:
```
$ build/journalctl -u systemd-networkd.service -p2 -n1
-- No entries --
```

After:
```
$ build/journalctl -u systemd-networkd.service -p2 -n1
Dec 06 05:39:55 H systemd-coredump[4187]: [🡕] Process 4145 (systemd-network) of user 192 dumped core.
(snip)
```

11 months agopo: Translated using Weblate (Russian)
Sergey A [Fri, 6 Dec 2024 08:19:09 +0000 (09:19 +0100)] 
po: Translated using Weblate (Russian)

Currently translated at 100.0% (257 of 257 strings)

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

11 months agoMore assert macros (#35471)
Luca Boccassi [Fri, 6 Dec 2024 00:50:07 +0000 (00:50 +0000)] 
More assert macros (#35471)

11 months agomkosi: Make sure the /coverage directory exists
Daan De Meyer [Thu, 5 Dec 2024 19:16:58 +0000 (20:16 +0100)] 
mkosi: Make sure the /coverage directory exists

11 months agotest-parse-util: use ASSERT_* macros 35471/head
Zbigniew Jędrzejewski-Szmek [Thu, 5 Dec 2024 10:55:00 +0000 (11:55 +0100)] 
test-parse-util: use ASSERT_* macros

11 months agotest-condition: use xsprintf and drop pointless cast
Zbigniew Jędrzejewski-Szmek [Thu, 5 Dec 2024 10:10:07 +0000 (11:10 +0100)] 
test-condition: use xsprintf and drop pointless cast

11 months agotest-condition: use ASSERT_* macros
Zbigniew Jędrzejewski-Szmek [Thu, 5 Dec 2024 10:08:48 +0000 (11:08 +0100)] 
test-condition: use ASSERT_* macros

Some strange asserts are dropped.

11 months agomkosi: install util-linux-script in F42 too
Luca Boccassi [Thu, 5 Dec 2024 16:59:04 +0000 (16:59 +0000)] 
mkosi: install util-linux-script in F42 too

11 months agoman: clarify wording regarding MONITOR_* envs
Septatrix [Wed, 4 Dec 2024 23:27:04 +0000 (00:27 +0100)] 
man: clarify wording regarding MONITOR_* envs

11 months agodocs/MEMORY_PRESSURE: fix typo
Tristan F.-R. [Thu, 5 Dec 2024 16:17:13 +0000 (08:17 -0800)] 
docs/MEMORY_PRESSURE: fix typo

corrects "focusses" -> "focuses"

11 months agotest-time-util: do more suppression of time zone checks
Zbigniew Jędrzejewski-Szmek [Thu, 5 Dec 2024 12:32:19 +0000 (13:32 +0100)] 
test-time-util: do more suppression of time zone checks

The issue is directly triggered by tzdata-2024b, where the setting of timezone
started to fail and the tests stopped passing. But those timestamps in 1/1/1970
appear to have some problems already before:

  $ sudo date -s 'Thu 1970-01-01 13:00:01 WET'
  Thu Jan  1 03:00:01 PM EET 1970
  $ sudo date -s 'Thu 1970-01-01 12:00:01 WET'
  date: cannot set date: Invalid argument
  Thu Jan  1 02:00:01 PM EET 1970
  $ rpm -q tzdata
  tzdata-2024a-9.fc41.noarch

The same issue appears with other timezones. So move the first timestamp one
day forward to avoid the issue.

After the previous problem is solved, we also get the problem already seen
previously where the roundtrip returns a time that is off by one hour:

@86401000000 → Fri 1970-01-02 00:00:01 WET → @82801000000 → Thu 1970-01-01 23:00:01 WET
Assertion 'x / USEC_PER_SEC == y / USEC_PER_SEC' failed at src/test/test-time-util.c:415, function test_format_timestamp_impl(). Aborting.

Extend the override to suppress this.