🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Johannes Schauer Marin Rodrigues Wed, 07 Oct 2026 10:00
Bug#1038404: Single option to not depend on host configuration
#25
Author: 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==--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads