[CVS] RPM: rpm-5_4: rpm/lib/ rpmts.c

2016-02-27 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:   27-Feb-2016 23:04:44
  Branch: rpm-5_4  Handle: 2016022722044400

  Modified files:   (Branch: rpm-5_4)
rpm/lib rpmts.c

  Log:
ilib/rpmts.c: Ensure that we check both providename and filepaths

When looking up a missing dependencies, such as /bin/sh, we need to lookup
in both the providename and filepaths DB, not just the filepaths DB.

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

Modified to check FILEPATHS before PROVIDENAME with a file require.

  Summary:
RevisionChanges Path
2.188.2.14  +12 -0  rpm/lib/rpmts.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmts.c
  
  $ cvs diff -u -r2.188.2.13 -r2.188.2.14 rpmts.c
  --- rpm/lib/rpmts.c   27 Sep 2014 15:53:45 -  2.188.2.13
  +++ rpm/lib/rpmts.c   27 Feb 2016 22:04:44 -  2.188.2.14
  @@ -433,6 +433,10 @@
   
/* Look for a matching Provides: in suggested universe. */
rpmtag = (*keyp == '/' ? RPMTAG_FILEPATHS : RPMTAG_PROVIDENAME);
  +#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
  +  do {
  + unsigned j = 0;
  +#endif
mi = rpmmiInit(sdb, rpmtag, keyp, keylen);
while ((h = rpmmiNext(mi)) != NULL) {
size_t hnamelen;
  @@ -467,6 +471,14 @@
bhnamelen = hnamelen;
}
mi = rpmmiFree(mi);
  +#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
  + if (bh == NULL && *keyp == '/' && j++ == 0) {
  + rpmtag = RPMTAG_PROVIDENAME;
  + continue;
  + }
  + break;
  +  } while (1);
  +#endif
   }
   
   /* Is there a suggested resolution? */
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/python/ rpmmodule.c

2016-02-27 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:   27-Feb-2016 22:49:57
  Branch: rpm-5_4  Handle: 2016022721495700

  Modified files:   (Branch: rpm-5_4)
rpm/python  rpmmodule.c

  Log:
irpmmodule.c: Export a few additional RPMSENSE values

We want to see the RPMSENSE_SCRIPT values for use with SMART.  We also
want to see the MISSINGOK value so we can avoid recommended packages causing
failures.

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
1.180.2.15  +4  -1  rpm/python/rpmmodule.c
  

  patch -p0 <<'@@ .'
  Index: rpm/python/rpmmodule.c
  
  $ cvs diff -u -r1.180.2.14 -r1.180.2.15 rpmmodule.c
  --- rpm/python/rpmmodule.c27 Feb 2016 20:24:39 -  1.180.2.14
  +++ rpm/python/rpmmodule.c27 Feb 2016 21:49:57 -  1.180.2.15
  @@ -526,12 +526,15 @@
   REGISTER_ENUM(RPMSENSE_PREREQ);
   REGISTER_ENUM(RPMSENSE_PRETRANS);
   REGISTER_ENUM(RPMSENSE_INTERP);
  +#else
  + #if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
   REGISTER_ENUM(RPMSENSE_SCRIPT_PRE);
   REGISTER_ENUM(RPMSENSE_SCRIPT_POST);
   REGISTER_ENUM(RPMSENSE_SCRIPT_PREUN);
   REGISTER_ENUM(RPMSENSE_SCRIPT_POSTUN);
   REGISTER_ENUM(RPMSENSE_SCRIPT_VERIFY);
  -#else
  +REGISTER_ENUM(RPMSENSE_MISSINGOK);
  + #endif
   REGISTER_ENUM(RPMSENSE_NOTEQUAL);
   #endif
   REGISTER_ENUM(RPMSENSE_FIND_REQUIRES);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ rpmrc.c

2016-02-27 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:   27-Feb-2016 22:48:02
  Branch: rpm-5_4  Handle: 2016022721480200

  Modified files:   (Branch: rpm-5_4)
rpm/lib rpmrc.c

  Log:
Don't add the first line of /etc/rpm/platform to the list of patterns
to match when computing an arch score, use it just for getting
information about the platform (cpu/vendor/os). Fixes #3864.

Upstream-Status: Inappropriate [embedded specific]

  Summary:
RevisionChanges Path
2.289.4.11  +3  -1  rpm/lib/rpmrc.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmrc.c
  
  $ cvs diff -u -r2.289.4.10 -r2.289.4.11 rpmrc.c
  --- rpm/lib/rpmrc.c   27 Feb 2016 20:29:42 -  2.289.4.10
  +++ rpm/lib/rpmrc.c   27 Feb 2016 21:48:02 -  2.289.4.11
  @@ -510,6 +510,7 @@
   #endif
}
   
  +#if !defined(RPM_VENDOR_OE) /* Skip the explicit-platform */
   #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
/* do not use vendor and GNU attribution */
p = rpmExpand("%{_host_cpu}-%{_host_os}", NULL);
  @@ -520,7 +521,8 @@
   #endif
xx = mireAppend(RPMMIRE_STRCMP, 0, p, NULL, &mi_re, &mi_nre);
p = _free(p);
  - 
  +#endif
  +
init_platform++;
   }
   rc = (init_platform ? RPMRC_OK : RPMRC_FAIL);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ fsm.c rpm/rpmio/ iosm.c

2016-02-27 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:   27-Feb-2016 22:46:10
  Branch: rpm-5_4  Handle: 2016022721461000

  Modified files:   (Branch: rpm-5_4)
rpm/lib fsm.c
rpm/rpmio   iosm.c

  Log:
We need to sanity check that the nlink size and our linksLeft counter
do match. If an rpm is badly constructed with identical inode values
for multiple hardlinked files, such an rpm will otherwise access memory
out of array bounds and cause memory corruption and crashes.

The fix is to add in the sanity check and exit if bad circumstances
are found. We need to fix the caller to check the return code too.

RP 2014/6/10

Upstream-Status: Pending

  Summary:
RevisionChanges Path
2.193.4.9   +11 -1  rpm/lib/fsm.c
1.43.2.7+12 -2  rpm/rpmio/iosm.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/fsm.c
  
  $ cvs diff -u -r2.193.4.8 -r2.193.4.9 fsm.c
  --- rpm/lib/fsm.c 10 Sep 2014 20:10:05 -  2.193.4.8
  +++ rpm/lib/fsm.c 27 Feb 2016 21:46:10 -  2.193.4.9
  @@ -496,6 +496,11 @@
   }
   
   if (fsm->goal == IOSM_PKGBUILD) --fsm->li->linksLeft;
  +if (fsm->li->linksLeft > (int)st->st_nlink) {
  + rpmlog(RPMLOG_ERR, _("Corrupted hardlinks found (count %d does not 
match %d), exiting.\n"), fsm->li->linksLeft, st->st_nlink);
  + return -1;
  +}
  +
   fsm->li->filex[fsm->li->linksLeft] = fsm->ix;
   /*@-observertrans -dependenttrans@*/
   fsm->li->nsuffix[fsm->li->linksLeft] = fsm->nsuffix;
  @@ -1881,8 +1886,13 @@
fsm->postpone = iosmFileActionSkipped(fsm->action);
if (fsm->goal == IOSM_PKGINSTALL || fsm->goal == IOSM_PKGBUILD) {
/*@-evalorder@*/ /* FIX: saveHardLink can modify fsm */
  - if (S_ISREG(st->st_mode) && st->st_nlink > 1)
  + if (S_ISREG(st->st_mode) && st->st_nlink > 1) {
fsm->postpone = saveHardLink(fsm);
  + if (fsm->postpone < 0) {
  + rc = RPMRC_FAIL;
  + break;
  + }
  + }
/*@=evalorder@*/
}
   if (fsmGetFi(fsm)->mapflags & IOSM_PAYLOAD_LIST) fsm->postpone = 1;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/iosm.c
  
  $ cvs diff -u -r1.43.2.6 -r1.43.2.7 iosm.c
  --- rpm/rpmio/iosm.c  19 Jul 2014 18:58:57 -  1.43.2.6
  +++ rpm/rpmio/iosm.c  27 Feb 2016 21:46:10 -  1.43.2.7
  @@ -518,6 +518,11 @@
   }
   
   if (iosm->goal == IOSM_PKGBUILD) --iosm->li->linksLeft;
  +if (iosm->li->linksLeft > (int) st->st_nlink) {
  + rpmlog(RPMLOG_ERR, _("Corrupted hardlinks found (count %d does not 
match %d), exiting.\n"), iosm->li->linksLeft, st->st_nlink);
  + return -1;
  +}
  +
   iosm->li->filex[iosm->li->linksLeft] = iosm->ix;
   /*@-observertrans -dependenttrans@*/
   iosm->li->nsuffix[iosm->li->linksLeft] = iosm->nsuffix;
  @@ -1918,8 +1923,13 @@
iosm->postpone = iosmFileActionSkipped(iosm->action);
if (iosm->goal == IOSM_PKGINSTALL || iosm->goal == IOSM_PKGBUILD) {
/*@-evalorder@*/ /* FIX: saveHardLink can modify iosm */
  - if (S_ISREG(st->st_mode) && st->st_nlink > 1)
  - iosm->postpone = saveHardLink(iosm);
  + if (S_ISREG(st->st_mode) && st->st_nlink > 1) {
  + iosm->postpone = saveHardLink(iosm);
  + if (iosm->postpone < 0) {
  + rc = RPMRC_FAIL;
  + break;
  + }
  + }
/*@=evalorder@*/
}
   {rpmfi fi = (rpmfi) iosmGetFi(iosm);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/build/ files.c

2016-02-27 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:   27-Feb-2016 22:39:47
  Branch: rpm-5_4  Handle: 2016022721394700

  Modified files:   (Branch: rpm-5_4)
rpm/build   files.c

  Log:
If we run builds on a filesystem with 64 bit inodes like XFS, we need to
map the inode numbers to something 32 bit since the cpio header only allows
for 32 bit inode values. If we don't do this:

#define SET_NUM_FIELD(phys, val, space) \
sprintf(space, "%8.8lx", (unsigned long) (val)); \
memcpy(phys, space, 8)

from cpio.c will print larger that 8 character values and then truncate the
LSBs. This generates cpio files where hardlinked files may have the same
inode number. The resulting rpms are then corrupted.

There is a separate patch for the crash the identical inode numbers causes
when extracting the rpm.

Patch taken from 
http://git.pld-linux.org/?p=packages/rpm.git;a=commitdiff;h=105
26c23aac60b7b636e4c93862887dbef8e8f15

RP 2014/6/10

Upstream-Status: Pending

  Summary:
RevisionChanges Path
1.369.2.11  +32 -33 rpm/build/files.c
  

  patch -p0 <<'@@ .'
  Index: rpm/build/files.c
  
  $ cvs diff -u -r1.369.2.10 -r1.369.2.11 files.c
  --- rpm/build/files.c 11 May 2015 21:10:16 -  1.369.2.10
  +++ rpm/build/files.c 27 Feb 2016 21:39:47 -  1.369.2.11
  @@ -1328,6 +1328,26 @@
   return dalgo;
   }
   
  +static int isHardLink(FileListRec flp, FileListRec tlp)
  +{
  +return ((S_ISREG(flp->fl_mode) && S_ISREG(tlp->fl_mode)) &&
  +((flp->fl_nlink > 1) && (flp->fl_nlink == tlp->fl_nlink)) &&
  +(flp->fl_ino == tlp->fl_ino) &&
  +(flp->fl_dev == tlp->fl_dev));
  +}
  +
  +static int seenHardLink(FileList fl, FileListRec flp, ino_t *fileid)
  +{
  +FileListRec ilp;
  +for (ilp = fl->fileList; ilp < flp; ilp++) {
  +if (isHardLink(flp, ilp)) {
  +*fileid = ilp - fl->fileList;
  +return 1;
  +}
  +}
  +return 0;
  +}
  +
   /**
* Add file entries to header.
* @todo Should directories have %doc/%config attributes? (#14531)
  @@ -1374,6 +1394,7 @@
   
   for (i = 0, flp = fl->fileList; i < fl->fileListRecsUsed; i++, flp++) {
const char *s;
  + ino_t fileid = flp - fl->fileList;
   
/* Merge duplicate entries. */
while (i < (fl->fileListRecsUsed - 1) &&
  @@ -1436,6 +1457,13 @@
/* Leave room for both dirname and basename NUL's */
dpathlen += (strlen(flp->diskURL) + 2);
   
  + /* Excludes and dupes have been filtered out by now. */
  + if (S_ISREG(flp->fl_mode)) {
  + if (flp->fl_nlink == 1 || !seenHardLink(fl, flp, &fileid)) {
  + fl->totalFileSize += flp->fl_size;
  + }
  + }
  +
/*
 * Make the header, the OLDFILENAMES will get converted to a 
 * compressed file list write before we write the actual package to
  @@ -1518,7 +1546,11 @@
   
/* XXX Hash instead of 64b->32b truncate to prevent aliasing. */
{   ino_t _ino = flp->fl_ino;
  + /* don't use hash here, as hash collisions which happen on large 
packages
  +cause bus errors in rpmbuild
ui32 = hashFunctionString(0, &_ino, sizeof(_ino));
  + */
  + ui32 = fileid + 1;
}
he->tag = RPMTAG_FILEINODES;
he->t = RPM_UINT32_TYPE;
  @@ -1751,39 +1783,6 @@
IOSM_MAP_TYPE | IOSM_MAP_MODE | IOSM_MAP_UID | IOSM_MAP_GID;
if (isSrc)
fi->fmapflags[i] |= IOSM_FOLLOW_SYMLINKS;
  -
  - if (S_ISREG(flp->fl_mode)) {
  - int bingo = 1;
  - /* Hard links need be tallied only once. */
  - if (flp->fl_nlink > 1) {
  - FileListRec jlp = flp + 1;
  - int j = i + 1;
  - for (; (unsigned)j < fi->fc; j++, jlp++) {
  - /* follow outer loop logic */
  - while (((jlp - fl->fileList) < (fl->fileListRecsUsed - 1)) 
&&
  - !strcmp(jlp->fileURL, jlp[1].fileURL))
  - jlp++;
  - if (jlp->flags & RPMFILE_EXCLUDE) {
  - j--;
  - /*@innercontinue@*/ continue;
  - }
  - if (jlp->flags & RPMFILE_GHOST)
  - /*@innercontinue@*/ continue;
  - if (!S_ISREG(jlp->fl_mode))
  - /*@innercontinue@*/ continue;
  - if (

[CVS] RPM: rpm-5_4: rpm/rpmdb/ tagname.c

2016-02-27 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:   27-Feb-2016 22:34:57
  Branch: rpm-5_4  Handle: 2016022721345700

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   tagname.c

  Log:
fix a endian incompatible error in generating rpm tag

A flaw was found in the way rpm generating arbitrary tags, which leads to a
incorrect query result, this issue is introduced by a incompatible endianess
when the generating process is executed on different architectures.

This patch resolves it by taking the byte order that host uses.

Upstream-Status: Pending

Signed-off-by: Ming Liu 

  Summary:
RevisionChanges Path
1.34.2.12   +16 -0  rpm/rpmdb/tagname.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/tagname.c
  
  $ cvs diff -u -r1.34.2.11 -r1.34.2.12 tagname.c
  --- rpm/rpmdb/tagname.c   27 Sep 2014 15:52:36 -  1.34.2.11
  +++ rpm/rpmdb/tagname.c   27 Feb 2016 21:34:57 -  1.34.2.12
  @@ -3,6 +3,19 @@
*/
   
   #include "system.h"
  +#include 
  +
  +/* Don't redefine this macro if it already exists */
  +#ifndef le32toh
  +#ifdef __USE_BSD
  +#include 
  +#if __BYTE_ORDER == __LITTLE_ENDIAN
  +#define le32toh(x) (x)
  +#else
  +#define le32toh(x) __bswap_32(x)
  +#endif
  +#endif /* __USE_BSD */
  +#endif /* le32toh */
   
   #include   /* XXX DIGEST_CTX, xtolower, xstrcasecmp */
   #include 
  @@ -153,7 +166,10 @@
   xx = rpmDigestUpdate(ctx, s, nb);
   xx = rpmDigestFinal(ctx, &digest, &digestlen, 0);
   if (digest && digestlen > 4) {
  + /* The tag is stored in a uniform byte order for cross-endian 
compatibility.
  +Swap to the host uses. */
memcpy(&tag, digest + (digestlen - 4), 4);
  + tag = le32toh(tag);
tag = (rpmTag) (tag & 0x3fff);
tag = (rpmTag) (tag | 0x4000);
   }
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmdb/ hdrfmt.c

2016-02-27 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:   27-Feb-2016 22:32:07
  Branch: rpm-5_4  Handle: 2016022721320700

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   hdrfmt.c

  Log:
Add the ability to query the packageorigin

Written by jbj at rpm5.org

Upstream-Status: Inappropriate [not author]

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
1.151.2.32  +4  -2  rpm/rpmdb/hdrfmt.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/hdrfmt.c
  
  $ cvs diff -u -r1.151.2.31 -r1.151.2.32 hdrfmt.c
  --- rpm/rpmdb/hdrfmt.c2 Jun 2015 15:09:14 -   1.151.2.31
  +++ rpm/rpmdb/hdrfmt.c27 Feb 2016 21:32:07 -  1.151.2.32
  @@ -2534,8 +2534,10 @@
   int rc = 1;
   
   he->tag = RPMTAG_PACKAGEORIGIN;
  -if (!headerGet(h, he, HEADERGET_NOEXTENSION)
  - && (origin = headerGetOrigin(h)) != NULL)
  +/* XXX two sources for tag data: what search precedence? */
  +if (headerGet(h, he, HEADERGET_NOEXTENSION))
  + rc = 0;
  +else if ((origin = headerGetOrigin(h)) != NULL)
   {
he->t = RPM_STRING_TYPE;
he->p.str = xstrdup(origin);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ bson.c bson.h

2016-02-27 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:   27-Feb-2016 22:14:40
  Branch: rpm-5_4  Handle: 2016022721144000

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   bson.c bson.h

  Log:
Some architectures do not have __sync_add_and_fetch_8 implemented.

MIPS (32-bit) and some PPC systems do not have sync_add_and_fetch_8.

Provide an alternative.  This alternative function is based on code from:
  https://github.com/mongodb/libbson/blob/master/src/bson/bson-atomic.c

Code is under an Apache 2.0 License.

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
2.4.4.14+19 -2  rpm/rpmio/bson.c
2.3.4.13+9  -1  rpm/rpmio/bson.h
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/bson.c
  
  $ cvs diff -u -r2.4.4.13 -r2.4.4.14 bson.c
  --- rpm/rpmio/bson.c  16 May 2015 20:17:12 -  2.4.4.13
  +++ rpm/rpmio/bson.c  27 Feb 2016 21:14:40 -  2.4.4.14
  @@ -3863,13 +3863,30 @@
   #elif defined BSON_OS_WIN32
  uint64_t seq = InterlockedIncrement64 ((int64_t *)&context->seq64);
   #else
  -   uint64_t seq = __sync_fetch_and_add_8 (&context->seq64, 1);
  +   uint64_t seq = bson_atomic_int64_add (&context->seq64, 1);
   #endif
   
  seq = BSON_UINT64_TO_BE (seq);
  memcpy (&oid->bytes[4], &seq, 8);
   }
   
  +#ifdef __BSON_NEED_ATOMIC_64
  +#include 
  +static pthread_mutex_t gSync64 = PTHREAD_MUTEX_INITIALIZER;
  +int64_t
  +bson_atomic_int64_add (volatile int64_t *p,
  +   int64_t   n)
  +{
  +   int64_t ret;
  +
  +   pthread_mutex_lock (&gSync64);
  +   *p += n;
  +   ret = *p;
  +   pthread_mutex_unlock (&gSync64);
  +
  +   return ret;
  +}
  +#endif
   
   /**
* bson_context_new:
  @@ -7805,7 +7822,7 @@
 gh...@aladdin.com
   
*/
  -/* $Id: bson.c,v 2.4.4.13 2015/05/16 20:17:12 jbj Exp $ */
  +/* $Id: bson.c,v 2.4.4.14 2016/02/27 21:14:40 jbj Exp $ */
   /*
 Independent implementation of MD5 (RFC 1321).
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/bson.h
  
  $ cvs diff -u -r2.3.4.12 -r2.3.4.13 bson.h
  --- rpm/rpmio/bson.h  6 Oct 2014 19:43:58 -   2.3.4.12
  +++ rpm/rpmio/bson.h  27 Feb 2016 21:14:40 -  2.3.4.13
  @@ -879,10 +879,18 @@
   
   BSON_BEGIN_DECLS
   
  +/* Some architectures do not support __sync_add_and_fetch_8 */
  +#if (__mips == 32) || (defined(__PPC__) && 
!defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8))
  +# define __BSON_NEED_ATOMIC_64 1
  +#endif
   
   #if defined(__GNUC__)
   # define bson_atomic_int_add(p, v)   (__sync_add_and_fetch(p, v))
  -# define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
  +#ifndef __BSON_NEED_ATOMIC_64
  +#  define bson_atomic_int64_add(p, v) (__sync_add_and_fetch_8(p, v))
  +# else
  +   int64_t bson_atomic_int64_add (volatile int64_t *p, int64_t n);
  +# endif
   # define bson_memory_barrier __sync_synchronize
   #elif defined(_MSC_VER) || defined(_WIN32)
   # define bson_atomic_int_add(p, v)   (InterlockedExchangeAdd((long int 
*)(p), v))
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ keccak.c

2016-02-27 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:   27-Feb-2016 22:13:01
  Branch: rpm-5_4  Handle: 2016022721130100

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   keccak.c

  Log:
rpm - rpmio/keccak.c: make SSE/MMX dependent upon gcc config

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
1.5.4.2 +7  -3  rpm/rpmio/keccak.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/keccak.c
  
  $ cvs diff -u -r1.5.4.1 -r1.5.4.2 keccak.c
  --- rpm/rpmio/keccak.c29 Sep 2014 18:26:48 -  1.5.4.1
  +++ rpm/rpmio/keccak.c27 Feb 2016 21:13:01 -  1.5.4.2
  @@ -17,9 +17,13 @@
   #if OPTIMIZED == 64
   /* = "KeccakOpt64-settings.h" */
   #define Unrolling 18
  -//#define UseBebigokimisa
  -#define UseSSE
  -//#define UseMMX
  +#if defined(__SSE2__)
  + #define UseSSE
  +#elif defined(__MMX__)
  + #define UseMMX
  +#else
  + #define UseBebigokimisa
  +#endif
   /* = */
   #endif
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/python/ rpmts-py.c

2016-02-27 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:   27-Feb-2016 22:10:26
  Branch: rpm-5_4  Handle: 2016022721102500

  Modified files:   (Branch: rpm-5_4)
rpm/python  rpmts-py.c

  Log:
Fix an issue where the PACKAGEORIGIN is not properly stored.

Restore the rpmtsCallback fdSetOpen call and related code.

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
1.111.2.13  +14 -1  rpm/python/rpmts-py.c
  

  patch -p0 <<'@@ .'
  Index: rpm/python/rpmts-py.c
  
  $ cvs diff -u -r1.111.2.12 -r1.111.2.13 rpmts-py.c
  --- rpm/python/rpmts-py.c 6 Oct 2014 19:44:50 -   1.111.2.12
  +++ rpm/python/rpmts-py.c 27 Feb 2016 21:10:25 -  1.111.2.13
  @@ -672,6 +672,8 @@
   Header h = (Header) hd;
   struct rpmtsCallbackType_s * cbInfo = data;
   PyObject * pkgObj = (PyObject *) pkgKey;
  +PyObject * oh = NULL;
  +const char * origin = NULL;
   PyObject * args, * result;
   static FD_t fd;
   
  @@ -693,8 +695,16 @@
pkgObj = Py_None;
Py_INCREF(pkgObj);
}
  -} else
  +} else {
Py_INCREF(pkgObj);
  + /* XXX yum has (h, rpmloc) tuple as pkgKey. Extract the path. */
  + if (!(PyTuple_Check(pkgObj) && PyArg_ParseTuple(pkgObj, "|Os", &oh, 
&origin)))
  + origin = NULL;
  + /* XXX clean up the path, yum paths start "//..." */
  + if (origin && origin[0] == '/' && origin[1] == '/')
  + origin++;
  +}
  +
   
   PyEval_RestoreThread(cbInfo->_save);
   
  @@ -723,6 +733,9 @@
   
fcntl(Fileno(fd), F_SETFD, FD_CLOEXEC);
   
  + if (origin != NULL)
  + (void) fdSetOpen(fd, origin, 0, 0);
  +
return fd;
   } else
   if (what == RPMCALLBACK_INST_CLOSE_FILE) {
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


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

2016-02-27 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:   27-Feb-2016 22:09:07
  Branch: rpm-5_4  Handle: 2016022721090700

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

  Log:
Fix a typo in the rpmio Makefile.am

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

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

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/Makefile.am
  
  $ cvs diff -u -r1.293.2.56 -r1.293.2.57 Makefile.am
  --- rpm/rpmio/Makefile.am 17 May 2015 05:03:40 -  1.293.2.56
  +++ rpm/rpmio/Makefile.am 27 Feb 2016 21:09:07 -  1.293.2.57
  @@ -121,7 +121,7 @@
   
   pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX)
   pkginc_HEADERS = argv.h mire.h rpmzlog.h yarn.h \
  - rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h
  + rpmbf.h rpmcb.h rpmio.h rpmlog.h rpmiotypes.h rpmmacro.h \
rpmpgp.h rpmsw.h rpmutil.h
   noinst_HEADERS = \
ar.h bcon.h bson.h cpio.h crc.h envvar.h fnmatch.h fts.h glob.h iosm.h \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ macro.c

2016-02-27 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:   27-Feb-2016 22:07:43
  Branch: rpm-5_4  Handle: 2016022721074300

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   macro.c

  Log:
Fix an issue where parseEmbedded is not defined, but is still used.

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
2.249.2.30  +0  -3  rpm/rpmio/macro.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/macro.c
  
  $ cvs diff -u -r2.249.2.29 -r2.249.2.30 macro.c
  --- rpm/rpmio/macro.c 27 Feb 2016 21:06:50 -  2.249.2.29
  +++ rpm/rpmio/macro.c 27 Feb 2016 21:07:43 -  2.249.2.30
  @@ -1616,8 +1616,6 @@
* @retval *avp  invocation args
* @return   script string
*/
  -#if defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_MOZJS) || 
defined(WITH_JNIEMBED) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) 
|| defined(WITH_RUBYEMBED) || defined(WITH_MRUBY_EMBED) || defined(WITH_SQLITE) 
|| defined(WITH_SQUIRREL) || defined(WITH_TCL)
  -
   static char _FIXME_embedded_interpreter_eval_returned_null[] =
   "FIXME: embedded interpreter eval returned null.";
   
  @@ -1668,7 +1666,6 @@
   script[nb] = '\0';
   return script;
   }
  -#endif
   
   /**
* The main macro recursion loop.
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ macro.c

2016-02-27 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:   27-Feb-2016 22:06:50
  Branch: rpm-5_4  Handle: 2016022721065000

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   macro.c

  Log:
- sanity

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

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/macro.c
  
  $ cvs diff -u -r2.249.2.28 -r2.249.2.29 macro.c
  --- rpm/rpmio/macro.c 11 May 2015 21:10:18 -  2.249.2.28
  +++ rpm/rpmio/macro.c 27 Feb 2016 21:06:50 -  2.249.2.29
  @@ -3376,7 +3376,7 @@
return 0;
   
   val = rpmExpand(arg, NULL);
  -if (!(val && *val != '%'))
  +if (!(val && *val && *val != '%'))
rc = 0;
   else if (*val == 'Y' || *val == 'y')
rc = 1;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ mongoc.h

2016-02-27 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:   27-Feb-2016 22:05:25
  Branch: rpm-5_4  Handle: 2016022721052500

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   mongoc.h

  Log:
Fix errors when building with sasl2 disabled

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
1.1.2.5 +5  -0  rpm/rpmio/mongoc.h
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/mongoc.h
  
  $ cvs diff -u -r1.1.2.4 -r1.1.2.5 mongoc.h
  --- rpm/rpmio/mongoc.h6 Oct 2014 19:43:58 -   1.1.2.4
  +++ rpm/rpmio/mongoc.h27 Feb 2016 21:05:25 -  1.1.2.5
  @@ -38,8 +38,10 @@
   # include 
   #endif
   
  +#ifdef HAVE_LIBSASL2
   #include 
   #include 
  +#endif
   
   #include 
   #include 
  @@ -2455,6 +2457,8 @@
   /*==*/
   /* --- mongoc-sasl-private.h */
   
  +#ifdef MONGOC_ENABLE_SASL
  +
   BSON_BEGIN_DECLS
   
   
  @@ -2498,6 +2502,7 @@
   
   
   BSON_END_DECLS
  +#endif
   
   /*==*/
   /* --- mongoc-ssl-private.h */
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ transaction.c

2016-02-27 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:   27-Feb-2016 22:03:42
  Branch: rpm-5_4  Handle: 2016022721034100

  Modified files:   (Branch: rpm-5_4)
rpm/lib transaction.c

  Log:
From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001
From: Robert Yang 
Date: Wed, 2 Dec 2015 00:56:07 -0800
Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32

The following error can occur:
  smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 
libc6-dbg-2.22-r0.1@lib32_
mips32r2octeon3
error: file /sbin/ldconfig conflicts between attempted installs of 
libc6-2.22-r0
.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
error: file /sbin/.debug/ldconfig conflicts between attempted installs of 
libc6-
dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32

This was because:
transactions_color = 001 (ELF32) & 010 (ELF64) & 100 (ELF32 N32 MIPS64)
FColor = Current file color (001) & transaction_color (111)
oFcolor = Previous file color (100) & transaction_color (111)

There are two places where the conflict comparisons occur.  In both places
the 'else' clause was too restrictive (opposite of the 'positive' clause).
This caused the system to only permit a binary comparison - "new preferred" 
or
"old preferred".  It did not permissing "neither preferred".  By removing 
the
else comparison the system will now perform a 'last-in-wins' resolution when
"neither is preferred".

Upstream-Status: Pending

Signed-off-by: Robert Yang 
Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
1.429.2.17  +2  -2  rpm/lib/transaction.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/transaction.c
  
  $ cvs diff -u -r1.429.2.16 -r1.429.2.17 transaction.c
  --- rpm/lib/transaction.c 11 May 2015 21:10:17 -  1.429.2.16
  +++ rpm/lib/transaction.c 27 Feb 2016 21:03:41 -  1.429.2.17
  @@ -166,7 +166,7 @@
fi->actions[fx] = FA_SKIPCOLOR;
   #endif
rConflicts = 0;
  - } else if (FColor & prefcolor) {
  + } else {
   #ifdef   REFERENCE
rpmfsSetAction(fs, fx, FA_CREATE);
   #else
  @@ -432,7 +432,7 @@
fi->actions[i] = FA_SKIPCOLOR;
rConflicts = 0;
} else
  - if (FColor == 0 && oFColor == 0) {
  + {
/* ... otherwise, do both, last in wins. */
otherFi->actions[otherFileNum] = FA_CREATE;
fi->actions[i] = FA_CREATE;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ rpmfc.c

2016-02-27 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:   27-Feb-2016 22:02:28
  Branch: rpm-5_4  Handle: 2016022721022700

  Modified files:   (Branch: rpm-5_4)
rpm/lib rpmfc.c

  Log:
iFrom 16dc683aa50be9789d1674734b06a8a955ff22ad Mon Sep 17 00:00:00 2001
From: Robert Yang 
Date: Thu, 26 Nov 2015 01:36:40 -0800
Subject: [PATCH] lib/rpmfc.c: fix for N32 MIPS64

It is 'N32 MIPS64', not 'N32 MIPS32' as command file shows:
$ file image/usr/bin/getent
getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip]

And "rpm -qp --filecolor" was wrong (it was 1, but should be 4).

Upstream-Status: Pending

Signed-off-by: Robert Yang 

  Summary:
RevisionChanges Path
1.75.2.25   +1  -1  rpm/lib/rpmfc.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfc.c
  
  $ cvs diff -u -r1.75.2.24 -r1.75.2.25 rpmfc.c
  --- rpm/lib/rpmfc.c   16 Feb 2015 21:40:40 -  1.75.2.24
  +++ rpm/lib/rpmfc.c   27 Feb 2016 21:02:27 -  1.75.2.25
  @@ -577,7 +577,7 @@
 { " not stripped", RPMFC_NOTSTRIPPED },
 { " archive",  RPMFC_ARCHIVE },
   
  -  { "MIPS, N32 MIPS32",  RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
  +  { "MIPS, N32 MIPS64",  RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
 { "ELF 32-bit",RPMFC_ELF32|RPMFC_INCLUDE },
 { "ELF 64-bit",RPMFC_ELF64|RPMFC_INCLUDE },
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/tools/ debugedit.c

2016-02-27 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:   27-Feb-2016 22:01:05
  Branch: rpm-5_4  Handle: 2016022721010500

  Modified files:   (Branch: rpm-5_4)
rpm/tools   debugedit.c

  Log:
[PATCH] define EM_AARCH64

Upstream-Status: pending

EM_AARCH64 maybe not be defined due to old version elf.h, and lead to
that debugedit can not work on aarch64 elf object files, since there is
no other dependence, except these two macro, define them to make
debugedit work on aarch64 elf files.

Signed-off-by: Roy Li 

  Summary:
RevisionChanges Path
2.23.2.17   +7  -0  rpm/tools/debugedit.c
  

  patch -p0 <<'@@ .'
  Index: rpm/tools/debugedit.c
  
  $ cvs diff -u -r2.23.2.16 -r2.23.2.17 debugedit.c
  --- rpm/tools/debugedit.c 27 Feb 2016 20:45:24 -  2.23.2.16
  +++ rpm/tools/debugedit.c 27 Feb 2016 21:01:05 -  2.23.2.17
  @@ -34,6 +34,13 @@
   
   #include 
   
  +#ifndef EM_AARCH64
  +#define EM_AARCH64  183 /* ARM AARCH64 */
  +#endif
  +#ifndef R_AARCH64_ABS32
  +#define R_AARCH64_ABS32 258
  +#endif 
  +
   /* some defines taken from the dwarf standard */
   
   #define DW_TAG_compile_unit  0x11
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ verify.c

2016-02-27 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:   27-Feb-2016 21:59:29
  Branch: rpm-5_4  Handle: 2016022720592900

  Modified files:   (Branch: rpm-5_4)
rpm/lib verify.c

  Log:
rpm: opendb before rpmverifyscript to avoid null point input

If the command is "rpm -V" and the return value of (headerIsEntry(h, 
RPMTAG_VERI
FYSCRIPT)
|| headerIsEntry(h, RPMTAG_SANITYCHECK)) located in /lib/verify.c is true, 
it wi
ll call
rpmpsmStage function(rpmVerifyScript->rpmpsmScriptStage->rpmpsmStage) and 
occur
segment
fault because of null point(rpmtsGetRdb(ts) == NULL and 
rpmtsGetRdb(ts)->db_txn)
.
So we open rpmdb to avoid bad input when find headerIsEntry true.

Upstream-Status: Pending

Signed-off-by: Zhixiong Chi 

  Summary:
RevisionChanges Path
2.201.4.13  +2  -0  rpm/lib/verify.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/verify.c
  
  $ cvs diff -u -r2.201.4.12 -r2.201.4.13 verify.c
  --- rpm/lib/verify.c  19 Jul 2014 23:33:38 -  2.201.4.12
  +++ rpm/lib/verify.c  27 Feb 2016 20:59:29 -  2.201.4.13
  @@ -613,6 +613,8 @@
{
FD_t fdo = fdDup(STDOUT_FILENO);
   
  + rpmtsOpenDB(ts, O_RDONLY);/*Open the DB to avoid null 
point input in function rpmpsmStage()*/
  +
rc = rpmfiSetHeader(fi, h);
if ((rc = rpmVerifyScript(qva, ts, fi, fdo)) != 0)
ec += rc;
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmdb/ signature.c

2016-02-27 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:   27-Feb-2016 21:58:00
  Branch: rpm-5_4  Handle: 201602272058

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   signature.c

  Log:
From 64851c6622aff64787a9fcea26cccde183b7c743 Mon Sep 17 00:00:00 2001
From: "Roy.Li" 
Date: Tue, 11 Nov 2014 16:28:22 +0800
Subject: [PATCH] using poptParseArgvString to parse the
 _gpg_check_password_cmd

Upstream-Status: Pending

Both __gpg_check_password_cmd and __gpg_sign_cmd include "%{_gpg_name}", but
strace shows that gpg_name has a quote when run _gpg_check_password,
but not when run __gpg_sign_cmd; for example, if gpg_name is "tester"

execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose",
"--passphrase-fd", "3", "-u", "\"tester\"", "-so", "-"], [/* 20 vars 
*/]) =
0

execve("/usr/bin/gpg", ["gpg", "--batch", "--no-verbose", "--no-armor",
"--passphrase-fd", "3", "--no-secmem-warning", "-u", "tester", 
"-sbo"..,) =
0

it can be fixed by removing the quote around %{gpg_name} when define
__gpg_check_password_cmd in macros/macros, like below, but if gpg_name 
includes
space, it will not work.

 %__gpg_check_password_cmd   %{__gpg} \
gpg --batch --no-verbose --passphrase-fd 3 -u %{_gpg_name} -so -

The poptParseArgvString function is used to parse _gpg_sign_cmd, so using
poptParseArgvString to parse __gpg_check_password_cmd to fix this issue.

Signed-off-by: Roy.Li 

  Summary:
RevisionChanges Path
1.68.2.12   +1  -1  rpm/rpmdb/signature.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/signature.c
  
  $ cvs diff -u -r1.68.2.11 -r1.68.2.12 signature.c
  --- rpm/rpmdb/signature.c 19 Feb 2015 22:05:53 -  1.68.2.11
  +++ rpm/rpmdb/signature.c 27 Feb 2016 20:58:00 -  1.68.2.12
  @@ -537,7 +537,7 @@
(void) setenv("GNUPGHOME", gpg_path, 1);
   
cmd = rpmExpand("%{?__gpg_check_password_cmd}", NULL);
  - rc = argvSplit(&av, cmd, NULL);
  + rc = poptParseArgvString(cmd, NULL, (const char ***)&av);
if (!rc)
rc = execve(av[0], (char *const *)av+1, environ);
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmdb/ Makefile.am

2016-02-27 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:   27-Feb-2016 21:55:24
  Branch: rpm-5_4  Handle: 2016022720552400

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   Makefile.am

  Log:
Occasionally the cp -p fails with a non-zero return code.  This will cause
the system abort the build.

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
1.134.2.26  +7  -4  rpm/rpmdb/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/Makefile.am
  
  $ cvs diff -u -r1.134.2.25 -r1.134.2.26 Makefile.am
  --- rpm/rpmdb/Makefile.am 27 Feb 2016 20:13:54 -  1.134.2.25
  +++ rpm/rpmdb/Makefile.am 27 Feb 2016 20:55:24 -  1.134.2.26
  @@ -293,11 +293,14 @@
   #lcov-upload: lcov
   #rsync -rvz -e ssh --delete lcov/* ???
   
  +$(builddir)/logio_recover_template: $(srcdir)/logio_recover_template
  + @if test ".$(builddir)" != ".$(srcdir)"; then \
  + cp -fp $(srcdir)/logio_recover_template \
  +   $(builddir)/logio_recover_template ; \
  +  fi
  +
   logio_BUILT = logio_auto.c logio_autop.c logio_auto.h logio_template
  -$(logio_BUILT):  logio.awk logio.src logio_recover_template
  - @test -e $(builddir)/logio_recover_template || \
  - cp -p $(srcdir)/logio_recover_template \
  -   $(builddir)/logio_recover_template
  +$(logio_BUILT):  logio.awk logio.src $(builddir)/logio_recover_template
@rm -f $(logio_BUILT)
@$(AWK) -f $(srcdir)/logio.awk \
-v header_file=logio_auto.h \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ depends.c

2016-02-27 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:   27-Feb-2016 21:49:19
  Branch: rpm-5_4  Handle: 2016022720491900

  Modified files:   (Branch: rpm-5_4)
rpm/lib depends.c

  Log:
Enable platform tag matching workaround in OE.

When installing some LSB packages the 'platform' field in the package
appears to be invalid.  Instead of relying solely on the platform comparison
we also want to generate a perceived platform based on the valid rpm 
contents
of arch and os.

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
1.461.4.11  +1  -1  rpm/lib/depends.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  
  $ cvs diff -u -r1.461.4.10 -r1.461.4.11 depends.c
  --- rpm/lib/depends.c 27 Feb 2016 20:20:59 -  1.461.4.10
  +++ rpm/lib/depends.c 27 Feb 2016 20:49:19 -  1.461.4.11
  @@ -603,7 +603,7 @@
platform = rpmExpand(arch, "-unknown-", os, NULL);
   
rc = rpmPlatformScore(platform, platpat, nplatpat);
  -#if defined(RPM_VENDOR_MANDRIVA)
  +#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE)
/*
 * If no match on platform tag, we'll try again with arch tag
 * in case platform tag is inconsistent with it, which is the case
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/tools/ debugedit.c

2016-02-27 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:   27-Feb-2016 21:45:24
  Branch: rpm-5_4  Handle: 2016022720452400

  Modified files:   (Branch: rpm-5_4)
rpm/tools   debugedit.c

  Log:
debugedit: fix segment fault while file's bss offset have a large number

While ELF_C_RDWR_MMAP was used, elf_begin invoked mmap() to map file
into memory. While the file's bss Offset has a large number, elf_update
caculated file size by __elf64_updatenull_wrlock and the size was
enlarged.

In this situation, elf_update invoked ftruncate to enlarge the file,
and memory size (elf->maximum_size) also was incorrectly updated.
There was segment fault in elf_end which invoked munmap with the
length is the enlarged file size, not the mmap's length.

Before the above operations, invoke elf_begin/elf_update/elf_end
with ELF_C_RDWR and ELF_F_LAYOUT set to enlarge the above file, it
could make sure the file is safe for the following elf operations.

Upstream-Status: Pending
Signed-off-by: Hongxu Jia 

  Summary:
RevisionChanges Path
2.23.2.16   +25 -0  rpm/tools/debugedit.c
  

  patch -p0 <<'@@ .'
  Index: rpm/tools/debugedit.c
  
  $ cvs diff -u -r2.23.2.15 -r2.23.2.16 debugedit.c
  --- rpm/tools/debugedit.c 27 Feb 2016 20:43:44 -  2.23.2.15
  +++ rpm/tools/debugedit.c 27 Feb 2016 20:45:24 -  2.23.2.16
  @@ -1529,6 +1529,28 @@
 }
   }
   
  +/* It avoided the segment fault while file's bss offset have a large number.
  +   See https://bugzilla.redhat.com/show_bug.cgi?id=1019707
  +   https://bugzilla.redhat.com/show_bug.cgi?id=1020842 for detail. */
  +void valid_file(int fd)
  +{
  +  Elf *elf = elf_begin (fd, ELF_C_RDWR, NULL);
  +  if (elf == NULL)
  +  {
  +error (1, 0, "elf_begin: %s", elf_errmsg (-1));
  +return;
  +  }
  +
  +  elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT);
  +
  +  if (elf_update (elf, ELF_C_WRITE) < 0)
  +error (1, 0, "elf_update: %s", elf_errmsg (-1));
  +
  +  elf_end (elf);
  +
  +  return;
  +}
  +
   int
   main (int argc, char *argv[])
   {
  @@ -1631,6 +1653,9 @@
 exit (1);
   }
   
  +  /* Make sure the file is valid. */
  +  valid_file(fd);
  +
 dso = fdopen_dso (fd, file);
 if (dso == NULL)
   exit (1);
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/tools/ debugedit.c

2016-02-27 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:   27-Feb-2016 21:43:44
  Branch: rpm-5_4  Handle: 2016022720434400

  Modified files:   (Branch: rpm-5_4)
rpm/tools   debugedit.c

  Log:
During the recalculation of the buildid, it's necessary to change the word
back to the original endian.  However, if we do this in-place, we've also
affected the headers that we're also working on.  The side effect of this is
we can no longer rely on 'sh_type' as it may have been changed.

This patch ensures that any time we translate the loaded data to the machine
format, we only do it in a backup copy and never the original copy.

Note: in all other places a backup copy was used, just not buildid 
processing.

Also the process (...) function was modified to verify the data is not
NULL as well.  This is an extra check and is not strictly necessary.

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
2.23.2.15   +26 -21 rpm/tools/debugedit.c
  

  patch -p0 <<'@@ .'
  Index: rpm/tools/debugedit.c
  
  $ cvs diff -u -r2.23.2.14 -r2.23.2.15 debugedit.c
  --- rpm/tools/debugedit.c 9 Sep 2014 17:39:40 -   2.23.2.14
  +++ rpm/tools/debugedit.c 27 Feb 2016 20:43:44 -  2.23.2.15
  @@ -1403,7 +1403,8 @@
const void *data, size_t size)
   {
   memchunk chunk = { .data = (void *) data, .size = size };
  -hashFunctionContextUpdateMC (ctx, &chunk);
  +if (data != NULL && size != 0)
  +  hashFunctionContextUpdateMC (ctx, &chunk);
   }
   
   /* Compute a fresh build ID bit-string from the editted file contents.  */
  @@ -1456,14 +1457,16 @@
 GElf_Ehdr ehdr;
 GElf_Phdr phdr;
 GElf_Shdr shdr;
  -} u;
  -Elf_Data x = { .d_version = EV_CURRENT, .d_buf = &u };
  -
  -x.d_type = ELF_T_EHDR;
  -x.d_size = sizeof u.ehdr;
  -u.ehdr = dso->ehdr;
  -u.ehdr.e_phoff = u.ehdr.e_shoff = 0;
  -if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
  +} u1, u2;
  +Elf_Data src  = { .d_version = EV_CURRENT, .d_buf = &u1 };
  +Elf_Data dest = { .d_version = EV_CURRENT, .d_buf = &u2 };
  +
  +src.d_type = ELF_T_EHDR;
  +src.d_size = sizeof u1.ehdr;
  +dest.d_size = sizeof u2.ehdr;
  +u1.ehdr = dso->ehdr;
  +u1.ehdr.e_phoff = u1.ehdr.e_shoff = 0;
  +if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
 {
 bad:
fprintf (stderr, "Failed to compute header checksum: %s\n",
  @@ -1471,29 +1474,31 @@
exit (1);
 }
   
  -x.d_type = ELF_T_PHDR;
  -x.d_size = sizeof u.phdr;
  +src.d_type = ELF_T_PHDR;
  +src.d_size = sizeof u1.phdr;
  +dest.d_size = sizeof u2.phdr;
   for (i = 0; i < dso->ehdr.e_phnum; ++i)
 {
  - if (gelf_getphdr (dso->elf, i, &u.phdr) == NULL)
  + if (gelf_getphdr (dso->elf, i, &u1.phdr) == NULL)
  goto bad;
  - if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
  + if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
  goto bad;
  - process (&ctx, x.d_buf, x.d_size);
  + process (&ctx, dest.d_buf, dest.d_size);
 }
   
  -x.d_type = ELF_T_SHDR;
  -x.d_size = sizeof u.shdr;
  +src.d_type = ELF_T_SHDR;
  +src.d_size = sizeof u1.shdr;
  +dest.d_size = sizeof u2.shdr;
   for (i = 0; i < dso->ehdr.e_shnum; ++i)
 if (dso->scn[i] != NULL)
{
  -   u.shdr = dso->shdr[i];
  -   u.shdr.sh_offset = 0;
  -   if (elf64_xlatetom (&x, &x, dso->ehdr.e_ident[EI_DATA]) == NULL)
  +   u1.shdr = dso->shdr[i];
  +   u1.shdr.sh_offset = 0;
  +   if (elf64_xlatetom (&dest, &src, dso->ehdr.e_ident[EI_DATA]) == NULL)
goto bad;
  -   process (&ctx, x.d_buf, x.d_size);
  +   process (&ctx, dest.d_buf, dest.d_size);
   
  -   if (u.shdr.sh_type != SHT_NOBITS)
  +   if (u1.shdr.sh_type != SHT_NOBITS)
{
  Elf_Data *d = elf_rawdata (dso->scn[i], NULL);
  if (d == NULL)
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: lua/ Makefile.am

2016-02-27 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: lua  Date:   27-Feb-2016 21:40:53
  Branch: rpm-5_4  Handle: 2016022720405300

  Modified files:   (Branch: rpm-5_4)
lua Makefile.am

  Log:
rpm: Resolve parallel install issue when installing lua

When lua is being installed on some systems that are being run with high 
levels
of parallelization there are cases where install-data-am and 
install-exec-hook
are processed at the same or a very short time apart. This causes
install-pkgbinPROGRAMS, which is a dependency of both, to be run at around 
the
same time This sometimes causes file contention and will sometimes be in a 
state
where install-exec-hook is looking for a file that is being installed or 
both
install-pkgbinPROGRAMS being run are installing the same file and fail 
because
it cannon create a new file.

This patch allows install-exec-hook to be called by install-data-am instead 
of
install-exec-am. It also removed the dependency in install-data-hook on
install-pkgbinPROGRAMS. This means install-pkgbinPROGRAMS will only be run 
once
so there whould be any file contention.

Upstream-Status: Pending

Signed-off-by: Morgan Little 

  Summary:
RevisionChanges Path
1.43.2.8+1  -1  lua/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: lua/Makefile.am
  
  $ cvs diff -u -r1.43.2.7 -r1.43.2.8 Makefile.am
  --- lua/Makefile.am   1 May 2015 20:14:39 -   1.43.2.7
  +++ lua/Makefile.am   27 Feb 2016 20:40:53 -  1.43.2.8
  @@ -347,7 +347,7 @@
   # XXX Build & install as rpmlua/rpmluac with hardlinks to lua/luac post 
install.
   # XXX CVS has lua/luac sub-directories in the Attic that collide with the
   # XXX lua/luac executable names when using cvs update.
  -install-exec-hook:   install-pkgbinPROGRAMS
  +install-data-hook:
mkdir -p $(DESTDIR)$(pkgbindir)
$(__RM) -f $(DESTDIR)$(pkgbindir)/lua
$(__LN) $(DESTDIR)$(pkgbindir)/rpmlua $(DESTDIR)$(pkgbindir)/lua
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/ system.h

2016-02-27 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:   27-Feb-2016 21:38:05
  Branch: rpm-5_4  Handle: 2016022720380500

  Modified files:   (Branch: rpm-5_4)
rpm system.h

  Log:
Create a compatable macro if rpmatch() is not provided by the C library.

This uses an existing configure check.

This is needed for uclibc since it does not have the above function
implemented.

Upstream-Status: Pending

Signed-off-by: Khem Raj 

Updated to rpm 5.4.15+.

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
2.129.2.15  +8  -0  rpm/system.h
  

  patch -p0 <<'@@ .'
  Index: rpm/system.h
  
  $ cvs diff -u -r2.129.2.14 -r2.129.2.15 system.h
  --- rpm/system.h  27 Feb 2016 20:36:51 -  2.129.2.14
  +++ rpm/system.h  27 Feb 2016 20:38:05 -  2.129.2.15
  @@ -358,6 +358,14 @@
   #include 
   #endif
   
  +#ifndef HAVE_RPMATCH
  +#define rpmatch(line) \
  + ( (line == NULL)? -1 : \
  +   (*line == 'y' || *line == 'Y')? 1 : \
  +   (*line == 'n' || *line == 'N')? 0 : \
  +   -1 )
  +#endif
  +
   /* -- Retrofit glibc __progname */
   #if defined __GLIBC__ && __GLIBC__ >= 2
   #if __GLIBC_MINOR__ >= 1
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ librpm.vers rpm/rpmio/ librpmio.vers rpmi...

2016-02-27 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:   27-Feb-2016 21:36:51
  Branch: rpm-5_4  Handle: 2016022720365001

  Modified files:   (Branch: rpm-5_4)
rpm system.h
rpm/lib librpm.vers
rpm/rpmio   librpmio.vers rpmio.h

  Log:
Define the x* wrappers for uclibc as well

Upstream-Status: Pending

Signed-off-by: Khem Raj 

  Summary:
RevisionChanges Path
1.77.2.4+4  -0  rpm/lib/librpm.vers
2.199.2.53  +4  -0  rpm/rpmio/librpmio.vers
1.97.2.6+2  -1  rpm/rpmio/rpmio.h
2.129.2.14  +1  -1  rpm/system.h
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/librpm.vers
  
  $ cvs diff -u -r1.77.2.3 -r1.77.2.4 librpm.vers
  --- rpm/lib/librpm.vers   3 Sep 2014 19:30:41 -   1.77.2.3
  +++ rpm/lib/librpm.vers   27 Feb 2016 20:36:51 -  1.77.2.4
  @@ -406,6 +406,10 @@
   specedit;
   strict_erasures;
   XrpmtsiInit;
  +xmalloc;
  +xrealloc;
  +xcalloc;
  +xstrdup;
 local:
   *;
   };
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/librpmio.vers
  
  $ cvs diff -u -r2.199.2.52 -r2.199.2.53 librpmio.vers
  --- rpm/rpmio/librpmio.vers   25 Oct 2014 18:11:58 -  2.199.2.52
  +++ rpm/rpmio/librpmio.vers   27 Feb 2016 20:36:50 -  2.199.2.53
  @@ -1455,6 +1455,10 @@
   _mongoc_write_result_init;
   _mongoc_write_result_merge;
   _mongoc_write_result_merge_legacy;
  +xmalloc;
  +xrealloc;
  +xcalloc;
  +xstrdup;
 local:
   *;
   };
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmio.h
  
  $ cvs diff -u -r1.97.2.5 -r1.97.2.6 rpmio.h
  --- rpm/rpmio/rpmio.h 27 Sep 2014 15:51:23 -  1.97.2.5
  +++ rpm/rpmio/rpmio.h 27 Feb 2016 20:36:50 -  1.97.2.6
  @@ -23,7 +23,8 @@
*/
   /*@{*/
   #if !defined(__LCLINT__) && !defined(__UCLIBC__) && defined(__GLIBC__) && \
  - (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2))
  + (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)) && \
  + !defined(__UCLIBC__)
   #define USE_COOKIE_SEEK_POINTER 1
   typedef _IO_off64_t  _libio_off_t;
   typedef _libio_off_t *   _libio_pos_t;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/system.h
  
  $ cvs diff -u -r2.129.2.13 -r2.129.2.14 system.h
  --- rpm/system.h  16 Feb 2015 21:48:21 -  2.129.2.13
  +++ rpm/system.h  27 Feb 2016 20:36:51 -  2.129.2.14
  @@ -489,7 +489,7 @@
   #endif /* defined(__LCLINT__) */
   
   /* Memory allocation via macro defs to get meaningful locations from 
mtrace() */
  -#if defined(__GNUC__)
  +#if defined(__GNUC__) || defined(__UCLIBC__)
   #define  xmalloc(_size)  (malloc(_size) ? : vmefail(_size))
   #define  xcalloc(_nmemb, _size)  (calloc((_nmemb), (_size)) ? : 
vmefail(_size))
   #define  xrealloc(_ptr, _size)   (realloc((_ptr), (_size)) ? : 
vmefail(_size))
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ order.c

2016-02-27 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:   27-Feb-2016 21:32:47
  Branch: rpm-5_4  Handle: 2016022720324600

  Modified files:   (Branch: rpm-5_4)
rpm/lib order.c

  Log:
lib/order.c: Make the dependency loop messages into debug msgs

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
2.8.2.9 +1  -1  rpm/lib/order.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/order.c
  
  $ cvs diff -u -r2.8.2.8 -r2.8.2.9 order.c
  --- rpm/lib/order.c   27 Sep 2014 15:53:43 -  2.8.2.8
  +++ rpm/lib/order.c   27 Feb 2016 20:32:46 -  2.8.2.9
  @@ -2182,7 +2182,7 @@
const char * dp;
rpmlogLvl msglvl = (anaconda || (rpmtsDFlags(ts) & 
RPMDEPS_FLAG_DEPLOOPS))
? RPMLOG_WARNING : RPMLOG_ERR;
  -#if defined(RPM_VENDOR_MANDRIVA) /* loop-detection-optional-loglevel */
  +#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_OE) /* 
loop-detection-optional-loglevel */
// Report loops as debug-level message by default (7 = 
RPMLOG_DEBUG), overridable
msglvl = 
rpmExpandNumeric("%{?_loop_detection_loglevel}%{?!_loop_detection_loglevel:7}");
   #endif
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ rpmrc.c

2016-02-27 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:   27-Feb-2016 21:29:42
  Branch: rpm-5_4  Handle: 2016022720294200

  Modified files:   (Branch: rpm-5_4)
rpm/lib rpmrc.c

  Log:
lib/rpmrc.c: Update --target processing to support full GNU canonical arch

Prior to this patch, when using --target, RPM supported the format:
  
  -
  --gnu
  --
  ---gnu

This patch changes the list of supported items to:
  
  -
  --gnu
  --
  ---

Upstream-Status: Pending

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
2.289.4.10  +61 -12 rpm/lib/rpmrc.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmrc.c
  
  $ cvs diff -u -r2.289.4.9 -r2.289.4.10 rpmrc.c
  --- rpm/lib/rpmrc.c   27 Feb 2016 20:24:39 -  2.289.4.9
  +++ rpm/lib/rpmrc.c   27 Feb 2016 20:29:42 -  2.289.4.10
  @@ -943,8 +943,8 @@
   
   static void rpmRebuildTargetVars(const char ** target, const char ** 
canontarget)
   {
  -
  -char *ca = NULL, *co = NULL, *ct = NULL;
  +/* ca = arch, cv = vendor, co = os, ce = extension, ct = canon target */
  +char *ca = NULL, *cv = NULL, *co = NULL, *ce = NULL, *ct = NULL;
   int x;
   
   /* Rebuild the compat table to recalculate the current target arch.  */
  @@ -954,23 +954,60 @@
   rpmSetTables(RPM_MACHTABLE_BUILDARCH, RPM_MACHTABLE_BUILDOS);
   
   if (target && *target) {
  + /* GNU canonical format is:
  +  *  --[-extension]
  +  *
  +  * We support the both the GNU canonical format
  +  * as well as the traditional RPM formats: 
  +  *  
  +  *  -[-gnu]
  +  */
char *c;
/* Set arch and os from specified build target */
ca = xstrdup(*target);
  - if ((c = strchr(ca, '-')) != NULL) {
  + if ((c = strchr(ca, '-')) == NULL) {
  + /* Format is  */
  + ;
  + } else {
*c++ = '\0';
  - 
  - if ((co = strrchr(c, '-')) == NULL) {
  - co = c;
  + cv = c;
  +
  + if ((c = strchr(c, '-')) == NULL) {
  + /* Format is - */
  + co = cv;
  + cv = NULL;
} else {
  - if (!xstrcasecmp(co, "-gnu"))
  - *co = '\0';
  - if ((co = strrchr(c, '-')) == NULL)
  - co = c;
  - else
  - co++;
  + *c++ = '\0';
  + co = c;
  +
  + if ((c = strchr(c, '-')) == NULL) {
  + /* Might be:
  +  *  --
  +  *  --gnu
  +  */
  + if (!xstrcasecmp(co, "gnu")) {
  + /* Format was --gnu */
  + ce = co;
  + co = cv;
  + cv = NULL;
  + }
  + } else {
  + /* Format was --- */
  + *c++ = '\0';
  + ce = c;
  + }
}
  + if (cv != NULL) cv = xstrdup(cv);
if (co != NULL) co = xstrdup(co);
  + if (ce != NULL) {
  + /* We need to prefix it with a "-" */
  + char * lce = NULL;
  +
  + lce = xmalloc(strlen(ce) + sizeof("-"));
  + sprintf(lce, "-%s", ce);
  +
  + ce = lce;
  + }
}
   } else {
const char *a = NULL;
  @@ -1013,8 +1050,16 @@
   addMacro(NULL, "_target", NULL, ct, RMIL_RPMRC);
   delMacro(NULL, "_target_cpu");
   addMacro(NULL, "_target_cpu", NULL, ca, RMIL_RPMRC);
  +if (cv) {
  + delMacro(NULL, "_target_vendor");
  + addMacro(NULL, "_target_vendor", NULL, cv, RMIL_RPMRC);
  +}
   delMacro(NULL, "_target_os");
   addMacro(NULL, "_target_os", NULL, co, RMIL_RPMRC);
  +if (ce) {
  + delMacro(NULL, "_gnu");
  + addMacro(NULL, "_gnu", NULL, ce, RMIL_RPMRC);
  +}
   
   if (canontarget)
*canontarget = ct;
  @@ -1022,8 +1067,12 @@
ct = _free(ct);
   ca = _free(ca);
   /*@-usereleased@*/
  +cv = _free(cv);
  +/*@-usereleased@*/
   co = _free(co);
   /*@=usereleased@*/
  +ce = _free(ce);
  +/*@-usereleased@*/
   }
   
   void rpmFreeRpmrc(void)
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/tools/ Makefile.am

2016-02-27 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:   27-Feb-2016 21:26:56
  Branch: rpm-5_4  Handle: 2016022720265600

  Modified files:   (Branch: rpm-5_4)
rpm/tools   Makefile.am

  Log:
Source: None
Upstream-Status: Pending
Author: Khem Raj 
Date: 2011-03-03
Description:
This patch fixes build issue found when compiling rpm-native on ubuntu
11.04-alpha. Problem is that linker does not get correct set of dependent
libraries when linking mtree binary which results in undefined symbols
in librpmio.so. This patch adds correct flags to mtree_LDADD to account
for rpmio deps

  Summary:
RevisionChanges Path
2.170.2.16  +1  -1  rpm/tools/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/tools/Makefile.am
  
  $ cvs diff -u -r2.170.2.15 -r2.170.2.16 Makefile.am
  --- rpm/tools/Makefile.am 11 May 2015 21:10:19 -  2.170.2.15
  +++ rpm/tools/Makefile.am 27 Feb 2016 20:26:56 -  2.170.2.16
  @@ -198,7 +198,7 @@
   
   mtree_SOURCES =  rpmmtree.c
   mtree_LDFLAGS =  @LDFLAGS_STATIC@ $(LDFLAGS)
  -mtree_LDADD =$(RPM_LDADD_COMMON)
  +mtree_LDADD =$(RPMIO_LDADD_COMMON)
   
   rpmrepo_SOURCES =rpmrepo.c
   rpmrepo_CPPFLAGS =   $(AM_CPPFLAGS) -I$(top_srcdir)/scripts 
-I$(top_builddir)/scripts $(CPPFLAGS)
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ rpmrc.c rpm/macros/ macros.in rpm/python/...

2016-02-27 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:   27-Feb-2016 21:24:39
  Branch: rpm-5_4  Handle: 2016022720243900

  Modified files:   (Branch: rpm-5_4)
rpm/lib rpmrc.c
rpm/macros  macros.in
rpm/python  rpmmodule.c

  Log:
Fix up platform and related sysinfo file loading (part 2).

Upstream-Status: Pending

We need to ensure that we set the _gnu flag somehow.  We do this by reading
from the platform file, and setting a new _platform_gnu and related vars.

The default values of _host_cpu, _host_vendor and _host_os are changed to
reference either the automatically determined _target_... or _platform_...
values.  The macros file uses the configure time defaults in _platform_...
versions have not been defined.  This preserves existing behavior, but
ensures reasonable defaults are always available.

Signed-off-by: Mark Hatle 

  Summary:
RevisionChanges Path
2.289.4.9   +19 -1  rpm/lib/rpmrc.c
1.39.2.46   +8  -7  rpm/macros/macros.in
1.180.2.14  +2  -2  rpm/python/rpmmodule.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmrc.c
  
  $ cvs diff -u -r2.289.4.8 -r2.289.4.9 rpmrc.c
  --- rpm/lib/rpmrc.c   27 Feb 2016 20:20:59 -  2.289.4.8
  +++ rpm/lib/rpmrc.c   27 Feb 2016 20:24:39 -  2.289.4.9
  @@ -328,10 +328,15 @@
/*@modifies rpmGlobalMacroContext, internalState @*/
   {
   
  -#if defined(RPM_VENDOR_WINDRIVER)
  +#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
   addMacro(NULL, "_usrlibrpm", NULL, __usrlibrpm, RMIL_DEFAULT);
   addMacro(NULL, "_etcrpm", NULL, __etcrpm, RMIL_DEFAULT);
   addMacro(NULL, "_vendor", NULL, "%{?_host_vendor}%{!?_host_vendor:wrs}", 
RMIL_DEFAULT);
  +
  +addMacro(NULL, "_host_cpu", NULL, 
"%{?_platform_cpu}%{!?_platform_cpu:%{?_target_cpu}}", RMIL_DEFAULT);
  +addMacro(NULL, "_host_vendor", NULL, 
"%{?_platform_vendor}%{!?_platform_cpu:%{?_target_vendor}}", RMIL_DEFAULT);
  +addMacro(NULL, "_host_os", NULL, 
"%{?_platform_os}%{!?_platform_os:%{?_target_os}}", RMIL_DEFAULT);
  +addMacro(NULL, "_host_gnu", NULL, 
"%{?_platform_gnu}%{!?_platform_gnu:%{?_gnu}}", RMIL_DEFAULT);
   #endif
   
   addMacro(NULL, "_usr", NULL, USRPREFIX, RMIL_DEFAULT);
  @@ -487,9 +492,22 @@
}
   
if (!parseCVOG(p, &cvog) && cvog != NULL) {
  +#if defined(RPM_VENDOR_OE)
  + char * _gnu = NULL;
  +
  + addMacro(NULL, "_platform_cpu", NULL, cvog->cpu, -1);
  + addMacro(NULL, "_platform_vendor", NULL, cvog->vendor, -1);
  + addMacro(NULL, "_platform_os", NULL, cvog->os, -1);
  +
  + if (cvog->gnu && cvog->gnu[0] != '\0')
  + _gnu = rpmExpand("-", cvog->gnu, NULL);
  +
  + addMacro(NULL, "_platform_gnu", NULL, (_gnu ? _gnu : ""), -1);
  +#else
addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1);
addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1);
addMacro(NULL, "_host_os", NULL, cvog->os, -1);
  +#endif
}
   
   #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/macros/macros.in
  
  $ cvs diff -u -r1.39.2.45 -r1.39.2.46 macros.in
  --- rpm/macros/macros.in  27 Feb 2016 20:23:10 -  1.39.2.45
  +++ rpm/macros/macros.in  27 Feb 2016 20:24:39 -  1.39.2.46
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.39.2.45 2016/02/27 20:23:10 jbj Exp $
  +# $Id: macros.in,v 1.39.2.46 2016/02/27 20:24:39 jbj 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
  @@ -931,9 +931,9 @@
   %_os @RPMCANONOS@
   %_gnu@RPMCANONGNU@
   
  -%_host_platform  %{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}
  -%_build_platform %{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_gnu}
  -%_target_platform%{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_gnu}
  +%_host_platform  
%{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}
  +%_build_platform 
%{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}
  +%_target_platform
%{_target_cpu}-%{_target_vendor}-%{_target_os}%{?_host_gnu}%{!?_host_gnu:%{?_gnu}}
   
   
#===

[CVS] RPM: rpm-5_4: rpm/macros/ macros.in

2016-02-27 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:   27-Feb-2016 21:23:10
  Branch: rpm-5_4  Handle: 2016022720231000

  Modified files:   (Branch: rpm-5_4)
rpm/macros  macros.in

  Log:
- sanity

  Summary:
RevisionChanges Path
1.39.2.45   +5  -2  rpm/macros/macros.in
  

  patch -p0 <<'@@ .'
  Index: rpm/macros/macros.in
  
  $ cvs diff -u -r1.39.2.44 -r1.39.2.45 macros.in
  --- rpm/macros/macros.in  23 Feb 2015 20:29:07 -  1.39.2.44
  +++ rpm/macros/macros.in  27 Feb 2016 20:23:10 -  1.39.2.45
  @@ -1,7 +1,7 @@
   #/*! \page config_macros Default configuration: @USRLIBRPM@/macros
   # \verbatim
   #
  -# $Id: macros.in,v 1.39.2.44 2015/02/23 20:29:07 jbj Exp $
  +# $Id: macros.in,v 1.39.2.45 2016/02/27 20:23:10 jbj 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
  @@ -704,8 +704,11 @@
glibc-common>glibc  \
glibc>nscd  \
filesystem>setup
  +
   %_dependency_whiteout_OWL31  \
  - libusb1>owl-hier
  + dhcp-server>dhcp\
  + which>bash  \
  +
   
   %_dependency_whiteout\
%{?_dependency_whiteout_OWL31} \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/lib/ depends.c rpmds.c rpmrc.c

2016-02-27 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:   27-Feb-2016 21:20:59
  Branch: rpm-5_4  Handle: 2016022720205900

  Modified files:   (Branch: rpm-5_4)
rpm/lib depends.c rpmds.c rpmrc.c

  Log:
Fix up platform and related sysinfo file loading.

  Summary:
RevisionChanges Path
1.461.4.10  +10 -4  rpm/lib/depends.c
2.170.2.32  +1  -1  rpm/lib/rpmds.c
2.289.4.8   +17 -10 rpm/lib/rpmrc.c
  

  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  
  $ cvs diff -u -r1.461.4.9 -r1.461.4.10 depends.c
  --- rpm/lib/depends.c 10 Sep 2014 20:08:11 -  1.461.4.9
  +++ rpm/lib/depends.c 27 Feb 2016 20:20:59 -  1.461.4.10
  @@ -256,7 +256,7 @@
he->p.ptr = _free(he->p.ptr);
}
   
  -#if defined(RPM_VENDOR_WINDRIVER)
  +#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE)
/*
 * If we're capable of installing multiple colors
 * but at least one of the packages are white (0), we
  @@ -513,7 +513,7 @@
   return 0;
   }
   
  -#if defined(RPM_VENDOR_WINDRIVER)
  +#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE)
   /* Is "compat" compatible w/ arch? */
   int _isCompatibleArch(const char * arch, const char * compat)
   {
  @@ -671,7 +671,7 @@
   
if (arch == NULL || (parch = rpmteA(p)) == NULL)
continue;
  -#if defined(RPM_VENDOR_WINDRIVER)
  +#if defined(RPM_VENDOR_WINDRIVER) && !defined(RPM_VENDOR_OE)
/* XXX hackery for alias matching. */
if (!_isCompatibleArch(arch, parch))
continue;
  @@ -841,6 +841,12 @@
   return rc;
   }
   
  +#if defined(RPM_VENDOR_WINDRIVER) || defined(RPM_VENDOR_OE)
  +#define _ETC_RPM_SYSINFO"%{_etcrpm}/sysinfo"
  +#else
  +#define _ETC_RPM_SYSINFOSYSCONFIGDIR "/sysinfo"
  +#endif
  +
   /*@only@*/ /*@null@*/ /*@unchecked@*/
   static char *sysinfo_path = NULL;
   
  @@ -1323,7 +1329,7 @@
sysinfo_path = rpmExpand("%{?_rpmds_sysinfo_path}", NULL);
if (!(sysinfo_path != NULL && *sysinfo_path == '/')) {
sysinfo_path = _free(sysinfo_path);
  - sysinfo_path = xstrdup(SYSCONFIGDIR "/sysinfo");
  + sysinfo_path = rpmExpand(_ETC_RPM_SYSINFO, NULL);
}
   }
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmds.c
  
  $ cvs diff -u -r2.170.2.31 -r2.170.2.32 rpmds.c
  --- rpm/lib/rpmds.c   11 May 2015 21:10:16 -  2.170.2.31
  +++ rpm/lib/rpmds.c   27 Feb 2016 20:20:59 -  2.170.2.32
  @@ -1776,7 +1776,7 @@
   /*@-observertrans @*/
_sysinfo_path = _free(_sysinfo_path);
   /*@=observertrans @*/
  - _sysinfo_path = xstrdup(_ETC_RPM_SYSINFO);
  + _sysinfo_path = rpmExpand(_ETC_RPM_SYSINFO, NULL);
}
   }
   /*@=modobserver@*/
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmrc.c
  
  $ cvs diff -u -r2.289.4.7 -r2.289.4.8 rpmrc.c
  --- rpm/lib/rpmrc.c   11 May 2015 21:10:16 -  2.289.4.7
  +++ rpm/lib/rpmrc.c   27 Feb 2016 20:20:59 -  2.289.4.8
  @@ -38,7 +38,13 @@
   static const char * configTarget = NULL;
   
   /*@observer@*/ /*@unchecked@*/
  -static const char * platform = SYSCONFIGDIR "/platform";
  +#if defined(RPM_VENDOR_WINDRIVER)
  +#define _ETC_RPM_PLATFORM"%{_etcrpm}/platform"
  +#else
  +#define _ETC_RPM_PLATFORMSYSCONFIGDIR "/platform"
  +#endif
  +
  +static const char * _platform = NULL;
   
   /*@only@*/ /*@relnull@*/ /*@unchecked@*/
   void * platpat = NULL;
  @@ -694,16 +700,17 @@
   int rc;
   
   while (!gotDefaults) {
  -#if defined(RPM_VENDOR_WINDRIVER)
  - const char * _platform = rpmGetPath(__etcrpm, "/platform", NULL);
  -#else
  - const char * _platform = platform;
  -#endif
  + if (_platform == NULL) {
  + _platform = rpmExpand("%{?_rpmrc_platform_path}", NULL);
  + /* XXX may need to validate path existence somewhen. */
  + if (!(_platform != NULL && *_platform == '/')) {
  + _platform = _free(_platform);
  + _platform = rpmExpand(_ETC_RPM_PLATFORM, NULL);
  + }
  + }
CVOG_t cvog = NULL;
   #if defined(RPM_VENDOR_OPENPKG) /* larger-utsname */
const char *cp;
  -#endif
  -#if defined(RPM_VENDOR_OPENPKG) /* larger-utsname */
/* utsname fields on some platforms (like HP-UX) are very small
   (just about 8 characters). Thi

[CVS] RPM: rpm-5_4: rpm/rpmdb/ Makefile.am

2016-02-27 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:   27-Feb-2016 21:13:54
  Branch: rpm-5_4  Handle: 2016022720135400

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   Makefile.am

  Log:
During installation, the libtool relink attempts to link to -lrpm...
The problem is that it hasn't been installed yet!  So small change causes
the libtool to instead use the build version.

  Summary:
RevisionChanges Path
1.134.2.25  +3  -0  rpm/rpmdb/Makefile.am
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/Makefile.am
  
  $ cvs diff -u -r1.134.2.24 -r1.134.2.25 Makefile.am
  --- rpm/rpmdb/Makefile.am 11 Jun 2015 02:22:55 -  1.134.2.24
  +++ rpm/rpmdb/Makefile.am 27 Feb 2016 20:13:54 -  1.134.2.25
  @@ -126,6 +126,9 @@
   librpmdb.la: $(librpmdb_la_OBJECTS) $(librpmdb_la_DEPENDENCIES) 
$(librpmdb_la_LINK) -rpath $(usrlibdir) $(librpmdb_la_OBJECTS) 
$(librpmdb_la_LIBADD)
   
  +# pkglib libraries needs to have usrlib libraries already installed!
  +install-pkglibLTLIBRARIES: install-usrlibLTLIBRARIES
  +
   install-data-hook:
   if !ENABLE_BUILD_LAFILES
-for l in $(usrlib_LTLIBRARIES); do \
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmdb/ rpmdb.h rpmtag.h

2016-02-27 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:   27-Feb-2016 21:10:44
  Branch: rpm-5_4  Handle: 2016022720104400

  Modified files:   (Branch: rpm-5_4)
rpm/rpmdb   rpmdb.h rpmtag.h

  Log:
Update two rpm headers to include other headers.

Using rpmdb.h w/o including errno.h may result in a warning.

Using rpmtag.h w/o also adding stdint.h will result in numerous failures
about unknown types on modern compilers.

  Summary:
RevisionChanges Path
1.141.2.13  +1  -0  rpm/rpmdb/rpmdb.h
1.70.4.18   +1  -0  rpm/rpmdb/rpmtag.h
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmdb.h
  
  $ cvs diff -u -r1.141.2.12 -r1.141.2.13 rpmdb.h
  --- rpm/rpmdb/rpmdb.h 24 Sep 2014 13:27:54 -  1.141.2.12
  +++ rpm/rpmdb/rpmdb.h 27 Feb 2016 20:10:44 -  1.141.2.13
  @@ -9,6 +9,7 @@
   
   #include 
   #include 
  +#include 
   
   #include 
   #include   /* XXX Header typedef */
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmtag.h
  
  $ cvs diff -u -r1.70.4.17 -r1.70.4.18 rpmtag.h
  --- rpm/rpmdb/rpmtag.h23 Feb 2015 10:47:07 -  1.70.4.17
  +++ rpm/rpmdb/rpmtag.h27 Feb 2016 20:10:44 -  1.70.4.18
  @@ -7,6 +7,7 @@
   
   #include 
   #include 
  +#include 
   
   #ifdef __cplusplus
   extern "C" {
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmgit.c tgit.c

2016-02-27 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:   27-Feb-2016 20:59:21
  Branch: rpm-5_4  Handle: 2016022719592000

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmgit.c tgit.c

  Log:
- git: make peace with libgit2-0.23.4.

  Summary:
RevisionChanges Path
2.1.2.55+3  -2  rpm/rpmio/rpmgit.c
1.1.2.47+112 -140   rpm/rpmio/tgit.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmgit.c
  
  $ cvs diff -u -r2.1.2.54 -r2.1.2.55 rpmgit.c
  --- rpm/rpmio/rpmgit.c11 May 2015 21:10:18 -  2.1.2.54
  +++ rpm/rpmio/rpmgit.c27 Feb 2016 19:59:20 -  2.1.2.55
  @@ -2182,8 +2182,9 @@
git_submodule *sm = NULL;
unsigned int smstatus = 0;
   
  - if (!git_submodule_lookup( &sm, repo, 
s->index_to_workdir->new_file.path)
  -  && !git_submodule_status(&smstatus, sm))
  + if (!git_submodule_status(&smstatus, repo,
  + s->index_to_workdir->new_file.path,
  + GIT_SUBMODULE_IGNORE_UNSPECIFIED))
{
if (smstatus & GIT_SUBMODULE_STATUS_WD_MODIFIED)
extra = " (new commits)";
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/tgit.c
  
  $ cvs diff -u -r1.1.2.46 -r1.1.2.47 tgit.c
  --- rpm/rpmio/tgit.c  16 Feb 2015 21:34:06 -  1.1.2.46
  +++ rpm/rpmio/tgit.c  27 Feb 2016 19:59:20 -  1.1.2.47
  @@ -54,53 +54,77 @@
   const char *path;
   } progress_data;
   
  -static void print_progress(const progress_data *pd)
  +static void print_progress(const progress_data * pd)
   {
  -FILE * fp = stdout;
  +FILE *fp = stdout;
   
  -if (pd->total_steps > 0) {
  - fprintf(fp, "\rCheckouts: %u/%u", (unsigned)pd->completed_steps, 
(unsigned)pd->total_steps);
  -} else
  -if (pd->fetch_progress.total_deltas > 0
  - && pd->fetch_progress.received_objects == 
pd->fetch_progress.total_objects) {
  - fprintf(fp, "\rResolving deltas %u/%u",
  - (unsigned)pd->fetch_progress.indexed_deltas,
  - (unsigned)pd->fetch_progress.total_deltas);
  - if (pd->fetch_progress.indexed_deltas == 
pd->fetch_progress.total_deltas)
  - fprintf(fp, ", done.\n");
  +int network_percent = pd->fetch_progress.total_objects > 0 ?
  + (100 * pd->fetch_progress.received_objects) /
  + pd->fetch_progress.total_objects : 0;
  +int kbytes = pd->fetch_progress.received_bytes / 1024;
  +
  +if (pd->fetch_progress.total_objects &&
  + pd->fetch_progress.received_objects ==
  + pd->fetch_progress.total_objects) {
  + fprintf(fp, "Resolving deltas %u/%u\r",
  + (unsigned) pd->fetch_progress.indexed_deltas,
  + (unsigned) pd->fetch_progress.total_deltas);
   } else {
  - int network_percent = (100*pd->fetch_progress.received_objects) / 
pd->fetch_progress.total_objects;
  +#ifdef   NOISY
  +int index_percent =
  + pd->fetch_progress.total_objects >
  + 0 ? (100 * pd->fetch_progress.indexed_objects) /
  + pd->fetch_progress.total_objects : 0;
  +int checkout_percent = pd->total_steps > 0
  + ? (100 * pd->completed_steps) / pd->total_steps : 0;
   
  -#if 0
  -Initialized empty Git repository in /tmp/libgit2/.git/
  -remote: Counting objects: 53569, done.
  -remote: Compressing objects: 100% (15714/15714), done.
  -remote: Total 53569 (delta 36892), reused 53436 (delta 36761)
  -Receiving objects: 100% (53569/53569), 20.52 MiB | 5.24 MiB/s, done.
  -Resolving deltas: 100% (36892/36892), done.
  -#endif
  - fprintf(fp, "\rReceiving objects: %3d%% (%u/%u) indexed (%u), %6.2f 
MiB",
  + fprintf(fp,
  + "net %3d%% (%4d kb, %5u/%5u)  /  idx %3d%% (%5u/%5u)  /  chk 
%3d%% (%4u/%4u) %s\r",
  + network_percent,
  + kbytes,
  + (unsigned) pd->fetch_progress.received_objects,
  + (unsigned) pd->fetch_progress.total_objects,
  + index_percent,
  + (unsigned) pd->fetch_progress.indexed_objects,
  + (unsigned) pd->fetch_progress.total_objects,
  + checkout_percent,
  + (unsigned) pd->completed_steps,
  + (unsigned) pd->total_steps,
  + pd->path);
  +#else
  + fprintf(fp,
  + "net %3d%% (%4d kb, %5u/%5u)\r",
network_percent,
  - (unsigned)pd->fetch_progress.received_objects,
  - (unsigned)pd->f