add example on how to remove /etc/resolv.conf and /etc/hostname to make the chroot reproducible

This commit is contained in:
Johannes Schauer Marin Rodrigues 2023-10-23 11:55:35 +02:00
parent ecc167e87e
commit a1e5043676
Signed by: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -6757,6 +6757,13 @@ Example: Preparing a chroot for use with autopkgtest
--customize-hook='echo "127.0.0.1 localhost host" > "$1/etc/hosts"' --customize-hook='echo "127.0.0.1 localhost host" > "$1/etc/hosts"'
--customize-hook=/usr/share/autopkgtest/setup-commands/setup-testbed --customize-hook=/usr/share/autopkgtest/setup-commands/setup-testbed
Example: to mimic B<debootstrap> behaviour, B<mmdebstrap> copies from the host.
Remove them in a B<--customize-hook> to make the chroot reproducible across
multiple hosts:
--customize-hook='rm "$1"/etc/resolv.conf'
--customize-hook='rm "$1"/etc/hostname'
=item B<--hook-directory>=I<directory> =item B<--hook-directory>=I<directory>
Execute scripts in I<directory> with filenames starting with C<setup>, Execute scripts in I<directory> with filenames starting with C<setup>,