summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Spooren2026-06-30 16:38:58 +0000
committerPaul Spooren2026-06-30 16:53:03 +0000
commitb0b4bf6ea0927195631a3557d05f48f8e302d498 (patch)
tree7a3e65d04358be7960a66e525c706197d725e239
parent92143f94b6b35e5b3602c1f9d2cfb6e2f9a63085 (diff)
build: don't store timestamps in APK packages
This commit statically sets SOURCE_DATE_EPOCH to 0, which causes `apk mkpkg` to drop the date from generated packages. This improves reproducibility while leaving package specific SOURCE_DATE_EPOCH untouched. The latter can be interesting for i.e. packages like busybox, which prominently show that date on the login shell. Without this commit, packages that live inside feed repositories (openwrt.git, packages.git etc) like `mtd` or `attendedsysupgrade-common` would have random timestamps since no "full" git log was available. Below an example with different source dates (0, 1): │ 0755 root:wheel - - / │ 0755 root:wheel - - lib/ │ 0755 root:wheel - - lib/apk/ │ 0755 root:wheel - - lib/apk/packages/ │ -0644 root:wheel 1970-01-01T00:00:01Z 10 lib/apk/packages/mtd.list │ +0644 root:wheel - 10 lib/apk/packages/mtd.list │ 0755 root:wheel - - sbin/ │ -0755 root:wheel 1970-01-01T00:00:01Z 24595 sbin/mtd │ +0755 root:wheel - 24595 sbin/mtd Link: https://github.com/openwrt/openwrt/pull/24005 Signed-off-by: Paul Spooren <mail@aparcar.org>
-rw-r--r--include/package-pack.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/package-pack.mk b/include/package-pack.mk
index 493619f7aa..5dc69139b3 100644
--- a/include/package-pack.mk
+++ b/include/package-pack.mk
@@ -605,7 +605,7 @@ else
exit 1; \
fi
- $(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk mkpkg \
+ SOURCE_DATE_EPOCH=0 $(FAKEROOT) $(STAGING_DIR_HOST)/bin/apk mkpkg \
--info "name:$(1)$$(ABIV_$(1))" \
--info "version:$(VERSION)" \
$$(if $$(APK_TAGS_$(1)),--info "tags:$$(APK_TAGS_$(1))") \