Skip to content

Commit 9dce91a

Browse files
committed
Merge branch 'guix_reltar_autogen_distclean' into fix_gitdir_again
2 parents a1e04e1 + 6909854 commit 9dce91a

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

contrib/guix/libexec/build.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ GIT_ARCHIVE="${DIST_ARCHIVE_BASE}/${DISTNAME}.tar.gz"
230230
# Create the source tarball if not already there
231231
if [ ! -e "$GIT_ARCHIVE" ]; then
232232
mkdir -p "$(dirname "$GIT_ARCHIVE")"
233-
git archive --prefix="${DISTNAME}/" --output="$GIT_ARCHIVE" HEAD
233+
CONFIG_SITE="${BASEPREFIX}/${HOST}/share/config.site" \
234+
contrib/guix/libexec/make_release_tarball.sh "${GIT_ARCHIVE}" "${DISTNAME}"
234235
fi
235236

236237
mkdir -p "$OUTDIR"
@@ -283,8 +284,6 @@ mkdir -p "$DISTSRC"
283284
# Extract the source tarball
284285
tar --strip-components=1 -xf "${GIT_ARCHIVE}"
285286

286-
./autogen.sh
287-
288287
# Configure this DISTSRC for $HOST
289288
# shellcheck disable=SC2086
290289
env CONFIG_SITE="${BASEPREFIX}/${HOST}/share/config.site" \
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
13+
GIT_ARCHIVE="$1"
14+
DISTNAME="$2"
15+
16+
git archive --prefix="${DISTNAME}/" HEAD | tar -xp
17+
cd "${DISTNAME}"
18+
19+
./autogen.sh
20+
./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking
21+
make distclean
22+
23+
cd ..
24+
tar \
25+
--format=ustar \
26+
--exclude autom4te.cache \
27+
--exclude .deps \
28+
--exclude .git \
29+
--sort=name \
30+
--mode='u+rw,go+r-w,a+X' --owner=0 --group=0 \
31+
--mtime="${REFERENCE_DATETIME}" \
32+
-c "${DISTNAME}" | \
33+
gzip -9n \
34+
>"${GIT_ARCHIVE}"
35+
36+
rm -rf "${DISTNAME}"

0 commit comments

Comments
 (0)