diff --git a/steps-guix/improve/bootstrap-exec-xz-i686-linux.sh b/steps-guix/improve/bootstrap-exec-xz-i686-linux.sh new file mode 100644 index 00000000..d00ab456 --- /dev/null +++ b/steps-guix/improve/bootstrap-exec-xz-i686-linux.sh @@ -0,0 +1,15 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-3.0-or-later + +set -e + +dist="${DISTFILES:-/external/distfiles}" +xz_src="/bootstrap-seeds/xz-5.0.6/bin/xz" +xz_dst="${dist}/bootstrap-exec-xz-i686-linux" + +if [ ! -x "${xz_src}" ]; then + echo "Missing required bootstrap seed executable: ${xz_src}" >&2 + exit 1 +fi + +install -D -m 0755 "${xz_src}" "${xz_dst}" diff --git a/steps-guix/manifest b/steps-guix/manifest index 1525d258..262a92ee 100644 --- a/steps-guix/manifest +++ b/steps-guix/manifest @@ -59,6 +59,9 @@ build: bzip2-1.0.6 build: patch-2.7.6 build: bash-5.3-1 build: static-binaries-0-i686-linux +# Build legacy xz seed, then export bootstrap-exec-xz-i686-linux +build: xz-5.0.6 +improve: bootstrap-exec-xz-i686-linux # Build guile-static-stripped-2.0.9-i686-linux.tar.xz build: libunistring-1.4.1-guix build: gc-8.2.12-guix diff --git a/steps-guix/static-binaries-0-i686-linux/pass1.sh b/steps-guix/static-binaries-0-i686-linux/pass1.sh index 996d1e26..6bd467c8 100644 --- a/steps-guix/static-binaries-0-i686-linux/pass1.sh +++ b/steps-guix/static-binaries-0-i686-linux/pass1.sh @@ -36,7 +36,6 @@ src_compile() { seed_install_exec "${stage}/bin/bash" "${dist}/bootstrap-exec-bash-i686-linux" seed_install_exec "${stage}/bin/mkdir" "${dist}/bootstrap-exec-mkdir-i686-linux" seed_install_exec "${stage}/bin/tar" "${dist}/bootstrap-exec-tar-i686-linux" - seed_install_exec "${stage}/bin/xz" "${dist}/bootstrap-exec-xz-i686-linux" } src_install() { diff --git a/steps-guix/xz-5.0.6/pass1.sh b/steps-guix/xz-5.0.6/pass1.sh new file mode 100644 index 00000000..7431b66f --- /dev/null +++ b/steps-guix/xz-5.0.6/pass1.sh @@ -0,0 +1,28 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +SEED_PREFIX="/bootstrap-seeds/xz-5.0.6" + +src_prepare() { + default + + # Mirror Guix bootstrap static strategy: force libtool-built xz executable + # to link with -all-static. + sed -i 's/^xz_LDADD =/xz_LDADD = -all-static /' src/xz/Makefile.in +} + +src_configure() { + CFLAGS="${CFLAGS:-} -std=gnu89" \ + ./configure \ + --prefix="${SEED_PREFIX}" \ + --disable-shared \ + --enable-static \ + --disable-nls +} + +src_compile() { + default_src_compile +} + +src_install() { + make DESTDIR="${DESTDIR}" install +} diff --git a/steps-guix/xz-5.0.6/sources b/steps-guix/xz-5.0.6/sources new file mode 100644 index 00000000..afb13a16 --- /dev/null +++ b/steps-guix/xz-5.0.6/sources @@ -0,0 +1 @@ +f https://tukaani.org/xz/xz-5.0.6.tar.gz b6cf4cdc1313556a00848e722625bce40d2cd552c052b0465791c64c9202c3f1