diff options
Diffstat (limited to 'contrib/guix')
-rw-r--r-- | contrib/guix/README.md | 1 | ||||
-rwxr-xr-x | contrib/guix/guix-build.sh | 1 | ||||
-rw-r--r-- | contrib/guix/libexec/build.sh | 37 | ||||
-rw-r--r-- | contrib/guix/manifest.scm | 3 |
4 files changed, 20 insertions, 22 deletions
diff --git a/contrib/guix/README.md b/contrib/guix/README.md index 9f99b36f88..8ce8cb97a0 100644 --- a/contrib/guix/README.md +++ b/contrib/guix/README.md @@ -13,7 +13,6 @@ We achieve bootstrappability by using Guix as a functional package manager. Conservatively, a x86_64 machine with: -- 2 or more logical cores - 4GB of free disk space on the partition that /gnu/store will reside in - 24GB of free disk space on the partition that the Bitcoin Core git repository resides in diff --git a/contrib/guix/guix-build.sh b/contrib/guix/guix-build.sh index e20b2a048d..11d2c8b867 100755 --- a/contrib/guix/guix-build.sh +++ b/contrib/guix/guix-build.sh @@ -105,6 +105,7 @@ for host in ${HOSTS=x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu riscv --pure \ --no-cwd \ --share="$PWD"=/bitcoin \ + --expose="$(git rev-parse --git-common-dir)" \ ${SOURCES_PATH:+--share="$SOURCES_PATH"} \ ${ADDITIONAL_GUIX_ENVIRONMENT_FLAGS} \ -- env HOST="$host" \ diff --git a/contrib/guix/libexec/build.sh b/contrib/guix/libexec/build.sh index 550b1b8f40..01f4518c73 100644 --- a/contrib/guix/libexec/build.sh +++ b/contrib/guix/libexec/build.sh @@ -141,19 +141,17 @@ make -C depends --jobs="$MAX_JOBS" HOST="$HOST" \ # Source Tarball Building # ########################### -# Create the source tarball and move it to "${OUTDIR}/src" if not already there -if [ -z "$(find "${OUTDIR}/src" -name 'bitcoin-*.tar.gz')" ]; then - ./autogen.sh - env CONFIG_SITE="${BASEPREFIX}/${HOST}/share/config.site" ./configure --prefix=/ - make dist GZIP_ENV='-9n' ${V:+V=1} - mkdir -p "${OUTDIR}/src" - mv "$(find "${PWD}" -name 'bitcoin-*.tar.gz')" "${OUTDIR}/src/" -fi +# Define DISTNAME variable. +# shellcheck source=contrib/gitian-descriptors/assign_DISTNAME +source contrib/gitian-descriptors/assign_DISTNAME -# Determine the full path to our source tarball -SOURCEDIST="$(find "${OUTDIR}/src" -name 'bitcoin-*.tar.gz')" -# Determine our distribution name (e.g. bitcoin-0.18.0) -DISTNAME="$(basename "$SOURCEDIST" '.tar.gz')" +GIT_ARCHIVE="${OUTDIR}/src/${DISTNAME}.tar.gz" + +# Create the source tarball if not already there +if [ ! -e "$GIT_ARCHIVE" ]; then + mkdir -p "$(dirname "$GIT_ARCHIVE")" + git archive --output="$GIT_ARCHIVE" HEAD +fi ########################### # Binary Tarball Building # @@ -187,7 +185,9 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" cd "$DISTSRC" # Extract the source tarball - tar --strip-components=1 -xf "${SOURCEDIST}" + tar -xf "${GIT_ARCHIVE}" + + ./autogen.sh # Configure this DISTSRC for $HOST # shellcheck disable=SC2086 @@ -220,7 +220,7 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" # Make the os-specific installers case "$HOST" in *mingw*) - make deploy ${V:+V=1} + make deploy ${V:+V=1} BITCOIN_WIN_INSTALLER="${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" ;; esac @@ -232,11 +232,6 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" # Install built Bitcoin Core to $INSTALLPATH make install DESTDIR="${INSTALLPATH}" ${V:+V=1} - case "$HOST" in - *mingw*) - cp -f --target-directory="$OUTDIR" ./*-setup-unsigned.exe - ;; - esac ( cd installed @@ -264,7 +259,7 @@ export PATH="${BASEPREFIX}/${HOST}/native/bin:${PATH}" cp "${DISTSRC}/doc/README_windows.txt" "${DISTNAME}/readme.txt" ;; *linux*) - cp "${DISTSRC}/doc/README.md" "${DISTNAME}/" + cp "${DISTSRC}/README.md" "${DISTNAME}/" ;; esac @@ -307,7 +302,7 @@ case "$HOST" in ( cd ./windeploy mkdir unsigned - cp --target-directory=unsigned/ "$OUTDIR"/bitcoin-*-setup-unsigned.exe + cp --target-directory=unsigned/ "${OUTDIR}/${DISTNAME}-win64-setup-unsigned.exe" find . -print0 \ | sort --zero-terminated \ | tar --create --no-recursion --mode='u+rw,go+r-w,a+X' --null --files-from=- \ diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 86c1a8d27f..5e011ea184 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -17,6 +17,7 @@ (gnu packages pkg-config) (gnu packages python) (gnu packages shells) + (gnu packages version-control) (guix build-system gnu) (guix build-system trivial) (guix gexp) @@ -181,6 +182,8 @@ chain for " target " development.")) ;; Scripting perl python-3.7 + ;; Git + git ;; Native gcc 9 toolchain targeting glibc 2.27 (make-gcc-toolchain gcc-9 glibc-2.27)) (let ((target (getenv "HOST"))) |