[packages/rpm] Merge usefeul patches from rpm-4_5 branch
baggins
baggins at pld-linux.org
Tue Sep 4 07:38:55 CEST 2012
commit a3809792b1fd84d358ee44b131d3f713713a344e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Sep 4 07:35:10 2012 +0200
Merge usefeul patches from rpm-4_5 branch
rpm-builddir-readlink.patch | 26 ++++++++++++++++
rpm-changelog_order_check_nonfatal.patch | 13 ++++++++
rpm-cleanbody.patch | 10 ++++++
rpm-dirdeps-macro.patch | 45 +++++++++++++++++++++++++++
rpm-installbeforeerase.patch | 52 ++++++++++++++++++++++++++++++++
rpm-libmagic-locale.patch | 35 +++++++++++++++++++++
rpm-namespace-probe.patch | 39 ++++++++++++++++++++++++
rpm-popt-coreutils.patch | 13 ++++++++
rpm-postun-nofail.patch | 13 ++++++++
rpm.spec | 26 ++++++++++++++--
10 files changed, 270 insertions(+), 2 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index a122e9d..67282cc 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -130,8 +130,19 @@ Patch61: %{name}-sparc64.patch
Patch62: %{name}-gendiff.patch
Patch70: %{name}-configure-autoconf.patch
Patch72: openmp.patch
-Patch73: rpm-URPM-build-fix.patch
-Patch74: rpm-db5.3.patch
+Patch73: %{name}-URPM-build-fix.patch
+Patch74: %{name}-db5.3.patch
+Patch75: %{name}-helperEVR-noassert.patch
+Patch76: %{name}-unglobal.patch
+Patch77: %{name}-builddir-readlink.patch
+Patch78: %{name}-changelog_order_check_nonfatal.patch
+Patch79: %{name}-cleanbody.patch
+Patch80: %{name}-dirdeps-macro.patch
+Patch81: %{name}-installbeforeerase.patch
+Patch82: %{name}-libmagic-locale.patch
+Patch83: %{name}-namespace-probe.patch
+Patch84: %{name}-popt-coreutils.patch
+Patch85: %{name}-postun-nofail.patch
URL: http://rpm5.org/
BuildRequires: autoconf >= 2.60
BuildRequires: automake >= 1.4
@@ -694,6 +705,17 @@ install %{SOURCE12} scripts/perl.prov
%patch72 -p1 -b .wiget
%patch73 -p1
%patch74 -p1
+%patch75 -p1
+%patch76 -p1
+%patch77 -p1
+%patch78 -p1
+%patch79 -p1
+%patch80 -p1
+%patch81 -p1
+%patch82 -p1
+%patch83 -p1
+%patch84 -p1
+%patch85 -p1
cp -p %{SOURCE2} macros/pld.in
diff --git a/rpm-builddir-readlink.patch b/rpm-builddir-readlink.patch
new file mode 100644
index 0000000..11afecf
--- /dev/null
+++ b/rpm-builddir-readlink.patch
@@ -0,0 +1,26 @@
+--- rpm-4.5/scripts/find-debuginfo.sh~ 2010-01-27 19:25:48.000000000 +0200
++++ rpm-4.5/scripts/find-debuginfo.sh 2010-01-27 20:23:37.279516094 +0200
+@@ -24,6 +24,11 @@
+ # Barf on missing build IDs.
+ strict=false
+
++# canon RPM_BUILD_DIR, the DW_AT_comp_dir in ELF objects is real a real path
++# and debugedit will ignore them as they are out of build dir.
++RPM_BUILD_DIR=$(readlink -f "$RPM_BUILD_DIR")
++echo "RPM_BUILD_DIR=$RPM_BUILD_DIR"
++
+ BUILDDIR=.
+ out=debugfiles.list
+ nout=0
+@@ -201,6 +203,11 @@
+ $strict && exit 2
+ fi
+
++ if [ ! -s "$SOURCEFILE" ]; then
++ echo >&2 "*** ${strict_error}: no sources found for $f (stripped without sourcefile information?)"
++ $strict && exit 2
++ fi
++
+ # A binary already copied into /usr/lib/debug doesn't get stripped,
+ # just has its file names collected and adjusted.
+ case "$dn" in
diff --git a/rpm-changelog_order_check_nonfatal.patch b/rpm-changelog_order_check_nonfatal.patch
new file mode 100644
index 0000000..bf2ef04
--- /dev/null
+++ b/rpm-changelog_order_check_nonfatal.patch
@@ -0,0 +1,13 @@
+--- rpm-4.5/build/parseChangelog.c.orig 2012-07-24 14:46:12.856158625 +0200
++++ rpm-4.5/build/parseChangelog.c 2012-07-24 14:47:55.293158624 +0200
+@@ -181,9 +181,8 @@
+ return RPMERR_BADSPEC;
+ }
+ if (lastTime && lastTime < time) {
+- rpmError(RPMERR_BADSPEC,
++ rpmMessage(RPMMESS_WARNING,
+ _("%%changelog not in descending chronological order\n"));
+- return RPMERR_BADSPEC;
+ }
+ lastTime = time;
+
diff --git a/rpm-cleanbody.patch b/rpm-cleanbody.patch
new file mode 100644
index 0000000..f8b29ef
--- /dev/null
+++ b/rpm-cleanbody.patch
@@ -0,0 +1,10 @@
+--- rpm-4.4.9/build/parseBuildInstallClean.c 2008-01-30 23:16:55.347346942 +0200
++++ rpm-4.4.9/build/parseBuildInstallClean.c 2008-01-30 23:22:24.241459876 +0200
+@@ -51,7 +51,6 @@
+ if (s && *s)
+ appendStringBuf(*sbp, s);
+ s = _free(s);
+- sbp = NULL; /* XXX skip %clean from spec file. */
+ }
+
+ /* There are no options to %build, %install, %check, or %clean */
diff --git a/rpm-dirdeps-macro.patch b/rpm-dirdeps-macro.patch
new file mode 100644
index 0000000..2cef12d
--- /dev/null
+++ b/rpm-dirdeps-macro.patch
@@ -0,0 +1,45 @@
+Index: lib/depends.c
+===================================================================
+RCS file: /v/rpm/cvs/rpm/lib/depends.c,v
+retrieving revision 1.404
+retrieving revision 1.405
+diff -w -u -r1.404 -r1.405
+--- lib/depends.c 3 Jul 2008 15:08:05 -0000 1.404
++++ lib/depends.c 17 Jul 2008 13:57:42 -0000 1.405
+@@ -1462,6 +1462,8 @@
+ int terminate = 2; /* XXX terminate if rc >= terminate */
+ int rc;
+ int ourrc = 0;
++ int dirname_deps;
++ int symlink_deps;
+
+ requires = rpmdsInit(requires);
+ if (requires != NULL)
+@@ -1537,6 +1539,8 @@
+ }
+ }
+
++ dirname_deps = rpmExpandNumeric("%{?_check_dirname_deps}%{?!_check_dirname_deps:1}");
++ if (dirname_deps) {
+ dirnames = rpmdsInit(dirnames);
+ if (dirnames != NULL)
+ while (ourrc < terminate && rpmdsNext(dirnames) >= 0) {
+@@ -1577,7 +1581,10 @@
+ /*@switchbreak@*/ break;
+ }
+ }
++ }
+
++ symlink_deps = rpmExpandNumeric("%{?_check_symlink_deps}%{?!_check_symlink_deps:1}");
++ if (symlink_deps) {
+ linktos = rpmdsInit(linktos);
+ if (linktos != NULL)
+ while (ourrc < terminate && rpmdsNext(linktos) >= 0) {
+@@ -1595,6 +1602,7 @@
+ dscolor = rpmdsColor(linktos);
+ if (tscolor && dscolor && !(tscolor & dscolor))
+ continue;
++ }
+
+ rc = unsatisfiedDepend(ts, linktos, adding);
+
diff --git a/rpm-installbeforeerase.patch b/rpm-installbeforeerase.patch
new file mode 100644
index 0000000..33715cf
--- /dev/null
+++ b/rpm-installbeforeerase.patch
@@ -0,0 +1,52 @@
+ 4.4.9 -> 4.5:
++ - jbj: add a relation to to force install-before-erase.
++ - jbj: display dependency loops as an error for now.
+ - glen: do not skip %clean from spec file
+ - robert: install rpmdeps and debugedit to pkglibdir as on HEAD
+ - jbj: fix: python ts.hdrFromFdno(fdno) segfault.
+--- rpm-4.5/lib/depends.c~ 2008/10/26 18:29:50 1.327.2.10
++++ rpm-4.5/lib/depends.c 2008-10-27 14:42:52.984295775 +0200
+@@ -1936,7 +1936,7 @@
+ return 0;
+
+ /* Avoid certain dependency relations. */
+- if (teType == TR_ADDED && ignoreDep(ts, p, q))
++ if (ignoreDep(ts, p, q))
+ return 0;
+
+ /* Avoid redundant relations. */
+@@ -2191,6 +2191,25 @@
+ }
+ }
+
++
++ /* Ensure that erasures follow installs during upgrades. */
++ if (rpmteType(p) == TR_REMOVED && p->flink.Pkgid && p->flink.Pkgid[0]) {
++
++ qi = rpmtsiInit(ts);
++ while ((q = rpmtsiNext(qi, TR_ADDED)) != NULL) {
++ if (strcmp(q->pkgid, p->flink.Pkgid[0]))
++ continue;
++ requires = rpmdsFromPRCO(q->PRCO, RPMTAG_NAME);
++ if (requires != NULL) {
++ /* XXX disable erased arrow reversal. */
++ p->type = TR_ADDED;
++ (void) addRelation(ts, p, selected, requires);
++ p->type = TR_REMOVED;
++ }
++ }
++ qi = rpmtsiFree(qi);
++ }
++
+ if (_autobits != 0xffffffff)
+ {
+
+@@ -2401,7 +2420,7 @@
+ const char * dp;
+ char buf[4096];
+ int msglvl = (anaconda || (rpmtsDFlags(ts) & RPMDEPS_FLAG_DEPLOOPS))
+- ? RPMMESS_WARNING : RPMMESS_DEBUG;
++ ? RPMMESS_WARNING : RPMMESS_ERROR;
+ ;
+
+ /* Unchain predecessor loop. */
diff --git a/rpm-libmagic-locale.patch b/rpm-libmagic-locale.patch
new file mode 100644
index 0000000..29fcc32
--- /dev/null
+++ b/rpm-libmagic-locale.patch
@@ -0,0 +1,35 @@
+--- rpm-4.5/lib/rpmfc.c.org 2012-02-29 16:32:05.655058968 +0100
++++ rpm-4.5/lib/rpmfc.c 2012-02-29 16:36:22.430972834 +0100
+@@ -1114,9 +1114,31 @@
+ /* XXX skip all files in /dev/ which are (or should be) %dev dummies. */
+ else if (slen >= fc->brlen+sizeof("/dev/") && !strncmp(s+fc->brlen, "/dev/", sizeof("/dev/")-1))
+ ftype = "";
+- else
++ else {
++ char *old_ctype = setlocale(LC_CTYPE, NULL);
++ char *old_collate = setlocale(LC_COLLATE, NULL);
++
++ if (old_ctype) {
++ old_ctype = xstrdup(old_ctype);
++ setlocale(LC_CTYPE, "C");
++ }
++ if (old_collate) {
++ old_collate = xstrdup(old_collate);
++ setlocale(LC_COLLATE, "C");
++ }
++
+ ftype = magic_file(ms, s);
+
++ if (old_ctype) {
++ setlocale(LC_CTYPE, old_ctype);
++ _free(old_ctype);
++ }
++ if (old_collate) {
++ setlocale(LC_COLLATE, old_collate);
++ _free(old_collate);
++ }
++ }
++
+ if (ftype == NULL) {
+ xx = RPMERR_EXEC;
+ rpmError(xx, _("magic_file(ms, \"%s\") failed: mode %06o %s\n"),
diff --git a/rpm-namespace-probe.patch b/rpm-namespace-probe.patch
new file mode 100644
index 0000000..d7f271b
--- /dev/null
+++ b/rpm-namespace-probe.patch
@@ -0,0 +1,39 @@
+Disable Provides: user(NAME), group(NAME) probes as it would fire trigger on NAME uninstall
+
+as for example uninstalling this spec: https://bugs.pld-linux.org/attachment.cgi?id=20
+
+15:30:53 jbj> glen_: rpmns.c splits group(mailman) into the tuple {group, mailman} for name space processing.
+15:32:48 jbj> the code in unbsatisfiedDepnds is driven by the name "group". if split, then its not the string
+ "group(mailman)" any more.
+
+--- rpm-4.4.9/lib/depends.c~ 2008-04-08 19:44:02.000000000 +0300
++++ rpm-4.4.9/lib/depends.c 2008-04-25 15:12:52.734623679 +0300
+@@ -611,6 +611,7 @@
+ goto exit;
+ }
+
++#if 0
+ /* Evaluate user/group lookup probes. */
+ if (NSType == RPMNS_TYPE_USER) {
+ const char *s;
+@@ -646,6 +647,7 @@
+ rpmdsNotify(dep, _("(group lookup)"), rc);
+ goto exit;
+ }
++#endif
+
+ /* Evaluate access(2) probe dependencies. */
+ if (NSType == RPMNS_TYPE_ACCESS) {
+--- rpm-4.4.9/lib/rpmns.c~ 2007-05-16 14:31:58.000000000 +0300
++++ rpm-4.4.9/lib/rpmns.c 2008-04-25 15:36:20.223855745 +0300
+@@ -179,8 +179,10 @@
+ case RPMNS_TYPE_UNAME:
+ case RPMNS_TYPE_SONAME:
+ case RPMNS_TYPE_ACCESS:
++#if 0
+ case RPMNS_TYPE_USER:
+ case RPMNS_TYPE_GROUP:
++#endif
+ case RPMNS_TYPE_MOUNTED:
+ case RPMNS_TYPE_DISKSPACE:
+ case RPMNS_TYPE_DIGEST:
diff --git a/rpm-popt-coreutils.patch b/rpm-popt-coreutils.patch
new file mode 100644
index 0000000..250ae97
--- /dev/null
+++ b/rpm-popt-coreutils.patch
@@ -0,0 +1,13 @@
+--- rpm-4.5/rpmpopt.in~ 2008-06-10 14:24:49.000000000 +0300
++++ rpm-4.5/rpmpopt.in 2008-06-10 14:26:04.428174732 +0300
+@@ -55,8 +55,8 @@
+ --POPTdesc=$"set permissions of files in a package"
+
+ rpm alias --setugids -q --qf \
+- '[ch %{FILEUSERNAME:shescape} %{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
+- --pipe "(echo 'ch() { chown -h -- \"$1\" \"$3\";chgrp -h -- \"$2\" \"$3\"; }';grep -v \(none\))|sh" \
++ '[chown -h -- %{FILEUSERNAME:shescape}:%{FILEGROUPNAME:shescape} %{FILENAMES:shescape}\n]' \
++ --pipe "grep -v '(none)' | sh" \
+ --POPTdesc=$"set user/group ownership of files in a package"
+
+ rpm alias --conflicts --qf \
diff --git a/rpm-postun-nofail.patch b/rpm-postun-nofail.patch
new file mode 100644
index 0000000..12a6406
--- /dev/null
+++ b/rpm-postun-nofail.patch
@@ -0,0 +1,13 @@
+--- rpm-4.5/lib/psm.c.org 2008-11-21 17:20:34.293584455 +0100
++++ rpm-4.5/lib/psm.c 2008-11-21 17:21:41.482728047 +0100
+@@ -2114,8 +2114,8 @@
+ psm->countCorrection = -1;
+
+ if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOSTUN)) {
+- rc = rpmpsmNext(psm, PSM_SCRIPT);
+- if (rc) break;
++ if (rpmpsmNext(psm, PSM_SCRIPT))
++ rpmMessage(RPMMESS_VERBOSE, _("Ignoring failed %%postun scriptlet\n"));
+ }
+
+ if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERPOSTUN)) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/26ea8a78f0bb9511402183d62bebf82d48132876
More information about the pld-cvs-commit
mailing list