SHA256
6
0
forked from pool/rpm

update to rpm-4.11.2

OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=315
This commit is contained in:
2014-02-20 13:18:41 +00:00
committed by Git OBS Bridge
parent bc7343db63
commit a9156ed867
20 changed files with 112 additions and 1072 deletions

View File

@@ -1,7 +1,5 @@
Work around glibc/nscd caching problems when doing 'rpm --root'.
--- ./lib/rpmchroot.c.orig 2011-05-12 08:26:10.000000000 +0000
+++ ./lib/rpmchroot.c 2011-05-12 08:28:32.000000000 +0000
--- ./lib/rpmchroot.c.orig 2012-11-07 12:55:24.000000000 +0000
+++ ./lib/rpmchroot.c 2014-02-20 12:50:05.360815211 +0000
@@ -66,6 +66,7 @@ int rpmChrootIn(void)
} else if (rootState.chrootDone == 0) {
if (chdir("/") == 0 && chroot(rootState.rootDir) == 0) {
@@ -18,11 +16,11 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
} else {
rpmlog(RPMLOG_ERR, _("Unable to restore root directory: %m\n"));
rc = -1;
--- ./lib/rpmug.c.orig 2011-05-12 08:13:52.000000000 +0000
+++ ./lib/rpmug.c 2011-05-12 08:33:28.000000000 +0000
@@ -35,6 +35,47 @@ const char * rpmugStashStr(const char *s
return ret;
}
--- ./lib/rpmug.c.orig 2014-02-05 13:04:37.000000000 +0000
+++ ./lib/rpmug.c 2014-02-20 12:50:05.361815211 +0000
@@ -10,6 +10,47 @@
#include "lib/rpmug.h"
#include "debug.h"
+#if defined(__GLIBC__)
+
@@ -68,7 +66,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
/*
* These really ought to use hash tables. I just made the
* guess that most files would be owned by root or the same person/group
@@ -68,17 +109,28 @@ int rpmugUid(const char * thisUname, uid
@@ -43,17 +84,28 @@ int rpmugUid(const char * thisUname, uid
lastUnameAlloced = thisUnameLen + 10;
lastUname = xrealloc(lastUname, lastUnameAlloced); /* XXX memory leak */
}
@@ -104,7 +102,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
}
*uid = lastUid;
@@ -111,18 +163,29 @@ int rpmugGid(const char * thisGname, gid
@@ -86,18 +138,29 @@ int rpmugGid(const char * thisGname, gid
lastGnameAlloced = thisGnameLen + 10;
lastGname = xrealloc(lastGname, lastGnameAlloced); /* XXX memory leak */
}
@@ -141,7 +139,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
}
*gid = lastGid;
@@ -134,7 +197,7 @@ const char * rpmugUname(uid_t uid)
@@ -109,7 +172,7 @@ const char * rpmugUname(uid_t uid)
{
static uid_t lastUid = (uid_t) -1;
static char * lastUname = NULL;
@@ -150,7 +148,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
if (uid == (uid_t) -1) {
lastUid = (uid_t) -1;
@@ -151,9 +214,9 @@ const char * rpmugUname(uid_t uid)
@@ -126,9 +189,9 @@ const char * rpmugUname(uid_t uid)
lastUid = uid;
len = strlen(pwent->pw_name);
@@ -163,7 +161,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
}
strcpy(lastUname, pwent->pw_name);
@@ -165,7 +228,7 @@ const char * rpmugGname(gid_t gid)
@@ -140,7 +203,7 @@ const char * rpmugGname(gid_t gid)
{
static gid_t lastGid = (gid_t) -1;
static char * lastGname = NULL;
@@ -172,7 +170,7 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
if (gid == (gid_t) -1) {
lastGid = (gid_t) -1;
@@ -182,9 +245,9 @@ const char * rpmugGname(gid_t gid)
@@ -157,9 +220,9 @@ const char * rpmugGname(gid_t gid)
lastGid = gid;
len = strlen(grent->gr_name);
@@ -185,9 +183,9 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
}
strcpy(lastGname, grent->gr_name);
@@ -200,3 +263,16 @@ void rpmugFree(void)
@@ -189,3 +252,16 @@ void rpmugFree(void)
rpmugUname(-1);
rpmugGname(-1);
strStash = strCacheFree(strStash);
}
+
+void rpmugChroot(int in)
@@ -202,9 +200,9 @@ Work around glibc/nscd caching problems when doing 'rpm --root'.
+ inchroot = in;
+#endif
+}
--- ./lib/rpmug.h.orig 2011-05-12 08:13:52.000000000 +0000
+++ ./lib/rpmug.h 2011-05-12 08:26:56.000000000 +0000
@@ -15,4 +15,6 @@ const char * rpmugGname(gid_t gid);
--- ./lib/rpmug.h.orig 2014-02-05 13:04:02.000000000 +0000
+++ ./lib/rpmug.h 2014-02-20 12:50:05.362815211 +0000
@@ -15,4 +15,6 @@ int rpmugInit(void);
void rpmugFree(void);