make_mirror.sh: export SOURCE_DATE_EPOCH for more reproducible disk images

This commit is contained in:
Johannes 'josch' Schauer 2020-03-07 23:36:56 +01:00
parent 73b46e1812
commit d70dad0ac9
Signed by untrusted user: josch
GPG key ID: F2CBA5C78FBD83E1

View file

@ -412,6 +412,8 @@ cleanuptmpdir() {
rmdir "$tmpdir" rmdir "$tmpdir"
} }
export SOURCE_DATE_EPOCH=$(date --date="$(grep-dctrl -s Date -n '' "$newmirrordir/dists/unstable/Release")" +%s)
if [ "$HAVE_QEMU" = "yes" ]; then if [ "$HAVE_QEMU" = "yes" ]; then
# We must not use any --dpkgopt here because any dpkg options still # We must not use any --dpkgopt here because any dpkg options still
# leak into the chroot with chrootless mode. # leak into the chroot with chrootless mode.
@ -549,7 +551,6 @@ END
fi fi
mirror="http://127.0.0.1/debian" mirror="http://127.0.0.1/debian"
SOURCE_DATE_EPOCH=$(date --date="$(grep-dctrl -s Date -n '' "$newmirrordir/dists/unstable/Release")" +%s)
for dist in stable testing unstable; do for dist in stable testing unstable; do
for variant in minbase buildd -; do for variant in minbase buildd -; do
echo running debootstrap --no-merged-usr --variant=$variant $dist /tmp/debian-$dist-debootstrap $mirror echo running debootstrap --no-merged-usr --variant=$variant $dist /tmp/debian-$dist-debootstrap $mirror