diff --git a/scripts/make-dockerfile.sh b/scripts/make-dockerfile.sh index 4def246..afee8a4 100755 --- a/scripts/make-dockerfile.sh +++ b/scripts/make-dockerfile.sh @@ -9,6 +9,9 @@ declare -r DOWNLOAD="$4" declare -r TITLE="$5" declare -rx SOURCE_DATE_EPOCH="$6" +# For eventual debugging purposes +echo "SOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH}" + # Do not use these directly in the sed below - it will mask git failures BUILD_VERSION="${BUILD_VERSION:-dev}" CI_COMMIT_SHA="${CI_COMMIT_SHA:-$(git rev-parse HEAD)}" diff --git a/scripts/make-rootfs.sh b/scripts/make-rootfs.sh index 6359de5..1f39f3b 100755 --- a/scripts/make-rootfs.sh +++ b/scripts/make-rootfs.sh @@ -10,6 +10,9 @@ declare -r OUTPUTDIR="$3" declare -r ARCHIVE_SNAPSHOT="$4" declare -rx SOURCE_DATE_EPOCH="$5" +# For eventual debugging purposes +echo -e "ARCHIVE_SNAPSHOT: ${ARCHIVE_SNAPSHOT}\nSOURCE_DATE_EPOCH: ${SOURCE_DATE_EPOCH}" + mkdir -vp "$BUILDDIR/alpm-hooks/usr/share/libalpm/hooks" find /usr/share/libalpm/hooks -exec ln -sf /dev/null "$BUILDDIR/alpm-hooks"{} \; @@ -37,7 +40,7 @@ ln -fs /usr/lib/os-release "$BUILDDIR/etc/os-release" # Use archived repo snapshot from archive.archlinux.org for reproducible builds if [[ "$GROUP" == "repro" ]]; then - sed -i "1iServer = https://archive.archlinux.org/repos/$ARCHIVE_SNAPSHOT/\\\$repo/os/\\\$arch" "$BUILDDIR/etc/pacman.d/mirrorlist" + sed -i "1iServer = https://archive.archlinux.org/repos/$ARCHIVE_SNAPSHOT/\\\$repo/os/\\\$arch" rootfs/etc/pacman.d/mirrorlist repro_pacman_options=( --logfile /dev/null ) @@ -57,8 +60,6 @@ $WRAPPER -- chroot "$BUILDDIR" pacman-key --init $WRAPPER -- chroot "$BUILDDIR" pacman-key --populate if [[ "$GROUP" == "repro" ]]; then - # Remove archived repo snapshot from the mirrorlist - sed -i '1d' "$BUILDDIR/etc/pacman.d/mirrorlist" # Clear pacman keyring for reproducible builds rm -rf "$BUILDDIR"/etc/pacman.d/gnupg/* # Normalize mtimes