Source: sysvinit
Severity: normal
Tags: patch
User: debian-d...@lists.debian.org
Usertags: dpkg-root-support

Hi,

when creating chroots for architectures that are in the process of being
bootstrapped without yet having emulation support, it is not possible to run
maintainer scripts inside the foreign architecture chroot as the tools they
call cannot be executed. The solution to that problem is to run maintainer
scripts from the chroot directory without doing a chroot call first and instead
use the $DPKG_ROOT environment variable to communicate the location of the
chroot directory that the tools called by the maintainer script should operate
on. By default, for normal installations, that environment variable is set, but
empty. For more information see:
https://wiki.debian.org/Teams/Dpkg/Spec/InstallBootstrap

Support for this mode was already added to all packages in the essential set,
apt, systemd-sysv as well as build-essential. I'm now trying to add
support to the packages required to set up a system using sysv-init.
Having support DPKG_ROOT support for another init system than systemd is
useful to create chroots for architectures or kernels (like GNU Hurd)
that do not have systemd support.

I put my patch in this MR:
https://salsa.debian.org/debian/sysvinit/-/merge_requests/11

We tested it in our CI environment and it produces a bit-by-bit
identical chroot with DPKG_ROOT compared to a normal installation.

https://salsa.debian.org/helmutg/dpkg-root-demo/

Since the DPKG_ROOT variable is empty on normal installations, the patch
should have no effect in the normal case.

Thanks!

cheers, josch

Reply via email to