RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm-4_5: rpm/ configure.ac macros.in rpm/rpmio/ LzmaDecode....

From: Per Øyvind Karlsen <pkarlsen@rpm5.org>
Date: Thu 06 Dec 2007 - 23:58:17 CET
Message-Id: <20071206225817.D37B834844D@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs                       Email:  pkarlsen@rpm5.org
  Module: rpm                              Date:   06-Dec-2007 23:58:17
  Branch: rpm-4_5                          Handle: 2007120622581601

  Modified files:           (Branch: rpm-4_5)
    rpm                     configure.ac macros.in
    rpm/rpmio               LzmaDecode.c LzmaDecode.h rpmio.c rpmmacro.h

  Log:
    Removes obsolete lzma utils stuff and fixes lzma payload compression usage.
    PR: LZMA support used obsolete version of utils. Payload definition didn't set compression level..
    Submitted by: Per Øyvind Karlsen
    
    Obtained from: Anders F Björklund (rpm 5.0 branch)

  Summary:
    Revision    Changes     Path
    2.70.2.21   +0  -1      rpm/configure.ac
    1.159.2.9   +2  -3      rpm/macros.in
    1.2.2.1     +1  -1      rpm/rpmio/LzmaDecode.c
    1.2.2.1     +1  -1      rpm/rpmio/LzmaDecode.h
    1.79.2.5    +18 -4      rpm/rpmio/rpmio.c
    2.39.2.1    +1  -1      rpm/rpmio/rpmmacro.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/configure.ac
  ============================================================================
  $ cvs diff -u -r2.70.2.20 -r2.70.2.21 configure.ac
  --- rpm/configure.ac	27 Sep 2007 07:47:42 -0000	2.70.2.20
  +++ rpm/configure.ac	6 Dec 2007 22:58:16 -0000	2.70.2.21
  @@ -264,7 +264,6 @@
   AC_PATH_PROG(__LDCONFIG, ldconfig, /sbin/ldconfig, $MYPATH)
   AC_PATH_PROG(__LUA, lua, %{_bindir}/lua, $MYPATH)
   AC_PATH_PROG(__LZMA, lzma, %{_bindir}/lzma, $MYPATH)
  -AC_PATH_PROG(__LZMASH, lzmash, %{_bindir}/lzmash, $MYPATH)
   AC_PATH_PROG(__LZOP, lzop, %{_bindir}/lzop, $MYPATH)
   AC_PATH_PROG(__MAKE, make, %{_bindir}/make, $MYPATH)
   AC_PATH_PROG(__MKDIR, mkdir, /bin/mkdir, $MYPATH)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/macros.in
  ============================================================================
  $ cvs diff -u -r1.159.2.8 -r1.159.2.9 macros.in
  --- rpm/macros.in	19 Aug 2007 22:19:40 -0000	1.159.2.8
  +++ rpm/macros.in	6 Dec 2007 22:58:16 -0000	1.159.2.9
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.159.2.8 2007/08/19 22:19:40 robert Exp $
  +# $Id: macros.in,v 1.159.2.9 2007/12/06 22:58:16 pkarlsen Exp $
   #
   # This is a global RPM configuration file. All changes made here will
   # be lost when the rpm package is upgraded. Any per-system configuration
  @@ -64,7 +64,6 @@
   %__lua			@__LUA@
   %__ln_s			@LN_S@
   %__lzma			@__LZMA@
  -%__lzmash		@__LZMASH@
   %__lzop			@__LZOP@
   %__make			@__MAKE@
   %make			%{__make}
  @@ -345,7 +344,7 @@
   #	Compression type and level for source/binary package payloads.
   #		"w9.gzdio"	gzip level 9 (default).
   #		"w9.bzdio"	bzip2 level 9.
  -#		"w9.lzdio"	lzma level 9.
  +#		"w5.lzdio"	lzma level 5. (most optimal compromise)
   #
   #%_source_payload	w9.gzdio
   #%_binary_payload	w9.gzdio
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/LzmaDecode.c
  ============================================================================
  $ cvs diff -u -r1.2 -r1.2.2.1 LzmaDecode.c
  --- rpm/rpmio/LzmaDecode.c	25 May 2007 18:34:14 -0000	1.2
  +++ rpm/rpmio/LzmaDecode.c	6 Dec 2007 22:58:17 -0000	1.2.2.1
  @@ -4,7 +4,7 @@
     LzmaDecode.c
     LZMA Decoder (optimized for Speed version)
     
  -  LZMA SDK 4.22 Copyright (c) 1999-2005 Igor Pavlov (2005-06-10)
  +  LZMA SDK 4.32 Copyright (c) 1999-2005 Igor Pavlov (2005-12-09)
     http://www.7-zip.org/
   
     LZMA SDK is licensed under two licenses:
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/LzmaDecode.h
  ============================================================================
  $ cvs diff -u -r1.2 -r1.2.2.1 LzmaDecode.h
  --- rpm/rpmio/LzmaDecode.h	25 May 2007 18:34:14 -0000	1.2
  +++ rpm/rpmio/LzmaDecode.h	6 Dec 2007 22:58:17 -0000	1.2.2.1
  @@ -2,7 +2,7 @@
     LzmaDecode.h
     LZMA Decoder interface
   
  -  LZMA SDK 4.21 Copyright (c) 1999-2005 Igor Pavlov (2005-06-08)
  +  LZMA SDK 4.32 Copyright (c) 1999-2005 Igor Pavlov (2005-12-09)
     http://www.7-zip.org/
   
     LZMA SDK is licensed under two licenses:
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmio.c
  ============================================================================
  $ cvs diff -u -r1.79.2.4 -r1.79.2.5 rpmio.c
  --- rpm/rpmio/rpmio.c	30 Jul 2007 02:59:55 -0000	1.79.2.4
  +++ rpm/rpmio/rpmio.c	6 Dec 2007 22:58:17 -0000	1.79.2.5
  @@ -2813,13 +2813,25 @@
       return rc;
   }
   
  -static FD_t lzdWriteOpen(int fdno, int fopen)
  +/*@-mods@*/     /* XXX hide rpmGlobalMacroContext mods for now. */
  +static FD_t lzdWriteOpen(int fdno, int fopen, const char * mode)
   	/*@globals fileSystem, internalState @*/
   	/*@modifies fileSystem, internalState @*/
   {
       int pid;
       int p[2];
       int xx;
  +    const char *lzma;
  +    char l[3];
  +    const char *level;
  +    
  +    if (isdigit(mode[1])) /* "w5" */
  +    {
  +	sprintf(l, "-%c", mode[1]);
  +	level = l;
  +    }
  +    else
  +        level = NULL;
   
       if (fdno < 0) return NULL;
       if (pipe(p) < 0) {
  @@ -2856,8 +2868,10 @@
           xx = dup2(fdno, 1);
           for (i = 3; i < 1024; i++)
   	    xx = close(i);
  -        if (execl("/usr/bin/lzma", "lzma", "e", "-si", "-so", NULL))
  +	lzma = rpmGetPath("%{?__lzma}%{!?__lzma:/usr/bin/lzma}", NULL);
  +	if (execl(lzma, "lzma", level, NULL))
               _exit(1);
  +	lzma = _free(lzma);
       }
       return NULL; /* warning */
   }
  @@ -2923,7 +2937,7 @@
           int fdno = open(path, O_WRONLY);
   
           if (fdno < 0) return NULL;
  -        return lzdWriteOpen(fdno, 1);
  +        return lzdWriteOpen(fdno, 1, mode);
       } else {
           int fdno = open(path, O_RDONLY);
   
  @@ -2946,7 +2960,7 @@
       fdSetFdno(fd, -1);		/* XXX skip the fdio close */
       if (fdno < 0) return NULL;
       if (fmode[0] == 'w') {
  -        return lzdWriteOpen(fdno, 0);
  +        return lzdWriteOpen(fdno, 0, fmode);
       } else {
           return lzdReadOpen(fdno, 0);
       }
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmmacro.h
  ============================================================================
  $ cvs diff -u -r2.39 -r2.39.2.1 rpmmacro.h
  --- rpm/rpmio/rpmmacro.h	25 May 2007 17:36:36 -0000	2.39
  +++ rpm/rpmio/rpmmacro.h	6 Dec 2007 22:58:17 -0000	2.39.2.1
  @@ -170,7 +170,7 @@
       COMPRESSED_BZIP2		= 2,	/*!< bzip2 can handle */
       COMPRESSED_ZIP		= 3,	/*!< unzip can handle */
       COMPRESSED_LZOP		= 4,	/*!< lzop can handle */
  -    COMPRESSED_LZMA		= 5	/*!< lzmash can handle */
  +    COMPRESSED_LZMA		= 5	/*!< lzma can handle */
   } rpmCompressedMagic;
   
   /**
  @@ .
Received on Thu Dec 6 23:58:17 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.