summaryrefslogtreecommitdiff
path: root/system/abuild/libarchive.patch
blob: 7f013297190961ff0b0599bb91b143fc9486f85d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 70943ead0e226e2db81f20867b11144e449b12c6 Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Sun, 20 Feb 2022 22:38:17 -0600
Subject: [PATCH] abuild: Fix package building with libarchive >=3.6

Now that we have sparse file support, libarchive wants to use it.

APK doesn't support sparse file entries in tar files, so it fails to
install any package made in this manner.
---
 abuild.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/abuild.in b/abuild.in
index 3e83563..b0c0f9c 100644
--- a/abuild.in
+++ b/abuild.in
@@ -1503,7 +1503,9 @@ create_apks() {
 			touch .dummy
 			set -- .dummy
 		fi
-		tar --format pax --xattrs -f - -c "$@" | abuild-tar --hash | $gzip -9 >"$dir"/data.tar.gz
+		tar --no-read-sparse --format pax --xattrs -f - -c "$@" \
+			| abuild-tar --hash \
+			| $gzip -9 >"$dir"/data.tar.gz
 
 		msg "Create checksum..."
 		# append the hash for data.tar.gz
@@ -1512,7 +1514,8 @@ create_apks() {
 
 		# control.tar.gz
 		cd "$dir"
-		tar --format pax -f - -c $(cat "$dir"/.metafiles) | abuild-tar --cut \
+		tar --no-read-sparse --format pax -f - -c $(cat "$dir"/.metafiles) \
+			| abuild-tar --cut \
 			| $gzip -9 > control.tar.gz
 		abuild-sign -q control.tar.gz || exit 1
 
-- 
2.32.0 (Apple Git-132)