diff options
author | Christophe Fergeau <cfergeau@redhat.com> | 2012-05-10 23:27:56 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2012-05-22 13:48:01 +0300 |
commit | 185596818f763af1249f19161f38134ee93092d2 (patch) | |
tree | f61f3e8a45fcbc2217c13c96e7de9b03f25d303f /rpmio/rpmfileutil.c | |
parent | 7df78ae46646b7aecb32b2bc541c24fffc9090fa (diff) | |
download | rpm-185596818f763af1249f19161f38134ee93092d2.tar.gz |
Add support for 7zip compressed tarballs
Teach %prep and %uncompress how to handle 7zip tarballs, with
the mingw toolchain landing in fedora, this may be useful when
crossbuilding Windows sources compressed using 7zip (CxImage is
one such project).
Diffstat (limited to 'rpmio/rpmfileutil.c')
-rw-r--r-- | rpmio/rpmfileutil.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c index d9c9f5b4c..f82401f34 100644 --- a/rpmio/rpmfileutil.c +++ b/rpmio/rpmfileutil.c @@ -388,6 +388,10 @@ int rpmFileIsCompressed(const char * file, rpmCompressedMagic * compressed) ((magic[0] == 0037) && (magic[1] == 0235)) /* compress */ ) { *compressed = COMPRESSED_OTHER; + } else if ((magic[0] == '7') && (magic[1] == 'z') && + (magic[2] == 0xbc) && (magic[3] == 0xaf) && + (magic[4] == 0x27) && (magic[5] == 0x1c)) { + *compressed = COMPRESSED_7ZIP; } else if (rpmFileHasSuffix(file, ".lzma")) { *compressed = COMPRESSED_LZMA; } |