electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 501fd8f9e5c419a9aa482b149c39fad163ddd4de
parent ae714772c38410a0169f2c76a14a64a62c0daff0
Author: Axel Gembe <derago@gmail.com>
Date:   Sun, 23 Jun 2019 02:47:16 +0200

AppImage: Improve reproducible Python build reliability on Linux

There was a problem where Python would not properly include the faketime
timestamp sometimes. This patch replaces faketime with a patch that is
used by Ubuntu for reproducible builds by exporting BUILD_DATE and
BUILD_TIME with the desired values.

-----

taken from Electron-Cash/Electron-Cash@9532508a3f466aab794fae4f8e314617d5a873f9

Diffstat:
Mcontrib/build-linux/appimage/build.sh | 8++++++--
Acontrib/build-linux/appimage/patches/python-3.6.8-reproducible-buildinfo.diff | 13+++++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/contrib/build-linux/appimage/build.sh b/contrib/build-linux/appimage/build.sh @@ -44,14 +44,18 @@ tar xf "$CACHEDIR/Python-$PYTHON_VERSION.tar.xz" -C "$BUILDDIR" ( cd "$BUILDDIR/Python-$PYTHON_VERSION" export SOURCE_DATE_EPOCH=1530212462 - TZ=UTC faketime -f '2019-01-01 01:01:01' ./configure \ + LC_ALL=C export BUILD_DATE=$(date -u -d "@$SOURCE_DATE_EPOCH" "+%b %d %Y") + LC_ALL=C export BUILD_TIME=$(date -u -d "@$SOURCE_DATE_EPOCH" "+%H:%M:%S") + # Patch taken from Ubuntu python3.6_3.6.8-1~18.04.1.debian.tar.xz + patch -p1 < "$CONTRIB_APPIMAGE/patches/python-3.6.8-reproducible-buildinfo.diff" + ./configure \ --cache-file="$CACHEDIR/python.config.cache" \ --prefix="$APPDIR/usr" \ --enable-ipv6 \ --enable-shared \ --with-threads \ -q - TZ=UTC faketime -f '2019-01-01 01:01:01' make -j4 -s + make -j4 -s make -s install > /dev/null ) diff --git a/contrib/build-linux/appimage/patches/python-3.6.8-reproducible-buildinfo.diff b/contrib/build-linux/appimage/patches/python-3.6.8-reproducible-buildinfo.diff @@ -0,0 +1,13 @@ +# DP: Build getbuildinfo.o with DATE/TIME values when defined + +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -741,6 +741,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ + -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \ + -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \ + -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \ ++ $(if $(BUILD_DATE),-DDATE='"$(BUILD_DATE)"') \ ++ $(if $(BUILD_TIME),-DTIME='"$(BUILD_TIME)"') \ + -o $@ $(srcdir)/Modules/getbuildinfo.c + + Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile