[packages/rpm] updated old patches to rpm5
baggins
baggins at pld-linux.org
Tue Sep 4 07:39:00 CEST 2012
commit 26ea8a78f0bb9511402183d62bebf82d48132876
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Tue Sep 4 07:37:04 2012 +0200
updated old patches to rpm5
rpm-builddir-readlink.patch | 6 +--
rpm-changelog_order_check_nonfatal.patch | 8 ++--
rpm-cleanbody.patch | 13 ++++---
rpm-dirdeps-macro.patch | 61 +++++++++++++-----------------
rpm-installbeforeerase.patch | 65 ++++++++++++--------------------
rpm-libmagic-locale.patch | 26 ++++++-------
rpm-namespace-probe.patch | 4 +-
rpm-postun-nofail.patch | 2 +-
8 files changed, 79 insertions(+), 106 deletions(-)
---
diff --git a/rpm-builddir-readlink.patch b/rpm-builddir-readlink.patch
index 11afecf..0453045 100644
--- a/rpm-builddir-readlink.patch
+++ b/rpm-builddir-readlink.patch
@@ -1,9 +1,9 @@
--- 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
+ RPM_BUILD_DIR="`pwd`"
+# 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")
@@ -21,6 +21,6 @@
+ $strict && exit 2
+ fi
+
+ [ -x /usr/bin/gdb-add-index ] && /usr/bin/gdb-add-index "$f" > /dev/null 2>&1
+
# 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
index bf2ef04..9211b91 100644
--- a/rpm-changelog_order_check_nonfatal.patch
+++ b/rpm-changelog_order_check_nonfatal.patch
@@ -1,13 +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;
+ return RPMRC_FAIL;
}
if (lastTime && lastTime < time) {
-- rpmError(RPMERR_BADSPEC,
-+ rpmMessage(RPMMESS_WARNING,
+- rpmlog(RPMLOG_ERR,
++ rpmlog(RPMLOG_WARNING,
_("%%changelog not in descending chronological order\n"));
-- return RPMERR_BADSPEC;
+- return RPMRC_FAIL;
}
lastTime = time;
diff --git a/rpm-cleanbody.patch b/rpm-cleanbody.patch
index f8b29ef..4c25d33 100644
--- a/rpm-cleanbody.patch
+++ b/rpm-cleanbody.patch
@@ -1,10 +1,11 @@
--- 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 @@
+@@ -51,7 +51,7 @@
if (s && *s)
- appendStringBuf(*sbp, s);
+ *iobp = rpmiobAppend(*iobp, s, 0);
s = _free(s);
-- sbp = NULL; /* XXX skip %clean from spec file. */
- }
-
- /* There are no options to %build, %install, %check, or %clean */
+-#if !defined(RPM_VENDOR_OPENPKG) /* still-support-section-clean */
++#if !defined(RPM_VENDOR_OPENPKG) && !defined(RPM_VENDOR_PLD) /* still-support-section-clean */
+ /* OpenPKG still wishes to use "%clean" script/section */
+ iobp = NULL; /* XXX skip %clean from spec file. */
+ #endif
diff --git a/rpm-dirdeps-macro.patch b/rpm-dirdeps-macro.patch
index 2cef12d..8c8c882 100644
--- a/rpm-dirdeps-macro.patch
+++ b/rpm-dirdeps-macro.patch
@@ -1,45 +1,38 @@
-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 @@
+--- rpm-5.4.10/lib/depends.c~ 2012-04-15 23:20:56.000000000 +0200
++++ rpm-5.4.10/lib/depends.c 2012-09-03 23:00:59.363079731 +0200
+@@ -1569,7 +1569,7 @@
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 @@
+-#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) || defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /* optional-dirname-and-symlink-deps */
++#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) || defined(RPM_VENDOR_PLD) || defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /* optional-dirname-and-symlink-deps */
+ int dirname_deps;
+ int symlink_deps;
+ #endif
+@@ -1648,7 +1648,7 @@
}
}
-+ 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 @@
+-#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) || defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /* optional-dirname-and-symlink-deps */
++#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) || defined(RPM_VENDOR_PLD) || defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /* optional-dirname-and-symlink-deps */
+ dirname_deps = rpmExpandNumeric("%{?_check_dirname_deps}%{?!_check_dirname_deps:1}");
+ if (dirname_deps) {
+ #endif
+@@ -1692,7 +1692,7 @@
/*@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;
-+ }
+-#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) || defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /* optional-dirname-and-symlink-deps */
++#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) || defined(RPM_VENDOR_PLD) || defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /* optional-dirname-and-symlink-deps */
+ }
- rc = unsatisfiedDepend(ts, linktos, adding);
+ symlink_deps = rpmExpandNumeric("%{?_check_symlink_deps}%{?!_check_symlink_deps:1}");
+@@ -1740,7 +1740,7 @@
+ /*@switchbreak@*/ break;
+ }
+ }
+-#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) || defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /* optional-dirname-and-symlink-deps */
++#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_ARK) || defined(RPM_VENDOR_PLD) || defined(RPM_OPTIONAL_DIRNAME_AND_SYMLINK_DEPS) /* optional-dirname-and-symlink-deps */
+ }
+ #endif
diff --git a/rpm-installbeforeerase.patch b/rpm-installbeforeerase.patch
index 33715cf..8939bfa 100644
--- a/rpm-installbeforeerase.patch
+++ b/rpm-installbeforeerase.patch
@@ -4,49 +4,32 @@
- 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;
+--- rpm-5.4.10/lib/order.c~ 2012-07-06 17:39:16.000000000 +0200
++++ rpm-5.4.10/lib/order.c 2012-09-03 23:09:03.706487979 +0200
+@@ -1631,7 +1631,7 @@
+ (void) orgrpmAddRelation(ts, al, p, requires);
+ }
- /* Avoid redundant relations. */
-@@ -2191,6 +2191,25 @@
+-#ifdef NOTYET
++#if defined(RPM_VENDOR_PLD)
+ /* Ensure that erasures follow installs during upgrades. */
+ if (rpmteType(p) == TR_REMOVED && p->flink.Pkgid && p->flink.Pkgid[0]) {
+ rpmtsi qi;
+@@ -1652,7 +1652,7 @@
}
+ qi = rpmtsiFree(qi);
}
+-#endif /* NOTYET */
++#endif
-+
-+ /* 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 @@
+ #ifdef NOTYET
+ /* Order by requiring parent directories as prerequisites. */
+@@ -2175,7 +2175,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. */
+ rpmlogLvl msglvl = (anaconda || (rpmtsDFlags(ts) & RPMDEPS_FLAG_DEPLOOPS))
+ ? RPMLOG_WARNING : RPMLOG_ERR;
+-#if defined(RPM_VENDOR_MANDRIVA) /* loop-detection-optional-loglevel */
++#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_PLD) /* loop-detection-optional-loglevel */
+ // Report loops as debug-level message by default (7 = RPMLOG_DEBUG), overridable
+ msglvl = rpmExpandNumeric("%{?_loop_detection_loglevel}%{?!_loop_detection_loglevel:7}");
+ #endif
diff --git a/rpm-libmagic-locale.patch b/rpm-libmagic-locale.patch
index 29fcc32..f018427 100644
--- a/rpm-libmagic-locale.patch
+++ b/rpm-libmagic-locale.patch
@@ -1,11 +1,9 @@
---- 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 {
+--- rpm-4.5/rpmio/rpmmg.c.org 2012-02-29 16:32:05.655058968 +0100
++++ rpm-4.5/rpmio/rpmmg.c 2012-02-29 16:36:22.430972834 +0100
+@@ -1114,7 +1114,28 @@
+ /*@fallthrough@*/
+ case URL_IS_UNKNOWN:
+ default:
+ char *old_ctype = setlocale(LC_CTYPE, NULL);
+ char *old_collate = setlocale(LC_COLLATE, NULL);
+
@@ -18,8 +16,8 @@
+ setlocale(LC_COLLATE, "C");
+ }
+
- ftype = magic_file(ms, s);
-
+ t = magic_file(mg->ms, fn);
++
+ if (old_ctype) {
+ setlocale(LC_CTYPE, old_ctype);
+ _free(old_ctype);
@@ -28,8 +26,6 @@
+ 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"),
+ /* XXX HACK: libmagic compiled without <pcreposix.h> spews here. */
+ if (t == NULL) {
+ const char * msg = magic_error(mg->ms);
diff --git a/rpm-namespace-probe.patch b/rpm-namespace-probe.patch
index d7f271b..32a9f26 100644
--- a/rpm-namespace-probe.patch
+++ b/rpm-namespace-probe.patch
@@ -24,8 +24,8 @@ as for example uninstalling this spec: https://bugs.pld-linux.org/attachment.cgi
/* 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
+--- rpm-4.4.9/lib/order.c~ 2007-05-16 14:31:58.000000000 +0300
++++ rpm-4.4.9/lib/order.c 2008-04-25 15:36:20.223855745 +0300
@@ -179,8 +179,10 @@
case RPMNS_TYPE_UNAME:
case RPMNS_TYPE_SONAME:
diff --git a/rpm-postun-nofail.patch b/rpm-postun-nofail.patch
index 12a6406..e02ab7c 100644
--- a/rpm-postun-nofail.patch
+++ b/rpm-postun-nofail.patch
@@ -4,7 +4,7 @@
psm->countCorrection = -1;
if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOSTUN)) {
-- rc = rpmpsmNext(psm, PSM_SCRIPT);
+- rc = (rpmRC) rpmpsmNext(psm, PSM_SCRIPT);
- if (rc) break;
+ if (rpmpsmNext(psm, PSM_SCRIPT))
+ rpmMessage(RPMMESS_VERBOSE, _("Ignoring failed %%postun scriptlet\n"));
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/26ea8a78f0bb9511402183d62bebf82d48132876
More information about the pld-cvs-commit
mailing list