aboutsummaryrefslogtreecommitdiff
path: root/contrib/gitian-descriptors/gitian-linux.yml
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@protonmail.com>2020-03-25 14:47:10 +0100
committerWladimir J. van der Laan <laanwj@protonmail.com>2020-03-25 14:48:44 +0100
commitbaa72cd9a2fd1c7213f726e5354f87591ddd895f (patch)
tree59425df3080ba2eb90ab4d72ef1926499e90d11b /contrib/gitian-descriptors/gitian-linux.yml
parent3f5107d008e15efa364c53bd3ed4e819cd2c6712 (diff)
parente4d366788bc2e8dce8e6ca572fce08d913d15d6b (diff)
Merge #18331: build: Use git archive as source tarball
e4d366788bc2e8dce8e6ca572fce08d913d15d6b build: Drop needless EXTRA_DIST content (Hennadii Stepanov) 6c4da59f5b5b3c40526d38965d4ffa7fd59f2ebc build: Drop SOURCEDIST reordering (Hennadii Stepanov) 5e6b8b391243016cb06e9e107c2e6a13a744b31e build: Use git archive as source tarball (Hennadii Stepanov) Pull request description: This PR: - is an alternative to #17104 - closes #16734 - closes #6753 The idea is clear described by some developers: - [MarcoFalke](https://github.com/bitcoin/bitcoin/pull/17097#issuecomment-540691850): > This whole concept of explicitly listing each and every file manually (or with a fragile wildcard) is an obvious sisyphean task. I'd say all we need to do is run git archive and be done with it forever, see #16734, #6753, #11530 ... - [laanwj](https://github.com/bitcoin/bitcoin/pull/17097#issuecomment-540706025): > I agree, I've never been a fan of it. I don't think we have any files in the git repository we don't want to ship in the source tarball. --- The suggested changes have a downside which is pointed by [**luke-jr**](https://github.com/bitcoin/bitcoin/pull/17104#issuecomment-540828045): > ... but the distfile needs to include autogen-generated files. This means that a user is not able to run `./configure && make` right away. One must run `./autogen.sh` at first. Here are opinions about mandatory use of `./autogen.sh`: - [ryanofsky](https://github.com/bitcoin/bitcoin/issues/16734#issuecomment-534139356): > It's probably ok to require autogen. I think historically configure scripts were supposed to work on obscure unix systems that would just have a generic shell + make tool + c compiler, and not necessarily need gnu packages like m4 which are needed for autogen. - [laanwj](https://github.com/bitcoin/bitcoin/issues/16734#issuecomment-540729483): > I also think it's fine to require autogen. What is one dependency more, if you're building from source. --- ~Also this PR provides Windows users with ZIP archives of the sources. Additionally the commit ID is stored in these ZIP files as a file comment:~ --- Note for reviewers: please verify is `git archive` output deterministic? ACKs for top commit: MarcoFalke: re-ACK e4d366788bc2e8dce8e6ca572fce08d913d15d6b, only change is adding two dots in a the path 🛳 laanwj: ACK e4d366788bc2e8dce8e6ca572fce08d913d15d6b Tree-SHA512: d1153d3ca4a580696019b92be3555ab004d197d9a2146aacff9d3150eb7093b7d40eebd6eea12d861d93ff62d62b68706e04e64dbe5ea796ff6757486e462193
Diffstat (limited to 'contrib/gitian-descriptors/gitian-linux.yml')
-rw-r--r--contrib/gitian-descriptors/gitian-linux.yml14
1 files changed, 4 insertions, 10 deletions
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 4a8b125ae7..a13a42d391 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -147,13 +147,6 @@ script: |
SOURCEDIST=$(echo bitcoin-*.tar.gz)
DISTNAME=${SOURCEDIST/%.tar.gz}
- # Correct tar file order
- mkdir -p temp
- pushd temp
- tar -xf ../$SOURCEDIST
- find bitcoin-* | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ../$SOURCEDIST
- popd
-
# Workaround for tarball not building with the bare tag version (prep)
make -C src obj/build.h
@@ -190,11 +183,12 @@ script: |
rm -rf ${DISTNAME}/lib/pkgconfig
find ${DISTNAME}/bin -type f -executable -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
find ${DISTNAME}/lib -type f -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
- cp ../README.md ${DISTNAME}/
+ cp ../../README.md ${DISTNAME}/
find ${DISTNAME} -not -name "*.dbg" | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
find ${DISTNAME} -name "*.dbg" | sort | tar --mtime="$REFERENCE_DATETIME" --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}-debug.tar.gz
cd ../../
rm -rf distsrc-${i}
done
- mkdir -p $OUTDIR/src
- mv $SOURCEDIST $OUTDIR/src
+
+ mkdir -p ${OUTDIR}/src
+ git archive --output=${OUTDIR}/src/${DISTNAME}.tar.gz HEAD