[packages/rpm/rpm.org] - staring playing with rpm.org
baggins
baggins at pld-linux.org
Sun May 12 13:22:34 CEST 2019
commit 98d9fc8e9cc559da146eb1be26fab0359a01a5c2
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun May 12 13:21:58 2019 +0200
- staring playing with rpm.org
...enerate-rpmfc-dependencies-from-doc-files.patch | 55 ----
rpm-5.4.10-duplicate_files_terminate_build.patch | 67 -----
....4.10-files-listed-twice-terminates-build.patch | 74 -----
...ix-neon-saving-error-pages-as-target-file.patch | 39 ---
rpm-5.4.10-support-ignore-arch-and-os-again.patch | 45 ---
...5.4.10-unpackaged_subdirs_terminate_build.patch | 67 -----
rpm-5.4.12-copy-Value-string.patch | 11 -
rpm-5.4.12-fix-rpmlua-print.patch | 22 --
rpm-5.4.12-fix-rpmpython-module-import-init.patch | 15 -
rpm-5.4.12-truncate-output-buffer-after-use.patch | 11 -
rpm-5.4.13-perl-bindings-do-not-use-xmalloc.patch | 20 --
....4.14-no-assert-abort-with-broken-headers.patch | 11 -
rpm-5.4.14-rpmdbchk.patch | 334 ---------------------
rpm-5.4.4-add-_specfile-macro.patch | 10 -
...4.4-allow-installation-of-repackaged-rpms.patch | 11 -
...eless-auto-generated-pkgconfig-dependency.patch | 23 --
...always-use-LC_CTYPE-C-for-case-conversion.patch | 20 --
...me-package-with-epoch-possible-to-upgrade.patch | 22 --
....4-glob-wildcards-for-loading-macro-files.patch | 24 --
...pass-_builddir-properly-to-find-debuginfo.patch | 25 --
rpm-5.4.4-pkgconfigdeps-check-path.patch | 76 -----
rpm-5.4.4-rpmbuild-withoutclean.patch | 10 -
rpm-5.4.5-python-export-spec-macros.patch | 70 -----
....5-rpmfc-apply-python-coloring-from-magic.patch | 10 -
...5-skip-dependencies-for-character-devices.patch | 13 -
...sider-trigger-dependencies-as-overlapping.patch | 12 -
...5.4.7-fix-generation-of-ruby-abi-provides.patch | 35 ---
rpm-5.4.7-fix-minor-memleaks.patch | 25 --
...5.4.7-hdrfmt-fix-unitialized-argv-element.patch | 14 -
rpm-5.4.7-kmod-dependencies.patch | 66 ----
rpm-5.4.7-no-seqid_init-on-rdonly-database.patch | 11 -
rpm-5.4.8-dont-show-suggests-with-requires.patch | 62 ----
rpm-5.4.9-avoid-dependencies-on-self.patch | 85 ------
...-in-path-for-dirname-filetrigger-matching.patch | 23 --
rpm-5.4.9-disable-l10ndir.patch | 11 -
rpm-5.4.9-fix-rpm_qa-pattern.patch | 11 -
rpm-5.4.9-fix-verify-segfault.patch | 26 --
rpm-5.4.9-font-provides.patch | 60 ----
rpm-5.4.9-keep-loading-script-macros.patch | 80 -----
...-mire-fix-strings-lacking-null-terminator.patch | 32 --
...-rpmfc-extract-dependencies-for-all-files.patch | 11 -
rpm-5.4.9-rpmpython-fix-input.patch | 11 -
rpm-5.4.9-ruby1.9-fixes.patch | 42 ---
...-buildroot-away-from-duplicate-files-list.patch | 97 ------
...9-support-signatures-and-digest-disablers.patch | 63 ----
...-rpmfc-when-removing-dependencies-on-self.patch | 140 ---------
rpm.spec | 182 +----------
47 files changed, 7 insertions(+), 2177 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index d43a351..82f7bf3 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -46,13 +46,12 @@ Summary(pt_BR.UTF-8): Gerenciador de pacotes RPM
Summary(ru.UTF-8): Менеджер пакетов от RPM
Summary(uk.UTF-8): Менеджер пакетів від RPM
Name: rpm
-Version: 5.4.15
-Release: 51
-License: LGPL v2.1
+Version: 4.14.2.1
+Release: 0.1
+License: GPL v2 / LGPL v2.1
Group: Base
-# http://rpm5.org/files/rpm/rpm-5.4/rpm-5.4.15-0.20140824.src.rpm
-Source0: %{name}-%{version}.tar.gz
-# Source0-md5: 4067f83ca8b5bf1a21e443c0cff3efa0
+Source0: http://ftp.rpm.org/releases/rpm-4.14.x/%{name}-%{version}.tar.bz2
+# Source0-md5: fdb8b8857f103b087b6aed5b78dd9b4f
# See README.cpu-os-macros how to update cpu-os-macros.a
Source100: cpu-os-macros.a
Source101: README.cpu-os-macros
@@ -185,126 +184,7 @@ Patch96: skip-ldconfig-optimization.patch
Patch97: glibc.patch
Patch98: extension-based-compression-detection.patch
Patch99: %{name}-gpg-pinentry.patch
-
-# Patches imported from Mandriva
-
-# status: ready to merge, it's already been merged on HEAD, so commiting it to rpm-5_4
-# would basically just mean backporting it..
-Patch1000: %{name}-5.4.4-add-_specfile-macro.patch
-# status: needs to be cleaned up and properly reviewed together with rest
-# of the patches related to dependency generation
-Patch1001: %{name}-5.4.9-avoid-dependencies-on-self.patch
-# status: probably ready to merge
-Patch1002: %{name}-5.4.4-pkgconfigdeps-check-path.patch
-# status: probably okay to merge, but discuss on rpm-devel first
-Patch1003: %{name}-5.4.4-glob-wildcards-for-loading-macro-files.patch
-# status: needs to be discussed
-Patch1004: %{name}-5.4.4-allow-installation-of-repackaged-rpms.patch
-# status: ready to merge
-Patch1005: %{name}-5.4.8-dont-show-suggests-with-requires.patch
-# status: ready for merge
-Patch1006: %{name}-5.4.9-strip-buildroot-away-from-duplicate-files-list.patch
-# status: probably okay to merge, but discuss on rpm-devel first
-Patch1007: %{name}-5.4.10-duplicate_files_terminate_build.patch
-# status: same as above
-Patch1008: %{name}-5.4.10-unpackaged_subdirs_terminate_build.patch
-# mdvbz#64898
-# status: uncertain, might be okay to merge, discuss on rpm-devel first
-Patch1009: %{name}-5.4.4-rpmbuild-withoutclean.patch
-# no sense in having an additional dependency on 'pkgconfig' on all packages that
-# have a pkgconfig file, it's not needed for them to be made useful and anything
-# actuallly using pkgconfig for this purpose will pull it in as a dependency anyways...
-# status: might be okay to merge, but discuss on rpm-devel first
-Patch1010: %{name}-5.4.4-drop-useless-auto-generated-pkgconfig-dependency.patch
-# status: ready for merge
-Patch1011: %{name}-5.4.4-fix-rpmconstant-to-always-use-LC_CTYPE-C-for-case-conversion.patch
-# $RPM_BUILD_DIR isn't necessarily the same as $PWD, it's %%{_builddir}, not
-# %%{_builddir}/%%{?buildsubdir}, messing up paths in debug packages created..
-# status: needs to be discussed and investigated a bit better..
-Patch1012: %{name}-5.4.4-pass-_builddir-properly-to-find-debuginfo.patch
-# status: probably okay to merge, but discuss on rpm-devel first
-Patch1013: %{name}-5.4.10-files-listed-twice-terminates-build.patch
-# status: probably okay to merge
-Patch1014: %{name}-5.4.9-ruby1.9-fixes.patch
-# status: keep locally
-Patch1015: %{name}-5.4.9-keep-loading-script-macros.patch
-# status: same as for other dep gen patches
-Patch1016: %{name}-5.4.9-update-rpmfc-when-removing-dependencies-on-self.patch
-# status: idem
-Patch1017: %{name}-5.4.9-rpmfc-extract-dependencies-for-all-files.patch
-# status: probably okay to merge
-Patch1019: %{name}-5.4.5-python-export-spec-macros.patch
-# status: idem
-Patch1020: %{name}-5.4.9-font-provides.patch
-# stauus: idem
-Patch1021: %{name}-5.4.7-kmod-dependencies.patch
-# status: probably okay to merge, discuss on rpm-devel first
-Patch1022: %{name}-5.4.5-skip-dependencies-for-character-devices.patch
-# status: probably okay to merge
-Patch1024: %{name}-5.4.5-rpmfc-apply-python-coloring-from-magic.patch
-# status: probably okay to merge
-Patch1026: %{name}-5.4.10-dont-try-generate-rpmfc-dependencies-from-doc-files.patch
-# status: ready
-Patch1027: %{name}-5.4.7-fix-generation-of-ruby-abi-provides.patch
-# crash reproducable with 'rpm -qa --triggers'
-# status: ready
-Patch1028: %{name}-5.4.7-hdrfmt-fix-unitialized-argv-element.patch
-# status: same as for other dep gen patches
-Patch1029: %{name}-5.4.7-dont-consider-trigger-dependencies-as-overlapping.patch
-# status: ready
-Patch1030: %{name}-5.4.7-fix-minor-memleaks.patch
-# status: ready
-Patch1031: %{name}-5.4.9-mire-fix-strings-lacking-null-terminator.patch
-# status: ready
-Patch1032: %{name}-5.4.9-rpmpython-fix-input.patch
-# status: ready
-Patch1033: %{name}-5.4.7-no-seqid_init-on-rdonly-database.patch
-# status: probably ready for merging
-Patch1034: %{name}-5.4.9-avoid-double-slash-in-path-for-dirname-filetrigger-matching.patch
-# status: probably ready to merge, discuss on rpm-devel first
-Patch1035: %{name}-5.4.9-fix-verify-segfault.patch
-# Due to rpmdav/neon being written in a different fashion than other rpmio clients,
-# the inconsistent behaviour affects code elsewhere which expects consistent behaviour,
-# with the result being that when unable to download files, neon will save error
-# page as the target file.
-# status: should go upstream, but uncertain about "correct" fix, ie. this is
-# more of a workaround, while rewriting rpmdav code to behave consistently
-# would be "the right thing to do". Yet I'm not fully able to grasp all of the
-# code and don't want to spend more time just to get the API..
-Patch1037: %{name}-5.4.10-fix-neon-saving-error-pages-as-target-file.patch
-# As the transaction flags for ignoring arch & os are no longer used, there's
-# currently no way to ignore arch & os of packages anymore. This patch adds
-# support for doing this again by defining rpm variables and overriding
-# --ignorearch & --ignoreos to set these.
-# status: needs to be discussed upstream before thinking about merging
-Patch1038: %{name}-5.4.10-support-ignore-arch-and-os-again.patch
-# status: ready for merge
-Patch1039: %{name}-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch
-# we want that patch too, a bit of builder infrastructure relies on NOSIGNATURES
-Patch1040: %{name}-5.4.9-support-signatures-and-digest-disablers.patch
-# lack insight on actual functionality, which anyways seems broken, so let's
-# disable it to avoid errors from berkeley db..
-# status: keep locally
-Patch1041: %{name}-5.4.9-disable-l10ndir.patch
-# status: ready for merge
-Patch1042: %{name}-5.4.9-fix-rpm_qa-pattern.patch
-# warning: introduces memory leak
-Patch1043: %{name}-5.4.12-copy-Value-string.patch
-Patch1044: %{name}-5.4.12-fix-rpmlua-print.patch
-Patch1045: %{name}-5.4.12-fix-rpmpython-module-import-init.patch
-Patch1046: %{name}-5.4.12-truncate-output-buffer-after-use.patch
-Patch1047: %{name}-5.4.13-perl-bindings-do-not-use-xmalloc.patch
-# proyvind:
-# there's a rpmdbchk tool I wrote a while back, which might help you. although
-# the incidents it's able to deal with is rather limited ATM... it might help
-# you out, if not and you'll be able to solve yer problem, you could take a
-# stab at adding support for fixing your specific problem to the util ;)
-# https://abf.io/openmandriva/rpm/raw/master/rpm-5.4.14-rpmdbchk.patch
-Patch1048: %{name}-5.4.14-rpmdbchk.patch
-# https://abf.io/openmandriva/rpm/raw/master/rpm-5.4.14-no-assert-abort-with-broken-headers.patch
-Patch1049: %{name}-5.4.14-no-assert-abort-with-broken-headers.patch
-
-Patch1050: python-libx32.patch
+Patch100: python-libx32.patch
URL: http://rpm5.org/
BuildRequires: %{reqdb_pkg}-devel >= %{reqdb_pkgver}
@@ -965,54 +845,6 @@ cd -
%patch91 -p1
%patch99 -p1
-%patch1000 -p1
-%patch1001 -p1
-%patch1002 -p1
-%patch1003 -p1
-%patch1004 -p1
-%patch1005 -p1
-%patch1006 -p1
-%patch1007 -p1
-%patch1008 -p1
-%patch1009 -p1
-%patch1010 -p1
-%patch1011 -p1
-%patch1012 -p1
-%patch1013 -p1
-%patch1014 -p1
-%patch1015 -p1
-%patch1016 -p1
-%patch1017 -p1
-%patch1019 -p1
-%patch1020 -p1
-%patch1021 -p1
-%patch1022 -p1
-%patch1024 -p1
-%patch1026 -p1
-%patch1027 -p1
-%patch1028 -p1
-%patch1029 -p1
-%patch1030 -p1
-%patch1031 -p1
-%patch1032 -p1
-%patch1033 -p1
-%patch1034 -p1
-%patch1035 -p1
-%patch1037 -p1
-%patch1038 -p1
-%patch1039 -p1
-%patch1040 -p1
-# don't delete, may be usefull if jbj descides to enable this again
-#%patch1041 -p1
-%patch1042 -p1
-%patch1043 -p1
-%patch1044 -p1
-%patch1045 -p1
-%patch1046 -p1
-%patch1047 -p1
-%patch1048 -p1
-%patch1049 -p1
-
%patch83 -p1
%patch92 -p1
%patch93 -p1
@@ -1022,7 +854,7 @@ cd -
%patch97 -p1
%patch98 -p1
-%patch1050 -p1
+%patch100 -p1
install %{SOURCE2} macros/pld.in
install %{SOURCE8} scripts/php.prov.in
diff --git a/rpm-5.4.10-dont-try-generate-rpmfc-dependencies-from-doc-files.patch b/rpm-5.4.10-dont-try-generate-rpmfc-dependencies-from-doc-files.patch
deleted file mode 100644
index 14275b3..0000000
--- a/rpm-5.4.10-dont-try-generate-rpmfc-dependencies-from-doc-files.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- rpm-5.4.10/lib/rpmfc.c.skip_doc~ 2012-07-28 17:19:43.136069278 +0200
-+++ rpm-5.4.10/lib/rpmfc.c 2012-07-28 17:25:16.778898168 +0200
-@@ -818,7 +818,17 @@ static int rpmfcSCRIPT(rpmfc fc)
- int i;
- int is_executable;
- int xx;
-- const char * defaultdocdir = NULL;
-+
-+ /* Don't generate dependencies from files shipped as documentation */
-+ if (!rpmExpandNumeric("%{_generate_dependencies_from_docdir}")) {
-+ const char * defaultdocdir = rpmExpand("%{?_defaultdocdir}", NULL);
-+ if (defaultdocdir == NULL || *defaultdocdir == '\0')
-+ defaultdocdir = strdup("/usr/share/doc");
-+ xx = !strncmp(fn+fc->brlen, defaultdocdir, strlen(defaultdocdir));
-+ defaultdocdir = _free(defaultdocdir) ;
-+ if (xx)
-+ return 0;
-+ }
-
- /* Extract dependencies only from files with executable bit set. */
- { struct stat sb, * st = &sb;
-@@ -904,20 +914,10 @@ static int rpmfcSCRIPT(rpmfc fc)
- (void) fclose(fp);
-
- if (fc->fcolor->vals[fc->ix] & RPMFC_PERL) {
-- defaultdocdir = rpmExpand("%{?_defaultdocdir}", NULL);
-- /* XXX coverity #1035723 */
-- /* XXX coverity #1035883 */
-- if (defaultdocdir == NULL || *defaultdocdir == '\0') {
-- defaultdocdir = _free(defaultdocdir);
-- defaultdocdir = xstrdup("/usr/share/doc");
-- }
--
-- if (strncmp(fn, defaultdocdir, strlen(defaultdocdir))) {
-- if (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)
-- xx = rpmfcHelper(fc, 'P', "perl");
-- if (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE))
-- xx = rpmfcHelper(fc, 'R', "perl");
-- }
-+ if (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)
-+ xx = rpmfcHelper(fc, 'P', "perl");
-+ if (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE))
-+ xx = rpmfcHelper(fc, 'R', "perl");
- } else
- if (fc->fcolor->vals[fc->ix] & RPMFC_PYTHON) {
- xx = rpmfcHelper(fc, 'P', "python");
-@@ -1009,8 +1013,6 @@ static int rpmfcSCRIPT(rpmfc fc)
- #endif
- }
-
--/*@-observertrans@*/
-- defaultdocdir = _free(defaultdocdir) ;
- /*@=observertrans@*/
- return 0;
- }
diff --git a/rpm-5.4.10-duplicate_files_terminate_build.patch b/rpm-5.4.10-duplicate_files_terminate_build.patch
deleted file mode 100644
index 8f4574b..0000000
--- a/rpm-5.4.10-duplicate_files_terminate_build.patch
+++ /dev/null
@@ -1,67 +0,0 @@
---- rpm-5.4.10/build/files.c.dups_terminate~ 2012-07-10 20:09:01.125249185 +0200
-+++ rpm-5.4.10/build/files.c 2012-07-10 20:09:01.135249061 +0200
-@@ -2917,7 +2917,8 @@ exit:
-
- /* auxiliary function for checkDuplicateFiles() */
- /* XXX need to pass Header because fi->h is NULL */
--static int fiIntersect(/*@null@*/ rpmfi fi1, /*@null@*/ rpmfi fi2, size_t buildrootL)
-+static int fiIntersect(/*@null@*/ rpmfi fi1, /*@null@*/ rpmfi fi2,
-+ size_t buildrootL, int _duplicate_files_terminate_build)
- /*@globals internalState @*/
- /*@modifies fi1, fi2, internalState @*/
- {
-@@ -2955,7 +2956,7 @@ static int fiIntersect(/*@null@*/ rpmfi
- he->tag = RPMTAG_NVRA;
- N2 = (headerGet(fi2->h, he, 0) ? he->p.str : NULL);
-
-- rpmlog(RPMLOG_WARNING,
-+ rpmlog(_duplicate_files_terminate_build ? RPMLOG_ERR : RPMLOG_WARNING,
- _("File(s) packaged into both %s and %s:\n%s"),
- N1, N2, rpmiobStr(dups));
-
-@@ -2972,7 +2973,8 @@ static int fiIntersect(/*@null@*/ rpmfi
- * @param spec spec file control structure
- * @return number of duplicate files
- */
--static int checkDuplicateFiles(Spec spec, size_t buildrootL)
-+static int checkDuplicateFiles(Spec spec, size_t buildrootL,
-+ int _duplicate_files_terminate_build)
- /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
- /*@modifies *spec->packages,
- rpmGlobalMacroContext, fileSystem, internalState @*/
-@@ -2997,7 +2999,7 @@ static int checkDuplicateFiles(Spec spec
- #endif
- if (fi2 == NULL) continue;
- (void) rpmfiSetHeader(fi2, pkg2->header);
-- n += fiIntersect(fi1, fi2, buildrootL);
-+ n += fiIntersect(fi1, fi2, buildrootL, _duplicate_files_terminate_build);
- (void) rpmfiSetHeader(fi2, NULL);
- fi2 = rpmfiFree(fi2);
- }
-@@ -3181,9 +3183,13 @@ rpmRC processBinaryFiles(Spec spec, int
- }
-
- if (res == RPMRC_OK) {
-+ int _duplicate_files_terminate_build =
-+ rpmExpandNumeric("%{?_duplicate_files_terminate_build}");
- if (checkUnpackagedFiles(spec) > 0)
- res = RPMRC_FAIL;
-- (void) checkDuplicateFiles(spec, buildrootL);
-+ if (checkDuplicateFiles(spec, buildrootL, _duplicate_files_terminate_build) > 0 &&
-+ _duplicate_files_terminate_build)
-+ res = RPMRC_FAIL;
- (void) checkUnpackagedSubdirs(spec, buildrootL);
- }
-
---- rpm-5.4.10/macros/mandriva.in.dups_terminate~ 2012-05-19 22:35:44.000000000 +0200
-+++ rpm-5.4.10/macros/mandriva.in 2012-07-10 20:13:41.582742985 +0200
-@@ -126,6 +126,9 @@ end\
- # use XZ to compress binary packages:
- %_binary_payload w5.xzdio
-
-+%_duplicate_files_terminate_build 1
-+
-+
- %_build_pkgcheck_set /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
- %_build_pkgcheck_srpm /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
- %_nonzero_exit_pkgcheck_terminate_build 1
diff --git a/rpm-5.4.10-files-listed-twice-terminates-build.patch b/rpm-5.4.10-files-listed-twice-terminates-build.patch
deleted file mode 100644
index 9fd555c..0000000
--- a/rpm-5.4.10-files-listed-twice-terminates-build.patch
+++ /dev/null
@@ -1,74 +0,0 @@
---- rpm-5.4.10/build/files.c.twice_terminate~ 2012-07-10 20:18:14.613329633 +0200
-+++ rpm-5.4.10/build/files.c 2012-07-10 20:18:14.677328833 +0200
-@@ -1329,7 +1329,7 @@ static rpmuint32_t getDigestAlgo(Header
- * @param h
- * @param isSrc
- */
--static void genCpioListAndHeader(/*@partial@*/ FileList fl,
-+static rpmRC genCpioListAndHeader(/*@partial@*/ FileList fl,
- rpmfi * fip, Header h, int isSrc)
- /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
- /*@modifies h, *fip, fl->processingFailed, fl->fileList,
-@@ -1349,6 +1349,7 @@ static void genCpioListAndHeader(/*@part
- rpmuint32_t dalgo = getDigestAlgo(h, isSrc);
- char buf[BUFSIZ];
- int i, xx;
-+ rpmRC rc = RPMRC_OK;
-
- memset(buf, 0, sizeof(buf)); /* XXX valgrind on rhel6 beta pickier */
-
-@@ -1377,9 +1378,14 @@ memset(buf, 0, sizeof(buf)); /* XXX valg
- /* file flags */
- flp[1].flags |= flp->flags;
-
-- if (!(flp[1].flags & RPMFILE_EXCLUDE))
-- rpmlog(RPMLOG_WARNING, _("File listed twice: %s\n"),
-+ if (!(flp[1].flags & RPMFILE_EXCLUDE)) {
-+ int terminate = rpmExpandNumeric("%{?_files_listed_twice_terminate_build}");
-+
-+ rpmlog(terminate ? RPMLOG_ERR : RPMLOG_WARNING, _("File listed twice: %s\n"),
- flp->fileURL);
-+ if (terminate)
-+ rc = RPMRC_FAIL;
-+ }
-
- /* file mode */
- if (S_ISDIR(flp->fl_mode)) {
-@@ -1792,6 +1798,8 @@ if (_rpmbuildFlags & 4) {
- fi = rpmfiFree(fi);
- /*@=compdef@*/
- }
-+
-+ return rc;
- }
-
- /**
-@@ -2514,7 +2522,8 @@ static rpmRC processPackageFiles(Spec sp
- "PartialHardlinkSets", "4.0.4-1");
-
- /* XXX should tags be added if filelist is empty? */
-- genCpioListAndHeader(&fl, &pkg->fi, pkg->header, 0);
-+ if (genCpioListAndHeader(&fl, &pkg->fi, pkg->header, 0) != RPMRC_OK)
-+ fl.processingFailed = 1;
-
- if (spec->timeCheck)
- timeCheck(spec->timeCheck, pkg->header);
-@@ -2828,7 +2837,7 @@ int processSourceFiles(Spec spec)
-
- /* XXX should tags be added if filelist is empty? */
- spec->fi = NULL;
-- genCpioListAndHeader(&fl, &spec->fi, spec->sourceHeader, 1);
-+ rc = genCpioListAndHeader(&fl, &spec->fi, spec->sourceHeader, 1);
-
- exit:
- *sfp = rpmiobFree(*sfp);
---- rpm-5.4.10/macros/mandriva.in.twice_terminate~ 2012-07-10 20:18:14.000000000 +0200
-+++ rpm-5.4.10/macros/mandriva.in 2012-07-10 20:18:32.060111516 +0200
-@@ -128,6 +128,7 @@ end\
-
- %_duplicate_files_terminate_build 1
- %_unpackaged_subdirs_terminate_build 0
-+%_files_listed_twice_terminate_build 1
-
- %_build_pkgcheck_set /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
- %_build_pkgcheck_srpm /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
diff --git a/rpm-5.4.10-fix-neon-saving-error-pages-as-target-file.patch b/rpm-5.4.10-fix-neon-saving-error-pages-as-target-file.patch
deleted file mode 100644
index 300a350..0000000
--- a/rpm-5.4.10-fix-neon-saving-error-pages-as-target-file.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- rpm-5.4.10/rpmio/rpmdav.c.dl_error~ 2012-07-06 17:39:19.000000000 +0200
-+++ rpm-5.4.10/rpmio/rpmdav.c 2012-07-11 19:49:00.504968365 +0200
-@@ -1722,6 +1722,7 @@ int davReq(FD_t ctrl, const char * httpC
- {
- urlinfo u;
- int rc = 0;
-+ const ne_status *status;
-
- assert(ctrl != NULL);
- u = (urlinfo) ctrl->u;
-@@ -1789,10 +1790,24 @@ assert(ctrl->req != NULL);
- }
-
- /* XXX somewhere else instead? */
--if (_dav_debug) {
-- const ne_status *status = ne_get_status((ne_request *)ctrl->req);
--fprintf(stderr, "HTTP request sent, awaiting response... %d %s\n", status->code, status->reason_phrase);
--}
-+ status = ne_get_status((ne_request *)ctrl->req);
-+ if (_dav_debug)
-+ fprintf(stderr, "HTTP request sent, awaiting response... %d %s\n", status->code, status->reason_phrase);
-+
-+ switch (status->code) {
-+ case 200:
-+ case 201: /* 201 Created. */
-+ break;
-+ case 204: /* HACK: if overwriting, 204 No Content. */
-+ case 403: /* 403 Forbidden. */
-+ rc = FTPERR_UNKNOWN;
-+ break;
-+ default:
-+ rc = FTPERR_FILE_NOT_FOUND;
-+ break;
-+ }
-+ if (rc || _dav_debug)
-+ fprintf(stderr, "HTTP request sent, awaiting response... %d %s\n", status->code, status->reason_phrase);
-
- if (rc)
- goto errxit;
diff --git a/rpm-5.4.10-support-ignore-arch-and-os-again.patch b/rpm-5.4.10-support-ignore-arch-and-os-again.patch
deleted file mode 100644
index 0708d04..0000000
--- a/rpm-5.4.10-support-ignore-arch-and-os-again.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- rpm-5.4.10/lib/depends.c.ignore_arch~ 2012-07-27 21:11:47.463139875 +0200
-+++ rpm-5.4.10/lib/depends.c 2012-07-27 21:29:21.811958701 +0200
-@@ -587,11 +587,24 @@ int rpmtsAddInstallElement(rpmts ts, Hea
- if (nplatpat > 1) {
- const char * platform = NULL;
-
-- he->tag = RPMTAG_PLATFORM;
-- xx = headerGet(h, he, 0);
-- platform = he->p.str;
-- if (!xx || platform == NULL)
-- platform = rpmExpand(arch, "-unknown-", os, NULL);
-+ /*
-+ * If ignore arch, we just set the arch in package platform string to
-+ * same as on system so that we're sure that it'll match, same goes for
-+ * os as well.
-+ */
-+ if (rpmExpandNumeric("%{__ignore_arch}") || rpmExpandNumeric("%{__ignore_os}")) {
-+ platform = rpmExpand(
-+ rpmExpandNumeric("%{__ignore_arch}") ? "%{_target_cpu}" : arch,
-+ "-unknown-",
-+ rpmExpandNumeric("%{__ignore_os}") ? "%{_target_os}" : os,
-+ NULL);
-+ } else {
-+ he->tag = RPMTAG_PLATFORM;
-+ xx = headerGet(h, he, 0);
-+ platform = he->p.str;
-+ if (!xx || platform == NULL)
-+ platform = rpmExpand(arch, "-unknown-", os, NULL);
-+ }
-
- rc = rpmPlatformScore(platform, platpat, nplatpat);
- #if defined(RPM_VENDOR_MANDRIVA)
---- rpm-5.4.10/rpmpopt.in.ignore_arch~ 2012-07-27 21:29:07.687135285 +0200
-+++ rpm-5.4.10/rpmpopt.in 2012-07-27 21:29:35.399788829 +0200
-@@ -431,6 +431,10 @@ rpm alias --without --define "_without_
-
- rpm alias --arch --qf '%-34{=NAME}\t%{ARCH}\n' \
- --POPTdesc=$"list package architecture"
-+
-+rpm alias --ignorearch --define '__ignore_arch 1'
-+rpm alias --ignoreos --define '__ignore_os 1'
-+
- #==============================================================================
- rpmbuild alias --dbpath --define '_dbpath !#:+' \
- --POPTdesc=$"use database in DIRECTORY" \
diff --git a/rpm-5.4.10-unpackaged_subdirs_terminate_build.patch b/rpm-5.4.10-unpackaged_subdirs_terminate_build.patch
deleted file mode 100644
index 2e7c5b8..0000000
--- a/rpm-5.4.10-unpackaged_subdirs_terminate_build.patch
+++ /dev/null
@@ -1,67 +0,0 @@
---- rpm-5.4.10/build/files.c.subdir_terminate~ 2012-07-10 20:14:36.357058212 +0200
-+++ rpm-5.4.10/build/files.c 2012-07-10 20:14:36.367058087 +0200
-@@ -3025,7 +3025,7 @@ static inline int packagedDir(Package pk
- * /A/B/C/D
- * Now directories "/A/B" and "/A/B/C" should also be packaged.
- */
--static int pkgUnpackagedSubdirs(Package pkg, size_t buildrootL)
-+static int pkgUnpackagedSubdirs(Package pkg, size_t buildrootL, int _unpackaged_subdirs_terminate_build)
- /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
- /*@modifies pkg->header,
- rpmGlobalMacroContext, fileSystem, internalState @*/
-@@ -3103,7 +3103,7 @@ static int pkgUnpackagedSubdirs(Package
- }
- unpackaged = _free(unpackaged);
-
-- rpmlog(RPMLOG_WARNING,
-+ rpmlog(_unpackaged_subdirs_terminate_build ? RPMLOG_ERR : RPMLOG_WARNING,
- _("Unpackaged subdir(s) in %s:\n%s"),
- N, rpmiobStr(list));
-
-@@ -3119,7 +3119,7 @@ static int pkgUnpackagedSubdirs(Package
- * @param spec spec file control structure
- * @return number of unpackaged subdirectories
- */
--static int checkUnpackagedSubdirs(Spec spec, size_t buildrootL)
-+static int checkUnpackagedSubdirs(Spec spec, size_t buildrootL, int _unpackaged_subdirs_terminate_build)
- /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
- /*@modifies *spec->packages,
- rpmGlobalMacroContext, fileSystem, internalState @*/
-@@ -3128,7 +3128,7 @@ static int checkUnpackagedSubdirs(Spec s
- Package pkg;
-
- for (pkg = spec->packages; pkg; pkg = pkg->next)
-- n += pkgUnpackagedSubdirs(pkg, buildrootL);
-+ n += pkgUnpackagedSubdirs(pkg, buildrootL, _unpackaged_subdirs_terminate_build);
- return n;
- }
-
-@@ -3185,12 +3185,16 @@ rpmRC processBinaryFiles(Spec spec, int
- if (res == RPMRC_OK) {
- int _duplicate_files_terminate_build =
- rpmExpandNumeric("%{?_duplicate_files_terminate_build}");
-+ int _unpackaged_subdirs_terminate_build =
-+ rpmExpandNumeric("%{?_unpackaged_subdirs_terminate_build}");
- if (checkUnpackagedFiles(spec) > 0)
- res = RPMRC_FAIL;
- if (checkDuplicateFiles(spec, buildrootL, _duplicate_files_terminate_build) > 0 &&
- _duplicate_files_terminate_build)
- res = RPMRC_FAIL;
-- (void) checkUnpackagedSubdirs(spec, buildrootL);
-+ if (checkUnpackagedSubdirs(spec, buildrootL, _unpackaged_subdirs_terminate_build) > 0 &&
-+ _unpackaged_subdirs_terminate_build)
-+ res = RPMRC_FAIL;
- }
-
- return res;
---- rpm-5.4.10/macros/mandriva.in.subdir_terminate~ 2012-07-10 20:14:36.000000000 +0200
-+++ rpm-5.4.10/macros/mandriva.in 2012-07-10 20:14:57.333795967 +0200
-@@ -127,7 +127,7 @@ end\
- %_binary_payload w5.xzdio
-
- %_duplicate_files_terminate_build 1
--
-+%_unpackaged_subdirs_terminate_build 0
-
- %_build_pkgcheck_set /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
- %_build_pkgcheck_srpm /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
diff --git a/rpm-5.4.12-copy-Value-string.patch b/rpm-5.4.12-copy-Value-string.patch
deleted file mode 100644
index fb2af38..0000000
--- a/rpm-5.4.12-copy-Value-string.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-5.4.12/build/expression.c.strdup~ 2013-07-31 18:10:52.556444318 +0200
-+++ rpm-5.4.12/build/expression.c 2013-07-31 18:10:30.794081121 +0200
-@@ -63,7 +63,7 @@ static Value valueMakeString(/*@only@*/
-
- v = (Value) xmalloc(sizeof(*v));
- v->type = VALUE_TYPE_STRING;
-- v->data.s = s;
-+ v->data.s = xstrdup(s);
- return v;
- }
-
diff --git a/rpm-5.4.12-fix-rpmlua-print.patch b/rpm-5.4.12-fix-rpmlua-print.patch
deleted file mode 100644
index 4129ec4..0000000
--- a/rpm-5.4.12-fix-rpmlua-print.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- rpm-5.4.12/misc/librpmmisc.vers.rpmluaprint~ 2013-08-08 18:23:58.367842414 +0200
-+++ rpm-5.4.12/misc/librpmmisc.vers 2013-08-08 18:20:25.019996866 +0200
-@@ -36,6 +36,7 @@ LIBRPMMISC_0
- lua_gettop;
- lua_isnumber;
- lua_isstring;
-+ lua_setglobal;
- luaL_argerror;
- luaL_checklstring;
- luaL_error;
---- rpm-5.4.12/rpmio/rpmlua.c.rpmluaprint~ 2013-08-08 18:23:06.755942297 +0200
-+++ rpm-5.4.12/rpmio/rpmlua.c 2013-08-08 18:23:32.325390087 +0200
-@@ -207,8 +207,8 @@ rpmlua rpmluaNew(void)
- #else
- lua_pushglobaltable(L);
- #endif
-- lua_pushliteral(L, "print");
- lua_pushcfunction(L, rpm_print);
-+ lua_setglobal(L, "print");
-
- #if defined(LUA_GLOBALSINDEX)
- lua_rawset(L, LUA_GLOBALSINDEX);
diff --git a/rpm-5.4.12-fix-rpmpython-module-import-init.patch b/rpm-5.4.12-fix-rpmpython-module-import-init.patch
deleted file mode 100644
index fb4c0df..0000000
--- a/rpm-5.4.12-fix-rpmpython-module-import-init.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- rpm-5.4.12/rpmio/rpmpython.c.modload~ 2013-08-08 21:39:28.605164699 +0200
-+++ rpm-5.4.12/rpmio/rpmpython.c 2013-08-08 21:39:10.913948618 +0200
-@@ -66,9 +66,9 @@ static rpmpython rpmpythonGetPool(/*@nul
- /*@unchecked@*/
- #if defined(MODULE_EMBED)
- static const char * _rpmpythonI_init = "\
--import sys\n\
--from cStringIO import StringIO\n\
--sys.stdout = StringIO()\n\
-+import sys;\
-+from cStringIO import StringIO;\
-+sys.stdout = StringIO();\
- ";
- #endif
-
diff --git a/rpm-5.4.12-truncate-output-buffer-after-use.patch b/rpm-5.4.12-truncate-output-buffer-after-use.patch
deleted file mode 100644
index ff3b418..0000000
--- a/rpm-5.4.12-truncate-output-buffer-after-use.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-5.4.12/rpmio/rpmpython.c.rpmpythontrunc~ 2013-08-09 03:05:39.809947086 +0200
-+++ rpm-5.4.12/rpmio/rpmpython.c 2013-08-09 03:25:25.097372593 +0200
-@@ -229,6 +229,8 @@ fprintf(stderr, "==> %s(%p,%s,%p)\n", __
- if (sys_stdout != NULL && PycStringIO_OutputCheck(sys_stdout)) {
- PyObject * o = (*PycStringIO->cgetvalue)(sys_stdout);
- *resultp = (PyString_Check(o) ? PyString_AsString(o) : "");
-+ PyObject_CallMethod(sys_stdout, "seek", "i",0);
-+ PyObject_CallMethod(sys_stdout, "truncate", NULL);
- } else
- *resultp = "";
- }
diff --git a/rpm-5.4.13-perl-bindings-do-not-use-xmalloc.patch b/rpm-5.4.13-perl-bindings-do-not-use-xmalloc.patch
deleted file mode 100644
index 9eff10f..0000000
--- a/rpm-5.4.13-perl-bindings-do-not-use-xmalloc.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- rpm-5.4.13/perl/RPM_Spec.xs.xmalloc~ 2013-09-13 06:20:58.102257264 +0200
-+++ rpm-5.4.13/perl/RPM_Spec.xs 2013-09-13 06:21:28.680226625 +0200
-@@ -234,7 +234,7 @@ icon(spec)
- char * dest = NULL;
- int len;
- len = strlen(spec->sources->source);
-- dest = xmalloc(len+1);
-+ dest = malloc(len+1);
- dest[len] = '\0';
- memcpy(dest, spec->sources->source, len);
- XPUSHs(sv_2mortal(newSVpv(dest, len)));
-@@ -249,7 +249,7 @@ icon_url(spec)
- char * dest = NULL;
- int len;
- len = strlen(spec->sources->fullSource);
-- dest = xmalloc(len+1);
-+ dest = malloc(len+1);
- memcpy(dest, spec->sources->fullSource, len);
- dest[len] = '\0';
- XPUSHs(sv_2mortal(newSVpv(dest, len)));
diff --git a/rpm-5.4.14-no-assert-abort-with-broken-headers.patch b/rpm-5.4.14-no-assert-abort-with-broken-headers.patch
deleted file mode 100644
index 0b9278e..0000000
--- a/rpm-5.4.14-no-assert-abort-with-broken-headers.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-5.4.14/rpmdb/header.c.noassert~ 2014-06-25 19:22:35.521902207 +0200
-+++ rpm-5.4.14/rpmdb/header.c 2014-06-25 19:22:37.381920455 +0200
-@@ -1076,7 +1076,7 @@ assert(h != NULL);
- rpmuint32_t * stei = (rpmuint32_t *)
- memcpy(alloca(nb), dataStart + off, nb);
- rdl = (rpmuint32_t)-ntohl(stei[2]); /* negative offset */
--assert((rpmint32_t)rdl >= 0); /* XXX insurance */
-+//assert((rpmint32_t)rdl >= 0); /* XXX insurance */
- ril = (rpmuint32_t)(rdl/sizeof(*pe));
- if (hdrchkTags(ril) || hdrchkData(rdl))
- goto errxit;
diff --git a/rpm-5.4.14-rpmdbchk.patch b/rpm-5.4.14-rpmdbchk.patch
deleted file mode 100644
index 3587b1d..0000000
--- a/rpm-5.4.14-rpmdbchk.patch
+++ /dev/null
@@ -1,334 +0,0 @@
---- rpm-5.4.14/tools/Makefile.am.rpmdbchk~ 2013-08-18 21:40:58.000000000 +0200
-+++ rpm-5.4.14/tools/Makefile.am 2014-02-17 17:52:10.032157038 +0100
-@@ -33,7 +33,7 @@ EXTRA_PROGRAMS += augtool cudftool dbcon
- nix-build nix-channel nix-collect-garbage \
- nix-log2xml nix-prefetch-url nix-pull nix-push \
- xiu-echo xiu-hash \
-- roto rpmkey sandbox semodule spooktool
-+ roto rpmdbchk rpmkey sandbox semodule spooktool
-
- RPMMISC_LDADD_COMMON = \
- $(top_builddir)/misc/librpmmisc.la \
-@@ -64,7 +64,7 @@ pkgbin_PROGRAMS = \
- rpmcache rpmdigest rpmrepo rpmspecdump \
- rpmcmp rpmdeps sqlite3 @WITH_KEYUTILS_RPMKEY@ @WITH_LIBELF_DEBUGEDIT@
- if WITH_DB
--pkgbin_PROGRAMS += dbconvert
-+pkgbin_PROGRAMS += dbconvert rpmdbchk
- endif
- dist_man_MANS = rpmgrep.1
-
-@@ -234,6 +234,13 @@ rpm2cpio_LDFLAGS = @LDFLAGS_STATIC@ $(LD
- rpm2cpio_LDADD = $(LDFLAGS) $(RPM_LDADD_COMMON)
-
- ##
-+## rpmdbchk tool for finding and fixing broken headers
-+##
-+rpmdbchk_SOURCES = rpmdbchk.c
-+rpmdbchk_LDFLAGS = @LDFLAGS_STATIC@ $(LDFLAGS)
-+rpmdbchk_LDADD = $(LDFLAGS) $(RPM_LDADD_COMMON)
-+
-+##
- ## keyctl(1) clone
- ##
- rpmkey_SOURCES = rpmkey.c
---- rpm-5.4.14/tools/rpmdbchk.c.rpmdbchk~ 2014-02-17 17:52:10.032157038 +0100
-+++ rpm-5.4.14/tools/rpmdbchk.c 2014-02-17 17:52:28.846342856 +0100
-@@ -0,0 +1,297 @@
-+#include <arpa/inet.h>
-+#include <stdint.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <fcntl.h>
-+#include <errno.h>
-+#include <popt.h>
-+
-+#include <rpmio.h>
-+#include <rpmlog.h>
-+#include <rpmmacro.h>
-+#include <argv.h>
-+
-+#define _RPMTAG_INTERNAL
-+#define _RPMDB_INTERNAL
-+#define WITH_DB
-+#include <rpmdb.h>
-+
-+#include <rpmts.h>
-+#include <rpmrc.h>
-+#include <pkgio.h>
-+#include <rpmcli.h>
-+
-+static char *rootPath = NULL;
-+static char *rpmdbPath = NULL;
-+static int checkOnly = 0;
-+
-+struct node {
-+ uint32_t state;
-+ uint32_t keysize;
-+ void *keydata;
-+ struct node *next;
-+};
-+
-+static int
-+rpmdb_check(uint32_t **state, uint32_t *nkeys, struct node **broken)
-+{
-+ rpmts ts = NULL;
-+ DBC *dbcp = NULL;
-+ dbiIndex dbi = NULL;
-+ DBT key;
-+ DBT data;
-+ DB_TXN *txnid = NULL;
-+ DB *bdb;
-+
-+ uint32_t hdrNum = 0;
-+ uint32_t damaged = 0;
-+ float pct = 0;
-+ uint8_t tmp;
-+
-+ int xx;
-+
-+ ts = rpmtsCreate();
-+
-+ rpmtsSetRootDir(ts, rootPath && rootPath[0] ? rootPath : NULL);
-+ if(rpmtsOpenDB(ts, O_RDONLY))
-+ goto exit;
-+
-+ dbi = dbiOpen(rpmtsGetRdb(ts), RPMDBI_PACKAGES, 0);
-+
-+ if ((xx = dbiCopen(dbi, NULL, NULL, 0)))
-+ goto exit;
-+
-+ txnid = dbiTxnid(dbi);
-+ *nkeys = 0;
-+
-+ memset(&key, 0, sizeof(key));
-+ memset(&data, 0, sizeof(data));
-+ bdb = dbi->dbi_db;
-+
-+ /* Acquire a cursor for the database. */
-+ xx = bdb->cursor(bdb, NULL, &dbcp, 0);
-+ if (xx)
-+ bdb->err(bdb, xx, "DB->cursor");
-+
-+ xx = bdb->stat(bdb, txnid, &dbi->dbi_stats, 0);
-+ if (xx)
-+ goto exit;
-+
-+ switch (bdb->type) {
-+ case DB_BTREE:
-+ case DB_RECNO:{
-+ DB_BTREE_STAT *db_stat = dbi->dbi_stats;
-+ *nkeys = db_stat->bt_nkeys;
-+ } break;
-+ case DB_HASH:{
-+ DB_HASH_STAT *db_stat = dbi->dbi_stats;
-+ *nkeys = db_stat->hash_nkeys;
-+ } break;
-+ case DB_QUEUE:{
-+ DB_QUEUE_STAT *db_stat = dbi->dbi_stats;
-+ *nkeys = db_stat->qs_nkeys;
-+ } break;
-+ case DB_UNKNOWN:
-+ default:
-+ xx = -1;
-+ goto exit;
-+ break;
-+ }
-+ uint32_t *status = calloc(*nkeys, sizeof(uint32_t));
-+ struct node *curr;
-+
-+ hdrNum = 0;
-+ pct = 0;
-+
-+ while ((xx = dbcp->c_get(dbcp, &key, &data, DB_NEXT)) == 0) {
-+ tmp = pct;
-+ pct = (100 * (float) ++hdrNum / *nkeys) + 0.5;
-+ /* TODO: callbacks for status output? */
-+ if (tmp < (int) (pct + 0.5)) {
-+ fprintf(stderr, "\rchecking %s%s/Packages: %u/%u %d%%",
-+ rootPath && rootPath[0] ? rootPath : "",
-+ rpmdbPath, hdrNum, *nkeys, (int) pct);
-+ }
-+ const char *msg = NULL;
-+ int lvl = headerCheck(rpmtsDig(ts), data.data, data.size, &msg);
-+ rpmtsCleanDig(ts);
-+ if (lvl == RPMRC_FAIL) {
-+ status[hdrNum-1] = htonl(*(uint32_t*)(dbcp->rkey->data));
-+ damaged++;
-+ fprintf(stderr, "\n%d (%d): %s\n", hdrNum-1, status[hdrNum-1], msg);
-+ } else if (key.size != sizeof(hdrNum)) {
-+ curr = malloc(sizeof(struct node));
-+ curr->state = htonl(*(uint32_t*)(dbcp->rkey->data));
-+ curr->keysize = key.size;
-+ curr->keydata = malloc(key.size);
-+ memcpy(curr->keydata, key.data, key.size);
-+ curr->next = *broken;
-+ *broken = curr;
-+ status[hdrNum-1] = -1;
-+ damaged++;
-+ fprintf(stderr, "\n%d: %s (key.size(%d) != %d)\n", hdrNum-1, msg, key.size, sizeof(hdrNum));
-+ } else
-+ status[hdrNum-1] = -1;
-+ fflush(stderr);
-+ }
-+
-+ fprintf(stderr, "\n");
-+
-+
-+ *state = status;
-+ xx = dbiCclose(dbi, dbcp, 0);
-+
-+exit:
-+ xx = rpmtsCloseDB(ts);
-+ ts = rpmtsFree(ts);
-+
-+ return damaged;
-+}
-+
-+static int
-+rpmdb_dump_delete(DB *dbp, const char *db, const char *lost, DBT *key, uint32_t n) {
-+ int gotrec;
-+ int ret = 0;
-+ DBT data;
-+
-+ memset(&data, 0, sizeof(data));
-+
-+ if ((ret = dbp->get(dbp, NULL, key, &data, 0)) == 0) {
-+ char copy[1024];
-+ snprintf(copy, sizeof(copy), "%s/header.%d", lost, n);
-+ FILE *fp = fopen(copy, "w");
-+ fwrite(data.data, data.size, 1, fp);
-+ fclose(fp);
-+ gotrec = 0;
-+ memcpy(&gotrec, key->data, sizeof(gotrec));
-+ printf("db: get key: %p[%d] = 0x%x, data at %p[%d].\n",
-+ (char *)key->data, key->size, gotrec,
-+ (char *)data.data, data.size);
-+ printf("Dumping broken header to disk: %s\n", copy);
-+ } else {
-+ dbp->err(dbp, ret, "DB->get");
-+ if (ret == DB_NOTFOUND)
-+ return 0;
-+ return ret;
-+ }
-+
-+ if ((ret = dbp->del(dbp, NULL, key, 0)) == 0) {
-+ gotrec = 0;
-+ memcpy(&gotrec, key->data, sizeof(gotrec));
-+ printf("db: del key: %p[%d] = 0x%x, data at %p[%d].\n",
-+ (char *)key->data, key->size, gotrec,
-+ (char *)data.data, data.size);
-+ } else {
-+ dbp->err(dbp, ret, "DB->del");
-+ return ret;
-+ }
-+ return 0;
-+}
-+
-+static int
-+rpmdb_fix(uint32_t *state, uint32_t nkeys, struct node *broken)
-+{
-+ DB * dbp;
-+ DBT key;
-+ struct stat sb;
-+ const char * db = rpmGetPath(rootPath && rootPath[0] ? rootPath : "", rpmdbPath, "/Packages", NULL);
-+ const char * lost = rpmGetPath(rootPath && rootPath[0] ? rootPath : "", rpmdbPath, "/broken", NULL);
-+ int ret, t_ret;
-+ uint32_t i;
-+
-+
-+ if ((ret = db_create(&dbp, NULL, 0)) != 0) {
-+ fprintf(stderr, "db_create: %s\n", db_strerror(ret));
-+ exit (1);
-+ }
-+
-+ if (Stat(lost, &sb))
-+ Mkdir(lost, 0700);
-+
-+ if ((ret = dbp->open(dbp, NULL, db, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
-+ dbp->err(dbp, ret, "%s", db);
-+ goto err;
-+ }
-+
-+ for (i = 0; i < nkeys; i++) {
-+ if (state[i] == -1) continue;
-+ int badrec, badrec2;
-+ memset(&key, 0, sizeof(key));
-+ badrec2 = state[i];
-+ badrec = htonl(badrec2);
-+ printf("fix record[%d] at #%d/#%d --\n", i, badrec2, badrec);
-+ key.data = &badrec;
-+ key.size = sizeof(badrec);
-+
-+ ret = rpmdb_dump_delete(dbp, db, lost, &key, state[i]);
-+ }
-+
-+ while (broken) {
-+ memset(&key, 0, sizeof(key));
-+ key.size = broken->keysize;
-+ key.data = broken->keydata;
-+ ret = rpmdb_dump_delete(dbp, db, lost, &key, broken->state);
-+ free(broken->keydata);
-+ free(broken);
-+ broken = broken->next;
-+ }
-+
-+
-+err:
-+ if ((t_ret = dbp->close(dbp, 0)) != 0 && ret == 0)
-+ ret = t_ret;
-+ _free(db);
-+ _free(lost);
-+
-+ return 0;
-+}
-+
-+static struct poptOption optionsTable[] = {
-+ { "root", '\0', POPT_ARG_STRING, &rootPath, 0,
-+ "rpm root path", "path"},
-+ { "dbpath", '\0', POPT_ARG_STRING, &rpmdbPath, 0,
-+ "rpmdb path", "path"},
-+ { "checkonly", '\0', POPT_ARG_VAL, &checkOnly, 1,
-+ "only check, don't fix anything", NULL},
-+
-+ POPT_AUTOALIAS
-+ POPT_AUTOHELP
-+ POPT_TABLEEND
-+};
-+
-+int main(int argc, char *argv[])
-+{
-+ poptContext optCon = rpmcliInit(argc, argv, optionsTable);
-+ ARGV_t av = poptGetArgs(optCon);
-+ int ac = argvCount(av);
-+ int rc = 2; /* assume failure */
-+ uint32_t nkeys = 0;
-+ uint32_t *state = NULL;
-+ struct node *broken = NULL;
-+
-+ if (ac) {
-+ poptPrintUsage(optCon, stderr, 0);
-+ goto exit;
-+ }
-+
-+ rc = rpmReadConfigFiles(NULL, NULL);
-+
-+ if(!rpmdbPath)
-+ rpmdbPath = rpmExpand("%{?_dbpath}%{?!_dbpath:/var/lib/rpm}", NULL);
-+ else
-+ addMacro(NULL, "_dbpath", NULL, rpmdbPath, -1);
-+
-+
-+ rc = rpmdb_check(&state, &nkeys, &broken);
-+ printf("%d/%d (%f%%) headers damaged", rc, nkeys, (float)rc/nkeys);
-+ printf("\n");
-+ if (!checkOnly && rc) {
-+ printf("fixing...\n");
-+ rc = rpmdb_fix(state, nkeys, broken);
-+ }
-+
-+exit:
-+ _free(state);
-+ optCon = rpmcliFini(optCon);
-+ return rc;
-+}
diff --git a/rpm-5.4.4-add-_specfile-macro.patch b/rpm-5.4.4-add-_specfile-macro.patch
deleted file mode 100644
index 723a17a..0000000
--- a/rpm-5.4.4-add-_specfile-macro.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- rpm-5.4.4/build/parseSpec.c.specfile~ 2011-11-11 13:41:29.137827186 +0100
-+++ rpm-5.4.4/build/parseSpec.c 2011-11-11 13:42:12.938874762 +0100
-@@ -542,6 +542,7 @@ int parseSpec(rpmts ts, const char *spec
- * /.././../usr/../bin//./sh (XXX FIXME: dots not handled yet)
- */
- spec->specFile = rpmGetPath(specFile, NULL);
-+ addMacro(spec->macros, "_specfile", NULL, spec->specFile, RMIL_SPEC);
- spec->fileStack = newOpenFileInfo();
- spec->fileStack->fileName = xstrdup(spec->specFile);
-
diff --git a/rpm-5.4.4-allow-installation-of-repackaged-rpms.patch b/rpm-5.4.4-allow-installation-of-repackaged-rpms.patch
deleted file mode 100644
index 545929a..0000000
--- a/rpm-5.4.4-allow-installation-of-repackaged-rpms.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-5.4.4/rpmdb/rpmdb.c.repackage~ 2011-11-24 16:28:22.436460713 +0100
-+++ rpm-5.4.4/rpmdb/rpmdb.c 2011-11-24 16:28:30.107464575 +0100
-@@ -2758,7 +2758,7 @@ int rpmdbAdd(rpmdb db, int iid, Header h
- if (_rpmdb_debug)
- fprintf(stderr, "--> %s(%p, %u, %p, %p) h# %u\n", __FUNCTION__, db, (unsigned)iid, h, ts, (unsigned)hdrNum);
-
--assert(headerIsEntry(h, RPMTAG_REMOVETID) == 0); /* XXX sanity */
-+//assert(headerIsEntry(h, RPMTAG_REMOVETID) == 0); /* XXX sanity */
-
- /* Add the install transaction id. */
- if (iid != 0 && iid != -1) {
diff --git a/rpm-5.4.4-drop-useless-auto-generated-pkgconfig-dependency.patch b/rpm-5.4.4-drop-useless-auto-generated-pkgconfig-dependency.patch
deleted file mode 100644
index 1da18fe..0000000
--- a/rpm-5.4.4-drop-useless-auto-generated-pkgconfig-dependency.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- rpm-5.4.4/scripts/pkgconfigdeps.sh.oneshot~ 2011-12-11 01:40:12.599487103 +0100
-+++ rpm-5.4.4/scripts/pkgconfigdeps.sh 2011-12-11 01:40:14.418488230 +0100
-@@ -37,12 +37,10 @@ case $1 in
- done
- ;;
- -R|--requires)
-- oneshot="pkgconfig"
- while read filename ; do
- case "${filename}" in
- *.pc)
- if [[ "$(dirname ${filename})" =~ pkgconfig ]]; then
-- [ -n "$oneshot" ] && echo "$oneshot"; oneshot=""
- # Query the dependencies of the package.
- DIR=`dirname ${filename}`
- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
-@@ -54,7 +52,6 @@ case $1 in
- else
- echo "pkgconfig($n)"
- fi
-- oneshot=""
- done
- fi
- ;;
diff --git a/rpm-5.4.4-fix-rpmconstant-to-always-use-LC_CTYPE-C-for-case-conversion.patch b/rpm-5.4.4-fix-rpmconstant-to-always-use-LC_CTYPE-C-for-case-conversion.patch
deleted file mode 100644
index ce1e804..0000000
--- a/rpm-5.4.4-fix-rpmconstant-to-always-use-LC_CTYPE-C-for-case-conversion.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- rpm-5.4.4/rpmconstant/rpmconstant.c.locale~ 2008-08-18 12:57:58.000000000 +0200
-+++ rpm-5.4.4/rpmconstant/rpmconstant.c 2011-12-16 16:41:27.721549143 +0100
-@@ -89,7 +89,7 @@ int rpmconstInitToContext(rpmconst c, co
- int rc = 0;
- if (!context) return 0; /* programmer error */
- for (ptr = lccontext; *ptr != 0; ptr++)
-- *ptr = (char)tolower(*ptr);
-+ *ptr = (char)xtolower(*ptr);
- rpmconstInitL(c);
- while (rpmconstNextL(c)) {
- if (!strcmp(lccontext, rpmconstContext(c))) {
-@@ -108,7 +108,7 @@ int rpmconstNameMatch(rpmconst c, const
- char * ucname = strdup(name);
-
- for (uc = ucname; *uc != 0; uc++)
-- *uc = (char)toupper(*uc);
-+ *uc = (char)xtoupper(*uc);
-
- if (!prefixed) prefixed = ALLCASE_PREFIX;
- if (prefixed & WITH_PREFIX)
diff --git a/rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch b/rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch
deleted file mode 100644
index 6d81cf4..0000000
--- a/rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- rpm-5.4.4/lib/transaction.c.epoch_cmp~ 2011-11-30 22:25:26.646155379 +0100
-+++ rpm-5.4.4/lib/transaction.c 2011-11-30 23:15:28.252768345 +0100
-@@ -1187,12 +1187,15 @@ rpmlog(RPMLOG_DEBUG, D_("sanity checking
- const char *val = NULL;
- he->tag = tags[t];
- xx = headerGet(h, he, 0);
-- if (he->tag == RPMTAG_EPOCH)
-+ if (he->tag == RPMTAG_EPOCH) {
- val = rpmteE(p);
-- else if (he->tag == RPMTAG_DISTEPOCH)
-+ if (val ? atoi(val) : 0 != he->p.ui32p ? *(he->p.ui32p) : 0)
-+ nkeys--;
-+ } else if (he->tag == RPMTAG_DISTEPOCH) {
- val = rpmteD(p);
-- if (strcmp(he->p.str ? he->p.str : "", val ? val : ""))
-- nkeys--;
-+ if (strcmp(he->p.str ? he->p.str : "", val ? val : ""))
-+ nkeys--;
-+ }
- he->p.ptr = _free(he->p.ptr);
- }
- mi = rpmmiFree(mi);
diff --git a/rpm-5.4.4-glob-wildcards-for-loading-macro-files.patch b/rpm-5.4.4-glob-wildcards-for-loading-macro-files.patch
deleted file mode 100644
index 67a1c2b..0000000
--- a/rpm-5.4.4-glob-wildcards-for-loading-macro-files.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- rpm-5.4.4/rpmio/macro.c.glob~ 2011-09-30 20:40:18.000000000 +0200
-+++ rpm-5.4.4/rpmio/macro.c 2011-11-17 16:49:16.870465121 +0100
-@@ -2798,6 +2798,9 @@ rpmLoadMacroFile(MacroContext mc, const
- /* Parse %{load:...} immediately recursively. */
- if (s[1] == '{' && !strncmp(s+2, "load:", sizeof("load:")-1)) {
- char * se = (char *) matchchar(s, '{', '}');
-+ const char ** argv = NULL;
-+ int argc = 0;
-+ int i;
- if (se == NULL) {
- rpmlog(RPMLOG_WARNING,
- _("%s:%u Missing '}' in \"%s\", skipping.\n"),
-@@ -2814,7 +2817,10 @@ rpmLoadMacroFile(MacroContext mc, const
- continue;
- }
- se = rpmMCExpand(mc, s, NULL);
-- rc = rpmLoadMacroFile(mc, se, nesting - 1);
-+ rc = rpmGlob(se, &argc, &argv);
-+ for(i = 0; i < argc; i++)
-+ rc |= rpmLoadMacroFile(mc, argv[i], nesting - 1);
-+ argv = _free(argv);
- se = _free(se);
- if (rc != 0)
- goto exit;
diff --git a/rpm-5.4.4-pass-_builddir-properly-to-find-debuginfo.patch b/rpm-5.4.4-pass-_builddir-properly-to-find-debuginfo.patch
deleted file mode 100644
index 9dd9a29..0000000
--- a/rpm-5.4.4-pass-_builddir-properly-to-find-debuginfo.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-macros.rpmbuild fixed with rpm-fix-___build_pre-macro.patch
-
-#--- rpm-5.4.4/macros/macros.rpmbuild.in.builddir~ 2011-12-20 15:36:20.813852241 +0100
-#+++ rpm-5.4.4/macros/macros.rpmbuild.in 2011-12-20 15:37:43.385806877 +0100
-#@@ -326,8 +326,9 @@ echo "Patch #%{__patch_number} (%{basena
-# %___build_args -e
-# %___build_cmd %{?_sudo:%{_sudo} }%{?_remsh:%{_remsh} %{_remhost} }%{?_remsudo:%{_remsudo} }%{?_remchroot:%{_remchroot} %{_remroot} }%{___build_shell} %{___build_args}
-# %___build_pre \
-#+ RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
-# RPM_OPT_FLAGS=\"%{optflags}\"\
-#- export RPM_OPT_FLAGS\
-#+ export RPM_BUILD_DIR RPM_OPT_FLAGS\
-# %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\
-# export RPM_BUILD_ROOT}\
-# %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
---- rpm-5.4.4/scripts/find-debuginfo.sh.builddir~ 2011-12-20 15:36:31.962846125 +0100
-+++ rpm-5.4.4/scripts/find-debuginfo.sh 2011-12-20 15:36:49.492836503 +0100
-@@ -32,7 +32,6 @@ strip_r=false
- # 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")
diff --git a/rpm-5.4.4-pkgconfigdeps-check-path.patch b/rpm-5.4.4-pkgconfigdeps-check-path.patch
deleted file mode 100644
index 5309292..0000000
--- a/rpm-5.4.4-pkgconfigdeps-check-path.patch
+++ /dev/null
@@ -1,76 +0,0 @@
---- rpm-5.4.4/scripts/pkgconfigdeps.sh.pc_path~ 2011-11-17 15:08:42.400054348 +0100
-+++ rpm-5.4.4/scripts/pkgconfigdeps.sh 2011-11-17 15:08:44.380056984 +0100
-@@ -16,20 +16,22 @@ case $1 in
- while read filename ; do
- case "${filename}" in
- *.pc)
-- # Query the dependencies of the package.
-- DIR=`dirname ${filename}`
-- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
-- export PKG_CONFIG_PATH
-- $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do
-- [ -n "$n" ] || continue
-- # We have a dependency. Make a note that we need the pkgconfig
-- # tool for this package.
-- if [ -n "$r" ] && [ -n "$v" ]; then
-- echo "pkgconfig($n) $r $v"
-- else
-- echo "pkgconfig($n)"
-- fi
-- done
-+ if [[ "$(dirname ${filename})" =~ pkgconfig ]]; then
-+ # Query the dependencies of the package.
-+ DIR=`dirname ${filename}`
-+ PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
-+ export PKG_CONFIG_PATH
-+ $pkgconfig --print-provides "$filename" 2> /dev/null | while read n r v ; do
-+ [ -n "$n" ] || continue
-+ # We have a dependency. Make a note that we need the pkgconfig
-+ # tool for this package.
-+ if [ -n "$r" ] && [ -n "$v" ]; then
-+ echo "pkgconfig($n) $r $v"
-+ else
-+ echo "pkgconfig($n)"
-+ fi
-+ done
-+ fi
- ;;
- esac
- done
-@@ -39,20 +41,22 @@ case $1 in
- while read filename ; do
- case "${filename}" in
- *.pc)
-- [ -n "$oneshot" ] && echo "$oneshot"; oneshot=""
-- # Query the dependencies of the package.
-- DIR=`dirname ${filename}`
-- PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
-- export PKG_CONFIG_PATH
-- $pkgconfig --print-requires "$filename" 2> /dev/null | while read n r v ; do
-- [ -n "$n" ] || continue
-- if [ -n "$r" ] && [ -n "$v" ]; then
-- echo "pkgconfig($n) $r $v"
-- else
-- echo "pkgconfig($n)"
-- fi
-- oneshot=""
-- done
-+ if [[ "$(dirname ${filename})" =~ pkgconfig ]]; then
-+ [ -n "$oneshot" ] && echo "$oneshot"; oneshot=""
-+ # Query the dependencies of the package.
-+ DIR=`dirname ${filename}`
-+ PKG_CONFIG_PATH="$DIR:$DIR/../../share/pkgconfig"
-+ export PKG_CONFIG_PATH
-+ $pkgconfig --print-requires --print-requires-private "$filename" 2> /dev/null | while read n r v ; do
-+ [ -n "$n" ] || continue
-+ if [ -n "$r" ] && [ -n "$v" ]; then
-+ echo "pkgconfig($n) $r $v"
-+ else
-+ echo "pkgconfig($n)"
-+ fi
-+ oneshot=""
-+ done
-+ fi
- ;;
- esac
- done
diff --git a/rpm-5.4.4-rpmbuild-withoutclean.patch b/rpm-5.4.4-rpmbuild-withoutclean.patch
deleted file mode 100644
index 7dae678..0000000
--- a/rpm-5.4.4-rpmbuild-withoutclean.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- rpm-5.4.4/rpmpopt.in.clean~ 2011-12-05 20:52:18.544053402 +0100
-+++ rpm-5.4.4/rpmpopt.in 2011-12-05 20:53:51.520325674 +0100
-@@ -454,5 +454,7 @@ rpmbuild alias --lsb --noautoreq --noaut
-
- rpmbuild alias --withoutcheck --define 'check exit 0' \
- --POPTdesc=$"disable %check stanza for build"
-+rpmbuild alias --withoutclean --define '__spec_clean_body %{nil}' \
-+ --POPTdesc=$"disable %clean stanza for build"
- # \endverbatim
- #*/
diff --git a/rpm-5.4.5-python-export-spec-macros.patch b/rpm-5.4.5-python-export-spec-macros.patch
deleted file mode 100644
index 081deee..0000000
--- a/rpm-5.4.5-python-export-spec-macros.patch
+++ /dev/null
@@ -1,70 +0,0 @@
---- rpm-5.4.5/python/spec-py.c.py_macros~ 2012-03-01 22:55:19.592995392 +0100
-+++ rpm-5.4.5/python/spec-py.c 2012-03-01 22:56:02.081016570 +0100
-@@ -6,6 +6,8 @@
-
- #include <rpmiotypes.h>
- #include <rpmio.h>
-+#define _MACRO_INTERNAL
-+#include <rpmmacro.h>
- #include "spec-py.h"
-
- /** \ingroup python
-@@ -146,6 +148,50 @@ spec_get_sources(specObject *s)
-
- }
-
-+static PyObject *
-+spec_get_macros(specObject *s)
-+ /*@*/
-+{
-+ MacroContext mc;
-+ PyObject *macroDict;
-+ Spec spec;
-+
-+ macroDict = PyDict_New();
-+ if (!macroDict) {
-+ return NULL;
-+ }
-+ spec = specFromSpec(s);
-+ if ( spec != NULL) {
-+ mc = spec->macros;
-+ if (mc->macroTable != NULL) {
-+ int i;
-+ for (i = 0; i < mc->firstFree; i++) {
-+ MacroEntry me;
-+ PyObject *macro;
-+ if ((me = mc->macroTable[i]) == NULL) {
-+ /* XXX this should never happen */
-+ continue;
-+ }
-+ macro = PyDict_New();
-+
-+ PyMapping_SetItemString(macro, "used", PyInt_FromLong(me->used));
-+ PyMapping_SetItemString(macro, "level", PyInt_FromLong(me->level));
-+ if (me->opts && *me->opts)
-+ PyMapping_SetItemString(macro, "opts", PyString_FromString(me->opts));
-+ if (me->body && *me->body)
-+ PyMapping_SetItemString(macro, "body", PyString_FromString(me->body));
-+ PyMapping_SetItemString(macroDict, strdup(me->name), macro);
-+ }
-+ }
-+
-+ return macroDict;
-+ }
-+ else {
-+ return NULL;
-+ }
-+
-+}
-+
- /**
- */
- /*@unchecked@*/ /*@observer@*/
-@@ -161,6 +207,7 @@ static PyMethodDef spec_Spec_methods[] =
- {"check", (PyCFunction) spec_get_check, METH_VARARGS, NULL },
- {"clean", (PyCFunction) spec_get_clean, METH_VARARGS, NULL },
- {"buildRoot", (PyCFunction) spec_get_buildroot, METH_VARARGS, NULL },
-+ {"macros", (PyCFunction) spec_get_macros, METH_VARARGS, NULL },
- {NULL} /* Sentinel */
- };
- /*@=fullinitblock@*/
diff --git a/rpm-5.4.5-rpmfc-apply-python-coloring-from-magic.patch b/rpm-5.4.5-rpmfc-apply-python-coloring-from-magic.patch
deleted file mode 100644
index 06d5470..0000000
--- a/rpm-5.4.5-rpmfc-apply-python-coloring-from-magic.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- rpm-5.4.5/lib/rpmfc.c.python_coloring~ 2012-03-05 23:13:57.442354701 +0100
-+++ rpm-5.4.5/lib/rpmfc.c 2012-03-05 23:13:59.610357114 +0100
-@@ -641,6 +641,7 @@ static struct rpmfcTokens_s rpmfcTokens[
- /* XXX "python 2.3 byte-compiled" */
- { " /usr/bin/python", RPMFC_PYTHON|RPMFC_INCLUDE },
- { "python ", RPMFC_PYTHON|RPMFC_INCLUDE },
-+ { "Python script", RPMFC_PYTHON|RPMFC_INCLUDE },
-
- { "libtool library ", RPMFC_LIBTOOL|RPMFC_INCLUDE },
- { "pkgconfig ", RPMFC_PKGCONFIG|RPMFC_INCLUDE },
diff --git a/rpm-5.4.5-skip-dependencies-for-character-devices.patch b/rpm-5.4.5-skip-dependencies-for-character-devices.patch
deleted file mode 100644
index 790ff48..0000000
--- a/rpm-5.4.5-skip-dependencies-for-character-devices.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- rpm-5.4.5/lib/rpmfc.c.skip_chrdev~ 2012-03-03 05:22:33.527640802 +0100
-+++ rpm-5.4.5/lib/rpmfc.c 2012-03-03 05:31:05.973896224 +0100
-@@ -1265,7 +1265,9 @@ assert(fc->fn != NULL);
- }
- }
-
-- xx = (*fcat->func) (fc);
-+ struct stat sb, * st = &sb;
-+ if (stat(fc->fn[fc->ix], st) == 0 && !(st->st_mode & (S_IFBLK|S_IFCHR)))
-+ xx = (*fcat->func) (fc);
- }
- }
-
diff --git a/rpm-5.4.7-dont-consider-trigger-dependencies-as-overlapping.patch b/rpm-5.4.7-dont-consider-trigger-dependencies-as-overlapping.patch
deleted file mode 100644
index bfb9159..0000000
--- a/rpm-5.4.7-dont-consider-trigger-dependencies-as-overlapping.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- rpm-5.4.7/build/reqprov.c.triggers_nooverlap~ 2012-03-20 16:44:54.803999496 +0100
-+++ rpm-5.4.7/build/reqprov.c 2012-03-20 16:44:57.294002536 +0100
-@@ -117,6 +117,9 @@ int addReqProv(/*@unused@*/ Spec spec, H
- * bit further, leaving under #ifdef for now...
- * TODO: auto-generated deps too
- */
-+ if (Flags & RPMSENSE_TRIGGER)
-+ continue;
-+
- if (flagtag && versions != NULL) {
- int overlap = 0, res = 0;
- rpmds old = rpmdsSingle(flagtag, names[len], versions[len] ? versions[len] : "", flags[len]);
diff --git a/rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch b/rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch
deleted file mode 100644
index da95f37..0000000
--- a/rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- rpm-5.4.15/lib/rpmfc.c 2014-12-08 16:52:23.628067323 +0200
-+++ rpm-5.4.15.orig/lib/rpmfc.c 2014-12-08 16:23:46.377110108 +0200
-@@ -1155,9 +1155,13 @@
- fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
- else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) {
- fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
-- if ((fn = strstr(fn, "/specifications/")) &&
-- (fn = strrchr(fn, '.')) && !strcmp(fn, ".gemspec"))
-- fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
-+ if ((strstr(fn, ".gemspec") || strstr(fn, "rbconfig.rb"))) {
-+ miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS);
-+ if (!mireRegcomp(mire, ".*/(specifications/.*\\.gemspec|rbconfig\\.rb)$"))
-+ if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0)
-+ fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
-+ mire = mireFree(mire);
-+ }
- }
- /* XXX: lacking better, more generic classifier... */
- else if (!strncmp(fn, "/gstreamer", sizeof("/gstreamer")-1) &&
-@@ -1177,6 +1181,15 @@
- fn += sizeof("/usr/share")-1;
- if (!strncmp(fn, "/python", sizeof("/python")-1))
- fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON;
-+ else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1) || !strncmp(fn, "/gems/specifications", sizeof("/gems/specifications")-1)) {
-+ fc->fcolor->vals[fc->ix] |= RPMFC_RUBY;
-+ if ((strstr(fn, ".gemspec") || strstr(fn, "rbconfig.rb"))) {
-+ miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS);
-+ if (!mireRegcomp(mire, ".*/(specifications/.*\\.gemspec|rbconfig\\.rb)$"))
-+ if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0)
-+ fc->fcolor->vals[fc->ix] |= RPMFC_MODULE;
-+ mire = mireFree(mire);
-+ }
- }
- }
- }
diff --git a/rpm-5.4.7-fix-minor-memleaks.patch b/rpm-5.4.7-fix-minor-memleaks.patch
deleted file mode 100644
index 78a1899..0000000
--- a/rpm-5.4.7-fix-minor-memleaks.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- rpm-5.4.7/build/parseReqs.c.memleak~ 2012-03-21 19:13:54.725053861 +0100
-+++ rpm-5.4.7/build/parseReqs.c 2012-03-21 19:13:57.755057614 +0100
-@@ -177,7 +177,7 @@ rpmRC parseRCPOT(Spec spec, Package pkg,
- if (!(nr > 3 && EVR[0] == '%' && EVR[1] == '{' && EVR[nr-1] == '}'))
- {
- memset(evr, 0, sizeof(*evr));
-- ix = rpmEVRparse(xstrdup(EVR), evr);
-+ ix = rpmEVRparse(EVR, evr);
- evr->str = _free(evr->str);
- }
- if (ix != 0) {
---- rpm-5.4.7/rpmio/macro.c.memleak~ 2012-03-21 19:16:07.453218370 +0100
-+++ rpm-5.4.7/rpmio/macro.c 2012-03-21 19:19:33.758488216 +0100
-@@ -2818,8 +2818,10 @@ rpmLoadMacroFile(MacroContext mc, const
- }
- se = rpmMCExpand(mc, s, NULL);
- rc = rpmGlob(se, &argc, &argv);
-- for(i = 0; i < argc; i++)
-+ for(i = 0; i < argc; i++) {
- rc |= rpmLoadMacroFile(mc, argv[i], nesting - 1);
-+ argv[i] = _free(argv[i]);
-+ }
- argv = _free(argv);
- se = _free(se);
- if (rc != 0)
diff --git a/rpm-5.4.7-hdrfmt-fix-unitialized-argv-element.patch b/rpm-5.4.7-hdrfmt-fix-unitialized-argv-element.patch
deleted file mode 100644
index 157a6eb..0000000
--- a/rpm-5.4.7-hdrfmt-fix-unitialized-argv-element.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- rpm-5.4.7/rpmdb/hdrfmt.c.unitialized~ 2012-03-19 14:21:14.907225418 +0100
-+++ rpm-5.4.7/rpmdb/hdrfmt.c 2012-03-19 14:21:17.327228582 +0100
-@@ -2048,8 +2048,10 @@ static int triggertypeTag(Header h, HE_t
- he->p.argv = xmalloc(sizeof(*he->p.argv) * he->c);
- for (i = 0; i < (unsigned) he->c; i++) {
- for (j = 0; j < (unsigned) numNames; j++) {
-- if (indices.ui32p[j] != i)
-+ if (indices.ui32p[j] != i) {
-+ he->p.argv[i] = NULL;
- /*@innercontinue@*/ continue;
-+ }
-
- /* XXX FIXME: there's memory leaks here. */
- if (flags.ui32p[j] & RPMSENSE_TRIGGERPREIN)
diff --git a/rpm-5.4.7-kmod-dependencies.patch b/rpm-5.4.7-kmod-dependencies.patch
deleted file mode 100644
index df3d02c..0000000
--- a/rpm-5.4.7-kmod-dependencies.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- rpm-5.4.7/lib/rpmfc.c.kmod~ 2012-03-16 16:34:04.640654829 +0100
-+++ rpm-5.4.7/lib/rpmfc.c 2012-03-16 16:34:04.644654834 +0100
-@@ -981,6 +981,19 @@ static int rpmfcSCRIPT(rpmfc fc)
- xx = rpmfcHelper(fc, 'P', "gstreamer");
- /* XXX: currently of no use, but for the sake of consistency... */
- xx = rpmfcHelper(fc, 'R', "gstreamer");
-+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_PLD)
-+ } else
-+ if ((fc->fcolor->vals[fc->ix] & RPMFC_MODULE)) {
-+ miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS);
-+ if (!mireRegcomp(mire, "^.*((/lib/modules/|/var/lib/dkms/).*\\.ko(\\.gz|\\.xz)?|(/var/lib/dkms-binary/[^/]+/[^/]+|/usr/src)/[^/]+/dkms.conf)$"))
-+ if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0) {
-+ fc->fcolor->vals[fc->ix] |= (RPMFC_MODULE|RPMFC_SCRIPT);
-+ xx = rpmfcHelper(fc, 'P', "kernel");
-+ /* XXX: currently of no use, but for the sake of consistency... */
-+ xx = rpmfcHelper(fc, 'R', "kernel");
-+ }
-+ mire = mireFree(mire);
-+#endif
- } else
- if (fc->fcolor->vals[fc->ix] & RPMFC_JAVA) {
- xx = rpmfcHelper(fc, 'P', "java");
-@@ -1188,6 +1201,14 @@ assert(fc->fn != NULL);
- else if (!strncmp(fn, "/gstreamer", sizeof("/gstreamer")-1) &&
- fc->fcolor->vals[fc->ix] & RPMFC_LIBRARY)
- fc->fcolor->vals[fc->ix] |= (RPMFC_MODULE|RPMFC_SCRIPT);
-+#if defined(RPM_VENDOR_MANDRIVA) || defined(RPM_VENDOR_PLD)
-+ } else {
-+ miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS);
-+ if (!mireRegcomp(mire, "^.*((/lib/modules/|/var/lib/dkms/).*\\.ko(\\.gz|\\.xz)?|(/var/lib/dkms-binary/[^/]+/[^/]+|/usr/src)/[^/]+/dkms.conf)$"))
-+ if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0)
-+ fc->fcolor->vals[fc->ix] |= (RPMFC_MODULE|RPMFC_SCRIPT);
-+ mire = mireFree(mire);
-+#endif
- }
- }
-
---- rpm-5.4.7/macros/kernel.in.kmod~ 2011-04-10 12:54:18.000000000 +0200
-+++ rpm-5.4.7/macros/kernel.in 2012-03-16 16:37:04.277948160 +0100
-@@ -2,11 +2,11 @@
- # To make use of these macros insert the following line into your spec file:
- # %{load:%{_usrlibrpm}/macros.d/kernel}
-
--%__modinfo @__MODINFO
-+%__modinfo @__MODINFO@
-
- # Path to scripts to autogenerate gstreamer package dependencies,
- #
--# Note: Used if _use_internal_dependency_generator is non-zero. The
-+# Note: Used iff _use_internal_dependency_generator is non-zero. The
- # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}.
- %__kernel_provides %{_rpmhome}/kmod-deps.sh --provides --modinfo %__modinfo
- #%__kernel_requires %{_rpmhome}/kmod-deps.sh --requires --modinfo %__modinfo
---- rpm-5.4.7/macros/macros.in.kmod~ 2012-03-16 16:34:04.614654786 +0100
-+++ rpm-5.4.7/macros/macros.in 2012-03-16 16:34:04.645654836 +0100
-@@ -981,6 +981,10 @@ $_arbitrary_tags_tests Foo:Bar
- %{load:%{_usrlibrpm}/macros.d/haskell}
-
- #------------------------------------------------------------------------
-+# kmod(...) configuration.
-+%{load:%{_usrlibrpm}/macros.d/kernel}
-+
-+#------------------------------------------------------------------------
- # perl(...) configuration
- %{load:%{_usrlibrpm}/macros.d/perl}
-
diff --git a/rpm-5.4.7-no-seqid_init-on-rdonly-database.patch b/rpm-5.4.7-no-seqid_init-on-rdonly-database.patch
deleted file mode 100644
index 85d52e0..0000000
--- a/rpm-5.4.7-no-seqid_init-on-rdonly-database.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-5.4.7/rpmdb/db3.c.db_rdonly~ 2012-03-24 04:16:30.305949579 +0100
-+++ rpm-5.4.7/rpmdb/db3.c 2012-03-24 04:16:39.649962411 +0100
-@@ -2700,7 +2700,7 @@ assert(Pdbi != NULL);
- if (oflags & (DB_CREATE|DB_TRUNCATE)) _flags |= DB_CREATE;
- xx = db3associate(Pdbi, dbi, _callback, _flags);
- }
-- if (dbi->dbi_seq_id) {
-+ if (dbi->dbi_seq_id && !(oflags & DB_RDONLY)) {
- char * end = NULL;
- uint32_t u = (uint32_t) strtoll(dbi->dbi_seq_id, &end, 0);
-
diff --git a/rpm-5.4.8-dont-show-suggests-with-requires.patch b/rpm-5.4.8-dont-show-suggests-with-requires.patch
deleted file mode 100644
index 19cf1e0..0000000
--- a/rpm-5.4.8-dont-show-suggests-with-requires.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- rpm-5.4.8/rpmdb/hdrfmt.c.suggests~ 2012-04-25 17:58:22.721144146 +0200
-+++ rpm-5.4.8/rpmdb/hdrfmt.c 2012-04-25 18:33:32.293704707 +0200
-@@ -1607,6 +1607,38 @@ static const char * bfstring(unsigned in
- #endif
-
- /**
-+ * Format dependency flags for display.
-+ * @param he tag container
-+ * @param av parameter list (or NULL)
-+ * @return formatted string
-+ */
-+static /*@only@*/
-+char * hintFormat(HE_t he, /*@unused@*/ /*@null@*/ const char ** av)
-+ /*@*/
-+{
-+ int ix = (he->ix > 0 ? he->ix : 0);
-+ char * val;
-+
-+assert(ix == 0);
-+ if (he->t != RPM_UINT64_TYPE) {
-+ val = xstrdup(_("(invalid type)"));
-+ } else {
-+ rpmuint64_t anint = he->p.ui64p[ix];
-+ char *t, *buf;
-+
-+ t = buf = alloca(32);
-+ *t = '\0';
-+
-+ if (anint & RPMSENSE_MISSINGOK)
-+ t = stpcpy(t, "(hint)");
-+ *t = '\0';
-+
-+ val = xstrdup(buf);
-+ }
-+
-+ return val;
-+}
-+/**
- * Retrieve install prefixes.
- * @param h header
- * @retval *he tag container
-@@ -5201,6 +5233,8 @@ static struct headerSprintfExtension_s _
- { .fmtFunction = digestFormat } },
- { HEADER_EXT_FORMAT, "fflags",
- { .fmtFunction = fflagsFormat } },
-+ { HEADER_EXT_FORMAT, "hint",
-+ { .fmtFunction = hintFormat } },
- { HEADER_EXT_FORMAT, "iconv",
- { .fmtFunction = iconvFormat } },
- { HEADER_EXT_FORMAT, "json",
---- rpm-5.4.8/rpmpopt.in.suggests~ 2012-04-25 17:58:22.439141788 +0200
-+++ rpm-5.4.8/rpmpopt.in 2012-04-25 18:33:32.295704719 +0200
-@@ -98,7 +98,8 @@ rpm alias --provides --qf \
- --POPTdesc=$"list capabilities that this package provides"
-
- rpm alias --requires --qf \
-- "[%{REQUIRENAME}%{REQUIREFLAGS:depflags}%{REQUIREVERSION}\n]" \
-+ "[%{REQUIRENAME}%{REQUIREFLAGS:hint:depflags}%{REQUIREVERSION}\n]" \
-+ --pipe "grep -v \(hint\)" \
- --POPTdesc=$"list capabilities required by package(s)"
- rpm alias -R --requires
-
diff --git a/rpm-5.4.9-avoid-dependencies-on-self.patch b/rpm-5.4.9-avoid-dependencies-on-self.patch
deleted file mode 100644
index 8a3ea13..0000000
--- a/rpm-5.4.9-avoid-dependencies-on-self.patch
+++ /dev/null
@@ -1,85 +0,0 @@
---- rpm-5.4.9/lib/rpmfc.c.drop_deps~ 2012-05-07 22:41:45.000000000 +0200
-+++ rpm-5.4.9/lib/rpmfc.c 2012-05-15 01:58:00.071056896 +0200
-@@ -1696,6 +1696,65 @@ static int rpmfcGenerateScriptletDeps(co
- return rc;
- }
-
-+static void removeSillyDeps(Header h) {
-+ HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
-+ int xx, i, rnum, removed = 0;
-+ const char **deps = NULL;
-+ const char **versions = NULL;
-+ evrFlags *flags = NULL;
-+
-+ he->tag = RPMTAG_REQUIRENAME;
-+ xx = headerGet(h, he, 0);
-+ deps = he->p.argv;
-+ rnum = he->c;
-+
-+ he->tag = RPMTAG_REQUIREVERSION;
-+ xx = headerGet(h, he, 0);
-+ versions = he->p.argv;
-+
-+ he->tag = RPMTAG_REQUIREFLAGS;
-+ xx = headerGet(h, he, 0);
-+ flags = (evrFlags*)he->p.ui32p;
-+
-+ for (i = 0; i < rnum-removed; i++) {
-+ if (removed) {
-+ deps[i] = deps[i+removed];
-+ versions[i] = versions[i+removed];
-+ flags[i] = flags[i+removed];
-+ }
-+ rpmds req = rpmdsSingle(RPMTAG_REQUIRENAME, deps[i], versions[i], flags[i]);
-+ rpmds prov = rpmdsNew(h, (*deps[i] == '/' && !*versions[i]) ? RPMTAG_BASENAMES : RPMTAG_PROVIDENAME, 0);
-+ if (rpmdsMatch(req, prov)) {
-+ if (flags[i] & RPMSENSE_SCRIPT_PRE)
-+ rpmlog(RPMLOG_ERR, "Requires(pre): on dependency provided by self: %s\n", rpmdsDNEVR(req));
-+ else {
-+ rpmlog(RPMLOG_NOTICE, "Removing dependency on self: %s\n", rpmdsDNEVR(req));
-+ removed++;
-+ i--;
-+ }
-+ }
-+ req = rpmdsFree(req);
-+ prov = rpmdsFree(prov);
-+ }
-+ if (removed) {
-+ he->tag = RPMTAG_REQUIRENAME;
-+ he->t = RPM_STRING_ARRAY_TYPE;
-+ he->p.argv = deps;
-+ he->c -= removed;
-+ headerMod(h, he, 0);
-+
-+ he->tag = RPMTAG_REQUIREVERSION;
-+ he->p.argv = versions;
-+ headerMod(h, he, 0);
-+
-+ he->tag = RPMTAG_REQUIREFLAGS;
-+ he->t = RPM_UINT32_TYPE;
-+ he->p.ui32p = (uint32_t*)flags;
-+ headerMod(h, he, 0);
-+ }
-+
-+}
-+
- rpmRC rpmfcGenerateDepends(void * _spec, void * _pkg)
- {
- HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
-@@ -1729,6 +1788,7 @@ rpmRC rpmfcGenerateDepends(void * _spec,
- if (internaldeps == 0) {
- /* ... then generate dependencies using %{__find_requires} et al. */
- rc = rpmfcGenerateDependsHelper(spec, pkg, fi);
-+ removeSillyDeps(pkg->header);
- printDeps(pkg->header);
- return rc;
- }
-@@ -1946,6 +2006,8 @@ assert(ac == (int)he->c);
- xx = headerPut(pkg->header, he, 0);
- }
-
-+ removeSillyDeps(pkg->header);
-+
- printDeps(pkg->header);
-
- if (fc != NULL && _rpmfc_debug) {
diff --git a/rpm-5.4.9-avoid-double-slash-in-path-for-dirname-filetrigger-matching.patch b/rpm-5.4.9-avoid-double-slash-in-path-for-dirname-filetrigger-matching.patch
deleted file mode 100644
index 7535c34..0000000
--- a/rpm-5.4.9-avoid-double-slash-in-path-for-dirname-filetrigger-matching.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- rpm-5.4.9/lib/psm.c.slash~ 2012-05-15 03:47:32.000000000 +0200
-+++ rpm-5.4.9/lib/psm.c 2012-05-15 03:49:04.075347677 +0200
-@@ -1463,11 +1463,15 @@ static rpmRC runTriggersLoop(rpmpsm psm,
- ARGint_t vals;
-
- depName = _free(depName);
-- depName = (char *) xmalloc(nName + 1 + 1);
-- (void) stpcpy(depName, Name);
-- /* XXX re-add the pesky trailing '/' to dirnames. */
-- depName[nName] = (tagno == RPMTAG_DIRNAMES ? '/' : '\0');
-- depName[nName+1] = '\0';
-+ if (!strcmp(Name, "/"))
-+ depName = xstrdup(Name);
-+ else {
-+ depName = xmalloc(nName + 1 + 1);
-+ (void) stpcpy(depName, Name);
-+ /* XXX re-add the pesky trailing '/' to dirnames. */
-+ depName[nName] = (tagno == RPMTAG_DIRNAMES ? '/' : '\0');
-+ depName[nName+1] = '\0';
-+ }
-
- if (depName[0] == '/' && psm->Tmires != NULL) {
- miRE mire;
diff --git a/rpm-5.4.9-disable-l10ndir.patch b/rpm-5.4.9-disable-l10ndir.patch
deleted file mode 100644
index 05e6259..0000000
--- a/rpm-5.4.9-disable-l10ndir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-5.4.9/macros/macros.in.l10ndir~ 2012-05-18 11:46:41.037713866 +0200
-+++ rpm-5.4.9/macros/macros.in 2012-05-18 11:46:59.425827976 +0200
-@@ -286,7 +286,7 @@ package or when debugging this package.\
- %__gitdir %{__varlibwdj}/git
- %__svndir %{__varlibwdj}/svn
- %__sqldir %{__varlibwdj}/sql
--%__l10ndir %{__varlibwdj}/l10n
-+#__l10ndir %{__varlibwdj}/l10n
-
- # Elements necessary to construct a mongodb:// URI configurably
- #
diff --git a/rpm-5.4.9-fix-rpm_qa-pattern.patch b/rpm-5.4.9-fix-rpm_qa-pattern.patch
deleted file mode 100644
index 76ce249..0000000
--- a/rpm-5.4.9-fix-rpm_qa-pattern.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-5.4.9/lib/rpmgi.c.pattern~ 2012-04-15 23:20:58.000000000 +0200
-+++ rpm-5.4.9/lib/rpmgi.c 2012-05-17 01:56:21.018481577 +0200
-@@ -473,7 +473,7 @@ fprintf(stderr, "*** gi %p key %p[%d]\tm
- pat = ae;
- got++;
- }
-- if (got) {
-+ if (got >= 0) {
- if (_rpmgi_debug < 0)
- fprintf(stderr, "\tav %p[%d]: \"%s\" -> %s ~= \"%s\"\n", gi->argv, (int)(av - gi->argv), *av, tagName((rpmTag)tag), pat);
- got = rpmmiAddPattern(gi->mi, (rpmTag)tag, RPMMIRE_DEFAULT, pat);
diff --git a/rpm-5.4.9-fix-verify-segfault.patch b/rpm-5.4.9-fix-verify-segfault.patch
deleted file mode 100644
index e457b5e..0000000
--- a/rpm-5.4.9-fix-verify-segfault.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- rpm-5.4.9/rpmio/rpmhkp.c.fix_verify~ 2012-04-16 22:53:33.000000000 +0200
-+++ rpm-5.4.9/rpmio/rpmhkp.c 2012-05-15 03:51:08.805023846 +0200
-@@ -901,6 +901,14 @@ char * t, * te;
- te = t = tbuf;
- *te = '\0';
-
-+ /*Reset all the temporary variables*/
-+ hkp->pubx = -1;
-+ hkp->uidx = -1;
-+ hkp->subx = -1;
-+ hkp->sigx = -1;
-+ hkp->tvalid = 0;
-+ hkp->uvalidx = -1;
-+
- HKPDEBUG((stderr, "--> %s(%p,%s)\n", __FUNCTION__, hkp, keyname));
-
- /* Do a lazy lookup before validating. */
-@@ -1065,7 +1073,7 @@ SPEW((stderr, "\t%s\n", pgpHexStr(hkp->p
- }
-
- exit:
-- if ((hkp->uidx >= 0 && hkp->uidx < hkp->npkts) && hkp->tvalid > 0) {
-+ if ((hkp->uvalidx >= 0 && hkp->uvalidx < hkp->npkts) && hkp->tvalid > 0) {
- char user[256+1];
- size_t nuser;
- pgpPktUid * u;
diff --git a/rpm-5.4.9-font-provides.patch b/rpm-5.4.9-font-provides.patch
deleted file mode 100644
index d0b894a..0000000
--- a/rpm-5.4.9-font-provides.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- rpm-5.4.9/macros/macros.rpmbuild.in.font~ 2012-05-15 02:55:46.222011889 +0200
-+++ rpm-5.4.9/macros/macros.rpmbuild.in 2012-05-15 02:55:46.347012566 +0200
-@@ -682,5 +682,8 @@ done \
-
- %requires_eq() %(echo '%*' | LC_ALL="C" xargs -r rpm -q --qf 'Requires: %%{name} = %%{epoch}:%%{version}\\n' | sed -e 's/ (none):/ /' -e 's/ 0:/ /' | grep -v "is not")
-
-+%__font_provides %{_rpmhome}/fontconfig.prov
-+#%__font_requires %{_rpmhome}/fontconfig.req
-+
- # \endverbatim
- #*/
---- rpm-5.4.9/scripts/fontconfig.prov.font~ 2012-05-15 02:55:46.347012566 +0200
-+++ rpm-5.4.9/scripts/fontconfig.prov 2012-05-15 02:55:46.347012566 +0200
-@@ -0,0 +1,24 @@
-+#!/bin/bash
-+#
-+# Script to install in:
-+# /usr/lib/rpm/redhat/find-provides.d
-+#
-+# Transform font files into RPM provides
-+# Requires fontconfig >= 2.6.90
-+#
-+# Author: Behdad Esfahbod <behdad at redhat.com>
-+# Based on other provides scripts from RPM
-+#
-+
-+fcquery=/usr/bin/fc-query
-+
-+if [ ! -x $fcquery ]; then
-+ cat > /dev/null
-+ exit 0
-+fi
-+
-+# filter out anything outside main fontconfig path
-+grep /usr/share/fonts/ |
-+while read fn; do
-+ $fcquery --format '%{=pkgkit}' "${fn}" 2> /dev/null
-+done
---- rpm-5.4.9/scripts/Makefile.am.font~ 2012-05-15 02:55:46.304012334 +0200
-+++ rpm-5.4.9/scripts/Makefile.am 2012-05-15 02:55:46.347012566 +0200
-@@ -19,7 +19,7 @@ EXTRA_DIST = api-sanity-autotest.pl api-
- cpanflute cpanflute2 Specfile.pm \
- find-provides.perl find-requires.perl \
- find-provides.php find-requires.php \
-- freshen.sh gendiff getpo.sh http.req \
-+ freshen.sh fontconfig.prov gendiff getpo.sh http.req \
- check-java-closure.sh java.prov.sh java.req.sh \
- gstreamer.sh javadeps.sh libtooldeps.sh mgo \
- mono-find-provides mono-find-requires \
-@@ -55,8 +55,8 @@ pkgdata_SCRIPTS = \
- brp-strip-shared brp-strip-static-archive brp-sparc64-linux \
- check-files cross-build dbconvert.sh executabledeps.sh \
- find-debuginfo.sh find-lang.sh find-prov.pl find-req.pl \
-- find-provides.perl \
-- find-requires.perl gem_helper.rb getpo.sh http.req \
-+ find-provides.perl find-requires.perl \
-+ fontconfig.prov gem_helper.rb getpo.sh http.req \
- kmod-deps.sh gstreamer.sh javadeps.sh libtooldeps.sh \
- mono-find-provides mono-find-requires \
- check-multiarch-files mkmultiarch \
diff --git a/rpm-5.4.9-keep-loading-script-macros.patch b/rpm-5.4.9-keep-loading-script-macros.patch
deleted file mode 100644
index a9d23f9..0000000
--- a/rpm-5.4.9-keep-loading-script-macros.patch
+++ /dev/null
@@ -1,80 +0,0 @@
---- rpm-5.4.9/macros/macros.in.script_macros~ 2012-05-07 00:36:51.000000000 +0200
-+++ rpm-5.4.9/macros/macros.in 2012-05-15 01:39:37.382649841 +0200
-@@ -993,63 +993,63 @@ $_arbitrary_tags_tests Foo:Bar
- # XXX %{load:...}, then loading will CEASE at that point in the file.
- #==============================================================================
- # ---- SELinux configuration macros.
--#%%{load:%{_usrlibrpm}/macros.d/selinux}
-+%{load:%{_usrlibrpm}/macros.d/selinux}
-
- #==============================================================================
- # ---- rpmbuild macros.
--#%%{load:%{_usrlibrpm}/macros.rpmbuild}
-+%{load:%{_usrlibrpm}/macros.rpmbuild}
-
- #------------------------------------------------------------------------
- # cmake(...) configuration
--#%%{load:%{_usrlibrpm}/macros.d/cmake}
-+%{load:%{_usrlibrpm}/macros.d/cmake}
-
- #------------------------------------------------------------------------
- # gstreamer(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/gstreamer}
-+%{load:%{_usrlibrpm}/macros.d/gstreamer}
-
- #------------------------------------------------------------------------
- # haskell(...) configuration.
- #%%{load:%{_usrlibrpm}/macros.d/haskell}
-
- #------------------------------------------------------------------------
- # perl(...) configuration
--#%%{load:%{_usrlibrpm}/macros.d/perl}
-+%{load:%{_usrlibrpm}/macros.d/perl}
-
- #------------------------------------------------------------------------
- # python(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/python}
-+%{load:%{_usrlibrpm}/macros.d/python}
-
- #------------------------------------------------------------------------
- # php(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/php}
-+%{load:%{_usrlibrpm}/macros.d/php}
-
- #------------------------------------------------------------------------
- # java(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/java}
-+%{load:%{_usrlibrpm}/macros.d/java}
-
- #------------------------------------------------------------------------
- # libtool(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/libtool}
-+%{load:%{_usrlibrpm}/macros.d/libtool}
-
- #------------------------------------------------------------------------
- # pkgconfig(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/pkgconfig}
-+%{load:%{_usrlibrpm}/macros.d/pkgconfig}
-
- #------------------------------------------------------------------------
- # mono(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/mono}
-+%{load:%{_usrlibrpm}/macros.d/mono}
-
- #------------------------------------------------------------------------
- # ruby(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/ruby}
-+%{load:%{_usrlibrpm}/macros.d/ruby}
-
- #------------------------------------------------------------------------
- # tcl(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/tcl}
-+%{load:%{_usrlibrpm}/macros.d/tcl}
-
- #------------------------------------------------------------------------
- # typelib(...) configuration.
--#%%{load:%{_usrlibrpm}/macros.d/typelib}
-+#%%{load:%{_usrlibrpm}/macros.d/typelib}
-
- # \endverbatim
- #*/
diff --git a/rpm-5.4.9-mire-fix-strings-lacking-null-terminator.patch b/rpm-5.4.9-mire-fix-strings-lacking-null-terminator.patch
deleted file mode 100644
index b2d3f32..0000000
--- a/rpm-5.4.9-mire-fix-strings-lacking-null-terminator.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- rpm-5.4.9/rpmio/mire.c.str_nul~ 2012-04-16 05:21:22.000000000 +0200
-+++ rpm-5.4.9/rpmio/mire.c 2012-05-15 03:20:14.361970779 +0200
-@@ -415,11 +415,10 @@ int mireRegexec(miRE mire, const char *
- break;
- /* XXX rpmgrep: ensure that the string is NUL terminated. */
- if (vallen > 0) {
-- if (val[vallen] != '\0') {
-- char * t = strncpy((char *)alloca(vallen+1), val, vallen);
-- t[vallen] = '\0';
-- val = t;
-- }
-+ /* if (val[vallen] != '\0') might go outside of allocated memory */
-+ char * t = strncpy(alloca(vallen+1), val, vallen);
-+ t[vallen] = '\0';
-+ val = t;
- } else
- if (vallen == 0)
- vallen = strlen(val);
-@@ -466,6 +465,13 @@ int mireRegexec(miRE mire, const char *
- case RPMMIRE_GLOB:
- if (mire->pattern == NULL)
- break;
-+ /* XXX rpmgrep: ensure that the string is NUL terminated. */
-+ if (vallen > 0) {
-+ /* if (val[vallen] != '\0') might go outside of allocated memory */
-+ char * t = strncpy(alloca(vallen+1), val, vallen);
-+ t[vallen] = '\0';
-+ val = t;
-+ }
- rc = fnmatch(mire->pattern, val, mire->fnflags);
- switch (rc) {
- case 0: rc = 0; /*@innerbreak@*/ break;
diff --git a/rpm-5.4.9-rpmfc-extract-dependencies-for-all-files.patch b/rpm-5.4.9-rpmfc-extract-dependencies-for-all-files.patch
deleted file mode 100644
index 2a72e5a..0000000
--- a/rpm-5.4.9-rpmfc-extract-dependencies-for-all-files.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-5.4.9/lib/rpmfc.c.rpmfc_ruby~ 2012-05-15 02:27:26.000000000 +0200
-+++ rpm-5.4.9/lib/rpmfc.c 2012-05-15 02:27:34.978029207 +0200
-@@ -1090,7 +1090,7 @@ typedef struct rpmfcApplyTbl_s {
- /*@unchecked@*/
- static struct rpmfcApplyTbl_s rpmfcApplyTable[] = {
- { rpmfcELF, RPMFC_ELF },
-- { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_FONT|RPMFC_HASKELL|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_MONO|RPMFC_TYPELIB|RPMFC_DESKTOP_FILE) },
-+ { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_FONT|RPMFC_HASKELL|RPMFC_RUBY|RPMFC_PERL|RPMFC_PYTHON|RPMFC_LIBTOOL|RPMFC_PKGCONFIG|RPMFC_BOURNE|RPMFC_JAVA|RPMFC_PHP|RPMFC_MONO|RPMFC_TYPELIB|RPMFC_DESKTOP_FILE) },
- #if defined(RPM_VENDOR_MANDRIVA)
- { rpmfcSYMLINK, RPMFC_SYMLINK },
- #endif
diff --git a/rpm-5.4.9-rpmpython-fix-input.patch b/rpm-5.4.9-rpmpython-fix-input.patch
deleted file mode 100644
index 0589a54..0000000
--- a/rpm-5.4.9-rpmpython-fix-input.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rpm-5.4.9/rpmio/rpmpython.c.py_input~ 2012-05-15 03:40:55.316698083 +0200
-+++ rpm-5.4.9/rpmio/rpmpython.c 2012-05-15 03:40:59.799722384 +0200
-@@ -215,7 +215,7 @@ fprintf(stderr, "==> %s(%p,%s,%p)\n", __
- PyCompilerFlags cf = { 0 };
- PyObject * m = PyImport_AddModule("__main__");
- PyObject * d = (m ? PyModule_GetDict(m) : NULL);
-- PyObject * v = (m ? PyRun_StringFlags(val, Py_file_input, d, d, &cf) : NULL);
-+ PyObject * v = (m ? PyRun_StringFlags(val, Py_single_input, d, d, &cf) : NULL);
-
- if (v == NULL) {
- PyErr_Print();
diff --git a/rpm-5.4.9-ruby1.9-fixes.patch b/rpm-5.4.9-ruby1.9-fixes.patch
deleted file mode 100644
index 07748fd..0000000
--- a/rpm-5.4.9-ruby1.9-fixes.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -urN rpm-5.4.9/macros/ruby.in rpm-5.4.9-patched/macros/ruby.in
---- rpm-5.4.9/macros/ruby.in 2011-10-15 23:56:57.000000000 +1100
-+++ rpm-5.4.9-patched/macros/ruby.in 2012-08-30 18:09:09.732009037 +1100
-@@ -2,7 +2,7 @@
- # To make use of these macros insert the following line into your spec file:
- # %{load:%{_usrlibrpm}/macros.d/ruby}
-
--%__ruby @__RUBY@
-+%__ruby /usr/bin/ruby
-
- # Path to scripts to autogenerate php package dependencies,
- #
-@@ -11,18 +11,18 @@
- %__ruby_provides %{_rpmhome}/rubygems.rb --provides
- %__ruby_requires %{_rpmhome}/rubygems.rb --requires
-
--%ruby_version %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["ruby_version"]')
-+%ruby_version %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["ruby_version"]')
-
--%ruby_archdir %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["archdir"]')
--%ruby_libdir %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["rubylibdir"]')
--%ruby_sitedir %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["sitedir"]')
--%ruby_sitearchdir %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["sitearchdir"]')
--%ruby_sitelibdir %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["sitelibdir"]')
--%ruby_vendordir %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["vendordir"]')
--%ruby_vendorarchdir %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["vendorarchdir"]')
--%ruby_vendorlibdir %(%{__ruby} -rrbconfig -e 'print Config::CONFIG["vendorlibdir"]')
--%ruby_gemdir %(%{__ruby} -rrbconfig -e 'include Config; print CONFIG["rubylibdir"].sub(CONFIG["ruby_version"], "gems/#{CONFIG["ruby_version"]}")')
--%ruby_ridir %(%{__ruby} -rrbconfig -e 'include Config; print File.join(CONFIG["datadir"], "ri", CONFIG["ruby_version"])')
-+%ruby_archdir %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["archdir"]')
-+%ruby_libdir %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"]')
-+%ruby_sitedir %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitedir"]')
-+%ruby_sitearchdir %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitearchdir"]')
-+%ruby_sitelibdir %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["sitelibdir"]')
-+%ruby_vendordir %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendordir"]')
-+%ruby_vendorarchdir %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendorarchdir"]')
-+%ruby_vendorlibdir %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["vendorlibdir"]')
-+%ruby_gemdir %(%{__ruby} -rrbconfig -e 'print RbConfig::CONFIG["rubylibdir"].sub(RbConfig::CONFIG["ruby_version"], "gems/#{RbConfig::CONFIG["ruby_version"]}")')
-+%ruby_ridir %(%{__ruby} -rrbconfig -e 'print File.join(RbConfig::CONFIG["datadir"], "ri", RbConfig::CONFIG["ruby_version"])')
-
- %__gem_helper %{_usrlibrpm}/gem_helper.rb
-
diff --git a/rpm-5.4.9-strip-buildroot-away-from-duplicate-files-list.patch b/rpm-5.4.9-strip-buildroot-away-from-duplicate-files-list.patch
deleted file mode 100644
index 8e48830..0000000
--- a/rpm-5.4.9-strip-buildroot-away-from-duplicate-files-list.patch
+++ /dev/null
@@ -1,97 +0,0 @@
---- rpm-5.4.9/build/files.c.buildroot_dups~ 2012-04-15 17:04:14.000000000 +0200
-+++ rpm-5.4.9/build/files.c 2012-05-15 02:11:03.734983519 +0200
-@@ -2917,7 +2917,7 @@ exit:
-
- /* auxiliary function for checkDuplicateFiles() */
- /* XXX need to pass Header because fi->h is NULL */
--static int fiIntersect(/*@null@*/ rpmfi fi1, /*@null@*/ rpmfi fi2)
-+static int fiIntersect(/*@null@*/ rpmfi fi1, /*@null@*/ rpmfi fi2, size_t buildrootL)
- /*@globals internalState @*/
- /*@modifies fi1, fi2, internalState @*/
- {
-@@ -2941,7 +2941,7 @@ static int fiIntersect(/*@null@*/ rpmfi
- if (!dups)
- dups = rpmiobNew(0);
- dups = rpmiobAppend(dups, "\t", 0);
-- dups = rpmiobAppend(dups, fn1, 1);
-+ dups = rpmiobAppend(dups, fn1+buildrootL, 1);
- n++;
- }
- }
-@@ -2972,7 +2972,7 @@ static int fiIntersect(/*@null@*/ rpmfi
- * @param spec spec file control structure
- * @return number of duplicate files
- */
--static int checkDuplicateFiles(Spec spec)
-+static int checkDuplicateFiles(Spec spec, size_t buildrootL)
- /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
- /*@modifies *spec->packages,
- rpmGlobalMacroContext, fileSystem, internalState @*/
-@@ -2997,7 +2997,7 @@ static int checkDuplicateFiles(Spec spec
- #endif
- if (fi2 == NULL) continue;
- (void) rpmfiSetHeader(fi2, pkg2->header);
-- n += fiIntersect(fi1, fi2);
-+ n += fiIntersect(fi1, fi2, buildrootL);
- (void) rpmfiSetHeader(fi2, NULL);
- fi2 = rpmfiFree(fi2);
- }
-@@ -3023,7 +3023,7 @@ static inline int packagedDir(Package pk
- * /A/B/C/D
- * Now directories "/A/B" and "/A/B/C" should also be packaged.
- */
--static int pkgUnpackagedSubdirs(Package pkg)
-+static int pkgUnpackagedSubdirs(Package pkg, size_t buildrootL)
- /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
- /*@modifies pkg->header,
- rpmGlobalMacroContext, fileSystem, internalState @*/
-@@ -3096,7 +3096,7 @@ static int pkgUnpackagedSubdirs(Package
-
- for (i = 0; i < n; i++) {
- list = rpmiobAppend(list, "\t", 0);
-- list = rpmiobAppend(list, unpackaged[i], 1);
-+ list = rpmiobAppend(list, unpackaged[i]+buildrootL, 1);
- unpackaged[i] = _free(unpackaged[i]);
- }
- unpackaged = _free(unpackaged);
-@@ -3117,7 +3117,7 @@ static int pkgUnpackagedSubdirs(Package
- * @param spec spec file control structure
- * @return number of unpackaged subdirectories
- */
--static int checkUnpackagedSubdirs(Spec spec)
-+static int checkUnpackagedSubdirs(Spec spec, size_t buildrootL)
- /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
- /*@modifies *spec->packages,
- rpmGlobalMacroContext, fileSystem, internalState @*/
-@@ -3126,7 +3126,7 @@ static int checkUnpackagedSubdirs(Spec s
- Package pkg;
-
- for (pkg = spec->packages; pkg; pkg = pkg->next)
-- n += pkgUnpackagedSubdirs(pkg);
-+ n += pkgUnpackagedSubdirs(pkg, buildrootL);
- return n;
- }
-
-@@ -3137,6 +3137,11 @@ rpmRC processBinaryFiles(Spec spec, int
- Package pkg;
- rpmRC res = RPMRC_OK;
-
-+ char *buildroot = rpmExpand("%{?buildroot}", NULL);
-+ size_t buildrootL = strlen(buildroot);
-+
-+ buildroot = _free(buildroot);
-+
- for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
- int rc;
-
-@@ -3178,8 +3183,8 @@ rpmRC processBinaryFiles(Spec spec, int
- if (res == RPMRC_OK) {
- if (checkUnpackagedFiles(spec) > 0)
- res = RPMRC_FAIL;
-- (void) checkDuplicateFiles(spec);
-- (void) checkUnpackagedSubdirs(spec);
-+ (void) checkDuplicateFiles(spec, buildrootL);
-+ (void) checkUnpackagedSubdirs(spec, buildrootL);
- }
-
- return res;
diff --git a/rpm-5.4.9-support-signatures-and-digest-disablers.patch b/rpm-5.4.9-support-signatures-and-digest-disablers.patch
deleted file mode 100644
index 4d7b1ab..0000000
--- a/rpm-5.4.9-support-signatures-and-digest-disablers.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d8fcc3cbeec4defb5babde5bd09ea294dd3fd08b Mon Sep 17 00:00:00 2001
-From: Robert Yang <liezhi.yang at windriver.com>
-Date: Sun, 3 Jul 2016 19:01:59 -0700
-Subject: [PATCH] system.h/query.c: support nosignature
-
-* Define SUPPORT_NOSIGNATURES to 1 in system.h
-* !QVA_ISSET(qva->qva_flags, SIGNATURE) -> QVA_ISSET(qva->qva_flags, SIGNATURE),
- otherwise, when use --nosignature would read database and verify
- signature, this is not expected.
-
-Upstream-Status: Submitting [Sent email to rpm-devel at rpm5.org]
-
-Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
----
- lib/query.c | 6 +++---
- system.h | 4 ++--
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/lib/query.c b/lib/query.c
-index 50a7453..b761d76 100644
---- a/lib/query.c
-+++ b/lib/query.c
-@@ -954,19 +954,19 @@ JBJDEBUG((stderr, "--> %s(%p,%p,%p)\n", __FUNCTION__, ts, qva, argv));
- vsflags = (rpmVSFlags) rpmExpandNumeric("%{?_vsflags_query}");
- vsflags = (rpmVSFlags) 0; /* XXX FIXME: ignore default disablers. */
- #if defined(SUPPORT_NOSIGNATURES)
-- if (!QVA_ISSET(qva->qva_flags, DIGEST)) {
-+ if (QVA_ISSET(qva->qva_flags, DIGEST)) {
- VSF_SET(vsflags, NOSHA1HEADER);
- VSF_SET(vsflags, NOMD5HEADER);
- VSF_SET(vsflags, NOSHA1);
- VSF_SET(vsflags, NOMD5);
- }
-- if (!QVA_ISSET(qva->qva_flags, SIGNATURE)) {
-+ if (QVA_ISSET(qva->qva_flags, SIGNATURE)) {
- VSF_SET(vsflags, NODSAHEADER);
- VSF_SET(vsflags, NORSAHEADER);
- VSF_SET(vsflags, NODSA);
- VSF_SET(vsflags, NORSA);
- }
-- if (!QVA_ISSET(qva->qva_flags, HDRCHK)) {
-+ if (QVA_ISSET(qva->qva_flags, HDRCHK)) {
- VSF_SET(vsflags, NOHDRCHK);
- }
- VSF_CLR(vsflags, NEEDPAYLOAD); /* XXX needed? */
-diff --git a/system.h b/system.h
-index 2ff8906..ad4619a 100644
---- a/system.h
-+++ b/system.h
-@@ -787,9 +787,9 @@ static inline const char *rcsid(const char *p) { \
- #define SUPPORT_I18NSTRING_TYPE 1
-
- /**
-- * Eliminate signature/digest disablers.
-+ * Signature/digest disablers.
- */
--#undef SUPPORT_NOSIGNATURES
-+#define SUPPORT_NOSIGNATURES 1
-
- /**
- * Permit ar(1) payloads. Disabled while rpmio/iosm.c is under development.
---
-2.9.0
diff --git a/rpm-5.4.9-update-rpmfc-when-removing-dependencies-on-self.patch b/rpm-5.4.9-update-rpmfc-when-removing-dependencies-on-self.patch
deleted file mode 100644
index c3b9e35..0000000
--- a/rpm-5.4.9-update-rpmfc-when-removing-dependencies-on-self.patch
+++ /dev/null
@@ -1,140 +0,0 @@
---- rpm-5.4.9/lib/rpmfc.c.fc_deps~ 2012-05-15 02:23:23.157740011 +0200
-+++ rpm-5.4.9/lib/rpmfc.c 2012-05-15 02:24:42.863147557 +0200
-@@ -1763,12 +1763,14 @@ static int rpmfcGenerateScriptletDeps(co
- return rc;
- }
-
--static void removeSillyDeps(Header h) {
-+static unsigned removeSillyDeps(Header h, rpmfc fc) {
- HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
-- int xx, i, rnum, removed = 0;
-+ int xx;
-+ unsigned i, rnum, removed = 0;
- const char **deps = NULL;
- const char **versions = NULL;
- evrFlags *flags = NULL;
-+ int *newpos = NULL, *ddictxPos = NULL;
-
- he->tag = RPMTAG_REQUIRENAME;
- xx = headerGet(h, he, 0);
-@@ -1783,18 +1785,32 @@ static void removeSillyDeps(Header h) {
- xx = headerGet(h, he, 0);
- flags = (evrFlags*)he->p.ui32p;
-
-+ if (fc && fc->requires != NULL && fc->ddictx != NULL) {
-+ newpos = alloca(he->c*sizeof(newpos[0]));
-+ if (fc->ddictx)
-+ ddictxPos = alloca(fc->ddictx->nvals*sizeof(ddictxPos[0]));
-+ }
- for (i = 0; i < rnum-removed; i++) {
- if (removed) {
- deps[i] = deps[i+removed];
- versions[i] = versions[i+removed];
- flags[i] = flags[i+removed];
-+ if (fc) {
-+ fc->requires->N[i] = fc->requires->N[i+removed];
-+ fc->requires->EVR[i] = fc->requires->EVR[i+removed];
-+ fc->requires->Flags[i] = fc->requires->Flags[i+removed];
-+ }
- }
-+ if (fc && fc->requires != NULL && fc->ddictx != NULL)
-+ newpos[i+removed] = i;
- rpmds req = rpmdsSingle(RPMTAG_REQUIRENAME, deps[i], versions[i], flags[i]);
- rpmds prov = rpmdsNew(h, (*deps[i] == '/' && !*versions[i]) ? RPMTAG_BASENAMES : RPMTAG_PROVIDENAME, 0);
- if (rpmdsMatch(req, prov)) {
- if (flags[i] & RPMSENSE_SCRIPT_PRE)
- rpmlog(RPMLOG_ERR, "Requires(pre): on dependency provided by self: %s\n", rpmdsDNEVR(req));
- else {
-+ if (fc && fc->requires != NULL && fc->ddictx != NULL)
-+ newpos[i+removed] = -1;
- rpmlog(RPMLOG_NOTICE, "Removing dependency on self: %s\n", rpmdsDNEVR(req));
- removed++;
- i--;
-@@ -1803,6 +1819,52 @@ static void removeSillyDeps(Header h) {
- req = rpmdsFree(req);
- prov = rpmdsFree(prov);
- }
-+ if (fc && fc->requires != NULL && fc->ddictx != NULL && removed) {
-+ fc->requires->Count -= removed;
-+ unsigned rx = 0;
-+ for (i = 0; i < fc->ddictx->nvals-rx; i++) {
-+ unsigned ix;
-+ unsigned char deptype;
-+
-+ ix = fc->ddictx->vals[i+rx];
-+ deptype = ((ix >> 24) & 0xff);
-+ ix &= 0x00ffffff;
-+
-+ if (deptype == 'P') {
-+ ddictxPos[i+rx] = i;
-+ fc->ddictx->vals[i] = fc->ddictx->vals[i+rx];
-+ continue;
-+ }
-+ if (newpos[ix] == -1) {
-+ ddictxPos[i+rx] = -1;
-+ i--, rx++;
-+ }
-+ else
-+ {
-+ ddictxPos[i+rx] = i;
-+ fc->ddictx->vals[i] = (deptype << 24) | (newpos[ix] & 0x00ffffff);
-+ }
-+ }
-+ fc->ddictx->nvals -= rx;
-+
-+ for (i = 0; i < fc->fddictn->nvals; i++) {
-+ rx = 0;
-+ if (fc->fddictn->vals[i]) {
-+ unsigned j, ix = fc->fddictx->vals[i];
-+ for (j = 0, rx = 0; j < fc->fddictn->vals[i]; j++, ix++) {
-+ if (ddictxPos[ix] == -1)
-+ rx++;
-+ if (j == 0 || fc->fddictx->vals[i] == -1)
-+ fc->fddictx->vals[i] = ddictxPos[ix];
-+ }
-+ }
-+ if (rx)
-+ fc->fddictn->vals[i] -= rx;
-+ if (fc->fddictn->vals[i] == 0)
-+ fc->fddictx->vals[i] = 0;
-+ }
-+ }
-+
- if (removed) {
- he->tag = RPMTAG_REQUIRENAME;
- he->t = RPM_STRING_ARRAY_TYPE;
-@@ -1820,6 +1882,7 @@ static void removeSillyDeps(Header h) {
- headerMod(h, he, 0);
- }
-
-+ return removed;
- }
-
- rpmRC rpmfcGenerateDepends(void * _spec, void * _pkg)
-@@ -1855,7 +1918,7 @@ rpmRC rpmfcGenerateDepends(void * _spec,
- if (internaldeps == 0) {
- /* ... then generate dependencies using %{__find_requires} et al. */
- rc = rpmfcGenerateDependsHelper(spec, pkg, fi);
-- removeSillyDeps(pkg->header);
-+ removeSillyDeps(pkg->header, NULL);
- printDeps(pkg->header);
- return rc;
- }
-@@ -2045,6 +2108,8 @@ assert(he->p.ptr != NULL);
- /*@=nullpass@*/
- }
-
-+ removeSillyDeps(pkg->header, fc);
-+
- /* Add dependency dictionary(#dependencies) */
- he->tag = RPMTAG_DEPENDSDICT;
- he->t = RPM_UINT32_TYPE;
-@@ -2073,8 +2138,6 @@ assert(ac == (int)he->c);
- xx = headerPut(pkg->header, he, 0);
- }
-
-- removeSillyDeps(pkg->header);
--
- printDeps(pkg->header);
-
- if (fc != NULL && _rpmfc_debug) {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/98d9fc8e9cc559da146eb1be26fab0359a01a5c2
More information about the pld-cvs-commit
mailing list