| Message ID | 20260511142142.3620917-1-yi.zhao@windriver.com |
|---|---|
| State | New |
| Headers | show |
| Series | [meta-networking] nftables: improve reproducibility | expand |
On Mon May 11, 2026 at 4:21 PM CEST, Yi Zhao via lists.openembedded.org wrote: > Use SOURCE_DATE_EPOCH to set MAKE_STAMP instead of using the current > time, thereby improving reproducibility. > > Signed-off-by: Yi Zhao <yi.zhao@windriver.com> > --- > ...-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 <yi.zhao@windriver.com> > +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] I think that this patch should at least be sent upstream. Reproducibility is not "embedded specific". See https://reproducible-builds.org/ Regards, > + > +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> > +--- > + 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"
On 5/11/26 22:43, Yoann Congal via lists.openembedded.org wrote: > On Mon May 11, 2026 at 4:21 PM CEST, Yi Zhao via lists.openembedded.org wrote: >> Use SOURCE_DATE_EPOCH to set MAKE_STAMP instead of using the current >> time, thereby improving reproducibility. >> >> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> >> --- >> ...-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 <yi.zhao@windriver.com> >> +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] > I think that this patch should at least be sent upstream. > Reproducibility is not "embedded specific". > See https://reproducible-builds.org/ Thanks. I will send it upstream. //Yi > > Regards, > >> + >> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> >> +--- >> + 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" > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#126851): https://lists.openembedded.org/g/openembedded-devel/message/126851 > Mute This Topic: https://lists.openembedded.org/mt/119256992/7283133 > Group Owner: openembedded-devel+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [yi.zhao@eng.windriver.com] > -=-=-=-=-=-=-=-=-=-=-=- >
On 5/12/26 09:00, Yi Zhao wrote: > > On 5/11/26 22:43, Yoann Congal via lists.openembedded.org wrote: >> On Mon May 11, 2026 at 4:21 PM CEST, Yi Zhao via >> lists.openembedded.org wrote: >>> Use SOURCE_DATE_EPOCH to set MAKE_STAMP instead of using the current >>> time, thereby improving reproducibility. >>> >>> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> >>> --- >>> ...-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 <yi.zhao@windriver.com> >>> +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] >> I think that this patch should at least be sent upstream. >> Reproducibility is not "embedded specific". >> See https://reproducible-builds.org/ > > Thanks. I will send it upstream. I have checked upstream and found that this commit[1] in development branch has already resolved the reproducibility issue. However, since the changes involve multiple patches, backporting them is not appropriate. Therefore, I think we can keep the current Upstream-Status in the patch. It will be dropped upon the next release of nftables. [1] https://git.netfilter.org/nftables/commit/?id=ca86f206c92704170a295b8dc7a41f6448835dde //Yi > > > //Yi > > >> >> Regards, >> >>> + >>> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> >>> +--- >>> + 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" >> >> >> -=-=-=-=-=-=-=-=-=-=-=- >> Links: You receive all messages sent to this group. >> View/Reply Online (#126851): >> https://lists.openembedded.org/g/openembedded-devel/message/126851 >> Mute This Topic: https://lists.openembedded.org/mt/119256992/7283133 >> Group Owner: openembedded-devel+owner@lists.openembedded.org >> Unsubscribe: >> https://lists.openembedded.org/g/openembedded-devel/unsub >> [yi.zhao@eng.windriver.com] >> -=-=-=-=-=-=-=-=-=-=-=- >>
On Tue May 12, 2026 at 4:02 AM CEST, Yi Zhao wrote: > > On 5/12/26 09:00, Yi Zhao wrote: >> >> On 5/11/26 22:43, Yoann Congal via lists.openembedded.org wrote: >>> On Mon May 11, 2026 at 4:21 PM CEST, Yi Zhao via >>> lists.openembedded.org wrote: >>>> Use SOURCE_DATE_EPOCH to set MAKE_STAMP instead of using the current >>>> time, thereby improving reproducibility. >>>> >>>> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> >>>> --- >>>> ...-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 <yi.zhao@windriver.com> >>>> +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] >>> I think that this patch should at least be sent upstream. >>> Reproducibility is not "embedded specific". >>> See https://reproducible-builds.org/ >> >> Thanks. I will send it upstream. > > > I have checked upstream and found that this commit[1] in development > branch has already resolved the reproducibility issue. However, since > the changes involve multiple patches, backporting them is not appropriate. > > Therefore, I think we can keep the current Upstream-Status in the patch. > It will be dropped upon the next release of nftables. > > [1] > https://git.netfilter.org/nftables/commit/?id=ca86f206c92704170a295b8dc7a41f6448835dde Awesome news :) In that case, your patch could be seen as the "Upstream-Status: Backport" of this URL... At least, please add the URL to the patch as a reference so this precious information is not lost when the upgrade will happen. Thanks! > > > //Yi > >> >> >> //Yi >> >> >>> >>> Regards, >>> >>>> + >>>> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> >>>> +--- >>>> + 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" >>> >>> >>> -=-=-=-=-=-=-=-=-=-=-=- >>> Links: You receive all messages sent to this group. >>> View/Reply Online (#126851): >>> https://lists.openembedded.org/g/openembedded-devel/message/126851 >>> Mute This Topic: https://lists.openembedded.org/mt/119256992/7283133 >>> Group Owner: openembedded-devel+owner@lists.openembedded.org >>> Unsubscribe: >>> https://lists.openembedded.org/g/openembedded-devel/unsub >>> [yi.zhao@eng.windriver.com] >>> -=-=-=-=-=-=-=-=-=-=-=- >>>
On 5/12/26 15:27, Yoann Congal wrote: > On Tue May 12, 2026 at 4:02 AM CEST, Yi Zhao wrote: >> On 5/12/26 09:00, Yi Zhao wrote: >>> On 5/11/26 22:43, Yoann Congal via lists.openembedded.org wrote: >>>> On Mon May 11, 2026 at 4:21 PM CEST, Yi Zhao via >>>> lists.openembedded.org wrote: >>>>> Use SOURCE_DATE_EPOCH to set MAKE_STAMP instead of using the current >>>>> time, thereby improving reproducibility. >>>>> >>>>> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> >>>>> --- >>>>> ...-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 <yi.zhao@windriver.com> >>>>> +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] >>>> I think that this patch should at least be sent upstream. >>>> Reproducibility is not "embedded specific". >>>> See https://reproducible-builds.org/ >>> Thanks. I will send it upstream. >> >> I have checked upstream and found that this commit[1] in development >> branch has already resolved the reproducibility issue. However, since >> the changes involve multiple patches, backporting them is not appropriate. >> >> Therefore, I think we can keep the current Upstream-Status in the patch. >> It will be dropped upon the next release of nftables. >> >> [1] >> https://git.netfilter.org/nftables/commit/?id=ca86f206c92704170a295b8dc7a41f6448835dde > Awesome news :) > > In that case, your patch could be seen as the "Upstream-Status: Backport" of this URL... > At least, please add the URL to the patch as a reference so this > precious information is not lost when the upgrade will happen. Thanks. I will send v2. //Yi > > Thanks! >> >> //Yi >> >>> >>> //Yi >>> >>> >>>> Regards, >>>> >>>>> + >>>>> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> >>>>> +--- >>>>> + 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" >>>> >>>> -=-=-=-=-=-=-=-=-=-=-=- >>>> Links: You receive all messages sent to this group. >>>> View/Reply Online (#126851): >>>> https://lists.openembedded.org/g/openembedded-devel/message/126851 >>>> Mute This Topic: https://lists.openembedded.org/mt/119256992/7283133 >>>> Group Owner: openembedded-devel+owner@lists.openembedded.org >>>> Unsubscribe: >>>> https://lists.openembedded.org/g/openembedded-devel/unsub >>>> [yi.zhao@eng.windriver.com] >>>> -=-=-=-=-=-=-=-=-=-=-=- >>>> >
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 <yi.zhao@windriver.com> +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 <yi.zhao@windriver.com> +--- + 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"
Use SOURCE_DATE_EPOCH to set MAKE_STAMP instead of using the current time, thereby improving reproducibility. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- ...-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