[source] mt7620: image.mk: make elecom-header reproducible

LEDE Commits lede-commits at lists.infradead.org
Sun Nov 5 15:16:36 PST 2017


lynxis pushed a commit to source.git, branch master:
https://git.lede-project.org/2e1f73a79f90faef133ece10f41178a894fc762e

commit 2e1f73a79f90faef133ece10f41178a894fc762e
Author: Alexander Couzens <lynxis at fe80.eu>
AuthorDate: Fri Nov 3 02:45:45 2017 +0100

    mt7620: image.mk: make elecom-header reproducible
    
    elecom-header adds a timestamp dependency. Replace
    the timestamps with SOURCE_DATE_EPOCH [0] variable.
    
    [0] https://reproducible-builds.org/specs/source-date-epoch/
    
    Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
---
 target/linux/ramips/image/mt7620.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index 2f3f59e..796cc61 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -10,7 +10,9 @@ define Build/elecom-header
 		mkhash md5 $(KDIR)/v_0.0.0.bin && \
 		echo 458 \
 	) | mkhash md5 > $(KDIR)/v_0.0.0.md5
-	$(STAGING_DIR_HOST)/bin/tar -cf $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
+	$(STAGING_DIR_HOST)/bin/tar -c \
+		$(if $(SOURCE_DATE_EPOCH),--mtime=@$(SOURCE_DATE_EPOCH)) \
+		-f $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5
 endef
 
 define Build/zyimage



More information about the lede-commits mailing list