docs: dashification of guix

This commit is contained in:
Konstantin Akimov 2023-03-31 17:01:55 +07:00 committed by PastaPastaPasta
parent 31da303569
commit 559190fb27
10 changed files with 33 additions and 33 deletions

View File

@ -3,7 +3,7 @@ export LC_ALL=C
set -e -o pipefail
# Source the common prelude, which:
# 1. Checks if we're at the top directory of the Bitcoin Core repository
# 1. Checks if we're at the top directory of the Dash Core repository
# 2. Defines a few common functions and variables
#
# shellcheck source=libexec/prelude.bash

View File

@ -3,7 +3,7 @@ export LC_ALL=C
set -e -o pipefail
# Source the common prelude, which:
# 1. Checks if we're at the top directory of the Bitcoin Core repository
# 1. Checks if we're at the top directory of the Dash Core repository
# 2. Defines a few common functions and variables
#
# shellcheck source=libexec/prelude.bash
@ -156,7 +156,7 @@ done
if (( total_required_KiB > avail_KiB )); then
total_required_GiB=$((total_required_KiB / 1048576))
avail_GiB=$((avail_KiB / 1048576))
echo "Performing a Bitcoin Core Guix build for the selected HOSTS requires ${total_required_GiB} GiB, however, only ${avail_GiB} GiB is available. Please free up some disk space before performing the build."
echo "Performing a Dash Core Guix build for the selected HOSTS requires ${total_required_GiB} GiB, however, only ${avail_GiB} GiB is available. Please free up some disk space before performing the build."
exit 1
fi
@ -351,7 +351,7 @@ output directory.
EOF
}
# Deterministically build Bitcoin Core
# Deterministically build Dash Core
# shellcheck disable=SC2153
for host in $HOSTS; do
@ -369,7 +369,7 @@ INFO: Building ${VERSION:?not set} for platform triple ${HOST:?not set}:
...using reference timestamp: ${SOURCE_DATE_EPOCH:?not set}
...running at most ${JOBS:?not set} jobs
...from worktree directory: '${PWD}'
...bind-mounted in container to: '/bitcoin'
...bind-mounted in container to: '/dash'
...in build directory: '$(distsrc_for_host "$HOST")'
...bind-mounted in container to: '$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")'
...outputting in: '$(outdir_for_host "$HOST")'
@ -395,24 +395,24 @@ EOF
#
# When --container is specified, the default behavior is to share
# the current working directory with the isolated container at the
# same exact path (e.g. mapping '/home/satoshi/bitcoin/' to
# '/home/satoshi/bitcoin/'). This means that the $PWD inside the
# same exact path (e.g. mapping '/home/satoshi/dash/' to
# '/home/satoshi/dash/'). This means that the $PWD inside the
# container becomes a source of irreproducibility. --no-cwd disables
# this behaviour.
#
# --share=SPEC for containers, share writable host file system
# according to SPEC
#
# --share="$PWD"=/bitcoin
# --share="$PWD"=/dash
#
# maps our current working directory to /bitcoin
# maps our current working directory to /dash
# inside the isolated container, which we later cd
# into.
#
# While we don't want to map our current working directory to the
# same exact path (as this introduces irreproducibility), we do want
# it to be at a _fixed_ path _somewhere_ inside the isolated
# container so that we have something to build. '/bitcoin' was
# container so that we have something to build. '/dash' was
# chosen arbitrarily.
#
# ${SOURCES_PATH:+--share="$SOURCES_PATH"}
@ -427,7 +427,7 @@ EOF
#
# --keep-failed keep build tree of failed builds
#
# When builds of the Guix environment itself (not Bitcoin Core)
# When builds of the Guix environment itself (not Dash Core)
# fail, it is useful for the build tree to be kept for debugging
# purposes.
#
@ -446,7 +446,7 @@ EOF
--container \
--pure \
--no-cwd \
--share="$PWD"=/bitcoin \
--share="$PWD"=/dash \
--share="$DISTSRC_BASE"=/distsrc-base \
--share="$OUTDIR_BASE"=/outdir-base \
--expose="$(git rev-parse --git-common-dir)" \
@ -471,7 +471,7 @@ EOF
DISTSRC="$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")" \
OUTDIR="$(OUTDIR_BASE=/outdir-base && outdir_for_host "$HOST")" \
DIST_ARCHIVE_BASE=/outdir-base/dist-archive \
bash -c "cd /bitcoin && bash contrib/guix/libexec/build.sh"
bash -c "cd /dash && bash contrib/guix/libexec/build.sh"
)
done

View File

@ -3,7 +3,7 @@ export LC_ALL=C
set -e -o pipefail
# Source the common prelude, which:
# 1. Checks if we're at the top directory of the Bitcoin Core repository
# 1. Checks if we're at the top directory of the Dash Core repository
# 2. Defines a few common functions and variables
#
# shellcheck source=libexec/prelude.bash

View File

@ -3,7 +3,7 @@ export LC_ALL=C
set -e -o pipefail
# Source the common prelude, which:
# 1. Checks if we're at the top directory of the Bitcoin Core repository
# 1. Checks if we're at the top directory of the Dash Core repository
# 2. Defines a few common functions and variables
#
# shellcheck source=libexec/prelude.bash
@ -28,7 +28,7 @@ cmd_usage() {
cat <<EOF
Synopsis:
env DETACHED_SIGS_REPO=<path/to/bitcoin-detached-sigs> \\
env DETACHED_SIGS_REPO=<path/to/dash-detached-sigs> \\
./contrib/guix/guix-codesign
EOF
@ -270,7 +270,7 @@ output directory.
EOF
}
# Deterministically build Bitcoin Core
# Deterministically build Dash Core
# shellcheck disable=SC2153
for host in $HOSTS; do
@ -287,7 +287,7 @@ cat << EOF
INFO: Codesigning ${VERSION:?not set} for platform triple ${HOST:?not set}:
...using reference timestamp: ${SOURCE_DATE_EPOCH:?not set}
...from worktree directory: '${PWD}'
...bind-mounted in container to: '/bitcoin'
...bind-mounted in container to: '/dash'
...in build directory: '$(distsrc_for_host "$HOST")'
...bind-mounted in container to: '$(DISTSRC_BASE=/distsrc-base && distsrc_for_host "$HOST")'
...outputting in: '$(outdir_for_host "$HOST" codesigned)'
@ -316,24 +316,24 @@ EOF
#
# When --container is specified, the default behavior is to share
# the current working directory with the isolated container at the
# same exact path (e.g. mapping '/home/satoshi/bitcoin/' to
# '/home/satoshi/bitcoin/'). This means that the $PWD inside the
# same exact path (e.g. mapping '/home/satoshi/dash/' to
# '/home/satoshi/dash/'). This means that the $PWD inside the
# container becomes a source of irreproducibility. --no-cwd disables
# this behaviour.
#
# --share=SPEC for containers, share writable host file system
# according to SPEC
#
# --share="$PWD"=/bitcoin
# --share="$PWD"=/dash
#
# maps our current working directory to /bitcoin
# maps our current working directory to /dash
# inside the isolated container, which we later cd
# into.
#
# While we don't want to map our current working directory to the
# same exact path (as this introduces irreproducibility), we do want
# it to be at a _fixed_ path _somewhere_ inside the isolated
# container so that we have something to build. '/bitcoin' was
# container so that we have something to build. '/dash' was
# chosen arbitrarily.
#
# ${SOURCES_PATH:+--share="$SOURCES_PATH"}
@ -361,7 +361,7 @@ EOF
--container \
--pure \
--no-cwd \
--share="$PWD"=/bitcoin \
--share="$PWD"=/dash \
--share="$DISTSRC_BASE"=/distsrc-base \
--share="$OUTDIR_BASE"=/outdir-base \
--share="$DETACHED_SIGS_REPO"=/detached-sigs \
@ -386,7 +386,7 @@ EOF
DIST_ARCHIVE_BASE=/outdir-base/dist-archive \
DETACHED_SIGS_REPO=/detached-sigs \
UNSIGNED_TARBALL="$(OUTDIR_BASE=/outdir-base && unsigned_tarball_for_host "$HOST")" \
bash -c "cd /bitcoin && bash contrib/guix/libexec/codesign.sh"
bash -c "cd /dash && bash contrib/guix/libexec/codesign.sh"
)
done

View File

@ -3,7 +3,7 @@ export LC_ALL=C
set -e -o pipefail
# Source the common prelude, which:
# 1. Checks if we're at the top directory of the Bitcoin Core repository
# 1. Checks if we're at the top directory of the Dash Core repository
# 2. Defines a few common functions and variables
#
# shellcheck source=libexec/prelude.bash

View File

@ -300,7 +300,7 @@ mkdir -p "$DISTSRC"
sed -i.old 's/-lstdc++ //g' {./,src/dashbls/,src/secp256k1/}{config.status,libtool}
# Build Bitcoin Core
# Build Dash Core
make --jobs="$JOBS" ${V:+V=1}
# Perform basic ELF security checks on a series of executables.
@ -318,12 +318,12 @@ mkdir -p "$DISTSRC"
;;
esac
# Setup the directory where our Bitcoin Core build for HOST will be
# Setup the directory where our Dash Core build for HOST will be
# installed. This directory will also later serve as the input for our
# binary tarballs.
INSTALLPATH="${PWD}/installed/${DISTNAME}"
mkdir -p "${INSTALLPATH}"
# Install built Bitcoin Core to $INSTALLPATH
# Install built Dash Core to $INSTALLPATH
case "$HOST" in
*darwin*)
make install-strip DESTDIR="${INSTALLPATH}" ${V:+V=1}

View File

@ -79,7 +79,7 @@ mkdir -p "$DISTSRC"
;;
*darwin*)
# Apply detached codesignatures to dist/ (in-place)
signapple apply dist/Bitcoin-Qt.app codesignatures/osx/dist
signapple apply dist/Dash-Qt.app codesignatures/osx/dist
# Make an uncompressed DMG from dist/
xorrisofs -D -l -V "$(< osx_volname)" -no-pad -r -dir-mode 0755 \

View File

@ -50,7 +50,7 @@ fi
################
VERSION="${FORCE_VERSION:-$(git_head_version)}"
DISTNAME="${DISTNAME:-bitcoin-${VERSION}}"
DISTNAME="${DISTNAME:-dashcore-${VERSION}}"
version_base_prefix="${PWD}/guix-build-"
VERSION_BASE="${version_base_prefix}${VERSION}" # TOP

View File

@ -156,7 +156,7 @@ chain for " target " development."))
(base-libc (make-glibc-without-ssp glibc-2.24))
(base-gcc (make-gcc-rpath-link base-gcc)))
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
desirable for building Bitcoin Core release binaries."
desirable for building Dash Core release binaries."
(make-cross-toolchain target
base-gcc-for-libc
base-kernel-headers

View File

@ -1,7 +1,7 @@
guix: repro: Sort find output in libtool for gcc-8
Otherwise the resulting .a static libraries (e.g. libstdc++.a) will not
be reproducible and end up making the Bitcoin binaries non-reproducible
be reproducible and end up making the Dash binaries non-reproducible
as well.
See: https://reproducible-builds.org/docs/archives/#gnu-libtool