summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-07-15 02:16:12 -0400
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-01-31 04:16:52 -0600
commitd7b30c0a62033a880820d88f18a785c2dd161e3c (patch)
tree39fffa3d20c062b70dcbacf2d0db21890093f1d0
parent4499b46fe67de57e930d94d64e48ffcc0ed1c1c9 (diff)
downloadabuild-3.4.tar.gz
abuild-3.4.tar.bz2
abuild-3.4.tar.xz
abuild-3.4.zip
abuild-gzsplit: support libarchive pax format tar archives3.4
-rw-r--r--abuild-gzsplit.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/abuild-gzsplit.c b/abuild-gzsplit.c
index 5e7a698..5088978 100644
--- a/abuild-gzsplit.c
+++ b/abuild-gzsplit.c
@@ -11,6 +11,7 @@ int main(void)
z_stream zs;
int r = Z_OK, rc = 1, fd = -1;
size_t len;
+ size_t offset;
if (inflateInit2(&zs, 15+32) != Z_OK)
goto err;
@@ -33,9 +34,15 @@ int main(void)
if (len) {
if (fd < 0) {
const char *fn;
- if (strncmp(obuf, ".SIGN.", 6) == 0)
+
+ if (strncmp(obuf, "PaxHeader/", 10) == 0)
+ offset = 10;
+ else
+ offset = 0;
+
+ if (strncmp(obuf + offset, ".SIGN.", 6) == 0)
fn = "signatures.tar.gz";
- else if (strncmp(obuf, ".PKGINFO", 8) == 0)
+ else if (strncmp(obuf + offset, ".PKGINFO", 8) == 0)
fn = "control.tar.gz";
else if (rc == 1)
fn = "data.tar.gz", rc = 2;