summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-06-16 01:22:16 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-06-16 01:22:16 (EDT)
commit483800ef9ecf5ce98c0f6894e222bf08a68bb617 (patch)
tree56adfdb3f4c41303921cc7e6ac5cbb0db142e51f /src
parent0c9d48df9c77b58f6a88792d8d3f4da48e4a787a (diff)
ob-buildopk: Make archive member owners/groups deterministic
Diffstat (limited to 'src')
-rw-r--r--src/ob-buildopk.sh3
-rw-r--r--src/opkbuild.sh3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh
index 11a16d9..dc5dae4 100644
--- a/src/ob-buildopk.sh
+++ b/src/ob-buildopk.sh
@@ -32,6 +32,9 @@ build_opk()
"${binary}_${version}_${arch}_${plat}.opk"
find "${binary}.control" "${binary}.data" | xargs touch -d "${date}"
+ # This utility runs with (fake) privileges, so we can chown what we're
+ # about to tar.
+ find "${binary}.control" "${binary}.data" | xargs chown 0:0
(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 | \
diff --git a/src/opkbuild.sh b/src/opkbuild.sh
index dd2dfc2..e04249d 100644
--- a/src/opkbuild.sh
+++ b/src/opkbuild.sh
@@ -279,7 +279,8 @@ build_source()
if ! OB_DO_SOURCE='true' "${bindir}/ob-gencontrol"; then
return 1
fi
- if ! OB_DO_SOURCE='true' "${bindir}/ob-buildopk"; then
+ if ! OB_DO_SOURCE='true' "${opt_uid0_cmd}" -- "${bindir}/ob-buildopk"
+ then
return 1
fi
if ! OB_DO_SOURCE='true' "${bindir}/ob-genchanges"; then