From fe39047a1b631b002434a4c6e115625eeac0087f Mon Sep 17 00:00:00 2001 From: Shahana Farooqui Date: Tue, 27 Jun 2023 15:55:10 -0700 Subject: [PATCH] build: passing release version for make Passing release version for make command to ensure that refresh submodule (from external makefile) runs with --force-version option as well. --- tools/repro-build.sh | 45 +++++++++++++++++++------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/tools/repro-build.sh b/tools/repro-build.sh index 4a549af48..daa4b58c4 100755 --- a/tools/repro-build.sh +++ b/tools/repro-build.sh @@ -8,11 +8,14 @@ export LANG LC_ALL for arg; do case "$arg" in + --force-version=*) + FORCE_VERSION=${arg#*=} + ;; --force-mtime=*) FORCE_MTIME=${arg#*=} ;; --help) - echo "Usage: [--force-mtime=YYYY-MM-DD]" + echo "Usage: [--force-version=] [--force-mtime=YYYY-MM-DD]" exit 0 ;; *) @@ -51,7 +54,7 @@ else fi PLATFORM="$OS"-"$VER" -VERSION=$(git describe --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's,.*/clightning-\(v[0-9.rc\-]*\)$,\1,p') +VERSION=${FORCE_VERSION:-$(git describe --always --dirty=-modded --abbrev=7 2>/dev/null || pwd | sed -n 's,.*/clightning-\(v[0-9.rc\-]*\)$,\1,p')} # eg. ## [0.6.3] - 2019-01-09: "The Smallblock Conspiracy" # Skip 'v' here in $VERSION @@ -61,17 +64,21 @@ if [ -z "$MTIME" ]; then exit 1 fi +echo "Repro Version: $VERSION" +echo "Repro mTime: $MTIME" +echo "Repro Platform: $PLATFORM" + +if grep ^deb /etc/apt/sources.list | grep -- '-\(updates\|security\)'; then + echo Please disable security and updates in /etc/apt/sources.list >&2 + exit 1 +fi + +DOWNLOAD='sudo apt -y --no-install-recommends --reinstall -d install' +PKGS='autoconf automake libtool make gcc libsqlite3-dev zlib1g-dev libsodium-dev' +INST='sudo dpkg -i' + case "$PLATFORM" in Ubuntu-18.04) - # Use an ISO base of 5748706937539418ee5707bd538c4f5eabae485d17aa49fb13ce2c9b70532433 /home/rusty/Downloads/ubuntu-18.04.1-desktop-amd64.iso - # Check they've turned off updates and security updates - if grep ^deb /etc/apt/sources.list | grep -- '-\(updates\|security\)'; then - echo Please disable security and updates in /etc/apt/sources.list >&2 - exit 1 - fi - DOWNLOAD='sudo apt -y --no-install-recommends --reinstall -d install' - PKGS='autoconf automake libtool make gcc libsqlite3-dev zlib1g-dev libsodium-dev' - INST='sudo dpkg -i' cat > /tmp/SHASUMS <&2 - exit 1 - fi - DOWNLOAD='sudo apt -y --no-install-recommends --reinstall -d install' - PKGS='autoconf automake libtool make gcc libsqlite3-dev zlib1g-dev libsodium-dev' - INST='sudo dpkg -i' cat > /tmp/SHASUMS <&2 - exit 1 - fi - DOWNLOAD='sudo apt -y --no-install-recommends --reinstall -d install' - PKGS='autoconf automake libtool make gcc libsqlite3-dev zlib1g-dev libsodium-dev' - INST='sudo dpkg -i' cat > /tmp/SHASUMS <