Use SOURCE_DATE_EPOCH to set MAKE_STAMP instead of using the current time, thereby improving reproducibility.
Signed-off-by: Yi Zhao <[email protected]> --- ...-set-MAKE_STAMP-to-SOURCE_DATE_EPOCH.patch | 34 +++++++++++++++++++ .../recipes-filter/nftables/nftables_1.1.6.bb | 1 + 2 files changed, 35 insertions(+) create mode 100644 meta-networking/recipes-filter/nftables/nftables/0001-configure.ac-set-MAKE_STAMP-to-SOURCE_DATE_EPOCH.patch diff --git a/meta-networking/recipes-filter/nftables/nftables/0001-configure.ac-set-MAKE_STAMP-to-SOURCE_DATE_EPOCH.patch b/meta-networking/recipes-filter/nftables/nftables/0001-configure.ac-set-MAKE_STAMP-to-SOURCE_DATE_EPOCH.patch new file mode 100644 index 0000000000..7d2f9c0dfe --- /dev/null +++ b/meta-networking/recipes-filter/nftables/nftables/0001-configure.ac-set-MAKE_STAMP-to-SOURCE_DATE_EPOCH.patch @@ -0,0 +1,34 @@ +From 77de073b1cc7413b1d230995851338345d56a8f8 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <[email protected]> +Date: Mon, 11 May 2026 15:52:29 +0800 +Subject: [PATCH] configure.ac: set MAKE_STAMP to SOURCE_DATE_EPOCH + +If SOURCE_DATE_EPOCH is set, use it to set MAKE_STAMP instead of the +current time. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <[email protected]> +--- + configure.ac | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 6825474..2b147af 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -165,7 +165,10 @@ 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)"]) ++AS_IF([test -n "$SOURCE_DATE_EPOCH"], ++ [MAKE_STAMP="$SOURCE_DATE_EPOCH"], ++ [MAKE_STAMP='$(shell date +%s)']) ++AC_SUBST([MAKE_STAMP]) + + AC_ARG_ENABLE([distcheck], + AS_HELP_STRING([--enable-distcheck], [Build for distcheck]), +-- +2.34.1 + diff --git a/meta-networking/recipes-filter/nftables/nftables_1.1.6.bb b/meta-networking/recipes-filter/nftables/nftables_1.1.6.bb index d27e60a18d..5ab31f9b0c 100644 --- a/meta-networking/recipes-filter/nftables/nftables_1.1.6.bb +++ b/meta-networking/recipes-filter/nftables/nftables_1.1.6.bb @@ -12,6 +12,7 @@ DEPENDS = "libmnl libnftnl bison-native \ ${@bb.utils.contains('PACKAGECONFIG', 'mini-gmp', '', 'gmp', d)}" SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.xz \ + file://0001-configure.ac-set-MAKE_STAMP-to-SOURCE_DATE_EPOCH.patch \ file://run-ptest \ " SRC_URI[sha256sum] = "372931bda8556b310636a2f9020adc710f9bab66f47efe0ce90bff800ac2530c" -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#126850): https://lists.openembedded.org/g/openembedded-devel/message/126850 Mute This Topic: https://lists.openembedded.org/mt/119256992/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
