From 15b7f931776b9322ef6ef6b388d56d948200d80c Mon Sep 17 00:00:00 2001 From: sasha Date: Fri, 21 Oct 2022 10:39:27 -0700 Subject: [PATCH] Fix gitian version string issue by reverting the GIT_DIR backport commit We partially revert 8dbd2edd9855e0a95e481f3615d9549195c937ad by removing all instances of setting `GIT_DIR` in the gitian descriptors. Currently, gitian builds cause zcash to have version strings which look like `Zcash Daemon version v5.3.0-35186b009-dirty`, which is inaccurate. Setting `GIT_DIR` with a current working directory of `/home/debian/build/zcash/distsrc-x86_64-linux-gnu` makes the git invocations in `genbuild.sh` see that directory as the top of the working tree, which causes git to believe that a bunch of tracked files were deleted (namely, those not included by the `make dist` step). This causes `genbuild.sh` to believe that it is working with a dirty tree, and with the help of `src/clientversion.cpp`, zcash gets a version string that includes a hash ending in `-dirty`. --- contrib/gitian-descriptors/gitian-linux-parallel.yml | 1 - contrib/gitian-descriptors/gitian-linux.yml | 1 - contrib/gitian-descriptors/gitian-osx.yml | 1 - contrib/gitian-descriptors/gitian-win.yml | 1 - 4 files changed, 4 deletions(-) diff --git a/contrib/gitian-descriptors/gitian-linux-parallel.yml b/contrib/gitian-descriptors/gitian-linux-parallel.yml index 19927af01..dda65b5f4 100644 --- a/contrib/gitian-descriptors/gitian-linux-parallel.yml +++ b/contrib/gitian-descriptors/gitian-linux-parallel.yml @@ -97,7 +97,6 @@ script: | create_per-host_faketime_wrappers "${REFERENCE_DATETIME}" # Create the release tarball using (arbitrarily) the first host - export GIT_DIR="$PWD/.git" ./autogen.sh CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/ make dist diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml index 7c9ece4f5..adb5c5a1d 100644 --- a/contrib/gitian-descriptors/gitian-linux.yml +++ b/contrib/gitian-descriptors/gitian-linux.yml @@ -97,7 +97,6 @@ script: | create_per-host_faketime_wrappers "${REFERENCE_DATETIME}" # Create the release tarball using (arbitrarily) the first host - export GIT_DIR="$PWD/.git" ./autogen.sh CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/ make dist diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml index cb0a968c9..723b83c51 100644 --- a/contrib/gitian-descriptors/gitian-osx.yml +++ b/contrib/gitian-descriptors/gitian-osx.yml @@ -92,7 +92,6 @@ script: | create_per-host_faketime_wrappers "${REFERENCE_DATETIME}" # Create the release tarball using (arbitrarily) the first host - export GIT_DIR="$PWD/.git" ./autogen.sh CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/ make dist diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml index 9ae0f21fb..fb65863ef 100644 --- a/contrib/gitian-descriptors/gitian-win.yml +++ b/contrib/gitian-descriptors/gitian-win.yml @@ -113,7 +113,6 @@ script: | create_per-host_linker_wrapper "${REFERENCE_DATETIME}" # Create the release tarball using (arbitrarily) the first host - export GIT_DIR="$PWD/.git" ./autogen.sh CONFIG_SITE=${BASEPREFIX}/$(echo "${HOSTS}" | awk '{print $1;}')/share/config.site ./configure --prefix=/ make dist