]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
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)

2 months agonetwork: fix build with libbpf < 0.7
Luca Boccassi [Wed, 6 Aug 2025 11:58:20 +0000 (12:58 +0100)] 
network: fix build with libbpf < 0.7

bpf_loop() and bpf_strncmp(), used by sysctl-monitor, were introduced
in libbpf 0.7, so skip the module if using an older version

Follow-up for 6d9ef22acdeac4b429efb75164341233955484af

(cherry picked from commit 7108a882b34789be203cc6a9a3f7722f1929f21f)

2 months agoukify: fix insertion of padding in merged sections
Zbigniew Jędrzejewski-Szmek [Tue, 19 Aug 2025 09:02:44 +0000 (11:02 +0200)] 
ukify: fix insertion of padding in merged sections

The padding was done to expand the new section contents to the expected size of
the new section. And this then would be used for the content in the existing
section. The new section cannot be larger than the old section, but it can be
smaller. If the new section was smaller, then we'd not write enough padding and
the output file would be corrupted.

This was observed in CI when the .sbat section in the stub was padded to 1k.
The UKI with an .sbat section that was merged and was fairly short would hit
this scenario and be corrupted.

(cherry picked from commit ec1d031f3de02f84beca89e2b402d085fba62be4)

3 months agomeson: bump version to 257.8 v257.8
Luca Boccassi [Tue, 5 Aug 2025 15:31:37 +0000 (16:31 +0100)] 
meson: bump version to 257.8

3 months agounits: Order systemd-oomd after systemd-sysusers
Daan De Meyer [Sat, 21 Dec 2024 16:01:27 +0000 (17:01 +0100)] 
units: Order systemd-oomd after systemd-sysusers

systemd-sysusers might create the systemd-oom system user that
systemd-oomd runs under so let's order systemd-oomd after
systemd-sysusers.

(cherry picked from commit 36dd4296806b5541eb67cd13c535eb0fe3213121)

3 months agoTEST-74-AUX-UTILS: fail earlier when systemd-run fail to reconnect to bus
Yu Watanabe [Mon, 10 Mar 2025 19:27:18 +0000 (04:27 +0900)] 
TEST-74-AUX-UTILS: fail earlier when systemd-run fail to reconnect to bus

Note, the default timeout for systemctl daemon-reload is 270 seconds.
Hence, 300 seconds should be enough.

(cherry picked from commit 07355061db88d95b81cfdc3510eb57a0940daac1)

3 months agoTEST-23-UNIT-FILE: skip verifying masked unit
Yu Watanabe [Mon, 10 Mar 2025 19:21:11 +0000 (04:21 +0900)] 
TEST-23-UNIT-FILE: skip verifying masked unit

This fixes the following failure:
TEST-23-UNIT-FILE.sh[2408]: + systemd-analyze --recursive-errors=no --man=no verify /usr/lib/systemd/system/sysinit.target.wants/systemd-hwdb-update.service
systemd-analyze[2737]: sys-kernel-config.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: proc-sys-fs-binfmt_misc.automount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: dev-hugepages.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: sys-kernel-tracing.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: sys-kernel-debug.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: sys-fs-fuse-connections.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: dev-mqueue.mount: symlinks are not allowed for units of this type, rejecting.
systemd-analyze[2737]: Unit systemd-hwdb-update.service is masked.
TEST-23-UNIT-FILE.sh[166]: + :
TEST-23-UNIT-FILE.sh[166]: + kill -0 2408
TEST-23-UNIT-FILE.sh[166]: + wait 2408
TEST-23-UNIT-FILE.sh[166]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE.verify-unit-files.sh failed'
TEST-23-UNIT-FILE.sh[166]: Subtest /usr/lib/systemd/tests/testdata/units/TEST-23-UNIT-FILE.verify-unit-files.sh failed

(cherry picked from commit e5e7cc9a98155b031d9855527da08ac87617f427)

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

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

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

Follow-up for 5ad6fe9850e0ecad7415bfbdd547d07b9b1177c7.

(cherry picked from commit 3d4977a12b0ed298c02fb3b757961de3229ce025)

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

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

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

Co-authored-by: Deli Zhang <deli.zhang@cloud.com>
(cherry picked from commit 406d8cb029db9801585e6779e9cefc29bf4b79e4)

3 months agohwdb: update to main@{2025-08-04} 38477/head
Luca Boccassi [Mon, 4 Aug 2025 16:49:08 +0000 (17:49 +0100)] 
hwdb: update to main@{2025-08-04}

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

3 months agotest: Fix typing error in integration-test-wrapper.py
Daan De Meyer [Thu, 10 Apr 2025 18:38:49 +0000 (20:38 +0200)] 
test: Fix typing error in integration-test-wrapper.py

(cherry picked from commit beecd4e3446c1159d85e148f12e1a58f6878c4f2)

3 months agojournal-file: let's make journal_file_copy_entry() robust against concurrent writing...
Lennart Poettering [Wed, 4 Jun 2025 15:00:29 +0000 (17:00 +0200)] 
journal-file: let's make journal_file_copy_entry() robust against concurrent writing of the source

As usual, we need to protect ourselves against concurrent modification
of journal files. We a pretty good at that these days when reading
journal files. But journal_file_copy_entry() so far wasn't too good with
that. journal_file_append_data() so far returned EINVAL when you pass
invalid data to it. Since we pass the source data as-is in there, it's
going to fail if the journal source file is slightly invalid due to a
concurrent update.

Hence, we need to validate data gracefully here that we think comes from
a safe place, because actually it doesn't, it's directly copied from an
unsafe journal file.

Hence, let's introduce a clear error code here, and look for it in
journal_file_copy_entry(), and handle it gracefully.

Pretty sure this fixes #33372, but it's a race, so I don't know for
sure. If this remains reproducible we need to look at this again.

Fixes: #33372
(cherry picked from commit 9151a60a4e0c36bcf06463a78ad3e81b9bcbf47c)

3 months agocompress: get rid of a bunch of 'else'
Lennart Poettering [Wed, 4 Jun 2025 15:00:21 +0000 (17:00 +0200)] 
compress: get rid of a bunch of 'else'

(cherry picked from commit e74c1e1cac587fb5832ab46d709913c0f3792ff0)

3 months agojournal: replace a bunch of assert() with friendlier checks
Lennart Poettering [Thu, 5 Jun 2025 20:26:03 +0000 (22:26 +0200)] 
journal: replace a bunch of assert() with friendlier checks

We should not rely that data stored in the journal files remains
entirely untouched at all times. Because we unallocate files, data might
go away any time. Hence, never assert() on any expectations on what the
file contains. Instead, handle it more gracefully as a corruption issue,
and return EBADMSG.

Fixes: #35229 #32436
(cherry picked from commit 5ee8b3edb385b216eb4f3316323ae1287824971a)

3 months agojournal: add 'const' at one more place
Lennart Poettering [Thu, 5 Jun 2025 20:25:33 +0000 (22:25 +0200)] 
journal: add 'const' at one more place

(cherry picked from commit 813facd3ba59865c127ebaf5eb8e8884e7ccb689)

3 months agojournal: determine compression once, not twice
Lennart Poettering [Thu, 5 Jun 2025 20:22:55 +0000 (22:22 +0200)] 
journal: determine compression once, not twice

This is just paranoia: let's determine the compression to use once,
instead of twice, after all te data is in journal files which might be
corrupted any time, and it would be weird if we came to different
results here each time.

(cherry picked from commit b16cb30edd9b008f8d3dcacb6b6abe8009fa5315)

3 months agojournal: use EBADMSG for invalid data in file mmap
Lennart Poettering [Thu, 5 Jun 2025 20:21:16 +0000 (22:21 +0200)] 
journal: use EBADMSG for invalid data in file mmap

We must assume that any data in the mmap can change anytime because the
file is deallocated or similar. Let's strictly use EBADMSG for reporting
invalid file contents though (as opposed to using EINVAL if our own code
passes a wrong parameter somwhere).

(cherry picked from commit 7d52a608438948b523681653550bc2e90ee9dc9b)

3 months agoterminal-util: switch from TCSADRAIN to TCSANOW for all tcsetattr() calls
Lennart Poettering [Wed, 25 Jun 2025 09:49:47 +0000 (11:49 +0200)] 
terminal-util: switch from TCSADRAIN to TCSANOW for all tcsetattr() calls

TCSADRAIN means tcsetattr() will become blocking (waiting for ability to
write out queued bytes), which is problematic, if the referenced TTY is
dead for some reason.

Since all these calls just modify *input* parameters anyway (i.e. mostly
local echo, and canonical mode), forcing out queued output is kinda
pointless anyway, hence just don't do it: leave it in the queue and just
change the flags we want to change.

The tcsetattr(3) man page kinda hints that we want to use TCSANOW here,
because it documents for TCSADRAIN:

"This option should be used when changing parameters that affect
output."

Which one can read so that TCSADRAIN should not be used if it doesn't
affect output, which is the case here.

This probably fixes: #37854

(cherry picked from commit f789b17e87b675acf1638a1801d9b16a377742e0)

3 months agoukify: fix parsing uname version with '+'
Luca Boccassi [Sat, 5 Jul 2025 20:10:01 +0000 (21:10 +0100)] 
ukify: fix parsing uname version with '+'

Debian started using '+' in the kernel uname version, which fails the
regex in ukify. Fix it.

(cherry picked from commit 6cc01c8cc48f4d5408fc43046cc8655170e8694b)

3 months agonetwork/bridge-vlan: allow to configure bridge vlan on stacked bridge master interface
Yu Watanabe [Fri, 11 Jul 2025 03:58:33 +0000 (12:58 +0900)] 
network/bridge-vlan: allow to configure bridge vlan on stacked bridge master interface

Fixes #38157.

(cherry picked from commit 78738adf88ad288a6af37a1998adc749ac6b5f2d)