summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-16 01:17:49 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-16 01:17:49 (EDT)
commit0c9d48df9c77b58f6a88792d8d3f4da48e4a787a (patch)
tree04e17cf0b63d77a371784f18b0782a35029a67be /src
parent0ed80c7a9c4498ef1f8393e420fe531a8ccc8f27 (diff)
ob-buildopk: Make archive member ordering deterministic
Diffstat (limited to 'src')
-rw-r--r--src/ob-buildopk.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh
index da111ef..11a16d9 100644
--- a/src/ob-buildopk.sh
+++ b/src/ob-buildopk.sh
@@ -32,8 +32,10 @@ build_opk()
"${binary}_${version}_${arch}_${plat}.opk"
find "${binary}.control" "${binary}.data" | xargs touch -d "${date}"
- (cd -- "${binary}.control" && tar -czf '../control.tar.gz' '.')
- (cd -- "${binary}.data" && tar -czf '../data.tar.gz' '.')
+ (cd -- "${binary}.control" && find '.' \! -type d | LC_ALL=C sort -r | \
+ tar -czf '../control.tar.gz' -T -)
+ (cd -- "${binary}.data" && find '.' \! -type d | LC_ALL=C sort -r | \
+ tar -czf '../data.tar.gz' -T -)
touch -d "${date}" 'control.tar.gz' 'data.tar.gz'
tar -czf "../../${binary}_${version}_${arch}_${plat}.opk" \