From 8cb13f4e6d5750957449b4c5740f64af11a9ad36 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Fri, 20 Sep 2019 05:36:13 +0200 Subject: [PATCH] rootfs.mk: ensure all timestamp are set to SOURCE_DATE_EPOCH Some tools doesn't support SOURCE_DATE_EPOCH (e.g. initramfs images). Ensure all files of a root filesystem are set to SOURCE_DATE_EPOCH. Make initramfs builds reproducible (for ramips). Signed-off-by: Alexander Couzens --- include/rootfs.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/include/rootfs.mk b/include/rootfs.mk index f2d2494ae2..b6775c7e15 100644 --- a/include/rootfs.mk +++ b/include/rootfs.mk @@ -99,4 +99,5 @@ define prepare_rootfs rm -rf $(1)/boot $(call clean_ipkg,$(1)) $(call mklibs,$(1)) + $(if $(SOURCE_DATE_EPOCH),find $(1)/ -mindepth 1 -execdir touch -hcd "@$(SOURCE_DATE_EPOCH)" "{}" +) endef