87 lines
3.2 KiB
Diff
87 lines
3.2 KiB
Diff
|
---
|
||
|
build/parsePrep.c | 3 +++
|
||
|
configure.ac | 1 +
|
||
|
macros.in | 1 +
|
||
|
rpmio/macro.c | 8 ++++++++
|
||
|
rpmio/rpmmacro.h | 3 ++-
|
||
|
5 files changed, 15 insertions(+), 1 deletion(-)
|
||
|
|
||
|
Index: build/parsePrep.c
|
||
|
===================================================================
|
||
|
--- build/parsePrep.c.orig 2008-04-01 09:28:21.000000000 +0200
|
||
|
+++ build/parsePrep.c 2009-02-19 10:49:23.000000000 +0100
|
||
|
@@ -258,6 +258,9 @@ static char *doPatch(Spec spec, int c, i
|
||
|
case COMPRESSED_LZMA:
|
||
|
t = "%{__lzma} -dc";
|
||
|
break;
|
||
|
+ case COMPRESSED_XZ:
|
||
|
+ t = "%{__xz} -dc";
|
||
|
+ break;
|
||
|
}
|
||
|
zipper = rpmGetPath(t, NULL);
|
||
|
buf[0] = '\0';
|
||
|
Index: configure.ac
|
||
|
===================================================================
|
||
|
--- configure.ac.orig 2009-02-19 10:43:13.000000000 +0100
|
||
|
+++ configure.ac 2009-02-19 10:50:25.000000000 +0100
|
||
|
@@ -247,6 +247,7 @@ AC_SUBST(__ID_U)
|
||
|
|
||
|
AC_PATH_PROG(__INSTALL, install, /usr/bin/install, $MYPATH)
|
||
|
AC_PATH_PROG(__LZMA, lzma, /usr/bin/lzma, $MYPATH)
|
||
|
+AC_PATH_PROG(__XZ, xz, /usr/bin/xz, $MYPATH)
|
||
|
AC_PATH_PROG(__MAKE, make, /usr/bin/make, $MYPATH)
|
||
|
AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH)
|
||
|
AC_PATH_PROG(__MV, mv, /bin/mv, $MYPATH)
|
||
|
Index: macros.in
|
||
|
===================================================================
|
||
|
--- macros.in.orig 2009-02-19 10:43:13.000000000 +0100
|
||
|
+++ macros.in 2009-02-19 10:51:05.000000000 +0100
|
||
|
@@ -49,6 +49,7 @@
|
||
|
%__install @__INSTALL@
|
||
|
%__ln_s @LN_S@
|
||
|
%__lzma @__LZMA@
|
||
|
+%__xz @__XZ@
|
||
|
%__make @__MAKE@
|
||
|
%__mkdir @__MKDIR@
|
||
|
%__mkdir_p @MKDIR_P@
|
||
|
Index: rpmio/macro.c
|
||
|
===================================================================
|
||
|
--- rpmio/macro.c.orig 2008-04-01 09:29:13.000000000 +0200
|
||
|
+++ rpmio/macro.c 2009-02-19 10:47:57.000000000 +0100
|
||
|
@@ -1184,6 +1184,9 @@ doFoo(MacroBuf mb, int negate, const cha
|
||
|
case COMPRESSED_LZMA:
|
||
|
sprintf(be, "%%_lzma -dc %s", b);
|
||
|
break;
|
||
|
+ case COMPRESSED_XZ:
|
||
|
+ sprintf(be, "%%_xz -dc %s", b);
|
||
|
+ break;
|
||
|
}
|
||
|
b = be;
|
||
|
} else if (STREQ("S", f, fn)) {
|
||
|
@@ -2120,6 +2123,11 @@ int isCompressed(const char * file, rpmC
|
||
|
(magic[4] == 0x41) && (magic[5] == 0x00)) {
|
||
|
/* new style lzma with magic */
|
||
|
*compressed = COMPRESSED_LZMA;
|
||
|
+ } else if ((magic[0] == 0xfd) && (magic[1] == 0x37) &&
|
||
|
+ (magic[2] == 0x7a) && (magic[3] == 0x58) &&
|
||
|
+ (magic[4] == 0x5a) && (magic[5] == 0x00)) {
|
||
|
+ /* xz */
|
||
|
+ *compressed = COMPRESSED_XZ;
|
||
|
} else if (((magic[0] == 0037) && (magic[1] == 0213)) || /* gzip */
|
||
|
((magic[0] == 0037) && (magic[1] == 0236)) || /* old gzip */
|
||
|
((magic[0] == 0037) && (magic[1] == 0036)) || /* pack */
|
||
|
Index: rpmio/rpmmacro.h
|
||
|
===================================================================
|
||
|
--- rpmio/rpmmacro.h.orig 2008-04-01 09:28:22.000000000 +0200
|
||
|
+++ rpmio/rpmmacro.h 2009-02-19 10:48:39.000000000 +0100
|
||
|
@@ -176,7 +176,8 @@ typedef enum rpmCompressedMagic_e {
|
||
|
COMPRESSED_OTHER = 1, /*!< gzip can handle */
|
||
|
COMPRESSED_BZIP2 = 2, /*!< bzip2 can handle */
|
||
|
COMPRESSED_ZIP = 3, /*!< unzip can handle */
|
||
|
- COMPRESSED_LZMA = 4 /*!< lzma can handle */
|
||
|
+ COMPRESSED_LZMA = 4, /*!< lzma can handle */
|
||
|
+ COMPRESSED_XZ = 5 /*!< xz can handle */
|
||
|
} rpmCompressedMagic;
|
||
|
|
||
|
/**
|