Compare commits
No commits in common. "3e233e10dfe414e43b31d328eecb0c776afc2ec3" and "366d2ffbecda0de3205119c48a030a09b4bb4414" have entirely different histories.
3e233e10df
...
366d2ffbec
3 changed files with 16 additions and 7 deletions
15
mmdebstrap
15
mmdebstrap
|
@ -3120,6 +3120,16 @@ sub run_cleanup() {
|
|||
unlink $ENV{APT_CONFIG}
|
||||
or error "failed to unlink $ENV{APT_CONFIG}: $!";
|
||||
}
|
||||
|
||||
if (any { $_ eq 'cleanup/mmdebstrap/qemu' } @{ $options->{skip} }) {
|
||||
info "skipping cleanup/mmdebstrap/qemu as requested";
|
||||
} elsif (defined $options->{qemu}
|
||||
and any { $_ eq $options->{mode} } ('root', 'unshare')
|
||||
and -e "$options->{root}/usr/bin/qemu-$options->{qemu}-static") {
|
||||
unlink "$options->{root}/usr/bin/qemu-$options->{qemu}-static"
|
||||
or error
|
||||
"cannot unlink /usr/bin/qemu-$options->{qemu}-static: $!";
|
||||
}
|
||||
}
|
||||
|
||||
if (any { $_ eq 'cleanup/reproducible' } @{ $options->{skip} }) {
|
||||
|
@ -7341,7 +7351,8 @@ Extract the downloaded packages into the rootfs.
|
|||
=item B<prepare>
|
||||
|
||||
In B<fakechroot> mode, environment variables C<LD_LIBRARY_PATH> will be set up
|
||||
correctly. For foreign B<fakechroot> environments, C<LD_LIBRARY_PATH> and
|
||||
correctly. If the chroot requires the qemu-user-static binary it will be copied
|
||||
in. For foreign B<fakechroot> environments, C<LD_LIBRARY_PATH> and
|
||||
C<QEMU_LD_PREFIX> are set up accordingly. This step is not carried out in
|
||||
B<extract> mode and neither for the B<chrootless> variant.
|
||||
|
||||
|
@ -7386,7 +7397,7 @@ Performs cleanup tasks, unless B<--skip=cleanup> is used:
|
|||
|
||||
=item * Removes the package lists (unless B<--skip=cleanup/apt/lists>) and apt cache (unless B<--skip=cleanup/apt/cache>). Both removals can be disabled by using B<--skip=cleanup/apt>.
|
||||
|
||||
=item * Remove all files that were put into the chroot for setup purposes, like F</etc/apt/apt.conf.d/00mmdebstrap> and the temporary apt config. 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 files that make the result unreproducible and write the empty string 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:
|
||||
|
||||
|
|
|
@ -324,8 +324,8 @@ test "$RELEASE" = jessie &&
|
|||
|
||||
set -- "$@" \
|
||||
"--include=init,linux-image-$ARCHITECTURE,python3" \
|
||||
'--customize-hook=echo host >"$1/etc/hostname"' \
|
||||
'--customize-hook=echo 127.0.0.1 localhost host >"$1/etc/hosts"' \
|
||||
'--customize-hook=echo autopkgtestvm >"$1/etc/hostname"' \
|
||||
'--customize-hook=echo 127.0.0.1 localhost autopkgtestvm >"$1/etc/hosts"' \
|
||||
'--customize-hook=passwd --root "$1" --delete root' \
|
||||
'--customize-hook=useradd --root "$1" --home-dir /home/user --create-home user' \
|
||||
'--customize-hook=passwd --root "$1" --delete user' \
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
set -eu
|
||||
export LC_ALL=C.UTF-8
|
||||
trap "rm -f /tmp/debian-chroot.tar" EXIT INT TERM
|
||||
{{ CMD }} --mode={{ MODE }} --variant=apt \
|
||||
--customize-hook='rm "$1/usr/sbin/policy-rc.d"; rm "$1/usr/sbin/start-stop-daemon"' \
|
||||
{{ DIST }} /tmp/debian-chroot.tar {{ MIRROR }}
|
||||
{{ CMD }} --mode={{ MODE }} --variant=apt --customize-hook='rm "$1/usr/sbin/policy-rc.d"; rm "$1/sbin/start-stop-daemon"' {{ DIST }} /tmp/debian-chroot.tar {{ MIRROR }}
|
||||
tar -tf /tmp/debian-chroot.tar | sort | diff -u tar1.txt -
|
||||
|
|
Loading…
Reference in a new issue