[Rpm-maint] rpm: support lzip compression for %setup (patch)
On Sat, 29 Nov 2008, Ralf Corsepius wrote: IMO, rpm should not adopt lzip support, unless lzip has proven to be a functional and viable tool. Many people think lzip has already proven that: http://lpar.ath0.com/2009/09/25/documentation-as-an-indicator-of-code-quality/ http://www.dragora.org/dokuwiki/doku.php?id=makepkg http://www.tuxradar.com/content/100-open-source-gems-part-2 http://packages.debian.org/sid/lzip Lzip is even used to distribute GNU packages on ftp.gnu.org. ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] rpm: support lzip compression for %setup (patch)
On Wednesday 2008-12-17 12:53, Panu Matilainen wrote: On Sat, 29 Nov 2008, Ralf Corsepius wrote: On Wed, 2008-11-26 at 22:55 +0100, Jan Engelhardt wrote: LZIP is the new stable lzma compression utility Pardon, but what is your legitimation to claim lzip to be the new stable lzma compression utility? No doubt, it is yet one another lzma compression utility. ( http://freshmeat.net/p/lzip/ ) with magic bytes and checksum. IMO, rpm should not adopt lzip support, unless lzip has proven to be a functional and viable tool. See also: http://lists.gnu.org/archive/html/automake/2008-11/msg00076.html FWIW: I share Bob F's perspective. One lesson the mess about the original lzma has tought, is to be more reluctant on adoption of such compression tools. Wrt compressors for use in rpm payloads, absolutely agreed. Build-time support for uncompressing patches + tarballs for whatever formats is quite different issue and not harmful, but I see little point in having support for a format that barely exists in the wild (AFAICT). There must be some kind of universal law that states that projects (I'm not even talking 'bout compressors) that have N% attention market share get even more attention no matter how 'bad' they are, and that projects having less than those N% get no attention at all because everybody claims no one uses it so what. That way, projects that are just recently nascent can hardly take off no matter how 'good' they may be. Otherwise we should add LHA, ARJ and all the other myriads of known (un)compressors too... These belong to the set of tools that faded away. LZH and ARJ were absolutely normal in the 90s and not having an uncompressor for them on your DOS system meant you suck, because, (at least ARJ) did often provide better compression than PKZIP. As time passed, tools with other distinct features arose, such as (as CRC was already there) archive repair metadata, or even higher compression ratios. ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] rpm: support lzip compression for %setup (patch)
On Sat, 29 Nov 2008, Ralf Corsepius wrote: On Wed, 2008-11-26 at 22:55 +0100, Jan Engelhardt wrote: LZIP is the new stable lzma compression utility Pardon, but what is your legitimation to claim lzip to be the new stable lzma compression utility? No doubt, it is yet one another lzma compression utility. ( http://freshmeat.net/p/lzip/ ) with magic bytes and checksum. IMO, rpm should not adopt lzip support, unless lzip has proven to be a functional and viable tool. See also: http://lists.gnu.org/archive/html/automake/2008-11/msg00076.html FWIW: I share Bob F's perspective. One lesson the mess about the original lzma has tought, is to be more reluctant on adoption of such compression tools. Wrt compressors for use in rpm payloads, absolutely agreed. Build-time support for uncompressing patches + tarballs for whatever formats is quite different issue and not harmful, but I see little point in having support for a format that barely exists in the wild (AFAICT). Otherwise we should add LHA, ARJ and all the other myriads of known (un)compressors too... - Panu - ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] rpm: support lzip compression for %setup (patch)
On Wed, 2008-11-26 at 22:55 +0100, Jan Engelhardt wrote: LZIP is the new stable lzma compression utility Pardon, but what is your legitimation to claim lzip to be the new stable lzma compression utility? No doubt, it is yet one another lzma compression utility. ( http://freshmeat.net/p/lzip/ ) with magic bytes and checksum. IMO, rpm should not adopt lzip support, unless lzip has proven to be a functional and viable tool. See also: http://lists.gnu.org/archive/html/automake/2008-11/msg00076.html FWIW: I share Bob F's perspective. One lesson the mess about the original lzma has tought, is to be more reluctant on adoption of such compression tools. Ralf ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] rpm: support lzip compression for %setup (patch)
LZIP is the new stable lzma compression utility ( http://freshmeat.net/p/lzip/ ) with magic bytes and checksum. === commit edacdf5e91e25393d6394e88d6d920b3b1cc0cac Author: Jan Engelhardt [EMAIL PROTECTED] Date: Wed Nov 26 22:50:50 2008 +0100 Support LZIP compression --- build/parsePrep.c |3 +++ configure.ac| 15 +++ macros.in |1 + rpmio/macro.c |3 +++ rpmio/rpmfileutil.c |3 +++ rpmio/rpmfileutil.h |3 ++- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/build/parsePrep.c b/build/parsePrep.c index 34906c8..cc1738d 100644 --- a/build/parsePrep.c +++ b/build/parsePrep.c @@ -218,6 +218,9 @@ static char *doUntar(rpmSpec spec, uint32_t c, int quietly) case COMPRESSED_LZMA: t = %{__lzma} -dc; break; + case COMPRESSED_LZIP: + t = %__lzip -dc; + break; } zipper = rpmGetPath(t, NULL); if (needtar) { diff --git a/configure.ac b/configure.ac index 6779968..36dc970 100644 --- a/configure.ac +++ b/configure.ac @@ -155,6 +155,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([__LZIP], [lzip], [/usr/bin/lzip], [$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) @@ -302,18 +303,8 @@ AM_CONDITIONAL(LIBDWARF,[test $WITH_LIBDWARF = yes]) # We need nss.h from NSS which needs nspr.h. Unfortunately both glibc and NSS # have a header named nss.h... so make extra check for NSS's sechash.h # which we use too and hopefully is slightly more unique to NSS. -WITH_NSS_INCLUDE= -WITH_NSS_LIB= -AC_CHECK_HEADERS([nspr.h nss.h sechash.h], [], [ - AC_MSG_ERROR([missing required NSPR / NSS header]) -]) -AC_CHECK_LIB(nss3, NSS_NoDB_Init, [ - WITH_NSS_LIB=-lnss3 -], [ - AC_MSG_ERROR([missing required NSS library 'nss3']) -]) -AC_SUBST(WITH_NSS_INCLUDE) -AC_SUBST(WITH_NSS_LIB) +PKG_CHECK_MODULES([libnspr], [nspr]) +PKG_CHECK_MODULES([libnss], [nss]) #= # Check for magic library. diff --git a/macros.in b/macros.in index c3c5025..cac51b1 100644 --- a/macros.in +++ b/macros.in @@ -47,6 +47,7 @@ %__install @__INSTALL@ %__ln_s@LN_S@ %__lzma@__LZMA@ +%__lzip@__LZIP@ %__make@__MAKE@ %__mkdir @__MKDIR@ %__mkdir_p @MKDIR_P@ diff --git a/rpmio/macro.c b/rpmio/macro.c index afe41cb..f0fe9c1 100644 --- a/rpmio/macro.c +++ b/rpmio/macro.c @@ -981,6 +981,9 @@ doFoo(MacroBuf mb, int negate, const char * f, size_t fn, case COMPRESSED_LZMA: sprintf(be, %%__lzma -dc %s, b); break; +case COMPRESSED_LZIP: + sprintf(be, %%__lzip -dc %s, b); + break; } b = be; } else if (STREQ(S, f, fn)) { diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c index d0f4646..b2c22b4 100644 --- a/rpmio/rpmfileutil.c +++ b/rpmio/rpmfileutil.c @@ -360,6 +360,9 @@ int rpmFileIsCompressed(const char * file, rpmCompressedMagic * compressed) (magic[4] == 0x5a) (magic[5] == 0x00)) { /* new style lzma with magic */ *compressed = COMPRESSED_LZMA; +} else if (magic[0] == 'L' magic[1] == 'Z' +magic[2] == 'I' magic[3] == 'P') { +*compressed = COMPRESSED_LZIP; } else if (((magic[0] == 0037) (magic[1] == 0213)) || /* gzip */ ((magic[0] == 0037) (magic[1] == 0236)) || /* old gzip */ ((magic[0] == 0037) (magic[1] == 0036)) || /* pack */ diff --git a/rpmio/rpmfileutil.h b/rpmio/rpmfileutil.h index 471509e..74f10ff 100644 --- a/rpmio/rpmfileutil.h +++ b/rpmio/rpmfileutil.h @@ -18,7 +18,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_LZIP= 5, } rpmCompressedMagic; /** \ingroup rpmfileutil ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint