From 686becd32ea764915e4352513733ad652f0719bd Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Mon, 4 Feb 2013 14:11:49 +0100 Subject: [PATCH] gathering as much data as we can on the f14 boxes setup --- .../usr/share/debootstrap/scripts/precise | 1 + .../usr/share/debootstrap/scripts/quantal | 1 + bbox-f14/rpm-changes/a/lib/rpmfi.c | 1366 +++++++++++++++++ bbox-f14/rpm-changes/b/lib/rpmfi.c | 1360 ++++++++++++++++ .../rpm-changes/rpm-revert-fileperm.patch | 27 + bbox-f14/rpm-changes/rpm.spec | 1164 ++++++++++++++ bbox-f14/rpm-changes/rpm.spec.orig | 1158 ++++++++++++++ bbox-f14/rpm-fedora/rpm-fileperm.patch | 46 + bbox-f14/rpm-fedora/rpm-fileperm.patch.url | 1 + .../util-vserver/distributions/f16/initpost | 1 + .../util-vserver/distributions/f16/initpre | 1 + .../util-vserver/distributions/f16/pkgs/01 | 1 + .../util-vserver/distributions/f16/pkgs/02 | 3 + .../util-vserver/distributions/f16/pkgs/03 | 3 + .../distributions/f16/rpmlist.d/00.lst | 11 + .../yum.repos.d/fedora-updates-testing.repo | 26 + .../f16/yum.repos.d/fedora-updates.repo | 26 + .../distributions/f16/yum.repos.d/fedora.repo | 29 + .../distributions/f16/yum/yum.conf | 11 + .../util-vserver/distributions/f18/initpost | 1 + .../util-vserver/distributions/f18/initpre | 1 + .../util-vserver/distributions/f18/pkgs/01 | 1 + .../util-vserver/distributions/f18/pkgs/02 | 3 + .../util-vserver/distributions/f18/pkgs/03 | 3 + .../distributions/f18/rpmlist.d/00.lst | 11 + .../yum.repos.d/fedora-updates-testing.repo | 26 + .../f18/yum.repos.d/fedora-updates.repo | 26 + .../distributions/f18/yum.repos.d/fedora.repo | 29 + .../distributions/f18/yum/yum.conf | 11 + .../distributions/redhat/initpre.usrmove | 25 + .../yum-repos/etc/yum.repos.d/bbox-f14.repo | 5 + .../etc/yum.repos.d/fedora-updates.repo | 27 + .../yum-repos/etc/yum.repos.d/fedora.repo | 30 + 33 files changed, 5435 insertions(+) create mode 120000 bbox-f14/debootstrap-additions/usr/share/debootstrap/scripts/precise create mode 120000 bbox-f14/debootstrap-additions/usr/share/debootstrap/scripts/quantal create mode 100644 bbox-f14/rpm-changes/a/lib/rpmfi.c create mode 100644 bbox-f14/rpm-changes/b/lib/rpmfi.c create mode 100644 bbox-f14/rpm-changes/rpm-revert-fileperm.patch create mode 100644 bbox-f14/rpm-changes/rpm.spec create mode 100644 bbox-f14/rpm-changes/rpm.spec.orig create mode 100644 bbox-f14/rpm-fedora/rpm-fileperm.patch create mode 100644 bbox-f14/rpm-fedora/rpm-fileperm.patch.url create mode 120000 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/initpost create mode 120000 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/initpre create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/01 create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/02 create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/03 create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/rpmlist.d/00.lst create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora-updates-testing.repo create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora-updates.repo create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora.repo create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum/yum.conf create mode 120000 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/initpost create mode 120000 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/initpre create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/01 create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/02 create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/03 create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/rpmlist.d/00.lst create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora-updates-testing.repo create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora-updates.repo create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora.repo create mode 100644 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum/yum.conf create mode 100755 bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/redhat/initpre.usrmove create mode 100644 bbox-f14/yum-repos/etc/yum.repos.d/bbox-f14.repo create mode 100644 bbox-f14/yum-repos/etc/yum.repos.d/fedora-updates.repo create mode 100644 bbox-f14/yum-repos/etc/yum.repos.d/fedora.repo diff --git a/bbox-f14/debootstrap-additions/usr/share/debootstrap/scripts/precise b/bbox-f14/debootstrap-additions/usr/share/debootstrap/scripts/precise new file mode 120000 index 0000000..3840936 --- /dev/null +++ b/bbox-f14/debootstrap-additions/usr/share/debootstrap/scripts/precise @@ -0,0 +1 @@ +gutsy \ No newline at end of file diff --git a/bbox-f14/debootstrap-additions/usr/share/debootstrap/scripts/quantal b/bbox-f14/debootstrap-additions/usr/share/debootstrap/scripts/quantal new file mode 120000 index 0000000..3840936 --- /dev/null +++ b/bbox-f14/debootstrap-additions/usr/share/debootstrap/scripts/quantal @@ -0,0 +1 @@ +gutsy \ No newline at end of file diff --git a/bbox-f14/rpm-changes/a/lib/rpmfi.c b/bbox-f14/rpm-changes/a/lib/rpmfi.c new file mode 100644 index 0000000..d36e1d2 --- /dev/null +++ b/bbox-f14/rpm-changes/a/lib/rpmfi.c @@ -0,0 +1,1366 @@ +/** \ingroup rpmdep + * \file lib/rpmfi.c + * Routines to handle file info tag sets. + */ + +#include "system.h" + +#include +#include +#include /* XXX rpmDoDigest */ +#include +#include /* XXX rpmCleanPath */ +#include + +#include "lib/rpmfi_internal.h" +#include "lib/rpmte_internal.h" /* relocations */ +#include "lib/cpio.h" /* XXX CPIO_FOO */ + +#include "debug.h" + +/* + * Simple and stupid string "cache." + * Store each unique string just once, retrieve by index value. + * For data where number of unique names is typically very low, + * the dumb linear lookup appears to be fast enough and hash table seems + * like an overkill. + */ +struct strcache_s { + char **uniq; + scidx_t num; +}; + +static struct strcache_s _ugcache = { NULL, 0 }; +static strcache ugcache = &_ugcache; +static struct strcache_s _langcache = { NULL, 0 }; +static strcache langcache = &_langcache; + +static scidx_t strcachePut(strcache cache, const char *str) +{ + int found = 0; + scidx_t ret; + + for (scidx_t i = 0; i < cache->num; i++) { + if (rstreq(str, cache->uniq[i])) { + ret = i; + found = 1; + break; + } + } + if (!found) { + /* blow up on index wraparound */ + assert((scidx_t)(cache->num + 1) > cache->num); + cache->uniq = xrealloc(cache->uniq, + sizeof(*cache->uniq) * (cache->num+1)); + cache->uniq[cache->num] = xstrdup(str); + ret = cache->num; + cache->num++; + } + return ret; +} + +static const char *strcacheGet(strcache cache, scidx_t idx) +{ + const char *name = NULL; + if (idx >= 0 && idx < cache->num && cache->uniq != NULL) + name = cache->uniq[idx]; + return name; +} + +static strcache strcacheNew(void) +{ + strcache cache = xcalloc(1, sizeof(*cache)); + return cache; +} + +static strcache strcacheFree(strcache cache) +{ + if (cache != NULL) { + for (scidx_t i = 0; i < cache->num; i++) { + free(cache->uniq[i]); + } + cache->uniq = _free(cache->uniq); + free(cache); + } + return NULL; +} + +static rpmfi rpmfiUnlink(rpmfi fi) +{ + if (fi) + fi->nrefs--; + return NULL; +} + +rpmfi rpmfiLink(rpmfi fi) +{ + if (fi) + fi->nrefs++; + return fi; +} + +rpm_count_t rpmfiFC(rpmfi fi) +{ + return (fi != NULL ? fi->fc : 0); +} + +rpm_count_t rpmfiDC(rpmfi fi) +{ + return (fi != NULL ? fi->dc : 0); +} + +#ifdef NOTYET +int rpmfiDI(rpmfi fi) +{ +} +#endif + +int rpmfiFX(rpmfi fi) +{ + return (fi != NULL ? fi->i : -1); +} + +int rpmfiSetFX(rpmfi fi, int fx) +{ + int i = -1; + + if (fi != NULL && fx >= 0 && fx < fi->fc) { + i = fi->i; + fi->i = fx; + fi->j = fi->dil[fi->i]; + } + return i; +} + +int rpmfiDX(rpmfi fi) +{ + return (fi != NULL ? fi->j : -1); +} + +int rpmfiSetDX(rpmfi fi, int dx) +{ + int j = -1; + + if (fi != NULL && dx >= 0 && dx < fi->dc) { + j = fi->j; + fi->j = dx; + } + return j; +} + +int rpmfiDIIndex(rpmfi fi, int dx) +{ + int j = -1; + if (fi != NULL && dx >= 0 && dx < fi->fc) { + if (fi->dil != NULL) + j = fi->dil[dx]; + } + return j; +} + +const char * rpmfiBNIndex(rpmfi fi, int ix) +{ + const char * BN = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->bnl != NULL) + BN = fi->bnl[ix]; + } + return BN; +} + +const char * rpmfiDNIndex(rpmfi fi, int jx) +{ + const char * DN = NULL; + + if (fi != NULL && jx >= 0 && jx < fi->dc) { + if (fi->dnl != NULL) + DN = fi->dnl[jx]; + } + return DN; +} + +char * rpmfiFNIndex(rpmfi fi, int ix) +{ + char *fn = NULL; + if (fi != NULL && ix >= 0 && ix < fi->fc) { + fn = rstrscat(NULL, fi->dnl[fi->dil[ix]], fi->bnl[ix], NULL); + } + return fn; +} + +rpmfileAttrs rpmfiFFlagsIndex(rpmfi fi, int ix) +{ + rpmfileAttrs FFlags = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fflags != NULL) + FFlags = fi->fflags[ix]; + } + return FFlags; +} + +rpmVerifyAttrs rpmfiVFlagsIndex(rpmfi fi, int ix) +{ + rpmVerifyAttrs VFlags = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->vflags != NULL) + VFlags = fi->vflags[ix]; + } + return VFlags; +} + +rpm_mode_t rpmfiFModeIndex(rpmfi fi, int ix) +{ + rpm_mode_t fmode = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fmodes != NULL) + fmode = fi->fmodes[ix]; + } + return fmode; +} + +rpmfileState rpmfiFStateIndex(rpmfi fi, int ix) +{ + rpmfileState fstate = RPMFILE_STATE_MISSING; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fstates != NULL) + fstate = fi->fstates[ix]; + } + return fstate; +} + +const unsigned char * rpmfiMD5(rpmfi fi) +{ + const unsigned char *digest; + int algo = 0; + + digest = rpmfiFDigest(fi, &algo, NULL); + return (algo == PGPHASHALGO_MD5) ? digest : NULL; +} + +int rpmfiDigestAlgo(rpmfi fi) +{ + return fi ? fi->digestalgo : 0; +} + +const unsigned char * rpmfiFDigestIndex(rpmfi fi, int ix, int *algo, size_t *len) +{ + const unsigned char *digest = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + size_t diglen = rpmDigestLength(fi->digestalgo); + if (fi->digests != NULL) + digest = fi->digests + (diglen * ix); + if (len) + *len = diglen; + if (algo) + *algo = fi->digestalgo; + } + return digest; +} + +char * rpmfiFDigestHex(rpmfi fi, int *algo) +{ + size_t diglen = 0; + char *fdigest = NULL; + const unsigned char *digest = rpmfiFDigest(fi, algo, &diglen); + if (digest) { + fdigest = pgpHexStr(digest, diglen); + } + return fdigest; +} + +const char * rpmfiFLinkIndex(rpmfi fi, int ix) +{ + const char * flink = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->flinks != NULL) + flink = strcacheGet(fi->flinkcache, fi->flinks[ix]); + } + return flink; +} + +rpm_loff_t rpmfiFSizeIndex(rpmfi fi, int ix) +{ + rpm_loff_t fsize = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fsizes != NULL) + fsize = fi->fsizes[ix]; + } + return fsize; +} + +rpm_rdev_t rpmfiFRdevIndex(rpmfi fi, int ix) +{ + rpm_rdev_t frdev = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->frdevs != NULL) + frdev = fi->frdevs[ix]; + } + return frdev; +} + +rpm_ino_t rpmfiFInodeIndex(rpmfi fi, int ix) +{ + rpm_ino_t finode = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->finodes != NULL) + finode = fi->finodes[ix]; + } + return finode; +} + +rpm_color_t rpmfiColor(rpmfi fi) +{ + rpm_color_t color = 0; + + if (fi != NULL && fi->fcolors != NULL) { + for (int i = 0; i < fi->fc; i++) + color |= fi->fcolors[i]; + /* XXX ignore all but lsnibble for now. */ + color &= 0xf; + } + return color; +} + +rpm_color_t rpmfiFColorIndex(rpmfi fi, int ix) +{ + rpm_color_t fcolor = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fcolors != NULL) + /* XXX ignore all but lsnibble for now. */ + fcolor = (fi->fcolors[ix] & 0x0f); + } + return fcolor; +} + +const char * rpmfiFClassIndex(rpmfi fi, int ix) +{ + const char * fclass = NULL; + int cdictx; + + if (fi != NULL && fi->fcdictx != NULL && ix >= 0 && ix < fi->fc) { + cdictx = fi->fcdictx[ix]; + if (fi->cdict != NULL && cdictx >= 0 && cdictx < fi->ncdict) + fclass = fi->cdict[cdictx]; + } + return fclass; +} + +uint32_t rpmfiFDependsIndex(rpmfi fi, int ix, const uint32_t ** fddictp) +{ + int fddictx = -1; + int fddictn = 0; + const uint32_t * fddict = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fddictn != NULL) + fddictn = fi->fddictn[ix]; + if (fddictn > 0 && fi->fddictx != NULL) + fddictx = fi->fddictx[ix]; + if (fi->ddict != NULL && fddictx >= 0 && (fddictx+fddictn) <= fi->nddict) + fddict = fi->ddict + fddictx; + } + if (fddictp) + *fddictp = fddict; + return fddictn; +} + +uint32_t rpmfiFNlinkIndex(rpmfi fi, int ix) +{ + uint32_t nlink = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + /* XXX rpm-2.3.12 has not RPMTAG_FILEINODES */ + if (fi->finodes && fi->frdevs) { + rpm_ino_t finode = fi->finodes[ix]; + rpm_rdev_t frdev = fi->frdevs[ix]; + int j; + + for (j = 0; j < fi->fc; j++) { + if (fi->frdevs[j] == frdev && fi->finodes[j] == finode) + nlink++; + } + } + } + return nlink; +} + +rpm_time_t rpmfiFMtimeIndex(rpmfi fi, int ix) +{ + rpm_time_t fmtime = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fmtimes != NULL) + fmtime = fi->fmtimes[ix]; + } + return fmtime; +} + +const char * rpmfiFUserIndex(rpmfi fi, int ix) +{ + const char * fuser = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fuser != NULL) + fuser = strcacheGet(ugcache, fi->fuser[ix]); + } + return fuser; +} + +const char * rpmfiFGroupIndex(rpmfi fi, int ix) +{ + const char * fgroup = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fgroup != NULL) + fgroup = strcacheGet(ugcache, fi->fgroup[ix]); + } + return fgroup; +} + +const char * rpmfiFCapsIndex(rpmfi fi, int ix) +{ + const char *fcaps = NULL; + if (fi != NULL && ix >= 0 && ix < fi->fc) { + fcaps = fi->fcapcache ? strcacheGet(fi->fcapcache, fi->fcaps[ix]) : ""; + } + return fcaps; +} + +const char * rpmfiFLangsIndex(rpmfi fi, int ix) +{ + const char *flangs = NULL; + if (fi != NULL && fi->flangs != NULL && ix >= 0 && ix < fi->fc) { + flangs = strcacheGet(langcache, fi->flangs[ix]); + } + return flangs; +} + +struct fingerPrint_s *rpmfiFpsIndex(rpmfi fi, int ix) +{ + struct fingerPrint_s * fps = NULL; + if (fi != NULL && fi->fps != NULL && ix >= 0 && ix < fi->fc) { + fps = fi->fps + ix; + } + return fps; +} + +int rpmfiNext(rpmfi fi) +{ + int i = -1; + + if (fi != NULL && ++fi->i >= 0) { + if (fi->i < fi->fc) { + i = fi->i; + if (fi->dil != NULL) + fi->j = fi->dil[fi->i]; + } else + fi->i = -1; + } + + return i; +} + +rpmfi rpmfiInit(rpmfi fi, int fx) +{ + if (fi != NULL) { + if (fx >= 0 && fx < fi->fc) { + fi->i = fx - 1; + fi->j = -1; + } + } + + return fi; +} + +int rpmfiNextD(rpmfi fi) +{ + int j = -1; + + if (fi != NULL && ++fi->j >= 0) { + if (fi->j < fi->dc) + j = fi->j; + else + fi->j = -1; + } + + return j; +} + +rpmfi rpmfiInitD(rpmfi fi, int dx) +{ + if (fi != NULL) { + if (dx >= 0 && dx < fi->fc) + fi->j = dx - 1; + else + fi = NULL; + } + + return fi; +} + +/** + * Identify a file type. + * @param ft file type + * @return string to identify a file type + */ +static +const char * ftstring (rpmFileTypes ft) +{ + switch (ft) { + case XDIR: return "directory"; + case CDEV: return "char dev"; + case BDEV: return "block dev"; + case LINK: return "link"; + case SOCK: return "sock"; + case PIPE: return "fifo/pipe"; + case REG: return "file"; + default: return "unknown file type"; + } +} + +rpmFileTypes rpmfiWhatis(rpm_mode_t mode) +{ + if (S_ISDIR(mode)) return XDIR; + if (S_ISCHR(mode)) return CDEV; + if (S_ISBLK(mode)) return BDEV; + if (S_ISLNK(mode)) return LINK; + if (S_ISSOCK(mode)) return SOCK; + if (S_ISFIFO(mode)) return PIPE; + return REG; +} + +int rpmfiCompareIndex(rpmfi afi, int aix, rpmfi bfi, int bix) +{ + mode_t amode = rpmfiFModeIndex(afi, aix); + mode_t bmode = rpmfiFModeIndex(bfi, bix); + rpmFileTypes awhat = rpmfiWhatis(amode); + + if ((rpmfiFFlagsIndex(afi, aix) & RPMFILE_GHOST) || + (rpmfiFFlagsIndex(bfi, bix) & RPMFILE_GHOST)) return 0; + + if (amode != bmode) return 1; + + if (!rstreq(rpmfiFUserIndex(afi, aix), rpmfiFUserIndex(bfi, bix))) + return 1; + if (!rstreq(rpmfiFGroupIndex(afi, aix), rpmfiFGroupIndex(bfi, bix))) + return 1; + + if (awhat == LINK) { + const char * alink = rpmfiFLinkIndex(afi, aix); + const char * blink = rpmfiFLinkIndex(bfi, bix); + if (alink == blink) return 0; + if (alink == NULL) return 1; + if (blink == NULL) return -1; + return strcmp(alink, blink); + } else if (awhat == REG) { + size_t adiglen, bdiglen; + int aalgo, balgo; + const unsigned char * adigest, * bdigest; + adigest = rpmfiFDigestIndex(afi, aix, &aalgo, &adiglen); + bdigest = rpmfiFDigestIndex(bfi, bix, &balgo, &bdiglen); + if (adigest == bdigest) return 0; + if (adigest == NULL) return 1; + if (bdigest == NULL) return -1; + /* can't meaningfully compare different hash types */ + if (aalgo != balgo || adiglen != bdiglen) return -1; + return memcmp(adigest, bdigest, adiglen); + } else if (awhat == CDEV || awhat == BDEV) { + if (rpmfiFRdevIndex(afi, aix) != rpmfiFRdevIndex(bfi, bix)) + return 1; + } + + return 0; +} + +rpmFileAction rpmfiDecideFateIndex(rpmfi ofi, int oix, rpmfi nfi, int nix, + int skipMissing) +{ + char * fn = rpmfiFNIndex(nfi, nix); + rpmfileAttrs newFlags = rpmfiFFlagsIndex(nfi, nix); + char buffer[1024]; + rpmFileTypes dbWhat, newWhat, diskWhat; + struct stat sb; + int save = (newFlags & RPMFILE_NOREPLACE) ? FA_ALTNAME : FA_SAVE; + int action = FA_CREATE; /* assume we can create */ + + if (lstat(fn, &sb)) { + /* + * The file doesn't exist on the disk. Create it unless the new + * package has marked it as missingok, or allfiles is requested. + */ + if (skipMissing && (newFlags & RPMFILE_MISSINGOK)) { + rpmlog(RPMLOG_DEBUG, "%s skipped due to missingok flag\n", + fn); + action = FA_SKIP; + } + goto exit; + } + + diskWhat = rpmfiWhatis((rpm_mode_t)sb.st_mode); + dbWhat = rpmfiWhatis(rpmfiFModeIndex(ofi, oix)); + newWhat = rpmfiWhatis(rpmfiFModeIndex(nfi, nix)); + + /* + * RPM >= 2.3.10 shouldn't create config directories -- we'll ignore + * them in older packages as well. + */ + if (newWhat == XDIR) + goto exit; + + if (diskWhat != newWhat && dbWhat != REG && dbWhat != LINK) { + action = save; + goto exit; + } else if (newWhat != dbWhat && diskWhat != dbWhat) { + action = save; + goto exit; + } else if (dbWhat != newWhat) { + goto exit; + } else if (dbWhat != LINK && dbWhat != REG) { + goto exit; + } + + /* + * This order matters - we'd prefer to CREATE the file if at all + * possible in case something else (like the timestamp) has changed. + */ + memset(buffer, 0, sizeof(buffer)); + if (dbWhat == REG) { + int oalgo, nalgo; + size_t odiglen, ndiglen; + const unsigned char * odigest, * ndigest; + odigest = rpmfiFDigestIndex(ofi, oix, &oalgo, &odiglen); + if (diskWhat == REG) { + if (rpmDoDigest(oalgo, fn, 0, (unsigned char *)buffer, NULL)) + goto exit; /* assume file has been removed */ + if (odigest && !memcmp(odigest, buffer, odiglen)) + goto exit; /* unmodified config file, replace. */ + } + ndigest = rpmfiFDigestIndex(nfi, nix, &nalgo, &ndiglen); + /* Can't compare different hash types, backup to avoid data loss */ + if (oalgo != nalgo || odiglen != ndiglen) { + action = save; + goto exit; + } + if (odigest && ndigest && !memcmp(odigest, ndigest, odiglen)) { + action = FA_SKIP; /* identical file, don't bother. */ + goto exit; + } + /* ... but otherwise backup will be needed */ + action = save; + } else /* dbWhat == LINK */ { + const char * oFLink, * nFLink; + oFLink = rpmfiFLinkIndex(ofi, oix); + if (diskWhat == LINK) { + ssize_t link_len = readlink(fn, buffer, sizeof(buffer) - 1); + if (link_len == -1) + goto exit; /* assume file has been removed */ + buffer[link_len] = '\0'; + if (oFLink && rstreq(oFLink, buffer)) + goto exit; /* unmodified config file, replace. */ + } + nFLink = rpmfiFLinkIndex(nfi, nix); + if (oFLink && nFLink && rstreq(oFLink, nFLink)) { + action = FA_SKIP; /* identical file, don't bother. */ + goto exit; + } + /* ... but otherwise backup will be needed */ + action = save; + } + +exit: + free(fn); + return action; +} + +int rpmfiConfigConflictIndex(rpmfi fi, int ix) +{ + char * fn = NULL; + rpmfileAttrs flags = rpmfiFFlagsIndex(fi, ix); + char buffer[1024]; + rpmFileTypes newWhat, diskWhat; + struct stat sb; + int rc = 0; + + if (!(flags & RPMFILE_CONFIG)) + return 0; + + /* Only links and regular files can be %config, this is kinda moot */ + /* XXX: Why are we returning 1 here? */ + newWhat = rpmfiWhatis(rpmfiFModeIndex(fi, ix)); + if (newWhat != LINK && newWhat != REG) + return 1; + + /* If it's not on disk, there's nothing to be saved */ + fn = rpmfiFNIndex(fi, ix); + if (lstat(fn, &sb)) + goto exit; + + /* Files of different types obviously are not identical */ + diskWhat = rpmfiWhatis((rpm_mode_t)sb.st_mode); + if (diskWhat != newWhat) { + rc = 1; + goto exit; + } + + memset(buffer, 0, sizeof(buffer)); + if (newWhat == REG) { + int algo; + size_t diglen; + const unsigned char *ndigest = rpmfiFDigestIndex(fi,ix, &algo, &diglen); + if (rpmDoDigest(algo, fn, 0, (unsigned char *)buffer, NULL)) + goto exit; /* assume file has been removed */ + if (ndigest && !memcmp(ndigest, buffer, diglen)) + goto exit; /* unmodified config file */ + } else /* newWhat == LINK */ { + const char * nFLink; + ssize_t link_len = readlink(fn, buffer, sizeof(buffer) - 1); + if (link_len == -1) + goto exit; /* assume file has been removed */ + buffer[link_len] = '\0'; + nFLink = rpmfiFLinkIndex(fi, ix); + if (nFLink && rstreq(nFLink, buffer)) + goto exit; /* unmodified config file */ + } + + rc = 1; + +exit: + free(fn); + return rc; +} + +static char **duparray(char ** src, int size) +{ + char **dest = xmalloc((size+1) * sizeof(*dest)); + for (int i = 0; i < size; i++) { + dest[i] = xstrdup(src[i]); + } + free(src); + return dest; +} + +static int addPrefixes(Header h, rpmRelocation *relocations, int numRelocations) +{ + struct rpmtd_s validRelocs; + const char *validprefix; + const char ** actualRelocations; + int numActual = 0; + + headerGet(h, RPMTAG_PREFIXES, &validRelocs, HEADERGET_MINMEM); + /* + * If no relocations are specified (usually the case), then return the + * original header. If there are prefixes, however, then INSTPREFIXES + * should be added for RPM_INSTALL_PREFIX environ variables in scriptlets, + * but, since relocateFileList() can be called more than once for + * the same header, don't bother if already present. + */ + if (relocations == NULL || numRelocations == 0) { + if (rpmtdCount(&validRelocs) > 0) { + if (!headerIsEntry(h, RPMTAG_INSTPREFIXES)) { + rpmtdSetTag(&validRelocs, RPMTAG_INSTPREFIXES); + headerPut(h, &validRelocs, HEADERPUT_DEFAULT); + } + rpmtdFreeData(&validRelocs); + } + return 0; + } + + actualRelocations = xmalloc(rpmtdCount(&validRelocs) * sizeof(*actualRelocations)); + rpmtdInit(&validRelocs); + while ((validprefix = rpmtdNextString(&validRelocs))) { + int j; + for (j = 0; j < numRelocations; j++) { + if (relocations[j].oldPath == NULL || /* XXX can't happen */ + !rstreq(validprefix, relocations[j].oldPath)) + continue; + /* On install, a relocate to NULL means skip the path. */ + if (relocations[j].newPath) { + actualRelocations[numActual] = relocations[j].newPath; + numActual++; + } + break; + } + if (j == numRelocations) { + actualRelocations[numActual] = validprefix; + numActual++; + } + } + rpmtdFreeData(&validRelocs); + + if (numActual) { + headerPutStringArray(h, RPMTAG_INSTPREFIXES, actualRelocations, numActual); + } + free(actualRelocations); + return numActual; +} + +static void saveRelocs(Header h, rpmtd bnames, rpmtd dnames, rpmtd dindexes) +{ + struct rpmtd_s td; + headerGet(h, RPMTAG_BASENAMES, &td, HEADERGET_MINMEM); + rpmtdSetTag(&td, RPMTAG_ORIGBASENAMES); + headerPut(h, &td, HEADERPUT_DEFAULT); + rpmtdFreeData(&td); + + headerGet(h, RPMTAG_DIRNAMES, &td, HEADERGET_MINMEM); + rpmtdSetTag(&td, RPMTAG_ORIGDIRNAMES); + headerPut(h, &td, HEADERPUT_DEFAULT); + rpmtdFreeData(&td); + + headerGet(h, RPMTAG_DIRINDEXES, &td, HEADERGET_MINMEM); + rpmtdSetTag(&td, RPMTAG_ORIGDIRINDEXES); + headerPut(h, &td, HEADERPUT_DEFAULT); + rpmtdFreeData(&td); + + headerMod(h, bnames); + headerMod(h, dnames); + headerMod(h, dindexes); +} + +void rpmRelocateFileList(rpmRelocation *relocations, int numRelocations, + rpmfs fs, Header h) +{ + static int _printed = 0; + char ** baseNames; + char ** dirNames; + uint32_t * dirIndexes; + rpm_count_t fileCount, dirCount; + int nrelocated = 0; + int fileAlloced = 0; + char * fn = NULL; + int haveRelocatedBase = 0; + size_t maxlen = 0; + int i, j; + struct rpmtd_s bnames, dnames, dindexes, fmodes; + + addPrefixes(h, relocations, numRelocations); + + if (!_printed) { + _printed = 1; + rpmlog(RPMLOG_DEBUG, "========== relocations\n"); + for (i = 0; i < numRelocations; i++) { + if (relocations[i].oldPath == NULL) continue; /* XXX can't happen */ + if (relocations[i].newPath == NULL) + rpmlog(RPMLOG_DEBUG, "%5d exclude %s\n", + i, relocations[i].oldPath); + else + rpmlog(RPMLOG_DEBUG, "%5d relocate %s -> %s\n", + i, relocations[i].oldPath, relocations[i].newPath); + } + } + + for (i = 0; i < numRelocations; i++) { + if (relocations[i].newPath == NULL) continue; + size_t len = strlen(relocations[i].newPath); + if (len > maxlen) maxlen = len; + } + + headerGet(h, RPMTAG_BASENAMES, &bnames, HEADERGET_MINMEM); + headerGet(h, RPMTAG_DIRINDEXES, &dindexes, HEADERGET_ALLOC); + headerGet(h, RPMTAG_DIRNAMES, &dnames, HEADERGET_MINMEM); + headerGet(h, RPMTAG_FILEMODES, &fmodes, HEADERGET_MINMEM); + /* TODO XXX ugh.. use rpmtd iterators & friends instead */ + baseNames = bnames.data; + dirIndexes = dindexes.data; + fileCount = rpmtdCount(&bnames); + dirCount = rpmtdCount(&dnames); + /* XXX TODO: use rpmtdDup() instead */ + dirNames = dnames.data = duparray(dnames.data, dirCount); + dnames.flags |= RPMTD_PTR_ALLOCED; + + /* + * For all relocations, we go through sorted file/relocation lists + * backwards so that /usr/local relocations take precedence over /usr + * ones. + */ + + /* Relocate individual paths. */ + + for (i = fileCount - 1; i >= 0; i--) { + rpmFileTypes ft; + int fnlen; + + size_t len = maxlen + + strlen(dirNames[dirIndexes[i]]) + strlen(baseNames[i]) + 1; + if (len >= fileAlloced) { + fileAlloced = len * 2; + fn = xrealloc(fn, fileAlloced); + } + +assert(fn != NULL); /* XXX can't happen */ + *fn = '\0'; + fnlen = stpcpy( stpcpy(fn, dirNames[dirIndexes[i]]), baseNames[i]) - fn; + + /* + * See if this file path needs relocating. + */ + /* + * XXX FIXME: Would a bsearch of the (already sorted) + * relocation list be a good idea? + */ + for (j = numRelocations - 1; j >= 0; j--) { + if (relocations[j].oldPath == NULL) /* XXX can't happen */ + continue; + len = !rstreq(relocations[j].oldPath, "/") + ? strlen(relocations[j].oldPath) + : 0; + + if (fnlen < len) + continue; + /* + * Only subdirectories or complete file paths may be relocated. We + * don't check for '\0' as our directory names all end in '/'. + */ + if (!(fn[len] == '/' || fnlen == len)) + continue; + + if (!rstreqn(relocations[j].oldPath, fn, len)) + continue; + break; + } + if (j < 0) continue; + + rpmtdSetIndex(&fmodes, i); + ft = rpmfiWhatis(rpmtdGetNumber(&fmodes)); + + /* On install, a relocate to NULL means skip the path. */ + if (relocations[j].newPath == NULL) { + if (ft == XDIR) { + /* Start with the parent, looking for directory to exclude. */ + for (j = dirIndexes[i]; j < dirCount; j++) { + len = strlen(dirNames[j]) - 1; + while (len > 0 && dirNames[j][len-1] == '/') len--; + if (fnlen != len) + continue; + if (!rstreqn(fn, dirNames[j], fnlen)) + continue; + break; + } + } + rpmfsSetAction(fs, i, FA_SKIPNSTATE); + rpmlog(RPMLOG_DEBUG, "excluding %s %s\n", + ftstring(ft), fn); + continue; + } + + /* Relocation on full paths only, please. */ + if (fnlen != len) continue; + + rpmlog(RPMLOG_DEBUG, "relocating %s to %s\n", + fn, relocations[j].newPath); + nrelocated++; + + strcpy(fn, relocations[j].newPath); + { char * te = strrchr(fn, '/'); + if (te) { + if (te > fn) te++; /* root is special */ + fnlen = te - fn; + } else + te = fn + strlen(fn); + if (!rstreq(baseNames[i], te)) { /* basename changed too? */ + if (!haveRelocatedBase) { + /* XXX TODO: use rpmtdDup() instead */ + bnames.data = baseNames = duparray(baseNames, fileCount); + bnames.flags |= RPMTD_PTR_ALLOCED; + haveRelocatedBase = 1; + } + free(baseNames[i]); + baseNames[i] = xstrdup(te); + } + *te = '\0'; /* terminate new directory name */ + } + + /* Does this directory already exist in the directory list? */ + for (j = 0; j < dirCount; j++) { + if (fnlen != strlen(dirNames[j])) + continue; + if (!rstreqn(fn, dirNames[j], fnlen)) + continue; + break; + } + + if (j < dirCount) { + dirIndexes[i] = j; + continue; + } + + /* Creating new paths is a pita */ + dirNames = dnames.data = xrealloc(dnames.data, + sizeof(*dirNames) * (dirCount + 1)); + + dirNames[dirCount] = xstrdup(fn); + dirIndexes[i] = dirCount; + dirCount++; + dnames.count++; + } + + /* Finish off by relocating directories. */ + for (i = dirCount - 1; i >= 0; i--) { + for (j = numRelocations - 1; j >= 0; j--) { + + if (relocations[j].oldPath == NULL) /* XXX can't happen */ + continue; + size_t len = !rstreq(relocations[j].oldPath, "/") + ? strlen(relocations[j].oldPath) + : 0; + + if (len && !rstreqn(relocations[j].oldPath, dirNames[i], len)) + continue; + + /* + * Only subdirectories or complete file paths may be relocated. We + * don't check for '\0' as our directory names all end in '/'. + */ + if (dirNames[i][len] != '/') + continue; + + if (relocations[j].newPath) { /* Relocate the path */ + char *t = NULL; + rstrscat(&t, relocations[j].newPath, (dirNames[i] + len), NULL); + /* Unfortunatly rpmCleanPath strips the trailing slash.. */ + (void) rpmCleanPath(t); + rstrcat(&t, "/"); + + rpmlog(RPMLOG_DEBUG, + "relocating directory %s to %s\n", dirNames[i], t); + free(dirNames[i]); + dirNames[i] = t; + nrelocated++; + } + } + } + + /* Save original filenames in header and replace (relocated) filenames. */ + if (nrelocated) { + saveRelocs(h, &bnames, &dnames, &dindexes); + } + + rpmtdFreeData(&bnames); + rpmtdFreeData(&dnames); + rpmtdFreeData(&dindexes); + rpmtdFreeData(&fmodes); + free(fn); +} + +rpmfi rpmfiFree(rpmfi fi) +{ + if (fi == NULL) return NULL; + + if (fi->nrefs > 1) + return rpmfiUnlink(fi); + + if (fi->fc > 0) { + fi->bnl = _free(fi->bnl); + fi->dnl = _free(fi->dnl); + + fi->flinkcache = strcacheFree(fi->flinkcache); + fi->flinks = _free(fi->flinks); + fi->flangs = _free(fi->flangs); + fi->digests = _free(fi->digests); + fi->fcapcache = strcacheFree(fi->fcapcache); + fi->fcaps = _free(fi->fcaps); + + fi->cdict = _free(fi->cdict); + + fi->fuser = _free(fi->fuser); + fi->fgroup = _free(fi->fgroup); + + fi->fstates = _free(fi->fstates); + fi->fps = _free(fi->fps); + + /* these point to header memory if KEEPHEADER is used, dont free */ + if (!(fi->fiflags & RPMFI_KEEPHEADER) && fi->h == NULL) { + fi->fmtimes = _free(fi->fmtimes); + fi->fmodes = _free(fi->fmodes); + fi->fflags = _free(fi->fflags); + fi->vflags = _free(fi->vflags); + fi->fsizes = _free(fi->fsizes); + fi->frdevs = _free(fi->frdevs); + fi->finodes = _free(fi->finodes); + fi->dil = _free(fi->dil); + + fi->fcolors = _free(fi->fcolors); + fi->fcdictx = _free(fi->fcdictx); + fi->ddict = _free(fi->ddict); + fi->fddictx = _free(fi->fddictx); + fi->fddictn = _free(fi->fddictn); + + } + } + + fi->fn = _free(fi->fn); + fi->apath = _free(fi->apath); + + fi->replacedSizes = _free(fi->replacedSizes); + + fi->h = headerFree(fi->h); + + (void) rpmfiUnlink(fi); + memset(fi, 0, sizeof(*fi)); /* XXX trash and burn */ + fi = _free(fi); + + return NULL; +} + +/* Helper to push header tag data into a string cache */ +static scidx_t *cacheTag(strcache cache, Header h, rpmTag tag) +{ + scidx_t *idx = NULL; + struct rpmtd_s td; + if (headerGet(h, tag, &td, HEADERGET_MINMEM)) { + idx = xmalloc(sizeof(*idx) * rpmtdCount(&td)); + int i = 0; + const char *str; + while ((str = rpmtdNextString(&td))) { + idx[i++] = strcachePut(cache, str); + } + rpmtdFreeData(&td); + } + return idx; +} + +#define _hgfi(_h, _tag, _td, _flags, _data) \ + if (headerGet((_h), (_tag), (_td), (_flags))) \ + _data = (td.data) + +rpmfi rpmfiNew(const rpmts ts, Header h, rpmTagVal tagN, rpmfiFlags flags) +{ + rpmfi fi = xcalloc(1, sizeof(*fi)); + unsigned char * t; + struct rpmtd_s fdigests, digalgo; + struct rpmtd_s td; + headerGetFlags scareFlags = (flags & RPMFI_KEEPHEADER) ? + HEADERGET_MINMEM : HEADERGET_ALLOC; + headerGetFlags defFlags = HEADERGET_ALLOC; + + fi->magic = RPMFIMAGIC; + fi->i = -1; + + fi->fiflags = flags; + + _hgfi(h, RPMTAG_BASENAMES, &td, defFlags, fi->bnl); + fi->fc = rpmtdCount(&td); + if (fi->fc == 0) { + goto exit; + } + + _hgfi(h, RPMTAG_DIRNAMES, &td, defFlags, fi->dnl); + fi->dc = rpmtdCount(&td); + _hgfi(h, RPMTAG_DIRINDEXES, &td, scareFlags, fi->dil); + + /* Is our filename triplet sane? */ + if (fi->dc == 0 || fi->dc > fi->fc || rpmtdCount(&td) != fi->fc) + goto errxit; + + for (rpm_count_t i = 0; i < fi->fc; i++) { + if (fi->dil[i] >= fi->fc) + goto errxit; + } + + /* XXX TODO: all these should be sanity checked, ugh... */ + if (!(flags & RPMFI_NOFILEMODES)) + _hgfi(h, RPMTAG_FILEMODES, &td, scareFlags, fi->fmodes); + if (!(flags & RPMFI_NOFILEFLAGS)) + _hgfi(h, RPMTAG_FILEFLAGS, &td, scareFlags, fi->fflags); + if (!(flags & RPMFI_NOFILEVERIFYFLAGS)) + _hgfi(h, RPMTAG_FILEVERIFYFLAGS, &td, scareFlags, fi->vflags); + if (!(flags & RPMFI_NOFILESIZES)) + _hgfi(h, RPMTAG_FILESIZES, &td, scareFlags, fi->fsizes); + + if (!(flags & RPMFI_NOFILECOLORS)) + _hgfi(h, RPMTAG_FILECOLORS, &td, scareFlags, fi->fcolors); + + if (!(flags & RPMFI_NOFILECLASS)) { + _hgfi(h, RPMTAG_CLASSDICT, &td, scareFlags, fi->cdict); + fi->ncdict = rpmtdCount(&td); + _hgfi(h, RPMTAG_FILECLASS, &td, scareFlags, fi->fcdictx); + } + if (!(flags & RPMFI_NOFILEDEPS)) { + _hgfi(h, RPMTAG_DEPENDSDICT, &td, scareFlags, fi->ddict); + fi->nddict = rpmtdCount(&td); + _hgfi(h, RPMTAG_FILEDEPENDSX, &td, scareFlags, fi->fddictx); + _hgfi(h, RPMTAG_FILEDEPENDSN, &td, scareFlags, fi->fddictn); + } + + if (!(flags & RPMFI_NOFILESTATES)) + _hgfi(h, RPMTAG_FILESTATES, &td, defFlags, fi->fstates); + + if (!(flags & RPMFI_NOFILECAPS) && headerIsEntry(h, RPMTAG_FILECAPS)) { + fi->fcapcache = strcacheNew(); + fi->fcaps = cacheTag(fi->fcapcache, h, RPMTAG_FILECAPS); + } + + if (!(flags & RPMFI_NOFILELINKTOS)) { + fi->flinkcache = strcacheNew(); + fi->flinks = cacheTag(fi->flinkcache, h, RPMTAG_FILELINKTOS); + } + /* FILELANGS are only interesting when installing */ + if ((headerGetInstance(h) == 0) && !(flags & RPMFI_NOFILELANGS)) + fi->flangs = cacheTag(langcache, h, RPMTAG_FILELANGS); + + /* See if the package has non-md5 file digests */ + fi->digestalgo = PGPHASHALGO_MD5; + if (headerGet(h, RPMTAG_FILEDIGESTALGO, &digalgo, HEADERGET_MINMEM)) { + uint32_t *algo = rpmtdGetUint32(&digalgo); + /* Hmm, what to do with unknown digest algorithms? */ + if (algo && rpmDigestLength(*algo) != 0) { + fi->digestalgo = *algo; + } + } + + fi->digests = NULL; + /* grab hex digests from header and store in binary format */ + if (!(flags & RPMFI_NOFILEDIGESTS) && + headerGet(h, RPMTAG_FILEDIGESTS, &fdigests, HEADERGET_MINMEM)) { + const char *fdigest; + size_t diglen = rpmDigestLength(fi->digestalgo); + fi->digests = t = xmalloc(rpmtdCount(&fdigests) * diglen); + + while ((fdigest = rpmtdNextString(&fdigests))) { + if (!(fdigest && *fdigest != '\0')) { + memset(t, 0, diglen); + t += diglen; + continue; + } + for (int j = 0; j < diglen; j++, t++, fdigest += 2) + *t = (rnibble(fdigest[0]) << 4) | rnibble(fdigest[1]); + } + rpmtdFreeData(&fdigests); + } + + /* XXX TR_REMOVED doesn;t need fmtimes, frdevs, finodes */ + if (!(flags & RPMFI_NOFILEMTIMES)) + _hgfi(h, RPMTAG_FILEMTIMES, &td, scareFlags, fi->fmtimes); + if (!(flags & RPMFI_NOFILERDEVS)) + _hgfi(h, RPMTAG_FILERDEVS, &td, scareFlags, fi->frdevs); + if (!(flags & RPMFI_NOFILEINODES)) + _hgfi(h, RPMTAG_FILEINODES, &td, scareFlags, fi->finodes); + + if (!(flags & RPMFI_NOFILEUSER)) + fi->fuser = cacheTag(ugcache, h, RPMTAG_FILEUSERNAME); + if (!(flags & RPMFI_NOFILEGROUP)) + fi->fgroup = cacheTag(ugcache, h, RPMTAG_FILEGROUPNAME); + + /* lazily alloced from rpmfiFN() */ + fi->fn = NULL; + +exit: + + if (fi != NULL) { + fi->h = (fi->fiflags & RPMFI_KEEPHEADER) ? headerLink(h) : NULL; + } + + /* FIX: rpmfi null annotations */ + return rpmfiLink(fi); + +errxit: + rpmfiFree(fi); + return NULL; +} + +void rpmfiSetFReplacedSizeIndex(rpmfi fi, int ix, rpm_loff_t newsize) +{ + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->replacedSizes == NULL) { + fi->replacedSizes = xcalloc(fi->fc, sizeof(*fi->replacedSizes)); + } + /* XXX watch out, replacedSizes is not rpm_loff_t (yet) */ + fi->replacedSizes[ix] = (rpm_off_t) newsize; + } +} + +rpm_loff_t rpmfiFReplacedSizeIndex(rpmfi fi, int ix) +{ + rpm_loff_t rsize = 0; + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->replacedSizes) { + rsize = fi->replacedSizes[ix]; + } + } + return rsize; +} + +void rpmfiFpLookup(rpmfi fi, fingerPrintCache fpc) +{ + if (fi->fc > 0 && fi->fps == NULL) { + fi->fps = xcalloc(fi->fc, sizeof(*fi->fps)); + } + fpLookupList(fpc, fi->dnl, fi->bnl, fi->dil, fi->fc, fi->fps); +} + +/* + * Generate iterator accessors function wrappers, these do nothing but + * call the corresponding rpmfiFooIndex(fi, fi->[ij]) + */ + +#define RPMFI_ITERFUNC(TYPE, NAME, IXV) \ + TYPE rpmfi ## NAME(rpmfi fi) { return rpmfi ## NAME ## Index(fi, fi ? fi->IXV : -1); } + +RPMFI_ITERFUNC(const char *, BN, i) +RPMFI_ITERFUNC(const char *, DN, j) +RPMFI_ITERFUNC(const char *, FLink, i) +RPMFI_ITERFUNC(const char *, FUser, i) +RPMFI_ITERFUNC(const char *, FGroup, i) +RPMFI_ITERFUNC(const char *, FCaps, i) +RPMFI_ITERFUNC(const char *, FLangs, i) +RPMFI_ITERFUNC(const char *, FClass, i) +RPMFI_ITERFUNC(rpmfileState, FState, i) +RPMFI_ITERFUNC(rpmfileAttrs, FFlags, i) +RPMFI_ITERFUNC(rpmVerifyAttrs, VFlags, i) +RPMFI_ITERFUNC(rpm_mode_t, FMode, i) +RPMFI_ITERFUNC(rpm_rdev_t, FRdev, i) +RPMFI_ITERFUNC(rpm_time_t, FMtime, i) +RPMFI_ITERFUNC(rpm_ino_t, FInode, i) +RPMFI_ITERFUNC(rpm_loff_t, FSize, i) +RPMFI_ITERFUNC(rpm_color_t, FColor, i) +RPMFI_ITERFUNC(uint32_t, FNlink, i) + +const char * rpmfiFN(rpmfi fi) +{ + const char *fn = ""; /* preserve behavior on errors */ + if (fi != NULL) { + free(fi->fn); + fi->fn = rpmfiFNIndex(fi, fi->i); + if (fi->fn != NULL) + fn = fi->fn; + } + return fn; +} + +const unsigned char * rpmfiFDigest(rpmfi fi, int *algo, size_t *len) +{ + return rpmfiFDigestIndex(fi, fi ? fi->i : -1, algo, len); +} + +uint32_t rpmfiFDepends(rpmfi fi, const uint32_t ** fddictp) +{ + return rpmfiFDependsIndex(fi, fi ? fi->i : -1, fddictp); +} + +int rpmfiCompare(const rpmfi afi, const rpmfi bfi) +{ + return rpmfiCompareIndex(afi, afi ? afi->i : -1, bfi, bfi ? bfi->i : -1); +} + +rpmFileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing) +{ + return rpmfiDecideFateIndex(ofi, ofi ? ofi->i : -1, + nfi, nfi ? nfi->i : -1, + skipMissing); +} + +int rpmfiConfigConflict(const rpmfi fi) +{ + return rpmfiConfigConflictIndex(fi, fi ? fi->i : -1); +} diff --git a/bbox-f14/rpm-changes/b/lib/rpmfi.c b/bbox-f14/rpm-changes/b/lib/rpmfi.c new file mode 100644 index 0000000..8392398 --- /dev/null +++ b/bbox-f14/rpm-changes/b/lib/rpmfi.c @@ -0,0 +1,1360 @@ +/** \ingroup rpmdep + * \file lib/rpmfi.c + * Routines to handle file info tag sets. + */ + +#include "system.h" + +#include +#include +#include /* XXX rpmDoDigest */ +#include +#include /* XXX rpmCleanPath */ +#include + +#include "lib/rpmfi_internal.h" +#include "lib/rpmte_internal.h" /* relocations */ +#include "lib/cpio.h" /* XXX CPIO_FOO */ + +#include "debug.h" + +/* + * Simple and stupid string "cache." + * Store each unique string just once, retrieve by index value. + * For data where number of unique names is typically very low, + * the dumb linear lookup appears to be fast enough and hash table seems + * like an overkill. + */ +struct strcache_s { + char **uniq; + scidx_t num; +}; + +static struct strcache_s _ugcache = { NULL, 0 }; +static strcache ugcache = &_ugcache; +static struct strcache_s _langcache = { NULL, 0 }; +static strcache langcache = &_langcache; + +static scidx_t strcachePut(strcache cache, const char *str) +{ + int found = 0; + scidx_t ret; + + for (scidx_t i = 0; i < cache->num; i++) { + if (rstreq(str, cache->uniq[i])) { + ret = i; + found = 1; + break; + } + } + if (!found) { + /* blow up on index wraparound */ + assert((scidx_t)(cache->num + 1) > cache->num); + cache->uniq = xrealloc(cache->uniq, + sizeof(*cache->uniq) * (cache->num+1)); + cache->uniq[cache->num] = xstrdup(str); + ret = cache->num; + cache->num++; + } + return ret; +} + +static const char *strcacheGet(strcache cache, scidx_t idx) +{ + const char *name = NULL; + if (idx >= 0 && idx < cache->num && cache->uniq != NULL) + name = cache->uniq[idx]; + return name; +} + +static strcache strcacheNew(void) +{ + strcache cache = xcalloc(1, sizeof(*cache)); + return cache; +} + +static strcache strcacheFree(strcache cache) +{ + if (cache != NULL) { + for (scidx_t i = 0; i < cache->num; i++) { + free(cache->uniq[i]); + } + cache->uniq = _free(cache->uniq); + free(cache); + } + return NULL; +} + +static rpmfi rpmfiUnlink(rpmfi fi) +{ + if (fi) + fi->nrefs--; + return NULL; +} + +rpmfi rpmfiLink(rpmfi fi) +{ + if (fi) + fi->nrefs++; + return fi; +} + +rpm_count_t rpmfiFC(rpmfi fi) +{ + return (fi != NULL ? fi->fc : 0); +} + +rpm_count_t rpmfiDC(rpmfi fi) +{ + return (fi != NULL ? fi->dc : 0); +} + +#ifdef NOTYET +int rpmfiDI(rpmfi fi) +{ +} +#endif + +int rpmfiFX(rpmfi fi) +{ + return (fi != NULL ? fi->i : -1); +} + +int rpmfiSetFX(rpmfi fi, int fx) +{ + int i = -1; + + if (fi != NULL && fx >= 0 && fx < fi->fc) { + i = fi->i; + fi->i = fx; + fi->j = fi->dil[fi->i]; + } + return i; +} + +int rpmfiDX(rpmfi fi) +{ + return (fi != NULL ? fi->j : -1); +} + +int rpmfiSetDX(rpmfi fi, int dx) +{ + int j = -1; + + if (fi != NULL && dx >= 0 && dx < fi->dc) { + j = fi->j; + fi->j = dx; + } + return j; +} + +int rpmfiDIIndex(rpmfi fi, int dx) +{ + int j = -1; + if (fi != NULL && dx >= 0 && dx < fi->fc) { + if (fi->dil != NULL) + j = fi->dil[dx]; + } + return j; +} + +const char * rpmfiBNIndex(rpmfi fi, int ix) +{ + const char * BN = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->bnl != NULL) + BN = fi->bnl[ix]; + } + return BN; +} + +const char * rpmfiDNIndex(rpmfi fi, int jx) +{ + const char * DN = NULL; + + if (fi != NULL && jx >= 0 && jx < fi->dc) { + if (fi->dnl != NULL) + DN = fi->dnl[jx]; + } + return DN; +} + +char * rpmfiFNIndex(rpmfi fi, int ix) +{ + char *fn = NULL; + if (fi != NULL && ix >= 0 && ix < fi->fc) { + fn = rstrscat(NULL, fi->dnl[fi->dil[ix]], fi->bnl[ix], NULL); + } + return fn; +} + +rpmfileAttrs rpmfiFFlagsIndex(rpmfi fi, int ix) +{ + rpmfileAttrs FFlags = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fflags != NULL) + FFlags = fi->fflags[ix]; + } + return FFlags; +} + +rpmVerifyAttrs rpmfiVFlagsIndex(rpmfi fi, int ix) +{ + rpmVerifyAttrs VFlags = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->vflags != NULL) + VFlags = fi->vflags[ix]; + } + return VFlags; +} + +rpm_mode_t rpmfiFModeIndex(rpmfi fi, int ix) +{ + rpm_mode_t fmode = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fmodes != NULL) + fmode = fi->fmodes[ix]; + } + return fmode; +} + +rpmfileState rpmfiFStateIndex(rpmfi fi, int ix) +{ + rpmfileState fstate = RPMFILE_STATE_MISSING; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fstates != NULL) + fstate = fi->fstates[ix]; + } + return fstate; +} + +const unsigned char * rpmfiMD5(rpmfi fi) +{ + const unsigned char *digest; + int algo = 0; + + digest = rpmfiFDigest(fi, &algo, NULL); + return (algo == PGPHASHALGO_MD5) ? digest : NULL; +} + +int rpmfiDigestAlgo(rpmfi fi) +{ + return fi ? fi->digestalgo : 0; +} + +const unsigned char * rpmfiFDigestIndex(rpmfi fi, int ix, int *algo, size_t *len) +{ + const unsigned char *digest = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + size_t diglen = rpmDigestLength(fi->digestalgo); + if (fi->digests != NULL) + digest = fi->digests + (diglen * ix); + if (len) + *len = diglen; + if (algo) + *algo = fi->digestalgo; + } + return digest; +} + +char * rpmfiFDigestHex(rpmfi fi, int *algo) +{ + size_t diglen = 0; + char *fdigest = NULL; + const unsigned char *digest = rpmfiFDigest(fi, algo, &diglen); + if (digest) { + fdigest = pgpHexStr(digest, diglen); + } + return fdigest; +} + +const char * rpmfiFLinkIndex(rpmfi fi, int ix) +{ + const char * flink = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->flinks != NULL) + flink = strcacheGet(fi->flinkcache, fi->flinks[ix]); + } + return flink; +} + +rpm_loff_t rpmfiFSizeIndex(rpmfi fi, int ix) +{ + rpm_loff_t fsize = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fsizes != NULL) + fsize = fi->fsizes[ix]; + } + return fsize; +} + +rpm_rdev_t rpmfiFRdevIndex(rpmfi fi, int ix) +{ + rpm_rdev_t frdev = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->frdevs != NULL) + frdev = fi->frdevs[ix]; + } + return frdev; +} + +rpm_ino_t rpmfiFInodeIndex(rpmfi fi, int ix) +{ + rpm_ino_t finode = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->finodes != NULL) + finode = fi->finodes[ix]; + } + return finode; +} + +rpm_color_t rpmfiColor(rpmfi fi) +{ + rpm_color_t color = 0; + + if (fi != NULL && fi->fcolors != NULL) { + for (int i = 0; i < fi->fc; i++) + color |= fi->fcolors[i]; + /* XXX ignore all but lsnibble for now. */ + color &= 0xf; + } + return color; +} + +rpm_color_t rpmfiFColorIndex(rpmfi fi, int ix) +{ + rpm_color_t fcolor = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fcolors != NULL) + /* XXX ignore all but lsnibble for now. */ + fcolor = (fi->fcolors[ix] & 0x0f); + } + return fcolor; +} + +const char * rpmfiFClassIndex(rpmfi fi, int ix) +{ + const char * fclass = NULL; + int cdictx; + + if (fi != NULL && fi->fcdictx != NULL && ix >= 0 && ix < fi->fc) { + cdictx = fi->fcdictx[ix]; + if (fi->cdict != NULL && cdictx >= 0 && cdictx < fi->ncdict) + fclass = fi->cdict[cdictx]; + } + return fclass; +} + +uint32_t rpmfiFDependsIndex(rpmfi fi, int ix, const uint32_t ** fddictp) +{ + int fddictx = -1; + int fddictn = 0; + const uint32_t * fddict = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fddictn != NULL) + fddictn = fi->fddictn[ix]; + if (fddictn > 0 && fi->fddictx != NULL) + fddictx = fi->fddictx[ix]; + if (fi->ddict != NULL && fddictx >= 0 && (fddictx+fddictn) <= fi->nddict) + fddict = fi->ddict + fddictx; + } + if (fddictp) + *fddictp = fddict; + return fddictn; +} + +uint32_t rpmfiFNlinkIndex(rpmfi fi, int ix) +{ + uint32_t nlink = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + /* XXX rpm-2.3.12 has not RPMTAG_FILEINODES */ + if (fi->finodes && fi->frdevs) { + rpm_ino_t finode = fi->finodes[ix]; + rpm_rdev_t frdev = fi->frdevs[ix]; + int j; + + for (j = 0; j < fi->fc; j++) { + if (fi->frdevs[j] == frdev && fi->finodes[j] == finode) + nlink++; + } + } + } + return nlink; +} + +rpm_time_t rpmfiFMtimeIndex(rpmfi fi, int ix) +{ + rpm_time_t fmtime = 0; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fmtimes != NULL) + fmtime = fi->fmtimes[ix]; + } + return fmtime; +} + +const char * rpmfiFUserIndex(rpmfi fi, int ix) +{ + const char * fuser = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fuser != NULL) + fuser = strcacheGet(ugcache, fi->fuser[ix]); + } + return fuser; +} + +const char * rpmfiFGroupIndex(rpmfi fi, int ix) +{ + const char * fgroup = NULL; + + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->fgroup != NULL) + fgroup = strcacheGet(ugcache, fi->fgroup[ix]); + } + return fgroup; +} + +const char * rpmfiFCapsIndex(rpmfi fi, int ix) +{ + const char *fcaps = NULL; + if (fi != NULL && ix >= 0 && ix < fi->fc) { + fcaps = fi->fcapcache ? strcacheGet(fi->fcapcache, fi->fcaps[ix]) : ""; + } + return fcaps; +} + +const char * rpmfiFLangsIndex(rpmfi fi, int ix) +{ + const char *flangs = NULL; + if (fi != NULL && fi->flangs != NULL && ix >= 0 && ix < fi->fc) { + flangs = strcacheGet(langcache, fi->flangs[ix]); + } + return flangs; +} + +struct fingerPrint_s *rpmfiFpsIndex(rpmfi fi, int ix) +{ + struct fingerPrint_s * fps = NULL; + if (fi != NULL && fi->fps != NULL && ix >= 0 && ix < fi->fc) { + fps = fi->fps + ix; + } + return fps; +} + +int rpmfiNext(rpmfi fi) +{ + int i = -1; + + if (fi != NULL && ++fi->i >= 0) { + if (fi->i < fi->fc) { + i = fi->i; + if (fi->dil != NULL) + fi->j = fi->dil[fi->i]; + } else + fi->i = -1; + } + + return i; +} + +rpmfi rpmfiInit(rpmfi fi, int fx) +{ + if (fi != NULL) { + if (fx >= 0 && fx < fi->fc) { + fi->i = fx - 1; + fi->j = -1; + } + } + + return fi; +} + +int rpmfiNextD(rpmfi fi) +{ + int j = -1; + + if (fi != NULL && ++fi->j >= 0) { + if (fi->j < fi->dc) + j = fi->j; + else + fi->j = -1; + } + + return j; +} + +rpmfi rpmfiInitD(rpmfi fi, int dx) +{ + if (fi != NULL) { + if (dx >= 0 && dx < fi->fc) + fi->j = dx - 1; + else + fi = NULL; + } + + return fi; +} + +/** + * Identify a file type. + * @param ft file type + * @return string to identify a file type + */ +static +const char * ftstring (rpmFileTypes ft) +{ + switch (ft) { + case XDIR: return "directory"; + case CDEV: return "char dev"; + case BDEV: return "block dev"; + case LINK: return "link"; + case SOCK: return "sock"; + case PIPE: return "fifo/pipe"; + case REG: return "file"; + default: return "unknown file type"; + } +} + +rpmFileTypes rpmfiWhatis(rpm_mode_t mode) +{ + if (S_ISDIR(mode)) return XDIR; + if (S_ISCHR(mode)) return CDEV; + if (S_ISBLK(mode)) return BDEV; + if (S_ISLNK(mode)) return LINK; + if (S_ISSOCK(mode)) return SOCK; + if (S_ISFIFO(mode)) return PIPE; + return REG; +} + +int rpmfiCompareIndex(rpmfi afi, int aix, rpmfi bfi, int bix) +{ + rpmFileTypes awhat = rpmfiWhatis(rpmfiFModeIndex(afi, aix)); + rpmFileTypes bwhat = rpmfiWhatis(rpmfiFModeIndex(bfi, bix)); + + if ((rpmfiFFlagsIndex(afi, aix) & RPMFILE_GHOST) || + (rpmfiFFlagsIndex(bfi, bix) & RPMFILE_GHOST)) return 0; + + if (awhat != bwhat) return 1; + + if (awhat == LINK) { + const char * alink = rpmfiFLinkIndex(afi, aix); + const char * blink = rpmfiFLinkIndex(bfi, bix); + if (alink == blink) return 0; + if (alink == NULL) return 1; + if (blink == NULL) return -1; + return strcmp(alink, blink); + } else if (awhat == REG) { + size_t adiglen, bdiglen; + int aalgo, balgo; + const unsigned char * adigest, * bdigest; + adigest = rpmfiFDigestIndex(afi, aix, &aalgo, &adiglen); + bdigest = rpmfiFDigestIndex(bfi, bix, &balgo, &bdiglen); + if (adigest == bdigest) return 0; + if (adigest == NULL) return 1; + if (bdigest == NULL) return -1; + /* can't meaningfully compare different hash types */ + if (aalgo != balgo || adiglen != bdiglen) return -1; + return memcmp(adigest, bdigest, adiglen); + } else if (awhat == CDEV || awhat == BDEV) { + if (rpmfiFRdevIndex(afi, aix) != rpmfiFRdevIndex(bfi, bix)) + return 1; + } + + return 0; +} + +rpmFileAction rpmfiDecideFateIndex(rpmfi ofi, int oix, rpmfi nfi, int nix, + int skipMissing) +{ + char * fn = rpmfiFNIndex(nfi, nix); + rpmfileAttrs newFlags = rpmfiFFlagsIndex(nfi, nix); + char buffer[1024]; + rpmFileTypes dbWhat, newWhat, diskWhat; + struct stat sb; + int save = (newFlags & RPMFILE_NOREPLACE) ? FA_ALTNAME : FA_SAVE; + int action = FA_CREATE; /* assume we can create */ + + if (lstat(fn, &sb)) { + /* + * The file doesn't exist on the disk. Create it unless the new + * package has marked it as missingok, or allfiles is requested. + */ + if (skipMissing && (newFlags & RPMFILE_MISSINGOK)) { + rpmlog(RPMLOG_DEBUG, "%s skipped due to missingok flag\n", + fn); + action = FA_SKIP; + } + goto exit; + } + + diskWhat = rpmfiWhatis((rpm_mode_t)sb.st_mode); + dbWhat = rpmfiWhatis(rpmfiFModeIndex(ofi, oix)); + newWhat = rpmfiWhatis(rpmfiFModeIndex(nfi, nix)); + + /* + * RPM >= 2.3.10 shouldn't create config directories -- we'll ignore + * them in older packages as well. + */ + if (newWhat == XDIR) + goto exit; + + if (diskWhat != newWhat && dbWhat != REG && dbWhat != LINK) { + action = save; + goto exit; + } else if (newWhat != dbWhat && diskWhat != dbWhat) { + action = save; + goto exit; + } else if (dbWhat != newWhat) { + goto exit; + } else if (dbWhat != LINK && dbWhat != REG) { + goto exit; + } + + /* + * This order matters - we'd prefer to CREATE the file if at all + * possible in case something else (like the timestamp) has changed. + */ + memset(buffer, 0, sizeof(buffer)); + if (dbWhat == REG) { + int oalgo, nalgo; + size_t odiglen, ndiglen; + const unsigned char * odigest, * ndigest; + odigest = rpmfiFDigestIndex(ofi, oix, &oalgo, &odiglen); + if (diskWhat == REG) { + if (rpmDoDigest(oalgo, fn, 0, (unsigned char *)buffer, NULL)) + goto exit; /* assume file has been removed */ + if (odigest && !memcmp(odigest, buffer, odiglen)) + goto exit; /* unmodified config file, replace. */ + } + ndigest = rpmfiFDigestIndex(nfi, nix, &nalgo, &ndiglen); + /* Can't compare different hash types, backup to avoid data loss */ + if (oalgo != nalgo || odiglen != ndiglen) { + action = save; + goto exit; + } + if (odigest && ndigest && !memcmp(odigest, ndigest, odiglen)) { + action = FA_SKIP; /* identical file, don't bother. */ + goto exit; + } + /* ... but otherwise backup will be needed */ + action = save; + } else /* dbWhat == LINK */ { + const char * oFLink, * nFLink; + oFLink = rpmfiFLinkIndex(ofi, oix); + if (diskWhat == LINK) { + ssize_t link_len = readlink(fn, buffer, sizeof(buffer) - 1); + if (link_len == -1) + goto exit; /* assume file has been removed */ + buffer[link_len] = '\0'; + if (oFLink && rstreq(oFLink, buffer)) + goto exit; /* unmodified config file, replace. */ + } + nFLink = rpmfiFLinkIndex(nfi, nix); + if (oFLink && nFLink && rstreq(oFLink, nFLink)) { + action = FA_SKIP; /* identical file, don't bother. */ + goto exit; + } + /* ... but otherwise backup will be needed */ + action = save; + } + +exit: + free(fn); + return action; +} + +int rpmfiConfigConflictIndex(rpmfi fi, int ix) +{ + char * fn = NULL; + rpmfileAttrs flags = rpmfiFFlagsIndex(fi, ix); + char buffer[1024]; + rpmFileTypes newWhat, diskWhat; + struct stat sb; + int rc = 0; + + if (!(flags & RPMFILE_CONFIG)) + return 0; + + /* Only links and regular files can be %config, this is kinda moot */ + /* XXX: Why are we returning 1 here? */ + newWhat = rpmfiWhatis(rpmfiFModeIndex(fi, ix)); + if (newWhat != LINK && newWhat != REG) + return 1; + + /* If it's not on disk, there's nothing to be saved */ + fn = rpmfiFNIndex(fi, ix); + if (lstat(fn, &sb)) + goto exit; + + /* Files of different types obviously are not identical */ + diskWhat = rpmfiWhatis((rpm_mode_t)sb.st_mode); + if (diskWhat != newWhat) { + rc = 1; + goto exit; + } + + memset(buffer, 0, sizeof(buffer)); + if (newWhat == REG) { + int algo; + size_t diglen; + const unsigned char *ndigest = rpmfiFDigestIndex(fi,ix, &algo, &diglen); + if (rpmDoDigest(algo, fn, 0, (unsigned char *)buffer, NULL)) + goto exit; /* assume file has been removed */ + if (ndigest && !memcmp(ndigest, buffer, diglen)) + goto exit; /* unmodified config file */ + } else /* newWhat == LINK */ { + const char * nFLink; + ssize_t link_len = readlink(fn, buffer, sizeof(buffer) - 1); + if (link_len == -1) + goto exit; /* assume file has been removed */ + buffer[link_len] = '\0'; + nFLink = rpmfiFLinkIndex(fi, ix); + if (nFLink && rstreq(nFLink, buffer)) + goto exit; /* unmodified config file */ + } + + rc = 1; + +exit: + free(fn); + return rc; +} + +static char **duparray(char ** src, int size) +{ + char **dest = xmalloc((size+1) * sizeof(*dest)); + for (int i = 0; i < size; i++) { + dest[i] = xstrdup(src[i]); + } + free(src); + return dest; +} + +static int addPrefixes(Header h, rpmRelocation *relocations, int numRelocations) +{ + struct rpmtd_s validRelocs; + const char *validprefix; + const char ** actualRelocations; + int numActual = 0; + + headerGet(h, RPMTAG_PREFIXES, &validRelocs, HEADERGET_MINMEM); + /* + * If no relocations are specified (usually the case), then return the + * original header. If there are prefixes, however, then INSTPREFIXES + * should be added for RPM_INSTALL_PREFIX environ variables in scriptlets, + * but, since relocateFileList() can be called more than once for + * the same header, don't bother if already present. + */ + if (relocations == NULL || numRelocations == 0) { + if (rpmtdCount(&validRelocs) > 0) { + if (!headerIsEntry(h, RPMTAG_INSTPREFIXES)) { + rpmtdSetTag(&validRelocs, RPMTAG_INSTPREFIXES); + headerPut(h, &validRelocs, HEADERPUT_DEFAULT); + } + rpmtdFreeData(&validRelocs); + } + return 0; + } + + actualRelocations = xmalloc(rpmtdCount(&validRelocs) * sizeof(*actualRelocations)); + rpmtdInit(&validRelocs); + while ((validprefix = rpmtdNextString(&validRelocs))) { + int j; + for (j = 0; j < numRelocations; j++) { + if (relocations[j].oldPath == NULL || /* XXX can't happen */ + !rstreq(validprefix, relocations[j].oldPath)) + continue; + /* On install, a relocate to NULL means skip the path. */ + if (relocations[j].newPath) { + actualRelocations[numActual] = relocations[j].newPath; + numActual++; + } + break; + } + if (j == numRelocations) { + actualRelocations[numActual] = validprefix; + numActual++; + } + } + rpmtdFreeData(&validRelocs); + + if (numActual) { + headerPutStringArray(h, RPMTAG_INSTPREFIXES, actualRelocations, numActual); + } + free(actualRelocations); + return numActual; +} + +static void saveRelocs(Header h, rpmtd bnames, rpmtd dnames, rpmtd dindexes) +{ + struct rpmtd_s td; + headerGet(h, RPMTAG_BASENAMES, &td, HEADERGET_MINMEM); + rpmtdSetTag(&td, RPMTAG_ORIGBASENAMES); + headerPut(h, &td, HEADERPUT_DEFAULT); + rpmtdFreeData(&td); + + headerGet(h, RPMTAG_DIRNAMES, &td, HEADERGET_MINMEM); + rpmtdSetTag(&td, RPMTAG_ORIGDIRNAMES); + headerPut(h, &td, HEADERPUT_DEFAULT); + rpmtdFreeData(&td); + + headerGet(h, RPMTAG_DIRINDEXES, &td, HEADERGET_MINMEM); + rpmtdSetTag(&td, RPMTAG_ORIGDIRINDEXES); + headerPut(h, &td, HEADERPUT_DEFAULT); + rpmtdFreeData(&td); + + headerMod(h, bnames); + headerMod(h, dnames); + headerMod(h, dindexes); +} + +void rpmRelocateFileList(rpmRelocation *relocations, int numRelocations, + rpmfs fs, Header h) +{ + static int _printed = 0; + char ** baseNames; + char ** dirNames; + uint32_t * dirIndexes; + rpm_count_t fileCount, dirCount; + int nrelocated = 0; + int fileAlloced = 0; + char * fn = NULL; + int haveRelocatedBase = 0; + size_t maxlen = 0; + int i, j; + struct rpmtd_s bnames, dnames, dindexes, fmodes; + + addPrefixes(h, relocations, numRelocations); + + if (!_printed) { + _printed = 1; + rpmlog(RPMLOG_DEBUG, "========== relocations\n"); + for (i = 0; i < numRelocations; i++) { + if (relocations[i].oldPath == NULL) continue; /* XXX can't happen */ + if (relocations[i].newPath == NULL) + rpmlog(RPMLOG_DEBUG, "%5d exclude %s\n", + i, relocations[i].oldPath); + else + rpmlog(RPMLOG_DEBUG, "%5d relocate %s -> %s\n", + i, relocations[i].oldPath, relocations[i].newPath); + } + } + + for (i = 0; i < numRelocations; i++) { + if (relocations[i].newPath == NULL) continue; + size_t len = strlen(relocations[i].newPath); + if (len > maxlen) maxlen = len; + } + + headerGet(h, RPMTAG_BASENAMES, &bnames, HEADERGET_MINMEM); + headerGet(h, RPMTAG_DIRINDEXES, &dindexes, HEADERGET_ALLOC); + headerGet(h, RPMTAG_DIRNAMES, &dnames, HEADERGET_MINMEM); + headerGet(h, RPMTAG_FILEMODES, &fmodes, HEADERGET_MINMEM); + /* TODO XXX ugh.. use rpmtd iterators & friends instead */ + baseNames = bnames.data; + dirIndexes = dindexes.data; + fileCount = rpmtdCount(&bnames); + dirCount = rpmtdCount(&dnames); + /* XXX TODO: use rpmtdDup() instead */ + dirNames = dnames.data = duparray(dnames.data, dirCount); + dnames.flags |= RPMTD_PTR_ALLOCED; + + /* + * For all relocations, we go through sorted file/relocation lists + * backwards so that /usr/local relocations take precedence over /usr + * ones. + */ + + /* Relocate individual paths. */ + + for (i = fileCount - 1; i >= 0; i--) { + rpmFileTypes ft; + int fnlen; + + size_t len = maxlen + + strlen(dirNames[dirIndexes[i]]) + strlen(baseNames[i]) + 1; + if (len >= fileAlloced) { + fileAlloced = len * 2; + fn = xrealloc(fn, fileAlloced); + } + +assert(fn != NULL); /* XXX can't happen */ + *fn = '\0'; + fnlen = stpcpy( stpcpy(fn, dirNames[dirIndexes[i]]), baseNames[i]) - fn; + + /* + * See if this file path needs relocating. + */ + /* + * XXX FIXME: Would a bsearch of the (already sorted) + * relocation list be a good idea? + */ + for (j = numRelocations - 1; j >= 0; j--) { + if (relocations[j].oldPath == NULL) /* XXX can't happen */ + continue; + len = !rstreq(relocations[j].oldPath, "/") + ? strlen(relocations[j].oldPath) + : 0; + + if (fnlen < len) + continue; + /* + * Only subdirectories or complete file paths may be relocated. We + * don't check for '\0' as our directory names all end in '/'. + */ + if (!(fn[len] == '/' || fnlen == len)) + continue; + + if (!rstreqn(relocations[j].oldPath, fn, len)) + continue; + break; + } + if (j < 0) continue; + + rpmtdSetIndex(&fmodes, i); + ft = rpmfiWhatis(rpmtdGetNumber(&fmodes)); + + /* On install, a relocate to NULL means skip the path. */ + if (relocations[j].newPath == NULL) { + if (ft == XDIR) { + /* Start with the parent, looking for directory to exclude. */ + for (j = dirIndexes[i]; j < dirCount; j++) { + len = strlen(dirNames[j]) - 1; + while (len > 0 && dirNames[j][len-1] == '/') len--; + if (fnlen != len) + continue; + if (!rstreqn(fn, dirNames[j], fnlen)) + continue; + break; + } + } + rpmfsSetAction(fs, i, FA_SKIPNSTATE); + rpmlog(RPMLOG_DEBUG, "excluding %s %s\n", + ftstring(ft), fn); + continue; + } + + /* Relocation on full paths only, please. */ + if (fnlen != len) continue; + + rpmlog(RPMLOG_DEBUG, "relocating %s to %s\n", + fn, relocations[j].newPath); + nrelocated++; + + strcpy(fn, relocations[j].newPath); + { char * te = strrchr(fn, '/'); + if (te) { + if (te > fn) te++; /* root is special */ + fnlen = te - fn; + } else + te = fn + strlen(fn); + if (!rstreq(baseNames[i], te)) { /* basename changed too? */ + if (!haveRelocatedBase) { + /* XXX TODO: use rpmtdDup() instead */ + bnames.data = baseNames = duparray(baseNames, fileCount); + bnames.flags |= RPMTD_PTR_ALLOCED; + haveRelocatedBase = 1; + } + free(baseNames[i]); + baseNames[i] = xstrdup(te); + } + *te = '\0'; /* terminate new directory name */ + } + + /* Does this directory already exist in the directory list? */ + for (j = 0; j < dirCount; j++) { + if (fnlen != strlen(dirNames[j])) + continue; + if (!rstreqn(fn, dirNames[j], fnlen)) + continue; + break; + } + + if (j < dirCount) { + dirIndexes[i] = j; + continue; + } + + /* Creating new paths is a pita */ + dirNames = dnames.data = xrealloc(dnames.data, + sizeof(*dirNames) * (dirCount + 1)); + + dirNames[dirCount] = xstrdup(fn); + dirIndexes[i] = dirCount; + dirCount++; + dnames.count++; + } + + /* Finish off by relocating directories. */ + for (i = dirCount - 1; i >= 0; i--) { + for (j = numRelocations - 1; j >= 0; j--) { + + if (relocations[j].oldPath == NULL) /* XXX can't happen */ + continue; + size_t len = !rstreq(relocations[j].oldPath, "/") + ? strlen(relocations[j].oldPath) + : 0; + + if (len && !rstreqn(relocations[j].oldPath, dirNames[i], len)) + continue; + + /* + * Only subdirectories or complete file paths may be relocated. We + * don't check for '\0' as our directory names all end in '/'. + */ + if (dirNames[i][len] != '/') + continue; + + if (relocations[j].newPath) { /* Relocate the path */ + char *t = NULL; + rstrscat(&t, relocations[j].newPath, (dirNames[i] + len), NULL); + /* Unfortunatly rpmCleanPath strips the trailing slash.. */ + (void) rpmCleanPath(t); + rstrcat(&t, "/"); + + rpmlog(RPMLOG_DEBUG, + "relocating directory %s to %s\n", dirNames[i], t); + free(dirNames[i]); + dirNames[i] = t; + nrelocated++; + } + } + } + + /* Save original filenames in header and replace (relocated) filenames. */ + if (nrelocated) { + saveRelocs(h, &bnames, &dnames, &dindexes); + } + + rpmtdFreeData(&bnames); + rpmtdFreeData(&dnames); + rpmtdFreeData(&dindexes); + rpmtdFreeData(&fmodes); + free(fn); +} + +rpmfi rpmfiFree(rpmfi fi) +{ + if (fi == NULL) return NULL; + + if (fi->nrefs > 1) + return rpmfiUnlink(fi); + + if (fi->fc > 0) { + fi->bnl = _free(fi->bnl); + fi->dnl = _free(fi->dnl); + + fi->flinkcache = strcacheFree(fi->flinkcache); + fi->flinks = _free(fi->flinks); + fi->flangs = _free(fi->flangs); + fi->digests = _free(fi->digests); + fi->fcapcache = strcacheFree(fi->fcapcache); + fi->fcaps = _free(fi->fcaps); + + fi->cdict = _free(fi->cdict); + + fi->fuser = _free(fi->fuser); + fi->fgroup = _free(fi->fgroup); + + fi->fstates = _free(fi->fstates); + fi->fps = _free(fi->fps); + + /* these point to header memory if KEEPHEADER is used, dont free */ + if (!(fi->fiflags & RPMFI_KEEPHEADER) && fi->h == NULL) { + fi->fmtimes = _free(fi->fmtimes); + fi->fmodes = _free(fi->fmodes); + fi->fflags = _free(fi->fflags); + fi->vflags = _free(fi->vflags); + fi->fsizes = _free(fi->fsizes); + fi->frdevs = _free(fi->frdevs); + fi->finodes = _free(fi->finodes); + fi->dil = _free(fi->dil); + + fi->fcolors = _free(fi->fcolors); + fi->fcdictx = _free(fi->fcdictx); + fi->ddict = _free(fi->ddict); + fi->fddictx = _free(fi->fddictx); + fi->fddictn = _free(fi->fddictn); + + } + } + + fi->fn = _free(fi->fn); + fi->apath = _free(fi->apath); + + fi->replacedSizes = _free(fi->replacedSizes); + + fi->h = headerFree(fi->h); + + (void) rpmfiUnlink(fi); + memset(fi, 0, sizeof(*fi)); /* XXX trash and burn */ + fi = _free(fi); + + return NULL; +} + +/* Helper to push header tag data into a string cache */ +static scidx_t *cacheTag(strcache cache, Header h, rpmTag tag) +{ + scidx_t *idx = NULL; + struct rpmtd_s td; + if (headerGet(h, tag, &td, HEADERGET_MINMEM)) { + idx = xmalloc(sizeof(*idx) * rpmtdCount(&td)); + int i = 0; + const char *str; + while ((str = rpmtdNextString(&td))) { + idx[i++] = strcachePut(cache, str); + } + rpmtdFreeData(&td); + } + return idx; +} + +#define _hgfi(_h, _tag, _td, _flags, _data) \ + if (headerGet((_h), (_tag), (_td), (_flags))) \ + _data = (td.data) + +rpmfi rpmfiNew(const rpmts ts, Header h, rpmTagVal tagN, rpmfiFlags flags) +{ + rpmfi fi = xcalloc(1, sizeof(*fi)); + unsigned char * t; + struct rpmtd_s fdigests, digalgo; + struct rpmtd_s td; + headerGetFlags scareFlags = (flags & RPMFI_KEEPHEADER) ? + HEADERGET_MINMEM : HEADERGET_ALLOC; + headerGetFlags defFlags = HEADERGET_ALLOC; + + fi->magic = RPMFIMAGIC; + fi->i = -1; + + fi->fiflags = flags; + + _hgfi(h, RPMTAG_BASENAMES, &td, defFlags, fi->bnl); + fi->fc = rpmtdCount(&td); + if (fi->fc == 0) { + goto exit; + } + + _hgfi(h, RPMTAG_DIRNAMES, &td, defFlags, fi->dnl); + fi->dc = rpmtdCount(&td); + _hgfi(h, RPMTAG_DIRINDEXES, &td, scareFlags, fi->dil); + + /* Is our filename triplet sane? */ + if (fi->dc == 0 || fi->dc > fi->fc || rpmtdCount(&td) != fi->fc) + goto errxit; + + for (rpm_count_t i = 0; i < fi->fc; i++) { + if (fi->dil[i] >= fi->fc) + goto errxit; + } + + /* XXX TODO: all these should be sanity checked, ugh... */ + if (!(flags & RPMFI_NOFILEMODES)) + _hgfi(h, RPMTAG_FILEMODES, &td, scareFlags, fi->fmodes); + if (!(flags & RPMFI_NOFILEFLAGS)) + _hgfi(h, RPMTAG_FILEFLAGS, &td, scareFlags, fi->fflags); + if (!(flags & RPMFI_NOFILEVERIFYFLAGS)) + _hgfi(h, RPMTAG_FILEVERIFYFLAGS, &td, scareFlags, fi->vflags); + if (!(flags & RPMFI_NOFILESIZES)) + _hgfi(h, RPMTAG_FILESIZES, &td, scareFlags, fi->fsizes); + + if (!(flags & RPMFI_NOFILECOLORS)) + _hgfi(h, RPMTAG_FILECOLORS, &td, scareFlags, fi->fcolors); + + if (!(flags & RPMFI_NOFILECLASS)) { + _hgfi(h, RPMTAG_CLASSDICT, &td, scareFlags, fi->cdict); + fi->ncdict = rpmtdCount(&td); + _hgfi(h, RPMTAG_FILECLASS, &td, scareFlags, fi->fcdictx); + } + if (!(flags & RPMFI_NOFILEDEPS)) { + _hgfi(h, RPMTAG_DEPENDSDICT, &td, scareFlags, fi->ddict); + fi->nddict = rpmtdCount(&td); + _hgfi(h, RPMTAG_FILEDEPENDSX, &td, scareFlags, fi->fddictx); + _hgfi(h, RPMTAG_FILEDEPENDSN, &td, scareFlags, fi->fddictn); + } + + if (!(flags & RPMFI_NOFILESTATES)) + _hgfi(h, RPMTAG_FILESTATES, &td, defFlags, fi->fstates); + + if (!(flags & RPMFI_NOFILECAPS) && headerIsEntry(h, RPMTAG_FILECAPS)) { + fi->fcapcache = strcacheNew(); + fi->fcaps = cacheTag(fi->fcapcache, h, RPMTAG_FILECAPS); + } + + if (!(flags & RPMFI_NOFILELINKTOS)) { + fi->flinkcache = strcacheNew(); + fi->flinks = cacheTag(fi->flinkcache, h, RPMTAG_FILELINKTOS); + } + /* FILELANGS are only interesting when installing */ + if ((headerGetInstance(h) == 0) && !(flags & RPMFI_NOFILELANGS)) + fi->flangs = cacheTag(langcache, h, RPMTAG_FILELANGS); + + /* See if the package has non-md5 file digests */ + fi->digestalgo = PGPHASHALGO_MD5; + if (headerGet(h, RPMTAG_FILEDIGESTALGO, &digalgo, HEADERGET_MINMEM)) { + uint32_t *algo = rpmtdGetUint32(&digalgo); + /* Hmm, what to do with unknown digest algorithms? */ + if (algo && rpmDigestLength(*algo) != 0) { + fi->digestalgo = *algo; + } + } + + fi->digests = NULL; + /* grab hex digests from header and store in binary format */ + if (!(flags & RPMFI_NOFILEDIGESTS) && + headerGet(h, RPMTAG_FILEDIGESTS, &fdigests, HEADERGET_MINMEM)) { + const char *fdigest; + size_t diglen = rpmDigestLength(fi->digestalgo); + fi->digests = t = xmalloc(rpmtdCount(&fdigests) * diglen); + + while ((fdigest = rpmtdNextString(&fdigests))) { + if (!(fdigest && *fdigest != '\0')) { + memset(t, 0, diglen); + t += diglen; + continue; + } + for (int j = 0; j < diglen; j++, t++, fdigest += 2) + *t = (rnibble(fdigest[0]) << 4) | rnibble(fdigest[1]); + } + rpmtdFreeData(&fdigests); + } + + /* XXX TR_REMOVED doesn;t need fmtimes, frdevs, finodes */ + if (!(flags & RPMFI_NOFILEMTIMES)) + _hgfi(h, RPMTAG_FILEMTIMES, &td, scareFlags, fi->fmtimes); + if (!(flags & RPMFI_NOFILERDEVS)) + _hgfi(h, RPMTAG_FILERDEVS, &td, scareFlags, fi->frdevs); + if (!(flags & RPMFI_NOFILEINODES)) + _hgfi(h, RPMTAG_FILEINODES, &td, scareFlags, fi->finodes); + + if (!(flags & RPMFI_NOFILEUSER)) + fi->fuser = cacheTag(ugcache, h, RPMTAG_FILEUSERNAME); + if (!(flags & RPMFI_NOFILEGROUP)) + fi->fgroup = cacheTag(ugcache, h, RPMTAG_FILEGROUPNAME); + + /* lazily alloced from rpmfiFN() */ + fi->fn = NULL; + +exit: + + if (fi != NULL) { + fi->h = (fi->fiflags & RPMFI_KEEPHEADER) ? headerLink(h) : NULL; + } + + /* FIX: rpmfi null annotations */ + return rpmfiLink(fi); + +errxit: + rpmfiFree(fi); + return NULL; +} + +void rpmfiSetFReplacedSizeIndex(rpmfi fi, int ix, rpm_loff_t newsize) +{ + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->replacedSizes == NULL) { + fi->replacedSizes = xcalloc(fi->fc, sizeof(*fi->replacedSizes)); + } + /* XXX watch out, replacedSizes is not rpm_loff_t (yet) */ + fi->replacedSizes[ix] = (rpm_off_t) newsize; + } +} + +rpm_loff_t rpmfiFReplacedSizeIndex(rpmfi fi, int ix) +{ + rpm_loff_t rsize = 0; + if (fi != NULL && ix >= 0 && ix < fi->fc) { + if (fi->replacedSizes) { + rsize = fi->replacedSizes[ix]; + } + } + return rsize; +} + +void rpmfiFpLookup(rpmfi fi, fingerPrintCache fpc) +{ + if (fi->fc > 0 && fi->fps == NULL) { + fi->fps = xcalloc(fi->fc, sizeof(*fi->fps)); + } + fpLookupList(fpc, fi->dnl, fi->bnl, fi->dil, fi->fc, fi->fps); +} + +/* + * Generate iterator accessors function wrappers, these do nothing but + * call the corresponding rpmfiFooIndex(fi, fi->[ij]) + */ + +#define RPMFI_ITERFUNC(TYPE, NAME, IXV) \ + TYPE rpmfi ## NAME(rpmfi fi) { return rpmfi ## NAME ## Index(fi, fi ? fi->IXV : -1); } + +RPMFI_ITERFUNC(const char *, BN, i) +RPMFI_ITERFUNC(const char *, DN, j) +RPMFI_ITERFUNC(const char *, FLink, i) +RPMFI_ITERFUNC(const char *, FUser, i) +RPMFI_ITERFUNC(const char *, FGroup, i) +RPMFI_ITERFUNC(const char *, FCaps, i) +RPMFI_ITERFUNC(const char *, FLangs, i) +RPMFI_ITERFUNC(const char *, FClass, i) +RPMFI_ITERFUNC(rpmfileState, FState, i) +RPMFI_ITERFUNC(rpmfileAttrs, FFlags, i) +RPMFI_ITERFUNC(rpmVerifyAttrs, VFlags, i) +RPMFI_ITERFUNC(rpm_mode_t, FMode, i) +RPMFI_ITERFUNC(rpm_rdev_t, FRdev, i) +RPMFI_ITERFUNC(rpm_time_t, FMtime, i) +RPMFI_ITERFUNC(rpm_ino_t, FInode, i) +RPMFI_ITERFUNC(rpm_loff_t, FSize, i) +RPMFI_ITERFUNC(rpm_color_t, FColor, i) +RPMFI_ITERFUNC(uint32_t, FNlink, i) + +const char * rpmfiFN(rpmfi fi) +{ + const char *fn = ""; /* preserve behavior on errors */ + if (fi != NULL) { + free(fi->fn); + fi->fn = rpmfiFNIndex(fi, fi->i); + if (fi->fn != NULL) + fn = fi->fn; + } + return fn; +} + +const unsigned char * rpmfiFDigest(rpmfi fi, int *algo, size_t *len) +{ + return rpmfiFDigestIndex(fi, fi ? fi->i : -1, algo, len); +} + +uint32_t rpmfiFDepends(rpmfi fi, const uint32_t ** fddictp) +{ + return rpmfiFDependsIndex(fi, fi ? fi->i : -1, fddictp); +} + +int rpmfiCompare(const rpmfi afi, const rpmfi bfi) +{ + return rpmfiCompareIndex(afi, afi ? afi->i : -1, bfi, bfi ? bfi->i : -1); +} + +rpmFileAction rpmfiDecideFate(const rpmfi ofi, rpmfi nfi, int skipMissing) +{ + return rpmfiDecideFateIndex(ofi, ofi ? ofi->i : -1, + nfi, nfi ? nfi->i : -1, + skipMissing); +} + +int rpmfiConfigConflict(const rpmfi fi) +{ + return rpmfiConfigConflictIndex(fi, fi ? fi->i : -1); +} diff --git a/bbox-f14/rpm-changes/rpm-revert-fileperm.patch b/bbox-f14/rpm-changes/rpm-revert-fileperm.patch new file mode 100644 index 0000000..33bb00d --- /dev/null +++ b/bbox-f14/rpm-changes/rpm-revert-fileperm.patch @@ -0,0 +1,27 @@ +Based on http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=cf1095648194104a81a58abead05974a5bfa3b9a +==================== +--- a/lib/rpmfi.c 2013-02-04 10:29:59.342666296 +0100 ++++ b/lib/rpmfi.c 2013-02-04 10:32:26.192721679 +0100 +@@ -542,19 +542,13 @@ + + int rpmfiCompareIndex(rpmfi afi, int aix, rpmfi bfi, int bix) + { +- mode_t amode = rpmfiFModeIndex(afi, aix); +- mode_t bmode = rpmfiFModeIndex(bfi, bix); +- rpmFileTypes awhat = rpmfiWhatis(amode); ++ rpmFileTypes awhat = rpmfiWhatis(rpmfiFModeIndex(afi, aix)); ++ rpmFileTypes bwhat = rpmfiWhatis(rpmfiFModeIndex(bfi, bix)); + + if ((rpmfiFFlagsIndex(afi, aix) & RPMFILE_GHOST) || + (rpmfiFFlagsIndex(bfi, bix) & RPMFILE_GHOST)) return 0; + +- if (amode != bmode) return 1; +- +- if (!rstreq(rpmfiFUserIndex(afi, aix), rpmfiFUserIndex(bfi, bix))) +- return 1; +- if (!rstreq(rpmfiFGroupIndex(afi, aix), rpmfiFGroupIndex(bfi, bix))) +- return 1; ++ if (awhat != bwhat) return 1; + + if (awhat == LINK) { + const char * alink = rpmfiFLinkIndex(afi, aix); diff --git a/bbox-f14/rpm-changes/rpm.spec b/bbox-f14/rpm-changes/rpm.spec new file mode 100644 index 0000000..6244f31 --- /dev/null +++ b/bbox-f14/rpm-changes/rpm.spec @@ -0,0 +1,1164 @@ +# build against xz? +%bcond_without xz +# just for giggles, option to build with internal Berkeley DB +%bcond_with int_bdb +# run internal testsuite? +%bcond_without check +# disable plugins initially +%bcond_with plugins + +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + +%define rpmhome /usr/lib/rpm + +%define rpmver 4.10.2 +%define srcver %{rpmver}%{?snapver:-%{snapver}} + +%define bdbname libdb +%define bdbver 5.3.15 +%define dbprefix db +%define dist .zzbbox + +Summary: The RPM package management system +Name: rpm +Version: %{rpmver} +Release: %{?snapver:0.%{snapver}.}1%{?dist} +Group: System Environment/Base +Url: http://www.rpm.org/ +Source0: http://rpm.org/releases/rpm-4.10.x/%{name}-%{srcver}.tar.bz2 +%if %{with int_bdb} +Source1: db-%{bdbver}.tar.gz +%else +BuildRequires: libdb-devel +%endif +Source10: libsymlink.attr + +Patch1: rpm-4.5.90-pkgconfig-path.patch +# Fedora specspo is setup differently than what rpm expects, considering +# this as Fedora-specific patch for now +Patch2: rpm-4.9.90-fedora-specspo.patch +# In current Fedora, man-pages pkg owns all the localized man directories +Patch3: rpm-4.9.90-no-man-dirs.patch +# gnupg2 comes installed by default, avoid need to drag in gnupg too +Patch4: rpm-4.8.1-use-gpg2.patch +Patch5: rpm-4.9.90-armhfp.patch +#conditionally applied patch for arm hardware floating point +Patch6: rpm-4.9.0-armhfp-logic.patch + +# Patches already in upstream + +# These are not yet upstream +Patch301: rpm-4.6.0-niagara.patch +Patch302: rpm-4.7.1-geode-i686.patch +# Probably to be upstreamed in slightly different form +Patch304: rpm-4.9.1.1-ld-flags.patch +# Compressed debuginfo support (#833311) +Patch305: rpm-4.10.0-dwz-debuginfo.patch +# Minidebuginfo support (#834073) +Patch306: rpm-4.10.0-minidebuginfo.patch +# Temporary Patch to provide support for updates +Patch400: rpm-4.9.1.2-rpmlib-filesystem-check.patch +# Thierry : undo a change that checks for file permissions +# and prevents from building f12 images +Patch500: rpm-revert-fileperm.patch + +# Partially GPL/LGPL dual-licensed and some bits with BSD +# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD +License: GPLv2+ + +Requires: coreutils +%if %{without int_bdb} +# db recovery tools, rpmdb_util symlinks +Requires: %{_bindir}/%{dbprefix}_stat +%endif +Requires: popt%{_isa} >= 1.10.2.1 +Requires: curl + +%if %{without int_bdb} +BuildRequires: %{bdbname}-devel%{_isa} +%endif + +%if %{with check} +BuildRequires: fakechroot +%endif + +# XXX generally assumed to be installed but make it explicit as rpm +# is a bit special... +BuildRequires: redhat-rpm-config +BuildRequires: gawk +BuildRequires: elfutils-devel%{_isa} >= 0.112 +BuildRequires: elfutils-libelf-devel%{_isa} +BuildRequires: readline-devel%{_isa} zlib-devel%{_isa} +BuildRequires: nss-devel%{_isa} +BuildRequires: nss-softokn-freebl-devel%{_isa} +# The popt version here just documents an older known-good version +BuildRequires: popt-devel%{_isa} >= 1.10.2 +BuildRequires: file-devel%{_isa} +BuildRequires: gettext-devel%{_isa} +#BuildRequires: libselinux-devel%{_isa} +# XXX semanage is only used by sepolicy plugin but configure requires it... +BuildRequires: libsemanage-devel%{_isa} +BuildRequires: ncurses-devel%{_isa} +BuildRequires: bzip2-devel%{_isa} >= 0.9.0c-2 +BuildRequires: python-devel%{_isa} >= 2.6 +BuildRequires: lua-devel%{_isa} >= 5.1 +BuildRequires: libcap-devel%{_isa} +BuildRequires: libacl-devel%{_isa} +%if ! %{without xz} +BuildRequires: xz-devel%{_isa} >= 4.999.8 +%endif + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +The RPM Package Manager (RPM) is a powerful command line driven +package management system capable of installing, uninstalling, +verifying, querying, and updating software packages. Each software +package consists of an archive of files along with information about +the package like its version, a description, etc. + +%package libs +Summary: Libraries for manipulating RPM packages +Group: Development/Libraries +License: GPLv2+ and LGPLv2+ with exceptions +Requires: rpm = %{version}-%{release} +# librpm uses cap_compare, introduced sometimes between libcap 2.10 and 2.16. +# A manual require is needed, see #505596 +Requires: libcap%{_isa} >= 2.16 + +%description libs +This package contains the RPM shared libraries. + +%package build-libs +Summary: Libraries for building and signing RPM packages +Group: Development/Libraries +License: GPLv2+ and LGPLv2+ with exceptions +Requires: rpm-libs%{_isa} = %{version}-%{release} +Requires: %{_bindir}/gpg2 + +%description build-libs +This package contains the RPM shared libraries for building and signing +packages. + +%package devel +Summary: Development files for manipulating RPM packages +Group: Development/Libraries +License: GPLv2+ and LGPLv2+ with exceptions +Requires: rpm = %{version}-%{release} +Requires: rpm-libs%{_isa} = %{version}-%{release} +Requires: rpm-build-libs%{_isa} = %{version}-%{release} +Requires: popt-devel%{_isa} + +%description devel +This package contains the RPM C library and header files. These +development files will simplify the process of writing programs that +manipulate RPM packages and databases. These files are intended to +simplify the process of creating graphical package managers or any +other tools that need an intimate knowledge of RPM packages in order +to function. + +This package should be installed if you want to develop programs that +will manipulate RPM packages and databases. + +%package build +Summary: Scripts and executable programs used to build packages +Group: Development/Tools +Requires: rpm = %{version}-%{release} +Requires: elfutils >= 0.128 binutils +Requires: findutils sed grep gawk diffutils file patch >= 2.5 +Requires: unzip gzip bzip2 cpio xz +Requires: pkgconfig >= 1:0.24 +Requires: /usr/bin/gdb-add-index +Conflicts: ocaml-runtime < 3.11.1-7 + +%description build +The rpm-build package contains the scripts and executable programs +that are used to build packages using the RPM Package Manager. + +%package sign +Summary: Package signing support +Group: System Environment/Base +Requires: rpm-build-libs%{_isa} = %{version}-%{release} + +%description sign +This package contains support for digitally signing RPM packages. + +%package python +Summary: Python bindings for apps which will manipulate RPM packages +Group: Development/Libraries +Requires: rpm = %{version}-%{release} + +%description python +The rpm-python package contains a module that permits applications +written in the Python programming language to use the interface +supplied by RPM Package Manager libraries. + +This package should be installed if you want to develop Python +programs that will manipulate RPM packages and databases. + +%package apidocs +Summary: API documentation for RPM libraries +Group: Documentation +BuildArch: noarch + +%description apidocs +This package contains API documentation for developing applications +that will manipulate RPM packages and databases. + +%package cron +Summary: Create daily logs of installed packages. +Group: System Environment/Base +BuildArch: noarch +Requires: crontabs logrotate rpm = %{version}-%{release} + +%description cron +This package contains a cron job which creates daily logs of installed +packages on a system. + +%prep +%setup -q -n %{name}-%{srcver} %{?with_int_bdb:-a 1} +%patch1 -p1 -b .pkgconfig-path +%patch2 -p1 -b .fedora-specspo +%patch3 -p1 -b .no-man-dirs +%patch4 -p1 -b .use-gpg2 + +%patch301 -p1 -b .niagara +%patch302 -p1 -b .geode +%patch304 -p1 -b .ldflags +%patch305 -p1 -b .dwz-debuginfo +%patch306 -p1 -b .minidebuginfo + +%patch400 -p1 -b .rpmlib-filesystem-check + +%patch500 -p1 -b .fileperm + +%patch5 -p1 -b .armhfp +# this patch cant be applied on softfp builds +%ifnarch armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv7l +%patch6 -p1 -b .armhfp-logic +%endif + +%if %{with int_bdb} +ln -s db-%{bdbver} db +%endif + +%build +%if %{without int_bdb} +#CPPFLAGS=-I%{_includedir}/db%{bdbver} +#LDFLAGS=-L%{_libdir}/db%{bdbver} +%endif +CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`" +CFLAGS="$RPM_OPT_FLAGS" +export CPPFLAGS CFLAGS LDFLAGS + +# Using configure macro has some unwanted side-effects on rpm platform +# setup, use the old-fashioned way for now only defining minimal paths. +./configure \ + --prefix=%{_usr} \ + --sysconfdir=%{_sysconfdir} \ + --localstatedir=%{_var} \ + --sharedstatedir=%{_var}/lib \ + --libdir=%{_libdir} \ + --build=%{_target_platform} \ + --host=%{_target_platform} \ + --with-vendor=redhat \ + %{!?with_int_bdb: --with-external-db} \ + %{!?with_plugins: --disable-plugins} \ + --with-lua \ + --without-selinux \ + --with-cap \ + --with-acl \ + --enable-python + +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT + +make DESTDIR="$RPM_BUILD_ROOT" install + +# Save list of packages through cron +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily +install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm + +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d +install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/rpm + +mkdir -p ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d +echo "r /var/lib/rpm/__db.*" > ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d/rpm.conf + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm + +install -m 644 %{SOURCE10} ${RPM_BUILD_ROOT}%{rpmhome}/fileattrs/libsymlink.attr + +mkdir -p $RPM_BUILD_ROOT/var/lib/rpm +for dbi in \ + Basenames Conflictname Dirnames Group Installtid Name Obsoletename \ + Packages Providename Requirename Triggername Sha1header Sigmd5 \ + __db.001 __db.002 __db.003 __db.004 __db.005 __db.006 __db.007 \ + __db.008 __db.009 +do + touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi +done + +# plant links to relevant db utils as rpmdb_foo for documention compatibility +%if %{without int_bdb} +for dbutil in dump load recover stat upgrade verify +do + ln -s ../../bin/%{dbprefix}_${dbutil} $RPM_BUILD_ROOT/%{rpmhome}/rpmdb_${dbutil} +done +%endif + +%find_lang %{name} + +find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f + +# avoid dragging in tonne of perl libs for an unused script +chmod 0644 $RPM_BUILD_ROOT/%{rpmhome}/perldeps.pl + +# compress our ChangeLog, it's fairly big... +bzip2 -9 ChangeLog + +%clean +rm -rf $RPM_BUILD_ROOT + +%if %{with check} +%check +make check +[ "$(ls -A tests/rpmtests.dir)" ] && cat tests/rpmtests.log +%endif + +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + +%post build-libs -p /sbin/ldconfig +%postun build-libs -p /sbin/ldconfig + +%posttrans +# XXX this is klunky and ugly, rpm itself should handle this +dbstat=/usr/lib/rpm/rpmdb_stat +if [ -x "$dbstat" ]; then + if "$dbstat" -e -h /var/lib/rpm 2>&1 | grep -q "doesn't match library version \| Invalid argument"; then + rm -f /var/lib/rpm/__db.* + fi +fi +exit 0 + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc GROUPS COPYING CREDITS ChangeLog.bz2 doc/manual/[a-z]* + +/usr/lib/tmpfiles.d/rpm.conf +%dir %{_sysconfdir}/rpm + +%attr(0755, root, root) %dir /var/lib/rpm +%attr(0644, root, root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/rpm/* + +/bin/rpm +%{_bindir}/rpm2cpio +%{_bindir}/rpmdb +%{_bindir}/rpmkeys +%{_bindir}/rpmquery +%{_bindir}/rpmverify + +%{_mandir}/man8/rpm.8* +%{_mandir}/man8/rpmdb.8* +%{_mandir}/man8/rpmkeys.8* +%{_mandir}/man8/rpm2cpio.8* + +# XXX this places translated manuals to wrong package wrt eg rpmbuild +%lang(fr) %{_mandir}/fr/man[18]/*.[18]* +%lang(ko) %{_mandir}/ko/man[18]/*.[18]* +%lang(ja) %{_mandir}/ja/man[18]/*.[18]* +%lang(pl) %{_mandir}/pl/man[18]/*.[18]* +%lang(ru) %{_mandir}/ru/man[18]/*.[18]* +%lang(sk) %{_mandir}/sk/man[18]/*.[18]* + +%attr(0755, root, root) %dir %{rpmhome} +%{rpmhome}/macros +%{rpmhome}/rpmpopt* +%{rpmhome}/rpmrc + +%{rpmhome}/rpmdb_* +%{rpmhome}/rpm.daily +%{rpmhome}/rpm.log +%{rpmhome}/rpm.supp +%{rpmhome}/rpm2cpio.sh +%{rpmhome}/tgpg + +%{rpmhome}/platform + +%files libs +%defattr(-,root,root) +%{_libdir}/librpmio.so.* +%{_libdir}/librpm.so.* +%if %{with plugins} +%{_libdir}/rpm-plugins +%endif + +%files build-libs +%defattr(-,root,root) +%{_libdir}/librpmbuild.so.* +%{_libdir}/librpmsign.so.* + +%files build +%defattr(-,root,root) +%{_bindir}/rpmbuild +%{_bindir}/gendiff +%{_bindir}/rpmspec + +%{_mandir}/man1/gendiff.1* +%{_mandir}/man8/rpmbuild.8* +%{_mandir}/man8/rpmdeps.8* +%{_mandir}/man8/rpmspec.8* + +%{rpmhome}/brp-* +%{rpmhome}/check-* +%{rpmhome}/debugedit +%{rpmhome}/find-debuginfo.sh +%{rpmhome}/find-lang.sh +%{rpmhome}/*provides* +%{rpmhome}/*requires* +%{rpmhome}/*deps* +%{rpmhome}/*.prov +%{rpmhome}/*.req +%{rpmhome}/config.* +%{rpmhome}/mkinstalldirs +%{rpmhome}/macros.* +%{rpmhome}/fileattrs + +%files sign +%defattr(-,root,root) +%{_bindir}/rpmsign +%{_mandir}/man8/rpmsign.8* + +%files python +%defattr(-,root,root) +%{python_sitearch}/rpm + +%files devel +%defattr(-,root,root) +%{_mandir}/man8/rpmgraph.8* +%{_bindir}/rpmgraph +%{_libdir}/librp*[a-z].so +%{_libdir}/pkgconfig/rpm.pc +%{_includedir}/rpm + +%files cron +%defattr(-,root,root) +%{_sysconfdir}/cron.daily/rpm +%config(noreplace) %{_sysconfdir}/logrotate.d/rpm + +%files apidocs +%defattr(-,root,root) +%doc COPYING doc/librpm/html/* + +%changelog +* Mon Dec 10 2012 Panu Matilainen - 4.10.2-1 +- update to 4.10.2 (http://rpm.org/wiki/Releases/4.10.2) + +* Thu Oct 11 2012 Panu Matilainen - 4.10.1-3 +- fix noarch __isa_* macro filter in installplatform (#865436) + +* Wed Oct 10 2012 Panu Matilainen - 4.10.1-2 +- account for intentionally skipped files when verifying hardlinks (#864622) + +* Wed Oct 03 2012 Panu Matilainen - 4.10.1-1 +- update to 4.10.1 ((http://rpm.org/wiki/Releases/4.10.1) + +* Mon Jul 30 2012 Panu Matilainen - 4.10.0-6 +- move our tmpfiles config to more politically correct location (#840192) + +* Sat Jul 21 2012 Fedora Release Engineering - 4.10.0-5.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 02 2012 Panu Matilainen - 4.10.0-5 +- force _host_vendor to redhat to better match toolchain etc (#485203) + +* Thu Jun 28 2012 Panu Matilainen - 4.10.0-4 +- merge ppc64p7 related fixes that only went into f17 (#835978) + +* Wed Jun 27 2012 Panu Matilainen - 4.10.0-3 +- add support for minidebuginfo generation (#834073) + +* Mon Jun 25 2012 Panu Matilainen - 4.10.0-2 +- add dwarf compression support to debuginfo generation (#833311) + +* Thu May 24 2012 Panu Matilainen - 4.10.0-1 +- update to 4.10.0 final + +* Mon Apr 23 2012 Panu Matilainen - 4.10.0-0.beta1.1 +- update to 4.10.0-beta1 + +* Mon Apr 16 2012 Panu Matilainen - 4.9.90-0.git11536.1 +- newer git snapshot (#809402, #808750) +- adjust posttrans script wrt bdb string change (#803866, #805613) + +* Thu Apr 05 2012 Panu Matilainen - 4.9.90-0.git11519.1 +- newer git snapshot to keep patch-count down +- fixes CVE-2012-0060, CVE-2012-0061 and CVE-2012-0815 +- fix obsoletes in installing set getting matched on provides (#810077) + +* Wed Apr 04 2012 Jindrich Novy - 4.9.90-0.git11505.12 +- rebuild against new libdb + +* Tue Apr 03 2012 Jindrich Novy - 4.9.90-0.git11505.11 +- build with internal libdb to allow libdb build with higher soname + +* Fri Mar 30 2012 Panu Matilainen - 4.9.90-0.git11505.10 +- fix base arch macro generation (#808250) + +* Thu Mar 29 2012 Panu Matilainen - 4.9.90-0.git11505.9 +- accept files as command line arguments to rpmdeps again (#807767) + +* Mon Mar 26 2012 Panu Matilainen - 4.9.90-0.git11505.8 +- remove fake library provide hacks now that deltarpm got rebuilt + +* Fri Mar 23 2012 Panu Matilainen - 4.9.90-0.git11505.7 +- fix header data length calculation breakage + +* Thu Mar 22 2012 Panu Matilainen - 4.9.90-0.git11505.6 +- fix keyid size bogosity causing breakage on 32bit systems + +* Wed Mar 21 2012 Panu Matilainen - 4.9.90-0.git11505.5 +- add temporary fake library provides to get around deltarpm "bootstrap" + dependency (yes its dirty) + +* Wed Mar 21 2012 Panu Matilainen - 4.9.90-0.git11505.4 +- fix overzealous sanity check breaking posttrans scripts + +* Tue Mar 20 2012 Panu Matilainen - 4.9.90-0.git11505.3 +- fix bad interaction with yum's test-transaction and pretrans scripts + +* Tue Mar 20 2012 Jindrich Novy - 4.9.90-0.git11505.2 +- rebuild + +* Tue Mar 20 2012 Panu Matilainen - 4.9.90-0.git11505.1 +- update to 4.10.0 alpha (http://rpm.org/wiki/Releases/4.10.0) +- drop/adjust patches as necessary + +* Wed Mar 07 2012 Panu Matilainen - 4.9.1.2-14 +- fix backport thinko in the exclude patch + +* Wed Mar 07 2012 Panu Matilainen - 4.9.1.2-13 +- fix memory corruption on rpmdb size estimation (#766260) +- fix couple of memleaks in python bindings (#782147) +- fix regression in verify output formatting (#797964) +- dont process spec include in false branch of if (#782970) +- only warn on missing excluded files on build (#745629) +- dont free up file info sets on test transactions + +* Thu Feb 09 2012 Panu Matilainen - 4.9.1.2-12 +- switch back to smaller BDB cache default (#752897) + +* Sun Jan 15 2012 Dennis Gilmore - 4.9.1.2-11 +- always apply arm hfp macros, conditionally apply the logic to detect hfp + +* Tue Jan 10 2012 Panu Matilainen - 4.9.1.2-10 +- adjust perl and python detection rules for libmagic change (#772699) + +* Mon Jan 09 2012 Jindrich Novy - 4.9.1.2-9 +- recognize perl script as perl code (#772632) + +* Tue Dec 20 2011 Kay Sievers - 4.9.1.2-8 +- add temporary rpmlib patch to support filesystem transition + https://fedoraproject.org/wiki/Features/UsrMove + +* Fri Dec 02 2011 Panu Matilainen - 4.9.1.2-7 +- switch over to libdb, aka Berkeley DB 5.x + +* Thu Dec 01 2011 Panu Matilainen - 4.9.1.2-6 +- fix classification of ELF binaries with setuid/setgid bit (#758251) + +* Fri Nov 25 2011 Panu Matilainen - 4.9.1.2-5 +- adjust font detection rules for libmagic change (#757105) + +* Wed Nov 09 2011 Dennis Gilmore - 4.9.1.2-4 +- conditionally apply arm patch for hardfp on all arches but arm softfp ones + +* Fri Oct 28 2011 Panu Matilainen - 4.9.1.2-3 +- adjust db util prefix & dependency due to #749293 +- warn but dont fail the build if STABS encountered by debugedit (#725378) + +* Wed Oct 12 2011 Panu Matilainen - 4.9.1.2-2 +- try teaching find-lang about the new gnome help layout (#736523) + +* Thu Sep 29 2011 Panu Matilainen - 4.9.1.2-1 +- update to 4.9.1.2 (CVE-2011-3378) +- drop upstreamed rpmdb signal patch + +* Mon Sep 19 2011 Panu Matilainen - 4.9.1.1-3 +- fix signal blocking/unblocking regression on rpmdb open/close (#739492) + +* Mon Aug 08 2011 Adam Jackson 4.9.1.1-2 +- Add RPM_LD_FLAGS to build environment (#728974) + +* Tue Aug 02 2011 Panu Matilainen - 4.9.1.1-1 +- update to 4.9.1.1 + +* Tue Jul 19 2011 Panu Matilainen - 4.9.1-2 +- fix recursion of directories with trailing slash in file list (#722474) + +* Fri Jul 15 2011 Panu Matilainen - 4.9.1-1 +- update to 4.9.1 (http://rpm.org/wiki/Releases/4.9.1) +- drop no longer needed patches + +* Thu Jun 16 2011 Panu Matilainen - 4.9.0-10 +- rebuild to fix a missing interpreter dependency due to bug #712251 + +* Fri Jun 10 2011 Panu Matilainen - 4.9.0-9 +- fix crash if prep or changelog section in spec is empty (#706959) +- fix crash on macro which undefines itself +- fix script dependency generation with file 5.07 string changes (#712251) + +* Thu May 26 2011 Panu Matilainen - 4.9.0-8 +- add dwarf-4 support to debugedit (#707677) +- generate build-id symlinks for all filenames sharing a build-id (#641377) + +* Thu Apr 07 2011 Panu Matilainen - 4.9.0-7 +- add missing ldconfig calls to build-libs sub-package +- fix source url + +* Thu Apr 07 2011 Panu Matilainen - 4.9.0-6 +- revert the spec query change (#693338) for now, it breaks fedpkg + +* Tue Apr 05 2011 Panu Matilainen - 4.9.0-5 +- verify some properties of replaced and wrong-colored files (#528383) +- only list packages that would be generated on spec query (#693338) +- preferred color packages should be erased last (#680261) +- fix leaks when freeing a populated transaction set +- take file state into account for file dependencies + +* Tue Mar 22 2011 Panu Matilainen - 4.9.0-4 +- fix classification of elf executables with sticky bit set (#689182) + +* Wed Mar 16 2011 Jindirch Novy - 4.9.0-3 +- fix crash in package manifest check (#688091) + +* Fri Mar 04 2011 Panu Matilainen - 4.9.0-2 +- fix duplicate rpmsign binary in rpm main package dragging in build-libs + +* Wed Mar 02 2011 Panu Matilainen - 4.9.0-1 +- update to 4.9.0 final +- drop upstreamed patches + +* Tue Mar 01 2011 Panu Matilainen - 4.9.0-0.rc1.4 +- spec cosmetics clean up extra whitespace + group more logically +- wipe out BDB environment at boot via tmpfiles.d + +* Mon Feb 21 2011 Panu Matilainen - 4.9.0-0.rc1.3 +- fix erronous double cursor open, causing yum reinstall hang (#678644) + +* Mon Feb 21 2011 Panu Matilainen - 4.9.0-0.rc1.2 +- fix broken logic in depgen collector, hopefully curing #675002 + +* Tue Feb 15 2011 Panu Matilainen - 4.9.0-0.rc1.1 +- update to 4.9.0-rc1 +- drop upstream patches +- nss packaging has changed, buildrequire nss-softokn-freebl-devel + +* Wed Feb 09 2011 Fedora Release Engineering - 4.9.0-0.beta1.7.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Feb 07 2011 Panu Matilainen - 4.9.0-0.beta1.7 +- fix segfault when building more than one package at a time (#675565) + +* Sun Feb 06 2011 Panu Matilainen - 4.9.0-0.beta1.6 +- adjust ocaml rule for libmagic string change + +* Mon Jan 31 2011 Panu Matilainen - 4.9.0-0.beta1.5 +- dont try to remove environment files if private env used (related to #671200) +- unbreak mono dependency extraction (#673663) +- complain instead of silent abort if cwd is not readable (#672576) + +* Tue Jan 25 2011 Panu Matilainen - 4.9.0-0.beta1.4 +- add support for Requires(posttrans) dependencies + +* Fri Jan 21 2011 Panu Matilainen - 4.9.0-0.beta1.3 +- avoid division by zero in rpmdb size calculation (#671056) +- fix secondary index iteration returing duplicate at end (#671149) +- fix rebuilddb creating duplicate indexes for first header + +* Fri Jan 21 2011 Panu Matilainen - 4.9.0-0.beta1.2 +- permit queries from rpmdb on read-only media (#671200) + +* Tue Jan 18 2011 Panu Matilainen - 4.9.0-0.beta1.1 +- rpm 4.9.0-beta1 (http://rpm.org/wiki/Releases/4.9.0) + - drop no longer needed patches + - adjust requires + buildrequires to match current needs + - adjust rpmdb index ghosts to match the new release + - split librpmbuild and librpmsign to a separate rpm-build-libs package + - split rpmsign to its own package to allow signing without all the build goo + - build-conditionalize plugins, disabled for now + - gstreamer and printer dependency generation moving out + - handle .so symlink dependencies with fileattrs + - use gnupg2 for signing as that's what typically installed by default + +* Tue Jan 18 2011 Panu Matilainen - 4.8.1-7 +- bunch of spec tweaks, cleanups + corrections: + - shorten rpm-build filelist a bit with glob use, reorder for saner grouping + - missing isa in popt version dependency + - only add rpmdb_foo symlinks for actually relevant db_* utils + - drop no longer necessary file-devel dependency from rpm-devel + - drop sqlite backend build-conditional + - preliminaries for moving from db4 to libdb +- use gnupg2 for signing as that's more likely to be installed by default + +* Mon Oct 25 2010 Jindrich Novy - 4.8.1-6 +- rebuild with new xz-5.0.0 + +* Tue Aug 10 2010 Panu Matilainen - 4.8.1-5 +- create gdb index on debuginfo generation (#617166) +- rpm-build now requires /usr/bin/gdb-add-index for consistent index creation +- include COPYING in -apidocs for licensing guidelines compliance + +* Thu Jul 22 2010 David Malcolm - 4.8.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Fri Jul 02 2010 Panu Matilainen - 4.8.1-3 +- ugh, reversed condition braindamage in the font provide extractor "fix" + +* Wed Jun 30 2010 Panu Matilainen - 4.8.1-2 +- fix a potential getOutputFrom() error from font provide extraction +- debug-friendlier message to aid finding other similar cases (#565223) + +* Fri Jun 11 2010 Panu Matilainen - 4.8.1-1 +- update to 4.8.1 (http://rpm.org/wiki/Releases/4.8.1) +- drop no longer needed patches +- fix source url pointing to testing directory + +* Thu Jun 03 2010 Panu Matilainen - 4.8.0-19 +- also strip POSIX file capabilities from hardlinks on upgrade/erase (#598775) + +* Wed Jun 02 2010 Panu Matilainen - 4.8.0-18 +- remove s-bits on upgrade too (#598775) + +* Thu May 27 2010 Panu Matilainen - 4.8.0-17 +- fix segfault in spec parser (#597835) + +* Thu May 27 2010 Panu Matilainen - 4.8.0-16 +- adjust to new pkg-config behavior wrt private dependencies (#596433) +- rpm-build now requires pkgconfig >= 0.24 + +* Fri May 21 2010 Panu Matilainen - 4.8.0-15 +- handle non-existent dependency sets correctly in python (#593553) +- make find-lang look in all locale dirs (#584866) + +* Fri Apr 23 2010 Panu Matilainen - 4.8.0-14 +- lose dangling symlink to extinct (and useless) berkeley_db_svc (#585174) + +* Wed Mar 24 2010 Panu Matilainen - 4.8.0-13 +- fix python match iterator regression wrt boolean representation + +* Wed Mar 17 2010 Panu Matilainen - 4.8.0-12 +- unbreak find-lang --with-man from yesterdays braindamage + +* Tue Mar 16 2010 Panu Matilainen - 4.8.0-11 +- support single PPD providing driver for devices (#568351) +- merge the psdriver patch pile into one +- preserve empty lines in spec prep section (#573339) +- teach python bindings about RPMTRANS_FLAG_NOCONTEXTS (related to #573111) +- dont own localized man directories through find_lang (#569536) + +* Mon Feb 15 2010 Panu Matilainen - 4.8.0-10 +- drop bogus dependency on lzma, xz is used to handle the lzma format too + +* Fri Feb 05 2010 Panu Matilainen - 4.8.0-9 +- unbreak python(abi) requires generation (#562906) + +* Fri Feb 05 2010 Panu Matilainen - 4.8.0-8 +- more fixes to postscript provides extractor (#562228) +- avoid accessing unrelated mount points in disk space checking (#547548) +- fix disk space checking with erasures present in transaction (#561160) + +* Fri Feb 05 2010 Panu Matilainen - 4.8.0-7 +- couple of fixes to the postscript provides extractor (#538101) + +* Thu Feb 04 2010 Panu Matilainen - 4.8.0-6 +- extract provides for postscript printer drivers (#538101) + +* Wed Feb 03 2010 Panu Matilainen - 4.8.0-5 +- python byte-compilation fixes + improvements (#558997) + +* Sat Jan 30 2010 Panu Matilainen - 4.8.0-4 +- support parallel python versions in python dependency extractor (#532118) + +* Thu Jan 21 2010 Panu Matilainen - 4.8.0-3 +- fix segfault on failed url retrieval +- fix verification error code depending on verbosity level +- if anything in testsuite fails, dump out the log + +* Fri Jan 08 2010 Panu Matilainen - 4.8.0-2 +- put disttag back, accidentally nuked in 4.8.0 final update + +* Fri Jan 08 2010 Panu Matilainen - 4.8.0-1 +- update to 4.8.0 final (http://rpm.org/wiki/Releases/4.8.0) + +* Thu Jan 07 2010 Panu Matilainen - 4.8.0-0.beta1.6 +- pull out macro scoping "fix" for now, it breaks font package macros + +* Mon Jan 04 2010 Panu Matilainen - 4.8.0-0.beta1.5 +- always clear locally defined macros when they go out of scope + +* Thu Dec 17 2009 Panu Matilainen - 4.8.0-0.beta1.4 +- permit unexpanded macros when parsing spec (#547997) + +* Wed Dec 09 2009 Panu Matilainen - 4.8.0-0.beta1.3 +- fix a bunch of python refcount-errors causing major memory leaks + +* Mon Dec 07 2009 Panu Matilainen - 4.8.0-0.beta1.2 +- fix noise from python bytecompile on non-python packages (#539635) +- make all our -devel [build]requires isa-specific +- trim out superfluous -devel dependencies from rpm-devel + +* Mon Dec 07 2009 Panu Matilainen - 4.8.0-0.beta1.1 +- update to 4.8.0-beta1 (http://rpm.org/wiki/Releases/4.8.0) +- rpm-build conflicts with current ocaml-runtime + +* Fri Dec 04 2009 Panu Matilainen - 4.7.2-2 +- missing error exit code from signing password checking (#496754) +- dont fail build on unrecognized data files (#532489) +- dont try to parse subkeys and secret keys (#436812) +- fix chmod test on selinux, breaking %%{_fixperms} macro (#543035) + +* Wed Nov 25 2009 Panu Matilainen - 4.7.2-1 +- update to 4.7.2 (http://rpm.org/wiki/Releases/4.7.2) +- fixes #464750, #529214 + +* Wed Nov 18 2009 Jindrich Novy - 4.7.1-10 +- rebuild against BDB-4.8.24 + +* Wed Nov 18 2009 Jindrich Novy - 4.7.1-9 +- drop versioned dependency to BDB + +* Wed Oct 28 2009 Panu Matilainen - 4.7.1-8 +- support multiple python implementations in brp-python-bytecompile (#531117) +- make disk space problem reporting a bit saner (#517418) + +* Tue Oct 06 2009 Panu Matilainen - 4.7.1-7 +- fix build with BDB 4.8.x by removing XA "support" from BDB backend +- perl dep extractor heredoc parsing improvements (#524929) + +* Mon Sep 21 2009 Panu Matilainen - 4.7.1-6 +- use relative paths within db environment (related to #507309, #507309...) +- remove db environment on close in chrooted operation (related to above) +- initialize rpmlib earlier in rpm2cpio (#523260) +- fix file dependency tag extension formatting (#523282) + +* Tue Sep 15 2009 Panu Matilainen - 4.7.1-5 +- fix duplicate dependency filtering on build (#490378) +- permit absolute paths in file lists again (#521760) +- use permissions 444 for all .debug files (#522194) +- add support for optional bugurl tag (#512774) + +* Fri Aug 14 2009 Jesse Keating - 4.7.1-4 +- Patch to make geode appear as i686 (#517475) + +* Thu Aug 06 2009 Jindrich Novy - 4.7.1-3 +- rebuild because of the new xz + +* Sun Jul 26 2009 Fedora Release Engineering - 4.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Jul 21 2009 Panu Matilainen - 4.7.1-1 +- update to 4.7.1 ((http://rpm.org/wiki/Releases/4.7.1) +- fix source url + +* Mon Jul 20 2009 Bill Nottingham - 4.7.0-9 +- enable XZ support + +* Thu Jun 18 2009 Panu Matilainen - 4.7.0-8 +- updated OSGi dependency extractor (#506471) +- fix segfault in symlink fingerprinting (#505777) +- fix invalid memory access causing bogus file dependency errors (#506323) + +* Tue Jun 16 2009 Panu Matilainen - 4.7.0-7 +- add dwarf-3 support to debugedit (#505774) + +* Fri Jun 12 2009 Stepan Kasal - 4.7.0-6 +- require libcap >= 2.16 (#505596) + +* Tue Jun 03 2009 Panu Matilainen - 4.7.0-5 +- don't mess up problem altNEVR in python ts.check() (#501068) +- fix hardlink size calculation on build (#503020) + +* Thu May 14 2009 Panu Matilainen - 4.7.0-4 +- split cron-job into a sub-package to avoid silly deps on core rpm (#500722) +- rpm requires coreutils but not in %%post +- build with libcap and libacl +- fix pgp pubkey signature tag parsing + +* Tue Apr 21 2009 Panu Matilainen - 4.7.0-3 +- couple of merge-review fixes (#226377) + - eliminate bogus leftover rpm:rpm rpmdb ownership + - unescaped macro in changelog +- fix find-lang --with-kde with KDE3 (#466009) +- switch back to default file digest algorithm + +* Fri Apr 17 2009 Panu Matilainen - 4.7.0-2 +- file classification tweaks for text files (#494817) + - disable libmagic text token checks, it's way too error-prone + - consistently classify all text as such and include description + +* Thu Apr 16 2009 Panu Matilainen - 4.7.0-1 +- update to 4.7.0 final (http://rpm.org/wiki/Releases/4.7.0) +- fixes #494049, #495429 +- dont permit test-suite failure anymore + +* Thu Apr 09 2009 Panu Matilainen - 4.7.0-0.rc1.1 +- update to 4.7.0-rc1 +- fixes #493157, #493777, #493696, #491388, #487597, #493162 + +* Fri Apr 03 2009 Panu Matilainen - 4.7.0-0.beta1.9 +- fix recorded file state of otherwise skipped files (#492947) +- compress ChangeLog, drop old CHANGES file (#492440) + +* Thu Apr 2 2009 Tom "spot" Callaway - 4.7.0-0.beta1.8 +- Fix sparcv9v and sparc64v targets + +* Tue Mar 24 2009 Panu Matilainen - 4.7.0-0.beta1.7 +- prefer more specific types over generic "text" in classification (#491349) + +* Mon Mar 23 2009 Panu Matilainen - 4.7.0-0.beta1.6 +- with the fd leak gone, let libmagic look into compressed files again (#491596) + +* Mon Mar 23 2009 Panu Matilainen - 4.7.0-0.beta1.5 +- fix font provide generation on filenames with whitespace (#491597) + +* Thu Mar 12 2009 Panu Matilainen - 4.7.0-0.beta1.4 +- handle RSA V4 signatures (#436812) +- add alpha arch ISA-bits +- enable internal testsuite on build + +* Mon Mar 09 2009 Panu Matilainen - 4.7.0-0.beta1.3 +- fix _install_langs behavior (#489235) +- fix recording of file states into rpmdb on install + +* Sun Mar 08 2009 Panu Matilainen - 4.7.0-0.beta1.2 +- load macros before creating directories on src.rpm install (#489104) + +* Fri Mar 06 2009 Panu Matilainen - 4.7.0-0.beta1.1 +- update to 4.7.0-beta1 (http://rpm.org/wiki/Releases/4.7.0) + +* Fri Feb 27 2009 Panu Matilainen - 4.6.0-11 +- build rpm itself with md5 file digests for now to ensure upgradability + +* Thu Feb 26 2009 Panu Matilainen - 4.6.0-10 +- handle NULL passed as EVR in rpmdsSingle() again (#485616) + +* Wed Feb 25 2009 Panu Matilainen - 4.6.0-9 +- pull out python byte-compile syntax check for now + +* Mon Feb 23 2009 Panu Matilainen - 4.6.0-8 +- make -apidocs sub-package noarch +- fix source URL + +* Sat Feb 21 2009 Panu Matilainen - 4.6.0-7 +- loosen up restrictions on dependency names (#455119) +- handle inter-dependent pkg-config files for requires too (#473814) +- error/warn on elf binaries in noarch package in build + +* Fri Feb 20 2009 Panu Matilainen - 4.6.0-6 +- error out on uncompilable python code (Tim Waugh) + +* Tue Feb 17 2009 Jindrich Novy - 4.6.0-5 +- remove two offending hunks from anyarch patch causing that + RPMTAG_BUILDARCHS isn't written to SRPMs + +* Mon Feb 16 2009 Jindrich Novy - 4.6.0-4 +- inherit group tag from the main package (#470714) +- ignore BuildArch tags for anyarch actions (#442105) +- don't check package BuildRequires when doing --rmsource (#452477) +- don't fail because of missing sources when only spec removal + is requested (#472427) + +* Mon Feb 16 2009 Panu Matilainen - 4.6.0-3 +- updated fontconfig provide script - fc-query does all the hard work now + +* Mon Feb 09 2009 Panu Matilainen - 4.6.0-2 +- build against db 4.7.x + +* Fri Feb 06 2009 Panu Matilainen - 4.6.0-1 +- update to 4.6.0 final +- revert libmagic looking into compressed files for now, breaks ooffice build + +* Fri Feb 06 2009 Panu Matilainen - 4.6.0-0.rc4.5 +- enable fontconfig provides generation + +* Thu Feb 05 2009 Panu Matilainen - 4.6.0-0.rc4.4 +- fixup rpm translation lookup to match Fedora specspo (#436941) + +* Wed Feb 04 2009 Panu Matilainen - 4.6.0-0.rc4.3 +- extract mimehandler provides from .desktop files +- preliminaries for extracting font provides (not enabled yet) +- dont classify font metrics data as fonts +- only run script dep extraction once per file, duh + +* Sat Jan 31 2009 Panu Matilainen - 4.6.0-0.rc4.2 +- change platform sharedstatedir to something more sensible (#185862) +- add rpmdb_foo links to db utils for documentation compatibility + +* Fri Jan 30 2009 Panu Matilainen - 4.6.0-0.rc4.1 +- update to 4.6.0-rc4 +- fixes #475582, #478907, #476737, #479869, #476201 + +* Fri Dec 12 2008 Panu Matilainen - 4.6.0-0.rc3.2 +- add back defaultdocdir patch which hadn't been applied on 4.6.x branch yet + +* Fri Dec 12 2008 Panu Matilainen - 4.6.0-0.rc3.1 +- add dist-tag, rebuild + +* Tue Dec 09 2008 Panu Matilainen - 4.6.0-0.rc3.1 +- update to rpm 4.6.0-rc3 +- fixes #475214, #474550, #473239 + +* Wed Dec 3 2008 Jeremy Katz - 4.6.0-0.rc2.9 +- I built into the wrong place + +* Wed Dec 3 2008 Jeremy Katz - 4.6.0-0.rc2.8 +- python 2.6 rebuild again + +* Wed Dec 03 2008 Panu Matilainen +- make rpm-build require pkgconfig (#473978) + +* Tue Dec 02 2008 Panu Matilainen +- fix pkg-config provide generation when pc's depend on each other (#473814) + +* Mon Dec 01 2008 Jindrich Novy +- include rpmfileutil.h from rpmmacro.h, unbreaks + net-snmp (#473420) + +* Sun Nov 30 2008 Panu Matilainen +- rebuild for python 2.6 + +* Sat Nov 29 2008 Panu Matilainen +- update to 4.6.0-rc2 +- fixes #471820, #473167, #469355, #468319, #472507, #247374, #426672, #444661 +- enable automatic generation of pkg-config and libtool dependencies #465377 + +* Fri Oct 31 2008 Panu Matilainen +- adjust find-debuginfo for "file" output change (#468129) + +* Tue Oct 28 2008 Panu Matilainen +- Florian's improved fingerprinting hash algorithm from upstream + +* Sat Oct 25 2008 Panu Matilainen +- Make noarch sub-packages actually work +- Fix defaultdocdir logic in installplatform to avoid hardwiring mandir + +* Fri Oct 24 2008 Jindrich Novy +- update compat-db dependencies (#459710) + +* Wed Oct 22 2008 Panu Matilainen +- never add identical NEVRA to transaction more than once (#467822) + +* Sun Oct 19 2008 Panu Matilainen +- permit tab as macro argument separator (#467567) + +* Thu Oct 16 2008 Panu Matilainen +- update to 4.6.0-rc1 +- fixes #465586, #466597, #465409, #216221, #466503, #466009, #463447... +- avoid using %%configure macro for now, it has unwanted side-effects on rpm + +* Wed Oct 01 2008 Panu Matilainen +- update to official 4.5.90 alpha tarball +- a big pile of misc bugfixes + translation updates +- isa-macro generation fix for ppc (#464754) +- avoid pulling in pile of perl dependencies for an unused script +- handle both "invalid argument" and clear env version mismatch on posttrans + +* Thu Sep 25 2008 Jindrich Novy +- don't treat %%patch numberless if -P parameter is present (#463942) + +* Thu Sep 11 2008 Panu Matilainen +- add hack to support extracting gstreamer plugin provides (#438225) +- fix another macro argument handling regression (#461180) + +* Thu Sep 11 2008 Jindrich Novy +- create directory structure for rpmbuild prior to build if it doesn't exist (#455387) +- create _topdir if it doesn't exist when installing SRPM +- don't generate broken cpio in case of hardlink pointing on softlink, + thanks to pixel@mandriva.com + +* Sat Sep 06 2008 Jindrich Novy +- fail hard if patch isn't found (#461347) + +* Mon Sep 01 2008 Jindrich Novy +- fix parsing of boolean expressions in spec (#456103) + (unbreaks pam, jpilot and maybe other builds) + +* Tue Aug 26 2008 Jindrich Novy +- add support for noarch subpackages +- fix segfault in case of insufficient disk space detected (#460146) + +* Wed Aug 13 2008 Panu Matilainen +- 4.5.90-0.git8461.2 +- fix archivesize tag generation on ppc (#458817) + +* Fri Aug 08 2008 Panu Matilainen +- 4.5.90-0.git8461.1 +- new snapshot from upstream +- fixes #68290, #455972, #446202, #453364, #456708, #456103, #456321, #456913, + #458260, #458261 +- partial fix for #457360 + +* Thu Jul 31 2008 Florian Festi +- 4.5.90-0.git8427.1 +- new snapshot from upstream + +* Thu Jul 31 2008 Florian Festi +- 4.5.90-0.git8426.10 +- rpm-4.5.90-posttrans.patch +- use header from rpmdb in posttrans to make anaconda happy + +* Sat Jul 19 2008 Panu Matilainen +- 4.5.90-0.git8426.9 +- fix regression in patch number handling (#455872) + +* Tue Jul 15 2008 Panu Matilainen +- 4.5.90-0.git8426.8 +- fix regression in macro argument handling (#455333) + +* Mon Jul 14 2008 Panu Matilainen +- 4.5.90-0.git8426.7 +- fix mono dependency extraction (adjust for libmagic string change) + +* Sat Jul 12 2008 Panu Matilainen +- 4.5.90-0.git8426.6 +- fix type mismatch causing funky breakage on ppc64 + +* Fri Jul 11 2008 Panu Matilainen +- 4.5.90-0.git8426.5 +- flip back to external bdb +- fix tab vs spaces complaints from rpmlint +- add dep for lzma and require unzip instead of zip in build (#310694) +- add pkgconfig dependency to rpm-devel +- drop ISA-dependencies for initial introduction +- new snapshot from upstream for documentation fixes + +* Thu Jul 10 2008 Panu Matilainen +- 4.5.90-0.git8424.4 +- handle int vs external db in posttrans too + +* Wed Jul 08 2008 Panu Matilainen +- 4.5.90-0.git8424.3 +- require curl as external url helper + +* Wed Jul 08 2008 Panu Matilainen +- 4.5.90-0.git8424.2 +- add support for building with or without internal db + +* Wed Jul 08 2008 Panu Matilainen +- rpm 4.5.90-0.git8424.1 (alpha snapshot) +- adjust to build against Berkeley DB 4.5.20 from compat-db for now +- add posttrans to clean up db environment mismatch after upgrade +- forward-port devel autodeps patch + +* Tue Jul 08 2008 Panu Matilainen +- adjust for rpmdb index name change +- drop unnecessary vendor-macro patch for real +- add ISA-dependencies among rpm subpackages +- make lzma and sqlite deps conditional and disabled by default for now + +* Fri Feb 01 2008 Panu Matilainen +- spec largely rewritten, truncating changelog diff --git a/bbox-f14/rpm-changes/rpm.spec.orig b/bbox-f14/rpm-changes/rpm.spec.orig new file mode 100644 index 0000000..98007fa --- /dev/null +++ b/bbox-f14/rpm-changes/rpm.spec.orig @@ -0,0 +1,1158 @@ +# build against xz? +%bcond_without xz +# just for giggles, option to build with internal Berkeley DB +%bcond_with int_bdb +# run internal testsuite? +%bcond_without check +# disable plugins initially +%bcond_with plugins + +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} + +%define rpmhome /usr/lib/rpm + +%define rpmver 4.10.2 +%define srcver %{rpmver}%{?snapver:-%{snapver}} + +%define bdbname libdb +%define bdbver 5.3.15 +%define dbprefix db + +Summary: The RPM package management system +Name: rpm +Version: %{rpmver} +Release: %{?snapver:0.%{snapver}.}1%{?dist} +Group: System Environment/Base +Url: http://www.rpm.org/ +Source0: http://rpm.org/releases/rpm-4.10.x/%{name}-%{srcver}.tar.bz2 +%if %{with int_bdb} +Source1: db-%{bdbver}.tar.gz +%else +BuildRequires: libdb-devel +%endif +Source10: libsymlink.attr + +Patch1: rpm-4.5.90-pkgconfig-path.patch +# Fedora specspo is setup differently than what rpm expects, considering +# this as Fedora-specific patch for now +Patch2: rpm-4.9.90-fedora-specspo.patch +# In current Fedora, man-pages pkg owns all the localized man directories +Patch3: rpm-4.9.90-no-man-dirs.patch +# gnupg2 comes installed by default, avoid need to drag in gnupg too +Patch4: rpm-4.8.1-use-gpg2.patch +Patch5: rpm-4.9.90-armhfp.patch +#conditionally applied patch for arm hardware floating point +Patch6: rpm-4.9.0-armhfp-logic.patch + +# Patches already in upstream + +# These are not yet upstream +Patch301: rpm-4.6.0-niagara.patch +Patch302: rpm-4.7.1-geode-i686.patch +# Probably to be upstreamed in slightly different form +Patch304: rpm-4.9.1.1-ld-flags.patch +# Compressed debuginfo support (#833311) +Patch305: rpm-4.10.0-dwz-debuginfo.patch +# Minidebuginfo support (#834073) +Patch306: rpm-4.10.0-minidebuginfo.patch +# Temporary Patch to provide support for updates +Patch400: rpm-4.9.1.2-rpmlib-filesystem-check.patch + +# Partially GPL/LGPL dual-licensed and some bits with BSD +# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD +License: GPLv2+ + +Requires: coreutils +%if %{without int_bdb} +# db recovery tools, rpmdb_util symlinks +Requires: %{_bindir}/%{dbprefix}_stat +%endif +Requires: popt%{_isa} >= 1.10.2.1 +Requires: curl + +%if %{without int_bdb} +BuildRequires: %{bdbname}-devel%{_isa} +%endif + +%if %{with check} +BuildRequires: fakechroot +%endif + +# XXX generally assumed to be installed but make it explicit as rpm +# is a bit special... +BuildRequires: redhat-rpm-config +BuildRequires: gawk +BuildRequires: elfutils-devel%{_isa} >= 0.112 +BuildRequires: elfutils-libelf-devel%{_isa} +BuildRequires: readline-devel%{_isa} zlib-devel%{_isa} +BuildRequires: nss-devel%{_isa} +BuildRequires: nss-softokn-freebl-devel%{_isa} +# The popt version here just documents an older known-good version +BuildRequires: popt-devel%{_isa} >= 1.10.2 +BuildRequires: file-devel%{_isa} +BuildRequires: gettext-devel%{_isa} +BuildRequires: libselinux-devel%{_isa} +# XXX semanage is only used by sepolicy plugin but configure requires it... +BuildRequires: libsemanage-devel%{_isa} +BuildRequires: ncurses-devel%{_isa} +BuildRequires: bzip2-devel%{_isa} >= 0.9.0c-2 +BuildRequires: python-devel%{_isa} >= 2.6 +BuildRequires: lua-devel%{_isa} >= 5.1 +BuildRequires: libcap-devel%{_isa} +BuildRequires: libacl-devel%{_isa} +%if ! %{without xz} +BuildRequires: xz-devel%{_isa} >= 4.999.8 +%endif + +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +The RPM Package Manager (RPM) is a powerful command line driven +package management system capable of installing, uninstalling, +verifying, querying, and updating software packages. Each software +package consists of an archive of files along with information about +the package like its version, a description, etc. + +%package libs +Summary: Libraries for manipulating RPM packages +Group: Development/Libraries +License: GPLv2+ and LGPLv2+ with exceptions +Requires: rpm = %{version}-%{release} +# librpm uses cap_compare, introduced sometimes between libcap 2.10 and 2.16. +# A manual require is needed, see #505596 +Requires: libcap%{_isa} >= 2.16 + +%description libs +This package contains the RPM shared libraries. + +%package build-libs +Summary: Libraries for building and signing RPM packages +Group: Development/Libraries +License: GPLv2+ and LGPLv2+ with exceptions +Requires: rpm-libs%{_isa} = %{version}-%{release} +Requires: %{_bindir}/gpg2 + +%description build-libs +This package contains the RPM shared libraries for building and signing +packages. + +%package devel +Summary: Development files for manipulating RPM packages +Group: Development/Libraries +License: GPLv2+ and LGPLv2+ with exceptions +Requires: rpm = %{version}-%{release} +Requires: rpm-libs%{_isa} = %{version}-%{release} +Requires: rpm-build-libs%{_isa} = %{version}-%{release} +Requires: popt-devel%{_isa} + +%description devel +This package contains the RPM C library and header files. These +development files will simplify the process of writing programs that +manipulate RPM packages and databases. These files are intended to +simplify the process of creating graphical package managers or any +other tools that need an intimate knowledge of RPM packages in order +to function. + +This package should be installed if you want to develop programs that +will manipulate RPM packages and databases. + +%package build +Summary: Scripts and executable programs used to build packages +Group: Development/Tools +Requires: rpm = %{version}-%{release} +Requires: elfutils >= 0.128 binutils +Requires: findutils sed grep gawk diffutils file patch >= 2.5 +Requires: unzip gzip bzip2 cpio xz +Requires: pkgconfig >= 1:0.24 +Requires: /usr/bin/gdb-add-index +Conflicts: ocaml-runtime < 3.11.1-7 + +%description build +The rpm-build package contains the scripts and executable programs +that are used to build packages using the RPM Package Manager. + +%package sign +Summary: Package signing support +Group: System Environment/Base +Requires: rpm-build-libs%{_isa} = %{version}-%{release} + +%description sign +This package contains support for digitally signing RPM packages. + +%package python +Summary: Python bindings for apps which will manipulate RPM packages +Group: Development/Libraries +Requires: rpm = %{version}-%{release} + +%description python +The rpm-python package contains a module that permits applications +written in the Python programming language to use the interface +supplied by RPM Package Manager libraries. + +This package should be installed if you want to develop Python +programs that will manipulate RPM packages and databases. + +%package apidocs +Summary: API documentation for RPM libraries +Group: Documentation +BuildArch: noarch + +%description apidocs +This package contains API documentation for developing applications +that will manipulate RPM packages and databases. + +%package cron +Summary: Create daily logs of installed packages. +Group: System Environment/Base +BuildArch: noarch +Requires: crontabs logrotate rpm = %{version}-%{release} + +%description cron +This package contains a cron job which creates daily logs of installed +packages on a system. + +%prep +%setup -q -n %{name}-%{srcver} %{?with_int_bdb:-a 1} +%patch1 -p1 -b .pkgconfig-path +%patch2 -p1 -b .fedora-specspo +%patch3 -p1 -b .no-man-dirs +%patch4 -p1 -b .use-gpg2 + +%patch301 -p1 -b .niagara +%patch302 -p1 -b .geode +%patch304 -p1 -b .ldflags +%patch305 -p1 -b .dwz-debuginfo +%patch306 -p1 -b .minidebuginfo + +%patch400 -p1 -b .rpmlib-filesystem-check + +%patch5 -p1 -b .armhfp +# this patch cant be applied on softfp builds +%ifnarch armv3l armv4b armv4l armv4tl armv5tel armv5tejl armv6l armv7l +%patch6 -p1 -b .armhfp-logic +%endif + +%if %{with int_bdb} +ln -s db-%{bdbver} db +%endif + +%build +%if %{without int_bdb} +#CPPFLAGS=-I%{_includedir}/db%{bdbver} +#LDFLAGS=-L%{_libdir}/db%{bdbver} +%endif +CPPFLAGS="$CPPFLAGS `pkg-config --cflags nss`" +CFLAGS="$RPM_OPT_FLAGS" +export CPPFLAGS CFLAGS LDFLAGS + +# Using configure macro has some unwanted side-effects on rpm platform +# setup, use the old-fashioned way for now only defining minimal paths. +./configure \ + --prefix=%{_usr} \ + --sysconfdir=%{_sysconfdir} \ + --localstatedir=%{_var} \ + --sharedstatedir=%{_var}/lib \ + --libdir=%{_libdir} \ + --build=%{_target_platform} \ + --host=%{_target_platform} \ + --with-vendor=redhat \ + %{!?with_int_bdb: --with-external-db} \ + %{!?with_plugins: --disable-plugins} \ + --with-lua \ + --with-selinux \ + --with-cap \ + --with-acl \ + --enable-python + +make %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT + +make DESTDIR="$RPM_BUILD_ROOT" install + +# Save list of packages through cron +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily +install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm + +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d +install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/rpm + +mkdir -p ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d +echo "r /var/lib/rpm/__db.*" > ${RPM_BUILD_ROOT}/usr/lib/tmpfiles.d/rpm.conf + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm + +install -m 644 %{SOURCE10} ${RPM_BUILD_ROOT}%{rpmhome}/fileattrs/libsymlink.attr + +mkdir -p $RPM_BUILD_ROOT/var/lib/rpm +for dbi in \ + Basenames Conflictname Dirnames Group Installtid Name Obsoletename \ + Packages Providename Requirename Triggername Sha1header Sigmd5 \ + __db.001 __db.002 __db.003 __db.004 __db.005 __db.006 __db.007 \ + __db.008 __db.009 +do + touch $RPM_BUILD_ROOT/var/lib/rpm/$dbi +done + +# plant links to relevant db utils as rpmdb_foo for documention compatibility +%if %{without int_bdb} +for dbutil in dump load recover stat upgrade verify +do + ln -s ../../bin/%{dbprefix}_${dbutil} $RPM_BUILD_ROOT/%{rpmhome}/rpmdb_${dbutil} +done +%endif + +%find_lang %{name} + +find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f + +# avoid dragging in tonne of perl libs for an unused script +chmod 0644 $RPM_BUILD_ROOT/%{rpmhome}/perldeps.pl + +# compress our ChangeLog, it's fairly big... +bzip2 -9 ChangeLog + +%clean +rm -rf $RPM_BUILD_ROOT + +%if %{with check} +%check +make check +[ "$(ls -A tests/rpmtests.dir)" ] && cat tests/rpmtests.log +%endif + +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + +%post build-libs -p /sbin/ldconfig +%postun build-libs -p /sbin/ldconfig + +%posttrans +# XXX this is klunky and ugly, rpm itself should handle this +dbstat=/usr/lib/rpm/rpmdb_stat +if [ -x "$dbstat" ]; then + if "$dbstat" -e -h /var/lib/rpm 2>&1 | grep -q "doesn't match library version \| Invalid argument"; then + rm -f /var/lib/rpm/__db.* + fi +fi +exit 0 + +%files -f %{name}.lang +%defattr(-,root,root,-) +%doc GROUPS COPYING CREDITS ChangeLog.bz2 doc/manual/[a-z]* + +/usr/lib/tmpfiles.d/rpm.conf +%dir %{_sysconfdir}/rpm + +%attr(0755, root, root) %dir /var/lib/rpm +%attr(0644, root, root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/lib/rpm/* + +/bin/rpm +%{_bindir}/rpm2cpio +%{_bindir}/rpmdb +%{_bindir}/rpmkeys +%{_bindir}/rpmquery +%{_bindir}/rpmverify + +%{_mandir}/man8/rpm.8* +%{_mandir}/man8/rpmdb.8* +%{_mandir}/man8/rpmkeys.8* +%{_mandir}/man8/rpm2cpio.8* + +# XXX this places translated manuals to wrong package wrt eg rpmbuild +%lang(fr) %{_mandir}/fr/man[18]/*.[18]* +%lang(ko) %{_mandir}/ko/man[18]/*.[18]* +%lang(ja) %{_mandir}/ja/man[18]/*.[18]* +%lang(pl) %{_mandir}/pl/man[18]/*.[18]* +%lang(ru) %{_mandir}/ru/man[18]/*.[18]* +%lang(sk) %{_mandir}/sk/man[18]/*.[18]* + +%attr(0755, root, root) %dir %{rpmhome} +%{rpmhome}/macros +%{rpmhome}/rpmpopt* +%{rpmhome}/rpmrc + +%{rpmhome}/rpmdb_* +%{rpmhome}/rpm.daily +%{rpmhome}/rpm.log +%{rpmhome}/rpm.supp +%{rpmhome}/rpm2cpio.sh +%{rpmhome}/tgpg + +%{rpmhome}/platform + +%files libs +%defattr(-,root,root) +%{_libdir}/librpmio.so.* +%{_libdir}/librpm.so.* +%if %{with plugins} +%{_libdir}/rpm-plugins +%endif + +%files build-libs +%defattr(-,root,root) +%{_libdir}/librpmbuild.so.* +%{_libdir}/librpmsign.so.* + +%files build +%defattr(-,root,root) +%{_bindir}/rpmbuild +%{_bindir}/gendiff +%{_bindir}/rpmspec + +%{_mandir}/man1/gendiff.1* +%{_mandir}/man8/rpmbuild.8* +%{_mandir}/man8/rpmdeps.8* +%{_mandir}/man8/rpmspec.8* + +%{rpmhome}/brp-* +%{rpmhome}/check-* +%{rpmhome}/debugedit +%{rpmhome}/find-debuginfo.sh +%{rpmhome}/find-lang.sh +%{rpmhome}/*provides* +%{rpmhome}/*requires* +%{rpmhome}/*deps* +%{rpmhome}/*.prov +%{rpmhome}/*.req +%{rpmhome}/config.* +%{rpmhome}/mkinstalldirs +%{rpmhome}/macros.* +%{rpmhome}/fileattrs + +%files sign +%defattr(-,root,root) +%{_bindir}/rpmsign +%{_mandir}/man8/rpmsign.8* + +%files python +%defattr(-,root,root) +%{python_sitearch}/rpm + +%files devel +%defattr(-,root,root) +%{_mandir}/man8/rpmgraph.8* +%{_bindir}/rpmgraph +%{_libdir}/librp*[a-z].so +%{_libdir}/pkgconfig/rpm.pc +%{_includedir}/rpm + +%files cron +%defattr(-,root,root) +%{_sysconfdir}/cron.daily/rpm +%config(noreplace) %{_sysconfdir}/logrotate.d/rpm + +%files apidocs +%defattr(-,root,root) +%doc COPYING doc/librpm/html/* + +%changelog +* Mon Dec 10 2012 Panu Matilainen - 4.10.2-1 +- update to 4.10.2 (http://rpm.org/wiki/Releases/4.10.2) + +* Thu Oct 11 2012 Panu Matilainen - 4.10.1-3 +- fix noarch __isa_* macro filter in installplatform (#865436) + +* Wed Oct 10 2012 Panu Matilainen - 4.10.1-2 +- account for intentionally skipped files when verifying hardlinks (#864622) + +* Wed Oct 03 2012 Panu Matilainen - 4.10.1-1 +- update to 4.10.1 ((http://rpm.org/wiki/Releases/4.10.1) + +* Mon Jul 30 2012 Panu Matilainen - 4.10.0-6 +- move our tmpfiles config to more politically correct location (#840192) + +* Sat Jul 21 2012 Fedora Release Engineering - 4.10.0-5.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 02 2012 Panu Matilainen - 4.10.0-5 +- force _host_vendor to redhat to better match toolchain etc (#485203) + +* Thu Jun 28 2012 Panu Matilainen - 4.10.0-4 +- merge ppc64p7 related fixes that only went into f17 (#835978) + +* Wed Jun 27 2012 Panu Matilainen - 4.10.0-3 +- add support for minidebuginfo generation (#834073) + +* Mon Jun 25 2012 Panu Matilainen - 4.10.0-2 +- add dwarf compression support to debuginfo generation (#833311) + +* Thu May 24 2012 Panu Matilainen - 4.10.0-1 +- update to 4.10.0 final + +* Mon Apr 23 2012 Panu Matilainen - 4.10.0-0.beta1.1 +- update to 4.10.0-beta1 + +* Mon Apr 16 2012 Panu Matilainen - 4.9.90-0.git11536.1 +- newer git snapshot (#809402, #808750) +- adjust posttrans script wrt bdb string change (#803866, #805613) + +* Thu Apr 05 2012 Panu Matilainen - 4.9.90-0.git11519.1 +- newer git snapshot to keep patch-count down +- fixes CVE-2012-0060, CVE-2012-0061 and CVE-2012-0815 +- fix obsoletes in installing set getting matched on provides (#810077) + +* Wed Apr 04 2012 Jindrich Novy - 4.9.90-0.git11505.12 +- rebuild against new libdb + +* Tue Apr 03 2012 Jindrich Novy - 4.9.90-0.git11505.11 +- build with internal libdb to allow libdb build with higher soname + +* Fri Mar 30 2012 Panu Matilainen - 4.9.90-0.git11505.10 +- fix base arch macro generation (#808250) + +* Thu Mar 29 2012 Panu Matilainen - 4.9.90-0.git11505.9 +- accept files as command line arguments to rpmdeps again (#807767) + +* Mon Mar 26 2012 Panu Matilainen - 4.9.90-0.git11505.8 +- remove fake library provide hacks now that deltarpm got rebuilt + +* Fri Mar 23 2012 Panu Matilainen - 4.9.90-0.git11505.7 +- fix header data length calculation breakage + +* Thu Mar 22 2012 Panu Matilainen - 4.9.90-0.git11505.6 +- fix keyid size bogosity causing breakage on 32bit systems + +* Wed Mar 21 2012 Panu Matilainen - 4.9.90-0.git11505.5 +- add temporary fake library provides to get around deltarpm "bootstrap" + dependency (yes its dirty) + +* Wed Mar 21 2012 Panu Matilainen - 4.9.90-0.git11505.4 +- fix overzealous sanity check breaking posttrans scripts + +* Tue Mar 20 2012 Panu Matilainen - 4.9.90-0.git11505.3 +- fix bad interaction with yum's test-transaction and pretrans scripts + +* Tue Mar 20 2012 Jindrich Novy - 4.9.90-0.git11505.2 +- rebuild + +* Tue Mar 20 2012 Panu Matilainen - 4.9.90-0.git11505.1 +- update to 4.10.0 alpha (http://rpm.org/wiki/Releases/4.10.0) +- drop/adjust patches as necessary + +* Wed Mar 07 2012 Panu Matilainen - 4.9.1.2-14 +- fix backport thinko in the exclude patch + +* Wed Mar 07 2012 Panu Matilainen - 4.9.1.2-13 +- fix memory corruption on rpmdb size estimation (#766260) +- fix couple of memleaks in python bindings (#782147) +- fix regression in verify output formatting (#797964) +- dont process spec include in false branch of if (#782970) +- only warn on missing excluded files on build (#745629) +- dont free up file info sets on test transactions + +* Thu Feb 09 2012 Panu Matilainen - 4.9.1.2-12 +- switch back to smaller BDB cache default (#752897) + +* Sun Jan 15 2012 Dennis Gilmore - 4.9.1.2-11 +- always apply arm hfp macros, conditionally apply the logic to detect hfp + +* Tue Jan 10 2012 Panu Matilainen - 4.9.1.2-10 +- adjust perl and python detection rules for libmagic change (#772699) + +* Mon Jan 09 2012 Jindrich Novy - 4.9.1.2-9 +- recognize perl script as perl code (#772632) + +* Tue Dec 20 2011 Kay Sievers - 4.9.1.2-8 +- add temporary rpmlib patch to support filesystem transition + https://fedoraproject.org/wiki/Features/UsrMove + +* Fri Dec 02 2011 Panu Matilainen - 4.9.1.2-7 +- switch over to libdb, aka Berkeley DB 5.x + +* Thu Dec 01 2011 Panu Matilainen - 4.9.1.2-6 +- fix classification of ELF binaries with setuid/setgid bit (#758251) + +* Fri Nov 25 2011 Panu Matilainen - 4.9.1.2-5 +- adjust font detection rules for libmagic change (#757105) + +* Wed Nov 09 2011 Dennis Gilmore - 4.9.1.2-4 +- conditionally apply arm patch for hardfp on all arches but arm softfp ones + +* Fri Oct 28 2011 Panu Matilainen - 4.9.1.2-3 +- adjust db util prefix & dependency due to #749293 +- warn but dont fail the build if STABS encountered by debugedit (#725378) + +* Wed Oct 12 2011 Panu Matilainen - 4.9.1.2-2 +- try teaching find-lang about the new gnome help layout (#736523) + +* Thu Sep 29 2011 Panu Matilainen - 4.9.1.2-1 +- update to 4.9.1.2 (CVE-2011-3378) +- drop upstreamed rpmdb signal patch + +* Mon Sep 19 2011 Panu Matilainen - 4.9.1.1-3 +- fix signal blocking/unblocking regression on rpmdb open/close (#739492) + +* Mon Aug 08 2011 Adam Jackson 4.9.1.1-2 +- Add RPM_LD_FLAGS to build environment (#728974) + +* Tue Aug 02 2011 Panu Matilainen - 4.9.1.1-1 +- update to 4.9.1.1 + +* Tue Jul 19 2011 Panu Matilainen - 4.9.1-2 +- fix recursion of directories with trailing slash in file list (#722474) + +* Fri Jul 15 2011 Panu Matilainen - 4.9.1-1 +- update to 4.9.1 (http://rpm.org/wiki/Releases/4.9.1) +- drop no longer needed patches + +* Thu Jun 16 2011 Panu Matilainen - 4.9.0-10 +- rebuild to fix a missing interpreter dependency due to bug #712251 + +* Fri Jun 10 2011 Panu Matilainen - 4.9.0-9 +- fix crash if prep or changelog section in spec is empty (#706959) +- fix crash on macro which undefines itself +- fix script dependency generation with file 5.07 string changes (#712251) + +* Thu May 26 2011 Panu Matilainen - 4.9.0-8 +- add dwarf-4 support to debugedit (#707677) +- generate build-id symlinks for all filenames sharing a build-id (#641377) + +* Thu Apr 07 2011 Panu Matilainen - 4.9.0-7 +- add missing ldconfig calls to build-libs sub-package +- fix source url + +* Thu Apr 07 2011 Panu Matilainen - 4.9.0-6 +- revert the spec query change (#693338) for now, it breaks fedpkg + +* Tue Apr 05 2011 Panu Matilainen - 4.9.0-5 +- verify some properties of replaced and wrong-colored files (#528383) +- only list packages that would be generated on spec query (#693338) +- preferred color packages should be erased last (#680261) +- fix leaks when freeing a populated transaction set +- take file state into account for file dependencies + +* Tue Mar 22 2011 Panu Matilainen - 4.9.0-4 +- fix classification of elf executables with sticky bit set (#689182) + +* Wed Mar 16 2011 Jindirch Novy - 4.9.0-3 +- fix crash in package manifest check (#688091) + +* Fri Mar 04 2011 Panu Matilainen - 4.9.0-2 +- fix duplicate rpmsign binary in rpm main package dragging in build-libs + +* Wed Mar 02 2011 Panu Matilainen - 4.9.0-1 +- update to 4.9.0 final +- drop upstreamed patches + +* Tue Mar 01 2011 Panu Matilainen - 4.9.0-0.rc1.4 +- spec cosmetics clean up extra whitespace + group more logically +- wipe out BDB environment at boot via tmpfiles.d + +* Mon Feb 21 2011 Panu Matilainen - 4.9.0-0.rc1.3 +- fix erronous double cursor open, causing yum reinstall hang (#678644) + +* Mon Feb 21 2011 Panu Matilainen - 4.9.0-0.rc1.2 +- fix broken logic in depgen collector, hopefully curing #675002 + +* Tue Feb 15 2011 Panu Matilainen - 4.9.0-0.rc1.1 +- update to 4.9.0-rc1 +- drop upstream patches +- nss packaging has changed, buildrequire nss-softokn-freebl-devel + +* Wed Feb 09 2011 Fedora Release Engineering - 4.9.0-0.beta1.7.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Feb 07 2011 Panu Matilainen - 4.9.0-0.beta1.7 +- fix segfault when building more than one package at a time (#675565) + +* Sun Feb 06 2011 Panu Matilainen - 4.9.0-0.beta1.6 +- adjust ocaml rule for libmagic string change + +* Mon Jan 31 2011 Panu Matilainen - 4.9.0-0.beta1.5 +- dont try to remove environment files if private env used (related to #671200) +- unbreak mono dependency extraction (#673663) +- complain instead of silent abort if cwd is not readable (#672576) + +* Tue Jan 25 2011 Panu Matilainen - 4.9.0-0.beta1.4 +- add support for Requires(posttrans) dependencies + +* Fri Jan 21 2011 Panu Matilainen - 4.9.0-0.beta1.3 +- avoid division by zero in rpmdb size calculation (#671056) +- fix secondary index iteration returing duplicate at end (#671149) +- fix rebuilddb creating duplicate indexes for first header + +* Fri Jan 21 2011 Panu Matilainen - 4.9.0-0.beta1.2 +- permit queries from rpmdb on read-only media (#671200) + +* Tue Jan 18 2011 Panu Matilainen - 4.9.0-0.beta1.1 +- rpm 4.9.0-beta1 (http://rpm.org/wiki/Releases/4.9.0) + - drop no longer needed patches + - adjust requires + buildrequires to match current needs + - adjust rpmdb index ghosts to match the new release + - split librpmbuild and librpmsign to a separate rpm-build-libs package + - split rpmsign to its own package to allow signing without all the build goo + - build-conditionalize plugins, disabled for now + - gstreamer and printer dependency generation moving out + - handle .so symlink dependencies with fileattrs + - use gnupg2 for signing as that's what typically installed by default + +* Tue Jan 18 2011 Panu Matilainen - 4.8.1-7 +- bunch of spec tweaks, cleanups + corrections: + - shorten rpm-build filelist a bit with glob use, reorder for saner grouping + - missing isa in popt version dependency + - only add rpmdb_foo symlinks for actually relevant db_* utils + - drop no longer necessary file-devel dependency from rpm-devel + - drop sqlite backend build-conditional + - preliminaries for moving from db4 to libdb +- use gnupg2 for signing as that's more likely to be installed by default + +* Mon Oct 25 2010 Jindrich Novy - 4.8.1-6 +- rebuild with new xz-5.0.0 + +* Tue Aug 10 2010 Panu Matilainen - 4.8.1-5 +- create gdb index on debuginfo generation (#617166) +- rpm-build now requires /usr/bin/gdb-add-index for consistent index creation +- include COPYING in -apidocs for licensing guidelines compliance + +* Thu Jul 22 2010 David Malcolm - 4.8.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Fri Jul 02 2010 Panu Matilainen - 4.8.1-3 +- ugh, reversed condition braindamage in the font provide extractor "fix" + +* Wed Jun 30 2010 Panu Matilainen - 4.8.1-2 +- fix a potential getOutputFrom() error from font provide extraction +- debug-friendlier message to aid finding other similar cases (#565223) + +* Fri Jun 11 2010 Panu Matilainen - 4.8.1-1 +- update to 4.8.1 (http://rpm.org/wiki/Releases/4.8.1) +- drop no longer needed patches +- fix source url pointing to testing directory + +* Thu Jun 03 2010 Panu Matilainen - 4.8.0-19 +- also strip POSIX file capabilities from hardlinks on upgrade/erase (#598775) + +* Wed Jun 02 2010 Panu Matilainen - 4.8.0-18 +- remove s-bits on upgrade too (#598775) + +* Thu May 27 2010 Panu Matilainen - 4.8.0-17 +- fix segfault in spec parser (#597835) + +* Thu May 27 2010 Panu Matilainen - 4.8.0-16 +- adjust to new pkg-config behavior wrt private dependencies (#596433) +- rpm-build now requires pkgconfig >= 0.24 + +* Fri May 21 2010 Panu Matilainen - 4.8.0-15 +- handle non-existent dependency sets correctly in python (#593553) +- make find-lang look in all locale dirs (#584866) + +* Fri Apr 23 2010 Panu Matilainen - 4.8.0-14 +- lose dangling symlink to extinct (and useless) berkeley_db_svc (#585174) + +* Wed Mar 24 2010 Panu Matilainen - 4.8.0-13 +- fix python match iterator regression wrt boolean representation + +* Wed Mar 17 2010 Panu Matilainen - 4.8.0-12 +- unbreak find-lang --with-man from yesterdays braindamage + +* Tue Mar 16 2010 Panu Matilainen - 4.8.0-11 +- support single PPD providing driver for devices (#568351) +- merge the psdriver patch pile into one +- preserve empty lines in spec prep section (#573339) +- teach python bindings about RPMTRANS_FLAG_NOCONTEXTS (related to #573111) +- dont own localized man directories through find_lang (#569536) + +* Mon Feb 15 2010 Panu Matilainen - 4.8.0-10 +- drop bogus dependency on lzma, xz is used to handle the lzma format too + +* Fri Feb 05 2010 Panu Matilainen - 4.8.0-9 +- unbreak python(abi) requires generation (#562906) + +* Fri Feb 05 2010 Panu Matilainen - 4.8.0-8 +- more fixes to postscript provides extractor (#562228) +- avoid accessing unrelated mount points in disk space checking (#547548) +- fix disk space checking with erasures present in transaction (#561160) + +* Fri Feb 05 2010 Panu Matilainen - 4.8.0-7 +- couple of fixes to the postscript provides extractor (#538101) + +* Thu Feb 04 2010 Panu Matilainen - 4.8.0-6 +- extract provides for postscript printer drivers (#538101) + +* Wed Feb 03 2010 Panu Matilainen - 4.8.0-5 +- python byte-compilation fixes + improvements (#558997) + +* Sat Jan 30 2010 Panu Matilainen - 4.8.0-4 +- support parallel python versions in python dependency extractor (#532118) + +* Thu Jan 21 2010 Panu Matilainen - 4.8.0-3 +- fix segfault on failed url retrieval +- fix verification error code depending on verbosity level +- if anything in testsuite fails, dump out the log + +* Fri Jan 08 2010 Panu Matilainen - 4.8.0-2 +- put disttag back, accidentally nuked in 4.8.0 final update + +* Fri Jan 08 2010 Panu Matilainen - 4.8.0-1 +- update to 4.8.0 final (http://rpm.org/wiki/Releases/4.8.0) + +* Thu Jan 07 2010 Panu Matilainen - 4.8.0-0.beta1.6 +- pull out macro scoping "fix" for now, it breaks font package macros + +* Mon Jan 04 2010 Panu Matilainen - 4.8.0-0.beta1.5 +- always clear locally defined macros when they go out of scope + +* Thu Dec 17 2009 Panu Matilainen - 4.8.0-0.beta1.4 +- permit unexpanded macros when parsing spec (#547997) + +* Wed Dec 09 2009 Panu Matilainen - 4.8.0-0.beta1.3 +- fix a bunch of python refcount-errors causing major memory leaks + +* Mon Dec 07 2009 Panu Matilainen - 4.8.0-0.beta1.2 +- fix noise from python bytecompile on non-python packages (#539635) +- make all our -devel [build]requires isa-specific +- trim out superfluous -devel dependencies from rpm-devel + +* Mon Dec 07 2009 Panu Matilainen - 4.8.0-0.beta1.1 +- update to 4.8.0-beta1 (http://rpm.org/wiki/Releases/4.8.0) +- rpm-build conflicts with current ocaml-runtime + +* Fri Dec 04 2009 Panu Matilainen - 4.7.2-2 +- missing error exit code from signing password checking (#496754) +- dont fail build on unrecognized data files (#532489) +- dont try to parse subkeys and secret keys (#436812) +- fix chmod test on selinux, breaking %%{_fixperms} macro (#543035) + +* Wed Nov 25 2009 Panu Matilainen - 4.7.2-1 +- update to 4.7.2 (http://rpm.org/wiki/Releases/4.7.2) +- fixes #464750, #529214 + +* Wed Nov 18 2009 Jindrich Novy - 4.7.1-10 +- rebuild against BDB-4.8.24 + +* Wed Nov 18 2009 Jindrich Novy - 4.7.1-9 +- drop versioned dependency to BDB + +* Wed Oct 28 2009 Panu Matilainen - 4.7.1-8 +- support multiple python implementations in brp-python-bytecompile (#531117) +- make disk space problem reporting a bit saner (#517418) + +* Tue Oct 06 2009 Panu Matilainen - 4.7.1-7 +- fix build with BDB 4.8.x by removing XA "support" from BDB backend +- perl dep extractor heredoc parsing improvements (#524929) + +* Mon Sep 21 2009 Panu Matilainen - 4.7.1-6 +- use relative paths within db environment (related to #507309, #507309...) +- remove db environment on close in chrooted operation (related to above) +- initialize rpmlib earlier in rpm2cpio (#523260) +- fix file dependency tag extension formatting (#523282) + +* Tue Sep 15 2009 Panu Matilainen - 4.7.1-5 +- fix duplicate dependency filtering on build (#490378) +- permit absolute paths in file lists again (#521760) +- use permissions 444 for all .debug files (#522194) +- add support for optional bugurl tag (#512774) + +* Fri Aug 14 2009 Jesse Keating - 4.7.1-4 +- Patch to make geode appear as i686 (#517475) + +* Thu Aug 06 2009 Jindrich Novy - 4.7.1-3 +- rebuild because of the new xz + +* Sun Jul 26 2009 Fedora Release Engineering - 4.7.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Jul 21 2009 Panu Matilainen - 4.7.1-1 +- update to 4.7.1 ((http://rpm.org/wiki/Releases/4.7.1) +- fix source url + +* Mon Jul 20 2009 Bill Nottingham - 4.7.0-9 +- enable XZ support + +* Thu Jun 18 2009 Panu Matilainen - 4.7.0-8 +- updated OSGi dependency extractor (#506471) +- fix segfault in symlink fingerprinting (#505777) +- fix invalid memory access causing bogus file dependency errors (#506323) + +* Tue Jun 16 2009 Panu Matilainen - 4.7.0-7 +- add dwarf-3 support to debugedit (#505774) + +* Fri Jun 12 2009 Stepan Kasal - 4.7.0-6 +- require libcap >= 2.16 (#505596) + +* Tue Jun 03 2009 Panu Matilainen - 4.7.0-5 +- don't mess up problem altNEVR in python ts.check() (#501068) +- fix hardlink size calculation on build (#503020) + +* Thu May 14 2009 Panu Matilainen - 4.7.0-4 +- split cron-job into a sub-package to avoid silly deps on core rpm (#500722) +- rpm requires coreutils but not in %%post +- build with libcap and libacl +- fix pgp pubkey signature tag parsing + +* Tue Apr 21 2009 Panu Matilainen - 4.7.0-3 +- couple of merge-review fixes (#226377) + - eliminate bogus leftover rpm:rpm rpmdb ownership + - unescaped macro in changelog +- fix find-lang --with-kde with KDE3 (#466009) +- switch back to default file digest algorithm + +* Fri Apr 17 2009 Panu Matilainen - 4.7.0-2 +- file classification tweaks for text files (#494817) + - disable libmagic text token checks, it's way too error-prone + - consistently classify all text as such and include description + +* Thu Apr 16 2009 Panu Matilainen - 4.7.0-1 +- update to 4.7.0 final (http://rpm.org/wiki/Releases/4.7.0) +- fixes #494049, #495429 +- dont permit test-suite failure anymore + +* Thu Apr 09 2009 Panu Matilainen - 4.7.0-0.rc1.1 +- update to 4.7.0-rc1 +- fixes #493157, #493777, #493696, #491388, #487597, #493162 + +* Fri Apr 03 2009 Panu Matilainen - 4.7.0-0.beta1.9 +- fix recorded file state of otherwise skipped files (#492947) +- compress ChangeLog, drop old CHANGES file (#492440) + +* Thu Apr 2 2009 Tom "spot" Callaway - 4.7.0-0.beta1.8 +- Fix sparcv9v and sparc64v targets + +* Tue Mar 24 2009 Panu Matilainen - 4.7.0-0.beta1.7 +- prefer more specific types over generic "text" in classification (#491349) + +* Mon Mar 23 2009 Panu Matilainen - 4.7.0-0.beta1.6 +- with the fd leak gone, let libmagic look into compressed files again (#491596) + +* Mon Mar 23 2009 Panu Matilainen - 4.7.0-0.beta1.5 +- fix font provide generation on filenames with whitespace (#491597) + +* Thu Mar 12 2009 Panu Matilainen - 4.7.0-0.beta1.4 +- handle RSA V4 signatures (#436812) +- add alpha arch ISA-bits +- enable internal testsuite on build + +* Mon Mar 09 2009 Panu Matilainen - 4.7.0-0.beta1.3 +- fix _install_langs behavior (#489235) +- fix recording of file states into rpmdb on install + +* Sun Mar 08 2009 Panu Matilainen - 4.7.0-0.beta1.2 +- load macros before creating directories on src.rpm install (#489104) + +* Fri Mar 06 2009 Panu Matilainen - 4.7.0-0.beta1.1 +- update to 4.7.0-beta1 (http://rpm.org/wiki/Releases/4.7.0) + +* Fri Feb 27 2009 Panu Matilainen - 4.6.0-11 +- build rpm itself with md5 file digests for now to ensure upgradability + +* Thu Feb 26 2009 Panu Matilainen - 4.6.0-10 +- handle NULL passed as EVR in rpmdsSingle() again (#485616) + +* Wed Feb 25 2009 Panu Matilainen - 4.6.0-9 +- pull out python byte-compile syntax check for now + +* Mon Feb 23 2009 Panu Matilainen - 4.6.0-8 +- make -apidocs sub-package noarch +- fix source URL + +* Sat Feb 21 2009 Panu Matilainen - 4.6.0-7 +- loosen up restrictions on dependency names (#455119) +- handle inter-dependent pkg-config files for requires too (#473814) +- error/warn on elf binaries in noarch package in build + +* Fri Feb 20 2009 Panu Matilainen - 4.6.0-6 +- error out on uncompilable python code (Tim Waugh) + +* Tue Feb 17 2009 Jindrich Novy - 4.6.0-5 +- remove two offending hunks from anyarch patch causing that + RPMTAG_BUILDARCHS isn't written to SRPMs + +* Mon Feb 16 2009 Jindrich Novy - 4.6.0-4 +- inherit group tag from the main package (#470714) +- ignore BuildArch tags for anyarch actions (#442105) +- don't check package BuildRequires when doing --rmsource (#452477) +- don't fail because of missing sources when only spec removal + is requested (#472427) + +* Mon Feb 16 2009 Panu Matilainen - 4.6.0-3 +- updated fontconfig provide script - fc-query does all the hard work now + +* Mon Feb 09 2009 Panu Matilainen - 4.6.0-2 +- build against db 4.7.x + +* Fri Feb 06 2009 Panu Matilainen - 4.6.0-1 +- update to 4.6.0 final +- revert libmagic looking into compressed files for now, breaks ooffice build + +* Fri Feb 06 2009 Panu Matilainen - 4.6.0-0.rc4.5 +- enable fontconfig provides generation + +* Thu Feb 05 2009 Panu Matilainen - 4.6.0-0.rc4.4 +- fixup rpm translation lookup to match Fedora specspo (#436941) + +* Wed Feb 04 2009 Panu Matilainen - 4.6.0-0.rc4.3 +- extract mimehandler provides from .desktop files +- preliminaries for extracting font provides (not enabled yet) +- dont classify font metrics data as fonts +- only run script dep extraction once per file, duh + +* Sat Jan 31 2009 Panu Matilainen - 4.6.0-0.rc4.2 +- change platform sharedstatedir to something more sensible (#185862) +- add rpmdb_foo links to db utils for documentation compatibility + +* Fri Jan 30 2009 Panu Matilainen - 4.6.0-0.rc4.1 +- update to 4.6.0-rc4 +- fixes #475582, #478907, #476737, #479869, #476201 + +* Fri Dec 12 2008 Panu Matilainen - 4.6.0-0.rc3.2 +- add back defaultdocdir patch which hadn't been applied on 4.6.x branch yet + +* Fri Dec 12 2008 Panu Matilainen - 4.6.0-0.rc3.1 +- add dist-tag, rebuild + +* Tue Dec 09 2008 Panu Matilainen - 4.6.0-0.rc3.1 +- update to rpm 4.6.0-rc3 +- fixes #475214, #474550, #473239 + +* Wed Dec 3 2008 Jeremy Katz - 4.6.0-0.rc2.9 +- I built into the wrong place + +* Wed Dec 3 2008 Jeremy Katz - 4.6.0-0.rc2.8 +- python 2.6 rebuild again + +* Wed Dec 03 2008 Panu Matilainen +- make rpm-build require pkgconfig (#473978) + +* Tue Dec 02 2008 Panu Matilainen +- fix pkg-config provide generation when pc's depend on each other (#473814) + +* Mon Dec 01 2008 Jindrich Novy +- include rpmfileutil.h from rpmmacro.h, unbreaks + net-snmp (#473420) + +* Sun Nov 30 2008 Panu Matilainen +- rebuild for python 2.6 + +* Sat Nov 29 2008 Panu Matilainen +- update to 4.6.0-rc2 +- fixes #471820, #473167, #469355, #468319, #472507, #247374, #426672, #444661 +- enable automatic generation of pkg-config and libtool dependencies #465377 + +* Fri Oct 31 2008 Panu Matilainen +- adjust find-debuginfo for "file" output change (#468129) + +* Tue Oct 28 2008 Panu Matilainen +- Florian's improved fingerprinting hash algorithm from upstream + +* Sat Oct 25 2008 Panu Matilainen +- Make noarch sub-packages actually work +- Fix defaultdocdir logic in installplatform to avoid hardwiring mandir + +* Fri Oct 24 2008 Jindrich Novy +- update compat-db dependencies (#459710) + +* Wed Oct 22 2008 Panu Matilainen +- never add identical NEVRA to transaction more than once (#467822) + +* Sun Oct 19 2008 Panu Matilainen +- permit tab as macro argument separator (#467567) + +* Thu Oct 16 2008 Panu Matilainen +- update to 4.6.0-rc1 +- fixes #465586, #466597, #465409, #216221, #466503, #466009, #463447... +- avoid using %%configure macro for now, it has unwanted side-effects on rpm + +* Wed Oct 01 2008 Panu Matilainen +- update to official 4.5.90 alpha tarball +- a big pile of misc bugfixes + translation updates +- isa-macro generation fix for ppc (#464754) +- avoid pulling in pile of perl dependencies for an unused script +- handle both "invalid argument" and clear env version mismatch on posttrans + +* Thu Sep 25 2008 Jindrich Novy +- don't treat %%patch numberless if -P parameter is present (#463942) + +* Thu Sep 11 2008 Panu Matilainen +- add hack to support extracting gstreamer plugin provides (#438225) +- fix another macro argument handling regression (#461180) + +* Thu Sep 11 2008 Jindrich Novy +- create directory structure for rpmbuild prior to build if it doesn't exist (#455387) +- create _topdir if it doesn't exist when installing SRPM +- don't generate broken cpio in case of hardlink pointing on softlink, + thanks to pixel@mandriva.com + +* Sat Sep 06 2008 Jindrich Novy +- fail hard if patch isn't found (#461347) + +* Mon Sep 01 2008 Jindrich Novy +- fix parsing of boolean expressions in spec (#456103) + (unbreaks pam, jpilot and maybe other builds) + +* Tue Aug 26 2008 Jindrich Novy +- add support for noarch subpackages +- fix segfault in case of insufficient disk space detected (#460146) + +* Wed Aug 13 2008 Panu Matilainen +- 4.5.90-0.git8461.2 +- fix archivesize tag generation on ppc (#458817) + +* Fri Aug 08 2008 Panu Matilainen +- 4.5.90-0.git8461.1 +- new snapshot from upstream +- fixes #68290, #455972, #446202, #453364, #456708, #456103, #456321, #456913, + #458260, #458261 +- partial fix for #457360 + +* Thu Jul 31 2008 Florian Festi +- 4.5.90-0.git8427.1 +- new snapshot from upstream + +* Thu Jul 31 2008 Florian Festi +- 4.5.90-0.git8426.10 +- rpm-4.5.90-posttrans.patch +- use header from rpmdb in posttrans to make anaconda happy + +* Sat Jul 19 2008 Panu Matilainen +- 4.5.90-0.git8426.9 +- fix regression in patch number handling (#455872) + +* Tue Jul 15 2008 Panu Matilainen +- 4.5.90-0.git8426.8 +- fix regression in macro argument handling (#455333) + +* Mon Jul 14 2008 Panu Matilainen +- 4.5.90-0.git8426.7 +- fix mono dependency extraction (adjust for libmagic string change) + +* Sat Jul 12 2008 Panu Matilainen +- 4.5.90-0.git8426.6 +- fix type mismatch causing funky breakage on ppc64 + +* Fri Jul 11 2008 Panu Matilainen +- 4.5.90-0.git8426.5 +- flip back to external bdb +- fix tab vs spaces complaints from rpmlint +- add dep for lzma and require unzip instead of zip in build (#310694) +- add pkgconfig dependency to rpm-devel +- drop ISA-dependencies for initial introduction +- new snapshot from upstream for documentation fixes + +* Thu Jul 10 2008 Panu Matilainen +- 4.5.90-0.git8424.4 +- handle int vs external db in posttrans too + +* Wed Jul 08 2008 Panu Matilainen +- 4.5.90-0.git8424.3 +- require curl as external url helper + +* Wed Jul 08 2008 Panu Matilainen +- 4.5.90-0.git8424.2 +- add support for building with or without internal db + +* Wed Jul 08 2008 Panu Matilainen +- rpm 4.5.90-0.git8424.1 (alpha snapshot) +- adjust to build against Berkeley DB 4.5.20 from compat-db for now +- add posttrans to clean up db environment mismatch after upgrade +- forward-port devel autodeps patch + +* Tue Jul 08 2008 Panu Matilainen +- adjust for rpmdb index name change +- drop unnecessary vendor-macro patch for real +- add ISA-dependencies among rpm subpackages +- make lzma and sqlite deps conditional and disabled by default for now + +* Fri Feb 01 2008 Panu Matilainen +- spec largely rewritten, truncating changelog diff --git a/bbox-f14/rpm-fedora/rpm-fileperm.patch b/bbox-f14/rpm-fedora/rpm-fileperm.patch new file mode 100644 index 0000000..7929748 --- /dev/null +++ b/bbox-f14/rpm-fedora/rpm-fileperm.patch @@ -0,0 +1,46 @@ +From: Panu Matilainen +Date: Fri, 13 Apr 2012 10:16:51 +0000 (+0300) +Subject: Raise file conflicts on differing permissions (user, group, mode) +X-Git-Tag: rpm-4.11.0-alpha~426 +X-Git-Url: http://rpm.org/gitweb?p=rpm.git;a=commitdiff_plain;h=cf1095648194104a81a58abead05974a5bfa3b9a + +Raise file conflicts on differing permissions (user, group, mode) + +- Two files (or directories) cannot be correctly shared if their + permissions differ, even if the content is identical: either + file will end up having wrong permissions, depending on installation + order. This means a package can among other things silently + eg relax permissions of eg security sensitive directory (accidentally + or intentionallY). +- We now require exact match of user, group and entire file mode + (previously only the file type part of mode was tested) +--- + +diff --git a/lib/rpmfi.c b/lib/rpmfi.c +index 42c07db..e6e1fb3 100644 +--- a/lib/rpmfi.c ++++ b/lib/rpmfi.c +@@ -542,13 +542,20 @@ rpmFileTypes rpmfiWhatis(rpm_mode_t mode) + + int rpmfiCompareIndex(rpmfi afi, int aix, rpmfi bfi, int bix) + { +- rpmFileTypes awhat = rpmfiWhatis(rpmfiFModeIndex(afi, aix)); +- rpmFileTypes bwhat = rpmfiWhatis(rpmfiFModeIndex(bfi, bix)); ++ mode_t amode = rpmfiFModeIndex(afi, aix); ++ mode_t bmode = rpmfiFModeIndex(bfi, bix); ++ rpmFileTypes awhat = rpmfiWhatis(amode); ++ rpmFileTypes bwhat = rpmfiWhatis(bmode); + + if ((rpmfiFFlagsIndex(afi, aix) & RPMFILE_GHOST) || + (rpmfiFFlagsIndex(bfi, bix) & RPMFILE_GHOST)) return 0; + +- if (awhat != bwhat) return 1; ++ if (amode != bmode) return 1; ++ ++ if (!rstreq(rpmfiFUserIndex(afi, aix), rpmfiFUserIndex(bfi, bix))) ++ return 1; ++ if (!rstreq(rpmfiFGroupIndex(afi, aix), rpmfiFGroupIndex(bfi, bix))) ++ return 1; + + if (awhat == LINK) { + const char * alink = rpmfiFLinkIndex(afi, aix); diff --git a/bbox-f14/rpm-fedora/rpm-fileperm.patch.url b/bbox-f14/rpm-fedora/rpm-fileperm.patch.url new file mode 100644 index 0000000..d892245 --- /dev/null +++ b/bbox-f14/rpm-fedora/rpm-fileperm.patch.url @@ -0,0 +1 @@ +http://rpm.org/gitweb?p=rpm.git;a=commitdiff;h=cf1095648194104a81a58abead05974a5bfa3b9a diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/initpost b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/initpost new file mode 120000 index 0000000..bb24150 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/initpost @@ -0,0 +1 @@ +../redhat/initpost \ No newline at end of file diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/initpre b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/initpre new file mode 120000 index 0000000..ccabadc --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/initpre @@ -0,0 +1 @@ +../redhat/initpre \ No newline at end of file diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/01 b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/01 new file mode 100644 index 0000000..1a5ef72 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/01 @@ -0,0 +1 @@ +glibc diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/02 b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/02 new file mode 100644 index 0000000..9ec5d2b --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/02 @@ -0,0 +1,3 @@ +--reinstall + +filesystem diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/03 b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/03 new file mode 100644 index 0000000..a139974 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/pkgs/03 @@ -0,0 +1,3 @@ +coreutils +initscripts +rsyslog diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/rpmlist.d/00.lst b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/rpmlist.d/00.lst new file mode 100644 index 0000000..c825733 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/rpmlist.d/00.lst @@ -0,0 +1,11 @@ +glibc-[0-9]*.rpm +basesystem-*.rpm +bash-[0-9]*.rpm +filesystem-*.rpm +glibc-common-*.rpm +libgcc-[0-9]*.rpm +ncurses-base-[0-9]*.rpm +ncurses-libs-*.rpm +nss-softokn-freebl-*.rpm +setup-*.rpm +tzdata-*.rpm diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora-updates-testing.repo b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora-updates-testing.repo new file mode 100644 index 0000000..44cb615 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora-updates-testing.repo @@ -0,0 +1,26 @@ +[updates-testing] +name=Fedora 16 - $basearch - Test Updates +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/16/$basearch/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f16&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[updates-testing-debuginfo] +name=Fedora 16 - $basearch - Test Updates Debug +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/16/$basearch/debug/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-debug-f16&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[updates-testing-source] +name=Fedora 16 - Test Updates Source +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/16/SRPMS/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-source-f16&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora-updates.repo b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora-updates.repo new file mode 100644 index 0000000..3b1916c --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora-updates.repo @@ -0,0 +1,26 @@ +[updates] +name=Fedora 16 - $basearch - Updates +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/16/$basearch/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f16&arch=$basearch +enabled=1 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[updates-debuginfo] +name=Fedora 16 - $basearch - Updates - Debug +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/16/$basearch/debug/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f16&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[updates-source] +name=Fedora 16 - Updates Source +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/16/SRPMS/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f16&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora.repo b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora.repo new file mode 100644 index 0000000..36c5f27 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum.repos.d/fedora.repo @@ -0,0 +1,29 @@ +[fedora] +name=Fedora 16 - $basearch +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/os/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-16&arch=$basearch +enabled=1 +metadata_expire=7d +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[fedora-debuginfo] +name=Fedora 16 - $basearch - Debug +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/debug/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-16&arch=$basearch +enabled=0 +metadata_expire=7d +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[fedora-source] +name=Fedora 16 - Source +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/source/SRPMS/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-16&arch=$basearch +enabled=0 +metadata_expire=7d +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/16/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum/yum.conf b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum/yum.conf new file mode 100644 index 0000000..cd0ccc9 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f16/yum/yum.conf @@ -0,0 +1,11 @@ +[main] +cachedir=@YUMCACHEDIR@ +persistdir=@YUMLIBDIR@ +reposdir=@YUMETCDIR@/yum.repos.d +debuglevel=1 +logfile=@YUMLOGDIR@/log +lockfile=@YUMLOCKDIR@/yum.pid +pkgpolicy=newest +distroverpkg=fedora-release +installonlypkgs= +exactarch=0 diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/initpost b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/initpost new file mode 120000 index 0000000..bb24150 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/initpost @@ -0,0 +1 @@ +../redhat/initpost \ No newline at end of file diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/initpre b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/initpre new file mode 120000 index 0000000..370e7b3 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/initpre @@ -0,0 +1 @@ +../redhat/initpre.usrmove \ No newline at end of file diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/01 b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/01 new file mode 100644 index 0000000..1a5ef72 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/01 @@ -0,0 +1 @@ +glibc diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/02 b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/02 new file mode 100644 index 0000000..9ec5d2b --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/02 @@ -0,0 +1,3 @@ +--reinstall + +filesystem diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/03 b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/03 new file mode 100644 index 0000000..a139974 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/pkgs/03 @@ -0,0 +1,3 @@ +coreutils +initscripts +rsyslog diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/rpmlist.d/00.lst b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/rpmlist.d/00.lst new file mode 100644 index 0000000..c825733 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/rpmlist.d/00.lst @@ -0,0 +1,11 @@ +glibc-[0-9]*.rpm +basesystem-*.rpm +bash-[0-9]*.rpm +filesystem-*.rpm +glibc-common-*.rpm +libgcc-[0-9]*.rpm +ncurses-base-[0-9]*.rpm +ncurses-libs-*.rpm +nss-softokn-freebl-*.rpm +setup-*.rpm +tzdata-*.rpm diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora-updates-testing.repo b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora-updates-testing.repo new file mode 100644 index 0000000..fab5812 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora-updates-testing.repo @@ -0,0 +1,26 @@ +[updates-testing] +name=Fedora 18 - $basearch - Test Updates +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/18/$basearch/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f18&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[updates-testing-debuginfo] +name=Fedora 18 - $basearch - Test Updates Debug +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/18/$basearch/debug/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-debug-f18&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[updates-testing-source] +name=Fedora 18 - Test Updates Source +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/18/SRPMS/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-source-f18&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora-updates.repo b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora-updates.repo new file mode 100644 index 0000000..1444273 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora-updates.repo @@ -0,0 +1,26 @@ +[updates] +name=Fedora 18 - $basearch - Updates +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/18/$basearch/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f18&arch=$basearch +enabled=1 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[updates-debuginfo] +name=Fedora 18 - $basearch - Updates - Debug +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/18/$basearch/debug/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f18&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[updates-source] +name=Fedora 18 - Updates Source +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/18/SRPMS/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f18&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora.repo b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora.repo new file mode 100644 index 0000000..4d3bff8 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum.repos.d/fedora.repo @@ -0,0 +1,29 @@ +[fedora] +name=Fedora 18 - $basearch +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/os/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-18&arch=$basearch +enabled=1 +metadata_expire=7d +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[fedora-debuginfo] +name=Fedora 18 - $basearch - Debug +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/debug/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-18&arch=$basearch +enabled=0 +metadata_expire=7d +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch + +[fedora-source] +name=Fedora 18 - Source +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/source/SRPMS/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-18&arch=$basearch +enabled=0 +metadata_expire=7d +gpgcheck=1 +gpgkey=http://download.fedoraproject.org/pub/fedora/linux/releases/18/Everything/$basearch/os/RPM-GPG-KEY-fedora-$basearch diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum/yum.conf b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum/yum.conf new file mode 100644 index 0000000..cd0ccc9 --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/f18/yum/yum.conf @@ -0,0 +1,11 @@ +[main] +cachedir=@YUMCACHEDIR@ +persistdir=@YUMLIBDIR@ +reposdir=@YUMETCDIR@/yum.repos.d +debuglevel=1 +logfile=@YUMLOGDIR@/log +lockfile=@YUMLOCKDIR@/yum.pid +pkgpolicy=newest +distroverpkg=fedora-release +installonlypkgs= +exactarch=0 diff --git a/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/redhat/initpre.usrmove b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/redhat/initpre.usrmove new file mode 100755 index 0000000..21fed0f --- /dev/null +++ b/bbox-f14/util-vserver-additions/usr/lib64/util-vserver/distributions/redhat/initpre.usrmove @@ -0,0 +1,25 @@ +#! /bin/bash + +# Copyright (C) 2003 Enrico Scholz +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +vdir=$1/vdir +. "$2" + +## Fix/workaround the misclassification of %_netsharedpath's parent directories +mkdir -p "$vdir"/{etc/rc.d/init.d,/usr/sbin,/usr/bin} + +## Workaround broken kernel %post scripts +ln -s ../bin/true "$vdir"/usr/sbin/new-kernel-pkg diff --git a/bbox-f14/yum-repos/etc/yum.repos.d/bbox-f14.repo b/bbox-f14/yum-repos/etc/yum.repos.d/bbox-f14.repo new file mode 100644 index 0000000..38cd936 --- /dev/null +++ b/bbox-f14/yum-repos/etc/yum.repos.d/bbox-f14.repo @@ -0,0 +1,5 @@ +[bbox-f14] +name=OneLab Build Boxes for fedora14 +baseurl=http://build.onelab.eu/bbox-14/$basearch +gpgcheck=0 +#gpgkey=http://build.onelab.eu/conf/keys/RPM-ONELAB-GPG-KEY diff --git a/bbox-f14/yum-repos/etc/yum.repos.d/fedora-updates.repo b/bbox-f14/yum-repos/etc/yum.repos.d/fedora-updates.repo new file mode 100644 index 0000000..c9e2a8e --- /dev/null +++ b/bbox-f14/yum-repos/etc/yum.repos.d/fedora-updates.repo @@ -0,0 +1,27 @@ +[updates] +name=Fedora $releasever - $basearch - Updates +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/$basearch/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch +exclude=kernel* util-vserver* yum rpm-* + +[updates-debuginfo] +name=Fedora $releasever - $basearch - Updates - Debug +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/$basearch/debug/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-debug-f$releasever&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch + +[updates-source] +name=Fedora $releasever - Updates Source +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/updates/$releasever/SRPMS/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-source-f$releasever&arch=$basearch +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch diff --git a/bbox-f14/yum-repos/etc/yum.repos.d/fedora.repo b/bbox-f14/yum-repos/etc/yum.repos.d/fedora.repo new file mode 100644 index 0000000..a825542 --- /dev/null +++ b/bbox-f14/yum-repos/etc/yum.repos.d/fedora.repo @@ -0,0 +1,30 @@ +[fedora] +name=Fedora $releasever - $basearch +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/os/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch +enabled=1 +metadata_expire=7d +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch +exclude=kernel* util-vserver* yum rpm-* + +[fedora-debuginfo] +name=Fedora $releasever - $basearch - Debug +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/$basearch/debug/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-debug-$releasever&arch=$basearch +enabled=0 +metadata_expire=7d +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch + +[fedora-source] +name=Fedora $releasever - Source +failovermethod=priority +#baseurl=http://download.fedoraproject.org/pub/fedora/linux/releases/$releasever/Everything/source/SRPMS/ +mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-source-$releasever&arch=$basearch +enabled=0 +metadata_expire=7d +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch -- 2.43.0