0
0
mirror of https://github.com/vim/vim.git synced 2025-11-14 23:04:02 -05:00

patch 8.2.0910: Vim is not reproducibly buildable

Problem:    Vim is not reproducibly buildable.
Solution:   Use the $SOURCE_DATE_EPOCH environment variable in configure.
            (James McCoy, closes #513)  Give a warning about using it.
This commit is contained in:
Bram Moolenaar
2020-06-05 23:16:29 +02:00
parent 002bc79991
commit 8f1dde5021
6 changed files with 44 additions and 0 deletions

12
src/auto/configure vendored
View File

@@ -721,6 +721,7 @@ OS_EXTRA_SRC
XCODE_SELECT
CPP_MM
CROSS_COMPILING
BUILD_DATE_MSG
STRIP
AWK
FGREP
@@ -4455,6 +4456,17 @@ See \`config.log' for more details" "$LINENO" 5; }
fi
fi
if test -n "$SOURCE_DATE_EPOCH"; then
DATE_FMT="%b %d %Y %H:%M:%S"
BUILD_DATE=$(LC_ALL=C date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || LC_ALL=C date -u "+$DATE_FMT")
cat >>confdefs.h <<_ACEOF
#define BUILD_DATE "$BUILD_DATE"
_ACEOF
BUILD_DATE_MSG=-"echo -e '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\nNOTE: build date/time is fixed: $BUILD_DATE\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-='"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking --enable-fail-if-missing argument" >&5
$as_echo_n "checking --enable-fail-if-missing argument... " >&6; }