Skip to content

Commit 246659a

Browse files
committed
gitian: make tarballs deterministic and nuke .la files from build output
1 parent c54d647 commit 246659a

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,13 @@ script: |
7575
make dist
7676
DISTNAME=`echo bitcoin-*.tar.gz`
7777
78+
# Correct tar file order
79+
mkdir -p temp
80+
pushd temp
81+
tar xf ../$DISTNAME
82+
find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$DISTNAME
83+
popd
84+
7885
ORIGPATH="$PATH"
7986
# Extract the release tarball into a dir for each host and build
8087
for i in ${HOSTS}; do
@@ -92,3 +99,6 @@ script: |
9299
mv $DISTNAME $OUTDIR/src
93100
mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
94101
mv ${OUTDIR}/i686-* ${OUTDIR}/32
102+
103+
# Delete unwanted stuff
104+
find ${OUTDIR} -name "lib*.la" -delete

contrib/gitian-descriptors/gitian-osx.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,13 @@ script: |
8585
make dist
8686
DISTNAME=`echo bitcoin-*.tar.gz`
8787
88+
# Correct tar file order
89+
mkdir -p temp
90+
pushd temp
91+
tar xf ../$DISTNAME
92+
find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$DISTNAME
93+
popd
94+
8895
ORIGPATH="$PATH"
8996
# Extract the release tarball into a dir for each host and build
9097
for i in ${HOSTS}; do
@@ -102,3 +109,6 @@ script: |
102109
done
103110
mkdir -p $OUTDIR/src
104111
mv $DISTNAME $OUTDIR/src
112+
113+
# Delete unwanted stuff
114+
find ${OUTDIR} -name "lib*.la" -delete

contrib/gitian-descriptors/gitian-win.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ script: |
7777
make dist
7878
DISTNAME=`echo bitcoin-*.tar.gz`
7979
80+
# Correct tar file order
81+
mkdir -p temp
82+
pushd temp
83+
tar xf ../$DISTNAME
84+
find bitcoin-* | sort | tar --no-recursion -c -T - | gzip -9n > ../$DISTNAME
85+
popd
86+
8087
ORIGPATH="$PATH"
8188
# Extract the release tarball into a dir for each host and build
8289
for i in ${HOSTS}; do
@@ -96,3 +103,6 @@ script: |
96103
mv $DISTNAME $OUTDIR/src
97104
mv ${OUTDIR}/x86_64-* ${OUTDIR}/64
98105
mv ${OUTDIR}/i686-* ${OUTDIR}/32
106+
107+
# Delete unwanted stuff
108+
find ${OUTDIR} -name "lib*.la" -delete

0 commit comments

Comments
 (0)