All of lore.kernel.org
 help / color / mirror / Atom feed
* [nftables PATCH] build: support SOURCE_DATE_EPOCH for reproducible build
@ 2026-01-23 12:30 Philipp Bartsch
  2026-01-23 16:36 ` Jeremy Sowden
  0 siblings, 1 reply; 6+ messages in thread
From: Philipp Bartsch @ 2026-01-23 12:30 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Philipp Bartsch, Arnout Engelen

Including build timestamps in artifacts makes it harder to reproducibly
build them.

Allow to overwrite build timestamp MAKE_STAMP by setting the
SOURCE_DATE_EPOCH environment variable.

More details on SOURCE_DATE_EPOCH and reproducible builds:
https://reproducible-builds.org/docs/source-date-epoch/

Fixes: 64c07e38f049 ("table: Embed creating nft version into userdata")
Reported-by: Arnout Engelen <arnout@bzzt.net>
Closes: https://github.com/NixOS/nixpkgs/issues/478048
Signed-off-by: Philipp Bartsch <phil@grmr.de>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index dd172e88..3c672c99 100644
--- a/configure.ac
+++ b/configure.ac
@@ -165,7 +165,7 @@ AC_CONFIG_COMMANDS([nftversion.h], [
 ])
 # Current date should be fetched exactly once per build,
 # so have 'make' call date and pass the value to every 'gcc' call
-AC_SUBST([MAKE_STAMP], ["\$(shell date +%s)"])
+AC_SUBST([MAKE_STAMP], ["\$(shell printenv SOURCE_DATE_EPOCH || date +%s)"])
 
 AC_ARG_ENABLE([distcheck],
 	      AS_HELP_STRING([--enable-distcheck], [Build for distcheck]),
-- 
2.52.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-28 12:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23 12:30 [nftables PATCH] build: support SOURCE_DATE_EPOCH for reproducible build Philipp Bartsch
2026-01-23 16:36 ` Jeremy Sowden
2026-01-28  2:29   ` Pablo Neira Ayuso
2026-01-28 12:44     ` Phil Sutter
2026-01-28 12:48       ` Florian Westphal
2026-01-28 12:50         ` Jeremy Sowden

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.