File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
contrib/gitian-descriptors Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ script: |
29
29
STAGING="$HOME/install"
30
30
OPTFLAGS='-O2'
31
31
BINDIR="${OUTDIR}/bin/${GBUILD_BITS}" # 32/64 bit build specific output directory
32
+ TEMPDIR="$HOME/tempdir"
33
+ export TZ=UTC
32
34
export LIBRARY_PATH="$STAGING/lib"
33
35
mkdir -p ${BINDIR}
34
36
#
@@ -39,15 +41,20 @@ script: |
39
41
cd ../build
40
42
#
41
43
cd bitcoin
42
- export TAR_OPTIONS=--mtime=`echo $REFERENCE_DATETIME | awk '{ print $1 }'`
43
44
./autogen.sh
44
45
./configure --prefix=$STAGING --bindir=$BINDIR --with-protoc-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" BOOST_CHRONO_EXTRALIBS="-lrt"
45
46
make dist
47
+ DISTNAME=`echo bitcoin-*.tar.gz`
46
48
mkdir -p distsrc
47
49
cd distsrc
48
- tar --strip-components=1 -xf ../bitcoin-*.tar.*
50
+ tar --strip-components=1 -xf ../$DISTNAME
49
51
./configure --prefix=$STAGING --bindir=$BINDIR --with-protoc-bindir=$STAGING/host/bin --with-boost=$STAGING --disable-maintainer-mode --disable-dependency-tracking PKG_CONFIG_PATH="$STAGING/lib/pkgconfig" CPPFLAGS="-I$STAGING/include ${OPTFLAGS}" LDFLAGS="-L$STAGING/lib ${OPTFLAGS}" CXXFLAGS="-frandom-seed=bitcoin ${OPTFLAGS}" BOOST_CHRONO_EXTRALIBS="-lrt"
50
52
make $MAKEOPTS
51
53
make $MAKEOPTS install-strip
54
+
55
+ # sort distribution tar file and normalize user/group/mtime information for deterministic output
52
56
mkdir -p $OUTDIR/src
53
- cp ../bitcoin-*.tar.* $OUTDIR/src
57
+ rm -rf $TEMPDIR
58
+ mkdir -p $TEMPDIR
59
+ cd $TEMPDIR
60
+ tar -xvf $HOME/build/bitcoin/$DISTNAME | sort | tar --no-recursion -cT /dev/stdin --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 --mtime="$REFERENCE_DATETIME" | gzip -n > $OUTDIR/src/$DISTNAME
You can’t perform that action at this time.
0 commit comments