]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 months agocryptsetup-tokens: Print tpm2-primary-alg: only when it is known
Vitaly Kuznetsov [Fri, 27 Feb 2026 13:20:20 +0000 (14:20 +0100)] 
cryptsetup-tokens: Print tpm2-primary-alg: only when it is known

When 'tpm2-primary-alg' is missing in LUKS JSON token, the output of
'cryptsetup luksDump' is always:

tpm2-primary-alg: ecc

because tpm2_parse_luks2_json() returns the default (TPM2_ALG_ECC). This can be
misleading and wrong. Make tpm2_parse_luks2_json() return the reality and move
the default to tpm2_unseal().

(cherry picked from commit 4883ef8aae80b0c1e69047c83b3830b9675db8e3)
(cherry picked from commit 0b4f049ecc8c69ef8b0671e762e9cbe3cd6284ab)
(cherry picked from commit b69a842e11fd70f9b6a31d6d42e09b5d434c114c)

2 months agocryptenroll: Save primary algorithm type to the LUKS token
Vitaly Kuznetsov [Fri, 27 Feb 2026 12:46:07 +0000 (13:46 +0100)] 
cryptenroll: Save primary algorithm type to the LUKS token

'tpm2-primary-alg' field is currently unset in LUKS JSON token both for the
case when SRK was used for enrolling (--tpm2-device-key=) and for the case when
SRK was obtained/generated (--tpm2-device=). While this information is not
really needed for unsealing (the sealed object itself has key type in it), it
may be convenient to see key type in e.g. 'cryptsetup luksDump' in the
situations where key type matters. Since 'tpm2-primary-alg' is already defined,
just set it properly in all cases.

(cherry picked from commit 295affa3f7b74fb8bc680db2d7539e110e6d9130)
(cherry picked from commit 2e2b25e66c7d6f367dcad63a1723a9f1e6e8e002)
(cherry picked from commit 8a7cad4e233160eb56f07479b5f7a448e9555f70)

2 months agoman: improve documentation for RestartSteps (#40879)
Val Markovic [Mon, 2 Mar 2026 03:38:35 +0000 (04:38 +0100)] 
man: improve documentation for RestartSteps (#40879)

I found the existing explanation of RestartSteps to be simply
impenetrable. Even providing the full docs context to several of our new
AI overlords resulted in wildly different (and completely incorrect)
explanations of the final restart intervals.

Digging through the code, I found the restart delay computation in
`service_restart_usec_next` in `src/core/service.c`.

I've updated the documentation for RestartSteps with an example,
suggested value range and a detailed enough explanation that accurately
describes the current behavior.

(cherry picked from commit 4724cf5526b5c6a08267d1b1bb23e962ebe60521)
(cherry picked from commit 7b1ea2374aa9834e41d4e444f54e25cc5bd7f7b9)
(cherry picked from commit 4479c8a0fa937f5e7dc0f519f5b184e3ad86f11a)

2 months agofix: check error with -ENOMEDIUM not ENOMEDIUM
Weixie Cui [Sun, 1 Mar 2026 04:47:32 +0000 (12:47 +0800)] 
fix: check error with -ENOMEDIUM not ENOMEDIUM

Signed-off-by: Weixie Cui <cuiweixie@gmail.com>
(cherry picked from commit 4980bd05b115261cb5dfbab69af9fdd3f5832493)
(cherry picked from commit 3c7ea0cf9fc219538cc6d7971e66bc769563fe5e)
(cherry picked from commit eeb2fb30f8f298c48f40c9a7f47f0e37b01fc886)

2 months agoimport: fix AlreadyInProgress Varlink error missing remote field
noxiouz [Fri, 27 Feb 2026 00:02:12 +0000 (00:02 +0000)] 
import: fix AlreadyInProgress Varlink error missing remote field

The handler sends the remote URL as a parameter via sd_varlink_errorbo()
but the IDL declared the error with no fields, making the payload
undiscoverable via introspection.

(cherry picked from commit c22a131e7438098e24239e8ed21a64ffb20631cc)
(cherry picked from commit 86586394fcf13129cf0cdb5fd75daebfdf9b873d)
(cherry picked from commit 66d294a24f524cc49283679997d9885bdcb696bf)

2 months agoudev-builtin-net_id: fix construction of USB specifier-based names
Jeremy Kerr [Tue, 9 Dec 2025 13:22:55 +0000 (22:22 +0900)] 
udev-builtin-net_id: fix construction of USB specifier-based names

Commit 0bac1ed242 ("tree-wide: Fix constness issues with newer glibc")
split a temporary var in get_usb_specifier to const and non-const
versions, but missed converting a couple of uses. This means we get
names of with components of:

 port: uN
 config: cC.I
 interface: iC.I

instead of:

 port: uN
 config: cC
 interface: iI

This results in net names like enu1c1.0i1.0, as we also no longer hit
the config==1 and interf==0 elision cases.

Change the config portion handling to start from the correct position,
and the earlier check for NULL.

(cherry picked from commit b10b4303c6332e6432debb6664bc30ceddbe70f1)
(cherry picked from commit 8612c4c5e57b87b09fc69b8e0b6a2ea099a4c0f6)

2 months agomeson: bump version to 257.11 v257.11
Luca Boccassi [Sat, 28 Feb 2026 00:50:17 +0000 (00:50 +0000)] 
meson: bump version to 257.11

2 months agotree-wide: Fix constness issues with newer glibc 40868/head
Daan De Meyer [Tue, 25 Nov 2025 15:46:04 +0000 (16:46 +0100)] 
tree-wide: Fix constness issues with newer glibc

Latest glibc uses _Generic to have strstr() and other functions return
const char* or char* based on whether the input is a const char* or a
char*. This causes build failures as we previously always expected a char*.

Let's fix the compilation failures and add our own macros similar to glibc's
to have string functions that return a mutable or const pointer depending on
the input.

(cherry picked from commit 0bac1ed2422f15308414dd1e9d09812a966b0348)
(cherry picked from commit 1a2e23b88734ec4be3af2eca651ec75a56161c5f)

2 months agoerrno-list: filter out EFSBADCRC and EFSCORRUPTED
Yu Watanabe [Tue, 24 Feb 2026 11:19:45 +0000 (20:19 +0900)] 
errno-list: filter out EFSBADCRC and EFSCORRUPTED

These are introduced in kernel v7.0.

(cherry picked from commit 3cfb16998808a6ec8012a6120d0a82f0e1a0c8bb)
(cherry picked from commit f870952f69c453aeef0b4022d32bba4769d84238)
(cherry picked from commit 73e2fa308cfa49f599e104e599e1a479fd3d21e3)

2 months agoci: re-enable bpf-framework option for build and unit test jobs
Luca Boccassi [Fri, 17 Oct 2025 13:00:23 +0000 (14:00 +0100)] 
ci: re-enable bpf-framework option for build and unit test jobs

Use the same trickery we do in the package build and search for
the actual bpftool binary. For the CI job any one we find is
good enough.
When we switch all jobs to 26.04 we can drop all of this.

This reverts commit cc814110af7a453db898ea2990a0281616d5ceff.

(cherry picked from commit 3b11139c0db9dd0a37b0493a8d2ad5f531a92344)
(cherry picked from commit 30c2834e11cbb9ae425d31f16776a42668c5f25c)

2 months agoci: Disable bpf-framework option for build and unit test jobs
Daan De Meyer [Fri, 17 Oct 2025 09:53:48 +0000 (11:53 +0200)] 
ci: Disable bpf-framework option for build and unit test jobs

/usr/sbin/bpftool is completely broken inside containers on
Ubuntu which makes meson blow up so disable the bpf-framework
stuff to avoid the issue.

TODO: Drop when we move off Ubuntu Noble as this will be fixed
in the next Ubuntu LTS release.

(cherry picked from commit cc814110af7a453db898ea2990a0281616d5ceff)
(cherry picked from commit 279465a212a18f8d58fd1ef1df33bec2d740f757)

2 months agocore: validate input cgroup path more prudently
Mike Yuan [Thu, 26 Feb 2026 10:06:34 +0000 (11:06 +0100)] 
core: validate input cgroup path more prudently

(cherry picked from commit efa6ba2ab625aaa160ac435a09e6482fc63bdbe8)
(cherry picked from commit 3cee294fe8cf4fa0eff933ab21416d099942cabd)
(cherry picked from commit 1d22f706bd04f45f8422e17fbde3f56ece17758a)

2 months agocore/cgroup: avoid one unnecessary strjoina()
Mike Yuan [Thu, 26 Feb 2026 10:06:00 +0000 (11:06 +0100)] 
core/cgroup: avoid one unnecessary strjoina()

(cherry picked from commit 42aee39107fbdd7db1ccd402a2151822b2805e9f)
(cherry picked from commit 80acea4ef80a4bb78560ed970c34952299b890d6)
(cherry picked from commit b5fd14693057e5f2c9b4a49603be64ec3608ff6c)

2 months agosd-json: fix off-by-one issue when updating parent for array elements
Mike Yuan [Thu, 26 Feb 2026 10:07:39 +0000 (11:07 +0100)] 
sd-json: fix off-by-one issue when updating parent for array elements

Follow-up for 8525bb369a09f488ec77f94e1557ecc2343eb4ab

(cherry picked from commit 4e6e3b8707c84018051ae1885af20e06b2a5209e)
(cherry picked from commit 372158ab0037733d8fd549fef728446765f3bed5)
(cherry picked from commit 96751656c216fee967be03b03a0671c84191e454)

2 months agopath-util: invert PATH_STARTSWITH_ACCEPT_DOT_DOT flag
Lennart Poettering [Fri, 23 May 2025 04:45:40 +0000 (06:45 +0200)] 
path-util: invert PATH_STARTSWITH_ACCEPT_DOT_DOT flag

As requested: https://github.com/systemd/systemd/pull/37572#pullrequestreview-2861928094

(cherry picked from commit ceed11e465f1c8efff1931412a85924d9de7c08d)

2 months agopath-util: add flavour of path_startswith() that leaves a leading slash in place
Lennart Poettering [Mon, 19 May 2025 10:58:52 +0000 (12:58 +0200)] 
path-util: add flavour of path_startswith() that leaves a leading slash in place

(cherry picked from commit ee19edbb9f3455db3f750089082f3e5a925e3a0c)

2 months agomkosi: explicitly add mount package to build image
Luca Boccassi [Wed, 25 Feb 2026 23:12:28 +0000 (23:12 +0000)] 
mkosi: explicitly add mount package to build image

Some dependency changed in testing and it's not pulled in anymore:

‣  Running build script /home/runner/work/systemd/systemd/mkosi/mkosi.images/build/mkosi.conf.d/debian-ubuntu/mkosi.build.chroot…
/work/build-script: line 35: mount: command not found
‣ /work/build-script failed with non-zero exit code 127
‣ (Maybe a program was not found or the script interpreter (e.g. bash) is not installed?)
FAILED: [code=127] mkosi

(cherry picked from commit e27f740ba8c19db51de4a314d4afda4051631fde)
(cherry picked from commit c199f81d277ac782c421a2cd9d4aecbebf4a61fa)
(cherry picked from commit 939bad3bca786890981dec13c938c7d11904c79f)

2 months agoman: fix line breaking in ukify manpage
Luca Boccassi [Tue, 24 Feb 2026 21:56:48 +0000 (21:56 +0000)] 
man: fix line breaking in ukify manpage

Follow-up for 098e44d03cf1968434990b7d62a0e6221fc675e0

(cherry picked from commit 6d5018487c3d53f5bba146f20f69063183bf0077)
(cherry picked from commit df740560ac0fb3681a0b533abf550d468c195070)
(cherry picked from commit 87327a9c034500f79993318e8e0878becb2fe074)

2 months agoseccomp-util: add lsm_get_self_attr and lsm_list_modules to @default
Nick Rosbrook [Mon, 23 Feb 2026 20:25:27 +0000 (15:25 -0500)] 
seccomp-util: add lsm_get_self_attr and lsm_list_modules to @default

These syscalls are part of a newer kernel API to replace interaction
with /proc/self/attr, with the goal of allowing LSM stacking. These are
being used now by e.g. libapparmor, so should be more easily available
to services using seccomp filtering.

(cherry picked from commit 7a1888954c4a4666150a59125c2e6c92277bb4e2)
(cherry picked from commit 515816197e8155c3ddc4ab2092d23744509c37ea)
(cherry picked from commit 75cbe81bba6eb9fa9e8ad6a4937658aec6680f11)

2 months agosd-varlink: add a bit of debug logging indicating when exit-on-idle triggers
Lennart Poettering [Mon, 23 Feb 2026 12:22:44 +0000 (13:22 +0100)] 
sd-varlink: add a bit of debug logging indicating when exit-on-idle triggers

(cherry picked from commit a69dffbf4f450da7099a39bbe5ac11b0f04738dd)
(cherry picked from commit 4d0a076e66af200cd3bc5db183c67fdd0990dea6)
(cherry picked from commit c39f2d224d02e74e218cf68c85931512b854b6a0)

2 months agosd-varlink: use correct error variable
Lennart Poettering [Mon, 23 Feb 2026 12:22:27 +0000 (13:22 +0100)] 
sd-varlink: use correct error variable

(cherry picked from commit a0276f6e12c231c46add34e483458ae91ebfa379)
(cherry picked from commit 9d61fa735b0e2529d9b6ef22d67c431aaf7cabf3)
(cherry picked from commit d526e6d3d0667c0da23204d119cdaf18e26ef2e8)

2 months agosd-netlink: pin reply slot while we execute callback
Lennart Poettering [Mon, 23 Feb 2026 12:25:17 +0000 (13:25 +0100)] 
sd-netlink: pin reply slot while we execute callback

The callback might drop the last ref to the slot object, and we still
want to access it. Hence do what we usually do in these cases: keep an
extra reference while processing the callback.

(cherry picked from commit 332ecf40f24b291178ad370a448b6a5227700ae2)
(cherry picked from commit 597b269c08969c2b638be8eaec92d77faa92de19)
(cherry picked from commit ddc2030e3c9b9dc1013bcf1a84d1025fec97f076)

2 months agonetwork: enable LLDP for links that use only link-local addressing
Lennart Poettering [Sun, 22 Feb 2026 13:15:20 +0000 (14:15 +0100)] 
network: enable LLDP for links that use only link-local addressing

Links with link-local-only communication are typically peer-to-peer
links between two laptops or similar. In such cases it makes sense to be
able to see which device one is specifically connected to, hence let's
just enable LLDP for it. This doesn't leak any data really, given that
this is inherently local, and typically only used between isolated
systems that are under the same user's possession.

Background: I recently connected multiple laptops via thunderbolt networking
and was kinda annoyed not being able to see what system I was actually
talking to.

(Also, the file touched here is an example only anyway, so even if this
would leak too much info, it's not in effect by default)

(cherry picked from commit c8aa7b152f423cc2147afbb8b9245f056103d1f7)
(cherry picked from commit a9af5bcb337c81c338210d6bfda1e4b001e9901a)
(cherry picked from commit 9bd81571a457216d480821fb0f82af0158d510ac)

2 months agoman: coredump: MaxUse takes precedence
André Paiusco [Mon, 23 Feb 2026 16:43:09 +0000 (16:43 +0000)] 
man: coredump: MaxUse takes precedence

(cherry picked from commit cbd7b9033b65c210d5c99c1a79ba049466b25388)
(cherry picked from commit e9c06ed8417862fcc35707c27c62a4fc632388e7)
(cherry picked from commit ac65742b3dec8dd93d3818a865327d0a3071f862)

2 months agoman: coredump: KeepFree/MaxUse clarification of default values
André Paiusco [Mon, 23 Feb 2026 16:22:32 +0000 (16:22 +0000)] 
man: coredump: KeepFree/MaxUse clarification of default values

(cherry picked from commit 1e2c2a04fc03b7a9c4cf0c4a10a3a3f30917cdf3)
(cherry picked from commit 414be31cdfe092181dab676401c1c8ed64f2804f)
(cherry picked from commit b6f82d530fed26f5a23beb1fc5799a9cd2709b17)

2 months agounits/systemd-pcrlock.socket: drop [Install] section
Mike Yuan [Mon, 23 Feb 2026 08:20:54 +0000 (09:20 +0100)] 
units/systemd-pcrlock.socket: drop [Install] section

The socket is statically enabled.

(cherry picked from commit 5c247bbd577905a0b70ab89c4c56f8b4e71e4e1b)
(cherry picked from commit ba2391fed7147013f2e7481856b6d3be5a5972e4)
(cherry picked from commit 9a6dab7587472c9351411be0afdf97ae65824919)

2 months agorepart: return 1 from probe_sector_size_prefer_ioctl() on block device success
Nandakumar Raghavan [Thu, 19 Feb 2026 13:42:19 +0000 (13:42 +0000)] 
repart: return 1 from probe_sector_size_prefer_ioctl() on block device success

probe_sector_size() returns 1 when it successfully determines the sector size,
0 when falling back to the default. blockdev_get_sector_size() returns 0 on
success. probe_sector_size_prefer_ioctl() was passing blockdev_get_sector_size()
return value through directly, so caller is checking r > 0 to detect a
successfully probed sector size never saw it for block devices.

In context_load_partition_table(), this caused fs_secsz to stay at 4096 bytes
even on 512-byte sector block devices, making verity hash partition sizes wrong
unless --sector-size=512 was passed explicitly.

Fix by returning 1 on success from the block device path to match probe_sector_size()
convention.

(cherry picked from commit fd6506eb9a39ab2f7cfc7aed6532d8f80a504c44)
(cherry picked from commit a30a3bc6d3b9e509ba8073d270e8010659406881)
(cherry picked from commit c92922eeb33eba2cb1804abc6214a3ed694eae3c)

2 months agogenerate-sym-test: skip everything that is not a file
Zbigniew Jędrzejewski-Szmek [Thu, 19 Feb 2026 12:01:01 +0000 (13:01 +0100)] 
generate-sym-test: skip everything that is not a file

The generator looks for files in the filesystem, and it sometimes fails
on emacs "lock files" which are a symlink. Ignore those.

(cherry picked from commit 469879aa44c4cde5541b98be0a4421ab069c5834)
(cherry picked from commit 92657eea151b08a7619bc104af373329ed86a5d7)
(cherry picked from commit cb27449373c9c19c5b46dcf457658430f1eb72b9)

2 months agoopenssl-util: pass the UI callback for interactive PIN prompts
Kai Lüke [Thu, 19 Feb 2026 07:01:06 +0000 (16:01 +0900)] 
openssl-util: pass the UI callback for interactive PIN prompts

Observed with the tpm2 provider and the tpm2tss engine was that the
auth process failed because the provider/engine could not ask for the
PIN through the callback, resulting in:
  "Failed to load private key from ...: Input/output error"
Apparently the default UI method is not enough and the key setup
functions expect an explicit method.
Pass the existing UI method through as callback for the key setup.

(cherry picked from commit bad16f324acc2a4624dca18a6586306698da7d0a)
(cherry picked from commit 6242200238b76f82838d76142daa5bdee57444f3)
(cherry picked from commit 6957f06dce0456fb7a4d8d25762318d89b473146)

2 months agoxorg/50-systemd-user: import XAUTHORITY only if set
Dmytro Bagrii [Thu, 19 Feb 2026 00:27:47 +0000 (02:27 +0200)] 
xorg/50-systemd-user: import XAUTHORITY only if set

The warning will still be reported if XAUTHORITY is set but not exported.
However, such scenario is unlikely for xinitrc.d scripts environment.

Fixes #40745

Signed-off-by: Dmytro Bagrii <dimich.dmb@gmail.com>
(cherry picked from commit 8df975bb6781d89fa5331e59b5f742e755a4967b)
(cherry picked from commit 9902addee6bf49a9086cfcac65d6e66086ab9fcc)
(cherry picked from commit 582708b0197cc2e4cb4cdda39eb4f48c6dad4d62)

2 months agotest: do not fail TEST-86-MULTI-PROFILE-UKI if full TPM2 support not available
Luca Boccassi [Wed, 18 Feb 2026 15:39:11 +0000 (15:39 +0000)] 
test: do not fail TEST-86-MULTI-PROFILE-UKI if full TPM2 support not available

On a mkosi run on GHA:

[    9.547863] TEST-86-MULTI-PROFILE-UKI.sh[458]: + /usr/lib/systemd/systemd-measure --current
[    9.552790] TEST-86-MULTI-PROFILE-UKI.sh[463]: Measuring boot phases: enter-initrd, enter-initrd:leave-initrd, enter-initrd:leave-initrd:sysinit, enter-initrd:leave-initrd:sysinit:ready
[    9.553086] TEST-86-MULTI-PROFILE-UKI.sh[463]: Found container virtualization none.
[    9.553308] TEST-86-MULTI-PROFILE-UKI.sh[463]: Reading EFI variable /sys/firmware/efi/efivars/LoaderTpm2ActivePcrBanks-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f.
[    9.553486] TEST-86-MULTI-PROFILE-UKI.sh[463]: Loaded shared library 'libtss2-esys.so.0' via dlopen().
[    9.553676] TEST-86-MULTI-PROFILE-UKI.sh[463]: Loaded shared library 'libtss2-rc.so.0' via dlopen().
[    9.553867] TEST-86-MULTI-PROFILE-UKI.sh[463]: Loaded shared library 'libtss2-mu.so.0' via dlopen().
[    9.554050] TEST-86-MULTI-PROFILE-UKI.sh[463]: Sorry, system lacks full TPM2 support.
[FAILED] Failed to start TEST-86-MULTI-PROFILE-UKI.service - TEST-86-MULTI-PROFILE-UKI.

(cherry picked from commit 7112e4755eec5f8c3d107db548a535425904aa87)
(cherry picked from commit 06a22ee919d9b965629614b81350b011a0d31eff)
(cherry picked from commit a4896260f124876b03629be6597f7604953cecb5)

2 months agogithub/dependabot: set cooldown period
Dmitry V. Levin [Wed, 18 Feb 2026 08:00:00 +0000 (08:00 +0000)] 
github/dependabot: set cooldown period

By default, Dependabot does not perform any cooldown on dependency updates.
In other words, a regularly scheduled Dependabot run may perform an update
on a dependency that was just released moments before the run began.
This presents both stability and supply-chain security risks.

To mitigate these risks, explicitly set Dependabot cooldown period to 7 days.

Link: https://docs.zizmor.sh/audits/#dependabot-cooldown
(cherry picked from commit 31fc68a69acf4db48f26b83e845c703768f0f954)
(cherry picked from commit 093c9ad9f028e8bb84e3b55ff4b7a2f952a9adfd)
(cherry picked from commit ffc81522bbab70c8e7bb5348dd40121174459059)

2 months agoinclude: update kernel headers from v6.19
Yu Watanabe [Tue, 17 Feb 2026 17:45:58 +0000 (02:45 +0900)] 
include: update kernel headers from v6.19

(cherry picked from commit a5e6f4f81d2873089cddc718ebf4bf81959ece97)
(cherry picked from commit 17141a29b5f12f8dbe816eaf9f3a0c59c7ca1794)
(cherry picked from commit b280779805d3703cbeb26663338c0b0caf01564f)

2 months agoman: fix typo
Yu Watanabe [Tue, 17 Feb 2026 16:01:11 +0000 (16:01 +0000)] 
man: fix typo

(cherry picked from commit b11e07c60734f5e922a0216e7b0e088882711089)
(cherry picked from commit db9eed52008e5e706a3596c732cfe0026985317f)
(cherry picked from commit 36e4ae63c7dc2912212f19be0d555bceca57c4b4)

2 months agomemstream-util: fix doubled %m
Yu Watanabe [Tue, 17 Feb 2026 15:47:22 +0000 (00:47 +0900)] 
memstream-util: fix doubled %m

Follow-up for abe72100cfc292093153d48a132a5ab1b5f61dd5.

(cherry picked from commit 1f8fefd7de5038996bd9ab28a5b7715189a82a88)
(cherry picked from commit d540278328cd569ba34701564d5fce3c4e4d6a49)
(cherry picked from commit 3cc53636643a950508a86092b45c08e920092bc7)

2 months agobus-polkit: add one more assertion
Yu Watanabe [Tue, 17 Feb 2026 07:39:35 +0000 (16:39 +0900)] 
bus-polkit: add one more assertion

For CID#1645013.

(cherry picked from commit ce6ea42b699d060f3c792d2ae68dea73c2e1e342)
(cherry picked from commit 3de098447a9dfe7905dad5ce04972e5b08e5baf6)
(cherry picked from commit 3ea611db0026d577f7d85881a06d1157da731d91)

2 months agouser-util: Don't setgroups() if /proc/self/gid_map is empty
Daan De Meyer [Fri, 13 Feb 2026 11:24:49 +0000 (12:24 +0100)] 
user-util: Don't setgroups() if /proc/self/gid_map is empty

If /proc/self/gid_map is empty, the kernel will refuse setgroups(),
so don't attempt it if that's the case on top of the /proc/self/setgroups
check we already have.

(cherry picked from commit e2c1f3ca2a69a033c748d62f9be0db8817826839)
(cherry picked from commit b654d79deeda0e1de46398ed2cd0416876f585ea)
(cherry picked from commit ce4fc4f0b19b574a5fe2c9768e4a67dfbadee31a)

2 months agohwdb: don't error on empty hwdb file
David Santamaría Rogado [Sat, 14 Feb 2026 22:03:45 +0000 (23:03 +0100)] 
hwdb: don't error on empty hwdb file

(cherry picked from commit babfd9cbaacea8225380602190289bba65e6bfa7)
(cherry picked from commit e66bedf728c2f8e7ed675724e8bb9cc3e6cb043b)
(cherry picked from commit 5913a0a86e19c08d890c333dc597a6a72dc0ea3b)

2 months agoboot: respect minimal I/O alignment when doing block i/o
Artur Kowalski [Thu, 29 Jan 2026 19:55:42 +0000 (20:55 +0100)] 
boot: respect minimal I/O alignment when doing block i/o

Fixes XBOOTLDR partition detection and bitlocker support when using
U-Boot as UEFI.

(cherry picked from commit ccbd324a3a522362de0863e8d06cdd06a58d2fca)
(cherry picked from commit c0277048b04e45886bd3f62c1585cbedc45722fe)
(cherry picked from commit 1ac4eb501e6ad3033bee48607c91d1c8177d1849)

2 months agoboot: introduce xmalloc_aligned_pages
Artur Kowalski [Thu, 29 Jan 2026 17:42:24 +0000 (18:42 +0100)] 
boot: introduce xmalloc_aligned_pages

To be used for block I/O which may require specific buffer alignment.

(cherry picked from commit fd7c6d1ac1deac4ea76b9f7e7db69ce30b360cbd)
(cherry picked from commit 63885c8025e230044317c0651010c43d791bc0f3)
(cherry picked from commit 0765306896d2786dec0be4375fe375ca16d90d1b)

2 months agostring-util: Prevent infinite loop pegging CPU on malformed ESC input
Chris Down [Sat, 14 Feb 2026 16:40:14 +0000 (00:40 +0800)] 
string-util: Prevent infinite loop pegging CPU on malformed ESC input

string_has_ansi_sequence() currently does this to look for ESC input:

    t = memchr(s, 0x1B, ...)

So each iteration re-searches from the original start pointer. But if we
find an ESC byte that does *not* start a valid ANSI sequence (like "\x1B
", or an ESC at the end of the string), then ansi_sequence_length()
returns 0, and if that ESC is still in the search window, we will just
spin consuming 100% CPU forever.

Fix this by always advancing past rejected ESC bytes.

(cherry picked from commit 0a664310311b9b2abc79978eb4427c36268c1296)
(cherry picked from commit 21f6f686b4e0253ad74861c349f86d53e84d582b)
(cherry picked from commit 123d536eccaffea66378d87ebeb29c0042931976)

2 months agosd-json: also skip assert_cc in VS Code parser
Luca Boccassi [Fri, 13 Feb 2026 19:34:09 +0000 (19:34 +0000)] 
sd-json: also skip assert_cc in VS Code parser

For some reason the VS Code parser thinks sd_json_variant is still 48 bytes,
so skip the assert when running in that parser too

Follow-up for 337712e777bff389f53e26d5b378d2ceba7d98a8

(cherry picked from commit 5b822977c29e8351d0a56f32ddc49b54c4479089)
(cherry picked from commit edb737a8ec3d9289b8b5196161ca8ddc8c009b95)
(cherry picked from commit d445dc0c70eff2fa6de672705ee8296214ea885b)

2 months agosd-json: update comment regarding struct size
Luca Boccassi [Fri, 13 Feb 2026 19:32:37 +0000 (19:32 +0000)] 
sd-json: update comment regarding struct size

The assert at the bottom was updated when the size changed, but
the comment wasn't:

assert_cc(sizeof(sd_json_variant) == 40U);

Follow-up for 337712e777bff389f53e26d5b378d2ceba7d98a8

(cherry picked from commit 987f0fb062f02bc4c8591f03c27c5b35ddc08a65)
(cherry picked from commit c2d34aa2e461a6b7fa69bf375414883bbd736f56)
(cherry picked from commit 13164a8aa2c7dfe7a9666e93fa44cb56ae92be49)

2 months agoresolve: refuse traffic from the local host only for queries
Carlos Peón Costa [Wed, 11 Feb 2026 08:19:26 +0000 (09:19 +0100)] 
resolve: refuse traffic from the local host only for queries

(cherry picked from commit e6fd7a3f501b4a1f6f4de3390e0b1cb04455d443)
(cherry picked from commit 526f1594daec073269c3e70ee7914f6dd8740d5c)
(cherry picked from commit 6001dd29a1b94807936f1ee94cf867533bf92f6c)

2 months agoTEST-72-SYSUPDATE: Use some very long partition names
Daan De Meyer [Thu, 12 Feb 2026 19:34:27 +0000 (20:34 +0100)] 
TEST-72-SYSUPDATE: Use some very long partition names

To catch issues like https://github.com/systemd/systemd/issues/40658.
The commit that fixes that issue can make the name even longer to ensure
we don't regress again in this regard.

(cherry picked from commit 48f0f1fd81115f9c9121f4f16b8f68abd5dad0eb)
(cherry picked from commit a66721b87968b6bcef625ba6d4c4d4b1885d9c30)
(cherry picked from commit 3784eea832a1224ad3fdc6cff70039fe45299519)

2 months agoCODING_STYLE: add a brief log msg style guide
Lennart Poettering [Tue, 10 Feb 2026 14:12:49 +0000 (15:12 +0100)] 
CODING_STYLE: add a brief log msg style guide

(cherry picked from commit 83b4a5bb3d6a0f565aebcba975efad8dac73abea)
(cherry picked from commit a0981c8d3ebcae003c2cb2b1b721254ddc34598c)
(cherry picked from commit 17cb26408db904ce99e32b41f1545209102120db)

2 months agoterminal-util: also protect from empty /sys/class/tty/tty0/active
Mike Yuan [Tue, 10 Feb 2026 21:21:25 +0000 (22:21 +0100)] 
terminal-util: also protect from empty /sys/class/tty/tty0/active

(cherry picked from commit 48c1393bfb026e114aed56f1c2b8564662039c9b)
(cherry picked from commit 279c0be61c0ac6e4708416fb397d4b22ca084c1e)
(cherry picked from commit 06271db1805c1de913fce9f7a33241de86c47af9)

2 months agomkosi: Grow the root partition on boot
Daan De Meyer [Tue, 10 Feb 2026 15:32:05 +0000 (16:32 +0100)] 
mkosi: Grow the root partition on boot

Let's make sure the root partition takes up all the allocated space
on boot.

(cherry picked from commit 7f33ee8bb42a905f5c71bc0b49e946b527b3135a)
(cherry picked from commit 39980fabd5d1639a7b1d11b67bbc1648262b7912)
(cherry picked from commit d3efe5d7e74f6fcfe7787a6e1f4aa387d514cdb2)

2 months agoFix order of class/type in resolve man page
Christopher Head [Tue, 10 Feb 2026 01:22:12 +0000 (17:22 -0800)] 
Fix order of class/type in resolve man page

For each RR `ResolveRecord` returns, it returns the class before the
type, not after.

(cherry picked from commit 8ae4aa26c181cf20c9e613074d2e47ddf58dd82d)
(cherry picked from commit c50b34abe36b323697e291c22f79ac6350306f16)
(cherry picked from commit cbc1697b9a11128581b6367b18dd5ddc59bcbfa5)

2 months agomkosi: isc-dhcp-server was dropped from debian testing/unstable
Luca Boccassi [Mon, 9 Feb 2026 20:03:38 +0000 (20:03 +0000)] 
mkosi: isc-dhcp-server was dropped from debian testing/unstable

(cherry picked from commit 7755127ca5398359f6b94f7b8203232ff5ef539e)
(cherry picked from commit 4c30f640e41d441fba82002e3881ad6341f74b08)
(cherry picked from commit da83f4456e5ea47bbeb69a87c1e380e73088d6cb)

2 months agojournald: set a lower size limit for FDs from unpriv processes
Luca Boccassi [Thu, 5 Feb 2026 00:39:35 +0000 (00:39 +0000)] 
journald: set a lower size limit for FDs from unpriv processes

Unprivileged processes can send 768M in a FD-based message to journald,
which will be malloc'ed in one go, likely causing memory issues.
Set the limit for unprivileged users to 24M.

Allow coredumps as an exception, since we always allowed storing
up to the 768M max core files in the journal.

Reported on yeswehack.com as #YWH-PGM9780-48

(cherry picked from commit e67b008fa35d92937b07c6b3903419cd42ef9103)
(cherry picked from commit d33dbbc6133632f8541af219907cb95bd14ad9ec)
(cherry picked from commit 13dd43b83b2e9322e02f757d362b35b0b4af729a)

2 months agomeson: use printf instead of echo
Mike Gilbert [Mon, 9 Feb 2026 00:12:30 +0000 (19:12 -0500)] 
meson: use printf instead of echo

The echo builtin provided by some shells (mksh) will interpret \x2d as
an escape sequence. This causes meson to fail:

```
test/fuzz/meson.build:93:52: ERROR: File fuzz-unit-file/dm-back-slash.swap does not exist.
```

Bug: https://bugs.gentoo.org/969789
(cherry picked from commit a304f6c9db8b160cd5186b7dfa3cee6d13cce2bf)
(cherry picked from commit 43d2f85c438d802c62ea2aced14a75a8eb5dc9f1)
(cherry picked from commit 4327b23971c31563b50657c98e1fa2b5bf7ae11d)

2 months agomkosi: always install util-linux-script in Fedora
Luca Boccassi [Sun, 8 Feb 2026 13:29:23 +0000 (13:29 +0000)] 
mkosi: always install util-linux-script in Fedora

F41 is EOL, so we can unconditionally install this package, so that we
don't have to add a new version every time a new release is branched

Fixes test issues such as:

TEST-74-AUX-UTILS.sh[1363]: .//usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.networkctl.sh: line 55: script: command not found

(cherry picked from commit 8fe50c025b36da43c1e95343d3cc08dd757b1cad)
(cherry picked from commit 6ea11208c6e6e959054eaf313dc10f40d7c8a181)
(cherry picked from commit 40482d0a3f3e129d10041ba255a6997ba400dc0f)

2 months agotest: bump disk sizes for some test cases
Lennart Poettering [Fri, 6 Feb 2026 11:16:15 +0000 (12:16 +0100)] 
test: bump disk sizes for some test cases

In my testing I switched building my locally run CI integration tests to
ArchLinux and realized that for that the default sizes don't work
anymore, the images are larger than the space allocated. Let's bump the
size by 50% for the relevant disk images.

(cherry picked from commit ab89fad427b7bee6f3102708bf8bdf15fd607d9e)
(cherry picked from commit b1ce991244425abe76c3a217af4b271c437b997f)
(cherry picked from commit 6a8f10b9557eeaa94175dcf93ba9e1811badfbef)

2 months agotests: don't use "dd" to allocate empty files
Lennart Poettering [Fri, 6 Feb 2026 10:16:48 +0000 (11:16 +0100)] 
tests: don't use "dd" to allocate empty files

Let's use truncate -s … to create empty files (if they can be sparse)

Let's use fallocate -l … to create empty non-sparse files.

This should reduce the disk footprint of our tests a bit, given that in
most cases we won't use the allocate disk space in full, not even
remotely.

(cherry picked from commit dd2676c1abf26f47f9374c1dcc3757f47992c6fa)
(cherry picked from commit d29a7cced52ad5ae09bf902b71c209f595f8dcd3)
(cherry picked from commit f9a5b2e7900d6e9df72a2098cd597fc49a78b0ea)

2 months agoportablectl: Strip .v or .raw.v when extracting prefix
Louis Stagg [Tue, 3 Feb 2026 18:48:59 +0000 (18:48 +0000)] 
portablectl: Strip .v or .raw.v when extracting prefix

This allows a plain "portablectl attach foobar.raw.v" without needing to
specify a prefix.

(cherry picked from commit 23c6ab3971eb22d9c656165e8c6314135df0ee6c)
(cherry picked from commit a8679d8770194921f13ce3ca7b44df8432e20aaa)
(cherry picked from commit edf05ddd99df99d62512da7ef8ced594c5e698b8)

2 months agouserdbd: avoid sending gshadow hash to unprivileged callers via varlink
Luca Boccassi [Wed, 25 Feb 2026 00:21:17 +0000 (00:21 +0000)] 
userdbd: avoid sending gshadow hash to unprivileged callers via varlink

Reported on yeswehack as YWH-PGM9780-59

Follow-up for d093b62c941ebd6cf16ef9dd6430841eb361ed92

(cherry picked from commit 1012c6ce76ce10772ece1c51b997b53b848054f5)
(cherry picked from commit 74c18638fd525e1e311fe2f772bdf795025456a0)
(cherry picked from commit c14cf79ade17d6b4eb58dab1eeee3f641c2a4073)

2 months agomkosi: add groupadd/groupmod to ASAN wrappers list
Luca Boccassi [Wed, 25 Feb 2026 11:16:28 +0000 (11:16 +0000)] 
mkosi: add groupadd/groupmod to ASAN wrappers list

TEST-74-AUX-UTILS.sh[3789]: + groupadd haldo
TEST-74-AUX-UTILS.sh[3875]: ==3875==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.

Follow-up for 1012c6ce76ce10772ece1c51b997b53b848054f5

(cherry picked from commit 28a0db925f9b68f66e637087fd6d75b79ae2ab5b)
(cherry picked from commit 7d1ffc053ba1eaab0eca4b1a74229a24b1dbbca2)
(cherry picked from commit 56ffab7325661112f7d20718ab97be692b49c3c0)

2 months agosd-device: move copy_all_tags() from udev
Yu Watanabe [Sun, 22 Feb 2026 20:26:46 +0000 (05:26 +0900)] 
sd-device: move copy_all_tags() from udev

No functional change, preparation for the next commit.

(cherry picked from commit 1c867dc71af12bb7afb1981f83fea14eb4b98993)
(cherry picked from commit 40451b010751a136bb40e05652cc5cbb5bdd8190)
(cherry picked from commit d6a8d16801ed04b9de86574ac6bfa379104eec0f)

2 months agope-binary: wrap remaining LE fields with byte-swap macros
Oblivionsage [Wed, 18 Feb 2026 17:22:48 +0000 (18:22 +0100)] 
pe-binary: wrap remaining LE fields with byte-swap macros

Follow-up to 02cab70acf5ca67e838d0d34860baacbf9fc3b6c. pe_hash(),
section_offset_cmp() and uki_hash() still had a bunch of raw accesses
to LE fields (e_lfanew, SizeOfHeaders, PointerToRawData, SizeOfRawData,
VirtualSize, certificate_table->Size) without le32toh(), so they'd
produce garbage on big-endian.

Also wrap VirtualSize in bootspec.c for consistency.

(cherry picked from commit b3a2444ba57c90b93b5f76cc7f62b84acb7adec8)
(cherry picked from commit 35e92d9de27cf6f30be5f64caf6c59c63e0ad19b)
(cherry picked from commit c9504fbc7dbce7ac3968bac8526b81efc266a0bb)

2 months agope-binary: fix missing le16toh() on NumberOfSections in pe_hash/uki_hash
Oblivionsage [Tue, 17 Feb 2026 18:39:05 +0000 (19:39 +0100)] 
pe-binary: fix missing le16toh() on NumberOfSections in pe_hash/uki_hash

pe_hash() and uki_hash() pass pe_header->pe.NumberOfSections directly
to typesafe_qsort() and FOREACH_ARRAY() without le16toh(). On
big-endian (s390x), NumberOfSections=3 gets read as 0x0300 (768),
while pe_load_sections() correctly converts it and only allocates 3
sections. This makes qsort process 768 elements on a 3-element
buffer, causing a heap-buffer-overflow (confirmed with ASAN on
native s390x).

Wrap all three raw usages with le16toh() to match pe_load_sections().

(cherry picked from commit 02cab70acf5ca67e838d0d34860baacbf9fc3b6c)
(cherry picked from commit 79ecdd1e9811e190d0a19f927d2670e52360f375)
(cherry picked from commit f9c00b1950e8b6e738b3bd8ae20bc55987fc2a6f)

2 months agodbus/varlink: do not skip privilege check when polkit support is disabled
Luca Boccassi [Tue, 17 Feb 2026 14:37:43 +0000 (14:37 +0000)] 
dbus/varlink: do not skip privilege check when polkit support is disabled

There's not going to be any query if polkit support is
disabled at build time, so always check the peer's privileges
in that case

Follow-up for f5a12ceaedf4d490a9dc82e9460dd6fd97acc942

(cherry picked from commit 74961630807b8b1188016a2313b42cf8546fd70e)
(cherry picked from commit e74008848f0a549e859416791ad762609d3c73c8)
(cherry picked from commit d2cccc46d3a208be1e9b5ea22ee84f6903d21dd6)

2 months agotimesync: actually disables built-in fallback NTP servers when an empty string is...
Yu Watanabe [Mon, 16 Feb 2026 00:00:42 +0000 (09:00 +0900)] 
timesync: actually disables built-in fallback NTP servers when an empty string is specified

Follow-up for 3745770ae4dcf262707882a38f6c5ba2684329a3.
Fixes #40621.

(cherry picked from commit 1b1799e9ba70d5f190d89cef88ea67397db42c2c)
(cherry picked from commit 8d409aacc170c2398a773c8518e640b031a44a0e)
(cherry picked from commit 70a170097f225920a3ab8c565fb5f12b16f111ca)

2 months agotimesync: return earlier when an empty string is specified
Yu Watanabe [Mon, 16 Feb 2026 00:51:36 +0000 (09:51 +0900)] 
timesync: return earlier when an empty string is specified

(cherry picked from commit b0ca2ef2649e6d43abbf0fab9910217ca3bd6e84)
(cherry picked from commit a06a3dfe2eb32941df926e212a678ef943d1da31)
(cherry picked from commit 849e0f6ac1aed4b6158fbad1f564bc9c76a5151a)

2 months agotimesync: rename have_fallbacks -> fallback_set
Yu Watanabe [Mon, 16 Feb 2026 00:50:46 +0000 (09:50 +0900)] 
timesync: rename have_fallbacks -> fallback_set

(cherry picked from commit 1bb9306f1e96afe7f53dee98c17ebae4f572be74)
(cherry picked from commit 5d8d7e4828a89c1146859de14d0910673efddca7)
(cherry picked from commit bc305d20172f9846b2b35dc6965f14d347535b46)

2 months agoudevadm: do not explicitly set white color
Yu Watanabe [Fri, 13 Feb 2026 05:31:54 +0000 (14:31 +0900)] 
udevadm: do not explicitly set white color

Otherwise, output on black-on-white terminals is not visible.

Follow-up for 13005c8f2c7f0169728fef804f164c3574b8e0f7.
Fixes #40629.

(cherry picked from commit 7577bb4c08116c755449a17bdadbb719ee19cb67)
(cherry picked from commit d97e6e3eb7b79b2c46904a1324bb8ccf35081207)
(cherry picked from commit f89bf80f6f5064580167a02b5b9f64119ff575b4)

2 months agoportable: fix --force flag combination with directory extension
Luca Boccassi [Thu, 12 Feb 2026 21:57:26 +0000 (21:57 +0000)] 
portable: fix --force flag combination with directory extension

The check for image type uses the wrong variable, so it's applied
when it shouldn't.

Follow-up for 06768b90a32ac0d36252ebc5f426ad471bf29fce

(cherry picked from commit d07aa23c872d13baa2816a69326eea6f9d5271a0)
(cherry picked from commit 78129d7c82f6722f7e0155938ddb91e3079faf45)
(cherry picked from commit 59b953ad3c71e66d948ff2b5d507cd6ec9949d13)

2 months agoudev: rules: fix camera comparison
David Santamaría Rogado [Thu, 12 Feb 2026 16:29:12 +0000 (17:29 +0100)] 
udev: rules: fix camera comparison

actually that is intended to be a comparison

(cherry picked from commit 155ae657b1ae8b69fae811b28117cd7c83895c76)
(cherry picked from commit d5fbb042b24c89d2faf7dca74292481acbf980be)
(cherry picked from commit 7972db6bb176e18e5708eb0a72a4e55c67799c74)

2 months agoresolvectl: split out helper to parse stdin
Zbigniew Jędrzejewski-Szmek [Tue, 9 Dec 2025 10:30:17 +0000 (11:30 +0100)] 
resolvectl: split out helper to parse stdin

No functional change, just splitting up of a lengthy function.

(cherry picked from commit 097f130731513bd934ed74975ac34070197614af)
(cherry picked from commit e709eb85498b79ba4e21b29dd51dc1db72047cc4)
(cherry picked from commit ac62f93273f580079f65c70e1cf50c1ff53ccc95)

2 months agonspawn: simplify parsing of --hostname/--machine
Zbigniew Jędrzejewski-Szmek [Wed, 3 Dec 2025 21:58:46 +0000 (22:58 +0100)] 
nspawn: simplify parsing of --hostname/--machine

(cherry picked from commit 26de1563d0ee1c6d1a94b99c662da7c5e103991e)
(cherry picked from commit abc3c7ad958580b21cb038bd80057eea77a75a88)
(cherry picked from commit cde2e773efa12cb6b01f2b5dc0731fe07ec1a05f)

2 months agojournal-upload: drop custom option error handling
Zbigniew Jędrzejewski-Szmek [Mon, 8 Dec 2025 09:52:11 +0000 (10:52 +0100)] 
journal-upload: drop custom option error handling

The line to set opterr=0 was added in the initial commit in
3d090cc6f34e5970765dd1e7ee5e648a056d180d. But afaict, this never worked as
intended, because ':' must be the first char in optstring given to
getopt_long() for it to return ':' for a missing option value. Since
this wasn't set, getopt_long() would return '?', and the missing value
would be handled as an unknown option:
  $ build/systemd-journal-upload --key
  Unknown option --key.
  $ build/systemd-journal-upload --asdf
  Unknown option --asdf.

Let's just do the standard thing:
  $ build/systemd-journal-upload --key
  build/systemd-journal-upload: option '--key' requires an argument
  $ build/systemd-journal-upload --asdf
  build/systemd-journal-upload: unrecognized option '--asdf'

(cherry picked from commit c1fcc8042180b2b6e3c9acb525e730bd6d0c75d7)
(cherry picked from commit fc9d961c50becfc7b5fc94f6cbb93a889871195e)
(cherry picked from commit 6f68b40e46daeca526fc0d91ddfad9717a5f1df6)

2 months agomount-tool: fix confusion in --help
Zbigniew Jędrzejewski-Szmek [Tue, 9 Dec 2025 12:46:48 +0000 (13:46 +0100)] 
mount-tool: fix confusion in --help

See grandparent commit for explanation.

(cherry picked from commit e4c6ee2ce546ce772548bf728b6c235bd997e5c2)
(cherry picked from commit 49346516b6ff3633205e0b4543f05cbb90c68e89)
(cherry picked from commit 2a2d1c10190186657adbbf9d630cdda90da8d969)

2 months agoimportctl: fix confusion in --help
Zbigniew Jędrzejewski-Szmek [Sat, 6 Dec 2025 12:36:43 +0000 (13:36 +0100)] 
importctl: fix confusion in --help

See parent commit for explanation.

(cherry picked from commit 84f69675589a28ca5ee94c5dc4c1d4b2fe3e2c25)
(cherry picked from commit db3e71d9dbd3b9932aef1b3d24fcfc7cbe0bbf0e)
(cherry picked from commit f66ee1b6b71a2d5963ae6571060cff0d8d780e4a)

2 months agocgtop: fix confusion in --help
Zbigniew Jędrzejewski-Szmek [Wed, 3 Dec 2025 14:23:12 +0000 (15:23 +0100)] 
cgtop: fix confusion in --help

When we say '-n --iterations=N' in --help, this means that the program
can be invoked with '-n N' or '--iterations=N' or '--iterations N'.
(The short option is specified without the argument.)

Here we tried to use '-p --order=path' to mean that the program can be
invoked with '-p' or '--order=path', but that is incompatible with the
established convention.

Also, indicate that the arg to --cpu is optional.

(cherry picked from commit cb406988ac587a0f2b75948f3fab860005d6bc76)
(cherry picked from commit 8523627f2197ef6d448d97832b946e42cd414fc3)
(cherry picked from commit 7f08d7160bbef89aac3df7f7fe93689965aaec6b)

2 months agodissect: Fix wrong errno passed to log message
DaanDeMeyer [Fri, 26 Dec 2025 21:36:39 +0000 (22:36 +0100)] 
dissect: Fix wrong errno passed to log message

(cherry picked from commit fe0114db8e9f87042fcaa94fd3c16d5be85f8f16)
(cherry picked from commit 173a1ffde6aeaff32b949c53f428cc7d7754c8df)
(cherry picked from commit a806c77db00e683d7d7b675b67d45323cec0e9b2)

2 months agodissect: Fix segmentation fault if loop device is not provided
DaanDeMeyer [Fri, 26 Dec 2025 21:36:21 +0000 (22:36 +0100)] 
dissect: Fix segmentation fault if loop device is not provided

(cherry picked from commit a0a4e9d7d22296b856a9f6118eb158cab9826a8d)
(cherry picked from commit 1d7fc509703c71f831737b64ac69089b053c829c)
(cherry picked from commit 0bb28ccb127d6b5f0973d80845a7a17b0cc18694)

2 months agohwdb: update to main@{2026-02-06}
Luca Boccassi [Thu, 5 Feb 2026 22:20:19 +0000 (22:20 +0000)] 
hwdb: update to main@{2026-02-06}

git restore -s origin/main hwdb.d/ test/hwdb.d

(cherry picked from commit a54429d3111f7d28193244f99e5b614df4a67fd2)
(cherry picked from commit 903016b3270e4c73b391d445d23d247e14a314d3)

2 months agomkosi: update mkosi commit reference to e3642f81d3a7f8f9310c0c734b2ba9dd41e50e14
DaanDeMeyer [Fri, 26 Dec 2025 18:53:25 +0000 (19:53 +0100)] 
mkosi: update mkosi commit reference to e3642f81d3a7f8f9310c0c734b2ba9dd41e50e14

e3642f81d3 kmod: Only use --modname if available
ddea81d81e arch: Download archlinux-keyring with pacman
4a44e1831b Remove unneeded lambdas
9c3d23757c Configure pyright included files
5e037d514c qemu: Register with systemd-machined in user session
c4c3d793d0 Create package cache dir before invoking pacman
d53761c4dd distribution: do not default to release=VERSION_ID for openSUSE Tumbleweed
c5bc9138fc Wrap build_microcode_initrd in complete_step
635159975d Fix typo in manpage
59f5f0741e mkosi-addon: drop Output=addon, addon.py already has a default
be85b8ca0b sandbox: return raw error code from the kernel and friends on failure
56f25c1a41 config: replace deprecated sandbox verb with box in help message
ae24c527d7 sandbox: fix wrong errno passed to OSError()
e7b9612760 verity: do not copy signing cert in addons/portables/extensions
f3a029b736 Bump version to 27~devel
84af20892b Release 26
3fcd3a0fde Adjust logging messages for kmod/fw resolution
d44aae12b4 Revert "Do not try to install packages that are listed in RemovePackages="
1873ad0184 portable: Make sure mountpoints exist in the image
5dc693feb0 initrd: Inherit keymap, timezone, hostname and rootpw by default

(cherry picked from commit 664f211c9e844170792d2ca3db705ebbe34d996a)
(cherry picked from commit d94574dbe5ce3f678a7b1f81f531bcaed3a67d5a)
(cherry picked from commit dd2c652e4b84b46bd6b2f019c01e59fe12ae8228)

2 months agomkosi: update mkosi commit reference to 9e31235211d975bae25622d6205a8396d104335e
Luca Boccassi [Tue, 16 Dec 2025 13:13:25 +0000 (13:13 +0000)] 
mkosi: update mkosi commit reference to 9e31235211d975bae25622d6205a8396d104335e

9e31235211 pacman: Make sure hookdir exists
20009b7f48 make_image: log systemd-repart *.conf files at the --debug level
b94b415db9 run: Increase string limit for strace when debugging sandbox
9f6d9405d6 Ring the terminal bell after the last image has been built
b509b4246d Add glob in default initrd to exclude some exotic drivers
189394b8b9 Allow KernelModules= globs to also match relative to modules root dir
92bd086e4e zypper: add --force-resolution flag
3637749702 kmod: Only add fully resolved fw path if it exists
d41ac276c9 Add details to KernelModulesInitrd= doc
1b6960ddb1 Fix SplitArtifacts=repart-definitions for addons
07464f38d6 Add log_step call in build_kernel_modules_initrd
18f5885362 Use proper constants for ansi colors
454c1602b6 mkosi-obs: add SplitArtifacts=repart-definitions and use it
9e57461af6 Copy repart definitions to staging directory
1acab18874 Add SplitArtifacts=repart-definitions
c5c5c225e8 mkosi-obs: always include verity certificate
ac5babb8e0 Revert "Use Path.relative_to instead of Path.parts"
cbb1daeb76 action: Use environment variables instead of inputs
97c81eef72 portable: support split roothash

(cherry picked from commit 830275f343fcc6478564ff2259a08ca002c44d46)
(cherry picked from commit 0f4e028af61f300a9fd63dae92d9a20d7d648ea9)

2 months agobuild(deps): bump actions/labeler from 5.0.0 to 6.0.1
dependabot[bot] [Thu, 1 Jan 2026 09:01:00 +0000 (09:01 +0000)] 
build(deps): bump actions/labeler from 5.0.0 to 6.0.1

Bumps [actions/labeler](https://github.com/actions/labeler) from 5.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/8558fd74291d67161a8a78ce36a881fa63b766a9...634933edcd8ababfe52f92936142cc22ac488b1b)

---
updated-dependencies:
- dependency-name: actions/labeler
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 31ca68030b43bdf02f848adbcc0f703014bfd7ef)
(cherry picked from commit ca60915fc03dd7cf2ba77cfc4a64e3f040376e1b)
(cherry picked from commit 63d2dd6487ccc188d32f4317a3801c6cc3759424)

2 months agofetch-mkosi: Shorten commit message title
Daan De Meyer [Thu, 5 Feb 2026 09:53:09 +0000 (10:53 +0100)] 
fetch-mkosi: Shorten commit message title

Currently github truncates the message so let's make it a little shorter
so it's not truncated.

(cherry picked from commit 7bb0bd400fe247ff317831844df2f48712cb07c3)
(cherry picked from commit ce886461d4c7a48cde4df9bd7759e59d84170a32)
(cherry picked from commit 8ba1e10ff16521838835588896b45370e7ec1ecd)

2 months agoefi-string: Unquote single-quoted strings as well as double
James Le Cuirot [Tue, 27 Jan 2026 17:12:34 +0000 (17:12 +0000)] 
efi-string: Unquote single-quoted strings as well as double

This code is used to read data copied from /etc/os-release. According to
the spec[1], values can be enclosed in single quotes or double quotes.
Not handling single quotes results in the quotes appearing in the
systemd-boot menu, e.g. 'Gentoo Linux'.

[1] https://www.freedesktop.org/software/systemd/man/latest/os-release.html

Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
(cherry picked from commit a8f2f5d71786c2cf36e32f856cc329413a76cd93)
(cherry picked from commit 7177a0c4342368a62eda4094cc357ce15ae5c5bc)
(cherry picked from commit aee4efbcba69bd1abf752e465ecfd04c3d1479a2)

2 months agopid1: shorten message about jobs skipped after failed condition checks
Zbigniew Jędrzejewski-Szmek [Wed, 4 Feb 2026 09:21:43 +0000 (10:21 +0100)] 
pid1: shorten message about jobs skipped after failed condition checks

I was looking at some logs on a console, and because of the lengthy message,
the actually interesting part, i.e. what condition failed, didn't even fit
on the screen. Let's make the sentence legible but brief.

(cherry picked from commit 7a1e761070e5b223191b1cb7526730adf1a76681)
(cherry picked from commit 35e25d52653cd112482df605fc9f9bd8f0cbbe59)
(cherry picked from commit 07c1b0a86d343d868cdca02dc89e200418f2ce21)

2 months agocore: Improve logging when we cannot create destination mountpoint
Daan De Meyer [Fri, 16 Jan 2026 20:21:06 +0000 (21:21 +0100)] 
core: Improve logging when we cannot create destination mountpoint

If we fail to create a parent directory, then the error from
make_mount_point_inode_from_path() will always be
"No such file or directory" which doesn't tell us anything. Add logging
for the mkdir_parents() call as well so we get a useful error.

(cherry picked from commit b231c4dcb4f54332b16a5bcf75df34b76c5e4b01)
(cherry picked from commit e82f1e05a4ecad446ba6474f9c0af24a119a329f)
(cherry picked from commit b6010cbeeccb79c07f43db9af9c0c182af0b32b1)

2 months agoparse-util: rename trivial argument for parse_pid()
Yu Watanabe [Wed, 28 Jan 2026 03:37:56 +0000 (12:37 +0900)] 
parse-util: rename trivial argument for parse_pid()

The function parse_pid() trivially returns pid, hence it is not
necessary to name the argument for storing result as 'ret_pid'.

(cherry picked from commit dd839b1463e7ead1d16048cf4e32b0efb1b0774f)
(cherry picked from commit adc0290a9d8874ce7fc7f924b4150c7b53d8c483)
(cherry picked from commit 89738c01af77839f882b87e0e5d8a5f43cfe013f)

2 months agojournal: check the length of timestamp field in syslog message
Yu Watanabe [Wed, 28 Jan 2026 04:41:28 +0000 (13:41 +0900)] 
journal: check the length of timestamp field in syslog message

No functional change. Just refactoring and adding assertion.

(cherry picked from commit 7e81423fb880abaef9c9db1e2eecb7039ed7a546)
(cherry picked from commit 842a87e5eb4c71a551d4f62815c8324580f32dbf)
(cherry picked from commit 33e61c0af66bd7a5b9014920c86774f09b78ec44)

2 months agossh-generator: fix memleak
Yu Watanabe [Sat, 31 Jan 2026 06:30:33 +0000 (15:30 +0900)] 
ssh-generator: fix memleak

(cherry picked from commit 70510c2c908958a744a1ba39963162b720cd7115)
(cherry picked from commit e0476a216a592bcca062d49e97f492dfbff0d131)
(cherry picked from commit eee8d788b424c401a1ec3abd99abaaab71adc8be)

2 months agomkosi: workaround issue in mdadm-4.5 + linux-6.18
Yu Watanabe [Sat, 31 Jan 2026 17:37:07 +0000 (02:37 +0900)] 
mkosi: workaround issue in mdadm-4.5 + linux-6.18

After debian updated the kernel from 6.17 to 6.18, mdadm command fails
with the following:
```
+ mdadm --create /dev/md/mdmirror ...
mdadm: size set to 64512K
mdadm: Can't open /sys/module/md_mod/parameters/legacy_async_del_gendisk
mdadm: init md module parameters fail
```

This seems a bug in mdadm, and fix is already merged in the upstream:
https://github.com/md-raid-utilities/mdadm/pull/228
Until the fix is backported, let's workaround the issue.

See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1125390

(cherry picked from commit 4c6afaab193fcdcb1f5adfe29cd9e0d27e67c55c)
(cherry picked from commit 8dc4dbca29d4c271b47478f616216d3812bbf9b7)
(cherry picked from commit 8466ef81529b1ca01b045dc000b3c92dfbfe1ca9)

2 months agoemacs: drop obsolete emacs property
Zbigniew Jędrzejewski-Szmek [Wed, 28 Jan 2026 09:42:15 +0000 (10:42 +0100)] 
emacs: drop obsolete emacs property

New emacs warns on every open about the old attribute. Let's assume that
everybody who uses emacs uses the latest version, so we can drop the compat.

(cherry picked from commit 0c40aef7ef1419233826b6fb7ccac12f7623033b)
(cherry picked from commit 5c9ae10762cbfc771544c84abf464135807c2e66)
(cherry picked from commit 20c73f1c2742fb8ef3c458bc9dc4c9b510bcfebd)

2 months agonetwork: slightly improve log message
Yu Watanabe [Fri, 30 Jan 2026 13:09:51 +0000 (22:09 +0900)] 
network: slightly improve log message

(cherry picked from commit 579640f50c4636a20824c643bf591c3b6e3ac8ea)
(cherry picked from commit 116042aeee7878e03cd00e9a8163b37e404cf089)
(cherry picked from commit e13e0658faa2484fccc7c4c4f6216ae2ae37c440)

2 months agotest: disable pipefail again in monitor_check_rr()
Nick Rosbrook [Fri, 30 Jan 2026 14:23:03 +0000 (09:23 -0500)] 
test: disable pipefail again in monitor_check_rr()

Partially reverts d6b379370485b9651f86b628ce980de719299eb4.

On Ubuntu 26.04 devel, TEST-75-RESOLVED often fails at this stage,
despite the matching query apparently being found:

 + monitor_check_rr '2025-12-18 16:02:54' 'follow10.so.close.signed.test IN CNAME follow11.yet.so.far.signed.test'
  + set +x
  Dec 18 16:02:54 ns1.unsigned.test resolvectl[552]: ← A: follow10.so.close.signed.test IN CNAME follow11.yet.so.far.signed.test
 + monitor_check_rr '2025-12-18 16:02:54' 'follow11.yet.so.far.signed.test IN CNAME follow12.getting.hot.signed.test'
  + set +x
  Dec 18 16:02:54 ns1.unsigned.test resolvectl[552]: ← A: follow11.yet.so.far.signed.test IN CNAME follow12.getting.hot.signed.test
 + monitor_check_rr '2025-12-18 16:02:54' 'follow12.getting.hot.signed.test IN CNAME follow13.almost.final.signed.test'
  + set +x
  Dec 18 16:02:54 ns1.unsigned.test resolvectl[552]: ← A: follow12.getting.hot.signed.test IN CNAME follow13.almost.final.signed.test
 + monitor_check_rr '2025-12-18 16:02:54' 'follow13.almost.final.signed.test IN CNAME follow14.final.signed.test'
  + set +x
  Dec 18 16:02:54 ns1.unsigned.test resolvectl[552]: ← A: follow13.almost.final.signed.test IN CNAME follow14.final.signed.test

Unsetting pipefail, as was done before d6b3793704, appears to fix the
problem.

(cherry picked from commit 7c9c34514a705ea0ce61432503a05162d0f658b0)
(cherry picked from commit ce35956b3a0bb88f65c9594cb224261804188439)
(cherry picked from commit f9e498483f277ccde0af141c60dc7c40f274a04b)

2 months agotest: cope with uutils coreutils flag parsing for date command
Nick Rosbrook [Mon, 19 Jan 2026 21:09:52 +0000 (16:09 -0500)] 
test: cope with uutils coreutils flag parsing for date command

With GNU coreutils, one can pass an argument to the "set" flag like:

 date -s "-3 days"

With uutils coreutils, that gives an error:

 error: unexpected argument '-3' found
    tip: to pass '-3' as a value, use '-- -3'

That's a bug (https://github.com/uutils/coreutils/issues/9679), but both
implementations accept --set="-3 days" just fine, so use that instead.

(cherry picked from commit 9dcfd6e8fe080f959c363e6d896848faeb1b8156)
(cherry picked from commit a45dad1aa5320443a520a47c8c9dd89703b73d2f)
(cherry picked from commit b9e718293142a2b54d801835c6b43b4a88fab193)

2 months agotest: use journalctl -n option instead of piping to head
Nick Rosbrook [Mon, 19 Jan 2026 21:09:12 +0000 (16:09 -0500)] 
test: use journalctl -n option instead of piping to head

On Ubuntu's test infrastructure for the development series, this test
often fails when piping the journal output to head. The cause is
unclear, but possibly related to Ubuntu's use of uutils coreutils.

Workaround this by just using journalctl's -n flag, which removes the
need for piping output to head.

(cherry picked from commit a8efad14f878a5ea0d566fd61bda8e0bb332ae7d)
(cherry picked from commit 2c661e5f0d54c59a796423c1b8c785ce94dcc026)
(cherry picked from commit ab3e570ede7c5e41b2e2cb664e2c1e1ea6cfe4c8)

2 months agodocs: Add a diagram for the internals of sysupdate
Philip Withnall [Tue, 27 Jan 2026 15:25:08 +0000 (15:25 +0000)] 
docs: Add a diagram for the internals of sysupdate

I had to sketch this out before I could get the internals of
systemd-sysupdate straight in my head, particularly around how an
`UpdateSet` points to one `Instance` from each of a set of `Resource`s,
and those `Instance`s are either all sources or all targets.

Hopefully this is useful to the next person to look at the code.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
(cherry picked from commit a05439097f7c188d27f58241b8621b2132a780e1)
(cherry picked from commit 877b9f9a0db1f2cd9456856c24944ed20aff8c6a)
(cherry picked from commit b14faca811f24fb6b88ae4c774e627dda54bbd29)

2 months agobash-completion/vmspawn: insert missing space between options
Kai Lüke [Wed, 28 Jan 2026 10:48:00 +0000 (19:48 +0900)] 
bash-completion/vmspawn: insert missing space between options

Follow-up for 3b18a8795df525f1e10528f8c056f1e49a1d9bfe.

(cherry picked from commit 2e14be9a84e1edb295d285db75e555695575108c)
(cherry picked from commit 20e4ab09000116e2afadaf359570fd2f469a031b)
(cherry picked from commit 986c2eedc4a3729fc92d54a5a4a8b09ef7248ac0)

2 months agostoragetm: ensure device lock fd is opened for writing
Mike Yuan [Sun, 25 Jan 2026 15:50:34 +0000 (16:50 +0100)] 
storagetm: ensure device lock fd is opened for writing

Follow-up for e582484789a6d889d11b97d9c2afa74c3c985130

_cleanup_close_ is dropped, as the fd would be immediately
consumed by the nvme_subsystem_add() call below anyways.

(cherry picked from commit 28fb7e869c6be086fc7ab8ddbc8a4e00b53714b6)
(cherry picked from commit a827513472cda8f65faabc536ef396189d6ecd15)
(cherry picked from commit 763a2a400c4509800ada9da1bd1ac3a7438a3624)

2 months agokernel-install: handle removal unsuccessful UKIs and loader entries separately
Jörg Behrmann [Fri, 23 Jan 2026 12:55:51 +0000 (13:55 +0100)] 
kernel-install: handle removal unsuccessful UKIs and loader entries separately

When a tries file exists, 90-uki-copy.install removes a previous UKI of the
same kernel version and all it's unbooted variants. This removal is guarded
behind a check for the existence of the already booted UKI, i.e. if uki.efi
already exists, uki.efi and uki+*.efi will be removed.

This leaves the edge case that if uki.efi does not exist, but only an unbooted,
e.g. uki+3.efi, it will not be removed. This is not a problem, if the number of
tries is constant between both builds, since a new uki+3.efi would overwrite
the existing one, but if the number of tries is changed to, e.g. uki+5.efi, we
are left with both uki+3.efi and uki+5.efi.

The same is done for loader entries.

(cherry picked from commit cab4b9defdef1f9f9d3c31b262aed408a6616490)
(cherry picked from commit 1567b00b632d426e50ee6a1cb75d906e2c8035ef)
(cherry picked from commit 583b5ef3d3c5dfa66bd45c0307dbfd85912c339f)

2 months agoman/custom-html: support dark mode
Daniel Foster [Sun, 25 Jan 2026 05:14:11 +0000 (15:14 +1000)] 
man/custom-html: support dark mode

Use the browser's default style and opt in for dark mode.

Has the bonus of removing some
[deprecated attributes](https://developer.mozilla.org/docs/Web/HTML/Reference/Elements/body#deprecated_attributes).

(cherry picked from commit 49811c6715ecd10e133c90ca53685a7ceea37797)
(cherry picked from commit 2f6e779fda7c25fd73daa0c9f4815675622f84b7)
(cherry picked from commit 319febaace646683efa47d8763956c6d6babf5e4)

2 months agotest: perform /usr/share/ sysext unmount lazily
Lennart Poettering [Sun, 25 Jan 2026 19:49:14 +0000 (20:49 +0100)] 
test: perform /usr/share/ sysext unmount lazily

/usr/share/ is a directory commonly accessed by various tools, hence we
really should make sure we umount it lazily (MNT_DETACH), since
otherwise there's a good chance that the umount might simply fail.

I noticed this there:

https://github.com/systemd/systemd/actions/runs/21321690161/job/61372465563?pr=40446
(cherry picked from commit 2e38c56c73b06e4e031535ad2dccbb6d065fbadd)
(cherry picked from commit b6b0c83b8d1602925ab918e4ae1c4245a2a4c128)
(cherry picked from commit a88ff44c4405db05fec6f2e0364ff9952007599d)

2 months agosd-event: unpoison memory returned by epoll_pwait2()
Mike Yuan [Sat, 24 Jan 2026 17:33:05 +0000 (18:33 +0100)] 
sd-event: unpoison memory returned by epoll_pwait2()

Our fuzzer CI recently got bumped to Ubuntu 24.04 with
glibc >= 2.35. Apparently msan is not happy with the new
epoll_pwait2(), hence explicitly mark the memory region
as initialized.

Fixes #40455
Alternative to #40463

(cherry picked from commit 21ebcb5814431fad1d2e805a040ed19776f4c35b)
(cherry picked from commit a8eb2370c8a0cad89ac1b4f82f2f6b13b3a9b8dd)
(cherry picked from commit 91eb7641d3ea92a00157184978461be14f5939f2)