From: Jeremy Sowden Date: Wed, 28 Jan 2026 18:31:07 +0000 (+0000) Subject: build: support `SOURCE_DATE_EPOCH` for build time-stamp X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ca86f206c92704170a295b8dc7a41f6448835dde;p=thirdparty%2Fnftables.git build: support `SOURCE_DATE_EPOCH` for build time-stamp In order to support reproducible builds, set the build time-stamp to the value of the environment variable, `SOURCE_DATE_EPOCH`, if set, and fall back to calling `date`, otherwise. Link: https://reproducible-builds.org/docs/source-date-epoch/ Fixes: 64c07e38f049 ("table: Embed creating nft version into userdata") Reported-by: Arnout Engelen Closes: https://github.com/NixOS/nixpkgs/issues/478048 Suggested-by: Philipp Bartsch Signed-off-by: Jeremy Sowden Signed-off-by: Phil Sutter --- diff --git a/configure.ac b/configure.ac index 9859072e..02260862 100644 --- a/configure.ac +++ b/configure.ac @@ -149,7 +149,7 @@ AC_ARG_WITH([stable-release], [AS_HELP_STRING([--with-stable-release], [], [with_stable_release=0]) AC_SUBST([STABLE_RELEASE],[$with_stable_release]) AC_SUBST([NFT_VERSION], [$(echo "${VERSION}" | tr '.' ',')]) -AC_SUBST([BUILD_STAMP], [$(date +%s)]) +AC_SUBST([BUILD_STAMP], [${SOURCE_DATE_EPOCH:-$(date +%s)}]) AC_ARG_ENABLE([distcheck], AS_HELP_STRING([--enable-distcheck], [Build for distcheck]),