Bug#983421: init-system-helpers: please respect DPKG_ROOT when checking for /usr/sbin/policy-rc.d
Johannes Schauer Marin Rodrigues
josch at debian.org
Fri Aug 20 20:33:00 BST 2021
Hi,
Quoting Johannes 'josch' Schauer (2021-02-24 00:14:16)
> if dpkg (since 1.18.5) is run with --force-script-chrootless, it sets the
> variable DPKG_ROOT to the directory into which dpkg will install the
> requested packages. 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.
>
> Currently, when maintainer scripts are run, /usr/sbin/policy-rc.d is
> checked to avoid starting services. But instead, the scripts should
> check "$DPKG_ROOT/usr/sbin/policy-rc.d". In normal situations, the
> $DPKG_ROOT variable is empty, so this will work as usual. But if dpkg is
> run with --root and --force-script-chrootless then /usr/sbin/policy-rc.d from
> the new root directory will be used.
for your convenience, I have created a merge request on salsa which implements
the changes that make DPKG_ROOT work in our testing environment.
https://salsa.debian.org/debian/init-system-helpers/-/merge_requests/12
Thanks!
cheers, josch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-systemd-maintainers/attachments/20210820/1fb24e58/attachment.sig>
More information about the Pkg-systemd-maintainers
mailing list