mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-23 11:36:32 +01:00
fix(guix-1.5.0): split unstable mes hunks into dedicated patch and remove heuristic fallback logic
This commit is contained in:
parent
4abc97da82
commit
5cea0ba08a
3 changed files with 78 additions and 54 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
src_prepare() {
|
||||
local bootstrap_scm patch_template rendered_patch
|
||||
local mes_patch_template rendered_mes_patch
|
||||
|
||||
default
|
||||
|
||||
|
|
@ -18,11 +19,17 @@ src_prepare() {
|
|||
bootstrap_scm="gnu/packages/bootstrap.scm"
|
||||
patch_template="${base_dir}/patches/bootstrap-local-seeds.patch.in"
|
||||
rendered_patch="/tmp/guix-bootstrap-local-seeds.patch"
|
||||
mes_patch_template="${base_dir}/patches/bootstrap-local-mes-extra.patch.in"
|
||||
rendered_mes_patch="/tmp/guix-bootstrap-local-mes-extra.patch"
|
||||
|
||||
if [ ! -f "${patch_template}" ]; then
|
||||
echo "Missing patch template: ${patch_template}" >&2
|
||||
false
|
||||
fi
|
||||
if [ ! -f "${mes_patch_template}" ]; then
|
||||
echo "Missing patch template: ${mes_patch_template}" >&2
|
||||
false
|
||||
fi
|
||||
|
||||
sed \
|
||||
-e "s|@EXEC_BASH_HASH@|${EXEC_BASH_HASH}|g" \
|
||||
|
|
@ -34,14 +41,23 @@ src_prepare() {
|
|||
-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}"
|
||||
sed \
|
||||
-e "s|@MES_MINIMAL_SEED_HASH@|${MES_MINIMAL_SEED_HASH}|g" \
|
||||
-e "s|@MESCC_TOOLS_SEED_HASH@|${MESCC_TOOLS_SEED_HASH}|g" \
|
||||
"${mes_patch_template}" > "${rendered_mes_patch}"
|
||||
|
||||
if grep -Eq '@[A-Z0-9_]+@' "${rendered_patch}"; then
|
||||
echo "Unexpanded placeholder found in ${rendered_patch}" >&2
|
||||
false
|
||||
fi
|
||||
|
||||
if grep -Eq '@[A-Z0-9_]+@' "${rendered_mes_patch}"; then
|
||||
echo "Unexpanded placeholder found in ${rendered_mes_patch}" >&2
|
||||
false
|
||||
fi
|
||||
patch --dry-run -p1 < "${rendered_patch}"
|
||||
patch -p1 < "${rendered_patch}"
|
||||
patch --dry-run -p1 < "${rendered_mes_patch}"
|
||||
patch -p1 < "${rendered_mes_patch}"
|
||||
|
||||
grep -q 'file:///external/distfiles/' "${bootstrap_scm}"
|
||||
grep -q "${EXEC_BASH_HASH}" "${bootstrap_scm}"
|
||||
|
|
@ -51,8 +67,12 @@ src_prepare() {
|
|||
grep -q "${MESCC_TOOLS_SEED_HASH}" "${bootstrap_scm}"
|
||||
grep -q "All bootstrap binaries must come from local, reproducible distfiles." "${bootstrap_scm}"
|
||||
grep -q "%bootstrap-linux-headers-base-urls" "${bootstrap_scm}"
|
||||
grep -q '^(define (bootstrap-mes-minimal-origin system)' "${bootstrap_scm}"
|
||||
grep -q '^(define %bootstrap-mescc-tools' "${bootstrap_scm}"
|
||||
grep -q "mes-minimal-stripped-0.19-i686-linux.tar.xz" "${bootstrap_scm}"
|
||||
grep -q "mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz" "${bootstrap_scm}"
|
||||
grep -q '("mes-minimal" ,%bootstrap-mes-minimal)' "${bootstrap_scm}"
|
||||
grep -q '("mescc-tools" ,%bootstrap-mescc-tools)' "${bootstrap_scm}"
|
||||
grep -q "Offline bootstrap environment: require explicit channels." guix/channels.scm
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,57 @@
|
|||
--- a/gnu/packages/bootstrap.scm
|
||||
+++ b/gnu/packages/bootstrap.scm
|
||||
@@ -676,7 +676,45 @@
|
||||
(substitute* '("bin/egrep" "bin/fgrep")
|
||||
(("^exec grep") (string-append (getcwd) "/bin/grep"))))
|
||||
(chmod "bin" #o555))))
|
||||
+
|
||||
+
|
||||
+(define (bootstrap-mes-minimal-origin system)
|
||||
+ (origin
|
||||
+ (method url-fetch)
|
||||
+ (uri (map (cut string-append <>
|
||||
+ "/mes-minimal-stripped-0.19-i686-linux.tar.xz")
|
||||
+ %bootstrap-base-urls))
|
||||
+ (sha256
|
||||
+ (match system
|
||||
+ ((or "i686-linux" "x86_64-linux")
|
||||
+ (base32 "@MES_MINIMAL_SEED_HASH@"))
|
||||
+ (_
|
||||
+ (base32 "@MES_MINIMAL_SEED_HASH@"))))))
|
||||
+
|
||||
+(define %bootstrap-mes-minimal
|
||||
+ (package-from-tarball "mes-minimal-bootstrap"
|
||||
+ bootstrap-mes-minimal-origin
|
||||
+ "mes"
|
||||
+ "Bootstrap Mes minimal binary seed"))
|
||||
+
|
||||
+(define (bootstrap-mescc-tools-origin system)
|
||||
+ (origin
|
||||
+ (method url-fetch)
|
||||
+ (uri (map (cut string-append <>
|
||||
+ "/mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz")
|
||||
+ %bootstrap-base-urls))
|
||||
+ (sha256
|
||||
+ (match system
|
||||
+ ((or "i686-linux" "x86_64-linux")
|
||||
+ (base32 "@MESCC_TOOLS_SEED_HASH@"))
|
||||
+ (_
|
||||
+ (base32 "@MESCC_TOOLS_SEED_HASH@"))))))
|
||||
|
||||
+(define %bootstrap-mescc-tools
|
||||
+ (package-from-tarball "mescc-tools-bootstrap"
|
||||
+ bootstrap-mescc-tools-origin
|
||||
+ "M2-Planet"
|
||||
+ "Bootstrap MesCC tools binary seed"))
|
||||
(define-public %bootstrap-linux-libre-headers
|
||||
(package-from-tarball
|
||||
"linux-libre-headers-bootstrap"
|
||||
@@ -1012,6 +1050,8 @@
|
||||
("gcc" ,%bootstrap-gcc)
|
||||
("binutils" ,%bootstrap-binutils)
|
||||
("coreutils&co" ,%bootstrap-coreutils&co)
|
||||
+ ("mes-minimal" ,%bootstrap-mes-minimal)
|
||||
+ ("mescc-tools" ,%bootstrap-mescc-tools)
|
||||
("bash" ,%bootstrap-coreutils&co)))
|
||||
|
||||
;;; bootstrap.scm ends here
|
||||
|
|
@ -97,51 +97,6 @@
|
|||
("armhf-linux"
|
||||
(base32
|
||||
"0gf0fn2kbpxkjixkmx5f4z6hv6qpmgixl69zgg74dbsfdfj8jdv5"))
|
||||
@@ -675,6 +672,44 @@
|
||||
(if (not (elf-file? "bin/egrep"))
|
||||
(substitute* '("bin/egrep" "bin/fgrep")
|
||||
(("^exec grep") (string-append (getcwd) "/bin/grep"))))
|
||||
(chmod "bin" #o555))))
|
||||
+
|
||||
+(define (bootstrap-mes-minimal-origin system)
|
||||
+ (origin
|
||||
+ (method url-fetch)
|
||||
+ (uri (map (cut string-append <>
|
||||
+ "/mes-minimal-stripped-0.19-i686-linux.tar.xz")
|
||||
+ %bootstrap-base-urls))
|
||||
+ (sha256
|
||||
+ (match system
|
||||
+ ((or "i686-linux" "x86_64-linux")
|
||||
+ (base32 "@MES_MINIMAL_SEED_HASH@"))
|
||||
+ (_
|
||||
+ (base32 "@MES_MINIMAL_SEED_HASH@"))))))
|
||||
+
|
||||
+(define %bootstrap-mes-minimal
|
||||
+ (package-from-tarball "mes-minimal-bootstrap"
|
||||
+ bootstrap-mes-minimal-origin
|
||||
+ "mes"
|
||||
+ "Bootstrap Mes minimal binary seed"))
|
||||
+
|
||||
+(define (bootstrap-mescc-tools-origin system)
|
||||
+ (origin
|
||||
+ (method url-fetch)
|
||||
+ (uri (map (cut string-append <>
|
||||
+ "/mescc-tools-static-stripped-0.5.2-i686-linux.tar.xz")
|
||||
+ %bootstrap-base-urls))
|
||||
+ (sha256
|
||||
+ (match system
|
||||
+ ((or "i686-linux" "x86_64-linux")
|
||||
+ (base32 "@MESCC_TOOLS_SEED_HASH@"))
|
||||
+ (_
|
||||
+ (base32 "@MESCC_TOOLS_SEED_HASH@"))))))
|
||||
+
|
||||
+(define %bootstrap-mescc-tools
|
||||
+ (package-from-tarball "mescc-tools-bootstrap"
|
||||
+ bootstrap-mescc-tools-origin
|
||||
+ "M2-Planet"
|
||||
+ "Bootstrap MesCC tools binary seed"))
|
||||
(define-public %bootstrap-linux-libre-headers
|
||||
(package-from-tarball
|
||||
@@ -989,11 +1022,15 @@
|
||||
;; own packages.
|
||||
(match (%current-system)
|
||||
|
|
@ -159,14 +114,6 @@
|
|||
+ ("mescc-tools" ,%bootstrap-mescc-tools)
|
||||
;; In gnu-build-system.scm, we rely on the availability of Bash.
|
||||
("bash" ,%bootstrap-coreutils&co)))))
|
||||
@@ -1005,5 +1042,7 @@
|
||||
`(("libc" ,%bootstrap-glibc)
|
||||
("gcc" ,%bootstrap-gcc)
|
||||
("binutils" ,%bootstrap-binutils)
|
||||
("coreutils&co" ,%bootstrap-coreutils&co)
|
||||
+ ("mes-minimal" ,%bootstrap-mes-minimal)
|
||||
+ ("mescc-tools" ,%bootstrap-mescc-tools)
|
||||
("bash" ,%bootstrap-coreutils&co)))
|
||||
--- a/guix/channels.scm
|
||||
+++ b/guix/channels.scm
|
||||
@@ -194,8 +194,8 @@
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue