Hi, On Fri, 24 Sep 2021 08:01:56 +0200 Johannes Schauer Marin Rodrigues <[email protected]> wrote: > since dpkg 1.18.5, dpkg sets the variable DPKG_ROOT when invoking maintainer > scripts. Usually that variable is empty but when calling dpkg with --root and > --force-script-chrootless, dpkg will set DPKG_ROOT to the new root directory. > In that mode, maintainer scripts are called without chroot(1) around them, > and thus have to be able to possibly operate on the path from DPKG_ROOT > instead of working on /. This is useful for bootstrapping, creating chroots > for foreign architectures where utilities from inside the chroot cannot be > executed, avoiding dependency loops between postinst scripts, installation > without requiring superuser privileges and for creating installations that do > not even contain dpkg. See > https://wiki.debian.org/Teams/Dpkg/Spec/InstallBootstrap for more > information. > > We have set up a weekly salsa job that patches 10 source packages plus > dash and then shows how a chroot created with DPKG_ROOT is bit-by-bit > identical to a chroot created the normal way: > > https://salsa.debian.org/helmutg/dpkg-root-demo/-/pipelines > > The changes needed for dash are twofold: > > 1. prefixing paths in dash.postinst with DPKG_ROOT (this bug) > 2. replacing add-shell with triggers once debianutils >= 5.1-1 migrates > to testing > > Since debianutils is currently blocked from migration, this bug is about > the first item. > > Please consider applying the attached patch.
if you have no objections, I would prepare an NMU of dash with the changes in above patch. What do you think? Thanks! cheers, josch
signature.asc
Description: signature

