Your message dated Wed, 04 Nov 2026 15:05:28 +0000
with message-id <[email protected]>
and subject line Bug#1091442: fixed in mmdebstrap 1.7.0-1
has caused the Debian Bug report #1091442,
regarding dpkg-preconfigure calling apt-extracttemplates breaks DPKG_ROOT
support
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.)
--
1091442: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1091442
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: debconf
Version: 1.5.88
Severity: normal
X-Debbugs-Cc: [email protected], [email protected]
Hi,
since the upload of debconf 1.5.88 a few days ago, building chrootless Debian
chroot tarballs is broken if not using fakeroot. Specifically, since that
upload, /var/cache/debconf/ and /var/cache/debconf/tmp.ci/ outside the chroot
will get modified or created, respectively. I tried to come up with a patch but
am left with more questions than answers and am thus reaching out to the
debconf maintainers as well as the readers of the deity list. There is a bit to
unpack, lets start with a patch that works around the issue in our CI [1]:
--- a/dpkg-preconfigure
+++ b/dpkg-preconfigure
@@ -140,7 +140,10 @@ elsif (! @debs) {
}
my $apt_extracttemplates;
-if (-x '/usr/lib/apt/apt-extracttemplates') {
+if (($ENV{USER} // '') ne 'user') {
+ warn gettext("delaying package configuration, since
apt-extracttemplates does not support DPKG_ROOT");
+ exit;
+} elsif (-x '/usr/lib/apt/apt-extracttemplates') {
$apt_extracttemplates = '/usr/lib/apt/apt-extracttemplates';
} elsif (Debconf::Path::find('apt-extracttemplates')) {
$apt_extracttemplates = 'apt-extracttemplates';
EOF
Before debconf 1.5.88, dpkg-preconfigure did not find apt-extracttemplates
(because apt-utils was not installed) and thus bailed out early. But since apt
2.9.11, apt-extracttemplates is part of the "apt" package and thus always
available. Thus, dpkg-preconfigure does not bail out and ends up touching files
that it should not. Notably, this only happens when running mmdebstrap in
chrootless mode *without* fakeroot around it. With fakeroot we are lacking
privileges and we get:
debconf: DbDriver "passwords" warning: could not open
/var/cache/debconf/passwords.dat: Permission denied
Which means once again, dpkg-preconfigure bails out early (but for a different
reason this time) and nothing outside of the chroot gets modified. This is also
part of the reason why we check the USER environment variable in the workaround
patch above. It ensures that when fakeroot is *not* used, that is, if it is not
the CI user named "user" that is running dpkg-preconfigure, we bail out early.
But why this clunky check? Other patches to enable chrootless support just
check for the DPKG_ROOT environment variable. But that variable is not set for
the dpkg-preconfigure script. The DPKG_ROOT environment variable is set for
maintainer scripts when apt is started by mmdebstrap with these options:
-oDPkg::Chroot-Directory=
-oDPkg::Options::=--force-not-root
-oDPkg::Options::=--force-script-chrootless
-oDPkg::Options::=--root=...
But dpkg-preconfigure is called by /etc/apt/apt.conf.d/70debconf via
DPkg::Pre-Install-Pkgs and thus does *not* have the DPKG_ROOT variable set as
it is not executed by dpkg but by apt itself. We are thus not able to figure
out that this is supposed to be a chroot installation.
I'm am looking for ideas of how to fix this.
Since chroot installation worked well before apt-extracttemplates moved to
"apt" I'm tending to look for a solution which just exits dpkg-preconfigure
early for chrootless installations. But on what condition should this happen?
This is made worse by the fact, that apt is not being told that this is a
chrootless installation -- dpkg is being told via apt options.
Should apt gain support for being told that it's doing a chrootless
installation and then pass the right options or environment variables to the
DPkg::Pre-Install-Pkgs scripts it calls?
Should the caller of apt set an environment variable or touch a special file to
indicate to dpkg-preconfigure that it should please exit early?
Dear debconf & apt developers, do you have ideas?
Thanks!
cheers, josch
[1] https://salsa.debian.org/helmutg/dpkg-root-demo/-/merge_requests/2
--- End Message ---
--- Begin Message ---
Source: mmdebstrap
Source-Version: 1.7.0-1
Done: Johannes Schauer Marin Rodrigues <[email protected]>
We believe that the bug you reported is fixed in the latest version of
mmdebstrap, 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.
Johannes Schauer Marin Rodrigues <[email protected]> (supplier of updated
mmdebstrap 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: SHA512
Format: 1.8
Date: Wed, 04 Nov 2026 15:51:39 +0100
Source: mmdebstrap
Architecture: source
Version: 1.7.0-1
Distribution: unstable
Urgency: medium
Maintainer: Johannes Schauer Marin Rodrigues <[email protected]>
Changed-By: Johannes Schauer Marin Rodrigues <[email protected]>
Closes: 1036151 1082899 1091442 1106755 1121344 1124822 1129567 1131026 1132514
1135727 1139592 1140780
Changes:
mmdebstrap (1.7.0-1) unstable; urgency=medium
.
* New upstream version 1.7.0
* debian/tests/control:
- document autopkgtest triggers on systemd, procps, manpages and passwd
- add autopkgtest trigger on libarchive-tools and tar
- add dependency on erofs-utils and libarchive-tools for erofs and cpio
output formats
- remove isc-dhcp-client which got removed from Debian, see #1143544
* Cleanup dpkg and debconf *-old backup files (Closes: #1082899)
* place DPkg::Pre-Install-Pkgs workaround into a new config file (Closes:
#1091442)
* Better honor TMPDIR without relying on Perl's File::Spec->tmpdir fallback
to /tmp
Thanks to Leo (Meng Hsi) Li (Closes: #1135727)
* Fix Acquire::Languages example (Closes: #1131026)
* Also mention the abbreviation --hook-dir (Closes: #1140780)
* mmdebstrap-autopkgtest-build-qemu: add sshkey to user
Thanks to Jochen Sprickerhof (Closes: #1106755)
* Create pax tar archives with --sparse (Closes: #1129567)
* Also cleanup /etc/hostid (Closes: #1036151)
* Check if keyring can be read from inside the unshared user namespace
(Closes: #1139592)
* Fix handling of files in --dpkgopt and --aptopt if no trailing newline
Thanks to Josh Triplett (Closes: #1132514)
* Divert start-stop-daemon
Thanks to Helmut Grohne (Closes: #1121344)
* Support subid delegation via nsswitch
Thanks to Simone Caronni (Closes: #1124822)
* Fix(cleanup/reproducible/machine-id): preserve permissions of machine-id
Thanks to Elkhan Mammadli
* Accept SHA512 from apt in eatmydata hook
Thanks to May Durst
* Explain bad or missing TMPDIR
Thanks to Tj
* Prefer keyrings with .pgp extension over .gpg
Thanks to Guillem Jover
* debian/patches: drop all patches (applied upstream)
* tests/skip-tar-in-mknod: cherry-pick upstream fix
* README.md: strongly worded exclusion of contributions not created by humans
Checksums-Sha1:
12663bd68e28758b6a55abe82da1dbe68492add8 2648 mmdebstrap_1.7.0-1.dsc
80d08f908933545208fcddf27df2b739d45f1b27 183982 mmdebstrap_1.7.0.orig.tar.gz
3c84e315deffe7e83799ed08a2b4707ea8a3bd29 21096 mmdebstrap_1.7.0-1.debian.tar.xz
Checksums-Sha256:
7229edcc2e60d4ade71dc636a925032938cf5daa56d39183b916263bd04d773f 2648
mmdebstrap_1.7.0-1.dsc
af4d10d87f71d5b94ad5272a002231150c7817e21fa3deda9f67775f43005327 183982
mmdebstrap_1.7.0.orig.tar.gz
0d537d1efbf2db027d1ca24349ca91d53959ec948907644b3995065030d9b8e8 21096
mmdebstrap_1.7.0-1.debian.tar.xz
Files:
e71f55140f31d656231ab79cb44f0f08 2648 admin optional mmdebstrap_1.7.0-1.dsc
a868a4fb345da21e0be1790336fcde6f 183982 admin optional
mmdebstrap_1.7.0.orig.tar.gz
89d8b70df548ec26d36694419ef52177 21096 admin optional
mmdebstrap_1.7.0-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmrrRqIACgkQ8sulx4+9
g+HRPw/+NMh+AHeWsQ16SLcQnReoMGksE6msYwvmDve5xoEAkmz2e7tfSwvdzmnF
0GFiOu2yT9qJjUlHHsQ1bRQNNazUDsjHTQd/bqw2c1RfPNYH+RhzjV4QOWTK8CAY
k+VAsvexlwPp4nWfTHjH2zdERAyrSoumu6gdNl5cvekDhdSsSBN32ZhleUjN7wrW
iGx53aliCzUFdn9G8XmUWev6JVaeJ2BeHiUhnXqR+Eylt58HprXsBI9u36nSuNrg
Si+QHRVo0mSo1rr2D2moRiRhmvOF3fdbn/o9h144SMPUsKmOJAltt1RgJKLdLxNE
Ptagacbe3NhJyLY2H4WRfx5Z/k3jjs1YE/Ifq1Ekoaakmj13dhilaYo04+5axKk5
g00b3nckHM/zSciwxQu9Lv41MyCdQjPiYeOLZDWTAyl2LKjwQSCTzlh+0xnH6lkV
dwHirUky5hFfUAdRQsiMtpd7geMu6mgkgGZtXIHXSvA90amGT96p3IPGufBlCMc0
dhLRTf8uNTZ//obhEExNAaHJMCD1HZ8f1o38mPSmZsy7KvLTkKsSy05hAM692j8c
bGLrmXAtMjonPSj39NJVor6PVVBmGf3TsSKubCc0vrE3hNWtIOt3Mz2MDPjVG+PF
+jNnW2FNBdWv/7qMFpf910rbR+NNKuO/xwrRTpMQtopf5UpE5Uk=
=2gNa
-----END PGP SIGNATURE-----
pgptMcBBcQfw_.pgp
Description: PGP signature
--- End Message ---