mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
Merge #18741: guix: Make source tarball using git-archive
bfe1ba2f5b36056e0c41edf8206b93d3d83098df rel-builds: Specify core.abbrev for git-rev-parse (Carl Dong) 27e63e01cce368d67092de8f0c736927d6f6aa69 build: Accomodate makensis v2.x (Carl Dong) 1f2c39a30e0f82046c7aecddfda3eb99cb536816 guix: Remove logical cores requirement (Carl Dong) a4f6ffa71e335d4b2a6bf525b7f416968f9cd9f7 lint: Also enable source statements for non-gitian (Carl Dong) d256f91cb1b0d6ff5170106b99b0266cbe51f5a2 rel-builds: Directly deploy win installer to OUTDIR (Carl Dong) fa791da02f9684e3fd554b687fb692ae6a23d65a nsis: Specify OutFile path only once (Carl Dong) 14701604d0904bc5bbf1c67de08f8ee6d3215523 guix: Expose GIT_COMMON_DIR in container as readonly (Carl Dong) f5a6ac4f48b18f93050d77bcb23f9cf45ec34647 guix: Make source tarball using git-archive (Carl Dong) 395c1137f630dc495ffb2752a23bc1dfd470ee53 gitian: Limit sourced script to just assignments (Carl Dong) Pull request description: Based on: #18556 Related: https://github.com/bitcoin/bitcoin/pull/17595#discussion_r399728721 ACKs for top commit: fanquake: ACK bfe1ba2f5b36056e0c41edf8206b93d3d83098df - I agree with Carl, and am going to merge this. I'd like for Linux Guix builds to be working again, and we can rebase #18818. Tree-SHA512: c87ada7e3de17ca0b692a91029b86573442ded5780fc081c214773f6b374a0cdbeaf6f6898c36669c2e247ee32aa7f82defb1180f8decac52c65f0c140f18674
This commit is contained in:
parent
87de9c8f5c
commit
700d46b26d
@ -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
|
||||
|
@ -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" \
|
||||
|
@ -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
|
||||
@ -221,7 +221,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
|
||||
|
||||
@ -233,11 +233,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
|
||||
|
||||
@ -265,7 +260,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
|
||||
|
||||
@ -308,7 +303,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=- \
|
||||
|
@ -18,6 +18,7 @@
|
||||
(gnu packages python)
|
||||
(gnu packages shells)
|
||||
(gnu packages bison)
|
||||
(gnu packages version-control)
|
||||
(guix build-system gnu)
|
||||
(guix build-system trivial)
|
||||
(guix gexp)
|
||||
@ -183,6 +184,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")))
|
||||
|
Loading…
Reference in New Issue
Block a user