summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorkpcyrd <git@rxv.cc>2019-12-02 18:09:56 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2020-01-30 10:41:06 +0000
commit660f793d6de6291204ba044e03b37826d2e78e88 (patch)
tree4d70674ccf6bc381b69f4448d7585400ef230a90 /abuild.in
parentd5826968b713123a4f51d3dec1adb1225d0e194f (diff)
downloadabuild-660f793d6de6291204ba044e03b37826d2e78e88.tar.bz2
abuild-660f793d6de6291204ba044e03b37826d2e78e88.tar.xz
abuild: set fixed atime and ctime in tar
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in16
1 files changed, 12 insertions, 4 deletions
diff --git a/abuild.in b/abuild.in
index cb2309c..f6cf13f 100644
--- a/abuild.in
+++ b/abuild.in
@@ -1609,7 +1609,11 @@ create_apks() {
# normalize timestamps
find . -exec touch -h -d "@$SOURCE_DATE_EPOCH" {} +
- tar --xattrs -f - -c "$@" | abuild-tar --hash | $gzip -9 >"$dir"/data.tar.gz
+ tar --xattrs \
+ --format=posix \
+ --pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0,ctime:=0 \
+ --mtime="@${SOURCE_DATE_EPOCH}" \
+ -f - -c "$@" | abuild-tar --hash | $gzip -n -9 >"$dir"/data.tar.gz
msg "Create checksum..."
# append the hash for data.tar.gz
@@ -1619,8 +1623,12 @@ create_apks() {
# control.tar.gz
cd "$dir"
- tar -f - -c $(cat "$dir"/.metafiles) | abuild-tar --cut \
- | $gzip -9 > control.tar.gz
+ tar \
+ --format=posix \
+ --pax-option=exthdr.name=%d/PaxHeaders/%f,atime:=0,ctime:=0 \
+ --mtime="@${SOURCE_DATE_EPOCH}" \
+ -f - -c $(cat "$dir"/.metafiles) | abuild-tar --cut \
+ | $gzip -n -9 > control.tar.gz
abuild-sign -q control.tar.gz || exit 1
msg "Create $apk"
@@ -1754,7 +1762,7 @@ default_doc() {
fi
done
- [ $islink -eq 0 ] && $gzip -9 "$name"
+ [ $islink -eq 0 ] && $gzip -n -9 "$name"
done
rm -f "$subpkgdir/usr/share/info/dir"