🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #25

Bug#1038404: Single option to not depend on host configuration

#25
From: Johannes Schauer Marin Rodrigues
Date: Wed, 07 Oct 2026 10:00
128 lines
7310 bytes
--===============5412550875769545941==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

Control: tag -1 wontfix

Hi,

TLDR: there is no one-size-fits-all solution and mmdebstrap tries to do what
debootstrap does. Usually reproducibility is required when mmdebstrap is run
from a script and in that case, adding a hook which does the right thing is
easy and documented with examples in the man page.

Quoting Johannes Schauer Marin Rodrigues (2023-06-17 21:34:48)
> Quoting Josh Triplett (2023-06-17 20:37:47)
> > mmdebstrap has a couple of places in which it copies host configuration=
 into
> > the bootstrapped system. For instance, it puts the host's hostname into
> > /etc/hostname, and copies in the host's /etc/resolv.conf. Please consid=
er
> > providing a single option that suppresses all current and future uses o=
f the
> > host configuration, to make it easier to build reproducible installatio=
ns.
> >=20
> > The manpage mentions using a customize-hook to handle those two files,
> > but given the common need for reproducible installations, it'd be nice
> > to have this become simpler and standardized.
>=20
> you are right, mmdebstrap only creates bit-by-bit reproducible output if =
run
> from the same host because of these two files it copies in. You are right=
 in
> that it should be easier to prevent those two files from messing up
> reproducibility.
>=20
> The next question becomes: what should be done about /etc/hostname and
> /etc/resolv.conf? What should their reproducible content be?
>=20
> Or should they just be deleted?
>=20
> You are not the only one who wants such an option:
>=20
> https://gitlab.mister-muffin.de/josch/mmdebstrap/issues/26
> https://gitlab.mister-muffin.de/josch/mmdebstrap/issues/33
>=20
> As I've explained in the first of above issue, I'd rather add a hook than=
 a
> command line flag because all instances that I can come up with where you=
 want
> to run mmdebstrap to create bit-by-bit reproducible output, you run it fr=
om a
> script and not manually type the command from the terminal. Can you confi=
rm
> this?

I would like to suggest to those who run into this bug to try and convince
debootstrap maintainers to improve reproducibility and no longer copy in
/etc/hostname and /etc/resolv.conf. I fear this is not going to happen beca=
use
it's just too convenient to have these two files get copied from the host.

The man page now contains quite a bit of documentation about what mmdebstrap
does and what to do to change its behaviour:

> Remove files that make the result unreproducible and write the empty stri=
ng to
> /etc/machine-id  if   it   exists.   This   can   be   disabled   using
> --skip=3Dcleanup/reproducible. Note that this will not remove files that =
make the
> result  unreproducible  on machines with differing /etc/resolv.conf or
> /etc/hostname. Use a --customize-hook to make those two files  reproducib=
le
> across  multiple  hosts.  See section "SOURCE_DATE_EPOCH" for more inform=
ation.
>=20
> [...]
>=20
> Note that for debootstrap compatibility, mmdebstrap will copy the host's
> /etc/resolv.conf and  /etc/hostname into the chroot. This means that the
> mmdebstrap output will differ if it is run on machines with differing
> /etc/resolv.conf and /etc/hostname contents. To make the  result  reprodu=
cible
> across  different hosts, you need to manually either delete both files fr=
om the
> output:
>=20
>     $ mmdebstrap --customize-hook=3D'rm "$1"/etc/resolv.conf' \
>                  --customize-hook=3D'rm "$1"/etc/hostname' ...
>=20
> or fill them with reproducible content:
>=20
>     $ mmdebstrap --customize-hook=3D'echo nameserver X > "$1"/etc/resolv.=
conf' \
>                  --customize-hook=3D'echo host > "$1"/etc/hostname' ...

If you are interested in bit-by-bit reproducible mmdebstrap output, then you
are probably running it from a script and in that case, just add the hooks
which do what your use-case requires.

Thanks!

cheers, josch
--===============5412550875769545941==
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Description: signature
Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"

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

iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmrGFoQACgkQ8sulx4+9
g+Exuw/9FQXbdHiTx31lYvycg8MyV1f+E31jKumjVsB54lG5w7HSCmPqxWJzgaLC
7U5g8wpoDuOA25GHvyUtD6DmZnhWMImSSyXrJjp1dHF/BqmurHLasMyMXe8+bL5S
mTFq/Q00hDfIxAig6MJ/qG/WX6xwYb4hr8F1SDhF/WhoqIusYNdzdDoF2xm47wi4
Brjn4t+XfCk4YtQ8qKi6oFAstYWfe5QmQdeIBgTFbQ3+HaF6yyvDcZiPMKYeLgZr
8F63GVHZhvvtsy7oWUyAk1FReIgoWnTxuzmIl+O7P/CJwYJJixhyPcU+g4JdGLzZ
BW+6OoeFd2y5NhmwELBnmHkD5H1BV1d1PnFNNcVC6+pU0gXulPNI+vWa8dsjE0kY
1FbEl0XMSwbHe9bHGliwUyGY1oEMJST6iyOcUJhv0BLCuYWj2o6K5wUfg3Hig8qL
+cV8Tr3G66SWWdx/WnHQi4gEbXOmW1JCpg3LAPhHlFuxQcRbplLQgxBmNHf6oc2/
CcaOAJfTdmy5wWNeSJYHCP3c2J0rpz7vUcgL46DnF/3ATNB7jT0DINGL3kevqnws
Ny6L+jCPHcQ4nIvFqRXnwGdfVMLEyoh7MhN97ARpuh8VVwbhlklVxOmIBznMJcTY
xIanKrRM0R8KfJOPegNWWy02dqQO4TYnSIgSMv9QB6f/ssf5YpY=
=YJS/
-----END PGP SIGNATURE-----

--===============5412550875769545941==--
Technical Details
Message-ID: <NLwBj-43tK-1@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod
References: <GHJ05-gD30-5@gated-at.bofh.it> <GHJW9-gDVJ-3@gated-at.bofh.it> <GHJ05-gD30-5@gated-at.bofh.it> <GHJW9-gDVJ-3@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.corradoroberto.it!bofh.it!news.nic.it!robomod
From: Johannes Schauer Marin Rodrigues <josch@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1038404: Single option to not depend on host configuration
Date: Wed, 07 Oct 2026 12:00:01 +0200
Message-ID: <NLwBj-43tK-1@gated-at.bofh.it>
References: <GHJ05-gD30-5@gated-at.bofh.it> <GHJW9-gDVJ-3@gated-at.bofh.it> <GHJ05-gD30-5@gated-at.bofh.it> <GHJW9-gDVJ-3@gated-at.bofh.it>
X-Original-To: Josh Triplett <josh@joshtriplett.org>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Wed Oct  7 09:55:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Johannes Schauer Marin Rodrigues <josch@debian.org>, 1038404@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: josch@debian.org
X-Debian-Pr-Message: followup 1038404
X-Debian-Pr-Package: mmdebstrap
X-Debian-Pr-Source: mmdebstrap
Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="===============5412550875769545941=="
MIME-Version: 1.0
Content-Disposition: inline
User-Agent: alot/0.0.0
X-Debian-User: josch
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1995511
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 128
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: 1038404@bugs.debian.org
X-Original-Date: Wed, 07 Oct 2026 11:53:12 +0200
X-Original-Message-ID: <179136679230.21057.17069246995036548691@localhost>
X-Original-References: <168702706725.3101.6558226414243884696.reportbug@o> <168703048812.1894371.15278517212845266288@localhost> <168702706725.3101.6558226414243884696.reportbug@o> <168703048812.1894371.15278517212845266288@localhost>