Skip to content

Commit a3ea41b

Browse files
committed
Merge branch 'guix_reltar_autogen_distclean' into svg_icon-28+knots
2 parents 1248d0d + 345f0b2 commit a3ea41b

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

contrib/guix/libexec/build.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ GIT_ARCHIVE="${DIST_ARCHIVE_BASE}/${DISTNAME}.tar.gz"
196196
# Create the source tarball if not already there
197197
if [ ! -e "$GIT_ARCHIVE" ]; then
198198
mkdir -p "$(dirname "$GIT_ARCHIVE")"
199-
git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD
199+
CONFIG_SITE="${BASEPREFIX}/${HOST}/share/config.site" \
200+
REFERENCE_DATETIME="@${SOURCE_DATE_EPOCH}" \
201+
contrib/guix/libexec/make_release_tarball.sh "${GIT_ARCHIVE}" "${DISTNAME}"
200202
fi
201203

202204
mkdir -p "$OUTDIR"
@@ -239,8 +241,6 @@ mkdir -p "$DISTSRC"
239241
# Extract the source tarball
240242
tar --strip-components=1 -xf "${GIT_ARCHIVE}"
241243

242-
./autogen.sh
243-
244244
# Configure this DISTSRC for $HOST
245245
# shellcheck disable=SC2086
246246
env CONFIG_SITE="${BASEPREFIX}/${HOST}/share/config.site" \
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
# Copyright (c) 2020 The Bitcoin Core developers
3+
# Distributed under the MIT software license, see the accompanying
4+
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
5+
#
6+
# A helper script to generate source release tarball
7+
8+
export LC_ALL=C
9+
set -ex
10+
11+
[ "$#" -ge 2 ]
12+
[ -n "${REFERENCE_DATETIME}" ]
13+
14+
GIT_ARCHIVE="$1"
15+
DISTNAME="$2"
16+
17+
git archive --prefix="${DISTNAME}/" HEAD | tar -xp
18+
cd "${DISTNAME}"
19+
20+
./autogen.sh
21+
./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking
22+
make distclean
23+
24+
cd ..
25+
tar \
26+
--format=ustar \
27+
--exclude autom4te.cache \
28+
--exclude .deps \
29+
--exclude .git \
30+
--sort=name \
31+
--mode='u+rw,go+r-w,a+X' --owner=0 --group=0 \
32+
--mtime="${REFERENCE_DATETIME}" \
33+
-c "${DISTNAME}" | \
34+
gzip -9n \
35+
>"${GIT_ARCHIVE}"
36+
37+
rm -rf "${DISTNAME}"

0 commit comments

Comments
 (0)