OBS User unknown 2007-10-13 16:03:57 +00:00 committed by Git OBS Bridge
parent efa30546ad
commit 1f613bfd8c
4 changed files with 113 additions and 5 deletions

100
lzma.diff Normal file
View File

@ -0,0 +1,100 @@
Add support for lzma compressed archives.
---
build/parsePrep.c | 3 +++
configure.ac | 1 +
file/src/compress.c | 3 +++
macros.in | 1 +
rpmio/macro.c | 5 +++++
rpmio/rpmmacro.h | 3 ++-
6 files changed, 15 insertions(+), 1 deletion(-)
Index: build/parsePrep.c
===================================================================
--- build/parsePrep.c.orig 2004-11-28 21:54:53.000000000 +0100
+++ build/parsePrep.c 2007-10-11 13:12:55.000000000 +0200
@@ -251,6 +251,9 @@ static int checkOwners(const char * urlf
t = "%{_unzipbin} -qq";
needtar = 0;
break;
+ case COMPRESSED_LZMA:
+ t = "%{__lzma} -dc";
+ break;
}
zipper = rpmGetPath(t, NULL);
buf[0] = '\0';
Index: configure.ac
===================================================================
--- configure.ac.orig 2007-10-11 12:46:47.000000000 +0200
+++ configure.ac 2007-10-11 12:46:48.000000000 +0200
@@ -221,6 +221,7 @@ AC_PATH_PROG(__GPG, gpg, /usr/bin/gpg, $
AC_PATH_PROG(__GREP, grep, /bin/grep, $MYPATH)
AC_PATH_PROG(GZIPBIN, gzip, /bin/gzip, $MYPATH)
AC_PATH_PROG(UNZIPBIN, unzip, /usr/bin/unzip, $MYPATH)
+AC_PATH_PROG(LZMABIN, lzma, /usr/bin/lzma, $MYPATH)
AC_PATH_PROG(__ID, id, /usr/bin/id, $MYPATH)
AC_MSG_CHECKING(checking whether id supports -u)
Index: file/src/compress.c
===================================================================
--- file/src/compress.c.orig 2007-10-11 12:46:40.000000000 +0200
+++ file/src/compress.c 2007-10-11 12:46:48.000000000 +0200
@@ -76,6 +76,9 @@ private struct {
{ "PK\3\4", 4, { "gzip", "-cdq", NULL }, 1 }, /* pkzipped, */
/* ...only first file examined */
{ "BZh", 3, { "bzip2", "-cd", NULL }, 1 }, /* bzip2-ed */
+ /* The first bytes of a LZMA compressed file describe some compression
+ settings and thus vary. This handles the most common case: */
+ { "]\000\000",3, { "lzma", "-cdq", NULL }, 1 }, /* lzma-ed */
};
/*@=nullassign@*/
Index: macros.in
===================================================================
--- macros.in.orig 2007-10-11 12:46:46.000000000 +0200
+++ macros.in 2007-10-11 12:46:48.000000000 +0200
@@ -48,6 +48,7 @@
%__id @__ID@
%__install @__INSTALL@
%__ln_s @LN_S@
+%__lzma @LZMABIN@
%__make @__MAKE@
%__mkdir @__MKDIR@
%__mkdir_p @MKDIR_P@
Index: rpmio/macro.c
===================================================================
--- rpmio/macro.c.orig 2005-07-13 11:49:40.000000000 +0200
+++ rpmio/macro.c 2007-10-11 13:11:46.000000000 +0200
@@ -1165,6 +1165,9 @@ doFoo(MacroBuf mb, int negate, const cha
case 3: /* COMPRESSED_ZIP */
sprintf(be, "%%_unzip %s", b);
break;
+ case 4: /* COMPRESSED_LZMA */
+ sprintf(be, "%%_lzma -dc %s", b);
+ break;
}
b = be;
} else if (STREQ("S", f, fn)) {
@@ -2075,6 +2078,8 @@ int isCompressed(const char * file, rpmC
} else if ((magic[0] == 0120) && (magic[1] == 0113) &&
(magic[2] == 0003) && (magic[3] == 0004)) { /* pkzip */
*compressed = COMPRESSED_ZIP;
+ } else if (magic[0] == 0135 && magic[1] == 0 && magic[2] == 0) { /* lzma */
+ *compressed = COMPRESSED_LZMA;
} 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 2004-10-20 12:19:34.000000000 +0200
+++ rpmio/rpmmacro.h 2007-10-11 13:08:47.000000000 +0200
@@ -172,7 +172,8 @@ typedef enum rpmCompressedMagic_e {
COMPRESSED_NOT = 0, /*!< not compressed */
COMPRESSED_OTHER = 1, /*!< gzip can handle */
COMPRESSED_BZIP2 = 2, /*!< bzip2 can handle */
- COMPRESSED_ZIP = 3 /*!< unzip can handle */
+ COMPRESSED_ZIP = 3, /*!< unzip can handle */
+ COMPRESSED_LZMA = 4 /*!< lzma can handle */
} rpmCompressedMagic;
/**

View File

@ -16,7 +16,7 @@ License: GPL v2 or later
Group: System/Packages
Summary: Python Bindings for Manipulating RPM Packages
Version: 4.4.2
Release: 165
Release: 169
Requires: rpm = %{version}
%py_requires
Source99: rpm.spec

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Oct 11 13:37:16 CEST 2007 - schwab@suse.de
- Add support for lzma compressed archives.
-------------------------------------------------------------------
Sun Sep 30 18:28:23 CEST 2007 - rguenther@suse.de

View File

@ -20,7 +20,7 @@ PreReq: %insserv_prereq %fillup_prereq permissions
AutoReqProv: on
Summary: The RPM Package Manager
Version: 4.4.2
Release: 141
Release: 143
Source: rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
Source2: RPM-Tips.html.tar.bz2
@ -126,6 +126,7 @@ Patch97: perlprov.diff
Patch98: showtransscripts.diff
Patch99: rpm-debugedit-shared.diff
Patch100: rpm-gcc43.diff
Patch101: lzma.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
@ -196,7 +197,7 @@ rm -f rpmdb/db.h
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
%patch -P 80 -P 81 -P 82 -P 83 -P 84 -P 85 -P 86 -P 87 -P 88 -P 89
%patch -P 90 -P 91 -P 92 -P 93 -P 94 -P 95 -P 96 -P 97 -P 98 -P 99
%patch -P 100
%patch -P 100 -P 101
chmod 755 scripts/find-supplements{,.ksyms}
chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
tar -xjvf %{SOURCE1}
@ -343,7 +344,7 @@ Summary: A C library for parsing command line parameters
License: LGPL v2 or later
Group: System/Libraries
Version: 1.7
Release: 369
Release: 371
#
%description -n popt
@ -366,7 +367,7 @@ Summary: C Library for Parsing Command Line Parameters
License: LGPL v2 or later
Group: System/Libraries
Version: 1.7
Release: 369
Release: 371
Requires: popt = 1.7
Requires: glibc-devel
@ -400,6 +401,8 @@ Authors:
/%{_lib}/libpopt.so
%doc %{_mandir}/man3/popt.3*
%changelog
* Thu Oct 11 2007 - schwab@suse.de
- Add support for lzma compressed archives.
* Sun Sep 30 2007 - rguenther@suse.de
- fix build with gcc43
* Mon Sep 03 2007 - dmueller@suse.de