]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 weeks agocore/manager: drop duplicate bus track deserialization
Mike Yuan [Sat, 11 Jan 2025 17:38:49 +0000 (18:38 +0100)] 
core/manager: drop duplicate bus track deserialization

bus_init_api() now does this internally
(after 8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98).

(cherry picked from commit af0e10354e567bfd0b9521376b2aad55f12a4e3d)

4 weeks agobus-util: do not reset the count returned by sd_bus_track_count_name()
Mike Yuan [Sat, 11 Jan 2025 15:26:55 +0000 (16:26 +0100)] 
bus-util: do not reset the count returned by sd_bus_track_count_name()

Follow-up for 8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98

While at it, turn the retval check for sd_bus_track_count_name()
into assertion, given we're working with already established tracks
(service_name_is_valid() should never yield false in this case).

Addresses https://github.com/systemd/systemd/pull/35406#discussion_r1912066774

(cherry picked from commit 33eeea4128f31df7ab4bd8866b582062d70114ae)

4 weeks agomanager: s/deserialized_subscribed/subscribed_as_strv
Ronan Pigott [Wed, 11 Dec 2024 19:47:10 +0000 (12:47 -0700)] 
manager: s/deserialized_subscribed/subscribed_as_strv

Now that this field may get populated at runtime, the deserialized name
is misleading. Change the name to reflect its updated purpose.

(cherry picked from commit e1315a621ae26473fcc9cd0d6013836f5f498d40)

4 weeks agodbus: stash the subscriber list when we disconenct from the bus
Ronan Pigott [Thu, 28 Nov 2024 19:53:32 +0000 (12:53 -0700)] 
dbus: stash the subscriber list when we disconenct from the bus

If we unexpectly disconnect from the bus, systemd would end up dropping
the list of subscribers, which breaks the ability of clients like logind
to monitor the state of units.

Stash the list of subscribers into the deserialized state in the event
of a disconnect so that when we recover we can renew the broken
subscriptions.

(cherry picked from commit 8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98)

4 weeks agosd-bus/bus-track: use install_callback in sd_bus_track_add_name()
Michal Sekletar [Thu, 31 Jul 2025 16:26:09 +0000 (18:26 +0200)] 
sd-bus/bus-track: use install_callback in sd_bus_track_add_name()

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

Follow-up for 37ce3fd2b7dd8f81f6f4bca2003961a92b2963dc.

Fixes #32381

(cherry picked from commit dcf42d1ee21222ee698e5e0ab3ecf3411b63da40)

4 weeks agocore: do not disconnect from bus when failed to install signal match
Yu Watanabe [Sun, 29 Dec 2024 06:50:43 +0000 (15:50 +0900)] 
core: do not disconnect from bus when failed to install signal match

If bus_add_match_full() is called without install callback and we failed
to install the signal match e.g. by timeout, then add_match_callback()
will disconnect from the bus.
Let's use a custom install handler and handle failures gracefully.

This does not *solve* the root cause of issue #30573, but should improve
the situation when the issue is triggered.

(cherry picked from commit db6b214f95aa42f9a9fa3d94a3c6492cc57b58fb)

4 weeks agotest: Add test for nspawn's handling of cap_net_bind_service
Daan De Meyer [Thu, 4 Sep 2025 10:48:35 +0000 (12:48 +0200)] 
test: Add test for nspawn's handling of cap_net_bind_service

(cherry picked from commit cadeaef67cb0f11bd968cfd6a183bcbfc73b0c70)

4 weeks agonspawn: Drop CAP_NET_BIND_SERVICE if in userns with identity mapping
DaanDeMeyer [Tue, 26 Aug 2025 10:35:58 +0000 (12:35 +0200)] 
nspawn: Drop CAP_NET_BIND_SERVICE if in userns with identity mapping

Even if there's no uid shift, we still won't be able to bind to privileged
ports in the host network namespace, so drop the capability regardless of
whether we have a uid shift or not.

(cherry picked from commit 945e1fd37b66ae3b1732b8fbcc247050c5141b85)

4 weeks agomkosi: Install libcap-progs in main and minimal image
Daan De Meyer [Fri, 5 Sep 2025 06:23:58 +0000 (08:23 +0200)] 
mkosi: Install libcap-progs in main and minimal image

Let's make sure tools like capsh are available on OpenSUSE images
as well.

(cherry picked from commit b21f52b6d189a63441258250259a93ffd4c28283)

4 weeks agopcrlock: use WRITE_STRING_FILE_LABEL
Yu Watanabe [Tue, 26 Aug 2025 16:31:36 +0000 (01:31 +0900)] 
pcrlock: use WRITE_STRING_FILE_LABEL

Fixes #38727.

(cherry picked from commit 9507e118e9069f595c5c79cd9404a1ab76204cf8)

4 weeks agoman: add docs for ssh.ephemeral-authorized_keys-all
Allison Karlitskaya [Wed, 3 Sep 2025 08:29:39 +0000 (10:29 +0200)] 
man: add docs for ssh.ephemeral-authorized_keys-all

This was added in 071155a1fbac ("ssh-generator: support
ssh.ephemeral-key.all-users") without corresponding documentation.  Add
the missing docs now.

(cherry picked from commit 5a1b64fee04933f74eae3ca65e79fa92872ae353)

4 weeks agomachine: add a comment to clarify that root_directory is informational only
Luca Boccassi [Tue, 16 Sep 2025 14:51:08 +0000 (15:51 +0100)] 
machine: add a comment to clarify that root_directory is informational only

To avoid any possible mistakes in the future, add a comment in the
object declaration

(cherry picked from commit 8324f9351c5d22fa49fa59d1ec3f71afa9408143)

4 weeks agoman: clarify that machined RootDirectory parameter is informational only
Luca Boccassi [Tue, 16 Sep 2025 14:49:26 +0000 (15:49 +0100)] 
man: clarify that machined RootDirectory parameter is informational only

It's basically just a label, it is not used for any purpose

(cherry picked from commit e80394e19303add17091ec0ce44c34a94645e8cf)

4 weeks agomachine: validate root directory over varlink
Luca Boccassi [Sat, 13 Sep 2025 00:28:24 +0000 (01:28 +0100)] 
machine: validate root directory over varlink

Use strict validation to reject invalid directories as the D-Bus
API already does

Follow-up for 5b44c81ff868a4d1b78a74e4770f7a8b2f1d0f91

(cherry picked from commit 44e3c4c8bc031706a236acf9a8d6e5e7c5e2fd0a)

4 weeks agoman: Update systemd-userdbd.service about .group extension
Andreas Schneider [Tue, 16 Sep 2025 11:38:20 +0000 (13:38 +0200)] 
man: Update systemd-userdbd.service about .group extension

(cherry picked from commit 775a31bdfac785c588f34328f748bac10af61ffa)

4 weeks agomeson: link with -Wl,-z,gcs-report-dynamic=none (#38901)
Luca Boccassi [Mon, 15 Sep 2025 11:42:48 +0000 (12:42 +0100)] 
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

(cherry picked from commit 310ab611396e5a7820a820e35fa9763b5528e137)

4 weeks agogenerators: when creating symlinks, silently ignore existing links in one more place
Zbigniew Jędrzejewski-Szmek [Mon, 8 Sep 2025 17:47:28 +0000 (19:47 +0200)] 
generators: when creating symlinks, silently ignore existing links in one more place

After the update to systemd 257.7 in Fedora, there are reports that we fail to
create a symlink:
  systemd-gpt-auto-generator[585]: Failed to create symlink /run/systemd/generator/local-fs.target.wants/systemd-fsck-root.service: File exists
  (sd-exec-[574]: /usr/lib/systemd/system-generators/systemd-gpt-auto-generator failed with exit status 1.

I guess that some other generator created the symlink. We silently ignore
EEXIST in similar codepaths, so add that in one more place. (The target of the
symlink doesn't really matter. The name of the link matters. So something like
symlink_idempotent would not be better. For example, a different generator
might use a slightly different target path, and symlink_idempotent would be too
strict.)

(cherry picked from commit 8a9ab3dbbc86cf72ef8f511a3214f66a61f6bd01)

4 weeks agomkosi conf opensuse: add libtss2-tcti-device0 dep
val4oss [Tue, 9 Sep 2025 13:57:26 +0000 (15:57 +0200)] 
mkosi conf opensuse: add libtss2-tcti-device0 dep

* Add the TPM recommended package for opensuse mkosi conf to fix the
  TEST-70-TPM failure.

Signed-off-by: val4oss <github.widget541@passmail.net>
(cherry picked from commit 6becea285941f5cc7980fb68431270f165945341)

4 weeks agoukify: fix backend/option applicability docs
Christopher Head [Thu, 11 Sep 2025 05:40:46 +0000 (22:40 -0700)] 
ukify: fix backend/option applicability docs

The `SecureBootPrivateKey` and `SecureBootCertificate` options are used
by the `systemd-sbsign` backend, not just the `sbsign` backend.

(cherry picked from commit fafe447dcdf13a61ef262f16015130b21453ef6a)

4 weeks agoTEST-64-UDEV-STORAGE: forcibly create new physical volume
Yu Watanabe [Wed, 10 Sep 2025 12:45:56 +0000 (21:45 +0900)] 
TEST-64-UDEV-STORAGE: forcibly create new physical volume

When the test VM is accidentally rebooted, there exists the previously
created volume, and the command fails with the following:
```
TEST-64-UDEV-STORAGE.sh[282]: + lvm pvcreate -y /dev/md/mdlvm
TEST-64-UDEV-STORAGE.sh[442]:   Can't initialize physical volume "/dev/md127" of volume group "mdlvm_vg" without -ff
TEST-64-UDEV-STORAGE.sh[442]:   /dev/md127: physical volume not initialized.
[FAILED] Failed to start TEST-64-UDEV-STORAGE-mdadm_lvm.service.
```
Let's ignore the existence of previous volume and forcibly create new one.

Workaround for issue #38240.

(cherry picked from commit 8685f8edd17a5e465bf05d733ac22c010c464938)

4 weeks agoRemove mention of inactive Tanglu distro from systemd-nspawn man page (#38873)
Raura [Tue, 9 Sep 2025 21:19:46 +0000 (00:19 +0300)] 
Remove mention of inactive Tanglu distro from systemd-nspawn man page (#38873)

Distribution seems inactive for a long time, and the mentioned website has disappeared.
https://distrowatch.com/table.php?distribution=tanglu

(cherry picked from commit d18a6c861dcf50b27731df1c95f31f2cdc424844)

4 weeks agotest: remove extension from /var/lib/extensions at the end of the test
Luca Boccassi [Mon, 8 Sep 2025 12:38:30 +0000 (13:38 +0100)] 
test: remove extension from /var/lib/extensions at the end of the test

Otherwise it remains there, and another test case accidentally
uses it on refresh, which then makes another later test fail,
as the hierarchy is already merged:

[  203.969708] TEST-50-DISSECT.sh[890]: + systemd-sysext status
[  203.981831] TEST-50-DISSECT.sh[2795]: HIERARCHY EXTENSIONS SINCE
[  203.982196] TEST-50-DISSECT.sh[2795]: /opt      app0       Mon 2025-09-08 11:49:11 UTC
[  203.982551] TEST-50-DISSECT.sh[2795]: /usr      app0       Mon 2025-09-08 11:49:11 UTC

[  204.119772] TEST-50-DISSECT.sh[2799]: Hierarchy '/usr' is already merged.

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

(cherry picked from commit 9cc9e14ed4671eb8c0424b465504202371e17419)

4 weeks agobootctl: clarify that --secure-boot-auto-enroll requires a boolean value
Antonio Alvarez Feijoo [Mon, 8 Sep 2025 10:31:27 +0000 (12:31 +0200)] 
bootctl: clarify that --secure-boot-auto-enroll requires a boolean value

(cherry picked from commit 5a70aa5315c189c84bb98fd16f498edbc56e2b3f)

4 weeks agobootctl: fix reference to non-existent option in error log
Antonio Alvarez Feijoo [Mon, 8 Sep 2025 10:30:35 +0000 (12:30 +0200)] 
bootctl: fix reference to non-existent option in error log

(cherry picked from commit 992716c9ab452457222cb1da2be34ce070ead309)

4 weeks agoman/loader.conf: specify that default entry is id...
Christian Hesse [Mon, 8 Sep 2025 07:45:42 +0000 (09:45 +0200)] 
man/loader.conf: specify that default entry is id...

... which is the file name including literal suffix `.conf`.

(cherry picked from commit e3b17435965f413d30d63a24caa621cdf590c0af)

4 weeks agosd_bus_message_read.1: fix x/t being [iu]32 instead of [iu]64
наб [Sat, 6 Sep 2025 16:00:28 +0000 (18:00 +0200)] 
sd_bus_message_read.1: fix x/t being [iu]32 instead of [iu]64

(cherry picked from commit f1fdfabcdea3849d986eefee3051d518a3219f13)

4 weeks agolabeler: match src/bootctl/ for sd-boot/bootctl tag
Mike Yuan [Thu, 4 Sep 2025 15:28:02 +0000 (17:28 +0200)] 
labeler: match src/bootctl/ for sd-boot/bootctl tag

Follow-up for 0b676aab33be2fa8b092f1bf5f1f4e04f072eda4

(cherry picked from commit ebcb0a07d3eaa459dd60ebba4c41bfb9d2cac802)

4 weeks agomkosi conf opensuse: add systemd-journal-remote
val4oss [Wed, 3 Sep 2025 14:28:08 +0000 (16:28 +0200)] 
mkosi conf opensuse: add systemd-journal-remote

* Add the missing package for mkosi opensuse conf, otherwise TEST-04-JOURNAL
  fails with "/usr/lib/systemd/systemd-journal-remote: No such file or
  directory"

Signed-off-by: val4oss <github.widget541@passmail.net>
(cherry picked from commit 0c7764f2a761d6de9ee0c1c97b6c8342ffac6711)

4 weeks agonetwork: remove unnecessary fd saved in fd-store
Yu Watanabe [Wed, 3 Sep 2025 23:40:48 +0000 (08:40 +0900)] 
network: remove unnecessary fd saved in fd-store

Fixes the following warning:
```
[  130.968170] H systemd-networkd[4288]: Restart operation initiated.
[  130.968265] H systemd-networkd[4288]: Serializing...
[  130.968274] H systemd-networkd[4288]: There is nothing to serialize.
(snip)
[  130.978756] H systemd[1]: Stopped systemd-networkd.service.
(snip)
[  130.991407] H systemd[1]: Starting systemd-networkd.service...
(snip)
[  131.077440] H systemd-networkd[4318]: Enumeration completed.
[  131.077471] H systemd-networkd[4318]: Deserializing...
[  131.077491] H systemd-networkd[4318]: Failed to parse json (line=0, column=0): No data available
[  131.077524] H systemd-networkd[4318]: Failed to deserialize the previous invocation, ignoring: No data available
```

(cherry picked from commit 13852e1914a6d6515eaf5857470ca8a11fdbacd4)

4 weeks agodaemon-util: expose notify_remove_fd_warn()
Yu Watanabe [Sat, 5 Apr 2025 13:41:28 +0000 (22:41 +0900)] 
daemon-util: expose notify_remove_fd_warn()

(cherry picked from commit 8b078c5b86e13e9af88ead08ac1570cb4c61f7ef)

4 weeks agotest: do not call GetUserRecord without "service" argument
Yu Watanabe [Wed, 3 Sep 2025 23:20:17 +0000 (08:20 +0900)] 
test: do not call GetUserRecord without "service" argument

Otherwise, following debugging log will be saved and the checker for
the varlink-idl log triggers failure:
```
systemd-userwork: processing[3110]: varlink-6-6: Parameters for method
  io.systemd.UserDatabase.GetUserRecord() didn't pass validation on field 'service': No anode
```

(cherry picked from commit df25e4af162806e67fac88709413516a8182f634)

4 weeks agocore/varlink: do not call io.systemd.oom.ReportManagedOOMCGroups() with empty "cgroup...
Yu Watanabe [Thu, 4 Sep 2025 09:38:38 +0000 (18:38 +0900)] 
core/varlink: do not call io.systemd.oom.ReportManagedOOMCGroups() with empty "cgroups" parameter

Fixes the following varlink IDL validation error:
```
systemd-oomd[1687]: varlink-11-11: Parameters for method io.systemd.oom.ReportManagedOOMCGroups()
  didn't pass validation on field 'cgroups': No anode
```

(cherry picked from commit 2ce397125fe77220d881e0c57bf0c1e7803f9cf7)

4 weeks agobootctl: add missing varlink IDL entries
Yu Watanabe [Thu, 4 Sep 2025 00:15:01 +0000 (09:15 +0900)] 
bootctl: add missing varlink IDL entries

Follow-up for f2751d757f76f6e50e452431815370a3a45fdfc0.

(cherry picked from commit ce631ae3d9847606f7ca70ddba1cb2d8fc3d6441)

4 weeks agotest: add comment about custom autorelabel.service
Yu Watanabe [Wed, 3 Sep 2025 21:17:22 +0000 (06:17 +0900)] 
test: add comment about custom autorelabel.service

Salvaged from ead814a0b0f64c572282b9e27a0a995893f10cf0.

(cherry picked from commit b419e927ee1cfffb5591e2e796b3b41d15fd7509)

4 weeks agorepart: fix memleak
Yu Watanabe [Wed, 3 Sep 2025 21:52:01 +0000 (06:52 +0900)] 
repart: fix memleak

Fixes a bug in 1a0541d44c78ced78a566051ec8f63417370aeaa (v256).

(cherry picked from commit 975f27a2b51db19992324346edbb4d264b495c03)

4 weeks agoman/repart.d: mention each field of MountPoint= needs to be quoted when contains...
Yu Watanabe [Wed, 3 Sep 2025 16:42:48 +0000 (01:42 +0900)] 
man/repart.d: mention each field of MountPoint= needs to be quoted when contains colon

Closes #38749.

(cherry picked from commit a1eb53e934b8fab9941e2bf5a9b4bd823ae1d68f)

4 weeks agoTEST-07-PID1: add test cases for mask/unmask unit
Yu Watanabe [Wed, 3 Sep 2025 18:21:45 +0000 (03:21 +0900)] 
TEST-07-PID1: add test cases for mask/unmask unit

For issue #38802.

(cherry picked from commit 023de387821dd142fbc86d0882a904b87cb01b6a)

4 weeks agocore/unit: do not load drop-in configs for masked unit files
Yu Watanabe [Thu, 4 Sep 2025 01:13:17 +0000 (10:13 +0900)] 
core/unit: do not load drop-in configs for masked unit files

Otherwise, ExecXYZ= given by drop-ins may be added to a masked unit,
then commands may be unexpectedly executed. For example, if an ExecStop=
is set in a drop-in for a running unit, then 'systemctl mask --now' for
the unit try to invoke the command specified in ExecStop=.

Fixes #38802.

(cherry picked from commit 2ba0eacc6cf3c2ff94272c100cb713931c768199)

2 months agomeson: bump version to 257.9 v257.9
Luca Boccassi [Wed, 3 Sep 2025 18:35:40 +0000 (19:35 +0100)] 
meson: bump version to 257.9

2 months agomkosi: update mkosi commit reference to d45142e329550abc9c6fc63c1f1f86e5286d3d67
Luca Boccassi [Wed, 3 Sep 2025 11:48:23 +0000 (12:48 +0100)] 
mkosi: update mkosi commit reference to d45142e329550abc9c6fc63c1f1f86e5286d3d67

786b8fe1c8 Return false from want_efi() for UKI outputs
fac86dbc93 mkosi-tools: add qemu/pipewire packages for gui profile for debian
3bb98f0e6e Add ncdu to tools tree packages
1332b32cb4 config: Fix type for devicetree setting
eff03569ee initrd: Add intel_pmc_ssram_telemetry module by default
e04305b030 Make Bootable= determine whether we build a UKI for esp images
7252146429 mkosi-obs: use --force also for unzstd
f58e31e228 mkosi-obs: do not fail if there are no bootloaders in the ESP
fac3bd4bf1 rhel: Look up entitlement keys and certificates in sandbox
da814d9634 opensuse: Add support for RISC-V for Tumbleweed
b1d66c88d0 fedora: Rework rawhide GPG key logic
b9360f25df Include {sys,conf}ext info in metadata file
94c6db6148 Set MakeInitrd=yes in documentation for building custom initrd
d134013ca8 mkosi-tools: add grub2-common to openSUSE tools tree
c97d345395 mkosi-tools: virtiofsd is only available on a subset of architectures on debian/ubuntu

(cherry picked from commit c4d9f9c9f62d29a03eb243dc0503e859b15f9bd1)

2 months agomkosi: update mkosi commit reference to 5598b7f5793b6f63db5afaa39504a763fbaeb5cb
Luca Boccassi [Sat, 16 Aug 2025 11:13:20 +0000 (12:13 +0100)] 
mkosi: update mkosi commit reference to 5598b7f5793b6f63db5afaa39504a763fbaeb5cb

5598b7f579 fedora: be more persistent when guessing what rawhide could be
cdd2d1570e Use apt-ftparchive instead of reprepro
eeb4ce6302 fix dead/404 link
30a487d183 mkosi-tools: Drop systemd-boot-efi package
ad4b4d2cbe Add debug logging for version reported by systemd tools
95f5c77fb7 mkosi-tools: move systemd-boot package to conf file matching older releases
7da22f33e0 README: clarify that companion tools can also be enabled from the git repo
ec3fe91532 Drop microsecond resolution for datetime.now()
9f7a53b687 mkosi-initrd: install raid rule with 70 prefix
32c3ff4677 ci: give a hint about possible fixes for failing reuse lints
489c5e9ecc build(deps): bump github/codeql-action from 3.29.2 to 3.29.5

(cherry picked from commit f89480a0a7db6e498422b07726a690435039c30e)

2 months agomkosi: Relax separate branch check in mkosi.sync
Daan De Meyer [Wed, 3 Sep 2025 09:25:57 +0000 (11:25 +0200)] 
mkosi: Relax separate branch check in mkosi.sync

There's no guarantee that $GIT_BRANCH is always the same across
stable release branches and main. But we still need to make sure
we switch commits if we're switching between main and release branches.

To make this work, let's not check if the current HEAD commit is an
ancestor of the currently configured origin branch. Instead, let's
check if any of the origin branches contains the current HEAD commit.
This still makes sure that we won't switch commits if we're working
on a local branch while making sure that we do switch commits if we're
switching between main and stable release branches with different
git branches configured for the packaging repo checkout.

(cherry picked from commit 1207ba48d7405ca9bf9b987d8e83525b677a82ca)

2 months agohwdb: update to main@{2025-09-02}
Luca Boccassi [Tue, 2 Sep 2025 21:41:22 +0000 (22:41 +0100)] 
hwdb: update to main@{2025-09-02}

git restore -s origin/main hwdb.d/ test/hwdb.d
git checkout hwdb.d/meson.build

2 months agocryptsetup: HAVE_CRYPT_SET_KEYRING_TO_LINK is always defined
Yu Watanabe [Sun, 17 Aug 2025 12:05:24 +0000 (21:05 +0900)] 
cryptsetup: HAVE_CRYPT_SET_KEYRING_TO_LINK is always defined

Follow-up for c5daf14c88ba44cefabe052de93a29d28b6b0175 (v256).

(cherry picked from commit fb4aabf4432d523b97376099ce4353b5c268ae82)

2 months agoukify: rstrip and escape binary null characters from 'inspect' output (#38607)
Li Tian [Mon, 18 Aug 2025 21:43:41 +0000 (05:43 +0800)] 
ukify: rstrip and escape binary null characters from 'inspect' output (#38607)

SBAT section of UKI may contain \u000 null characters. Rstrip them, and if there's anything left in the middle,
escape them so they are displayed as text.

Fixes #38606

(cherry picked from commit 776991a3f349d9c99fd166a0c87fcd2bc1bf92a5)

2 months agoukify: drop NX bit from UKI if kernel doesn't have it
Luca Boccassi [Tue, 12 Aug 2025 22:09:06 +0000 (23:09 +0100)] 
ukify: drop NX bit from UKI if kernel doesn't have it

If the kernel is not NX_COMPAT ready (W^X memory compatible) then the
UKI should not be marked as NX_COMPAT ready either, as the kernel
section is the loadable code in the image.

https://microsoft.github.io/mu/WhatAndWhy/enhancedmemoryprotection/
https://www.kraxel.org/blog/2023/12/uefi-nx-linux-boot/

While the sd-stub EFI code itself is NX ready, it is more useful
to think of it as one unit of execution together with the kernel
it embeds, as that's what it is used for.

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

(cherry picked from commit 4f9f0e504113a9b5c7ce3806d0726d2fb4179422)

2 months agoTEST-45-TIMEDATE: rotate journal before parsing log message
Yu Watanabe [Mon, 1 Sep 2025 23:34:26 +0000 (08:34 +0900)] 
TEST-45-TIMEDATE: rotate journal before parsing log message

Similar to 04ade57a4233750f45fbc5fa2b5f52adfb435de5.

Fixes the following failure (long line is wrapped):
```
TEST-45-TIMEDATE.sh[234]: + journalctl --sync
TEST-45-TIMEDATE.sh[234]: + for _ in {0..9}
TEST-45-TIMEDATE.sh[234]: + journalctl -q -n 1 '--since=2025-09-01 17:09:25.442936' -p info -t busctl --grep .
TEST-45-TIMEDATE.sh[363]: Sep 01 17:09:25 H busctl[351]: {"type":"signal","endian":"l","flags":1,"version":1,
  "cookie":67,"timestamp-realtime":1756746565578529,"sender":":1.11","path":"/org/freedesktop/timedate1",
  "interface":"org.freedesktop.DBus.Properties","member":"PropertiesChanged","payload":{"type":"sa{sv}as",
    "data":["org.freedesktop.timedate1",{"NTP":{"type":"b","data":false}},[]]}}
TEST-45-TIMEDATE.sh[366]: ++ journalctl -q -n 1 '--since=2025-09-01 17:09:25.442936' -p info -t busctl -o cat
TEST-45-TIMEDATE.sh[367]: ++ jq -r '.payload.data[1].NTP.data'
TEST-45-TIMEDATE.sh[366]: Journal file /run/log/journal/07946b7846564ac0ad1c86e8cabed329/system.journal is truncated, ignoring file.
TEST-45-TIMEDATE.sh[234]: + [[ '' == \f\a\l\s\e ]]
```

(cherry picked from commit cbbed2bd4410fda51f11eb1cb6155eda40e2fa8c)

2 months agoman: loader.conf(5): document auto-reboot/auto-poweroff
Felix Pehla [Sat, 30 Aug 2025 14:09:53 +0000 (16:09 +0200)] 
man: loader.conf(5): document auto-reboot/auto-poweroff

These options were added in v255 with commit
cb341090d061084accc9a45ec4b1d258954adba2, but were not documented as
standalone options in loader.conf. See #29440 for more information.

(cherry picked from commit 823fc6e9f7003fcd3f93713835b49ca91941787d)

2 months agounits: portabled requires /dev/loop-control
Yu Watanabe [Thu, 28 Aug 2025 20:34:32 +0000 (05:34 +0900)] 
units: portabled requires /dev/loop-control

Fixes #38692.

(cherry picked from commit 8c0cad97c756f6094a451a879cfa18d49456e177)

2 months agotree-wide: avoid logging 2 error messages if table_print_with_pager() fails
Antonio Alvarez Feijoo [Thu, 28 Aug 2025 12:09:50 +0000 (14:09 +0200)] 
tree-wide: avoid logging 2 error messages if table_print_with_pager() fails

`table_print_with_pager()` already calls `table_log_print_error()` internally if
there is an error.

(cherry picked from commit 3eb590f2b0060b6f2c08632fa48c92b256ad3ba0)

2 months agotest: ensure that reload updates DNSSEC and DNSOverTLS on link scopes
Nick Rosbrook [Fri, 22 Aug 2025 17:36:48 +0000 (13:36 -0400)] 
test: ensure that reload updates DNSSEC and DNSOverTLS on link scopes

(cherry picked from commit 1be088c2995f6f22767a4a58e7b51c3642930805)

2 months agotest: use numeric prefixes in resolved.conf.d overrides
Nick Rosbrook [Fri, 22 Aug 2025 19:00:38 +0000 (15:00 -0400)] 
test: use numeric prefixes in resolved.conf.d overrides

There are a lot of resolved.conf.d drop-ins used in these tests. Use
proper numeric prefixes, especially to avoid confusion with sorting
relative to test.conf.

Make the test base config 10-test.conf, and use 90-*.conf elsewhere.

(cherry picked from commit f818c3d6b6f09614531a367c03ad7b5f36e9fe6c)

2 months agoresolve: re-create link unicast scopes on reload
Nick Rosbrook [Fri, 22 Aug 2025 14:46:50 +0000 (10:46 -0400)] 
resolve: re-create link unicast scopes on reload

On reload, resolved does not apply new DNSSEC= (or DNSOverTLS=) settings
on links, because the link unicast scopes are not re-created. However,
the servers and link states are updated correctly, so resolvectl and link
state files do show the new setting, leading users to believe the change
took effect immediately, the same way `resolvectl dnssec` does.

Fix this by freeing all of the link unicast scopes during reload, so
that they are re-created with the new settings in link_allocate_scopes().

(cherry picked from commit 6d2247208973fd40a4c8f7cc11f11c09470d074c)

2 months agoresolve: include DNSSEC and DNSOverTLS modes in dumps
Nick Rosbrook [Fri, 22 Aug 2025 15:34:17 +0000 (11:34 -0400)] 
resolve: include DNSSEC and DNSOverTLS modes in dumps

This is useful for testing and debugging. E.g., one can examine the
active DNSSEC mode of the scope using:

$ resolvectl show-cache

(cherry picked from commit 71da422058e1512636e0291f17e4d55f5413db5e)

2 months agobootctl: do not fail on removing unfied kernel image
Yu Watanabe [Mon, 25 Aug 2025 16:43:10 +0000 (01:43 +0900)] 
bootctl: do not fail on removing unfied kernel image

A boot loader entry for a unified kernel image has
BootEntry.kernel : path to the image relative to ESP or XBOOTLDR,
BootEntry.path   : path to the image.
Hence, these two effectively point to the same file.

Hence, by unlink command, the image is removed by
```
deref_unlink_file(&known_files, e->kernel, e->root);
```
then later tried again by
```
r = chase_and_unlink(e->path, root, ...);
```
and of course it fails with -ENOENT.

Let's ignore the failure there. We already ignore ENOENT on removal
at various places, especially in deref_unlink_file().

Fixes #38706.
Follow-ups for 8702496bfb0205764569782a9a2ebd11fd80e5e8.

(cherry picked from commit 37d1f1573b859e61df46bed4648fa60da5b60102)

2 months agocore: fix typo
Yu Watanabe [Mon, 25 Aug 2025 19:54:16 +0000 (04:54 +0900)] 
core: fix typo

Follow-up for b3415f5daef49642be3d5f417b8880c078420ff7.

(cherry picked from commit dac478c44cee20f584baf9c8fde2a4460839e902)

2 months agotmpfiles: don't relabel files in dry run mode
Jan Fooken [Fri, 22 Aug 2025 09:26:25 +0000 (11:26 +0200)] 
tmpfiles: don't relabel files in dry run mode

tmpfiles attempts to correct the label of a file during various actions
via the function fd_set_perms().  Currently, said function generally
respects the dry-run mode.  However, it attempts to fix the label of a
given file regardless of the state of said dry-run mode.

This causes problems, because a user could attempt to run tmpfiles with
elevated permissions and dry run enabled, expecting the tool to not
modify their system.  Instead, tmpfiles would falsely relabel a file,
modifying their system.

This commit explicitly checks for when dry-run is enabled and skips the
file relabelling process.  Furthermore, I added logging for both cases.
I found helpful during debugging.  That said, I don't think it's
necessary to use the level LOG_INFO on the dry-run path, as it would
always produce an info log.

(cherry picked from commit 7bb8e9e82f1b53081ad60ae71ff7045495130cd6)

2 months agocore/unit: use UNIT_FOREACH_DEPENDENCY_SAFE() at several more places
Yu Watanabe [Thu, 21 Aug 2025 17:06:43 +0000 (02:06 +0900)] 
core/unit: use UNIT_FOREACH_DEPENDENCY_SAFE() at several more places

manager_add_job() -> transaction_add_job_and_dependencies() may update
dependencies when a unit is not loaded yet. Hence, we need to restart
dependency loop in that case.

Follow-up for b7777d08846033859c5b734317fbbbfcca4cafcb (#37465).
Fixes #38676.

(cherry picked from commit 64fc4917b9149ffe6defaf5ceaf3236324537a3f)

2 months agoman: unify spelling of OS-specific
Jörg Behrmann [Mon, 25 Aug 2025 12:37:15 +0000 (14:37 +0200)] 
man: unify spelling of OS-specific

(cherry picked from commit 717500702060c80664c23c74bdc42675c0806fd9)

2 months agotools: ignore root element explicitly in check-version-history
Jörg Behrmann [Wed, 20 Aug 2025 13:47:28 +0000 (15:47 +0200)] 
tools: ignore root element explicitly in check-version-history

Currently these messages (broken for length)

    2025-08-20T12:04:15.9609277Z
    /home/runner/work/systemd/systemd/tools/check-version-history.py:26:
    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 './/funcprototype/funcdef/function'

can be seen in CI output. So let's apply the suggestion.

(cherry picked from commit 1dcbb0b4ca48fe69e2984943d536c3f4252b12b1)

2 months agoTEST-46-HOMED: cleanup homedsshtest earlier
Yu Watanabe [Wed, 20 Aug 2025 18:14:29 +0000 (03:14 +0900)] 
TEST-46-HOMED: cleanup homedsshtest earlier

(cherry picked from commit 5fb7b67556b10ae261d37504c202832027ca1317)

2 months agohomed: do not print sensitive data when debug logging is enabled
Yu Watanabe [Wed, 20 Aug 2025 18:36:36 +0000 (03:36 +0900)] 
homed: do not print sensitive data when debug logging is enabled

(cherry picked from commit dd712ba9c4016bc048ff59e2e935fe9b762294b7)

2 months agoUpdate syscalls tables
Luca Boccassi [Wed, 20 Aug 2025 12:06:58 +0000 (13:06 +0100)] 
Update syscalls tables

ninja -C build update-syscall-tables update-syscall-header

(cherry picked from commit 27a1e162a142482f549bbaf5353768c2f8098074)

2 months agosyscalls-table: add sh and regenerated table
Luca Boccassi [Fri, 25 Jul 2025 11:04:44 +0000 (12:04 +0100)] 
syscalls-table: add sh and regenerated table

(cherry picked from commit a50c687b013e32560c29ea0fa0c3d7e5555e0971)

2 months agoRevert "resolved: don't wait for TLS close_notify replies unnecessarily"
Luca Boccassi [Mon, 18 Aug 2025 12:38:32 +0000 (13:38 +0100)] 
Revert "resolved: don't wait for TLS close_notify replies unnecessarily"

This change introduced a regression that stops DNSOverTLS from working
after some time. Revert it for now, as there's no fixup available at
the moment.

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

This reverts commit 12a455db368340733ac9a701d9a5864b612d3408.

(cherry picked from commit e9caf17f6312c16762ade266fa2a8acddf3eb763)

2 months agonspawn: fix --link-journal=host with --private-users=pick and friends
Yu Watanabe [Mon, 18 Aug 2025 15:13:48 +0000 (00:13 +0900)] 
nspawn: fix --link-journal=host with --private-users=pick and friends

Fixes #38611.

(cherry picked from commit 88fce090263ba8944cf491346eae2e8022dfd88d)

2 months agotest: fix typo
Yu Watanabe [Tue, 19 Aug 2025 21:30:16 +0000 (06:30 +0900)] 
test: fix typo

(cherry picked from commit 045227426e29e92a5d9b682b399c216a529a0d18)

2 months agotest: also edit /etc/os-release if it's not a symlink when patching /usr/lib/os-relea...
Luca Boccassi [Tue, 19 Aug 2025 11:32:00 +0000 (12:32 +0100)] 
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
(cherry picked from commit b1cd38e893c5a0d353e2112acfc701ed29449c5e)

2 months agoimportd: accept a single space as SHA256SUMS separator
Lennart Poettering [Tue, 19 Aug 2025 07:23:07 +0000 (09:23 +0200)] 
importd: accept a single space as SHA256SUMS separator

The SHA256SUMS files provided by https://images.linuxcontainers.org/
are slightly non-conforming, insted of using " *" or "  " as separator
between hash and file name they use " ". Let's accept that too, in the
interest of maximizing compatibility.

(cherry picked from commit 265386ba35463bf38f309cce7ef0dc78769eb2b3)

2 months agocryptsetup: reference right variable
Lennart Poettering [Mon, 18 Aug 2025 07:30:19 +0000 (09:30 +0200)] 
cryptsetup: reference right variable

Fixes: #38576
(cherry picked from commit b5be05a106a205e845556442b28ff8262ad08e2c)

2 months agodocs: fix typo
Salim B [Sun, 17 Aug 2025 19:37:12 +0000 (21:37 +0200)] 
docs: fix typo

(cherry picked from commit d92990c783e884c56eb8a69cf128a2b332c7357f)

2 months agocore/service: do not reset watchdong when unit is frozen
Yu Watanabe [Sat, 16 Aug 2025 16:00:37 +0000 (01:00 +0900)] 
core/service: do not reset watchdong when unit is frozen

Even watchdog for a service is stopped when freezing the unit is
requested, sd-notify message WATCHDOG=1 or friends may come after
that due to ordering of event priority. In that case,
service_reset_watchdog() is called for frozen unit and thus previously
watchdog was reenabled.

Follow-up for 25178aadb2bd04ef9e63f48c1ef42fb309f9332e.
Fixes #38551 (the second failure case).

(cherry picked from commit 0cf84c9a60eb833252c77ab96ef2d4f094f39dc1)

2 months agotest: fix typo in comment
Luca Boccassi [Sat, 16 Aug 2025 09:53:07 +0000 (10:53 +0100)] 
test: fix typo in comment

(cherry picked from commit 855b6b77e0333ed9217ea01344ee7c1415d3e0b6)

2 months agomkosi: install util-linux-script on F44
Luca Boccassi [Thu, 14 Aug 2025 15:43:38 +0000 (16:43 +0100)] 
mkosi: install util-linux-script on F44

Once F41 is EOL we can just move this to the main list and
stop doing this dance every 6 months

(cherry picked from commit 57aeb4a403bd6897b99f07c6efa9e8618df55731)

2 months agoman: add missing comma
Yu Watanabe [Thu, 14 Aug 2025 14:33:39 +0000 (23:33 +0900)] 
man: add missing comma

(cherry picked from commit 4fd9b83c209b34ada9ba7111123a6eb7acc54868)

2 months agoTEST-72-SYSUPDATE: fix indentation and drop space in blank line
Yu Watanabe [Wed, 13 Aug 2025 14:53:13 +0000 (23:53 +0900)] 
TEST-72-SYSUPDATE: fix indentation and drop space in blank line

(cherry picked from commit 53878b5b3e50539d40d5a5da9da0968e84770bf8)

2 months agoTEST-72-SYSUPDATE: make randomly generated image file not have compression header
Yu Watanabe [Wed, 13 Aug 2025 06:57:15 +0000 (15:57 +0900)] 
TEST-72-SYSUPDATE: make randomly generated image file not have compression header

Otherwise, the generated image may be wrongly detected as compressed,
and importing the image may fail:
```
[   35.194578] TEST-72-SYSUPDATE.sh[411]: + dd if=/dev/urandom of=/var/tmp/test-72-N7uTeO/source/part1-v5.raw bs=4096 count=2048
[   35.236342] TEST-72-SYSUPDATE.sh[1075]: 2048+0 records in
[   35.236342] TEST-72-SYSUPDATE.sh[1075]: 2048+0 records out
[   35.236342] TEST-72-SYSUPDATE.sh[1075]: 8388608 bytes (8.4 MB, 8.0 MiB) copied, 0.0408601 s, 205 MB/s
(snip)
[   35.948634] TEST-72-SYSUPDATE.sh[1085]: \ Acquiring /var/tmp/test-72-N7uTeO/source/part1-v5.raw → /proc/self/fd/3p2...
[   35.952878] TEST-72-SYSUPDATE.sh[1085]: Successfully forked off '(sd-import-raw)' as PID 1089.
[   35.958952] TEST-72-SYSUPDATE.sh[1089]: Importing '/var/tmp/test-72-N7uTeO/source/part1-v5.raw', saving at offset 9437184 in '/dev/loop0'.
[   35.959575] TEST-72-SYSUPDATE.sh[1089]: Failed to decode and write: Input/output error
[   35.959575] TEST-72-SYSUPDATE.sh[1089]: Exiting.
```

Fixes #38524.

(cherry picked from commit 535539222d0636fade66236d4d1603f49a6c7a13)

2 months agoimport: add a debugging log of importing blob
Yu Watanabe [Wed, 13 Aug 2025 06:26:35 +0000 (15:26 +0900)] 
import: add a debugging log of importing blob

This should be helpful for debugging issue #38524.

(cherry picked from commit 2633ed01caa93a7bf909fc2c6ee4af1ff6fb48d4)

2 months agodetect-virt: bare-metal GCE only for x86 and i386
keentux [Wed, 13 Aug 2025 07:52:12 +0000 (09:52 +0200)] 
detect-virt: bare-metal GCE only for x86 and i386

From the previous changes, bare-metal support has been added by using
the `detect_vm_cpuid()` which works only for x86_64 and i386 architecture.
Do not use this change for other architectures to avoid wrong result of
the detect-virt tool.

Follow-up for fb71571d3a4efddeb44f02939304be9007301974.
Fixes #38125.

(cherry picked from commit 3e14d02500cd213a4a364961125c4e39423b51e5)

2 months agobootctl: specify that kernel image commands require a kernel image argument
Antonio Alvarez Feijoo [Wed, 13 Aug 2025 09:15:33 +0000 (11:15 +0200)] 
bootctl: specify that kernel image commands require a kernel image argument

(cherry picked from commit 13358b7ce2bfd2a08e2fe684aa0801a68f81e9ca)

2 months agoTEST-38-FREEZER: use 'systemctl show' to get freezer state
Yu Watanabe [Wed, 13 Aug 2025 03:30:25 +0000 (12:30 +0900)] 
TEST-38-FREEZER: use 'systemctl show' to get freezer state

Also, use timeout command for waiting freezer state applied.

(cherry picked from commit ee76ac1411549dc5517b2c58ff1dc84f01c24183)

2 months agoTEST-38-FREEZER: check if watchdog is not restarted by systemctl daemon-reload or...
Yu Watanabe [Tue, 12 Aug 2025 06:44:02 +0000 (15:44 +0900)] 
TEST-38-FREEZER: check if watchdog is not restarted by systemctl daemon-reload or daemon-reexec

(cherry picked from commit 0e25939a9de04ec3b826757a939294013afd2fa0)

2 months agocore/service: do not start watchdog on frozen unit when service manager is reloaded...
Yu Watanabe [Tue, 12 Aug 2025 06:35:21 +0000 (15:35 +0900)] 
core/service: do not start watchdog on frozen unit when service manager is reloaded or reexecuted

Otherwise, when service manager is reloaded or reexecuted, watchdong
will be started for frozen services, and they may be killed after
timeout.

Fixes #38551.

(cherry picked from commit c70816fd09a0e37732f48f204be282fda09918cf)

2 months agotest-cgroup: cleanup test cgroup
Luca Boccassi [Tue, 12 Aug 2025 22:59:15 +0000 (23:59 +0100)] 
test-cgroup: cleanup test cgroup

One test cgroup gets left behind by the test, as it moves itself
into it. Move itself and back to the original cgroup at the end
and clean up.

This fixes a failure when running the test first as root, and then
as unprivileged (initial cleanup fails as the leftover test cgroup
is owned by root).

(cherry picked from commit 998bb9600e3e3d5f2db93508a69657e197e7f5b7)

2 months agoCI: run ruff format before ruff check
Luca Boccassi [Tue, 12 Aug 2025 22:40:11 +0000 (23:40 +0100)] 
CI: run ruff format before ruff check

Otherwise you get a failure but no hint on how to fix it

(cherry picked from commit e1311b10f808bd3a9897cd744e0823bbe1e65fc7)

2 months agotpm2-util: copy serialized result in tpm2_serialize()
Yu Watanabe [Fri, 8 Aug 2025 02:27:21 +0000 (11:27 +0900)] 
tpm2-util: copy serialized result in tpm2_serialize()

For safety, though typically Esys_Free() is just a simple wrapper of
free(), but let's do unconditionally. See the comment in the code.

While at it, this makes it store the result into struct iovec.

(cherry picked from commit 48d06b99e6a048d5adc90851cceef89621b8b517)

2 months agotpm2-util: gracefully skip deserialization when no input
Yu Watanabe [Fri, 8 Aug 2025 02:07:30 +0000 (11:07 +0900)] 
tpm2-util: gracefully skip deserialization when no input

While at it, this also makes tpm2_deserialize() take struct iovec.

Fixes #38507.

(cherry picked from commit 8d40f3f42e04bf45d337e9b03d0750f3f34b92bb)

2 months agopcrlock: make-policy should use path specified by --policy= rather than --pcrlock
Yu Watanabe [Fri, 8 Aug 2025 04:09:14 +0000 (13:09 +0900)] 
pcrlock: make-policy should use path specified by --policy= rather than --pcrlock

Follow-up for a43427013949c6593629f551cf46e9cf9c167100.
Fixes #38506.

(cherry picked from commit 59c26be53c1181af3856cd16aad72a4524b17507)

2 months agoinclude: update kernel headers from v6.17-rc2
Luca Boccassi [Tue, 2 Sep 2025 20:46:34 +0000 (21:46 +0100)] 
include: update kernel headers from v6.17-rc2

2 months agotest: add coverage for kernel keyring in TEST-50-DISSECT
Luca Boccassi [Fri, 8 Aug 2025 21:59:45 +0000 (22:59 +0100)] 
test: add coverage for kernel keyring in TEST-50-DISSECT

Use the kernel keyring to verify images in the dissect test.
The userspace keyring is still covered by the DDI and mountfsd tests.

(cherry picked from commit 208ba34a43c5372131406329bccf026abef026ed)

2 months agoman: fix links
Zbigniew Jędrzejewski-Szmek [Sun, 10 Aug 2025 11:38:44 +0000 (13:38 +0200)] 
man: fix links

Found using linkchecker.
For virtiofsd, the man page is maintained upstream, but doesn't seem to be
available in any of the usual places. So let's link to the Debian version.
systemd.filter I have no idea what it is.

(cherry picked from commit f8976ad3c16d74967ef29b011d1d50e8d55fbc3e)

2 months agoservice: stop/reset watchdog on freeze/thaw
Luca Boccassi [Fri, 8 Aug 2025 19:08:20 +0000 (20:08 +0100)] 
service: stop/reset watchdog on freeze/thaw

Otherwise the unit will be killed by the watchdog given it's frozen
but the clock keeps ticking

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

(cherry picked from commit 25178aadb2bd04ef9e63f48c1ef42fb309f9332e)

2 months agoci: add mkosi job for debian stable
Luca Boccassi [Sat, 9 Aug 2025 14:09:35 +0000 (15:09 +0100)] 
ci: add mkosi job for debian stable

Debian 13 has just been released and can build and run everything,
so add CI coverage for it

(cherry picked from commit 5ecd16be685e2634fa00db76f146d0df20898888)

2 months agoman: add sd-path page
Zbigniew Jędrzejewski-Szmek [Sun, 10 Aug 2025 11:20:01 +0000 (13:20 +0200)] 
man: add sd-path page

We have similar pages for other parts of libsystemd too.

(cherry picked from commit ee1ded6cd6a7247e9ec64f2220af05325bcf3b33)

2 months agonetwork/bridge-vlan: fix segfault
Yu Watanabe [Fri, 8 Aug 2025 10:39:28 +0000 (19:39 +0900)] 
network/bridge-vlan: fix segfault

Fixes a bug introduced by 78738adf88ad288a6af37a1998adc749ac6b5f2d.
Fixes #38515.

(cherry picked from commit 570210eb281f33e4c013cfdabc142838691aaa9f)

2 months agomkosi: include ip in the main image
Franck Bui [Thu, 7 Aug 2025 12:57:32 +0000 (14:57 +0200)] 
mkosi: include ip in the main image

It's needed by TEST-85-NETWORK.

(cherry picked from commit 1f05d6a0de324ba574fa644ed6993b307e98be81)

2 months agologging: Improve logging messages related to NFTSet.
Kevin P. Fleming [Wed, 6 Aug 2025 21:33:31 +0000 (17:33 -0400)] 
logging: Improve logging messages related to NFTSet.

The 'NFTSet' directive in various units adds and removes entries in nftables
sets, it does not add or remove entire sets. The logging messages should
indicate that an entry was added or removed, not that a set was added or
removed.

(cherry picked from commit 2fe2ee9adb18347efc0f6856830b63ba0aa874a2)

2 months agotest: use Europe/Helsinki instead of Europe/Kyiv in test-calendarspec
Luca Boccassi [Wed, 6 Aug 2025 13:33:10 +0000 (14:33 +0100)] 
test: use Europe/Helsinki instead of Europe/Kyiv in test-calendarspec

Europe/Kyiv was added somewhat recently. Use Europe/Helsinki which is
much older and thus works with older tzdata like version 2022a.

line 193: "2016-03-27 03:17:00" new_tz=:Europe/Kyiv
At: Sun 2016-03-27 03:17:00.000000 Europe
Assertion 'r == -ENOENT' failed at src/test/test-calendarspec.c:70, function _test_next(). Aborting.

Follow-up for aa077884c13769ae3bd6aa98978b4ac9e64b5365

(cherry picked from commit f391d6c9ba1277a2d148f30db18fc615763a834d)

2 months agoci: add build job on Ubuntu Jammy with Python 3.7
Luca Boccassi [Wed, 6 Aug 2025 11:42:35 +0000 (12:42 +0100)] 
ci: add build job on Ubuntu Jammy with Python 3.7

In order to avoid regressions with glibc < 2.39 and Python 3.7

(cherry picked from commit 4f49a6f572043dbc3a302302464fad5ffbd40e01)

2 months agotest: fix repeated runs of test-oomd-util by clearing test cgroup
Luca Boccassi [Wed, 6 Aug 2025 13:07:26 +0000 (14:07 +0100)] 
test: fix repeated runs of test-oomd-util by clearing test cgroup

If the test is ran multiple times in a row, without an ephemeral
scope (eg: non-booted nspawn), then subsequent runs will fail as
the test cgroup is not cleared so the previous xattrs are still
present. Trim the test cgroup before and after the test.

Follow-up for 61ff7397d08375ce0950fb7b546c08e4a657f273

(cherry picked from commit 0d333ed8e302e48efdfc26cb4c8e467a4863f460)