Kaynağa Gözat

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 <[email protected]>
Alexander Couzens 6 yıl önce
ebeveyn
işleme
8cb13f4e6d
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1 0
      include/rootfs.mk

+ 1 - 0
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