Hi On Wed, 2024-07-24 at 16:35:44 +0200, Guillem Jover wrote: > On Wed, 2024-07-24 at 14:37:53 +0200, Guillem Jover wrote: > > Both look like the same problem, which would be a regression from the > > recent rework of the Makefile fragments. I'm CCing Nicolas as a > > heads-up, and I'm looking into this to try to do a quick fix upload. > > So there's something wrong with the variables evaluation, and the > following change makes these packages build again, but I don't > understand yet what's wrong with the first ifdef conditional arm. > And neither why the test suite didn't catch this, as it is > supposedly testing w/ and w/o SOURCE_DATE_EPOCH being set. > (I'll go for lunch now, so if someone else can have a look that'd > also be appreciated. :)
I think the attached patch might be better. Thanks, Guillem
diff --git i/scripts/mk/pkg-info.mk w/scripts/mk/pkg-info.mk index ddda4f736..c999d2d3c 100644 --- i/scripts/mk/pkg-info.mk +++ w/scripts/mk/pkg-info.mk @@ -8,6 +8,9 @@ # DEB_VERSION_UPSTREAM: package's upstream version. # DEB_DISTRIBUTION: distribution(s) listed in the current debian/changelog # entry. +# DEB_TIMESTAMP: source package relase date as seconds since the epoch as +# specified in the latest debian/changelog entry (since dpkg 1.22.9), +# although you are probably looking for SOURCE_DATE_EPOCH instead. # # SOURCE_DATE_EPOCH: source release date as seconds since the epoch, as # specified by <https://reproducible-builds.org/specs/source-date-epoch/> @@ -26,20 +29,12 @@ dpkg_parsechangelog_run = $(eval $(shell dpkg-parsechangelog | sed -n '\ $$(eval DEB_VERSION_EPOCH_UPSTREAM:=\1\2\4)\ $$(eval DEB_VERSION_UPSTREAM_REVISION:=\2\3)\ $$(eval DEB_VERSION_UPSTREAM:=\2\4)/p;\ - s/^Timestamp: \(.*\)/$$(eval SOURCE_DATE_EPOCH?=\1)/p')) + s/^Timestamp: \(.*\)/$$(eval DEB_TIMESTAMP:=\1)/p')) -ifdef SOURCE_DATE_EPOCH - dpkg_lazy_eval ?= $(eval $(1) = $(2)$$($(1))) - $(call dpkg_lazy_eval,DEB_DISTRIBUTION,$$(dpkg_parsechangelog_run)) - $(call dpkg_lazy_eval,DEB_SOURCE,$$(dpkg_parsechangelog_run)) - $(call dpkg_lazy_eval,DEB_VERSION,$$(dpkg_parsechangelog_run)) - $(call dpkg_lazy_eval,DEB_VERSION_EPOCH_UPSTREAM,$$(dpkg_parsechangelog_run)) - $(call dpkg_lazy_eval,DEB_VERSION_UPSTREAM,$$(dpkg_parsechangelog_run)) - $(call dpkg_lazy_eval,DEB_UPSTREAM_REVISION,$$(dpkg_parsechangelog_run)) -else - # We need to compute the values right now. - $(dpkg_parsechangelog_run) -endif +# We need to compute the values right now. +$(dpkg_parsechangelog_run) + +SOURCE_DATE_EPOCH ?= $(DEB_TIMESTAMP) export SOURCE_DATE_EPOCH endif # dpkg_pkg_info_mk_included diff --git i/scripts/t/mk/pkg-info.mk w/scripts/t/mk/pkg-info.mk index 6eb37866d..6863ebb80 100644 --- i/scripts/t/mk/pkg-info.mk +++ w/scripts/t/mk/pkg-info.mk @@ -6,6 +6,7 @@ TEST_DEB_VERSION_EPOCH_UPSTREAM = 1:2:3.4-5 TEST_DEB_VERSION_UPSTREAM_REVISION = 2:3.4-5-6 TEST_DEB_VERSION_UPSTREAM = 2:3.4-5 TEST_DEB_DISTRIBUTION = suite +TEST_DEB_TIMESTAMP = 1438697630 test_vars := \ DEB_SOURCE \ @@ -14,6 +15,7 @@ test_vars := \ DEB_VERSION_UPSTREAM_REVISION \ DEB_VERSION_UPSTREAM \ DEB_DISTRIBUTION \ + DEB_TIMESTAMP \ SOURCE_DATE_EPOCH \ # EOL