[CVS] RPM: rpm-5_1: rpm/ CHANGES Makefile.am autogen.sh rpm/build/ pac...

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: xar rpm  Date:   16-Mar-2009 11:32:06
  Branch: rpm-5_1  Handle: 2009031610320303

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES Makefile.am autogen.sh configure.ac
devtool.conf macros.in
rpm/build   pack.c parsePrep.c
rpm/lib psm.c rpmds.c
rpm/miscMakefile.am librpmmisc.vers
rpm/rpmio   Makefile.am macro.c rpmmacro.h
xar configure.ac
xar/include xar.h.in
xar/lib lzmaxar.c
xar/src xar.c

  Log:
- jbj: xzdio: backport the remaining xzdio contexxtual changes.
worksforme.

  Summary:
RevisionChanges Path
1.2288.2.194+1  -0  rpm/CHANGES
2.215.2.8   +3  -1  rpm/Makefile.am
2.90.2.7+3  -0  rpm/autogen.sh
2.291.2.2   +8  -0  rpm/build/pack.c
2.117.2.1   +3  -0  rpm/build/parsePrep.c
2.289.2.18  +10 -4  rpm/configure.ac
2.205.2.24  +21 -51 rpm/devtool.conf
2.298.2.9   +0  -4  rpm/lib/psm.c
2.94.2.7+7  -0  rpm/lib/rpmds.c
1.241.2.11  +2  -1  rpm/macros.in
1.32.4.4+2  -0  rpm/misc/Makefile.am
1.7.4.4 +70 -1  rpm/misc/librpmmisc.vers
1.162.2.14  +1  -0  rpm/rpmio/Makefile.am
2.193.2.8   +17 -6  rpm/rpmio/macro.c
2.48.2.2+2  -1  rpm/rpmio/rpmmacro.h
1.16.2.1+15 -3  xar/configure.ac
1.8.4.1 +1  -0  xar/include/xar.h.in
1.4.4.2 +162 -29xar/lib/lzmaxar.c
1.12.4.1+42 -7  xar/src/xar.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.193 -r1.2288.2.194 CHANGES
  --- rpm/CHANGES   16 Mar 2009 01:09:28 -  1.2288.2.193
  +++ rpm/CHANGES   16 Mar 2009 10:32:03 -  1.2288.2.194
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: xzdio: backport the remaining xzdio contexxtual changes. 
worksforme.
   - jbj: xzdio: backport XZ changes from HEAD.
   - jbj: rename lzdio.c - xzdio.c.
   
  @@ .
  patch -p0 '@@ .'
  Index: rpm/Makefile.am
  
  $ cvs diff -u -r2.215.2.7 -r2.215.2.8 Makefile.am
  --- rpm/Makefile.am   17 Jan 2009 14:31:25 -  2.215.2.7
  +++ rpm/Makefile.am   16 Mar 2009 10:32:03 -  2.215.2.8
  @@ -56,6 +56,7 @@
@WITH_FILE_SUBDIR@ \
@WITH_PCRE_SUBDIR@ \
@WITH_XAR_SUBDIR@ \
  + @WITH_XZ_SUBDIR@ \
misc \
rpmio \
rpmdb \
  @@ -83,7 +84,8 @@
@WITH_ZLIB_CPPFLAGS@ \
@WITH_LUA_CPPFLAGS@ \
@WITH_FILE_CPPFLAGS@ \
  - @WITH_XAR_CPPFLAGS@
  + @WITH_XAR_CPPFLAGS@ \
  + @WITH_XZ_CPPFLAGS@
   
   myLDADD = \
$(top_builddir)/build/librpmbuild.la \
  @@ .
  patch -p0 '@@ .'
  Index: rpm/autogen.sh
  
  $ cvs diff -u -r2.90.2.6 -r2.90.2.7 autogen.sh
  --- rpm/autogen.sh17 Jan 2009 14:31:25 -  2.90.2.6
  +++ rpm/autogen.sh16 Mar 2009 10:32:03 -  2.90.2.7
  @@ -43,6 +43,9 @@
   echo === pcre
   ( cd pcre  sh ./autogen.sh --noconfigure $@ )
   echo === pcre
  +echo === xz
  +( cd xz  sh ./autogen.sh --noconfigure $@ )
  +echo === xz
   echo === file
   ( cd file  sh ./autogen.sh --noconfigure $@ )
   echo === file
  @@ .
  patch -p0 '@@ .'
  Index: rpm/build/pack.c
  
  $ cvs diff -u -r2.291.2.1 -r2.291.2.2 pack.c
  --- rpm/build/pack.c  27 May 2008 13:43:05 -  2.291.2.1
  +++ rpm/build/pack.c  16 Mar 2009 10:32:04 -  2.291.2.2
  @@ -658,6 +658,14 @@
he-c = 1;
xx = headerPut(h, he, 0);
(void) rpmlibNeedsFeature(h, PayloadIsLzma, 4.4.6-1);
  + } else if (s[1] == 'x'  s[2] == 'z') {
  + he-tag = RPMTAG_PAYLOADCOMPRESSOR;
  + he-t = RPM_STRING_TYPE;
  + he-p.str = xstrdup(xz);
  + he-c = 1;
  + xx = headerPut(h, he, 0);
  + he-p.ptr = _free(he-p.ptr);
  + (void) rpmlibNeedsFeature(h, PayloadIsXz, 5.2-1);
}
strcpy(buf, rpmio_flags);
buf[s - rpmio_flags] = '\0';
  @@ .
  patch -p0 '@@ .'
  Index: rpm/build/parsePrep.c
  
  $ cvs diff -u -r2.117 -r2.117.2.1 parsePrep.c
  --- rpm/build/parsePrep.c 2 Apr 2008 21:03:27 -   2.117
  

[CVS] RPM: rpm-5_1: rpm/ devtool.conf

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 11:34:22
  Branch: rpm-5_1  Handle: 2009031610342200

  Modified files:   (Branch: rpm-5_1)
rpm devtool.conf

  Log:
- jbj: xz: create a rpm-5_1 branch tag.

  Summary:
RevisionChanges Path
2.205.2.25  +1  -1  rpm/devtool.conf
  

  patch -p0 '@@ .'
  Index: rpm/devtool.conf
  
  $ cvs diff -u -r2.205.2.24 -r2.205.2.25 devtool.conf
  --- rpm/devtool.conf  16 Mar 2009 10:32:03 -  2.205.2.24
  +++ rpm/devtool.conf  16 Mar 2009 10:34:22 -  2.205.2.25
  @@ -8,7 +8,7 @@
   MODULE_TAG_LUA=rpm-5_1
   MODULE_TAG_FILE=rpm-5_1
   MODULE_TAG_XAR=rpm-5_1
  -MODULE_TAG_XZ=
  +MODULE_TAG_XZ=rpm-5_1
   MODULE_TAG_PCRE=rpm-5_1
   
   %checkout
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/rpmio/ Makefile.am bzdio.c rpmbz....

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 11:54:18
  Branch: rpm-5_1  Handle: 2009031610541701

  Added files:  (Branch: rpm-5_1)
rpm/rpmio   rpmbz.h
  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/rpmio   Makefile.am bzdio.c

  Log:
- jbj: bzdio: handle multiblock compressed payloads transparently.

  Summary:
RevisionChanges Path
1.2288.2.195+1  -0  rpm/CHANGES
1.162.2.15  +1  -1  rpm/rpmio/Makefile.am
2.2.2.4 +344 -60rpm/rpmio/bzdio.c
1.3.2.2 +288 -0 rpm/rpmio/rpmbz.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.194 -r1.2288.2.195 CHANGES
  --- rpm/CHANGES   16 Mar 2009 10:32:03 -  1.2288.2.194
  +++ rpm/CHANGES   16 Mar 2009 10:54:17 -  1.2288.2.195
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: bzdio: handle multiblock compressed payloads transparently.
   - jbj: xzdio: backport the remaining xzdio contexxtual changes. 
worksforme.
   - jbj: xzdio: backport XZ changes from HEAD.
   - jbj: rename lzdio.c - xzdio.c.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.162.2.14 -r1.162.2.15 Makefile.am
  --- rpm/rpmio/Makefile.am 16 Mar 2009 10:32:05 -  1.162.2.14
  +++ rpm/rpmio/Makefile.am 16 Mar 2009 10:54:18 -  1.162.2.15
  @@ -64,7 +64,7 @@
ar.h cpio.h crc.h fnmatch.h glob.h iosm.h \
md2.h md4.h poptIO.h rmd128.h rmd160.h rmd256.h rmd320.h sha224.h \
salsa10.h salsa20.h tar.h tiger.h \
  - rpmhook.h rpmio_internal.h rpmlua.h
  + rpmhook.h rpmio_internal.h rpmlua.h rpmbz.h
   
   usrlibdir = $(libdir)
   usrlib_LTLIBRARIES = librpmio.la
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/bzdio.c
  
  $ cvs diff -u -r2.2.2.3 -r2.2.2.4 bzdio.c
  --- rpm/rpmio/bzdio.c 11 Jan 2009 03:18:33 -  2.2.2.3
  +++ rpm/rpmio/bzdio.c 16 Mar 2009 10:54:18 -  2.2.2.4
  @@ -10,7 +10,8 @@
   
   #if defined(HAVE_BZLIB_H)
   
  -#include bzlib.h
  +#define  _RPMBZ_INTERNAL
  +#include rpmbz.h
   
   #include debug.h
   
  @@ -18,10 +19,297 @@
   
   #define  BZDONLY(fd) assert(fdGetIo(fd) == bzdio)
   
  -/* === */
  +static const char * rpmbzStrerror(rpmbz bz)
  + /*...@*/
  +{
  +return BZ2_bzerror(bz-bzfile, bz-bzerr);
  +}
  +
  +static void rpmbzClose(rpmbz bz, int abort, /*...@null@*/ const char ** 
errmsg)
  + /*...@modifies bz, *errmsg @*/
  +{
  +if (bz-bzfile != NULL) {
  + if (bz-omode == O_RDONLY)
  + BZ2_bzReadClose(bz-bzerr, bz-bzfile);
  + else
  + BZ2_bzWriteClose(bz-bzerr, bz-bzfile, abort,
  + bz-nbytes_in, bz-nbytes_out);
  +/*...@-usereleased@*//* XXX does bz-bzfile persist after *Close? */
  + if (bz-bzerr != BZ_OK  errmsg)
  + *errmsg = rpmbzStrerror(bz);
  +/*...@=usereleased@*/
  +}
  +bz-bzfile = NULL;
  +}
  +
  +/*...@only@*/ /*...@null@*/
  +static rpmbz rpmbzFree(/*...@only@*/ rpmbz bz, int abort)
  + /*...@globals fileSystem @*/
  + /*...@modifies bz, fileSystem @*/
  +{
  +rpmbzClose(bz, abort, NULL);
  +if (bz-fp != NULL) {
  + (void) fclose(bz-fp);
  + bz-fp = NULL;
  +}
  +return rpmbzFini(bz);
  +}
  +
  +/*...@only@*/
  +static rpmbz rpmbzNew(const char * path, const char * fmode, int fdno)
  + /*...@globals fileSystem @*/
  + /*...@modifies fileSystem @*/
  +{
  +rpmbz bz;
  +int level = -1;  /* XXX use _bzdB default */
  +mode_t omode;
  +int small = -1;  /* XXX use _bzdS default */
  +int verbosity = -1;  /* XXX use _bzdV default */
  +const char * s = fmode;
  +char stdio[20];
  +char *t = stdio;
  +char *te = t + sizeof(stdio) - 2;
  +int c;
  +
  +assert(fmode != NULL);   /* XXX return NULL instead? */
  +
  +switch ((c = *s++)) {
  +case 'a':
  +case 'w':
  + omode = O_WRONLY;
  + *t++ = (char)c;
  + break;
  +case 'r':
  + omode = O_RDONLY;
  + *t++ = (char)c;
  + break;
  +}
  + 
  +while ((c = *s++) != 0) {
  +switch (c) {
  +case '.':
  + /*...@switchbreak@*/ break;
  +case '+':
  +case 'x':
  +case 'm':
  +case 'c':
  +case 'b':
  + if (t  

[CVS] RPM: rpm-5_1: rpm/ devtool.conf

2009-03-16 Thread Anders F. Bj�rklund
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Anders F. Björklund
  Root:   /v/rpm/cvs   Email:  a...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 12:14:33
  Branch: rpm-5_1  Handle: 2009031611143300

  Modified files:   (Branch: rpm-5_1)
rpm devtool.conf

  Log:
macosx: update target comments

  Summary:
RevisionChanges Path
2.205.2.26  +2  -2  rpm/devtool.conf
  

  patch -p0 '@@ .'
  Index: rpm/devtool.conf
  
  $ cvs diff -u -r2.205.2.25 -r2.205.2.26 devtool.conf
  --- rpm/devtool.conf  16 Mar 2009 10:34:22 -  2.205.2.25
  +++ rpm/devtool.conf  16 Mar 2009 11:14:33 -  2.205.2.26
  @@ -1206,8 +1206,8 @@
   ##  This also requires --disable-dependency-tracking, since it doesn't
   ##  work with multiple -arch flags (see Apple's Technical Note TN2137)
   ##
  -##  These libraries are being built internally: db, lua, file, xar
  -##  These are statically linked: lzma, neon, beecrypt, sqlite, popt
  +##  These libraries are being built internally: db, lua, file, xar, xz
  +##  These are statically linked: neon, beecrypt, sqlite, popt, pcre, uuid
   ##  (building popt statically requires that the required popt.h header
   ##  is included within the rpm headers, so that it can be found later)
   ##
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ devtool.conf

2009-03-16 Thread Anders F. Bj�rklund
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Anders F. Björklund
  Root:   /v/rpm/cvs   Email:  a...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 12:15:11
  Branch: rpm-5_1  Handle: 2009031611151100

  Modified files:   (Branch: rpm-5_1)
rpm devtool.conf

  Log:
macosx: disable assembler for xz

  Summary:
RevisionChanges Path
2.205.2.27  +1  -0  rpm/devtool.conf
  

  patch -p0 '@@ .'
  Index: rpm/devtool.conf
  
  $ cvs diff -u -r2.205.2.26 -r2.205.2.27 devtool.conf
  --- rpm/devtool.conf  16 Mar 2009 11:14:33 -  2.205.2.26
  +++ rpm/devtool.conf  16 Mar 2009 11:15:11 -  2.205.2.27
  @@ -1629,6 +1629,7 @@
   --mandir=/usr/local/share/man \
   --infodir=/usr/local/share/info \
   --disable-dependency-tracking \
  +--disable-assembler \
   --program-prefix= \
   --disable-aio \
   --with-glob \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/rpmio/ Makefile.am

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 12:57:14
  Branch: rpm-5_1  Handle: 2009031611571400

  Modified files:   (Branch: rpm-5_1)
rpm/rpmio   Makefile.am

  Log:
- jbj: fix: adding missing escaping in AM_CPPFLAGS.

  Summary:
RevisionChanges Path
1.162.2.16  +1  -1  rpm/rpmio/Makefile.am
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.162.2.15 -r1.162.2.16 Makefile.am
  --- rpm/rpmio/Makefile.am 16 Mar 2009 10:54:18 -  1.162.2.15
  +++ rpm/rpmio/Makefile.am 16 Mar 2009 11:57:14 -  1.162.2.16
  @@ -40,7 +40,7 @@
@WITH_LUA_CPPFLAGS@ \
@WITH_FILE_CPPFLAGS@ \
@WITH_PCRE_CPPFLAGS@ \
  - @WITH_XAR_CPPFLAGS@
  + @WITH_XAR_CPPFLAGS@ \
@WITH_XZ_CPPFLAGS@
   
   RPMIO_LDADD_COMMON = \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ INSTALL

2009-03-16 Thread Anders F. Bj�rklund
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Anders F. Björklund
  Root:   /v/rpm/cvs   Email:  a...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 14:15:20
  Branch: HEAD Handle: 2009031613152000

  Modified files:
rpm INSTALL

  Log:
update XZ Utils requirements to match

  Summary:
RevisionChanges Path
2.117   +1  -1  rpm/INSTALL
  

  patch -p0 '@@ .'
  Index: rpm/INSTALL
  
  $ cvs diff -u -r2.116 -r2.117 INSTALL
  --- rpm/INSTALL   6 Mar 2009 19:17:43 -   2.116
  +++ rpm/INSTALL   16 Mar 2009 13:15:20 -  2.117
  @@ -38,7 +38,7 @@
   Lua [2] optional  5.1 5.1.4   http://www.lua.org/
   ZLiboptional  1.2 1.2.3   http://www.zlib.net/
   Bzip2   optional  1.0 1.0.5   http://www.bzip.org/
  -XZ Utils[3] optional  4.999.3 4.999.8 http://tukaani.org/xz/
  +XZ Utils[3] optional  4.999.8 4.999.8 http://tukaani.org/xz/
   File/magic  [4] optional  4.005.00ftp://ftp.astron.com/pub/file/
   GNU gettext optional  0.160.17
http://www.gnu.org/software/gettext/
   GNU iconv   optional  1.111.11
http://www.gnu.org/software/libiconv/
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ INSTALL

2009-03-16 Thread Anders F. Bj�rklund
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Anders F. Björklund
  Root:   /v/rpm/cvs   Email:  a...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 14:16:41
  Branch: rpm-5_1  Handle: 2009031613164100

  Modified files:   (Branch: rpm-5_1)
rpm INSTALL

  Log:
update XZ Utils requirements to match

  Summary:
RevisionChanges Path
2.93.2.8+3  -3  rpm/INSTALL
  

  patch -p0 '@@ .'
  Index: rpm/INSTALL
  
  $ cvs diff -u -r2.93.2.7 -r2.93.2.8 INSTALL
  --- rpm/INSTALL   17 Jan 2009 18:51:26 -  2.93.2.7
  +++ rpm/INSTALL   16 Mar 2009 13:16:41 -  2.93.2.8
  @@ -38,7 +38,7 @@
   Lua [2] optional  5.1 5.1.4   http://www.lua.org/
   ZLiboptional  1.2 1.2.3   http://www.zlib.net/
   Bzip2   optional  1.0 1.0.5   http://www.bzip.org/
  -LZMA Utils  [3] optional  4.42.2  4.999.3 http://tukaani.org/lzma/
  +XZ Utils[3] optional  4.999.8 4.999.8 http://tukaani.org/xz/
   File/magic  [4] optional  4.0 4.24ftp://ftp.astron.com/pub/file/
   GNU gettext optional  0.160.17
http://www.gnu.org/software/gettext/
   GNU iconv   optional  1.111.11
http://www.gnu.org/software/libiconv/
  @@ -63,8 +63,8 @@
  Building RPM against stock external Lua not recommended
  as it reduces its RPM-specific functionality.
   
  -[3] lzma:  Modified LZMA Utils copy bundled with RPM.
  -   Building RPM against stock external LZMA currently still not 
recommended.
  +[3] xz:Modified XZ Utils copy bundled with RPM.
  +   Building RPM against stock external XZ currently still not 
recommended.
   
   [4] file:  Unmodified File/magic copy bundled with RPM for convenience 
reasons.
  Building RPM against stock external File/magic supported, too.
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ rpm.spec.in

2009-03-16 Thread Anders F. Bj�rklund
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Anders F. Björklund
  Root:   /v/rpm/cvs   Email:  a...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 14:26:20
  Branch: HEAD Handle: 2009031613262000

  Modified files:
rpm rpm.spec.in

  Log:
change lzma to xz, require 4.999.8beta

  Summary:
RevisionChanges Path
2.456   +7  -7  rpm/rpm.spec.in
  

  patch -p0 '@@ .'
  Index: rpm/rpm.spec.in
  
  $ cvs diff -u -r2.455 -r2.456 rpm.spec.in
  --- rpm/rpm.spec.in   13 Mar 2009 15:09:43 -  2.455
  +++ rpm/rpm.spec.in   16 Mar 2009 13:26:20 -  2.456
  @@ -2,7 +2,7 @@
   %define  with_python_version @python_vers...@%{nil}
   %define  with_perl_subpackage@with_perl_subpack...@%{nil}
   %define  with_bzip2  @with_bz...@%{nil}
  -%define  with_lzma   @with_l...@%{nil}
  +%define  with_xz @with...@%{nil}
   %define  with_apidocs@with_apid...@%{nil}
   
   %{!?_usrlibrpm:%global _usrlibrpm @usrlib...@}
  @@ -39,8 +39,8 @@
   %if %{with_bzip2} == yes
   BuildRequires: bzip2-devel = 1.0
   %endif
  -%if %{with_lzma} == yes
  -BuildRequires: lzma-utils-devel = 4.999.3
  +%if %{with_xz} == yes
  +BuildRequires: xz-devel = 4.999.8
   %endif
   %if %{with_apidocs} == 1
   BuildRequires: doxygen graphviz
  @@ -162,10 +162,10 @@
   WITH_BZIP2=--without-bzip2
   %endif
   
  -%if %{with_lzma} == yes
  -WITH_LZMA=--with-lzma=%{_prefix}
  +%if %{with_xz} == yes
  +WITH_XZ=--with-xz=%{_prefix}
   %else
  -WITH_LZMA=--without-lzma
  +WITH_XZ=--without-xz
   %endif
   
   %if %{with_python_subpackage}
  @@ -198,7 +198,7 @@
   --with-neon=external \
   --with-xar=internal \
$WITH_BZIP2 \
  - $WITH_LZMA \
  + $WITH_XZ \
   --with-popt=external \
   --with-keyutils=external \
   --with-libelf \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/rpmio/ rpmzlog.c rpmzlog.h

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 14:36:25
  Branch: HEAD Handle: 2009031613362401

  Modified files:
rpm CHANGES
rpm/rpmio   rpmzlog.c rpmzlog.h

  Log:
- jbj: zlog: rework trace log with a refcount mutex instead.

  Summary:
RevisionChanges Path
1.2821  +1  -0  rpm/CHANGES
2.4 +82 -41 rpm/rpmio/rpmzlog.c
2.3 +15 -14 rpm/rpmio/rpmzlog.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2820 -r1.2821 CHANGES
  --- rpm/CHANGES   14 Mar 2009 23:46:20 -  1.2820
  +++ rpm/CHANGES   16 Mar 2009 13:36:24 -  1.2821
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- jbj: zlog: rework trace log with a refcount mutex instead.
   - proyvind: do lazy mkdir of %_topdir, %_builddir, %_rpmdir  %_srcrpmdir
when doing '--rebuild' so that it should mostly work easily for user.
   - proyvind: make it possible to set preferred build architectures when 
using
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmzlog.c
  
  $ cvs diff -u -r2.3 -r2.4 rpmzlog.c
  --- rpm/rpmio/rpmzlog.c   7 Mar 2009 20:27:10 -   2.3
  +++ rpm/rpmio/rpmzlog.c   16 Mar 2009 13:36:25 -  2.4
  @@ -47,6 +47,8 @@
   
   #include debug.h
   
  +static int _rpmzlog_debug = 0;
  +
   /*...@access rpmzMsg @*/
   /*...@access rpmzLog @*/
   
  @@ -55,27 +57,36 @@
   /* maximum log entry length */
   #define _RPMZLOG_MAXMSG 256
   
  -rpmzLog rpmzLogInit(struct timeval *tv)
  +rpmzLog rpmzLogLink(rpmzLog zlog)
   {
  -rpmzLog zlog = xcalloc(1, sizeof(*zlog));
  +long nrefs;
   
  -if (zlog-msg_tail == NULL) {
  -/*...@-mustfreeonly@*/
  - zlog-msg_lock = yarnNewLock(0);
  - zlog-msg_head = NULL;
  - zlog-msg_tail = zlog-msg_head;
  -/*...@=mustfreeonly@*/
  - /* starting time for log entries */
  - if (tv != NULL) {
  -/*...@-assignexpose@*/
  - zlog-start = *tv;  /* structure assignment */
  -/*...@=assignexpose@*/
  - } else
  - (void) gettimeofday(zlog-start, NULL);
  -}
  +if (zlog == NULL)
  + return NULL;
  +yarnPossess(zlog-use);
  +nrefs = yarnPeekLock(zlog-use);
  +if (_rpmzlog_debug)
  +fprintf(stderr, ++ zlog %p[%ld]\n, zlog, nrefs+1);
  +yarnTwist(zlog-use, BY, 1);
   return zlog;
   }
   
  +rpmzLog rpmzLogNew(struct timeval *tv)
  +{
  +rpmzLog zlog = xcalloc(1, sizeof(*zlog));
  +
  +zlog-use = yarnNewLock(0);
  +zlog-msg_head = NULL;
  +zlog-msg_tail = zlog-msg_head;
  +
  +/* starting time for log entries */
  +if (tv != NULL)
  + zlog-start = *tv;  /* structure assignment */
  +else
  + (void) gettimeofday(zlog-start, NULL);
  +return rpmzLogLink(zlog);
  +}
  +
   void rpmzLogAdd(rpmzLog zlog, char *fmt, ...)
   {
   rpmzMsg me;
  @@ -84,7 +95,8 @@
   char msg[_RPMZLOG_MAXMSG];
   int xx;
   
  -if (zlog == NULL) return;
  +if (zlog == NULL)
  + return;
   
   xx = gettimeofday(now, NULL);
   me = xmalloc(sizeof(*me));
  @@ -101,34 +113,41 @@
   /*...@-mustfreeonly@*/
   me-next = NULL;
   /*...@=mustfreeonly@*/
  -assert(zlog-msg_lock != NULL);
  -yarnPossess(zlog-msg_lock);
  +
  +assert(zlog-use != NULL);
  +yarnPossess(zlog-use);
   *zlog-msg_tail = me;
   zlog-msg_tail = me-next;
  -yarnTwist(zlog-msg_lock, BY, 1);
  +zlog-msg_count++;
  +yarnRelease(zlog-use);
   }
   
  -int rpmzMsgShow(rpmzLog zlog, FILE * fp)
  +/**
  + *  * Pull entry from trace log and print it, return false if empty.
  + *   */
  +static int rpmzMsgShow(/*...@null@*/ rpmzLog zlog, /*...@null@*/ FILE * fp)
  +/*...@globals fileSystem, internalState @*/
  +/*...@modifies zlog, *fp, fileSystem, internalState @*/
   {
   rpmzMsg me;
   struct timeval diff;
  -int xx;
   
  -if (zlog == NULL || zlog-msg_tail == NULL)
  +if (zlog == NULL)
return 0;
  -
   if (fp == NULL)
fp = stderr;
  -yarnPossess(zlog-msg_lock);
  -me = zlog-msg_head;
  -if (me == NULL) {
  - yarnRelease(zlog-msg_lock);
  +
  +yarnPossess(zlog-use);
  +if (zlog-msg_tail == NULL || (me = zlog-msg_head) == NULL) {
  + yarnRelease(zlog-use);
return 0;
   }
   zlog-msg_head = me-next;
   if (me-next == NULL)
zlog-msg_tail = zlog-msg_head;
  -yarnTwist(zlog-msg_lock, BY, -1);
  +

[CVS] RPM: rpm-5_1: rpm/ devtool.conf

2009-03-16 Thread Anders F. Bj�rklund
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Anders F. Björklund
  Root:   /v/rpm/cvs   Email:  a...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 15:02:40
  Branch: rpm-5_1  Handle: 2009031614024000

  Modified files:   (Branch: rpm-5_1)
rpm devtool.conf

  Log:
macosx: add libs path and cleanup root

  Summary:
RevisionChanges Path
2.205.2.28  +16 -0  rpm/devtool.conf
  

  patch -p0 '@@ .'
  Index: rpm/devtool.conf
  
  $ cvs diff -u -r2.205.2.27 -r2.205.2.28 devtool.conf
  --- rpm/devtool.conf  16 Mar 2009 11:15:11 -  2.205.2.27
  +++ rpm/devtool.conf  16 Mar 2009 14:02:40 -  2.205.2.28
  @@ -1614,6 +1614,7 @@
   LDFLAGS=$UNIVERSAL_LDFLAGS -Wl,-search_paths_first # static
   LIBS=$LIBS -lssl -lcrypto # shameless workaround for Neon
   LDFLAGS=$LDFLAGS -L`pwd`/xar/lib/.libs # Xar linking hack
  +LDFLAGS=$LDFLAGS -L`pwd`/xz/src/liblzma/.libs # LZMA hack
   export CPP
   export CC
   export CXX
  @@ -1789,6 +1790,21 @@
   rm -f /tmp/rpm-root/usr/local/lib/libxar.a
   rm -f /tmp/rpm-root/usr/local/lib/libxar.la
   
  +# remove xz binaries
  +rm -f /tmp/rpm-root/usr/local/bin/*lz*
  +rm -f /tmp/rpm-root/usr/local/bin/*xz*
  +rm -f /tmp/rpm-root/usr/local/share/man/man1/*lz*.1
  +rm -f /tmp/rpm-root/usr/local/share/man/man1/*xz*.1
  +rm -f /tmp/rpm-root/usr/local/include/lzma.h
  +rm -f -r /tmp/rpm-root/usr/local/include/lzma
  +rm -f /tmp/rpm-root/usr/local/lib/liblzma.0.dylib
  +rm -f /tmp/rpm-root/usr/local/lib/liblzma.1.dylib
  +rm -f /tmp/rpm-root/usr/local/lib/liblzma.dylib
  +rm -f /tmp/rpm-root/usr/local/lib/liblzma.a
  +rm -f /tmp/rpm-root/usr/local/lib/liblzma.la
  +rm -f /tmp/rpm-root/usr/local/lib/pkgconfig/lzma.pc
  +rm -f /tmp/rpm-root/usr/local/lib/pkgconfig/liblzma.pc
  +
   # strip debugging symbols, and remove libtool files (.la)
   strip -S /tmp/rpm-root/usr/local/bin/rpm*
   strip -S /tmp/rpm-root/usr/local/lib/rpm/rpmcmp
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/rpmio/ librpmio.vers rpmpigz.c

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 15:25:48
  Branch: HEAD Handle: 2009031614254800

  Modified files:
rpm/rpmio   librpmio.vers rpmpigz.c

  Log:
- jbj: expose the new symbols in the loader map, use in rpmpigz.

  Summary:
RevisionChanges Path
2.93+2  -2  rpm/rpmio/librpmio.vers
1.68+1  -1  rpm/rpmio/rpmpigz.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.92 -r2.93 librpmio.vers
  --- rpm/rpmio/librpmio.vers   15 Mar 2009 20:34:45 -  2.92
  +++ rpm/rpmio/librpmio.vers   16 Mar 2009 14:25:48 -  2.93
  @@ -422,8 +422,8 @@
   rpmzLogAdd;
   rpmzLogDump;
   rpmzLogFree;
  -rpmzLogInit;
  -rpmzMsgShow;
  +rpmzLogLink;
  +rpmzLogNew;
   _rpmzq_debug;
   rpmbzCompressBlock;
   _rpmzq;
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmpigz.c
  
  $ cvs diff -u -r1.67 -r1.68 rpmpigz.c
  --- rpm/rpmio/rpmpigz.c   16 Mar 2009 00:04:29 -  1.67
  +++ rpm/rpmio/rpmpigz.c   16 Mar 2009 14:25:48 -  1.68
  @@ -3307,7 +3307,7 @@
   /* XXX add POPT_ARG_TIMEOFDAY oneshot? */
   gettimeofday(zq-start, NULL);  /* starting time for log entries */
   #if defined(DEBUG) || defined(__LCLINT__)
  -zq-zlog = rpmzLogInit(zq-start);/* initialize logging */
  +zq-zlog = rpmzLogNew(zq-start);/* initialize logging */
   #endif
   
   zq-_zh = xcalloc(1, sizeof(*zq-_zh));  /* XXX do lazily */
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/rpmio/ Makefile.am librpmio.vers ...

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 15:59:58
  Branch: rpm-5_1  Handle: 2009031614595701

  Added files:  (Branch: rpm-5_1)
rpm/rpmio   rpmzlog.c rpmzlog.h yarn.c yarn.h
  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/rpmio   Makefile.am librpmio.vers

  Log:
- jbj: zlog: backport from HEAD.
- jbj: yarn: backport from HEAD (likely --with-pthreads needed todo++).

  Summary:
RevisionChanges Path
1.2288.2.196+2  -0  rpm/CHANGES
1.162.2.17  +4  -4  rpm/rpmio/Makefile.am
2.63.2.8+19 -0  rpm/rpmio/librpmio.vers
2.4.2.2 +217 -0 rpm/rpmio/rpmzlog.c
2.3.2.2 +84 -0  rpm/rpmio/rpmzlog.h
2.7.2.2 +569 -0 rpm/rpmio/yarn.c
2.3.2.2 +172 -0 rpm/rpmio/yarn.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.195 -r1.2288.2.196 CHANGES
  --- rpm/CHANGES   16 Mar 2009 10:54:17 -  1.2288.2.195
  +++ rpm/CHANGES   16 Mar 2009 14:59:57 -  1.2288.2.196
  @@ -1,4 +1,6 @@
   5.1.7 - 5.1.8:
  +- jbj: zlog: backport from HEAD.
  +- jbj: yarn: backport from HEAD (likely --with-pthreads needed todo++).
   - jbj: bzdio: handle multiblock compressed payloads transparently.
   - jbj: xzdio: backport the remaining xzdio contexxtual changes. 
worksforme.
   - jbj: xzdio: backport XZ changes from HEAD.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.162.2.16 -r1.162.2.17 Makefile.am
  --- rpm/rpmio/Makefile.am 16 Mar 2009 11:57:14 -  1.162.2.16
  +++ rpm/rpmio/Makefile.am 16 Mar 2009 14:59:58 -  1.162.2.17
  @@ -59,12 +59,12 @@
argv.h envvar.h fts.h mire.h rpmbc.h rpmcb.h rpmdav.h rpmgc.h \
rpmhash.h rpmio.h rpmio-stub.h rpmku.h rpmlog.h rpmmacro.h rpmmg.h \
rpmnss.h rpmpgp.h rpmsq.h rpmssl.h rpmsw.h rpmurl.h rpmxar.h \
  - stringbuf.h ugid.h rpmuuid.h
  + stringbuf.h ugid.h rpmuuid.h yarn.h
   noinst_HEADERS = \
ar.h cpio.h crc.h fnmatch.h glob.h iosm.h \
md2.h md4.h poptIO.h rmd128.h rmd160.h rmd256.h rmd320.h sha224.h \
salsa10.h salsa20.h tar.h tiger.h \
  - rpmhook.h rpmio_internal.h rpmlua.h rpmbz.h
  + rpmhook.h rpmio_internal.h rpmlua.h rpmbz.h rpmzlog.h
   
   usrlibdir = $(libdir)
   usrlib_LTLIBRARIES = librpmio.la
  @@ -76,8 +76,8 @@
salsa10.c salsa20.c tiger.c \
rpmbc.c rpmdav.c rpmgc.c rpmhash.c rpmhook.c rpmio.c rpmio-stub.c \
rpmku.c rpmlog.c rpmlua.c rpmmalloc.c rpmmg.c rpmnss.c rpmpgp.c \
  - rpmrpc.c rpmsq.c rpmssl.c rpmsw.c rpmxar.c \
  - strcasecmp.c stringbuf.c strtolocale.c tar.c url.c ugid.c rpmuuid.c
  + rpmrpc.c rpmsq.c rpmssl.c rpmsw.c rpmuuid.c rpmxar.c rpmzlog.c \
  + strcasecmp.c stringbuf.c strtolocale.c tar.c url.c ugid.c yarn.c
   librpmio_la_LDFLAGS = -release $(LT_CURRENT).$(LT_REVISION)
   if HAVE_LD_VERSION_SCRIPT
   librpmio_la_LDFLAGS += -Wl,--version-script=$(srcdir)/librpmio.vers
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.63.2.7 -r2.63.2.8 librpmio.vers
  --- rpm/rpmio/librpmio.vers   16 Mar 2009 01:09:29 -  2.63.2.7
  +++ rpm/rpmio/librpmio.vers   16 Mar 2009 14:59:58 -  2.63.2.8
  @@ -393,6 +393,11 @@
   rpmxarSwapBuf;
   XrpmxarUnlink;
   rpmuuidMake;
  +rpmzLogAdd;
  +rpmzLogDump;
  +rpmzLogFree;
  +rpmzLogLink;
  +rpmzLogNew;
   Stat;
   _Stat;
   stripTrailingBlanksStringBuf;
  @@ -441,6 +446,20 @@
   XurlLink;
   XurlNew;
   xzdio;
  +yarnAbort;
  +yarnDestruct;
  +yarnFreeLock;
  +yarnJoin;
  +yarnJoinAll;
  +yarnLaunch;
  +yarnMem;
  +yarnNewLock;
  +yarnPeekLock;
  +yarnPossess;
  +yarnPrefix;
  +yarnRelease;
  +yarnTwist;
  +yarnWaitFor;
 local:
   *;
   };
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmzlog.c
  
  $ cvs diff -u -r0 -r2.4.2.2 rpmzlog.c
  --- /dev/null 2009-03-16 15:55:01 +0100
  +++ rpmzlog.c 2009-03-16 15:59:58 +0100
  @@ -0,0 +1,217 @@
  +/** \ingroup rpmio
  + * \file rpmio/rpmzlog.c
  + * Trace logging (originally swiped from PIGZ).
  + */
  +
  +/* pigz.c -- parallel implementation of gzip
  + * Copyright (C) 

[CVS] RPM: rpm/rpmio/ rpmio.c

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 17:57:13
  Branch: HEAD Handle: 2009031616571300

  Modified files:
rpm/rpmio   rpmio.c

  Log:
- jbj: fix: display the next, not the current, reference count.

  Summary:
RevisionChanges Path
1.163   +1  -1  rpm/rpmio/rpmio.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmio.c
  
  $ cvs diff -u -r1.162 -r1.163 rpmio.c
  --- rpm/rpmio/rpmio.c 12 Mar 2009 18:57:47 -  1.162
  +++ rpm/rpmio/rpmio.c 16 Mar 2009 16:57:13 -  1.163
  @@ -286,7 +286,7 @@
   fd = c2f(cookie);
   if (fd) {
yarnPossess(fd-use);
  -DBGREFS(fd, (stderr, -- fd  %p ++ %ld %s at %s:%u %s\n, fd, 
yarnPeekLock(fd-use), msg, file, line, fdbg(fd)));
  +DBGREFS(fd, (stderr, -- fd  %p ++ %ld %s at %s:%u %s\n, fd, 
yarnPeekLock(fd-use)+1, msg, file, line, fdbg(fd)));
yarnTwist(fd-use, BY, 1);
   }
   return fd;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/rpmio/ rpmdav.c

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 18:20:46
  Branch: HEAD Handle: 2009031617204600

  Modified files:
rpm/rpmio   rpmdav.c

  Log:
- yarn: avoid possibly null FD_t's attached to urlInfo.

  Summary:
RevisionChanges Path
2.96+12 -8  rpm/rpmio/rpmdav.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmdav.c
  
  $ cvs diff -u -r2.95 -r2.96 rpmdav.c
  --- rpm/rpmio/rpmdav.c12 Mar 2009 18:21:26 -  2.95
  +++ rpm/rpmio/rpmdav.c16 Mar 2009 17:20:46 -  2.96
  @@ -1907,12 +1907,14 @@
   if (rc || u == NULL || u-sess == NULL)
goto exit;
   
  -yarnPossess(u-ctrl-use);
   if (u-ctrl == NULL)
u-ctrl = fdNew(persist ctrl (davOpen));
  -else if (yarnPeekLock(u-ctrl-use)  2  u-data == NULL)
  - u-data = fdNew(persist data (davOpen));
  -yarnRelease(u-ctrl-use);
  +else {
  + yarnPossess(u-ctrl-use);
  + if (yarnPeekLock(u-ctrl-use)  2  u-data == NULL)
  + u-data = fdNew(persist data (davOpen));
  + yarnRelease(u-ctrl-use);
  +}
   
   if (u-ctrl-url == NULL)
fd = u-ctrl = fdLink(u-ctrl, grab ctrl (davOpen persist ctrl));
  @@ -2312,12 +2314,14 @@
   if (urlSplit(url, u))
   goto exit;
   
  -yarnPossess(u-ctrl-use);
   if (u-ctrl == NULL)
   u-ctrl = fdNew(persist ctrl (httpOpen));
  -if (yarnPeekLock(u-ctrl-use)  2  u-data == NULL)
  -u-data = fdNew(persist data (httpOpen));
  -yarnRelease(u-ctrl-use);
  +if (u-ctrl != NULL) {   /* XXX can't happen */
  + yarnPossess(u-ctrl-use);
  + if (yarnPeekLock(u-ctrl-use)  2  u-data == NULL)
  + u-data = fdNew(persist data (httpOpen));
  + yarnRelease(u-ctrl-use);
  +}
   
   if (u-ctrl-url == NULL)
   fd = fdLink(u-ctrl, grab ctrl (httpOpen persist ctrl));
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/rpmio/ Makefile.am rpmio.h rpmurl...

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 18:27:23
  Branch: rpm-5_1  Handle: 2009031617272201

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/rpmio   Makefile.am rpmio.h rpmurl.h rpmzlog.c url.c

  Log:
- yarn: convert urlInfo refcounts to usage mutexes.

  Summary:
RevisionChanges Path
1.2288.2.197+1  -0  rpm/CHANGES
1.162.2.18  +2  -2  rpm/rpmio/Makefile.am
1.68.2.6+3  -0  rpm/rpmio/rpmio.h
1.25.2.3+10 -5  rpm/rpmio/rpmurl.h
2.4.2.3 +3  -4  rpm/rpmio/rpmzlog.c
1.51.2.2+16 -7  rpm/rpmio/url.c
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.196 -r1.2288.2.197 CHANGES
  --- rpm/CHANGES   16 Mar 2009 14:59:57 -  1.2288.2.196
  +++ rpm/CHANGES   16 Mar 2009 17:27:22 -  1.2288.2.197
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: yarn: convert urlInfo refcounts to usage mutexes.
   - jbj: zlog: backport from HEAD.
   - jbj: yarn: backport from HEAD (likely --with-pthreads needed todo++).
   - jbj: bzdio: handle multiblock compressed payloads transparently.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.162.2.17 -r1.162.2.18 Makefile.am
  --- rpm/rpmio/Makefile.am 16 Mar 2009 14:59:58 -  1.162.2.17
  +++ rpm/rpmio/Makefile.am 16 Mar 2009 17:27:23 -  1.162.2.18
  @@ -59,12 +59,12 @@
argv.h envvar.h fts.h mire.h rpmbc.h rpmcb.h rpmdav.h rpmgc.h \
rpmhash.h rpmio.h rpmio-stub.h rpmku.h rpmlog.h rpmmacro.h rpmmg.h \
rpmnss.h rpmpgp.h rpmsq.h rpmssl.h rpmsw.h rpmurl.h rpmxar.h \
  - stringbuf.h ugid.h rpmuuid.h yarn.h
  + stringbuf.h ugid.h rpmuuid.h rpmzlog.h yarn.h
   noinst_HEADERS = \
ar.h cpio.h crc.h fnmatch.h glob.h iosm.h \
md2.h md4.h poptIO.h rmd128.h rmd160.h rmd256.h rmd320.h sha224.h \
salsa10.h salsa20.h tar.h tiger.h \
  - rpmhook.h rpmio_internal.h rpmlua.h rpmbz.h rpmzlog.h
  + rpmhook.h rpmio_internal.h rpmlua.h rpmbz.h
   
   usrlibdir = $(libdir)
   usrlib_LTLIBRARIES = librpmio.la
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmio.h
  
  $ cvs diff -u -r1.68.2.5 -r1.68.2.6 rpmio.h
  --- rpm/rpmio/rpmio.h 16 Mar 2009 01:09:29 -  1.68.2.5
  +++ rpm/rpmio/rpmio.h 16 Mar 2009 17:27:23 -  1.68.2.6
  @@ -16,6 +16,9 @@
   #include stdlib.h
   #include unistd.h
   
  +#include rpmzlog.h
  +#include yarn.h
  +
   /** \ingroup rpmio
* Hide libio API lossage.
* The libio interface changed after glibc-2.1.3 to pass the seek offset
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmurl.h
  
  $ cvs diff -u -r1.25.2.2 -r1.25.2.3 rpmurl.h
  --- rpm/rpmio/rpmurl.h29 Jul 2008 15:02:44 -  1.25.2.2
  +++ rpm/rpmio/rpmurl.h16 Mar 2009 17:27:23 -  1.25.2.3
  @@ -30,7 +30,7 @@
* URL control structure.
*/
   struct urlinfo_s {
  -/*...@refs@*/ int nrefs; /*! no. of references */
  +yarnLock use;/*! use count -- return to pool when zero */
   /*...@owned@*/ /*...@relnull@*/
   const char * url;/*! copy of original url */
   /*...@owned@*/ /*...@relnull@*/
  @@ -120,9 +120,11 @@
* @param msgdebugging identifier (unused)
* @return   new instance
*/
  -/*...@unused@*/ urlinfo  urlNew(const char * msg)/*...@*/;
  +/*...@unused@*/ /*...@newref@*/
  +urlinfo  urlNew(const char * msg)/*...@*/;
   
   /** @todo Remove debugging entry from the ABI. */
  +/*...@newref@*/
   urlinfo  XurlNew(const char * msg, const char * file, unsigned line) 
/*...@*/;
   #define  urlNew(_msg) XurlNew(_msg, __FILE__, __LINE__)
   
  @@ -132,11 +134,13 @@
* @param msgdebugging identifier (unused)
* @return   referenced instance
*/
  -/*...@unused@*/ urlinfo  urlLink(urlinfo u, const char * msg)
  +/*...@unused@*/ /*...@newref@*/
  +urlinfo  urlLink(/*...@returned@*/ urlinfo u, const char * msg)
/*...@modifies u @*/;
   
   /** @todo Remove debugging entry from the ABI. */
  -urlinfo  XurlLink(urlinfo u, const char * msg, const char * file, 
unsigned line)
  +/*...@newref@*/
  +urlinfo  XurlLink(/*...@returned@*/ 

[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/rpmio/ rpmdav.c rpmio.c rpmio_int...

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 19:22:26
  Branch: rpm-5_1  Handle: 2009031618222501

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/rpmio   rpmdav.c rpmio.c rpmio_internal.h

  Log:
- yarn: convert FD_t refcounts to usage mutexes.

  Summary:
RevisionChanges Path
1.2288.2.198+1  -0  rpm/CHANGES
2.71.2.4+12 -4  rpm/rpmio/rpmdav.c
1.127.2.7   +43 -27 rpm/rpmio/rpmio.c
2.102.2.2   +1  -2  rpm/rpmio/rpmio_internal.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.197 -r1.2288.2.198 CHANGES
  --- rpm/CHANGES   16 Mar 2009 17:27:22 -  1.2288.2.197
  +++ rpm/CHANGES   16 Mar 2009 18:22:25 -  1.2288.2.198
  @@ -1,5 +1,6 @@
   5.1.7 - 5.1.8:
   - jbj: yarn: convert urlInfo refcounts to usage mutexes.
  +- jbj: yarn: convert FD_t refcounts to usage mutexes.
   - jbj: zlog: backport from HEAD.
   - jbj: yarn: backport from HEAD (likely --with-pthreads needed todo++).
   - jbj: bzdio: handle multiblock compressed payloads transparently.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmdav.c
  
  $ cvs diff -u -r2.71.2.3 -r2.71.2.4 rpmdav.c
  --- rpm/rpmio/rpmdav.c30 Oct 2008 15:57:20 -  2.71.2.3
  +++ rpm/rpmio/rpmdav.c16 Mar 2009 18:22:26 -  2.71.2.4
  @@ -1374,8 +1374,12 @@
   
   if (u-ctrl == NULL)
u-ctrl = fdNew(persist ctrl (davOpen));
  -if (u-ctrl-nrefs  2  u-data == NULL)
  - u-data = fdNew(persist data (davOpen));
  +else {
  + yarnPossess(u-ctrl-use);
  + if (yarnPeekLock(u-ctrl-use)  2L  u-data == NULL)
  + u-data = fdNew(persist data (davOpen));
  + yarnRelease(u-ctrl-use);
  +}
   
   if (u-ctrl-url == NULL)
fd = fdLink(u-ctrl, grab ctrl (davOpen persist ctrl));
  @@ -1758,8 +1762,12 @@
   
   if (u-ctrl == NULL)
   u-ctrl = fdNew(persist ctrl (httpOpen));
  -if (u-ctrl-nrefs  2  u-data == NULL)
  -u-data = fdNew(persist data (httpOpen));
  +if (u-ctrl != NULL) {   /* XXX can't happen */
  + yarnPossess(u-ctrl-use);
  + if (yarnPeekLock(u-ctrl-use)  2L  u-data == NULL)
  + u-data = fdNew(persist data (httpOpen));
  + yarnRelease(u-ctrl-use);
  +}
   
   if (u-ctrl-url == NULL)
   fd = fdLink(u-ctrl, grab ctrl (httpOpen persist ctrl));
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmio.c
  
  $ cvs diff -u -r1.127.2.6 -r1.127.2.7 rpmio.c
  --- rpm/rpmio/rpmio.c 16 Mar 2009 01:09:29 -  1.127.2.6
  +++ rpm/rpmio/rpmio.c 16 Mar 2009 18:22:26 -  1.127.2.7
  @@ -118,7 +118,6 @@
   /*...@access urlinfo @*/
   /*...@access FDSTAT_t @*/
   
  -#define FDNREFS(fd)  (fd ? ((FD_t)fd)-nrefs : -9)
   #define FDTO(fd) (fd ? ((FD_t)fd)-rd_timeoutsecs : -99)
   #define FDCPIOPOS(fd)(fd ? ((FD_t)fd)-fd_cpioPos : -99)
   
  @@ -297,14 +296,17 @@
/*...@modifies *cookie @*/
   {
   FD_t fd;
  +#ifdef   NOTYET
  +assert(cookie != NULL)
  +#else
   if (cookie == NULL)
  -/*...@-castexpose@*/
  -DBGREFS(0, (stderr, -- fd  %p ++ %d %s at %s:%u\n, cookie, 
FDNREFS(cookie)+1, msg, file, line));
  -/*...@=castexpose@*/
  +DBGREFS(0, (stderr, -- fd  %p ++ %ld %s at %s:%u\n, cookie, -9L, msg, 
file, line));
  +#endif
   fd = c2f(cookie);
   if (fd) {
  - fd-nrefs++;
  -DBGREFS(fd, (stderr, -- fd  %p ++ %d %s at %s:%u %s\n, fd, fd-nrefs, 
msg, file, line, fdbg(fd)));
  + yarnPossess(fd-use);
  +DBGREFS(fd, (stderr, -- fd  %p ++ %ld %s at %s:%u %s\n, fd, 
yarnPeekLock(fd-use)+1, msg, file, line, fdbg(fd)));
  + yarnTwist(fd-use, BY, 1);
   }
   return fd;
   }
  @@ -317,31 +319,42 @@
   {
int i;
   
  +#ifdef   NOTYET
  +assert(fd != NULL);
  +#else
   if (fd == NULL)
  -DBGREFS(0, (stderr, -- fd  %p -- %d %s at %s:%u\n, fd, FDNREFS(fd), msg, 
file, line));
  +DBGREFS(0, (stderr, -- fd  %p -- %ld %s at %s:%u\n, fd, -9L, msg, file, 
line));
  +#endif
   FDSANE(fd);
   if (fd) {
  -DBGREFS(fd, (stderr, -- fd  %p -- %d %s at %s:%u %s\n, fd, fd-nrefs, 
msg, file, line, fdbg(fd)));
  - if (--fd-nrefs  0)
  - /*...@-refcounttrans -retal...@*/ return fd; /*...@=refcounttrans 
=retal...@*/
  - fd-opath = _free(fd-opath);
  - fd-stats = _free(fd-stats);
  - for (i = fd-ndigests 

[CVS] RPM: rpm/rpmio/ rpmdav.c rpmio.c

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 19:24:17
  Branch: HEAD Handle: 2009031618241700

  Modified files:
rpm/rpmio   rpmdav.c rpmio.c

  Log:
- jbj: yarn: keep in sync w rpm-5_1.

  Summary:
RevisionChanges Path
2.97+2  -2  rpm/rpmio/rpmdav.c
1.164   +4  -6  rpm/rpmio/rpmio.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmdav.c
  
  $ cvs diff -u -r2.96 -r2.97 rpmdav.c
  --- rpm/rpmio/rpmdav.c16 Mar 2009 17:20:46 -  2.96
  +++ rpm/rpmio/rpmdav.c16 Mar 2009 18:24:17 -  2.97
  @@ -1911,7 +1911,7 @@
u-ctrl = fdNew(persist ctrl (davOpen));
   else {
yarnPossess(u-ctrl-use);
  - if (yarnPeekLock(u-ctrl-use)  2  u-data == NULL)
  + if (yarnPeekLock(u-ctrl-use)  2L  u-data == NULL)
u-data = fdNew(persist data (davOpen));
yarnRelease(u-ctrl-use);
   }
  @@ -2318,7 +2318,7 @@
   u-ctrl = fdNew(persist ctrl (httpOpen));
   if (u-ctrl != NULL) {   /* XXX can't happen */
yarnPossess(u-ctrl-use);
  - if (yarnPeekLock(u-ctrl-use)  2  u-data == NULL)
  + if (yarnPeekLock(u-ctrl-use)  2L  u-data == NULL)
u-data = fdNew(persist data (httpOpen));
yarnRelease(u-ctrl-use);
   }
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmio.c
  
  $ cvs diff -u -r1.163 -r1.164 rpmio.c
  --- rpm/rpmio/rpmio.c 16 Mar 2009 16:57:13 -  1.163
  +++ rpm/rpmio/rpmio.c 16 Mar 2009 18:24:17 -  1.164
  @@ -66,8 +66,6 @@
   #include rpmmacro.h/* XXX rpmioAccess needs rpmCleanPath() 
*/
   #include rpmlua.h  /* XXX rpmioClean() calls rpmluaFree() */
   
  -#include yarn.h
  -
   #if defined(HAVE_LIBIO_H)  defined(_G_IO_IO_FILE_VERSION)
   #define  _USE_LIBIO  1
   #endif
  @@ -281,7 +279,7 @@
   assert(cookie != NULL);
   #else
   if (cookie == NULL)
  -DBGREFS(0, (stderr, -- fd  %p ++ %d %s at %s:%u\n, cookie, -9, msg, file, 
line));
  +DBGREFS(0, (stderr, -- fd  %p ++ %ld %s at %s:%u\n, cookie, -9L, msg, 
file, line));
   #endif
   fd = c2f(cookie);
   if (fd) {
  @@ -312,7 +310,7 @@
   if (fd) {
yarnPossess(fd-use);
   DBGREFS(fd, (stderr, -- fd  %p -- %ld %s at %s:%u %s\n, fd, 
yarnPeekLock(fd-use), msg, file, line, fdbg(fd)));
  - if (yarnPeekLock(fd-use) == 1) {
  + if (yarnPeekLock(fd-use) == 1L) {
yarnLock use = fd-use;
fd-opath = _free(fd-opath);
fd-stats = _free(fd-stats);
  @@ -2567,10 +2565,10 @@
* - gzopen: [0-9] is compression level
* - gzopen: 'f' is filtered (Z_FILTERED)
* - gzopen: 'h' is Huffman encoding (Z_HUFFMAN_ONLY)
  - * - bzopen: [1-9] is block size (modulo 100K)
  + * - bzopen: [1-9] is block size (in 100K units)
* - bzopen: 's' is smallmode
* - bzopen: 'q' sets verbosity to 0
  - * = bzopen: 'v' does verbosity++ (up to 4)
  + * - bzopen: 'v' does verbosity++ (up to 4)
* - HACK:   '.' terminates, rest is type of I/O
*/
   static inline void cvtfmode (const char *m,
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/rpmdb/ header.c header_internal.h

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 20:22:14
  Branch: HEAD Handle: 2009031619221301

  Modified files:
rpm CHANGES
rpm/rpmdb   header.c header_internal.h

  Log:
- yarn: convert Header refcount to usage mutex.

  Summary:
RevisionChanges Path
1.2822  +1  -0  rpm/CHANGES
1.169   +50 -38 rpm/rpmdb/header.c
1.48+8  -3  rpm/rpmdb/header_internal.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2821 -r1.2822 CHANGES
  --- rpm/CHANGES   16 Mar 2009 13:36:24 -  1.2821
  +++ rpm/CHANGES   16 Mar 2009 19:22:13 -  1.2822
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- jbj: yarn: convert Header refcount to usage mutex.
   - jbj: zlog: rework trace log with a refcount mutex instead.
   - proyvind: do lazy mkdir of %_topdir, %_builddir, %_rpmdir  %_srcrpmdir
when doing '--rebuild' so that it should mostly work easily for user.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmdb/header.c
  
  $ cvs diff -u -r1.168 -r1.169 header.c
  --- rpm/rpmdb/header.c2 Aug 2008 16:36:10 -   1.168
  +++ rpm/rpmdb/header.c16 Mar 2009 19:22:14 -  1.169
  @@ -107,11 +107,12 @@
   if (h == NULL) return NULL;
   /*...@=nullret@*/
   
  -h-nrefs++;
  +yarnPossess(h-use);
   /*...@-modfilesys@*/
   if (_hdr_debug)
  -fprintf(stderr, -- h  %p ++ %d at %s:%u\n, h, h-nrefs, __FILE__, 
__LINE__);
  +fprintf(stderr, -- h  %p ++ %ld at %s:%u\n, h, yarnPeekLock(h-use)+1, 
__FILE__, __LINE__);
   /*...@=modfilesys@*/
  +yarnTwist(h-use, BY, 1);
   
   /*...@-refcounttrans @*/
   return h;
  @@ -121,56 +122,67 @@
   Header headerUnlink(Header h)
   {
   if (h == NULL) return NULL;
  +yarnPossess(h-use);
   /*...@-modfilesys@*/
   if (_hdr_debug)
  -fprintf(stderr, -- h  %p -- %d at %s:%u\n, h, h-nrefs, __FILE__, 
__LINE__);
  +fprintf(stderr, -- h  %p -- %ld at %s:%u\n, h, yarnPeekLock(h-use), 
__FILE__, __LINE__);
   /*...@=modfilesys@*/
  -h-nrefs--;
  +yarnTwist(h-use, BY, -1);
   return NULL;
   }
   
   Header headerFree(Header h)
   {
  -(void) headerUnlink(h);
   
  -/*...@-usereleased@*/
  -if (h == NULL || h-nrefs  0)
  - return NULL;/* XXX return previous header? */
  +if (h == NULL)
  + return NULL;
   
  -if (h-index) {
  - indexEntry entry = h-index;
  - size_t i;
  - for (i = 0; i  h-indexUsed; i++, entry++) {
  - if ((h-flags  HEADERFLAG_ALLOCATED)  ENTRY_IS_REGION(entry)) {
  - if (entry-length  0) {
  - rpmuint32_t * ei = entry-data;
  - if ((ei - 2) == h-blob)
  - h-blob = _free(h-blob);
  - entry-data = NULL;
  +yarnPossess(h-use);
  +/*...@-modfilesys@*/
  +if (_hdr_debug)
  +fprintf(stderr, -- h  %p -- %ld at %s:%u\n, h, yarnPeekLock(h-use), 
__FILE__, __LINE__);
  +/*...@=modfilesys@*/
  +if (yarnPeekLock(h-use) = 1L) {
  + yarnLock use = h-use;
  +/*...@-usereleased@*/
  + if (h-index != NULL) {
  + indexEntry entry = h-index;
  + size_t i;
  + for (i = 0; i  h-indexUsed; i++, entry++) {
  + if ((h-flags  HEADERFLAG_ALLOCATED)  ENTRY_IS_REGION(entry))
  + {
  + if (entry-length  0) {
  + rpmuint32_t * ei = entry-data;
  + if ((ei - 2) == h-blob)
  + h-blob = _free(h-blob);
  + entry-data = NULL;
  + }
  + } else if (!ENTRY_IN_REGION(entry)) {
  + entry-data = _free(entry-data);
}
  - } else if (!ENTRY_IN_REGION(entry)) {
  - entry-data = _free(entry-data);
  + entry-data = NULL;
}
  - entry-data = NULL;
  + h-index = _free(h-index);
}
  - h-index = _free(h-index);
  -}
  -h-origin = _free(h-origin);
  -h-baseurl = _free(h-baseurl);
  -h-digest = _free(h-digest);
  + h-origin = _free(h-origin);
  + h-baseurl = _free(h-baseurl);
  + h-digest = _free(h-digest);
   
   /*...@-nullstate@*/
  -if (_hdr_stats) {
  - if (_hdr_loadops)   /* RPMTS_OP_HDRLOAD */
  - (void) rpmswAdd(_hdr_loadops, headerGetStats(h, 18));
  - if (_hdr_getops)/* RPMTS_OP_HDRGET */
  - (void) 

[CVS] RPM: rpm-5_1: rpm/ CHANGES rpm/rpmdb/ header.c header_internal.h

2009-03-16 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 21:29:56
  Branch: rpm-5_1  Handle: 2009031620295501

  Modified files:   (Branch: rpm-5_1)
rpm CHANGES
rpm/rpmdb   header.c header_internal.h

  Log:
- yarn: convert Header refcounts to usage mutexes.

  Summary:
RevisionChanges Path
1.2288.2.199+1  -0  rpm/CHANGES
1.153.2.5   +26 -14 rpm/rpmdb/header.c
1.40.2.4+8  -3  rpm/rpmdb/header_internal.h
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2288.2.198 -r1.2288.2.199 CHANGES
  --- rpm/CHANGES   16 Mar 2009 18:22:25 -  1.2288.2.198
  +++ rpm/CHANGES   16 Mar 2009 20:29:55 -  1.2288.2.199
  @@ -1,4 +1,5 @@
   5.1.7 - 5.1.8:
  +- jbj: yarn: convert Header refcounts to usage mutexes.
   - jbj: yarn: convert urlInfo refcounts to usage mutexes.
   - jbj: yarn: convert FD_t refcounts to usage mutexes.
   - jbj: zlog: backport from HEAD.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmdb/header.c
  
  $ cvs diff -u -r1.153.2.4 -r1.153.2.5 header.c
  --- rpm/rpmdb/header.c11 Jan 2009 17:23:21 -  1.153.2.4
  +++ rpm/rpmdb/header.c16 Mar 2009 20:29:56 -  1.153.2.5
  @@ -107,11 +107,12 @@
   if (h == NULL) return NULL;
   /*...@=nullret@*/
   
  -h-nrefs++;
  +yarnPossess(h-use);
   /*...@-modfilesys@*/
   if (_hdr_debug)
  -fprintf(stderr, -- h  %p ++ %d at %s:%u\n, h, h-nrefs, __FILE__, 
__LINE__);
  +fprintf(stderr, -- h  %p ++ %ld at %s:%u\n, h, yarnPeekLock(h-use)+1, 
__FILE__, __LINE__);
   /*...@=modfilesys@*/
  +yarnTwist(h-use, BY, 1);
   
   /*...@-refcounttrans @*/
   return h;
  @@ -121,27 +122,35 @@
   Header headerUnlink(Header h)
   {
   if (h == NULL) return NULL;
  +yarnPossess(h-use);
   /*...@-modfilesys@*/
   if (_hdr_debug)
  -fprintf(stderr, -- h  %p -- %d at %s:%u\n, h, h-nrefs, __FILE__, 
__LINE__);
  +fprintf(stderr, -- h  %p -- %ld at %s:%u\n, h, yarnPeekLock(h-use), 
__FILE__, __LINE__);
   /*...@=modfilesys@*/
  -h-nrefs--;
  +yarnTwist(h-use, BY, -1);
   return NULL;
   }
   
   Header headerFree(Header h)
   {
  -(void) headerUnlink(h);
   
  -/*...@-usereleased@*/
  -if (h == NULL || h-nrefs  0)
  - return NULL;/* XXX return previous header? */
  +if (h == NULL)
  + return NULL;
   
  -if (h-index) {
  +yarnPossess(h-use);
  +/*...@-modfilesys@*/
  +if (_hdr_debug)
  +fprintf(stderr, -- h  %p -- %ld at %s:%u\n, h, yarnPeekLock(h-use), 
__FILE__, __LINE__);
  +/*...@=modfilesys@*/
  +if (yarnPeekLock(h-use) = 1L) {
  + yarnLock use = h-use;
  +/*...@-usereleased@*/
  + if (h-index != NULL) {
indexEntry entry = h-index;
size_t i;
for (i = 0; i  h-indexUsed; i++, entry++) {
  - if ((h-flags  HEADERFLAG_ALLOCATED)  ENTRY_IS_REGION(entry)) {
  + if ((h-flags  HEADERFLAG_ALLOCATED)  ENTRY_IS_REGION(entry))
  + {
if (entry-length  0) {
uint32_t * ei = entry-data;
if ((ei - 2) == h-blob)
  @@ -167,10 +176,13 @@
(void) rpmswAdd(_hdr_getops, headerGetStats(h, 19));
   }
   /*...@=nullstate@*/
  -
   /*...@-refcounttrans@*/ h = _free(h); /*...@=refcounttrans@*/
  -return h;
  + yarnTwist(use, BY, -1);
  + use = yarnFreeLock(use);
   /*...@=usereleased@*/
  +} else
  + yarnTwist(h-use, BY, -1);
  +return NULL;
   }
   
   Header headerNew(void)
  @@ -192,7 +204,7 @@
? xcalloc(h-indexAlloced, sizeof(*h-index))
: NULL);
   
  -h-nrefs = 0;
  +h-use = yarnNewLock(0);
   /*...@-globstate -observertrans @*/
   return headerLink(h);
   /*...@=globstate =observertrans @*/
  @@ -1049,7 +1061,7 @@
   h-indexUsed = il;
   h-index = xcalloc(h-indexAlloced, sizeof(*h-index));
   h-flags |= HEADERFLAG_SORTED;
  -h-nrefs = 0;
  +h-use = yarnNewLock(0);;
   h-startoff = 0;
   h-endoff = (uint32_t) pvlen;
   h = headerLink(h);
  @@ .
  patch -p0 '@@ .'
  Index: rpm/rpmdb/header_internal.h
  
  $ cvs diff -u -r1.40.2.3 -r1.40.2.4 header_internal.h
  --- rpm/rpmdb/header_internal.h   11 Jan 2009 17:23:21 -  1.40.2.3
  +++ rpm/rpmdb/header_internal.h   16 Mar 2009 20:29:56 -  1.40.2.4
  @@ -6,6 +6,7 @@
   

[CVS] RPM: rpm/build/ files.c pack.c parsePrep.c

2009-03-16 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 22:06:44
  Branch: HEAD Handle: 2009031621064400

  Modified files:
rpm/build   files.c pack.c parsePrep.c

  Log:
do lazy mkdir of %_builddir, %_rpmdir  %_srcrpmdir when doing
--install for src.rpms as well.

  Summary:
RevisionChanges Path
1.353   +1  -0  rpm/build/files.c
2.307   +6  -2  rpm/build/pack.c
2.130   +1  -0  rpm/build/parsePrep.c
  

  patch -p0 '@@ .'
  Index: rpm/build/files.c
  
  $ cvs diff -u -r1.352 -r1.353 files.c
  --- rpm/build/files.c 22 Jan 2009 05:32:24 -  1.352
  +++ rpm/build/files.c 16 Mar 2009 21:06:44 -  1.353
  @@ -2083,6 +2083,7 @@
absolute = 1;
   } else
fn = rpmGenPath(buildURL, NULL, fn);
  +rc = rpmioMkpath(bildURL, 0755, -1, -1);
   
   switch (tag) {
   default:
  @@ .
  patch -p0 '@@ .'
  Index: rpm/build/pack.c
  
  $ cvs diff -u -r2.306 -r2.307 pack.c
  --- rpm/build/pack.c  2 Jan 2009 19:09:46 -   2.306
  +++ rpm/build/pack.c  16 Mar 2009 21:06:44 -  2.307
  @@ -1107,7 +1107,7 @@
if (Stat(dn, st)  0) {
switch(errno) {
case  ENOENT:
  - if (Mkdir(dn, 0755) == 0)
  + if (rpmioMkpath(dn, 0755, -1, -1) == 0)
/*...@switchbreak@*/ break;
/*...@fallthrough@*/
default:
  @@ -1192,7 +1192,10 @@
   spec-cookie = _free(spec-cookie);
   
   /* XXX this should be %_srpmdir */
  -{const char *fn = rpmGetPath(%{_srcrpmdir}/, 
spec-sourceRpmName,NULL);
  +{const char *srcrpmdir = rpmGetPath(%{_srcrpmdir}/, NULL);
  + const char *fn = rpmGetPath(%{_srcrpmdir}/, spec-sourceRpmName,NULL);
  +
  + rc = rpmioMkpath(srcrpmdir, 0755, -1, -1);
   
memset(csa, 0, sizeof(*csa));
csa-cpioArchiveSize = 0;
  @@ -1217,6 +1220,7 @@
csa-cpioFdIn = fdFree(csa-cpioFdIn, init (packageSources));
   /*...@=nullpass =onlytrans =refcounttrans @*/
/*...@=type@*/
  + srcrpmdir = _free(srcrpmdir);
fn = _free(fn);
   }
   
  @@ .
  patch -p0 '@@ .'
  Index: rpm/build/parsePrep.c
  
  $ cvs diff -u -r2.129 -r2.130 parsePrep.c
  --- rpm/build/parsePrep.c 18 Dec 2008 18:59:15 -  2.129
  +++ rpm/build/parsePrep.c 16 Mar 2009 21:06:44 -  2.130
  @@ -453,6 +453,7 @@
const char *buildDir;
   
(void) urlPath(buildDirURL, buildDir);
  + rc = rpmioMkpath(buildDir, 0755, -1, -1);
sprintf(buf, cd '%s', buildDir);
spec-prep = rpmiobAppend(spec-prep, buf, 1);
buildDirURL = _free(buildDirURL);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES macros.in

2009-03-16 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 22:38:52
  Branch: HEAD Handle: 2009031621385200

  Modified files:
rpm CHANGES macros.in

  Log:
change %buildroot to %{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}
to make it more unique and informative. Also move it to be no longer listed
as optional.

  Summary:
RevisionChanges Path
1.2823  +4  -0  rpm/CHANGES
1.278   +4  -5  rpm/macros.in
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2822 -r1.2823 CHANGES
  --- rpm/CHANGES   16 Mar 2009 19:22:13 -  1.2822
  +++ rpm/CHANGES   16 Mar 2009 21:38:52 -  1.2823
  @@ -1,5 +1,9 @@
   
   5.2a3 - 5.2a4:
  +- proyvind: change %buildroot to 
%{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}
  + to make it more unique and informative.
  +- proyvind: do lazy mkdir of %_builddir, %_rpmdir  %_srcrpmdir when 
doing
  + --install for src.rpms as well.
   - jbj: yarn: convert Header refcount to usage mutex.
   - jbj: zlog: rework trace log with a refcount mutex instead.
   - proyvind: do lazy mkdir of %_topdir, %_builddir, %_rpmdir  %_srcrpmdir
  @@ .
  patch -p0 '@@ .'
  Index: rpm/macros.in
  
  $ cvs diff -u -r1.277 -r1.278 macros.in
  --- rpm/macros.in 18 Feb 2009 04:41:36 -  1.277
  +++ rpm/macros.in 16 Mar 2009 21:38:52 -  1.278
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.277 2009/02/18 04:41:36 pkarlsen Exp $
  +# $Id: macros.in,v 1.278 2009/03/16 21:38:52 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
  @@ -246,6 +246,9 @@
   #The directory where buildroots will be created.
   %_buildrootdir   @BUILDROOTDIR_MACRO@
   
  +#   Build root path, where %install installs the package during build.
  +%buildroot  
%{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}
  +
   #Directory where temporaray files can be created.
   %_tmppath%{_var}/tmp
   %tmpdir  %{_tmppath}
  @@ -258,10 +261,6 @@
   #Macros that are initialized as a side effect of spec
   #file parsing.
   #
  -#Build root path, where %install installs the package during build.
  -#
  -%buildroot   %{_buildrootdir}/%{name}-root
  -
   #The sub-directory (relative to %{_builddir}) where sources are compiled.
   #This macro is set after processing %setup, either explicitly from the
   #value given to -n or the default name-version.
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmrc.c rpm/ macros.in

2009-03-16 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 22:44:38
  Branch: HEAD Handle: 2009031621443700

  Modified files:
rpm CHANGES macros.in
rpm/lib rpmrc.c

  Log:
change default %_topdir to $HOME/rpmbuild.

  Summary:
RevisionChanges Path
1.2824  +1  -0  rpm/CHANGES
2.266   +1  -1  rpm/lib/rpmrc.c
1.279   +2  -2  rpm/macros.in
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2823 -r1.2824 CHANGES
  --- rpm/CHANGES   16 Mar 2009 21:38:52 -  1.2823
  +++ rpm/CHANGES   16 Mar 2009 21:44:37 -  1.2824
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- proyvind: change default %_topdir to $HOME/rpmbuild.
   - proyvind: change %buildroot to 
%{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}
to make it more unique and informative.
   - proyvind: do lazy mkdir of %_builddir, %_rpmdir  %_srcrpmdir when 
doing
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmrc.c
  
  $ cvs diff -u -r2.265 -r2.266 rpmrc.c
  --- rpm/lib/rpmrc.c   14 Mar 2009 17:19:20 -  2.265
  +++ rpm/lib/rpmrc.c   16 Mar 2009 21:44:37 -  2.266
  @@ -325,7 +325,7 @@
   addMacro(NULL, ___build_pre, NULL, ___build_pre, RMIL_DEFAULT);
   
   addMacroDefault(_topdir,
  - %{_usr}/src/rpm,  NULL);
  + %{_usr}/src/rpm,  %(echo $HOME)/rpmbuild);
   addMacroDefault(_tmppath,
%{_var}/tmp,  NULL);
   addMacroDefault(_dbpath,
  @@ .
  patch -p0 '@@ .'
  Index: rpm/macros.in
  
  $ cvs diff -u -r1.278 -r1.279 macros.in
  --- rpm/macros.in 16 Mar 2009 21:38:52 -  1.278
  +++ rpm/macros.in 16 Mar 2009 21:44:37 -  1.279
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.278 2009/03/16 21:38:52 pkarlsen Exp $
  +# $Id: macros.in,v 1.279 2009/03/16 21:44:37 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
  @@ -254,7 +254,7 @@
   %tmpdir  %{_tmppath}
   
   #Path to top of build area.
  -%_topdir @PKGSRCDIR_MACRO@
  +%_topdir %(echo $HOME)/rpmbuild
   
   
#==
   #  Optional macros.
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES configure.ac

2009-03-16 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 22:47:04
  Branch: HEAD Handle: 2009031621470300

  Modified files:
rpm CHANGES configure.ac

  Log:
change default %_buildrootdir to %{_topdir}/BUILDROOT

  Summary:
RevisionChanges Path
1.2825  +1  -0  rpm/CHANGES
2.345   +1  -1  rpm/configure.ac
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2824 -r1.2825 CHANGES
  --- rpm/CHANGES   16 Mar 2009 21:44:37 -  1.2824
  +++ rpm/CHANGES   16 Mar 2009 21:47:03 -  1.2825
  @@ -1,5 +1,6 @@
   
   5.2a3 - 5.2a4:
  +- proyvind: change default %_buildrootdir to %{_topdir}/BUILDROOT.
   - proyvind: change default %_topdir to $HOME/rpmbuild.
   - proyvind: change %buildroot to 
%{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}
to make it more unique and informative.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.344 -r2.345 configure.ac
  --- rpm/configure.ac  11 Mar 2009 22:03:06 -  2.344
  +++ rpm/configure.ac  16 Mar 2009 21:47:03 -  2.345
  @@ -1632,7 +1632,7 @@
   
   dnl # determine RPM buildroot directory path
   AC_MSG_CHECKING([for RPM buildroot directory])
  -BUILDROOTDIR_MACRO=%{_tmppath}
  +BUILDROOTDIR_MACRO=%{_topdir}/BUILDROOT
   AC_ARG_WITH(
   [path-buildroot],
   AS_HELP_STRING([--with-path-buildroot=ARG], [build with RPM buildroot 
path (or macro)]),
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm/ CHANGES configure.ac rpm/lib/ rpmrc.c rpm/ macros.in

2009-03-16 Thread Per �yvind Karlsen
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Per Øyvind Karlsen
  Root:   /v/rpm/cvs   Email:  pkarl...@rpm5.org
  Module: rpm  Date:   16-Mar-2009 23:30:40
  Branch: HEAD Handle: 2009031622303901

  Modified files:
rpm CHANGES configure.ac macros.in
rpm/lib rpmrc.c

  Log:
cowardly back out previous changes that violated the default macros
dogma

  Summary:
RevisionChanges Path
1.2826  +0  -4  rpm/CHANGES
2.346   +1  -1  rpm/configure.ac
2.267   +1  -1  rpm/lib/rpmrc.c
1.280   +3  -3  rpm/macros.in
  

  patch -p0 '@@ .'
  Index: rpm/CHANGES
  
  $ cvs diff -u -r1.2825 -r1.2826 CHANGES
  --- rpm/CHANGES   16 Mar 2009 21:47:03 -  1.2825
  +++ rpm/CHANGES   16 Mar 2009 22:30:39 -  1.2826
  @@ -1,9 +1,5 @@
   
   5.2a3 - 5.2a4:
  -- proyvind: change default %_buildrootdir to %{_topdir}/BUILDROOT.
  -- proyvind: change default %_topdir to $HOME/rpmbuild.
  -- proyvind: change %buildroot to 
%{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}
  - to make it more unique and informative.
   - proyvind: do lazy mkdir of %_builddir, %_rpmdir  %_srcrpmdir when 
doing
--install for src.rpms as well.
   - jbj: yarn: convert Header refcount to usage mutex.
  @@ .
  patch -p0 '@@ .'
  Index: rpm/configure.ac
  
  $ cvs diff -u -r2.345 -r2.346 configure.ac
  --- rpm/configure.ac  16 Mar 2009 21:47:03 -  2.345
  +++ rpm/configure.ac  16 Mar 2009 22:30:39 -  2.346
  @@ -1632,7 +1632,7 @@
   
   dnl # determine RPM buildroot directory path
   AC_MSG_CHECKING([for RPM buildroot directory])
  -BUILDROOTDIR_MACRO=%{_topdir}/BUILDROOT
  +BUILDROOTDIR_MACRO=%{_tmppath}
   AC_ARG_WITH(
   [path-buildroot],
   AS_HELP_STRING([--with-path-buildroot=ARG], [build with RPM buildroot 
path (or macro)]),
  @@ .
  patch -p0 '@@ .'
  Index: rpm/lib/rpmrc.c
  
  $ cvs diff -u -r2.266 -r2.267 rpmrc.c
  --- rpm/lib/rpmrc.c   16 Mar 2009 21:44:37 -  2.266
  +++ rpm/lib/rpmrc.c   16 Mar 2009 22:30:40 -  2.267
  @@ -325,7 +325,7 @@
   addMacro(NULL, ___build_pre, NULL, ___build_pre, RMIL_DEFAULT);
   
   addMacroDefault(_topdir,
  - %{_usr}/src/rpm,  %(echo $HOME)/rpmbuild);
  + %{_usr}/src/rpm,  NULL);
   addMacroDefault(_tmppath,
%{_var}/tmp,  NULL);
   addMacroDefault(_dbpath,
  @@ .
  patch -p0 '@@ .'
  Index: rpm/macros.in
  
  $ cvs diff -u -r1.279 -r1.280 macros.in
  --- rpm/macros.in 16 Mar 2009 21:44:37 -  1.279
  +++ rpm/macros.in 16 Mar 2009 22:30:39 -  1.280
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.279 2009/03/16 21:44:37 pkarlsen Exp $
  +# $Id: macros.in,v 1.280 2009/03/16 22:30:39 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
  @@ -247,14 +247,14 @@
   %_buildrootdir   @BUILDROOTDIR_MACRO@
   
   #   Build root path, where %install installs the package during build.
  -%buildroot  
%{_buildrootdir}/%{name}-%{version}-%{release}.%{_arch}
  +%buildroot  %{_buildrootdir}/%{name}-root
   
   #Directory where temporaray files can be created.
   %_tmppath%{_var}/tmp
   %tmpdir  %{_tmppath}
   
   #Path to top of build area.
  -%_topdir %(echo $HOME)/rpmbuild
  +%_topdir @PKGSRCDIR_MACRO@
   
   
#==
   #  Optional macros.
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org