#1140568 Fails to install in mkosi when built with recent debhelper

Package:
systemd
Source:
systemd
Description:
system and service manager
Submitter:
Guido Günther
Date:
2026-06-26 21:31:03 UTC
Severity:
normal
#1140568#5
Date:
2026-06-22 20:22:49 UTC
From:
To:
Hi,

(same issues happens with 261):

We're currently rebuilding Debian's systemd 260 package to enable
systemd-sysupdate. Since we do this nightly, the build switched from
using debhelper 13 to 14 recently. The so built systemd fails to install
within mkosi due to a small change from dh_installtmpfiles:

This is how it fails in mkosi:

‣ + apt-get -o APT::Architecture=amd64 -o APT::Architectures=amd64 -o APT::Install-Recommends=false -o APT::Immediate-Co
nfigure=off -o APT::Get::Assume-Yes=true -o APT::Get::AutomaticRemove=true -o APT::Get::Allow-Change-Held-Packages=true
-o APT::Get::Allow-Remove-Essential=true -o APT::Sandbox::User=root -o Acquire::AllowReleaseInfoChange=true -o Acquire::
Check-Valid-Until=false -o Dir::Cache=/var/cache/apt -o Dir::State=/buildroot/var/lib/apt -o Dir::State::lists=/var/lib/
apt/lists/ -o Dir::Log=/var/log/apt -o Dir::State::Status=/buildroot/var/lib/dpkg/status -o Dir::Bin::DPkg=/usr/bin/dpkg
 -o Debug::NoLocking=true -o DPkg::Options::=--root=/buildroot -o DPkg::Options::=--force-unsafe-io -o DPkg::Options::=-
-force-architecture -o DPkg::Options::=--force-depends -o DPkg::Options::=--no-debsig -o DPkg::Use-Pty=false -o DPkg::In
stall::Recursive::Minimum=1000 -o pkgCacheGen::ForceEssential=, '--option=DPkg::Options::=--path-exclude=/usr/share/doc/
*' '--option=DPkg::Options::=--path-exclude=/usr/share/man/*' '--option=DPkg::Options::=--path-exclude=/usr/share/groff/
*' '--option=DPkg::Options::=--path-exclude=/usr/share/gtk-doc/*' '--option=DPkg::Options::=--path-exclude=/usr/share/in
fo/*' '--option=DPkg::Options::=--path-include=/usr/share/doc/*/copyright' install '^libtss2-esys-[0-9.]+-0(t64)?$' '^li
btss2-mu[0-9.-]+(t64)?$' '^libtss2-rc0(t64)?$' '^libtss2-tcti-device0(t64)?$' bash btrfs-progs dmsetup dosfstools e2fspr
ogs gzip kmod less libcryptsetup12 libfido2-1 libseccomp2 procps systemd systemd-cryptsetup systemd-repart udev util-lin
ux

…

Setting up systemd (260.1-1+nb20260622.11133751) ...
Created symlink '/etc/systemd/system/multi-user.target.wants/remote-fs.target' → '/usr/lib/systemd/system/remote-fs.target'.
Created symlink '/etc/systemd/system/sysinit.target.wants/systemd-pstore.service' → '/usr/lib/systemd/system/systemd-pstore.service'.
Created symlink '/etc/systemd/system/autovt@.service' → '/usr/lib/systemd/system/getty@.service'.
Created symlink '/etc/systemd/system/getty.target.wants/getty@tty1.service' → '/usr/lib/systemd/system/getty@.service'.
Creating group 'lpadmin' with GID 999.
Creating group 'systemd-journal' with GID 998.
Creating group 'systemd-network' with GID 997.
Creating user 'systemd-network' (systemd Network Management) with UID 997 and GID 997.
Setting access ACL "u::rwx,g::r-x,g:adm:r-x,m::r-x,o::r-x" on /var/log/journal failed: Invalid argument
dpkg: error processing package systemd (--configure):
 old systemd package postinst maintainer script subprocess failed with exit status 73

(full log e.g. at
https://salsa.debian.org/BengalOS-team/bengalos-recipes/-/jobs/9826390)

triggered by this change in the postinst:
--- systemd.postinst	2026-06-22 04:20:31.000000000 +0200
+++ /var/lib/dpkg/info/systemd.postinst	2026-03-23 14:27:09.000000000 +0100
@@ -84,20 +84,22 @@
[..snip..]
-# Automatically added by dh_installtmpfiles/14.1
+# Automatically added by dh_installtmpfiles/13.31
 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
-	systemd-tmpfiles ${DPKG_ROOT:+--root="$DPKG_ROOT"} --create 20-systemd-osc-context.conf 20-systemd-shell-extra.conf 20-systemd-ssh-generator.conf 20-systemd-stub.conf 20-systemd-varlink.conf credstore.conf debian.conf home.conf journal-nocow.conf provision.conf systemd-network.conf systemd-nologin.conf systemd-pstore.conf systemd-tmp.conf systemd.conf tmp.conf var.conf x11.conf
+	if [ -x "$(command -v systemd-tmpfiles)" ]; then
+		systemd-tmpfiles ${DPKG_ROOT:+--root="$DPKG_ROOT"} --create 20-systemd-osc-context.conf 20-systemd-shell-extra.conf 20-systemd-ssh-generator.conf 20-systemd-stub.conf 20-systemd-varlink.conf credstore.conf debian.conf home.conf journal-nocow.conf provision.conf systemd-network.conf systemd-nologin.conf systemd-pstore.conf systemd-tmp.conf systemd.conf tmp.conf var.conf x11.conf || true
+	fi
[..snip..]

Not the removal of the `|| true` 14.1 at then end of the
sysmted-tmpfiles invocation when using debhelper. Adding the "|| true"
back lets systemd built with debhelper 14 install again in mkosi.

This also affects systemd 261-1.

I'm filing this here as the change is in the systemd package am in no
way certain this is where it should be fixed.

Cheers,
 -- Guido