Your message dated Wed, 10 Jan 2024 17:22:50 +0000
with message-id <[email protected]>
and subject line Bug#1056176: fixed in insserv 1.24.0-2
has caused the Debian Bug report #1056176,
regarding insserv: please support DPKG_ROOT
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1056176: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1056176
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: insserv
Severity: normal
Tags: patch
User: [email protected]
Usertags: dpkg-root-support
X-Debbugs-Cc: [email protected]

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.

Attached patch changes the insserv postinst so that if the $DPKG_ROOT
environment variable is not empty, the insserv tool is called with a bunch of
options which let it operate on the files inside the directory stored in
$DPKG_ROOT instead of /. Please review the patch to make sure that the insserv
command line arguments that the patch passes indeed make sense in this
scenario.

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


diff -Nru insserv-1.24.0/debian/postinst insserv-1.24.0/debian/postinst
--- insserv-1.24.0/debian/postinst      2022-02-22 11:31:29.000000000 +0100
+++ insserv-1.24.0/debian/postinst      2023-11-17 01:55:47.000000000 +0100
@@ -7,5 +7,16 @@
 # fix up the rc?.d priorities from the dumb update-rc.d fallback (which uses
 # priority 01 for everything).
 if [ "$1" = "configure" ] && [ -z "$2" ]; then
-    insserv || true
+    if [ -z "$DPKG_ROOT" ] ; then
+        # normal operation
+        insserv || true
+    else
+        # in chrootless installation, provide the path to the chroot
+        insserv \
+            --path "$DPKG_ROOT/etc/init.d" \
+            --override "$DPKG_ROOT/etc/insserv/overrides/" \
+            --insserv-dir "$DPKG_ROOT/etc/init.d/" \
+            --config "$DPKG_ROOT/etc/insserv.conf" \
+            || true
+    fi
 fi

--- End Message ---
--- Begin Message ---
Source: insserv
Source-Version: 1.24.0-2
Done: Mark Hindley <[email protected]>

We believe that the bug you reported is fixed in the latest version of
insserv, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Mark Hindley <[email protected]> (supplier of updated insserv package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Wed, 10 Jan 2024 16:35:21 +0000
Source: insserv
Architecture: source
Version: 1.24.0-2
Distribution: unstable
Urgency: medium
Maintainer: Debian sysvinit maintainers 
<[email protected]>
Changed-By: Mark Hindley <[email protected]>
Closes: 1052942 1056176
Changes:
 insserv (1.24.0-2) unstable; urgency=medium
 .
   [ Mark Hindley ]
   * Drop Petter Reinholdtsen from uploaders with thanks.
   * Update standards version to 4.6.2 (no changes).
   * d/postinst: add patch from [email protected] to support DPKG_ROOT.
     (Closes: #1056176)
   * d/t/control: mark upstream tests as flaky (See #1052942).
   * Ignore flaky upstream testsuite failures, pending upstream fix.
     (Closes: #1052942)
 .
   [ Debian Janitor ]
   * Remove 1 obsolete maintscript entry.
   * Bump debhelper from old 12 to 13.
   * Set upstream metadata fields: Bug-Database, Repository-Browse.
Checksums-Sha1:
 50579e15dc668189967e79e204b4b944d4b15bad 1957 insserv_1.24.0-2.dsc
 87f46a4bdb1acf72e8835f9f4745f7c92b255cf7 36424 insserv_1.24.0-2.debian.tar.xz
 890379b8d0d825c60c07d6eb2d642e1d43530f82 6730 insserv_1.24.0-2_amd64.buildinfo
Checksums-Sha256:
 9ca07a513c8c8a7faa2ea0afc468197bb58b952676f45efba662c21971b3ee8e 1957 
insserv_1.24.0-2.dsc
 484976d02f71797a80c4e1b8f1a5c3c81120b4d84c98cbc627ad0b80f8c33c7f 36424 
insserv_1.24.0-2.debian.tar.xz
 2dd4a402895220d25154407659d9d67058c5f3669bac8ce18598ab630539bf81 6730 
insserv_1.24.0-2_amd64.buildinfo
Files:
 9214efcdc5171003a1b5d5bd2edbfc4f 1957 misc optional insserv_1.24.0-2.dsc
 f455b0339757753b05b414dbe7cb4a83 36424 misc optional 
insserv_1.24.0-2.debian.tar.xz
 71db373749732d8ba076604421c4cf28 6730 misc optional 
insserv_1.24.0-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEUGwVpCsK9aCoVCPu0opFvzKH1kkFAmWeyLAACgkQ0opFvzKH
1klmbQ//eCtrNnd11FI5LYyVZsGZ4m+afrMo0GVe6tNrPolESZ9NYyQ5MC3fsE9n
nFeCegGsNAb81oXYrf+i4kBEKIfVrHaGhZaBS2hV7S6FRVITRPaNr5sJxx/38N0X
UMP5HJIILpAkqUSvmnRoGZu0ju1NnWA4VlARQkxPf/NokCLlcANB/EvpxwusQ4n8
b/glTGYHUAkoF56HD/od9Jor2Lmi1XNJ6C+L7Z/CIZ+kRMrmEnUdihhcVlwq3Hz8
Kdfr5pbFmZTNdahKmXJzp92oFK2gqyaY+S2kMOCfKeNONXhAR/9mlXIlPLR26sL3
jOJ5MPqrDMNBJUCQMGp1H7em2cF5x3I4MmJxiFYhd6Sya6yWRvmmRy6l9Hpomplp
bVeoe63C5KVCHUwli0L6Ttext4NhOIOEw/HkKhbsEAQdlCC7ILPAkhBYrMJF0kGy
Ere2PjkplMYeAXZBSudBlTHDj2oti/u8KS2nYh8RdKg++cZrvYkqPN2Tb2QGsrbi
b8p+Jws7f/jt0OBr2xTZqSdfbrOZFftfEet4CIk4FWYjeFB7PmvyO8exnsqKbq2C
BG1PxAagXEmqMJBPwYkIQQuB/YwA8nWpQuq6GCdFGyVtsOllyvOekSquHiT+UK6+
BAjNNDGJ3JRHonzkTkzFEJ+ysOZptDFmS89+cOsI8YaFqjYs0Bc=
=cqxF
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to