Commit Graph
100 Commits
Author SHA1 Message Date
Luca BoccassiandMichal Koutný 7d3b32daef core: add method to enqueue multiple jobs in a single call
Currently only a single job for a single unit can be enqueued atomically,
so there is no guarantee that, e.g., starting a unit and its socket
at the same time will happen in the same transaction. That forces
callers to 'know' the right order in which to start new units being
installed, or failures will occur. It also means some ordering
constraints are ignored, in case the separate calls are done
in the wrong manual order.

Add a new EnqueueUnitJobMany() D-Bus method that takes a list of units
to start.

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

Co-authored-by: Michal Koutný <mkoutny@suse.com>
2026-06-22 13:01:17 +01:00
Luca Boccassi f68fa99a07 TEST-67-INTEGRITY: pre-load crypto modules and skip unsupported algorithms
The test occasionally fails on GHA CI when formatting with xxhash64
because dm-integrity's crypto_alloc_shash() -> request_module() path
flakily fails to load the algorithm:

[   29.172664] TEST-67-INTEGRITY.sh[447]: + for a in crc32c crc32 xxhash64 sha1 sha256
[   29.172664] TEST-67-INTEGRITY.sh[447]: + [[ xxhash64 == crc32 ]]
[   29.172664] TEST-67-INTEGRITY.sh[447]: + test_one xxhash64 0
[   29.172664] TEST-67-INTEGRITY.sh[447]: + integritysetup format /dev/loop0 --batch-mode -I xxhash64 ''
[   29.223383] TEST-67-INTEGRITY.sh[1220]: device-mapper: reload ioctl on temporary-cryptsetup-fa8bebe3-1d87-4796-91e8-abc02c487bb5 (254:0) failed: No such file or directory
[   29.226916] kernel: device-mapper: table: 254:0: integrity: Invalid internal hash (-ENOENT)
[   29.227415] kernel: device-mapper: ioctl: error adding target to table
[   29.231586] TEST-67-INTEGRITY.sh[1220]: Cannot format integrity for device /dev/loop0.

Preload each algorithm's crypto module before use, and skip algorithms
that are not registered in /proc/crypto.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-11 14:37:08 +01:00
Luca Boccassi 6fdc22f933 ci: set dependabot cooldown period, disable persisting credentials for actions/checkout (#40728)
github/dependabot: set cooldown period
github/workflows: disable persisting credentials for actions/checkout
2026-02-18 10:39:11 +00:00
Luca Boccassi 70b5a49d25 Update hwdb and autosuspend rules (#40710) 2026-02-17 12:13:18 +00:00
Luca Boccassi 10a04f6fd2 test: do not fail when parsing PID that isn't thread-group leader (#40677)
```
TEST-02-UNITTESTS.sh[4382]: [  707.393188] test-cgroup-util[426]: Failed to open pidfd for pid 414: Invalid argument
TEST-02-UNITTESTS.sh[4382]: [  707.393193] test-cgroup-util[426]: src/test/test-cgroup-util.c:249: Assertion failed: Expected "r = proc_dir_read_pidref(d, &pid)" to succeed, but got error: -22/EINVAL
```

The kernel can return EINVAL on pidfd_open() when the selected PID is
not a thread group leader. Don't fail the test, as we are iterating on
everything, so this can seldomly happen.
2026-02-13 21:37:56 +00:00
Luca Boccassi 6b6d7ccd59 Two mkosi fixes (#40625) 2026-02-10 17:07:11 +00:00
Luca Boccassi 6cf5581af8 sysupdate: Split update into acquire and install verbs (#40236)
Using roughly the approach described in
https://gitlab.gnome.org/GNOME/gnome-software/-/merge_requests/2004#note_2145880.
Basically, copying in-progress downloads to a file/partition with a
predictable prefix, and then moving to a predictable ‘pending’ prefix
when ready to install.

Helps: https://github.com/systemd/systemd/issues/34814
2026-02-10 13:11:52 +00:00
Luca Boccassi b6defb8f84 bootctl: install tweaks (#40622) 2026-02-10 13:04:48 +00:00
Luca Boccassi c644e9e6e6 mkosi: fix debian/ubuntu/suse builds
Follow-up for 072e72424b
2026-01-24 16:12:09 +01:00
Luca Boccassi 2ba15493af portable: pin attached image via image-policy (#40152)
When attaching images generate a policy in the portable drop-in that
matches the partition types and content found while dissecting, so that
it can no longer be changed later without a reattach
2026-01-19 16:24:44 +00:00
Luca Boccassi 3e2a5dc2e1 dissect: support mount options when going through mountfsd, requiring privileges via polkit (#39394)
RootImageOptions=/ExtensionImages=/MountImages= all support custom
mount options, but mountfsd does not support it. Add varlink
parameters to allow callers to specify mount options so that
those directives can work as expected. Require additional privs via
polkit.
2026-01-16 14:55:02 +00:00
Luca Boccassi 059b3b466d core: reuse existing dm-verity device for single filesystem images pinned by policy (#40007)
Loading images is, generally speaking, the slowest part of sd-executor
when spawning a service. This is due to multiple factors. dm-verity is
obviously a big part of the cost, but dissecting in general via libblkid
also can take a lot of time, due to probing the images and their
filesystems.

A performance test doing service restarts in a row shows these
results, ran on a production system (low power and slow ARM64 SOC) with
a real production service, show the following service interruption
intervals:

```
Count | P50 (ms)  | P90 (ms) | P95 (ms) | P99 (ms) | P99.9 (ms)
507   | 1,532     | 1,726    | 2,548    | 4,112    | 4,592
```

One iteration is 507 restarts in this case, but this has ran hundreds
of times and the results are always in line within margin of error.
This also holds true for metrics from live systems, same numbers.
Between 1.0s and 1.2s can be attributed by profiling to the time needed
for the service code itself to start up and sd_notify, the rest is spent
inside systemd's code.

This means there is currently a tradeoff for services - either use
secure
images, or make restarting fast. Downtime of services is a very
important
metric, as for many cases this directly translates to outages, total or
partial (blackouot or greyout).

In order to facilitate using secure images without downsides, skip the
slow dissect steps (probing, loop devices, etc) when the configured
image is a single filesystem dm-verity image with a policy that pins it
to a single filesystem, and an already existing and open dm-verity
device
can be found and reused.

This allows orchestrators to pre-open images on download, before
restarting
services, to minimize downtimes.
2025-12-19 13:19:16 +00:00
Luca Boccassi 6ceb76bfcf mkosi: update fedora commit (#40146) 2025-12-19 12:49:27 +00:00
Luca Boccassi 9e418cd075 inhibit: allow filtering and add --json support for --list (#39973) 2025-12-18 10:47:23 +00:00
Luca Boccassi f33d550d44 Add polkit support to varlinkctl and sd-sysext (#39796) 2025-12-18 09:10:53 +00:00
Luca Boccassi b262ded0bd Boot loader menu docs and tweaks (#39842) 2025-12-17 23:00:59 +00:00
Luca Boccassi 676c098d0a Chores for v259 (#40120) 2025-12-17 18:39:40 +00:00
Luca Boccassi b5032cf979 Translations update from Fedora Weblate (#40097)
Translations update from [Fedora
Weblate](https://translate.fedoraproject.org) for
[systemd/main](https://translate.fedoraproject.org/projects/systemd/main/).



Current translation status:

![Weblate translation
status](https://translate.fedoraproject.org/widget/systemd/main/horizontal-auto.svg)
2025-12-15 20:51:04 +00:00
Luca Boccassi 7c0afcdde2 core: gracefully skip unknown policy designators in RootImagePolicy et al (#40060)
Usually we gracefully ignore unknown configuration parameters, so that
service files can be written by upstreams and used across a variegated
range of distributions with various versions of systemd, to avoid
forcing users to the minimum common denominator and only adding settings
that are supported by the oldest distro supported.

Image policies do not behave like this, and any unknown partition or
policy designator causes the whole unit to fail to parse and a hard
error.

Change it so that parsing RootImagePolicy and friends via unit file or
D-Bus logs but otherwise ignores unknown specifiers, like other options
do.

This allows us to add new specifiers in the future, and users to adopt
them immediately.

Follow-up for d452335aa4
2025-12-11 14:38:26 +09:00
Luca Boccassi d36ddefb51 tests: some more logs to try and get info about VM spurious reboots (#40028)
https://github.com/systemd/systemd/issues/38240 keep happening, trying
to get more info
2025-12-08 14:38:42 +00:00
Luca Boccassi e2fbcee030 test-network: fix invalid captive portal URL with dnsmasq 2.92 (#40011)
dnsmasq 2.92 started converting binary content to ascii so the previous
invalid URL is no longer invalid as it's escaped.

So the test started failing: https://bugs.debian.org/1122015

Use a '|' character instead, which is not a valid URL character but it's
also not escaped by dnsmasq.

Follow-up for 1219391c9f
2025-12-07 09:43:47 +09:00
Luca Boccassi 67317e214e Translations update from Fedora Weblate (#39998)
Translations update from [Fedora
Weblate](https://translate.fedoraproject.org) for
[systemd/main](https://translate.fedoraproject.org/projects/systemd/main/).



Current translation status:

![Weblate translation
status](https://translate.fedoraproject.org/widget/systemd/main/horizontal-auto.svg)
2025-12-05 14:24:23 +00:00
Luca Boccassi a8374a7607 Chores for RC2 (#39901) 2025-11-26 09:52:33 +00:00
Luca Boccassi 5da6a8ee6e man,doc: add uapi spec numbers to all links to uapi specs (#39867) 2025-11-24 11:15:09 +00:00
Luca Boccassi 6cb76f9e95 Improve systemd-analyze man page and bash completion (#39778)
This updates example output in systemd-analyze's man page after the
tool's output was changed in a previous commit.

Additionally bash completion is added for `systemd-analyze filesystems`
and improved for `systemd-analyze calendar`.
2025-11-18 22:54:01 +00:00
Luca Boccassi 00ed239a7b repart: prefix LUKS superblock label with "luks-" by default, and add explicit VolumeLabel= setting to control it (#39713)
Alternative-to: #39536
2025-11-17 17:46:39 +00:00
Luca Boccassi b186ce49de Chores for RC1 (#39757) 2025-11-17 10:53:15 +00:00
Luca Boccassi 2e939baaf3 Try to make TEST-75-RESOLVED less flaky (#39733)
These tests unfortunately rely on polling in several areas. In some
cases, it appears the timeouts are too short (e.g. #39602, or
https://github.com/systemd/systemd/actions/runs/19369869943/job/55422626427?pr=39731#logs).

Try to adjust the timeouts to see if this makes things more reliable.
2025-11-14 21:27:24 +00:00
Luca Boccassi 98ae19d9fe integritysetup: Add support for hmac-sha512 and wrapped key HMAC algorithms phmac-sha256 and phmac-sha512 (#39719)
Currently the only supported integrity algorithm using HMAC is
`hmac-sha256`. Add `hmac-sha512` to the list of supported algorithms as
well.

Also add the `PHMAC` integrity algorithm to the list of supported
algorithms. The `PHMAC` algorithm is like the regular HMAC algorithm,
but it takes a wrapped key as input. A key for the `PHMAC` algorithm is
an opaque key blob, who's physical size has nothing to do with the
cryptographic size. Such a wrapped key can for example be a HSM
protected key. Currently PHMAC is only available for the s390x
architecture (Linux on IBM Z).

Support for PHMAC has just been added to the cryptsetup project via MR
https://gitlab.com/cryptsetup/cryptsetup/-/merge_requests/693 by commit

https://gitlab.com/cryptsetup/cryptsetup/-/commit/296eb39c60bd85228930caaea4bb1d2a766b7544

To allow automatic opening of integrity protected volumes that use PHMAC
via `/etc/integritytab`, this change in systemd's integritysetup tool is
needed as well.
2025-11-14 00:12:34 +00:00
Luca Boccassi 69ab56aa19 systemd-analyze shell completion improvements (#39673) 2025-11-10 20:06:09 +00:00
Luca Boccassi fe753735e3 test: wait until the nspawn process is completely dead (#39576)
Before calling io.systemd.MachineImage.List.

The systemd-nspawn process takes a lock in the run() function in
nspawn.c and holds it for the entire runtime of that function. If we
call `machinectl terminate` the machine gets unregistered _before_ we
release the lock, so the original `machinectl status` check would return
early, allowing for a race where we call io.systemd.MachineImage.List
over Varlink when systemd-nspawn still holds the lock because the
process is still running.:

```
[   41.691826] TEST-13-NSPAWN.sh[1102]: + machinectl terminate long-running
[   41.695009] systemd-nspawn[2171]: Trying to halt container by sending TERM to container PID 1. Send SIGTERM again to trigger immediate termination.
[   41.698235] systemd-machined[1192]: Machine long-running terminated.
[   41.709520] TEST-13-NSPAWN.sh[1102]: + systemctl kill --signal=KILL systemd-nspawn@long-running.service
[   41.709169] systemd-nspawn[2171]: Failed to unregister machine: No machine 'long-running' known
[   41.720869] TEST-13-NSPAWN.sh[2346]: + varlinkctl --more call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{}'
[   41.723359] TEST-13-NSPAWN.sh[2347]: + grep long-running
...
[   41.735453] TEST-13-NSPAWN.sh[2352]: + varlinkctl call /run/systemd/machine/io.systemd.MachineImage io.systemd.MachineImage.List '{"name":"long-running", "acquireMetadata": "yes"}'
[   41.736222] TEST-13-NSPAWN.sh[2353]: + grep OSRelease
[   41.739500] TEST-13-NSPAWN.sh[2352]: Method call io.systemd.MachineImage.List() failed: Device or resource busy
[   41.740641] systemd[1]: Received SIGCHLD.
[   41.740670] systemd[1]: Child 2171 (systemd-nspawn) died (code=killed, status=9/KILL)
[   41.740725] systemd[1]: systemd-nspawn@long-running.service: Child 2171 belongs to systemd-nspawn@long-running.service.
[   41.740748] systemd[1]: systemd-nspawn@long-running.service: Main process exited, code=killed, status=9/KILL
[   41.740755] systemd[1]: systemd-nspawn@long-running.service: Will spawn child (service_enter_stop_post): systemd-nspawn
[   41.740872] systemd[1]: systemd-nspawn@long-running.service: About to execute: systemd-nspawn --cleanup --machine=long-running
...
```

Let's mitigate this by waiting until the corresponding
systemd-nspawn@.service instance enters the 'inactive' state where the
lock should be properly released.

Resolves: https://github.com/systemd/systemd/issues/39547
2025-11-05 19:39:10 +00:00
Luca Boccassi 95d4490a08 test-network: fix issues when running with sanitizers (#39572) 2025-11-05 17:40:29 +00:00
Luca Boccassi 5ee8ffb5c5 Assorted coverity fixes (#39355) 2025-10-17 20:30:09 +01:00
Luca Boccassi c92b14ec13 dissect: add support for verity-protected bare filesystems via mountfsd (#39325)
Needed to implement support for RootHashSignature=/RootVerity=/RootHash=
and friends when going through mountfsd, for example with user units,
so that system and user units provide the same features at the same
level
2025-10-16 19:43:45 +01:00
Luca Boccassi ac9391c552 Support ExtensionImages=/MountImages= in user services via mountfsd and PrivateUsers=yes (#39341) 2025-10-16 15:49:46 +01:00
Luca Boccassi 9dd61cfbe7 Use verity sharing for user services and nspawn too (#39313)
https://github.com/systemd/systemd/pull/39168 made verity sharing
opt-in, and enabled it for system services.
Also enable it for user services for RootImage/etc, and for nspawn, for
the same reasons.
2025-10-15 11:01:57 +01:00
Luca Boccassi 996e6d0d89 nspawn: free D-Bus error before fallback (#39131)
Otherwise the next call fails:

Got message type=error sender=:1.5 destination=:1.470 path=n/a 
    interface=n/a member=n/a cookie=151 reply_cookie=3 signature=s
    error-name=org.freedesktop.DBus.Error.UnknownMethod
    error-message=Unknown method CreateMachineEx or interface
    org.freedesktop.machine1.Manager. Assertion
'!bus_error_is_dirty(reterr_error)' failed at
    src/libsystemd/sd-bus/sd-bus.c:2396, function sd_bus_call(). Aborting.

Follow-up for d80af3b97b
2025-09-26 14:00:48 +09:00
Luca Boccassi 4f21c3d9b7 Two follow-ups for dlopen()-ification (#39078) 2025-09-23 00:13:13 +01:00
Luca Boccassi e0f863641a meson tweaklets (#38978) 2025-09-18 11:00:19 +01:00
Luca Boccassi 407e8ab86c kernel-install: version sort listed kernels (#38983) 2025-09-18 10:58:37 +01:00
Luca Boccassi e566236fc1 vmspawn: two small tweaks (#38957) 2025-09-17 19:46:34 +01:00
Luca Boccassi 6833cdfa04 Chores for release (#38958) 2025-09-17 12:58:15 +01:00
Luca Boccassi 4dddcce874 machine: do not allow unprivileged users to register other users' processes as machines (#38911)
Registering a process as a machine means a caller can get machined to
send sigterm to it, and more. If an unpriv user is registering, ensure
the registered process has the same uid.

Follow-up for adaff8eb35
2025-09-16 17:59:45 +01:00
Luca Boccassi 77c48bf2f6 mkosi conf opensuse: ukify from systemd-ukify (#38942)
* openSUSE tumbleweed moves ukify tool from systemd-experimental to
systemd-ukify.

This is needed to for the TEST-86-MULTI-PROFILE-UKI
2025-09-16 17:58:56 +01:00
Luca Boccassi 310ab61139 meson: link with -Wl,-z,gcs-report-dynamic=none (#38901)
There is a botched arm64 linker transition going on, where a new feature
is enabled (GCS) and the linker fails the build unless all object files
being linked are built with the new specific feature. This was enabled
in the toolchain (GCC 15) _before_ all libraries were rebuilt, including
glibc, so everything fails. The toolchain maintainers declined to fix it
and instead say that this is a useless warning to have, and to just
disable it and ignore it.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1110461
> systemd fails to build from source on arm64 if built with GCC-15, currently in
> experimental.
>
> GCC-15 includes support for an arm64 security feature called Guarded Control
> Stack (GCS). To help with GCS adoption, the linker warns about shared libraries
> built without GCS. For example:
>
> /usr/lib/gcc/aarch64-linux-gnu/15/../../../aarch64-linux-gnu/libncursesw.so.6:
> warning: GCS is required by -z gcs, but this shared library lacks the necessary property note.
> The dynamic loader might not enable GCS or refuse to load the program unless
> all the shared library dependencies have the GCS marking.
>
> The warning is harmless, and can be ignored. However, systemd is built with
> --fatal-warnings, and for this reason will fail to build on arm64 once GCC-15
> becomes the default compiler in Debian.

[585/3230] Linking target src/core/libsystemd-core-258.so
FAILED: src/core/libsystemd-core-258.so 
gcc  -o src/core/libsystemd-core-258.so  -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libsystemd-core-258.so -Wl,--whole-archive -Wl,--start-group src/core/libsystemd-core-258.a -Wl,--no-whole-archive -fstack-protector -Wl,-z,relro -specs=/usr/share/debhelper/dh_package_notes/debian-package-notes.specs -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/work/src=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -O0 -g -Og -Wdate-time '-Wl,-rpath,$ORIGIN/../shared' src/shared/libsystemd-shared-258.so -shared -Wl,--version-script=/work/src/src/shared/libshared.sym /usr/lib/aarch64-linux-gnu/libacl.so /usr/lib/aarch64-linux-gnu/libaudit.so /usr/lib/aarch64-linux-gnu/libblkid.so -ldl -lm /usr/lib/aarch64-linux-gnu/libmount.so -lrt /usr/lib/aarch64-linux-gnu/libseccomp.so /usr/lib/aarch64-linux-gnu/libselinux.so -Wl,--end-group -pthread -Wl,--fatal-warnings -Wl,-z,now -Wl,-z,relro -Wl,--gc-sections -Wl,--warn-common
src/shared/libsystemd-shared-258.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libacl.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libaudit.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libblkid.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/lib/aarch64-linux-gnu/libm.so.6: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/lib/aarch64-linux-gnu/libmvec.so.1: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libmount.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libseccomp.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libselinux.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/lib/aarch64-linux-gnu/libc.so.6: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/lib/ld-linux-aarch64.so.1: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
collect2: error: ld returned 1 exit status
2025-09-15 13:42:48 +02:00
Luca Boccassi f9bed8d52f test-namespace: more fixes (#38875) 2025-09-11 15:32:24 +01:00
Luca Boccassi cb90434c2a bootctl: minor fixups (#38856) 2025-09-08 18:38:56 +01:00
Luca Boccassi 55aa41a430 machine: restrict register-machine action again (#38835)
Follow-up for adaff8eb35
2025-09-06 11:04:49 +01:00
Luca Boccassi 7b53fd6215 Clean up redirection ops in tests (#38827) 2025-09-05 09:41:53 +01:00
Luca Boccassi a4f9ddbbe7 TEST-46-HOMED: improve stability of the test (#38659)
Fixes #38643.
2025-08-22 23:37:52 +01:00
Luca Boccassi a801a6d061 Chores for RC3 (#38653) 2025-08-20 15:16:03 +01:00
Luca Boccassi 1441f2e992 Add padding to sbat section (#38621) 2025-08-19 17:49:07 +01:00
Luca Boccassi b1cd38e893 test: also edit /etc/os-release if it's not a symlink when patching /usr/lib/os-release (#38628)
mkosi patches up /etc/os-release to add local IDs and fixup certain
issues, so when tests patch /usr/lib/ on the fly, copy to the version in
/etc/ too to avoid test failures when querying

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

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

https://github.com/systemd/mkosi/blob/main/mkosi/distributions/debian.py#L234
2025-08-19 12:32:00 +01:00
Luca Boccassi 637b3904c1 tpm2-util: fixlets for tpm2_serialize/_deserialize() (#38520)
Fixes #38507.
2025-08-12 19:54:44 +01:00
Luca Boccassi 71b6836638 network: fix segfault in setting bridge vlan (#38519) 2025-08-08 15:04:33 +01:00
Luca Boccassi 0fa09581b7 Fix build with older python/glibc/bpf and add CI job to cover it (#38500) 2025-08-06 16:08:18 +01:00
Luca Boccassi ea2beb6591 user-runtime-dir: two fixlets for setting disk quota (#38496)
Fixes #38493.
2025-08-06 14:23:41 +01:00
Luca Boccassi 56d362a2df Chores for RC2 (#38473) 2025-08-04 18:09:40 +01:00
Luca Boccassi cb88cf9760 udev/node: fix issue in removing device node symlink (#38419)
Fixes #37823.
2025-07-31 23:20:05 +01:00
Luca Boccassi e7feab79bc Several fixlets for PTY forwarder and systemd-run (#38385)
Hopefully fixes #38237.
2025-07-30 10:29:06 +01:00
Luca Boccassi d0cd25fff6 test: add workaround for unexpected VM restart (#38397)
Workarounds for issue #38240.
2025-07-29 09:52:37 +01:00
Luca Boccassi 285b3d544f basic: follow-ups for CHASE_MUST_BE_DIRECTORY/REGULAR (#38390)
Follow-up for 90b9f7a07e.
2025-07-28 23:16:53 +01:00
Luca Boccassi d48a071f7a Translations update from Fedora Weblate (#38387) 2025-07-28 23:12:54 +01:00
Luca Boccassi 257e941cc1 journal: fix log filtering for syslog message (#38372)
Fixes #38361.
2025-07-28 14:24:14 +01:00
Luca Boccassi ef101750ca TEST-21-DFUZZER: improve stability of the test, and enable services to be tested (#37862)
Fixes #37834.
2025-07-27 10:33:12 +01:00
Luca Boccassi b5a7f13a42 tree-wide: bunch of fixlets raised by coverity (#38341) 2025-07-26 11:10:00 +01:00
Luca Boccassi d6a70c1523 syscalls table: add sh (#38338) 2025-07-25 19:23:00 +01:00
Luca Boccassi 481e2ceaed Meson: clean up "finding" of helper scripts (#38335)
Simplify meson definitions and use `files()` instead of `find_program()`
for internal scripts to make build logs cleaner.
2025-07-25 17:10:27 +01:00
Luca Boccassi 9263c6f57e test: modernize test-oomd-util (#38329) 2025-07-25 11:01:32 +01:00
Luca Boccassi c8082ac09c test: wait for userspace mount options applied (#38327)
Hopefully fixes #32712.
2025-07-25 10:57:13 +01:00
Luca Boccassi 0997a60aee core/dbus-manager: validate unit type before calling into service-specific methods (#38323)
Fixes #38320
2025-07-24 23:17:41 +01:00
Luca Boccassi 4c7ec40e4e Chores for RC1 (#38300) 2025-07-23 17:54:25 +01:00
Luca Boccassi 467b1c4e4b core: gracefully ignore PrivateBPF=yes if the kernel does not support it (#38238)
Fixes #38225.
2025-07-18 23:36:24 +01:00
Luca Boccassi 0ae3a8d147 Small comment fixes (#38252) 2025-07-17 22:56:28 +01:00
Luca Boccassi 681e45716a analyze: several follow-ups for recent changes (#38253)
Follow-ups for 9a08000d18 (#37838) and
ad6e02e7b4 (#38132).
2025-07-17 20:10:47 +01:00
Luca Boccassi 6235121abf netdev-util: allow setting local address based on dhcp-pd addresses as well (#38211)
This extends the functionality introduced in #21648 to allow using
addresses chosen from a delegated prefix as well as the existing
SLAAC/LL/DHCP functionality.
2025-07-17 14:14:49 +01:00
Luca Boccassi 5b94f463f0 shell-completion: prettify and discard error messages (#38210)
followup of #38182
2025-07-15 09:30:30 +01:00
Luca Boccassi 7ebbe57ece Kill several SysV compat functionalities (v258) (#38178) 2025-07-15 01:21:13 +01:00
Luca Boccassi 9ae2dbf7f4 Two fixlets for coverage test (#38183) 2025-07-14 21:16:36 +01:00
Luca Boccassi d25e515ebc mkosi: enable arm64 job and test fixlets (#38066)
Enable nspawn job, as there's no nested kvm so VMs are too slow. Fix
some tests that fail in a VM anyway, might add a nightly job later that
runs them.
2025-07-05 11:46:30 +01:00
Luca Boccassi b8fe5fa129 Small cleanups for tests (#38063) 2025-07-04 19:24:29 +01:00
Luca Boccassi bfa39a8654 ci: restrict x86-only packages to x86 configs (#38056)
Prepare the ground for non-x86 CI jobs. Still work in progress, but
these preparatory steps work and can be already included.
2025-07-04 01:26:22 +01:00
Luca Boccassi 144ea281f3 sd-event struct typedefs and comments (#37790) 2025-07-03 22:22:40 +01:00
Luca Boccassi 0754db571b openssl-util: allow to build with openssl without UI support (#38041)
This makes it possible to build systemd with
-Dc_args='-DOPENSSL_NO_UI_CONSOLE=1'. Hopefully, now systemd can be
built with other openssl implementations, like BoringSSL, which deos not
support UIs.

Closes #38024.
2025-07-03 22:11:02 +01:00
Luca Boccassi a63f0ea73d test: allow to run test-local-addresses with IPv6 disabled by default, and assume RTA_VIA is always supported (#38039) 2025-07-03 09:58:02 +01:00
Luca Boccassi f00c2ac34a mkosi: update mkosi commit reference to 0d1143150835b21c1bfe64428df5f45b558280b1 (#37977)
* b2fe7ba6b1 Do not use return in finally
* b4f3088535 Ensure directories exist before running sync scripts
* e83e7036b0 mkosi-obs: also allow enrolling additional certs in KEK
* b6432fbc29 initrd: Copy /etc/pki/rpm-gpg into sandbox tree
* 44b96b93c8 Partially revert "resources: add systemd-boot-efi"
* 7a22260179 Check that keys are both in context.cli and history
* 6570b21a4b fix: Remove `erofs-utils` from initrd
* ff61c5022a mkosi-initrd: Add atkbd and i8042 modules to the default
initrd modules
* eaa37f7c6c Generate initrds outside of umask context manager
* de09209520 ci: Drop differential shellcheck
* d07c6b93c9 build(deps): bump github/codeql-action from 3.28.16 to
3.28.18
* 9a12fb1bef Check that commit exists in config_parse_minimum_version()
* 9e5b4f8932 kmod: factor out comparison and also count empty
directories as invalid
* 39ed5ef6c2 apt: support including additional configuration for
reprepro
2025-06-26 17:27:04 +01:00
Luca Boccassi 4cce53b76a Small udpates to TPM2_PCR_MEASUREMENTS page (#37978) 2025-06-26 14:28:03 +01:00
Luca Boccassi f8b598d381 socket-activate: normalize COMMAND notation in help text + man (#37967) 2025-06-25 15:05:24 +01:00
Luca Boccassi ad39648171 network/dhcp6: handle conflict addresses gracefully (#37916) 2025-06-23 22:23:35 +01:00
Luca Boccassi da993edcf7 tpm2: print clear log message in case of dictionary lockout mode (#37894)
Fixes: #32260
2025-06-19 22:55:36 +01:00
Luca Boccassi abe149d669 add parameter to specify hash alg used for PKCS#1 signature in PKCS#7 creation (#37794)
The pkcs7_new() function currently uses the hash algorithm from the X509
certificate's signature, but the content signature may use a different
hash algorithm. This adds a parameter to allow specifying what hash
algorithm the content signature generation used.
2025-06-10 23:07:26 +01:00
Luca Boccassi fe8cdd18d6 docs: small improvements for html man pages menu selector (#37663)
Result is already live at
https://www.freedesktop.org/software/systemd/man
2025-05-30 12:33:48 +01:00
Luca Boccassi f13bc8533c login: receive synthetic events for devices with 'uaccess' tag (#37654)
Fixes #37579.
2025-05-29 15:11:14 +01:00
Luca Boccassi 7a232071d0 Man page fixes (#37645) 2025-05-28 19:15:46 +01:00
Luca Boccassi 5a01c7c5f4 network: fix handling of ENODATA when reading IFLA_MASTER attribute (#37633)
Fixes #37629.
2025-05-28 12:20:00 +01:00
Luca Boccassi 27ffdb6d9e {pidfd,cgroup}-util: avoid alignment warning when accessing f_handle (#37520)
NetworkManager imports some systemd code, which we then build with
`-Wcast-align=strict`. This results in this warning:

```
../src/libnm-systemd-shared/src/basic/pidfd-util.c: In function 'pidfd_get_inode_id':
../src/libnm-systemd-shared/src/basic/pidfd-util.c:255:41: warning: cast increases required alignment of target type [-Wcast-align]
  255 |                                 *ret = *(uint64_t*) fh.file_handle.f_handle;
      |                                         ^
```

Since the address of `f_handle` should always be aligned at the word
boundary (it is preceded by 2 int`s` in `file_handle`), this patch uses
`CAST_ALIGN_PTR()` to avoid this warning.
2025-05-20 14:50:22 +01:00
Luca Boccassi 82d3551fbf repart: add --append-fstab parameter (#37238)
If --generate-fstab=PATH is used, there is the possibility that the
fstab file already exists, making systemd-repart fail.

This commit will add a new --append-fstab= parameter, that will read
the file and merge it with the new generated content.  Using the
comments, the command can separate the automatic-generated section from
the user-provided section, allowing for the next append the replacement
only of the automatic-generated section, keeping the user one.
2025-05-20 14:49:43 +01:00
Luca Boccassi 6946eed3fa core: Also refresh confext extensions when reloading notify-reload service (#33995)
`ExtensionImages=` and `ExtensionDirectories=` now let you specify
vpick-named extensions; however, since they just get set up once when
the service is started, you can't see newer versions without restarting
the service entirely. Here, also reload confext extensions when you
reload a service. This allows you to deploy a new version of some
configuration and have it picked up at reload time without interruption
to your workload.

Right now, we would only reload confext extensions and leave the sysext
ones behind, since it didn't seem prudent to swap out what is likely
program code at reload. This is made possible by only going for the
`SYSTEMD_CONFEXT_HIERARCHIES` overlays (which only contains `/etc`).

This PR:
- Adjusts `service.c` to also refresh extensions when needed. 
- Adds integration tests to check that a confext reload actually
occurred.
- Adds to the `systemd.exec` man pages to document this behavior.

This is a follow up to #24864 and #31364. Thank you to @bluca and
@goenkam for help in getting this up.
2025-05-20 11:27:34 +01:00
Luca Boccassi a49f3c3890 Update hwdb (#37470)
Update hwdb, even though we are pretty far from a release in order to:
- incrementally test upstream additions to hwdb
- allow backports to stable branches
2025-05-15 12:09:03 +01:00
Luca Boccassi ed5c3f4436 core: use socket cookie for naming per-connection service instances + set $SO_COOKIE env var to it (#37469) 2025-05-15 11:11:21 +01:00