summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-18 01:45:11 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-18 01:45:11 (EDT)
commit095ddffaf73046849623590d944fb3cd99318282 (patch)
tree04fecf9bf9d087ab13caca5dd3d283735d770e88 /src
parent52e59203144ddb2864316f14695d5207d2f8de3e (diff)
ob-buildopk: Fix non-deterministic mtimes in gzip headers
Diffstat (limited to 'src')
-rw-r--r--src/ob-buildopk.sh13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh
index 57b3688..cea74ab 100644
--- a/src/ob-buildopk.sh
+++ b/src/ob-buildopk.sh
@@ -49,14 +49,19 @@ build_opk()
find "${binary}.control" "${binary}.data" | xargs chown -h 0:0
(cd -- "${binary}.control" && find '.' | LC_ALL=C sort | \
- ${TAR} -czf '../control.tar.gz' --no-recursion -T -)
+ ${TAR} -cf '../control.tar' --no-recursion -T -)
(cd -- "${binary}.data" && find '.' | LC_ALL=C sort | \
- ${TAR} -czf '../data.tar.gz' --no-recursion -T -)
- ${TOUCH} -d "${date}" 'control.tar.gz' 'data.tar.gz'
+ ${TAR} -cf '../data.tar' --no-recursion -T -)
+ ${TOUCH} -d "${date}" 'control.tar' 'data.tar'
+ ${GZIP} 'control.tar' 'data.tar'
- ${TAR} -czf "../../${binary}_${version}_${arch}_${plat}.opk" \
+ ${TAR} -cf "../../${binary}_${version}_${arch}_${plat}.tar" \
'debian-binary' 'control.tar.gz' 'data.tar.gz'
rm -Rf 'control.tar.gz' 'data.tar.gz'
+ ${TOUCH} -d "${date}" "../../${binary}_${version}_${arch}_${plat}.tar"
+ ${GZIP} "../../${binary}_${version}_${arch}_${plat}.tar"
+ mv "../../${binary}_${version}_${arch}_${plat}.tar.gz" \
+ "../../${binary}_${version}_${arch}_${plat}.opk"
return 0
}