mirror of
https://gitlab.archlinux.org/archlinux/archlinux-docker.git
synced 2026-05-12 17:26:13 +02:00
Merge branch 'repro_fix' into 'master'
Fix usage of Archive repo snapshot See merge request archlinux/archlinux-docker!101
This commit is contained in:
commit
446b09aa44
@ -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)}"
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user