forked from josch/mmdebstrap
Compare commits
7 commits
d3952de003
...
6baf4151f9
Author | SHA1 | Date | |
---|---|---|---|
6baf4151f9 | |||
c2cb442899 | |||
317bfea7e5 | |||
3ceebe7e07 | |||
75e5a14e6d | |||
ee142d52a5 | |||
09f1dd2ee6 |
1 changed files with 35 additions and 3 deletions
38
mmdebstrap
38
mmdebstrap
|
@ -1413,6 +1413,7 @@ sub run_hooks {
|
||||||
# This is the file descriptor of the socket that the mmdebstrap
|
# This is the file descriptor of the socket that the mmdebstrap
|
||||||
# --hook-helper can write to and read from to communicate with the outside.
|
# --hook-helper can write to and read from to communicate with the outside.
|
||||||
push @env_opts, ("MMDEBSTRAP_HOOKSOCK=" . fileno($options->{hooksock}));
|
push @env_opts, ("MMDEBSTRAP_HOOKSOCK=" . fileno($options->{hooksock}));
|
||||||
|
push @env_opts, ("MMDEBSTRAP_VERBOSITY=" . $verbosity_level);
|
||||||
|
|
||||||
my $runner = sub {
|
my $runner = sub {
|
||||||
foreach my $script (@{ $options->{"${name}_hook"} }) {
|
foreach my $script (@{ $options->{"${name}_hook"} }) {
|
||||||
|
@ -6637,7 +6638,25 @@ Performs cleanup tasks, unless B<--skip=cleanup> is used:
|
||||||
|
|
||||||
=item * Remove all files that were put into the chroot for setup purposes, like F</etc/apt/apt.conf.d/00mmdebstrap>, the temporary apt config and the qemu-user-static binary. This can be disabled using B<--skip=cleanup/mmdebstrap>.
|
=item * Remove all files that were put into the chroot for setup purposes, like F</etc/apt/apt.conf.d/00mmdebstrap>, the temporary apt config and the qemu-user-static binary. This can be disabled using B<--skip=cleanup/mmdebstrap>.
|
||||||
|
|
||||||
=item * Remove all files that make the result unreproducible, like apt and dpkg logs and caches or F</etc/machine-id> and F</var/lib/dbus/machine-id>. This can be disabled using B<--skip=cleanup/reproducible>
|
=item * Remove files that make the result unreproducible and write "uninitialized" to /etc/machine-id if it exists. This can be disabled using B<--skip=cleanup/reproducible>. Note that this will not remove files that make the result unreproducible on machines with differing F</etc/resolv.conf> or F</etc/hostname>. Use a B<--customize-hook> to make those two files reproducible across multiple hosts. See section C<SOURCE_DATE_EPOCH> for more information. The following files will be removed:
|
||||||
|
|
||||||
|
=over 4
|
||||||
|
|
||||||
|
=item * F</var/log/dpkg.log>
|
||||||
|
|
||||||
|
=item * F</var/log/apt/history.log>
|
||||||
|
|
||||||
|
=item * F</var/log/apt/term.log>
|
||||||
|
|
||||||
|
=item * F</var/log/alternatives.log>
|
||||||
|
|
||||||
|
=item * F</var/cache/ldconfig/aux-cache>
|
||||||
|
|
||||||
|
=item * F</var/log/apt/eipp.log.xz>
|
||||||
|
|
||||||
|
=item * F</var/lib/dbus/machine-id>
|
||||||
|
|
||||||
|
=back
|
||||||
|
|
||||||
=item * Remove everything in F</tmp> inside the chroot. This can be disabled using B<--skip=cleanup/tmp>.
|
=item * Remove everything in F</tmp> inside the chroot. This can be disabled using B<--skip=cleanup/tmp>.
|
||||||
|
|
||||||
|
@ -6852,8 +6871,21 @@ As a docker/podman replacement:
|
||||||
|
|
||||||
=item C<SOURCE_DATE_EPOCH>
|
=item C<SOURCE_DATE_EPOCH>
|
||||||
|
|
||||||
By setting C<SOURCE_DATE_EPOCH> the result will be reproducible over multiple
|
By setting C<SOURCE_DATE_EPOCH> the result will be reproducible across multiple
|
||||||
runs with the same options and mirror content.
|
runs with the same options and mirror content. Note that for debootstrap
|
||||||
|
compatibility, B<mmdebstrap> will copy the host's F</etc/resolv.conf> and
|
||||||
|
F</etc/hostname> into the chroot. This means that the B<mmdebstrap> output will
|
||||||
|
differ if it is run on machines with differing F</etc/resolv.conf> and
|
||||||
|
F</etc/hostname> contents. To make the result reproducible across different
|
||||||
|
hosts, you need to manually either delete both files from the output:
|
||||||
|
|
||||||
|
$ mmdebstrap --customize-hook='rm "$1"/etc/resolv.conf' \
|
||||||
|
--customize-hook='rm "$1"/etc/hostname' ...
|
||||||
|
|
||||||
|
or fill them with reproducible content:
|
||||||
|
|
||||||
|
$ mmdebstrap --customize-hook='echo nameserver X > "$1"/etc/resolv.conf' \
|
||||||
|
--customize-hook='echo host > "$1"/etc/hostname' ...
|
||||||
|
|
||||||
=item C<TMPDIR>
|
=item C<TMPDIR>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue