aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/gemini/image/Makefile
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2019-01-25 21:42:28 +0100
committerMathias Kresin <dev@kresin.me>2019-01-26 15:23:36 +0100
commit1e606edce6f43e7e42fa44809f14ff0d1cb9ab47 (patch)
tree9c3e1eef3990b25ab418e867465b552356c55bdd /target/linux/gemini/image/Makefile
parent6491643df4595262fbb2387327a01e16523b58ba (diff)
downloadupstream-1e606edce6f43e7e42fa44809f14ff0d1cb9ab47.tar.gz
upstream-1e606edce6f43e7e42fa44809f14ff0d1cb9ab47.tar.bz2
upstream-1e606edce6f43e7e42fa44809f14ff0d1cb9ab47.zip
gemini: make all tar files more reproducible
Force a fixed sorting and use the parameters to create reproducible archives for all tar invocations. Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/gemini/image/Makefile')
-rw-r--r--target/linux/gemini/image/Makefile8
1 files changed, 5 insertions, 3 deletions
diff --git a/target/linux/gemini/image/Makefile b/target/linux/gemini/image/Makefile
index c08ea5d5eb..773fe1e4bc 100644
--- a/target/linux/gemini/image/Makefile
+++ b/target/linux/gemini/image/Makefile
@@ -38,7 +38,9 @@ define Build/dns313-images
dns313-header $(IMAGE_KERNEL) \
$@.tmp/.boot/zImage
- tar -czf $@ -C @.tmp .boot
+ tar --sort=name --owner=0 --group=0 --numeric-owner -czf $@ \
+ -C $@.tmp .boot \
+ $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)")
rm -rf $@.tmp
endef
@@ -57,8 +59,8 @@ define Build/nas4220b-sq201-images
dd if=/dev/zero of=$@-tmp/hddapp.tgz bs=6144k count=1
cp $(IMAGE_KERNEL) $@-tmp/zImage
cp ./ImageInfo-$(1) $@-tmp/ImageInfo
- (cd $@-tmp; tar --owner=0 --group=0 --numeric-owner --mtime=@$(SOURCE_DATE_EPOCH) \
- -czf $@ ImageInfo zImage rd.gz hddapp.tgz)
+ (cd $@-tmp; tar --sort=name --owner=0 --group=0 --numeric-owner -czf $@ * \
+ $(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)"))
rm -rf $@-tmp
endef