mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-04-16 16:32:17 +02:00
fix(guix-bootstrap): split x86_64 and i686 bootstrap guile seeds
This commit is contained in:
parent
a98f0d1164
commit
c1ba17c8af
4 changed files with 65 additions and 17 deletions
|
|
@ -25,7 +25,8 @@ src_prepare() {
|
|||
-e "s|@EXEC_TAR_HASH@|${EXEC_TAR_HASH}|g" \
|
||||
-e "s|@EXEC_XZ_HASH@|${EXEC_XZ_HASH}|g" \
|
||||
-e "s|@STATIC_BINARIES_SEED_HASH@|${STATIC_BINARIES_SEED_HASH}|g" \
|
||||
-e "s|@GUILE_SEED_HASH@|${GUILE_SEED_HASH}|g" \
|
||||
-e "s|@GUILE_I686_SEED_HASH@|${GUILE_I686_SEED_HASH}|g" \
|
||||
-e "s|@GUILE_X86_64_SEED_HASH@|${GUILE_X86_64_SEED_HASH}|g" \
|
||||
-e "s|@MES_MINIMAL_SEED_HASH@|${MES_MINIMAL_SEED_HASH}|g" \
|
||||
-e "s|@MESCC_TOOLS_SEED_HASH@|${MESCC_TOOLS_SEED_HASH}|g" \
|
||||
"${patch_template}" > "${rendered_patch}"
|
||||
|
|
|
|||
|
|
@ -36,26 +36,30 @@
|
|||
("powerpc64le-linux" (string-append system "/20210106/" program))
|
||||
("i586-gnu" (string-append system "/20200326/" program))
|
||||
("x86_64-gnu" (string-append system "/20241122/" program))
|
||||
@@ -388,15 +385,15 @@
|
||||
@@ -387,6 +387,10 @@
|
||||
("powerpc64le-linux"
|
||||
"/20210106/guile-static-stripped-2.0.14-powerpc64le-linux-gnu.tar.xz")
|
||||
("riscv64-linux"
|
||||
"/20210725/guile-3.0.2.tar.xz")
|
||||
+ ("x86_64-linux"
|
||||
+ "/guile-static-stripped-2.0.9-x86_64-linux.tar.xz")
|
||||
+ ("i686-linux"
|
||||
+ "/guile-static-stripped-2.0.9-i686-linux.tar.xz")
|
||||
(_
|
||||
- "/20131110/guile-2.0.9.tar.xz"))))
|
||||
+ "/guile-static-stripped-2.0.9-i686-linux.tar.xz"))))
|
||||
|
||||
(define (bootstrap-guile-hash system)
|
||||
"/20131110/guile-2.0.9.tar.xz"))))
|
||||
@@ -394,9 +398,9 @@
|
||||
"Return the SHA256 hash of the Guile bootstrap tarball for SYSTEM."
|
||||
(match system
|
||||
("x86_64-linux"
|
||||
- (base32 "1w2p5zyrglzzniqgvyn1b55vprfzhgk8vzbzkkbdgl5248si0yq3"))
|
||||
+ (base32 "@GUILE_SEED_HASH@"))
|
||||
+ (base32 "@GUILE_X86_64_SEED_HASH@"))
|
||||
("i686-linux"
|
||||
- (base32 "0im800m30abgh7msh331pcbjvb4n02smz5cfzf1srv0kpx3csmxp"))
|
||||
+ (base32 "@GUILE_SEED_HASH@"))
|
||||
+ (base32 "@GUILE_I686_SEED_HASH@"))
|
||||
("mips64el-linux"
|
||||
(base32 "0fzp93lvi0hn54acc0fpvhc7bvl0yc853k62l958cihk03q80ilr"))
|
||||
("armhf-linux"
|
||||
@@ -625,16 +622,16 @@
|
||||
@@ -625,16 +626,16 @@
|
||||
("riscv64-linux"
|
||||
"/20210725/static-binaries.tar.xz")
|
||||
(_
|
||||
|
|
@ -75,7 +79,7 @@
|
|||
("armhf-linux"
|
||||
(base32
|
||||
"0gf0fn2kbpxkjixkmx5f4z6hv6qpmgixl69zgg74dbsfdfj8jdv5"))
|
||||
@@ -989,11 +1022,15 @@
|
||||
@@ -989,11 +1026,15 @@
|
||||
;; own packages.
|
||||
(match (%current-system)
|
||||
((or "i686-linux" "x86_64-linux")
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ set -e
|
|||
|
||||
dist="${DISTFILES:-/external/distfiles}"
|
||||
env_out="/tmp/guix-bootstrap-seeds.env"
|
||||
work="/tmp/guix-bootstrap-seed-variants"
|
||||
|
||||
required_files="
|
||||
${dist}/static-binaries-0-i686-linux.tar.xz
|
||||
|
|
@ -17,6 +18,30 @@ ${dist}/bootstrap-exec-tar-i686-linux
|
|||
${dist}/bootstrap-exec-xz-i686-linux
|
||||
"
|
||||
|
||||
reset_tree_timestamps() {
|
||||
find "$1" -print0 | xargs -0 touch -h -t 197001010000.00
|
||||
}
|
||||
|
||||
make_repro_tar_xz() {
|
||||
src_dir="$1"
|
||||
out_file="$2"
|
||||
tmp_tar="$(mktemp /tmp/guix-seed-tarball.XXXXXX.tar)"
|
||||
|
||||
mkdir -p "$(dirname "${out_file}")"
|
||||
|
||||
reset_tree_timestamps "${src_dir}"
|
||||
(
|
||||
cd "${src_dir}"
|
||||
tar --sort=name --hard-dereference \
|
||||
--numeric-owner --owner=0 --group=0 --mode=go=rX,u+rw \
|
||||
-cf "${tmp_tar}" .
|
||||
)
|
||||
touch -t 197001010000.00 "${tmp_tar}"
|
||||
xz -T1 -c "${tmp_tar}" > "${out_file}"
|
||||
touch -t 197001010000.00 "${out_file}"
|
||||
rm -f "${tmp_tar}"
|
||||
}
|
||||
|
||||
for f in ${required_files}; do
|
||||
if [ ! -e "${f}" ]; then
|
||||
echo "Missing required seed artifact: ${f}" >&2
|
||||
|
|
@ -30,15 +55,29 @@ if [ ! -x /usr/bin/guix-hash-compat ]; then
|
|||
fi
|
||||
|
||||
# Prepare file layout expected by bootstrap.scm for i686/x86_64.
|
||||
rm -rf "${work}"
|
||||
mkdir -p "${dist}/i686-linux" "${dist}/x86_64-linux"
|
||||
cp -f "${dist}/static-binaries-0-i686-linux.tar.xz" \
|
||||
"${dist}/i686-linux/static-binaries-0-i686-linux.tar.xz"
|
||||
cp -f "${dist}/static-binaries-0-i686-linux.tar.xz" \
|
||||
"${dist}/x86_64-linux/static-binaries-0-i686-linux.tar.xz"
|
||||
cp -f "${dist}/guile-static-stripped-2.0.9-i686-linux.tar.xz" \
|
||||
# Guix interns both x86_64 and i686 bootstrap Guile seeds during its self-build.
|
||||
# Keep the payload effectively identical but make the archives distinct so they
|
||||
# do not collapse to the same store item and GC root name.
|
||||
rm -rf "${work}/i686-linux"
|
||||
mkdir -p "${work}/i686-linux"
|
||||
xz -dc "${dist}/guile-static-stripped-2.0.9-i686-linux.tar.xz" | tar -xf - -C "${work}/i686-linux"
|
||||
printf '%s\n' "i686-linux" > "${work}/i686-linux/i686.txt.planceholder"
|
||||
make_repro_tar_xz \
|
||||
"${work}/i686-linux" \
|
||||
"${dist}/i686-linux/guile-static-stripped-2.0.9-i686-linux.tar.xz"
|
||||
cp -f "${dist}/guile-static-stripped-2.0.9-i686-linux.tar.xz" \
|
||||
"${dist}/x86_64-linux/guile-static-stripped-2.0.9-i686-linux.tar.xz"
|
||||
rm -rf "${work}/x86_64-linux"
|
||||
mkdir -p "${work}/x86_64-linux"
|
||||
xz -dc "${dist}/guile-static-stripped-2.0.9-i686-linux.tar.xz" | tar -xf - -C "${work}/x86_64-linux"
|
||||
printf '%s\n' "x86_64-linux" > "${work}/x86_64-linux/x86_64.txt.planceholder"
|
||||
make_repro_tar_xz \
|
||||
"${work}/x86_64-linux" \
|
||||
"${dist}/x86_64-linux/guile-static-stripped-2.0.9-x86_64-linux.tar.xz"
|
||||
cp -f "${dist}/bootstrap-exec-bash-i686-linux" \
|
||||
"${dist}/i686-linux/bootstrap-exec-bash-i686-linux"
|
||||
cp -f "${dist}/bootstrap-exec-mkdir-i686-linux" \
|
||||
|
|
@ -49,7 +88,8 @@ cp -f "${dist}/bootstrap-exec-xz-i686-linux" \
|
|||
"${dist}/i686-linux/bootstrap-exec-xz-i686-linux"
|
||||
|
||||
static_binaries_hash="$(/usr/bin/guix-hash-compat "${dist}/static-binaries-0-i686-linux.tar.xz")"
|
||||
guile_seed_hash="$(/usr/bin/guix-hash-compat "${dist}/guile-static-stripped-2.0.9-i686-linux.tar.xz")"
|
||||
guile_seed_i686_hash="$(/usr/bin/guix-hash-compat "${dist}/i686-linux/guile-static-stripped-2.0.9-i686-linux.tar.xz")"
|
||||
guile_seed_x86_64_hash="$(/usr/bin/guix-hash-compat "${dist}/x86_64-linux/guile-static-stripped-2.0.9-x86_64-linux.tar.xz")"
|
||||
mes_minimal_hash="$(/usr/bin/guix-hash-compat "${dist}/mes-minimal-stripped-0.19-i686-linux.tar.xz")"
|
||||
mescc_tools_hash="$(/usr/bin/guix-hash-compat "${dist}/mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz")"
|
||||
exec_bash_hash="$(/usr/bin/guix-hash-compat -r "${dist}/bootstrap-exec-bash-i686-linux")"
|
||||
|
|
@ -61,8 +101,10 @@ cat > "${env_out}" <<ENVEOF
|
|||
DISTFILES=${dist}
|
||||
STATIC_BINARIES_SEED_FILE=static-binaries-0-i686-linux.tar.xz
|
||||
STATIC_BINARIES_SEED_HASH=${static_binaries_hash}
|
||||
GUILE_SEED_FILE=guile-static-stripped-2.0.9-i686-linux.tar.xz
|
||||
GUILE_SEED_HASH=${guile_seed_hash}
|
||||
GUILE_I686_SEED_FILE=i686-linux/guile-static-stripped-2.0.9-i686-linux.tar.xz
|
||||
GUILE_I686_SEED_HASH=${guile_seed_i686_hash}
|
||||
GUILE_X86_64_SEED_FILE=x86_64-linux/guile-static-stripped-2.0.9-x86_64-linux.tar.xz
|
||||
GUILE_X86_64_SEED_HASH=${guile_seed_x86_64_hash}
|
||||
MES_MINIMAL_SEED_FILE=mes-minimal-stripped-0.19-i686-linux.tar.xz
|
||||
MES_MINIMAL_SEED_HASH=${mes_minimal_hash}
|
||||
MESCC_TOOLS_SEED_FILE=mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz
|
||||
|
|
|
|||
|
|
@ -95,7 +95,8 @@ prepare_local_channel_checkout() {
|
|||
-e "s|@EXEC_TAR_HASH@|${EXEC_TAR_HASH}|g" \
|
||||
-e "s|@EXEC_XZ_HASH@|${EXEC_XZ_HASH}|g" \
|
||||
-e "s|@STATIC_BINARIES_SEED_HASH@|${STATIC_BINARIES_SEED_HASH}|g" \
|
||||
-e "s|@GUILE_SEED_HASH@|${GUILE_SEED_HASH}|g" \
|
||||
-e "s|@GUILE_I686_SEED_HASH@|${GUILE_I686_SEED_HASH}|g" \
|
||||
-e "s|@GUILE_X86_64_SEED_HASH@|${GUILE_X86_64_SEED_HASH}|g" \
|
||||
-e "s|@MES_MINIMAL_SEED_HASH@|${MES_MINIMAL_SEED_HASH}|g" \
|
||||
-e "s|@MESCC_TOOLS_SEED_HASH@|${MESCC_TOOLS_SEED_HASH}|g" \
|
||||
"${guix_patch_dir}/bootstrap-local-seeds.patch.in" > "${rendered_patch}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue