diff --git a/rpm-4.7.1-abs-filelist.patch b/rpm-4.7.1-abs-filelist.patch new file mode 100644 index 0000000..476499c --- /dev/null +++ b/rpm-4.7.1-abs-filelist.patch @@ -0,0 +1,30 @@ +commit 4018bbd08e84fd0cc227dcb8d2dc20693ce2296a +Author: Panu Matilainen +Date: Tue Sep 15 10:56:58 2009 +0300 + + Allow absolute paths in file lists again (SuseBug:535594, RhBug:521760) + - patch from OpenSUSE / Michael Schroeder + - build-time generated file lists should be placed in the build directory, + but at least one valid use case for this is things like %files -f %{SOURCE10} + +diff --git a/build/files.c b/build/files.c +index b5c5437..061494d 100644 +--- a/build/files.c ++++ b/build/files.c +@@ -1755,9 +1755,13 @@ static rpmRC processPackageFiles(rpmSpec spec, Package pkg, + + argvSplit(&filelists, getStringBuf(pkg->fileFile), "\n"); + for (fp = filelists; *fp != NULL; fp++) { +- ffn = rpmGetPath("%{_builddir}/", +- (spec->buildSubdir ? spec->buildSubdir : "") , +- "/", *fp, NULL); ++ if (**fp == '/') { ++ ffn = rpmGetPath(*fp, NULL); ++ } else { ++ ffn = rpmGetPath("%{_builddir}/", ++ (spec->buildSubdir ? spec->buildSubdir : "") , ++ "/", *fp, NULL); ++ } + fd = fopen(ffn, "r"); + + if (fd == NULL || ferror(fd)) { diff --git a/rpm-4.7.1-bugurl.patch b/rpm-4.7.1-bugurl.patch new file mode 100644 index 0000000..04a6908 --- /dev/null +++ b/rpm-4.7.1-bugurl.patch @@ -0,0 +1,89 @@ +diff --git a/build/files.c b/build/files.c +index f3cf261..e1230a5 100644 +--- a/build/files.c ++++ b/build/files.c +@@ -1977,6 +1977,7 @@ static const rpmTag sourceTags[] = { + RPMTAG_CHANGELOGNAME, + RPMTAG_CHANGELOGTEXT, + RPMTAG_URL, ++ RPMTAG_BUGURL, + HEADER_I18NTABLE, + 0 + }; +diff --git a/build/parsePreamble.c b/build/parsePreamble.c +index c000780..70b20a8 100644 +--- a/build/parsePreamble.c ++++ b/build/parsePreamble.c +@@ -32,6 +32,7 @@ static const rpmTag copyTagsDuringParse[] = { + RPMTAG_CHANGELOGTEXT, + RPMTAG_PREFIXES, + RPMTAG_DISTTAG, ++ RPMTAG_BUGURL, + 0 + }; + +@@ -307,6 +308,7 @@ static struct optionalTag { + { RPMTAG_PACKAGER, "%{packager}" }, + { RPMTAG_DISTRIBUTION, "%{distribution}" }, + { RPMTAG_DISTURL, "%{disturl}" }, ++ { RPMTAG_BUGURL, "%{bugurl}" }, + { -1, NULL } + }; + +@@ -501,6 +503,7 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, + } + case RPMTAG_URL: + case RPMTAG_DISTTAG: ++ case RPMTAG_BUGURL: + SINGLE_TOKEN_ONLY; + /* These macros are for backward compatibility */ + if (tag == RPMTAG_VERSION) { +@@ -734,6 +737,7 @@ static struct PreambleRec_s preambleList[] = { + {RPMTAG_AUTOPROV, 0, 0, 0, "autoprov"}, + {RPMTAG_DOCDIR, 0, 0, 0, "docdir"}, + {RPMTAG_DISTTAG, 0, 0, 0, "disttag"}, ++ {RPMTAG_BUGURL, 0, 0, 0, "bugurl"}, + /* LCL: can't add null annotation */ + {0, 0, 0, 0, 0} + }; +diff --git a/lib/rpmtag.h b/lib/rpmtag.h +index a0bbd79..7a3aa01 100644 +--- a/lib/rpmtag.h ++++ b/lib/rpmtag.h +@@ -282,6 +282,7 @@ typedef enum rpmTag_e { + RPMTAG_LONGSIZE = 5009, /* l */ + RPMTAG_FILECAPS = 5010, /* s[] */ + RPMTAG_FILEDIGESTALGO = 5011, /* i file digest algorithm */ ++ RPMTAG_BUGURL = 5012, /* s */ + + RPMTAG_FIRSTFREE_TAG /*!< internal */ + } rpmTag; +diff --git a/macros.in b/macros.in +index 158ae34..ee10586 100644 +--- a/macros.in ++++ b/macros.in +@@ -264,6 +264,12 @@ package or when debugging this package.\ + # + #%disturl + ++# Configurable bug URL, same as BugURL: tag in a specfile. ++# The URL will be used to supply reliable information to where ++# to file bugs. ++# ++#%bugurl ++ + # Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files + # marked as %doc should be installed. + #%_excludedocs +diff --git a/tests/rpmgeneral.at b/tests/rpmgeneral.at +index d6f11a5..4956780 100644 +--- a/tests/rpmgeneral.at ++++ b/tests/rpmgeneral.at +@@ -71,6 +71,7 @@ AT_CHECK([run rpm --querytags],[0], + [ARCH + ARCHIVESIZE + BASENAMES ++BUGURL + BUILDARCHS + BUILDHOST + BUILDTIME diff --git a/rpm-4.7.1-debug-perms.patch b/rpm-4.7.1-debug-perms.patch new file mode 100644 index 0000000..1c76193 --- /dev/null +++ b/rpm-4.7.1-debug-perms.patch @@ -0,0 +1,25 @@ +From 6cc599de01a9835b5128b7b2a869f9f7cf3976fb Mon Sep 17 00:00:00 2001 +From: Roland McGrath +Date: Wed, 9 Sep 2009 11:07:10 -0700 +Subject: [PATCH] find-debuginfo.sh: use permissions 444 for all .debug files + +Signed-off-by: Roland McGrath +--- + scripts/find-debuginfo.sh | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh +index 21366bf..8d86de6 100644 +--- a/scripts/find-debuginfo.sh ++++ b/scripts/find-debuginfo.sh +@@ -93,6 +93,7 @@ strip_to_debug() + application/x-sharedlib*) g=-g ;; + esac + eu-strip --remove-comment $g -f "$1" "$2" || exit ++ chmod 444 "$1" || exit + } + + # Make a relative symlink to $1 called $3$2 +-- +1.6.2.5 + diff --git a/rpm-4.7.1-duplicate-deps.patch b/rpm-4.7.1-duplicate-deps.patch new file mode 100644 index 0000000..eb23cd1 --- /dev/null +++ b/rpm-4.7.1-duplicate-deps.patch @@ -0,0 +1,95 @@ +commit 10772ac7dfad60cb5a20681d22cf851468d0a8f9 +Author: Panu Matilainen +Date: Thu Aug 20 13:02:05 2009 +0300 + + Fix duplicate dependency checking on build + - Broken by commit af8b41c64af39ce07d85fcd92fa78d566747d815 which + simplified too much. + - There's no guarantee that rpmdsNew() returns a sorted dependency set + so rpmdsFind() doesn't work correctly here. Walk the ds manually instead. + - With multiple triggers of same type, identical trigger conditions on + different trigger script were seen as duplicates (RhBug:490378) + - Split the duplicate checking to separate helper function for clarity + +diff --git a/build/reqprov.c b/build/reqprov.c +index 1e69bd2..ba6a1e8 100644 +--- a/build/reqprov.c ++++ b/build/reqprov.c +@@ -9,6 +9,38 @@ + #include + #include "debug.h" + ++static int isNewDep(Header h, rpmTag nametag, ++ const char *N, const char *EVR, rpmsenseFlags Flags, ++ rpmTag indextag, uint32_t index) ++{ ++ int new = 1; ++ struct rpmtd_s idx; ++ rpmds ads = rpmdsNew(h, nametag, 0); ++ rpmds bds = rpmdsSingle(nametag, N, EVR, Flags); ++ ++ if (indextag) { ++ headerGet(h, indextag, &idx, HEADERGET_MINMEM); ++ } ++ ++ /* XXX there's no guarantee the ds is sorted here so rpmdsFind() wont do */ ++ rpmdsInit(ads); ++ while (new && rpmdsNext(ads) >= 0) { ++ if (strcmp(rpmdsN(ads), rpmdsN(bds))) continue; ++ if (strcmp(rpmdsEVR(ads), rpmdsEVR(bds))) continue; ++ if (rpmdsFlags(ads) != rpmdsFlags(bds)) continue; ++ if (indextag && rpmtdSetIndex(&idx, rpmdsIx(ads)) >= 0 && ++ rpmtdGetNumber(&idx) != index) continue; ++ new = 0; ++ } ++ ++ if (indextag) { ++ rpmtdFreeData(&idx); ++ } ++ rpmdsFree(ads); ++ rpmdsFree(bds); ++ return new; ++} ++ + int addReqProv(rpmSpec spec, Header h, rpmTag tagN, + const char * N, const char * EVR, rpmsenseFlags Flags, + uint32_t index) +@@ -55,28 +87,18 @@ int addReqProv(rpmSpec spec, Header h, rpmTag tagN, + if (EVR == NULL) + EVR = ""; + +- /* Check for duplicate dependencies. */ +- rpmds hds = rpmdsNew(h, nametag, 0); +- rpmds newds = rpmdsSingle(nametag, N, EVR, Flags); +- /* already got it, don't bother */ +- if (rpmdsFind(hds, newds) >= 0) { +- goto exit; +- } +- +- /* Add this dependency. */ +- headerPutString(h, nametag, N); +- if (flagtag) { +- headerPutString(h, versiontag, EVR); +- headerPutUint32(h, flagtag, &Flags, 1); +- } +- if (indextag) { +- headerPutUint32(h, indextag, &index, 1); ++ /* Avoid adding duplicate dependencies. */ ++ if (isNewDep(h, nametag, N, EVR, Flags, indextag, index)) { ++ headerPutString(h, nametag, N); ++ if (flagtag) { ++ headerPutString(h, versiontag, EVR); ++ headerPutUint32(h, flagtag, &Flags, 1); ++ } ++ if (indextag) { ++ headerPutUint32(h, indextag, &index, 1); ++ } + } + +-exit: +- rpmdsFree(hds); +- rpmdsFree(newds); +- + return 0; + } + diff --git a/rpm.spec b/rpm.spec index 946f5b0..7c5fe49 100644 --- a/rpm.spec +++ b/rpm.spec @@ -21,7 +21,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: 4%{?dist} +Release: 5%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/rpm-4.7.x/%{name}-%{srcver}.tar.bz2 @@ -39,6 +39,10 @@ Patch2: rpm-4.5.90-gstreamer-provides.patch Patch3: rpm-4.6.0-fedora-specspo.patch # Patches already in upstream +Patch200: rpm-4.7.1-bugurl.patch +Patch201: rpm-4.7.1-abs-filelist.patch +Patch202: rpm-4.7.1-debug-perms.patch +Patch203: rpm-4.7.1-duplicate-deps.patch # These are not yet upstream Patch300: rpm-4.7.0-extra-provides.patch @@ -192,6 +196,11 @@ packages on a system. %patch2 -p1 -b .gstreamer-prov %patch3 -p1 -b .fedora-specspo +%patch200 -p1 -b .bugurl +%patch201 -p1 -b .abs-filelist +%patch202 -p1 -b .debug-perms +%patch203 -p1 -b .duplicate-deps + %patch300 -p1 -b .extra-prov %patch301 -p1 -b .niagara %patch302 -p1 -b .geode @@ -406,6 +415,12 @@ exit 0 %doc doc/librpm/html/* %changelog +* 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)