]> piware.de Git - bin.git/commitdiff
build-debian-distrobox: Work around tmpfiles trying to change host files master
authorMartin Pitt <martin@piware.de>
Mon, 3 Aug 2026 19:17:22 +0000 (21:17 +0200)
committerMartin Pitt <martin@piware.de>
Mon, 3 Aug 2026 19:17:22 +0000 (21:17 +0200)
Latest systemd is shipping tmpfiles which are meddlig with /dev/ and
/run, which fails on EPERM. That breaks the postinst scripts.

build-debian-distrobox

index e93dcebb38f5c0bbb85d57b50ceb52e78e08f443..3fce8ff0fa03a9c0468d1eeeb6f8a2d608b4bc44 100755 (executable)
@@ -5,7 +5,9 @@ RELEASE=${1:-sid}
 DISTRO=${2:-debian}
 
 distrobox rm -f $RELEASE || true
-distrobox create --image docker.io/$DISTRO:$RELEASE --pull --yes --name $RELEASE --hostname $RELEASE
+# tmpfiles are trying to change permissions of bind-mounted /dev and /run
+distrobox create --image docker.io/$DISTRO:$RELEASE --pull --yes --name $RELEASE --hostname $RELEASE \
+     --pre-init-hooks 'dpkg-divert --add --rename /usr/bin/systemd-tmpfiles; ln -s /bin/true /usr/bin/systemd-tmpfiles'
 
 # libglvnd-gles? pdfmerge calibre qt5-qtwayland
 
@@ -17,7 +19,9 @@ fi
 
 apt-get update
 DEBIAN_FRONTEND=noninteractive apt-get -y dist-upgrade
+'
 
+distrobox enter $RELEASE -- sudo sh -exc '
 # development tools
 apt-get install -y --no-install-recommends build-essential git-buildpackage libwww-perl less vim lintian debhelper manpages-dev git pristine-tar bash-completion wget gnupg ubuntu-dev-tools python3-debian fakeroot libdistro-info-perl openssh-client flatpak-xdg-utils jq