build: store SourceDateEpoch in manifest
authorPaul Spooren <mail@aparcar.org>
Sat, 15 Aug 2020 20:57:03 +0000 (10:57 -1000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 31 Aug 2020 10:18:06 +0000 (11:18 +0100)
The usage of granular `SOURCE_DATE_EPOCH` for packages is an
incrementing integer which could be useful for downstream tooling,
therefore add it to the packages manifest.

Signed-off-by: Paul Spooren <mail@aparcar.org>
include/package-ipkg.mk
package/Makefile

index 808ac1c6e31d21795371e5758c76e5df3891ac23..0b7a561edcc59d15f81c875a8cbccd30a1702853 100644 (file)
@@ -181,6 +181,7 @@ $$(call addfield,Depends,$$(Package/$(1)/DEPENDS)
 )$$(call addfield,LicenseFiles,$(LICENSE_FILES)
 )$$(call addfield,Section,$(SECTION)
 )$$(call addfield,Require-User,$(USERID)
+)$$(call addfield,SourceDateEpoch,$(shell $(TOPDIR)/scripts/get_source_date_epoch.sh $(SOURCE))
 )$(if $(PKG_CPE_ID),CPE-ID: $(PKG_CPE_ID)
 )$(if $(filter hold,$(PKG_FLAGS)),Status: unknown hold not-installed
 )$(if $(filter essential,$(PKG_FLAGS)),Essential: yes
index 58c1ba2bbf655c76c214c59c68652665c5b3666f..f5373ee65df744515414fcb6437dbe6859361e25 100644 (file)
@@ -84,7 +84,7 @@ $(curdir)/index: FORCE
                mkdir -p $$d; \
                cd $$d || continue; \
                $(SCRIPT_DIR)/ipkg-make-index.sh . 2>&1 > Packages.manifest; \
-               grep -vE '^(Maintainer|LicenseFiles|Source|SourceName|Require)' Packages.manifest > Packages; \
+               grep -vE '^(Maintainer|LicenseFiles|Source|SourceName|Require|SourceDateEpoch)' Packages.manifest > Packages; \
                case "$$(((64 + $$(stat -L -c%s Packages)) % 128))" in 110|111) \
                        $(call ERROR_MESSAGE,WARNING: Applying padding in $$d/Packages to workaround usign SHA-512 bug!); \
                        { echo ""; echo ""; } >> Packages;; \