Commit Graph
100 Commits
Author SHA1 Message Date
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
Luca Boccassi fa25fece05 Minor docs cleanups (#37439) 2025-05-14 17:16:05 +01:00
Luca Boccassi e7ddaf3bbc udev: Make Storage Tests Stable Again ! (#37262) 2025-04-29 14:37:20 +01:00
Luca Boccassi 30c3e937e3 Update example to F42 and fix invocation with dnf5 (#37250) 2025-04-25 13:35:05 +01:00
Luca Boccassi 86cfbfae97 xattr: fix assert that breaks importctl (#37146)
getxattr_at_malloc() calls getxattr_pinned_internal() with size 0 to get
the size of the xattr, and then asserts because n > 0
```
Assertion '(size_t) n <= size' failed at src/basic/xattr-util.c:107, function getxattr_pinned_internal().
```

Follow-up for b8df25dcfe
2025-04-16 06:44:24 +09:00
Luca Boccassi 5935d74613 fstab/gpt-auto: hook up validatefs to /sysroot/usr/ rather than /sysusr/usr/ (#37109) 2025-04-12 23:05:10 +01:00
Luca Boccassi a681435015 busctl: several cleanups for introspect command (#37103) 2025-04-12 11:46:58 +01:00
Luca Boccassi 386b94e6f6 fido2: hook up with plymouth for notifications (#37089)
Show notifications for fido2 messages in plymouth, so that they
show up in the initrd like the passphrase prompt already does.
2025-04-12 01:06:31 +01:00
Luca Boccassi dd85fbf6aa Some cleanups and a CI fix for test-sd-device (#37083) 2025-04-10 14:47:02 +01:00
Luca Boccassi 4dca06cba9 udev: several trivial cleanups (#37059) 2025-04-09 10:32:42 +01:00
Luca Boccassi 442d8c3f06 TEST-04-JOURNAL: include util.sh before calling cgroupfs_supports_user_xattrs() (#37039)
Fixes a bug introduced by 46322f2742
(v256).
Fixes #36991.
2025-04-08 09:52:13 +01:00
Luca Boccassi a088ab8d42 udev: fix potential stuck on exit (#37022)
If an event is requeued after termination is requested, previously
systemd-udevd never called sd_event_exit() and stuck.
2025-04-07 23:54:23 +01:00
Luca Boccassi c1b0e39ffd tree-wide: allow building with -Werror=flex-array-member-not-at-end (#36993)
Fixes #36988.
2025-04-04 18:37:54 +01:00
Luca Boccassi 79bc7625f6 test: fix usage of --hostnqn= (#36927)
Fixes #36908.
2025-04-01 14:04:23 +01:00
Luca Boccassi a20c2d6589 test and manpages follow-ups (#36924) 2025-04-01 13:52:14 +01:00
Luca Boccassi fce07bcb7a meson: add feature flag for nspawn build (#36876)
Other tools have it, nspawn doesn't, add one
2025-03-28 13:55:19 +00:00
Luca Boccassi 6561d02ee1 mkosi: Use build image prepare scripts for tools tree as well (#36861)
Instead of listing dependencies manually for the default tools tree,
let's reuse the prepare scripts from the build image. To make this work,
the sync script has to be configured for the tools tree as well so that
it's invoked both when building the tools tree and for the regular
image,
otherwise, when doing the first build in a fresh checkout, the sync
script
won't have executed yet as sync scripts for the regular images are
executed
after building the default tools tree.
2025-03-28 13:31:28 +00:00
Luca Boccassi 3f8431d038 mkosi: update fedora commit reference (#36875)
* 617952132d Run integration testsuite standalone if available
2025-03-28 02:06:06 +00:00
Luca Boccassi 3d9f3420b5 test: update to use the new ASSERT_OK() macro and friends (#36838)
Converted the unitest implemented in src/test/test-watch-pid.c that
still uses assert_se() to use the new ASSERT_OK() macro and friends.
2025-03-26 15:21:55 +00:00
Luca Boccassi 1cc8e4a183 logind: inhibitor fixups (#36817) 2025-03-26 00:22:27 +00:00
Luca Boccassi 1a5f9b2caf tools/check-version-history: avoid DeprecationWarning with newer lxml (#36860)
We get the same warning thousands of times:
/work/src/tools/check-version-history.py:28: FutureWarning: This search
incorrectly ignores the root element, and will be fixed in a future
version. If you rely on the current behaviour, change it to

"./refsynopsisdiv/funcsynopsis/funcprototype/funcdef/function[.='udev_device_get_properties_list_entry']"

We also need to update the ignorelist to the new form.
2025-03-25 19:34:44 +00:00
Luca Boccassi a372936346 Trivial updates for docs and comments (#36854) 2025-03-25 10:37:42 +00:00
Luca Boccassi 5aee5bda1a tree-wide: introduce LOG_ITEM() macro for verifying format string (#36780)
This introduce `LOG_ITEM()` macro that checks format strings in
log_struct() and friends.

Hopefully, this silences false-positive warnings by Coverity.
2025-03-24 12:58:14 +00:00
Luca Boccassi 2e3efb1884 some dbus property fixes (#36830) 2025-03-22 15:54:16 +00:00
Luca Boccassi 3d278519fa build: add C23 support (#35085)
To support C23, this introduces UTF8() macro to define UTF-8 literals,
as C23 changed char8_t from char to unsigned char.
This also makes pointer signedness warning critical, and updates C
standards table for tests.
2025-03-17 11:29:33 +00:00
Luca Boccassi 32f66088de several fixes for Coverity (#36753) 2025-03-15 11:46:14 +00:00