From f459a837019356cfa6d7a0a0d7aa5417477da002 Mon Sep 17 00:00:00 2001 From: akdengi Date: Wed, 27 Mar 2013 12:51:15 +0400 Subject: [PATCH] Update to RPM 5.4. Backport from Fresh --- .abf.yml | 4 +- legacy_compat.macros | 1 - rpm-5.3.10-doxygen-1.7.4-bug.patch | 12 - rpm-5.3.11-fix-syslog-b0rkage.patch | 38 - rpm-5.3.12-55810-rpmevrcmp-again-grf.patch | 30 +- rpm-5.3.12-cve-2012-0815,0060,0061.patch | 146 -- rpm-5.3.12.vendor.ROSA.patch | 15 - rpm-5.3.8-fix-russian-typo.patch | 11 - ....8-rpmsq-ignored-signal-return-value.patch | 11 - ...p-up-to-default-xz-compression-level.patch | 11 + rpm-5.4.10-dlopen-embedded-interpreters.patch | 924 ++++++++++++ ...te-rpmfc-dependencies-from-doc-files.patch | 51 + ...4.10-duplicate_files_terminate_build.patch | 67 + ...-files-listed-twice-terminates-build.patch | 74 + ...on-saving-error-pages-as-target-file.patch | 56 + rpm-5.4.10-fix-uninitialized-variable.patch | 11 + ...rg-and-mandriva-perl-dep-gen-changes.patch | 503 +++++++ ...ildroot-library-dirs-for-uclibc-deps.patch | 57 + ....10-support-ignore-arch-and-os-again.patch | 45 + rpm-5.4.10-trigtrans.patch | 823 +++++++++++ ...0-unpackaged_subdirs_terminate_build.patch | 67 + rpm-5.4.10-update-and-use-brp-compress.patch | 59 + rpm-5.4.4-add-_specfile-macro.patch | 10 + ...llow-installation-of-repackaged-rpms.patch | 11 + ...endencies-as-overlapping-for-removal.patch | 16 + rpm-5.4.4-drop-base-dependencies.patch | 15 + ...-auto-generated-pkgconfig-dependency.patch | 23 + rpm-5.4.4-enable-rpmgio-net-transport.patch | 12 - ...avoid-excessive-output-from-eu-strip.patch | 11 + ...-removal-of-overlapping-dependencies.patch | 95 ++ ...ckage-with-epoch-possible-to-upgrade.patch | 22 + ...ob-wildcards-for-loading-macro-files.patch | 24 + ..._builddir-properly-to-find-debuginfo.patch | 23 + rpm-5.4.4-pkgconfigdeps-check-path.patch | 76 + ....4-really-always-invoke-clean-at-end.patch | 41 + rpm-5.4.4-rpmbuild-withoutclean.patch | 10 + ...4.4-use-dependency-type-for-ordering.patch | 84 ++ rpm-5.4.5-break-out-of-elf-link-loop.patch | 45 + rpm-5.4.5-desktop-provides.patch | 70 + ...dencies-with-non-script-dependencies.patch | 36 + ...hp-dependencies-only-when-executable.patch | 12 + rpm-5.4.5-drop-some-interpreter-deps.patch | 32 + ...reter-resolving-breaking-uclibc-deps.patch | 58 + ...neration-of-uclibc-deps-on-non-lib64.patch | 11 + ...es-for-internal-dependency-generator.patch | 84 ++ rpm-5.4.5-libsql-conditional.patch | 12 + rpm-5.4.5-patchset_16004.patch | 405 ++++++ rpm-5.4.5-patchset_16005.patch | 11 + rpm-5.4.5-patchset_16022.patch | 222 +++ rpm-5.4.5-python-export-spec-macros.patch | 70 + ...mfc-apply-python-coloring-from-magic.patch | 10 + rpm-5.4.5-rpmfc-use-strlen-not-sizeof.patch | 11 + rpm-5.4.5-rubygems-add-missing-newline.patch | 16 + ...r-for-scripts-using-env-in-shellbang.patch | 22 + ...p-dependencies-for-character-devices.patch | 13 + ...4.5-update-mono-dependency-generator.patch | 268 ++++ ...en-removing-overlapping-dependencies.patch | 81 ++ ...perform-linking-against-internal-lua.patch | 36 + ...ose-equal-only-deps-when-overlapping.patch | 70 + rpm-5.4.7-change-to-debuginfo-suffix.patch | 21 + ...-trigger-dependencies-as-overlapping.patch | 12 + ...ame-provides-for-dsos-with-no-soname.patch | 18 + ...-fix-generation-of-ruby-abi-provides.patch | 48 + rpm-5.4.7-fix-minor-memleaks.patch | 25 + ...te-devel-provides-outside-of-libdirs.patch | 36 + ...-hdrfmt-fix-unitialized-argv-element.patch | 14 + rpm-5.4.7-kmod-dependencies.patch | 66 + ....7-mono-find-requires-strip-newlines.patch | 11 + ...4.7-no-seqid_init-on-rdonly-database.patch | 11 + ...vel-deps-for-symlinks-start-with-lib.patch | 44 + ...hon-deps-for-executables-and-modules.patch | 50 + ...oved-dependencies-are-generated-from.patch | 17 + ...rpmds-dont-try-fopen-empty-filenames.patch | 11 + ...valid-free-if-not-_defaultdocdir-set.patch | 11 + ...-rpmfc-strdup-EVR-in-overlap-removal.patch | 11 + rpm-5.4.7-rpmv3-support.patch | 370 +++++ rpm-5.4.7-use-bdb-5.2.patch | 29 + ...h-style-by-default-and-drop-rtld-dep.patch | 29 + rpm-5.4.8-URPM-build-fix.patch | 13 + rpm-5.4.8-add-armv7l-specific-macros.patch | 36 + ...4.8-dont-show-suggests-with-requires.patch | 62 + rpm-5.4.9-add-distepoch-rpmlib-feature.patch | 14 + ...-filetriggers-regex-matching-support.patch | 111 ++ ...add-matches-as-arguments-to-triggers.patch | 135 ++ ...-using-rpmdsMerge-with-filepath-tags.patch | 84 ++ rpm-5.4.9-add-x32-macros.patch | 23 + rpm-5.4.9-avoid-dependencies-on-self.patch | 85 ++ ...ath-for-dirname-filetrigger-matching.patch | 23 + rpm-5.4.9-disable-l10ndir.patch | 11 + ...-disable-support-for-i18nstring-type.patch | 11 + rpm-5.4.9-ditch-install-info-macros.patch | 18 + ...dependency-rpmlib-feature-dependency.patch | 40 + ...9-dont-remap-i18n-strings-if-enabled.patch | 14 + rpm-5.4.9-drop-dead-cputoolize-macro.patch | 11 + ...debuginfo-strip-reloc-debug-sections.patch | 112 ++ rpm-5.4.9-fix-mdvbz62979.patch | 18 + rpm-5.4.9-fix-rpm_qa-pattern.patch | 11 + rpm-5.4.9-fix-russian-typo.patch | 11 + rpm-5.4.9-fix-typo-in-rpmtag-header.patch | 11 + ...tch => rpm-5.4.9-fix-verify-segfault.patch | 18 +- rpm-5.4.9-font-provides.patch | 60 + rpm-5.4.9-generate-haskell-dependencies.patch | 161 +++ rpm-5.4.9-keep-loading-script-macros.patch | 81 ++ ...-fix-strings-lacking-null-terminator.patch | 32 + ....patch => rpm-5.4.9-no-doc-conflicts.patch | 16 +- ... rpm-5.4.9-non-pre-scripts-dont-fail.patch | 28 +- rpm-5.4.9-package-name.patch | 13 + ...c-extract-dependencies-for-all-files.patch | 11 + rpm-5.4.9-rpmpython-fix-input.patch | 11 + rpm-5.4.9-ruby1.9-fixes.patch | 114 ++ rpm-5.4.9-specspo.patch | 122 ++ ...droot-away-from-duplicate-files-list.patch | 97 ++ ...port-signatures-and-digest-disablers.patch | 11 + ...c-when-removing-dependencies-on-self.patch | 140 ++ ...dated-pld-mandriva-php-dep-generator.patch | 245 ++++ rpm-GROUPS | 29 - rpm.rpmlintrc | 4 + rpm.spec | 1264 +++++++++++++++-- 118 files changed, 8770 insertions(+), 459 deletions(-) delete mode 100644 rpm-5.3.10-doxygen-1.7.4-bug.patch delete mode 100644 rpm-5.3.11-fix-syslog-b0rkage.patch delete mode 100644 rpm-5.3.12-cve-2012-0815,0060,0061.patch delete mode 100644 rpm-5.3.8-fix-russian-typo.patch delete mode 100644 rpm-5.3.8-rpmsq-ignored-signal-return-value.patch create mode 100644 rpm-5.4.10-bump-up-to-default-xz-compression-level.patch create mode 100644 rpm-5.4.10-dlopen-embedded-interpreters.patch create mode 100644 rpm-5.4.10-dont-try-generate-rpmfc-dependencies-from-doc-files.patch create mode 100644 rpm-5.4.10-duplicate_files_terminate_build.patch create mode 100644 rpm-5.4.10-files-listed-twice-terminates-build.patch create mode 100644 rpm-5.4.10-fix-neon-saving-error-pages-as-target-file.patch create mode 100644 rpm-5.4.10-fix-uninitialized-variable.patch create mode 100644 rpm-5.4.10-merge-rpm.org-and-mandriva-perl-dep-gen-changes.patch create mode 100644 rpm-5.4.10-search-through-buildroot-library-dirs-for-uclibc-deps.patch create mode 100644 rpm-5.4.10-support-ignore-arch-and-os-again.patch create mode 100644 rpm-5.4.10-trigtrans.patch create mode 100644 rpm-5.4.10-unpackaged_subdirs_terminate_build.patch create mode 100644 rpm-5.4.10-update-and-use-brp-compress.patch create mode 100644 rpm-5.4.4-add-_specfile-macro.patch create mode 100644 rpm-5.4.4-allow-installation-of-repackaged-rpms.patch create mode 100644 rpm-5.4.4-dont-consider-ranged-dependencies-as-overlapping-for-removal.patch create mode 100644 rpm-5.4.4-drop-base-dependencies.patch create mode 100644 rpm-5.4.4-drop-useless-auto-generated-pkgconfig-dependency.patch delete mode 100644 rpm-5.4.4-enable-rpmgio-net-transport.patch create mode 100644 rpm-5.4.4-find-debuginfo-avoid-excessive-output-from-eu-strip.patch create mode 100644 rpm-5.4.4-fix-removal-of-overlapping-dependencies.patch create mode 100644 rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch create mode 100644 rpm-5.4.4-glob-wildcards-for-loading-macro-files.patch create mode 100644 rpm-5.4.4-pass-_builddir-properly-to-find-debuginfo.patch create mode 100644 rpm-5.4.4-pkgconfigdeps-check-path.patch create mode 100644 rpm-5.4.4-really-always-invoke-clean-at-end.patch create mode 100644 rpm-5.4.4-rpmbuild-withoutclean.patch create mode 100644 rpm-5.4.4-use-dependency-type-for-ordering.patch create mode 100644 rpm-5.4.5-break-out-of-elf-link-loop.patch create mode 100644 rpm-5.4.5-desktop-provides.patch create mode 100644 rpm-5.4.5-do-not-merge-script-dependencies-with-non-script-dependencies.patch create mode 100644 rpm-5.4.5-dont-generate-php-dependencies-only-when-executable.patch create mode 100644 rpm-5.4.5-drop-some-interpreter-deps.patch create mode 100644 rpm-5.4.5-fix-elf-interpreter-resolving-breaking-uclibc-deps.patch create mode 100644 rpm-5.4.5-fix-generation-of-uclibc-deps-on-non-lib64.patch create mode 100644 rpm-5.4.5-fix-removal-of-overlapping-dependencies-for-internal-dependency-generator.patch create mode 100644 rpm-5.4.5-libsql-conditional.patch create mode 100644 rpm-5.4.5-patchset_16004.patch create mode 100644 rpm-5.4.5-patchset_16005.patch create mode 100644 rpm-5.4.5-patchset_16022.patch create mode 100644 rpm-5.4.5-python-export-spec-macros.patch create mode 100644 rpm-5.4.5-rpmfc-apply-python-coloring-from-magic.patch create mode 100644 rpm-5.4.5-rpmfc-use-strlen-not-sizeof.patch create mode 100644 rpm-5.4.5-rubygems-add-missing-newline.patch create mode 100644 rpm-5.4.5-set-proper-file-color-for-scripts-using-env-in-shellbang.patch create mode 100644 rpm-5.4.5-skip-dependencies-for-character-devices.patch create mode 100644 rpm-5.4.5-update-mono-dependency-generator.patch create mode 100644 rpm-5.4.5-update-rpmfc-when-removing-overlapping-dependencies.patch create mode 100644 rpm-5.4.7-actually-perform-linking-against-internal-lua.patch create mode 100644 rpm-5.4.7-always-choose-equal-only-deps-when-overlapping.patch create mode 100644 rpm-5.4.7-change-to-debuginfo-suffix.patch create mode 100644 rpm-5.4.7-dont-consider-trigger-dependencies-as-overlapping.patch create mode 100644 rpm-5.4.7-dont-generate-soname-provides-for-dsos-with-no-soname.patch create mode 100644 rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch create mode 100644 rpm-5.4.7-fix-minor-memleaks.patch create mode 100644 rpm-5.4.7-generate-devel-provides-outside-of-libdirs.patch create mode 100644 rpm-5.4.7-hdrfmt-fix-unitialized-argv-element.patch create mode 100644 rpm-5.4.7-kmod-dependencies.patch create mode 100644 rpm-5.4.7-mono-find-requires-strip-newlines.patch create mode 100644 rpm-5.4.7-no-seqid_init-on-rdonly-database.patch create mode 100644 rpm-5.4.7-only-generate-devel-deps-for-symlinks-start-with-lib.patch create mode 100644 rpm-5.4.7-only-generate-ruby-and-python-deps-for-executables-and-modules.patch create mode 100644 rpm-5.4.7-print-name-of-files-removed-dependencies-are-generated-from.patch create mode 100644 rpm-5.4.7-rpmds-dont-try-fopen-empty-filenames.patch create mode 100644 rpm-5.4.7-rpmfc-fix-invalid-free-if-not-_defaultdocdir-set.patch create mode 100644 rpm-5.4.7-rpmfc-strdup-EVR-in-overlap-removal.patch create mode 100644 rpm-5.4.7-rpmv3-support.patch create mode 100644 rpm-5.4.7-use-bdb-5.2.patch create mode 100644 rpm-5.4.7-use-gnu-hash-style-by-default-and-drop-rtld-dep.patch create mode 100644 rpm-5.4.8-URPM-build-fix.patch create mode 100644 rpm-5.4.8-add-armv7l-specific-macros.patch create mode 100644 rpm-5.4.8-dont-show-suggests-with-requires.patch create mode 100644 rpm-5.4.9-add-distepoch-rpmlib-feature.patch create mode 100644 rpm-5.4.9-add-filetriggers-regex-matching-support.patch create mode 100644 rpm-5.4.9-add-matches-as-arguments-to-triggers.patch create mode 100644 rpm-5.4.9-add-support-for-using-rpmdsMerge-with-filepath-tags.patch create mode 100644 rpm-5.4.9-add-x32-macros.patch create mode 100644 rpm-5.4.9-avoid-dependencies-on-self.patch create mode 100644 rpm-5.4.9-avoid-double-slash-in-path-for-dirname-filetrigger-matching.patch create mode 100644 rpm-5.4.9-disable-l10ndir.patch create mode 100644 rpm-5.4.9-disable-support-for-i18nstring-type.patch create mode 100644 rpm-5.4.9-ditch-install-info-macros.patch create mode 100644 rpm-5.4.9-dont-add-versioneddependency-rpmlib-feature-dependency.patch create mode 100644 rpm-5.4.9-dont-remap-i18n-strings-if-enabled.patch create mode 100644 rpm-5.4.9-drop-dead-cputoolize-macro.patch create mode 100644 rpm-5.4.9-find-debuginfo-strip-reloc-debug-sections.patch create mode 100644 rpm-5.4.9-fix-mdvbz62979.patch create mode 100644 rpm-5.4.9-fix-rpm_qa-pattern.patch create mode 100644 rpm-5.4.9-fix-russian-typo.patch create mode 100644 rpm-5.4.9-fix-typo-in-rpmtag-header.patch rename rpm-5.3.12-fix-verify-segfault.patch => rpm-5.4.9-fix-verify-segfault.patch (50%) create mode 100644 rpm-5.4.9-font-provides.patch create mode 100644 rpm-5.4.9-generate-haskell-dependencies.patch create mode 100644 rpm-5.4.9-keep-loading-script-macros.patch create mode 100644 rpm-5.4.9-mire-fix-strings-lacking-null-terminator.patch rename rpm-5.3.8-no-doc-conflicts.patch => rpm-5.4.9-no-doc-conflicts.patch (74%) rename rpm-5.3.8-non-pre-scripts-dont-fail.patch => rpm-5.4.9-non-pre-scripts-dont-fail.patch (69%) create mode 100644 rpm-5.4.9-package-name.patch create mode 100644 rpm-5.4.9-rpmfc-extract-dependencies-for-all-files.patch create mode 100644 rpm-5.4.9-rpmpython-fix-input.patch create mode 100644 rpm-5.4.9-ruby1.9-fixes.patch create mode 100644 rpm-5.4.9-specspo.patch create mode 100644 rpm-5.4.9-strip-buildroot-away-from-duplicate-files-list.patch create mode 100644 rpm-5.4.9-support-signatures-and-digest-disablers.patch create mode 100644 rpm-5.4.9-update-rpmfc-when-removing-dependencies-on-self.patch create mode 100644 rpm-5.4.9-updated-pld-mandriva-php-dep-generator.patch delete mode 100644 rpm-GROUPS create mode 100644 rpm.rpmlintrc diff --git a/.abf.yml b/.abf.yml index 81d802e..a24ac54 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,3 +1,3 @@ sources: - "cpu-os-macros.tar.gz": 68dbf0b8b9c625c59ad607cf0eda665087cead58 - "rpm-5.3.12.tar.xz": 81cdbf2d0f432abef56444eeabf9c2eab1d25f8a + "cpu-os-macros.tar.gz": 99c5fa561dd0d897bfa8cd97f2aa60781bc578d4 + "rpm-5.4.10.tar.gz": 8b525f6762d0a4f3bd5af44971f1199c6805d7dd diff --git a/legacy_compat.macros b/legacy_compat.macros index c29b0c8..073f24e 100644 --- a/legacy_compat.macros +++ b/legacy_compat.macros @@ -57,7 +57,6 @@ rpm-helper>rpm # enabling this by default is to be dropped ASAP -%_dependency_whiteout %_dependency_whiteout_mandriva %_legacy_compat_non_pre_scripts_dont_fail 1 %_legacy_compat_all \ diff --git a/rpm-5.3.10-doxygen-1.7.4-bug.patch b/rpm-5.3.10-doxygen-1.7.4-bug.patch deleted file mode 100644 index c44d5f9..0000000 --- a/rpm-5.3.10-doxygen-1.7.4-bug.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- rpm-5.3.10/tools/rpmdigest.c.doxygen~ 2009-10-10 15:57:00.000000000 +0200 -+++ rpm-5.3.10/tools/rpmdigest.c 2011-05-16 09:28:13.242200969 +0200 -@@ -898,8 +898,7 @@ The following two options are useful onl - N_("\ - When checking, the input should be a former output of this program. The\n\ - default mode is to print a line with digest, a character indicating type\n\ --(`*' for binary, ` ' for text), and name for each FILE.\n\ --"), NULL }, -+(`*' for binary, ` ' for text), and name for each FILE.\n"), NULL }, - - POPT_TABLEEND - }; diff --git a/rpm-5.3.11-fix-syslog-b0rkage.patch b/rpm-5.3.11-fix-syslog-b0rkage.patch deleted file mode 100644 index 8c177a0..0000000 --- a/rpm-5.3.11-fix-syslog-b0rkage.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- rpm-5.3.11/lib/psm.c.syslog~ 2011-05-25 16:21:51.465345513 +0200 -+++ rpm-5.3.11/lib/psm.c 2011-05-25 16:21:54.565306757 +0200 -@@ -65,6 +65,11 @@ - - #include "debug.h" - -+#if HAVE_SYSLOG -+#include -+#include -+#endif -+ - #define _PSM_DEBUG 0 - /*@unchecked@*/ - int _psm_debug = _PSM_DEBUG; -@@ -3070,9 +3075,9 @@ assert(psm->mi == NULL); - else - rc = rpmdbAdd(rpmtsGetRdb(ts), tid, fi->h, NULL); - (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_DBADD), 0); --#if defined(HAVE_SYSLOG_H) && defined(RPM_VENDOR_MANDRIVA) /* log-install-remove-to-syslog */ -+#if defined(HAVE_SYSLOG) && defined(RPM_VENDOR_MANDRIVA) /* log-install-remove-to-syslog */ - { -- char *s, fmt; -+ char *s, *fmt; - fmt = rpmExpand("%{___NVRA}", NULL); - s = headerSprintf(fi->h, fmt, - rpmTagTable, rpmHeaderFormats, NULL); -@@ -3110,9 +3115,9 @@ assert(psm->te != NULL); - (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_DBREMOVE), 0); - rc = rpmdbRemove(rpmtsGetRdb(ts), rpmtsGetTid(ts), fi->record, NULL); - (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_DBREMOVE), 0); --#if defined(HAVE_SYSLOG_H) && defined(RPM_VENDOR_MANDRIVA) /* log-install-remove-to-syslog */ -+#if defined(HAVE_SYSLOG) && defined(RPM_VENDOR_MANDRIVA) /* log-install-remove-to-syslog */ - { -- char *s, fmt; -+ char *s, *fmt; - fmt = rpmExpand("%{___NVRA}", NULL); - s = headerSprintf(fi->h, fmt, - rpmTagTable, rpmHeaderFormats, NULL); diff --git a/rpm-5.3.12-55810-rpmevrcmp-again-grf.patch b/rpm-5.3.12-55810-rpmevrcmp-again-grf.patch index dddc1f4..a97f9dd 100644 --- a/rpm-5.3.12-55810-rpmevrcmp-again-grf.patch +++ b/rpm-5.3.12-55810-rpmevrcmp-again-grf.patch @@ -1,22 +1,32 @@ ---- rpm-5.3.12/lib/rpmds.c.55810~ 2011-07-12 18:15:29.016085065 +0200 -+++ rpm-5.3.12/lib/rpmds.c 2011-07-12 18:15:56.300506314 +0200 -@@ -4333,7 +4333,7 @@ assert((rpmdsFlags(B) & RPMSENSE_SENSEMA +--- rpm-5.3.12/lib/rpmds.c.55810~ 2011-07-12 11:54:08.000000000 +0200 ++++ rpm-5.3.12/lib/rpmds.c 2011-07-13 16:51:59.699924504 +0200 +@@ -4333,9 +4333,10 @@ assert((rpmdsFlags(B) & RPMSENSE_SENSEMA case 'D': ix = RPMEVR_D; /*@switchbreak@*/break; } #if defined(RPM_VENDOR_MANDRIVA) /* mdvbz#55810 */ - if(ix == RPMEVR_R && (bFlags & (~RPMSENSE_GREATER & RPMSENSE_EQUAL)) +- && *(b->F[ix]) == '\0') +- break; + if(ix >= RPMEVR_R && (bFlags & (~RPMSENSE_GREATER & RPMSENSE_EQUAL)) - && *(b->F[ix]) == '\0') - break; ++ && !(ix == RPMEVR_D && (bFlags & RPMSENSE_LESS)) ++ && *(b->F[ix]) == '\0') ++ break; if (a->F[ix] && b->F[ix]) ---- rpm-5.3.12/rpmdb/rpmevr.c.55810~ 2011-07-12 18:15:40.964269535 +0200 -+++ rpm-5.3.12/rpmdb/rpmevr.c 2011-07-12 18:15:42.897299380 +0200 -@@ -286,7 +286,7 @@ assert(b->F[RPMEVR_D] != NULL); + #else + if (a->F[ix] && *a->F[ix] && b->F[ix] && *b->F[ix]) +--- rpm-5.3.12/rpmdb/rpmevr.c.55810~ 2011-07-12 11:54:27.000000000 +0200 ++++ rpm-5.3.12/rpmdb/rpmevr.c 2011-07-13 16:51:59.700924519 +0200 +@@ -286,9 +286,10 @@ assert(b->F[RPMEVR_D] != NULL); case 'D': ix = RPMEVR_D; /*@switchbreak@*/break; } #if defined(RPM_VENDOR_MANDRIVA) /* mdvbz#55810 */ - if(ix == RPMEVR_R && (b->Flags & (~RPMSENSE_GREATER & RPMSENSE_EQUAL)) +- && *(b->F[ix]) == '\0') +- break; + if(ix >= RPMEVR_R && (b->Flags & (~RPMSENSE_GREATER & RPMSENSE_EQUAL)) - && *(b->F[ix]) == '\0') - break; ++ && !(ix == RPMEVR_D && (b->Flags & RPMSENSE_LESS)) ++ && *(b->F[ix]) == '\0') ++ break; #endif + + rc = compare_values(a->F[ix], b->F[ix]); diff --git a/rpm-5.3.12-cve-2012-0815,0060,0061.patch b/rpm-5.3.12-cve-2012-0815,0060,0061.patch deleted file mode 100644 index 2214240..0000000 --- a/rpm-5.3.12-cve-2012-0815,0060,0061.patch +++ /dev/null @@ -1,146 +0,0 @@ ---- rpm-5.3.12/rpmdb/header.c 2010-11-11 22:31:02.000000000 +0300 -+++ rpm-5.3.12/rpmdb/header.c 2012-04-17 13:48:41.387629216 +0400 -@@ -516,7 +516,6 @@ - - assert(dataEnd != NULL); - assert(entry != NULL); --assert(dl == 0); /* XXX eliminate dl argument (its always 0) */ - - memset(&ieprev, 0, sizeof(ieprev)); - for (; il > 0; il--, pe++) { -@@ -1031,10 +1030,13 @@ - - entry->info.type = (rpmuint32_t) htonl(pe->type); - entry->info.count = (rpmuint32_t) htonl(pe->count); -+ entry->info.tag = (rpmuint32_t) htonl(pe->tag); - -- if (hdrchkType(entry->info.type)) -+ if (!ENTRY_IS_REGION(entry)) - goto errxit; -- if (hdrchkTags(entry->info.count)) -+ if (entry->info.type != REGION_TAG_TYPE) -+ goto errxit; -+ if (entry->info.count != REGION_TAG_COUNT) - goto errxit; - - { rpmint32_t off = (rpmint32_t) ntohl(pe->offset); -@@ -1051,7 +1053,6 @@ - ril = (rpmuint32_t)(rdl/sizeof(*pe)); - if (hdrchkTags(ril) || hdrchkData(rdl)) - goto errxit; -- entry->info.tag = (rpmuint32_t) htonl(pe->tag); - } else { - ril = il; - /*@-sizeoftype@*/ -@@ -1075,13 +1076,12 @@ - indexEntry newEntry = entry + ril; - size_t ne = (h->indexUsed - ril); - rpmint32_t rid = entry->info.offset+1; -- rpmuint32_t rc; - - /* Load dribble entries from region. */ -- rc = regionSwab(newEntry, (rpmuint32_t)ne, 0, pe+ril, dataStart, dataEnd, rid); -- if (rc == 0) -+ rdlen = regionSwab(newEntry, (rpmuint32_t)ne, rdlen, pe+ril, -+ dataStart, dataEnd, rid); -+ if (rdlen == 0) - goto errxit; -- rdlen += rc; - - { indexEntry firstEntry = newEntry; - size_t save = h->indexUsed; -@@ -1103,6 +1103,10 @@ - h->indexUsed += ne; - } - } -+ -+ rdlen += REGION_TAG_COUNT; -+ if (rdlen != dl) -+ goto errxit; - } - - h->flags &= ~HEADERFLAG_SORTED; ---- rpm-5.3.12/rpmdb/header_internal.c 2010-11-03 17:06:06.000000000 +0300 -+++ rpmdb/header_internal.c 2012-04-17 13:48:41.388629216 +0400 -@@ -58,7 +58,7 @@ - return (int)i; - if (hdrchkAlign(info->type, info->offset)) - return (int)i; -- if (!negate && hdrchkRange((rpmint32_t)dl, info->offset)) -+ if (hdrchkRange((rpmint32_t)dl, info->offset)) - return (int)i; - if (hdrchkData(info->count)) - return (int)i; ---- rpm-5.3.12/rpmdb/pkgio.c 2010-10-18 10:53:08.000000000 +0400 -+++ rpm-5.3.12/rpmdb/pkgio.c 2012-04-17 13:48:41.388629216 +0400 -@@ -869,10 +869,18 @@ - - /* Is there an immutable header region tag? */ - /*@-sizeoftype@*/ -- if (entry->info.tag == RPMTAG_HEADERSIGNATURES -- && entry->info.type == RPM_BIN_TYPE -- && entry->info.count == (rpmTagCount)REGION_TAG_COUNT) -+ if (entry->info.tag == RPMTAG_HEADERSIGNATURES) - { -+ /* Is the region tag sane? */ -+ if (!(entry->info.type == REGION_TAG_TYPE -+ && entry->info.count == (rpmTagCount)REGION_TAG_COUNT)) -+ { -+ (void) snprintf(buf, sizeof(buf), -+ _("region tag: BAD, tag %u type %u offset %d count %u"), -+ (unsigned) entry->info.tag, (unsigned) entry->info.type, -+ (int)entry->info.offset, (unsigned) entry->info.count); -+ goto exit; -+ } - /*@=sizeoftype@*/ - - /* -@@ -900,10 +908,10 @@ - } - dataEnd += REGION_TAG_COUNT; - -- xx = headerVerifyInfo(1, dl, info, &entry->info, 1); -+ xx = headerVerifyInfo(1, il * sizeof(*pe), info, &entry->info, 1); - if (xx != -1 || - !(entry->info.tag == RPMTAG_HEADERSIGNATURES -- && entry->info.type == RPM_BIN_TYPE -+ && entry->info.type == REGION_TAG_TYPE - && entry->info.count == (rpmTagCount)REGION_TAG_COUNT)) - { - (void) snprintf(buf, sizeof(buf), -@@ -1060,11 +1068,19 @@ - - /* Is there an immutable header region tag? */ - /*@-sizeoftype@*/ -- if (!(entry->info.tag == RPMTAG_HEADERIMMUTABLE -- && entry->info.type == RPM_BIN_TYPE -+ if (entry->info.tag != RPMTAG_HEADERIMMUTABLE) { -+ rc = RPMRC_NOTFOUND; -+ goto exit; -+ } -+ -+ /* Is the region tag sane? */ -+ if (!(entry->info.type == RPM_BIN_TYPE - && entry->info.count == (rpmTagCount)REGION_TAG_COUNT)) - { -- rc = RPMRC_NOTFOUND; -+ (void) snprintf(buf, sizeof(buf), -+ _("region tag: BAD, tag %u type %u offset %d count %u"), -+ (unsigned) entry->info.tag, (unsigned) entry->info.type, -+ (int)entry->info.offset, (unsigned) entry->info.count); - goto exit; - } - /*@=sizeoftype@*/ -@@ -1084,10 +1100,10 @@ - (void) memcpy(info, regionEnd, REGION_TAG_COUNT); - regionEnd += REGION_TAG_COUNT; - -- xx = headerVerifyInfo(1, dl, info, &entry->info, 1); -+ xx = headerVerifyInfo(1, il * sizeof(*pe), info, &entry->info, 1); - if (xx != -1 || - !(entry->info.tag == RPMTAG_HEADERIMMUTABLE -- && entry->info.type == RPM_BIN_TYPE -+ && entry->info.type == REGION_TAG_TYPE - && entry->info.count == (rpmTagCount)REGION_TAG_COUNT)) - { - (void) snprintf(buf, sizeof(buf), diff --git a/rpm-5.3.12.vendor.ROSA.patch b/rpm-5.3.12.vendor.ROSA.patch index 20cc8f7..fb97e30 100644 --- a/rpm-5.3.12.vendor.ROSA.patch +++ b/rpm-5.3.12.vendor.ROSA.patch @@ -38,18 +38,3 @@ diff -Nur rpm-5.3.12/macros/mandriva.in rpm-5.3.12.new/macros/mandriva.in # This macro will disable the transaction lock on /var/lib/rpm/__db.*. # This lock is of no use to us and will also result in errors when trying to -diff -Nur rpm-5.3.12/macros/openmamba rpm-5.3.12.new/macros/openmamba ---- rpm-5.3.12/macros/openmamba 2011-07-12 14:08:41.000000000 +0400 -+++ rpm-5.3.12.new/macros/openmamba 2012-04-10 14:45:46.000000000 +0400 -@@ -1,7 +1,7 @@ --%distribution mandriva Linux --%vendor mandriva --%bugurl http://bugs.mandriva.org --%disturl http://mandriva.org -+%distribution rosa Linux -+%vendor rosa -+%bugurl http://bugs.rosalinux.ru/ -+%disturl http://www.rosalab.ru/ - - %_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu} - diff --git a/rpm-5.3.8-fix-russian-typo.patch b/rpm-5.3.8-fix-russian-typo.patch deleted file mode 100644 index fa06e67..0000000 --- a/rpm-5.3.8-fix-russian-typo.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- rpm-5.3.8/po/ru.po.ru_typo~ 2011-02-10 22:25:44.205491002 +0100 -+++ rpm-5.3.8/po/ru.po 2011-02-10 22:25:49.050491001 +0100 -@@ -3015,7 +3015,7 @@ msgstr "(ÕÓÔÁÎÏ×ÌÅÎ)" - #: lib/rpmps.c:299 - #, c-format - msgid "%s conflicts with %s%s" --msgstr "%s ËÏÎÆÌÉËÔÕÅÔ Ó%s%s" -+msgstr "%s ËÏÎÆÌÉËÔÕÅÔ Ó %s%s" - - #: lib/rpmps.c:305 - #, fuzzy, c-format diff --git a/rpm-5.3.8-rpmsq-ignored-signal-return-value.patch b/rpm-5.3.8-rpmsq-ignored-signal-return-value.patch deleted file mode 100644 index 4ba4642..0000000 --- a/rpm-5.3.8-rpmsq-ignored-signal-return-value.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- rpm-5.3.12/rpmio/rpmsq.c.old 2009-03-07 16:38:10.000000000 +0300 -+++ rpm-5.3.12/rpmio/rpmsq.c 2011-08-07 11:06:23.363291460 +0400 -@@ -443,7 +443,7 @@ - int tblsignum = (signum >= 0 ? signum : -signum); - struct sigaction sa; - rpmsig tbl; -- int ret = -1; -+ int ret = (signum >= 0 ? 1 : 0); - int xx; - - xx = DO_LOCK (); diff --git a/rpm-5.4.10-bump-up-to-default-xz-compression-level.patch b/rpm-5.4.10-bump-up-to-default-xz-compression-level.patch new file mode 100644 index 0000000..6e6154c --- /dev/null +++ b/rpm-5.4.10-bump-up-to-default-xz-compression-level.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.10/macros/mandriva.in.xz_level~ 2012-08-22 07:01:25.857226253 +0200 ++++ rpm-5.4.10/macros/mandriva.in 2012-08-22 07:00:39.043500115 +0200 +@@ -124,7 +124,7 @@ end\ + #%_multiarch_required_terminate_build 1 + + # use XZ to compress binary packages: +-%_binary_payload w5.xzdio ++%_binary_payload w.xzdio + + %_duplicate_files_terminate_build 1 + %_unpackaged_subdirs_terminate_build 0 diff --git a/rpm-5.4.10-dlopen-embedded-interpreters.patch b/rpm-5.4.10-dlopen-embedded-interpreters.patch new file mode 100644 index 0000000..c21b5d6 --- /dev/null +++ b/rpm-5.4.10-dlopen-embedded-interpreters.patch @@ -0,0 +1,924 @@ +--- rpm-5.4.10/build/parseScript.c.dlopen~ 2012-04-15 17:04:14.000000000 +0200 ++++ rpm-5.4.10/build/parseScript.c 2012-07-10 20:20:02.578979876 +0200 +@@ -305,6 +305,12 @@ int parseScript(Spec spec, int parsePart + iob = rpmiobRTrim(iob); + p = rpmiobStr(iob); + ++#if __WORDSIZE == 64 /* XXX lame, whatever.. :p */ ++#define SO_EXT "()(64bit)" ++#else ++#define SO_EXT "" ++#endif ++ + #ifdef WITH_LUA + if (!strcmp(progArgv[0], "")) { + rpmlua lua = NULL; /* Global state. */ +@@ -338,18 +344,21 @@ int parseScript(Spec spec, int parsePart + if (!strcmp(progArgv[0], "")) { + (void) rpmlibNeedsFeature(pkg->header, + "BuiltinPerlScripts", "5.2-1"); ++ addReqProv(NULL, pkg->header, RPMTAG_REQUIRENAME, "rpmperl.so" SO_EXT, NULL, RPMSENSE_INTERP, 0); + } else + #endif + #ifdef WITH_PYTHONEMBED + if (!strcmp(progArgv[0], "")) { + (void) rpmlibNeedsFeature(pkg->header, + "BuiltinPythonScripts", "5.2-1"); ++ addReqProv(NULL, pkg->header, RPMTAG_REQUIRENAME, "rpmpython.so" SO_EXT, NULL, RPMSENSE_INTERP, 0); + } else + #endif + #ifdef WITH_RUBYEMBED + if (!strcmp(progArgv[0], "")) { + (void) rpmlibNeedsFeature(pkg->header, + "BuiltinRubyScripts", "5.2-1"); ++ addReqProv(NULL, pkg->header, RPMTAG_REQUIRENAME, "rpmruby.so" SO_EXT, NULL, RPMSENSE_INTERP, 0); + } else + #endif + #ifdef WITH_SEMANAGE +@@ -368,12 +377,14 @@ int parseScript(Spec spec, int parsePart + if (!strcmp(progArgv[0], "")) { + (void) rpmlibNeedsFeature(pkg->header, + "BuiltinSquirrelScripts", "5.2-1"); ++ addReqProv(NULL, pkg->header, RPMTAG_REQUIRENAME, "rpmsquirrel.so" SO_EXT, NULL, RPMSENSE_INTERP, 0); + } else + #endif + #ifdef WITH_TCL + if (!strcmp(progArgv[0], "")) { + (void) rpmlibNeedsFeature(pkg->header, + "BuiltinTclScripts", "5.2-1"); ++ addReqProv(NULL, pkg->header, RPMTAG_REQUIRENAME, "rpmtcl.so" SO_EXT, NULL, RPMSENSE_INTERP, 0); + } else + #endif + if (progArgv[0][0] == '<') { +--- rpm-5.4.10/configure.ac.dlopen~ 2012-07-10 20:20:02.224984301 +0200 ++++ rpm-5.4.10/configure.ac 2012-07-10 20:20:02.581979838 +0200 +@@ -1720,44 +1720,95 @@ RPM_CHECK_LIB( + AC_SUBST(WITH_CUDF_CUDFTOOL) + + dnl # Perl ExtUtils::Embed ++WITH_PERL_INCDIR="`perl -MExtUtils::Embed -e perl_inc| sed -e 's#^ -I##' -e 's# ##g'`" ++WITH_PERL_LIB="`perl -MConfig -e 'print \"$Config{archlibexp}/CORE/\"'`" ++WITH_PERL_CFLAGS="`perl -MExtUtils::Embed -e ccopts`" ++WITH_PERL_LDFLAGS="`perl -MExtUtils::Embed -e ldopts`" ++export LD_RUN_PATH=$WITH_PERL_LIB ++export LIBRARY_PATH=$LD_RUN_PATH ++export C_INCLUDE_PATH=$WITH_PERL_INCDIR + RPM_CHECK_LIB( + [Perl ExtUtils::Embed], [perlembed], + [perl], [perl_alloc], [EXTERN.h], + [no,external:none], [], +- [ +- ], []) ++ [ AM_CONDITIONAL( ++ [WITH_PERLEMBED], ++ [true]) ++ ], ++ [ AM_CONDITIONAL( ++ [WITH_PERLEMBED], ++ [false]) ++ ]) ++LIBS="`echo $LIBS|sed -e s/-lperl//g`" ++AC_SUBST(WITH_PERL_CFLAGS) ++AC_SUBST(WITH_PERL_LDFLAGS) ++unset LD_RUN_PATH ++unset LIBRARY_PATH ++unset C_INCLUDE_PATH + ++export C_INCLUDE_PATH=$WITH_PYTHON_INCDIR + dnl # Python embedding + RPM_CHECK_LIB( + [Python embedding], [pythonembed], +- [python2.7 python2.6 python2.5 python2.4], [Py_Initialize], [Python.h], ++ [python2.7], [Py_Initialize], [Python.h], + [no,external:none], [], +- [ +- ], []) ++ [ AM_CONDITIONAL( ++ [WITH_PYTHONEMBED], ++ [true]) ++ ], ++ [ AM_CONDITIONAL( ++ [WITH_PYTHONEMBED], ++ [false]) ++ ]) ++unset C_INCLUDE_PATH + + dnl # Ruby + WITH_RUBY_SUBDIR="" +-WITH_RUBY_CPPFLAGS="" ++WITH_RUBY_CPPFLAGS="`pkg-config --cflags ruby-1.9`" ++WITH_RUBY_LDFLAGS="`pkg-config --libs ruby-1.9`" + WITH_RUBY_VENDORARCHDIR="" ++export C_INCLUDE_PATH="`pkg-config --cflags-only-I ruby-1.9|sed -e 's#-I##g' -e 's# /#:/#g' -e 's# ##g'`" + RPM_CHECK_LIB( + [Ruby], [ruby], + [ruby], [ruby_init], [ruby.h], + [no,external:none], [], + [ AC_DEFINE(WITH_RUBYEMBED, 1, [Define to 1 if you want embedded Ruby]) + WITH_RUBY_SUBDIR=ruby +- ], []) ++ AM_CONDITIONAL( ++ [WITH_RUBYEMBED], ++ [true]) ++ ], ++ [ AM_CONDITIONAL( ++ [WITH_RUBYEMBED], ++ [false]) ++ ]) ++LIBS="`echo $LIBS|sed -e s/-lruby//g`" + AC_SUBST(WITH_RUBY_CPPFLAGS) ++AC_SUBST(WITH_RUBY_LDFLAGS) + AC_SUBST(WITH_RUBY_SUBDIR) + AC_SUBST(WITH_RUBY_VENDORARCHDIR) ++unset C_INCLUDE_PATH + + + dnl # Squirrel ++export C_INCLUDE_PATH="/usr/include/squirrel" ++SQUIRREL_CPPFLAGS="-I$C_INCLUDE_PATH" ++SQUIRREL_LIBS="-lsquirrel" + RPM_CHECK_LIB( + [Squirrel], [squirrel], + [squirrel], [sq_open], [squirrel.h], + [no,external:none], [], +- [ +- ], []) ++ [ AM_CONDITIONAL( ++ [WITH_SQUIRREL], ++ [true]) ++ ], ++ [ AM_CONDITIONAL( ++ [WITH_SQUIRREL], ++ [false]) ++ ]) ++AC_SUBST(SQUIRREL_CPPFLAGS) ++AC_SUBST(SQUIRREL_LIBS) ++unset C_INCLUDE_PATH + + dnl # Tcl (should tcl8.4 be supported too?) + WITH_TCL_SUBDIR="" +@@ -1765,8 +1816,14 @@ RPM_CHECK_LIB( + [Tcl], [tcl], + [tcl8.6 tcl8.5 tcl], [Tcl_CreateInterp], [tcl.h], + [no,external:none], [], +- [ +- ], []) ++ [ AM_CONDITIONAL( ++ [WITH_TCL], ++ [true]) ++ ], ++ [ AM_CONDITIONAL( ++ [WITH_TCL], ++ [false]) ++ ]) + AC_SUBST(WITH_TCL_SUBDIR) + + dnl # FICL +--- rpm-5.4.10/rpmio/Makefile.am.dlopen~ 2012-04-16 22:53:32.000000000 +0200 ++++ rpm-5.4.10/rpmio/Makefile.am 2012-07-10 20:20:02.582979826 +0200 +@@ -92,8 +92,8 @@ RPM_LDADD_COMMON = \ + $(top_builddir)/rpmdb/librpmdb.la \ + $(RPMIO_LDADD_COMMON) + +-#pkglibdir = @USRLIBRPM@ +-#pkglib_LTLIBRARIES = libsqlio.la ++zpkglibdir = @USRLIBRPM@/lib ++zpkglib_LTLIBRARIES = #libsqlio.la + + pkgincdir = $(pkgincludedir)$(WITH_PATH_VERSIONED_SUFFIX) + pkginc_HEADERS = argv.h mire.h rpmzlog.h yarn.h \ +@@ -210,6 +210,52 @@ endif + #librpmio.la: $(librpmio_la_OBJECTS) $(librpmio_la_DEPENDENCIES) + # $(librpmio_la_LINK) -rpath $(usrlibdir) $(librpmio_la_OBJECTS) $(librpmio_la_LIBADD) + ++if WITH_PERLEMBED ++librpmio_la_LDFLAGS += -Wl,-rpath=$(zpkglibdir) ++zpkglib_LTLIBRARIES += rpmperl.la ++rpmperl_la_SOURCES = rpmperl.c ++rpmperl_la_CPPFLAGS = -DMODULE_EMBED ++rpmperl_la_CFLAGS = $(WITH_PERL_CFLAGS) ++rpmperl_la_LDFLAGS = -module -avoid-version $(WITH_PERL_LDFLAGS) ++rpmperl_la_LIBADD = $(RPMIO_LDADD_COMMON) ++endif ++ ++if WITH_PYTHONEMBED ++librpmio_la_LDFLAGS += -Wl,-rpath=$(zpkglibdir) ++zpkglib_LTLIBRARIES += rpmpython.la ++rpmpython_la_SOURCES = rpmpython.c ++rpmpython_la_CPPFLAGS = -I@WITH_PYTHON_INCDIR@ -DMODULE_EMBED ++rpmpython_la_LDFLAGS = -module -avoid-version ++rpmpython_la_LIBADD = $(RPMIO_LDADD_COMMON) ++endif ++ ++if WITH_RUBYEMBED ++librpmio_la_LDFLAGS += -Wl,-rpath=$(zpkglibdir) ++zpkglib_LTLIBRARIES += rpmruby.la ++rpmruby_la_SOURCES = rpmruby.c ++rpmruby_la_CPPFLAGS = $(WITH_RUBY_CPPFLAGS) -DMODULE_EMBED ++rpmruby_la_LDFLAGS = -module -avoid-version $(WITH_RUBY_LDFLAGS) ++rpmruby_la_LIBADD = $(RPMIO_LDADD_COMMON) ++endif ++ ++if WITH_SQUIRREL ++librpmio_la_LDFLAGS += -Wl,-rpath=$(zpkglibdir) ++zpkglib_LTLIBRARIES += rpmsquirrel.la ++rpmsquirrel_la_SOURCES = rpmsquirrel.c ++rpmsquirrel_la_CPPFLAGS = $(SQUIRREL_CPPFLAGS) -DMODULE_EMBED ++rpmsquirrel_la_LDFLAGS = -module -avoid-version ++rpmsquirrel_la_LIBADD = $(RPMIO_LDADD_COMMON) $(SQUIRREL_LIBS) ++endif ++ ++if WITH_TCL ++librpmio_la_LDFLAGS += -Wl,-rpath=$(zpkglibdir) ++zpkglib_LTLIBRARIES += rpmtcl.la ++rpmtcl_la_SOURCES = rpmtcl.c ++rpmtcl_la_CPPFLAGS = -DMODULE_EMBED ++rpmtcl_la_LDFLAGS = -module -avoid-version ++rpmtcl_la_LIBADD = $(RPMIO_LDADD_COMMON) -ltcl ++endif ++ + #libsqlio_la_SOURCES = libsqlio.c + #libsqlio_la_LIBADD = $(RPMIO_LDADD_COMMON) + +--- rpm-5.4.10/rpmio/rpmperl.c.dlopen~ 2012-04-15 23:20:53.000000000 +0200 ++++ rpm-5.4.10/rpmio/rpmperl.c 2012-07-10 20:20:02.582979826 +0200 +@@ -7,9 +7,15 @@ + #include "rpmperl.h" + #include + +-#if defined(WITH_PERLEMBED) ++#if defined(MODULE_EMBED) + #include + #include ++#undef WITH_PERLEMBED ++#endif ++ ++#if defined(WITH_PERLEMBED) ++#include ++#include + #endif + + #undef UNLIKELY /* XXX everyone gotta be different */ +@@ -21,6 +27,12 @@ int _rpmperl_debug = 0; + /*@unchecked@*/ /*@relnull@*/ + rpmperl _rpmperlI = NULL; + ++#if defined(WITH_PERLEMBED) ++static int dlopened = 0; ++static rpmperl (*rpmperlNew_p) (char ** av, uint32_t flags); ++static rpmRC (*rpmperlRun_p) (rpmperl perl, const char * str, const char ** resultp); ++#endif ++ + #define my_perl ((PerlInterpreter *)perl->I) + + static void rpmperlFini(void * _perl) +@@ -29,7 +41,7 @@ static void rpmperlFini(void * _perl) + { + rpmperl perl = (rpmperl) _perl; + +-#if defined(WITH_PERLEMBED) ++#if defined(MODULE_EMBED) + PERL_SET_CONTEXT(my_perl); + PL_perl_destruct_level = 1; + perl_destruct(my_perl); +@@ -57,7 +69,7 @@ static rpmperl rpmperlGetPool(/*@null@*/ + return (rpmperl) rpmioGetPool(pool, sizeof(*perl)); + } + +-#if defined(WITH_PERLEMBED) ++#if defined(MODULE_EMBED) + EXTERN_C void xs_init (PerlInterpreter * _my_perl PERL_UNUSED_DECL); + + EXTERN_C void boot_DynaLoader (PerlInterpreter* _my_perl, CV* cv); +@@ -90,14 +102,40 @@ static rpmperl rpmperlI(void) + return _rpmperlI; + } + ++#if defined(WITH_PERLEMBED) ++static void loadModule(void) { ++ const char librpmperl[] = "rpmperl.so"; ++ void *h; ++ ++ h = dlopen (librpmperl, RTLD_NOW|RTLD_GLOBAL); ++ if (!h) ++ { ++ rpmlog(RPMLOG_WARNING, D_("Unable to open \"%s\" (%s), " ++ "embedded perl will not be available\n"), ++ librpmperl, dlerror()); ++ } ++ else if(!((rpmperlNew_p = dlsym(h, "rpmperlNew")) ++ && (rpmperlRun_p = dlsym(h, "rpmperlRun")))) { ++ rpmlog(RPMLOG_WARNING, D_("Opened library \"%s\" is incompatible (%s), " ++ "embedded perl will not be available\n"), ++ librpmperl, dlerror()); ++ if (dlclose (h)) ++ rpmlog(RPMLOG_WARNING, "Error closing library \"%s\": %s", librpmperl, ++ dlerror()); ++ } else ++ dlopened = 1; ++} ++#endif ++ + rpmperl rpmperlNew(char ** av, uint32_t flags) + { +- rpmperl perl = +-#ifdef NOTYET +- (flags & 0x80000000) ? rpmperlI() : +-#endif +- rpmperlGetPool(_rpmperlPool); + #if defined(WITH_PERLEMBED) ++ if (!dlopened) loadModule(); ++ if (dlopened) return rpmperlNew_p(av, flags); ++#endif ++ rpmperl perl = (flags & 0x80000000) ++ ? rpmperlI() : rpmperlGetPool(_rpmperlPool); ++#if defined(MODULE_EMBED) + static const char * _av[] = { "rpmperl", NULL }; + static int initialized = 0; + ARGV_t argv = NULL; +@@ -143,6 +181,9 @@ rpmperl rpmperlNew(char ** av, uint32_t + + rpmRC rpmperlRun(rpmperl perl, const char * str, const char ** resultp) + { ++#if defined(WITH_PERLEMBED) ++ if (dlopened) return rpmperlRun_p(perl, str, resultp); ++#endif + rpmRC rc = RPMRC_FAIL; + + if (_rpmperl_debug) +@@ -151,7 +192,7 @@ fprintf(stderr, "==> %s(%p,%s)\n", __FUN + if (perl == NULL) perl = rpmperlI(); + + if (str != NULL) { +-#if defined(WITH_PERLEMBED) ++#if defined(MODULE_EMBED) + STRLEN n_a; + SV * retSV; + +--- rpm-5.4.10/rpmio/rpmpython.c.dlopen~ 2012-07-06 17:39:19.000000000 +0200 ++++ rpm-5.4.10/rpmio/rpmpython.c 2012-07-10 20:20:37.177547334 +0200 +@@ -8,9 +8,15 @@ + #define _RPMPYTHON_INTERNAL + #include "rpmpython.h" + +-#if defined(WITH_PYTHONEMBED) ++#if defined(MODULE_EMBED) + #include + #include ++#undef WITH_PYTHONEMBED ++#endif ++ ++#if defined(WITH_PYTHONEMBED) ++#include ++#include + #endif + + #include "debug.h" +@@ -21,13 +27,20 @@ int _rpmpython_debug = 0; + /*@unchecked@*/ /*@relnull@*/ + rpmpython _rpmpythonI = NULL; + ++#if defined(WITH_PYTHONEMBED) ++static int dlopened = 0; ++static rpmpython (*rpmpythonNew_p) (char ** av, uint32_t flags); ++static rpmRC (*rpmpythonRunFile_p) (rpmpython python, const char * fn, const char ** resultp); ++static rpmRC (*rpmpythonRun_p) (rpmpython python, const char * str, const char ** resultp); ++#endif ++ + static void rpmpythonFini(void * _python) + /*@globals fileSystem @*/ + /*@modifies *_python, fileSystem @*/ + { + rpmpython python = (rpmpython) _python; + +-#if defined(WITH_PYTHONEMBED) ++#if defined(MODULE_EMBED) + Py_Finalize(); + #endif + python->I = NULL; +@@ -51,7 +64,7 @@ static rpmpython rpmpythonGetPool(/*@nul + } + + /*@unchecked@*/ +-#if defined(WITH_PYTHONEMBED) ++#if defined(MODULE_EMBED) + static const char * _rpmpythonI_init = "\ + import sys\n\ + from cStringIO import StringIO\n\ +@@ -68,10 +81,40 @@ static rpmpython rpmpythonI(void) + return _rpmpythonI; + } + ++#if defined(WITH_PYTHONEMBED) ++static void loadModule(void) { ++ const char librpmpython[] = "rpmpython.so"; ++ void *h; ++ ++ h = dlopen (librpmpython, RTLD_NOW|RTLD_GLOBAL); ++ if (!h) ++ { ++ rpmlog(RPMLOG_WARNING, D_("Unable to open \"%s\" (%s), " ++ "embedded python will not be available\n"), ++ librpmpython, dlerror()); ++ } ++ else if(!((rpmpythonNew_p = dlsym(h, "rpmpythonNew")) ++ && (rpmpythonRunFile_p = dlsym(h, "rpmpythonRunFile")) ++ && (rpmpythonRun_p = dlsym(h, "rpmpythonRun")))) { ++ rpmlog(RPMLOG_WARNING, D_("Opened library \"%s\" is incompatible (%s), " ++ "embedded python will not be available\n"), ++ librpmpython, dlerror()); ++ if (dlclose (h)) ++ rpmlog(RPMLOG_WARNING, "Error closing library \"%s\": %s", librpmpython, ++ dlerror()); ++ } else ++ dlopened = 1; ++} ++#endif ++ + rpmpython rpmpythonNew(char ** av, uint32_t flags) + { +- static char * _av[] = { (char *) "rpmpython", NULL }; + #if defined(WITH_PYTHONEMBED) ++ if (!dlopened) loadModule(); ++ if (dlopened) return rpmpythonNew_p(av, flags); ++#endif ++ static char * _av[] = { "rpmpython", NULL }; ++#if defined(MODULE_EMBED) + int initialize = (!(flags & 0x80000000) || _rpmpythonI == NULL); + #endif + rpmpython python = (flags & 0x80000000) +@@ -82,7 +125,7 @@ fprintf(stderr, "==> %s(%p, %d) python % + + if (av == NULL) av = _av; + +-#if defined(WITH_PYTHONEMBED) ++#if defined(MODULE_EMBED) + if (!Py_IsInitialized()) { + Py_SetProgramName((char *)_av[0]); + Py_Initialize(); +@@ -107,6 +150,9 @@ fprintf(stderr, "==========\n%s\n======= + + rpmRC rpmpythonRunFile(rpmpython python, const char * fn, const char ** resultp) + { ++#if defined(WITH_PYTHONEMBED) ++ if (dlopened) return rpmpythonRunFile_p(python, fn, resultp); ++#endif + rpmRC rc = RPMRC_FAIL; + + if (_rpmpython_debug) +@@ -115,7 +161,7 @@ fprintf(stderr, "==> %s(%p,%s)\n", __FUN + if (python == NULL) python = rpmpythonI(); + + if (fn != NULL) { +-#if defined(WITH_PYTHONEMBED) ++#if defined(MODULE_EMBED) + const char * pyfn = ((fn == NULL || !strcmp(fn, "-")) ? "" : fn); + FILE * pyfp = (!strcmp(pyfn, "") ? stdin : fopen(fn, "rb")); + int closeit = (pyfp != stdin); +@@ -156,6 +202,9 @@ static const char * rpmpythonSlurp(const + + rpmRC rpmpythonRun(rpmpython python, const char * str, const char ** resultp) + { ++#if defined(WITH_PYTHONEMBED) ++ if (dlopened) return rpmpythonRun_p(python, str, resultp); ++#endif + rpmRC rc = RPMRC_FAIL; + + if (_rpmpython_debug) +@@ -165,7 +214,7 @@ fprintf(stderr, "==> %s(%p,%s,%p)\n", __ + + if (str != NULL) { + const char * val = rpmpythonSlurp(str); +-#if defined(WITH_PYTHONEMBED) ++#if defined(MODULE_EMBED) + PyCompilerFlags cf = { 0 }; + PyObject * m = PyImport_AddModule("__main__"); + PyObject * d = (m ? PyModule_GetDict(m) : NULL); +--- rpm-5.4.10/rpmio/rpmruby.c.dlopen~ 2012-04-15 23:20:53.000000000 +0200 ++++ rpm-5.4.10/rpmio/rpmruby.c 2012-07-10 20:20:02.585979790 +0200 +@@ -1,17 +1,26 @@ + #include "system.h" + #include + +-#if defined(WITH_RUBYEMBED) ++#if defined(MODULE_EMBED) + + /* Make sure Ruby's fun stuff has its own xmalloc & Co functions available */ + #undef xmalloc + #undef xcalloc + #undef xrealloc + ++/* XXX avoid conflicting definitions in ruby.h */ ++#define HAVE_SETPROCTITLE 1 ++ + #include ++#undef WITH_RUBYEMBED + + #endif + ++#if defined(WITH_RUBYEMBED) ++#include ++#include ++#endif ++ + #define _RPMRUBY_INTERNAL 1 + #include "rpmruby.h" + +@@ -32,7 +41,7 @@ static void rpmrubyFini(void *_ruby) + { + rpmruby ruby = (rpmruby) _ruby; + +-#if defined(WITH_RUBYEMBED) ++# if defined(MODULE_EMBED) + ruby_cleanup(0); + #endif + ruby->I = NULL; +@@ -88,20 +97,51 @@ static rpmruby rpmrubyI() + return _rpmrubyI; + } + ++#if defined(WITH_RUBYEMBED) ++static void loadModule(void) { ++ const char librpmruby[] = "rpmruby.so"; ++ void *h; ++ ++ h = dlopen (librpmruby, RTLD_NOW|RTLD_GLOBAL); ++ if (!h) ++ { ++ rpmlog(RPMLOG_WARNING, D_("Unable to open \"%s\" (%s), " ++ "embedded ruby will not be available\n"), ++ librpmruby, dlerror()); ++ } ++ else if(!((rpmrubyNew_p = dlsym(h, "rpmrubyNew")) ++ && (rpmrubyRun_p = dlsym(h, "rpmrubyRun")))) { ++ rpmlog(RPMLOG_WARNING, D_("Opened library \"%s\" is incompatible (%s), " ++ "embedded ruby will not be available\n"), ++ librpmruby, dlerror()); ++ if (dlclose (h)) ++ rpmlog(RPMLOG_WARNING, "Error closing library \"%s\": %s", librpmruby, ++ dlerror()); ++ } else ++ dlopened = 1; ++} ++#endif ++ + rpmruby rpmrubyNew(char **av, uint32_t flags) + { ++#if defined(WITH_RUBYEMBED) ++ if (!dlopened) loadModule(); ++ if (dlopened) return rpmrubyNew_p(av, flags); ++#endif ++ + static const char *_av[] = { "rpmruby", NULL }; + + /* XXX FIXME: recurse like every other embedded interpreter. */ + if (_rpmrubyI) + return _rpmrubyI; + +- rpmruby ruby = rpmrubyGetPool(_rpmrubyPool); ++ rpmruby ruby = (flags & 0x80000000) ++ ? rpmrubyI() : rpmrubyGetPool(_rpmrubyPool); + + if (av == NULL) + av = (char **) _av; + +-#if defined(WITH_RUBYEMBED) ++# if defined(MODULE_EMBED) + RUBY_INIT_STACK; + ruby_init(); + ruby_init_loadpath(); +@@ -114,9 +154,18 @@ rpmruby rpmrubyNew(char **av, uint32_t f + return rpmrubyLink(ruby); + } + ++#if defined(WITH_RUBYEMBED) ++static int dlopened = 0; ++static rpmruby (*rpmrubyNew_p) (char ** av, uint32_t flags); ++static rpmRC (*rpmrubyRun_p) (rpmruby ruby, const char * str, const char ** resultp); ++#endif + + rpmRC rpmrubyRun(rpmruby ruby, const char *str, const char **resultp) + { ++#if defined(WITH_RUBYEMBED) ++ if (dlopened) return rpmrubyRun_p(ruby, str, resultp); ++#endif ++ + rpmRC rc = RPMRC_FAIL; + + if (_rpmruby_debug) +@@ -125,7 +174,7 @@ fprintf(stderr, "==> %s(%p,%s,%p)\n", __ + if (ruby == NULL) + ruby = rpmrubyI(); + +-#if defined(WITH_RUBYEMBED) ++#if defined(MODULE_EMBED) + if (str) { + int state = -1; + ruby->state = rb_eval_string_protect(str, &state); +--- rpm-5.4.10/rpmio/rpmsquirrel.c.dlopen~ 2012-04-15 23:20:53.000000000 +0200 ++++ rpm-5.4.10/rpmio/rpmsquirrel.c 2012-07-10 20:20:02.586979777 +0200 +@@ -3,9 +3,16 @@ + + #include + +-#ifdef WITH_SQUIRREL ++#if defined(MODULE_EMBED) + #include ++#undef WITH_SQUIRREL + #endif ++ ++#if defined(WITH_SQUIRREL) ++#include ++#include ++#endif ++ + #define _RPMSQUIRREL_INTERNAL + #include "rpmsquirrel.h" + +@@ -17,13 +24,20 @@ int _rpmsquirrel_debug = 0; + /*@unchecked@*/ /*@relnull@*/ + rpmsquirrel _rpmsquirrelI = NULL; + ++#if defined(WITH_SQUIRREL) ++static int dlopened = 0; ++static rpmsquirrel (*rpmsquirrelNew_p) (char ** av, uint32_t flags); ++static rpmRC (*rpmsquirrelRunFile_p) (rpmsquirrel squirrel, const char * fn, const char ** resultp); ++static rpmRC (*rpmsquirrelRun_p) (rpmsquirrel squirrel, const char * str, const char ** resultp); ++#endif ++ + static void rpmsquirrelFini(void * _squirrel) + /*@globals fileSystem @*/ + /*@modifies *_squirrel, fileSystem @*/ + { + rpmsquirrel squirrel = (rpmsquirrel) _squirrel; + +-#if defined(WITH_SQUIRREL) ++#if defined(MODULE_EMBED) + sq_close((HSQUIRRELVM)squirrel->I); + #endif + squirrel->I = NULL; +@@ -48,7 +62,7 @@ static rpmsquirrel rpmsquirrelGetPool(/* + return (rpmsquirrel) rpmioGetPool(pool, sizeof(*squirrel)); + } + +-#if defined(WITH_SQUIRREL) ++#if defined(MODULE_EMBED) + static void rpmsquirrelPrint(HSQUIRRELVM v, const SQChar *s, ...) + { + rpmsquirrel squirrel = sq_getforeignptr(v); +@@ -84,15 +98,42 @@ static rpmsquirrel rpmsquirrelI(void) + return _rpmsquirrelI; + } + ++#if defined(WITH_SQUIRREL) ++static void loadModule(void) { ++ const char librpmsquirrel[] = "rpmsquirrel.so"; ++ void *h; ++ ++ h = dlopen (librpmsquirrel, RTLD_NOW|RTLD_GLOBAL); ++ if (!h) ++ { ++ rpmlog(RPMLOG_WARNING, D_("Unable to open \"%s\" (%s), " ++ "embedded squirrel will not be available\n"), ++ librpmsquirrel, dlerror()); ++ } ++ else if(!((rpmsquirrelNew_p = dlsym(h, "rpmsquirrelNew")) ++ && (rpmsquirrelRunFile_p = dlsym(h, "rpmsquirrelRunFile")) ++ && (rpmsquirrelRun_p = dlsym(h, "rpmsquirrelRun")))) { ++ rpmlog(RPMLOG_WARNING, D_("Opened library \"%s\" is incompatible (%s), " ++ "embedded squirrel will not be available\n"), ++ librpmsquirrel, dlerror()); ++ if (dlclose (h)) ++ rpmlog(RPMLOG_WARNING, "Error closing library \"%s\": %s", librpmsquirrel, ++ dlerror()); ++ } else ++ dlopened = 1; ++} ++#endif ++ + rpmsquirrel rpmsquirrelNew(char ** av, uint32_t flags) + { +- rpmsquirrel squirrel = +-#ifdef NOTYET +- (flags & 0x80000000) ? rpmsquirrelI() : ++#if defined(WITH_SQUIRREL) ++ if (!dlopened) loadModule(); ++ if (dlopened) return rpmsquirrelNew_p(av, flags); + #endif +- rpmsquirrelGetPool(_rpmsquirrelPool); ++ rpmsquirrel squirrel = (flags & 0x80000000) ++ ? rpmsquirrelI() : rpmsquirrelGetPool(_rpmsquirrelPool); + +-#if defined(WITH_SQUIRREL) ++#if defined(MODULE_EMBED) + static const char * _av[] = { "rpmsquirrel", NULL }; + SQInteger stacksize = 1024; + HSQUIRRELVM v = sq_open(stacksize); +@@ -119,13 +160,18 @@ rpmsquirrel rpmsquirrelNew(char ** av, u + } + #endif + #endif ++#if !defined(WITH_SQUIRREL) + squirrel->iob = rpmiobNew(0); ++#endif + + return rpmsquirrelLink(squirrel); + } + + rpmRC rpmsquirrelRunFile(rpmsquirrel squirrel, const char * fn, const char ** resultp) + { ++#if defined(WITH_SQUIRREL) ++ if (dlopened) return rpmsquirrelRunFile_p(squirrel, fn, resultp); ++#endif + rpmRC rc = RPMRC_FAIL; + + if (_rpmsquirrel_debug) +@@ -145,6 +191,10 @@ fprintf(stderr, "==> %s(%p,%s)\n", __FUN + + rpmRC rpmsquirrelRun(rpmsquirrel squirrel, const char * str, const char ** resultp) + { ++#if defined(WITH_SQUIRREL) ++ if (dlopened) return rpmsquirrelRun_p(squirrel, str, resultp); ++#endif ++ + rpmRC rc = RPMRC_FAIL; + + if (_rpmsquirrel_debug) +@@ -152,7 +202,7 @@ fprintf(stderr, "==> %s(%p,%s)\n", __FUN + + if (squirrel == NULL) squirrel = rpmsquirrelI(); + +-#if defined(WITH_SQUIRREL) ++#if defined(MODULE_EMBED) + if (str != NULL) { + size_t ns = strlen(str); + if (ns > 0) { +--- rpm-5.4.10/rpmio/rpmtcl.c.dlopen~ 2012-04-15 23:20:53.000000000 +0200 ++++ rpm-5.4.10/rpmio/rpmtcl.c 2012-07-10 20:20:02.588979751 +0200 +@@ -2,9 +2,16 @@ + + #include + +-#ifdef WITH_TCL ++#if defined(MODULE_EMBED) + #include ++#undef WITH_TCL + #endif ++ ++#if defined(WITH_TCL) ++#include ++#include ++#endif ++ + #define _RPMTCL_INTERNAL + #include "rpmtcl.h" + +@@ -16,13 +23,20 @@ int _rpmtcl_debug = 0; + /*@unchecked@*/ /*@relnull@*/ + rpmtcl _rpmtclI = NULL; + ++#if defined(WITH_TCL) ++static int dlopened = 0; ++static rpmtcl (*rpmtclNew_p) (char ** av, uint32_t flags); ++static rpmRC (*rpmtclRunFile_p) (rpmtcl tcl, const char * fn, const char ** resultp); ++static rpmRC (*rpmtclRun_p) (rpmtcl tcl, const char * str, const char ** resultp); ++#endif ++ + static void rpmtclFini(void * _tcl) + /*@globals fileSystem @*/ + /*@modifies *_tcl, fileSystem @*/ + { + rpmtcl tcl = (rpmtcl) _tcl; + +-#if defined(WITH_TCL) ++#if defined(MODULE_EMBED) + Tcl_DeleteInterp((Tcl_Interp *)tcl->I); + #endif + tcl->I = NULL; +@@ -47,7 +61,7 @@ static rpmtcl rpmtclGetPool(/*@null@*/ r + return (rpmtcl) rpmioGetPool(pool, sizeof(*tcl)); + } + +-#if defined(WITH_TCL) ++#if defined(MODULE_EMBED) + static int rpmtclIOclose(ClientData CD, Tcl_Interp *I) + /*@*/ + { +@@ -122,15 +136,42 @@ static rpmtcl rpmtclI(void) + return _rpmtclI; + } + ++#if defined(WITH_TCL) ++static void loadModule(void) { ++ const char librpmtcl[] = "rpmtcl.so"; ++ void *h; ++ ++ h = dlopen (librpmtcl, RTLD_NOW|RTLD_GLOBAL); ++ if (!h) ++ { ++ rpmlog(RPMLOG_WARNING, D_("Unable to open \"%s\" (%s), " ++ "embedded tcl will not be available\n"), ++ librpmtcl, dlerror()); ++ } ++ else if(!((rpmtclNew_p = dlsym(h, "rpmtclNew")) ++ && (rpmtclRunFile_p = dlsym(h, "rpmtclRunFile")) ++ && (rpmtclRun_p = dlsym(h, "rpmtclRun")))) { ++ rpmlog(RPMLOG_WARNING, D_("Opened library \"%s\" is incompatible (%s), " ++ "embedded tcl will not be available\n"), ++ librpmtcl, dlerror()); ++ if (dlclose (h)) ++ rpmlog(RPMLOG_WARNING, "Error closing library \"%s\": %s", librpmtcl, ++ dlerror()); ++ } else ++ dlopened = 1; ++} ++#endif ++ + rpmtcl rpmtclNew(char ** av, uint32_t flags) + { +- rpmtcl tcl = +-#ifdef NOTYET +- (flags & 0x80000000) ? rpmtclI() : ++#if defined(WITH_TCL) ++ if (!dlopened) loadModule(); ++ if (dlopened) return rpmtclNew_p(av, flags); + #endif +- rpmtclGetPool(_rpmtclPool); ++ rpmtcl tcl = (flags & 0x80000000) ++ ? rpmtclI() : rpmtclGetPool(_rpmtclPool); + +-#if defined(WITH_TCL) ++#if defined(MODULE_EMBED) + static char * _av[] = { "rpmtcl", NULL }; + Tcl_Interp * tclI = Tcl_CreateInterp(); + char b[32]; +@@ -152,13 +193,18 @@ rpmtcl rpmtclNew(char ** av, uint32_t fl + tcl->tclout = (void *) tclout; + } + #endif ++#if !defined(WITH_TCL) + tcl->iob = rpmiobNew(0); ++#endif + + return rpmtclLink(tcl); + } + + rpmRC rpmtclRunFile(rpmtcl tcl, const char * fn, const char ** resultp) + { ++#if defined(WITH_TCL) ++ if (dlopened) return rpmtclRunFile_p(tcl, fn, resultp); ++#endif + rpmRC rc = RPMRC_FAIL; + + if (_rpmtcl_debug) +@@ -166,7 +212,7 @@ fprintf(stderr, "==> %s(%p,%s)\n", __FUN + + if (tcl == NULL) tcl = rpmtclI(); + +-#if defined(WITH_TCL) ++#if defined(MODULE_EMBED) + if (fn != NULL && Tcl_EvalFile((Tcl_Interp *)tcl->I, fn) == TCL_OK) { + rc = RPMRC_OK; + if (resultp) +@@ -178,6 +224,9 @@ fprintf(stderr, "==> %s(%p,%s)\n", __FUN + + rpmRC rpmtclRun(rpmtcl tcl, const char * str, const char ** resultp) + { ++#if defined(WITH_TCL) ++ if (dlopened) return rpmtclRun_p(tcl, str, resultp); ++#endif + rpmRC rc = RPMRC_FAIL; + + if (_rpmtcl_debug) +@@ -185,7 +234,7 @@ fprintf(stderr, "==> %s(%p,%s)\n", __FUN + + if (tcl == NULL) tcl = rpmtclI(); + +-#if defined(WITH_TCL) ++#if defined(MODULE_EMBED) + if (str != NULL && Tcl_Eval((Tcl_Interp *)tcl->I, str) == TCL_OK) { + rc = RPMRC_OK; + if (resultp) +--- rpm-5.4.10/ruby/Makefile.am.dlopen~ 2011-09-13 03:12:53.000000000 +0200 ++++ rpm-5.4.10/ruby/Makefile.am 2012-07-10 20:20:02.588979751 +0200 +@@ -50,8 +50,8 @@ pkgbindir = @USRLIBRPM@/bin + pkgbin_PROGRAMS = trb + pkglib_LTLIBRARIES = rpm.la + +-rpm_la_CFLAGS = -fno-strict-aliasing +-rpm_la_LDFLAGS = -module -avoid-version ++rpm_la_CFLAGS = -fno-strict-aliasing $(WITH_RUBY_CFLAGS) ++rpm_la_LDFLAGS = -module -avoid-version $(WITH_RUBY_LDFLAGS) + rpm_la_LIBADD = \ + $(top_builddir)/build/librpmbuild.la \ + $(top_builddir)/lib/librpm.la \ +--- rpm-5.4.10/ruby/system.h.dlopen~ 2010-12-01 17:09:50.000000000 +0100 ++++ rpm-5.4.10/ruby/system.h 2012-07-10 20:20:02.589979738 +0200 +@@ -2,6 +2,7 @@ + #define H_SYSTEM_RUBY + + #include "../system.h" ++#define HAVE_SETPROCTITLE 1 + + /* XXX ruby-1.8.6 grrr, ruby.h includes its own config.h too. */ + #undef PACKAGE_NAME 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 new file mode 100644 index 0000000..72faa1f --- /dev/null +++ b/rpm-5.4.10-dont-try-generate-rpmfc-dependencies-from-doc-files.patch @@ -0,0 +1,51 @@ +--- 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,16 +914,10 @@ static int rpmfcSCRIPT(rpmfc fc) + (void) fclose(fp); + + if (fc->fcolor->vals[fc->ix] & RPMFC_PERL) { +- defaultdocdir = rpmExpand("%{?_defaultdocdir}", NULL); +- if (defaultdocdir == NULL || *defaultdocdir == '\0') +- defaultdocdir = strdup("/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 new file mode 100644 index 0000000..8f4574b --- /dev/null +++ b/rpm-5.4.10-duplicate_files_terminate_build.patch @@ -0,0 +1,67 @@ +--- 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 new file mode 100644 index 0000000..9fd555c --- /dev/null +++ b/rpm-5.4.10-files-listed-twice-terminates-build.patch @@ -0,0 +1,74 @@ +--- 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 new file mode 100644 index 0000000..b2adfcd --- /dev/null +++ b/rpm-5.4.10-fix-neon-saving-error-pages-as-target-file.patch @@ -0,0 +1,56 @@ +--- 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; +--- rpm-5.4.10/rpmio/rpmio.c.dl_error~ 2012-07-06 17:39:19.000000000 +0200 ++++ rpm-5.4.10/rpmio/rpmio.c 2012-07-11 19:47:59.396732322 +0200 +@@ -2306,9 +2306,12 @@ fprintf(stderr, "*** ufdOpen(%s,0x%x,0%o + u->openError = httpReq(fd, cmd, path); + #endif + if (u->openError < 0) { ++ /* XXX rpmdav doesn't behave consistently with the rest...*/ ++#ifndef WITH_NEON + /* XXX make sure that we can exit through ufdClose */ +- fd = fdLink(fd, "error ctrl (ufdOpen HTTP)"); +- fd = fdLink(fd, "error data (ufdOpen HTTP)"); ++ fd = u->ctrl = fdLink(fd, "error ctrl (ufdOpen HTTP)"); ++ fd = u->data fdLink(fd, "error data (ufdOpen HTTP)"); ++#endif + } else { + fd->bytesRemain = ((!strcmp(cmd, "GET")) + ? fd->contentLength : -1); diff --git a/rpm-5.4.10-fix-uninitialized-variable.patch b/rpm-5.4.10-fix-uninitialized-variable.patch new file mode 100644 index 0000000..66d2451 --- /dev/null +++ b/rpm-5.4.10-fix-uninitialized-variable.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.10/lib/rpmds.c.initialize~ 2012-10-04 16:34:29.681882554 +0200 ++++ rpm-5.4.10/lib/rpmds.c 2012-10-04 16:34:31.081905144 +0200 +@@ -3583,7 +3583,7 @@ int rpmdsSymlink(const char * fn, int fl + int is_symlink; + const char * soname = NULL; + rpmds ds; +- int xx; ++ int xx = -1; + int isElf64; + int isuClibc; + int gotSONAME = 0; diff --git a/rpm-5.4.10-merge-rpm.org-and-mandriva-perl-dep-gen-changes.patch b/rpm-5.4.10-merge-rpm.org-and-mandriva-perl-dep-gen-changes.patch new file mode 100644 index 0000000..872a2c2 --- /dev/null +++ b/rpm-5.4.10-merge-rpm.org-and-mandriva-perl-dep-gen-changes.patch @@ -0,0 +1,503 @@ +--- rpm-5.4.10/macros/mandriva.in.perl_deps~ 2012-07-10 20:24:43.536467425 +0200 ++++ rpm-5.4.10/macros/mandriva.in 2012-07-10 20:25:11.522117555 +0200 +@@ -272,9 +272,6 @@ Group: %{group}\ + + # Use internal dependency generator rather than external helpers? + %_use_internal_dependency_generator 1 +-# TODO: merge relevant changes into rpm version rather than using our own +-%__perl_provides @USRLIBRPM@/@RPMCANONVENDOR@/perl.prov +-%__perl_requires @USRLIBRPM@/@RPMCANONVENDOR@/perl.req + + %__find_provides @USRLIBRPM@/@RPMCANONVENDOR@/filter.sh '%{?_provides_exceptions:%{_provides_exceptions}}%{!?_provides_exceptions: }' '%{?_exclude_files_from_autoprov:%{_exclude_files_from_autoprov}}%{!?_exclude_files_from_autoprov: }' '%{buildroot}' @USRLIBRPM@/@RPMCANONVENDOR@/find-provides + %__find_requires @USRLIBRPM@/@RPMCANONVENDOR@/filter.sh '%{?_requires_exceptions:%{_requires_exceptions}}%{!?_requires_exceptions: }' '%{?_exclude_files_from_autoreq:%{_exclude_files_from_autoreq}}%{!?_exclude_files_from_autoreq: }' '%{buildroot}' @USRLIBRPM@/@RPMCANONVENDOR@/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}} +--- rpm-5.4.10/scripts/perl.prov.perl_deps~ 2012-07-06 17:39:20.000000000 +0200 ++++ rpm-5.4.10/scripts/perl.prov 2012-07-10 20:28:13.776839058 +0200 +@@ -45,8 +45,11 @@ + + # by Ken Estes Mail.com kestes@staff.mail.com + ++use File::Basename (); ++ + if ("@ARGV") { + foreach (@ARGV) { ++ next if !/\.pm$/; + process_file($_); + } + } else { +@@ -55,12 +58,22 @@ if ("@ARGV") { + # contents of the file. + + foreach (<>) { ++ chomp $_; ++ next if !/\.pm$/; + process_file($_); + } + } + + + foreach $module (sort keys %require) { ++ if ($module =~ m/^abi$/) { ++ print "perl($module) = $require{$module}\n"; ++ next; ++ } ++ # XXX: skip any modules not starting with upper case letters ++ if ($module =~ m/^[^A-Z]/) { ++ next; ++ } + if (length($require{$module}) == 0) { + print "perl($module)\n"; + } else { +@@ -69,7 +82,9 @@ foreach $module (sort keys %require) { + # operators. Also I will need to change the processing of the + # $RPM_* variable when I upgrade. + +- print "perl($module) = $require{$module}\n"; ++ my $v = qx{ rpm --eval '%perl_convert_version $require{$module}' }; ++ chomp($v); ++ print "perl($module) = $v\n"; + } + } + +@@ -80,21 +95,31 @@ exit 0; + sub process_file { + + my ($file) = @_; +- chomp $file; + +- open(FILE, "<$file") || return; ++ if ($file =~ m/$Config{archname}\/Config.pm$/) { ++ my $vercmd = "perl -I". File::Basename::dirname($file) . " -MConfig -e 'print \"\$Config{version}\"'"; ++ my $v = `$vercmd`; ++ if ($v) { ++ $require{"abi"} = $v; ++ } ++ } ++ ++ if (!open(FILE, $file)) { ++ warn("$0: Warning: Could not open file '$file' for reading: $!\n"); ++ return; ++ } + + my ($package, $version, $incomment, $inover) = (); + + while () { +- ++ + # skip the documentation + + # we should not need to have item in this if statement (it + # properly belongs in the over/back section) but people do not + # read the perldoc. + +- if (m/^=(head[1-4]|pod|item)/) { ++ if (m/^=(head[1-4]|pod|for|item)/) { + $incomment = 1; + } + +@@ -102,7 +127,7 @@ sub process_file { + $incomment = 0; + $inover = 0; + } +- ++ + if (m/^=(over)/) { + $inover = 1; + } +@@ -111,10 +136,10 @@ sub process_file { + $inover = 0; + } + +- if ($incomment || $inover) { ++ if ($incomment || $inover || m/^\s*#/) { + next; + } +- ++ + # skip the data section + if (m/^__(DATA|END)__$/) { + last; +@@ -125,17 +150,20 @@ sub process_file { + # false positives as if they were provided packages (really ugly). + + if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) { +- $package=$1; +- undef $version; +- if ($package eq 'main') { +- undef $package; +- } else { +- # If $package already exists in the $require hash, it means +- # the package definition is broken up over multiple blocks. +- # In that case, don't stomp a previous $VERSION we might have +- # found. (See BZ#214496.) +- $require{$package}=undef unless (exists $require{$package}); +- } ++ # some internal packages, like DB, might be temporarily redefined inside a module. ++ if (!($package && $1 eq 'DB')) { ++ $package=$1; ++ undef $version; ++ if ($package eq 'main') { ++ undef $package; ++ } else { ++ # If $package already exists in the $require hash, it means ++ # the package definition is broken up over multiple blocks. ++ # In that case, don't stomp a previous $VERSION we might have ++ # found. (See BZ#214496.) ++ $require{$package}=undef unless (exists $require{$package}); ++ } ++ } + } + + # after we found the package name take the first assignment to +@@ -148,45 +176,36 @@ sub process_file { + #ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.12.10.1 $, 10; + #CGI/Apache.pm:$VERSION = (qw$Revision: 1.12.10.1 $)[1]; + #DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning +- #General.pm:$Config::General::VERSION = 2.33; +- # +- # or with the new "our" pragma you could (read will) see: +- # +- # our $VERSION = '1.00' +- if (($package) && (m/^\s*(our\s+)?\$(\Q$package\E::)?VERSION\s*=\s+/)) { ++ #$Locale::Maketext::Simple::VERSION = '0.21'; ++ ++ if ( ++ $package && ++ (m/^(.*;)?\s*((my|our)\s+)?\$(${package}::)?VERSION\s*=\s+/) ++ ) { + + # first see if the version string contains the string + # '$Revision' this often causes bizarre strings and is the most + # common method of non static numbering. + +- if (m/(\$Revision: (\d+[.0-9]+))/) { +- $version= $2; ++ if (m/\$Revision: (\d+[.0-9]+)/) { ++ $version = $1; + } elsif (m/[\'\"]?(\d+[.0-9]+)[\'\"]?/) { +- +- # look for a static number hard coded in the script +- +- $version= $1; ++ ++ # look for a static number hard coded in the script ++ ++ $version= $1; + } +- $require{$package}=$version; ++ $require{$package} = $version; + } +- +- # Allow someone to have a variable that defines virtual packages +- # The variable is called $RPM_Provides. It must be scoped with +- # "our", but not "local" or "my" (just would not make sense). +- # +- # For instance: +- # +- # $RPM_Provides = "blah bleah" +- # +- # Will generate provides for "blah" and "bleah". +- # ++ ++ + # Each keyword can appear multiple times. Don't + # bother with datastructures to store these strings, + # if we need to print it print it now. +- +- if ( m/^\s*(our\s+)?\$RPM_Provides\s*=\s*["'](.*)['"]/i) { +- foreach $_ (split(/\s+/, $2)) { +- print "$_\n"; ++ ++ if (m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i) { ++ foreach $_ (split(/\s+/, $1)) { ++ print "$_\n"; + } + } + +@@ -195,5 +214,5 @@ sub process_file { + close(FILE) || + die("$0: Could not close file: '$file' : $!\n"); + +- return ; ++ return; + } +--- rpm-5.4.10/scripts/perl.req.perl_deps~ 2012-07-06 17:39:20.000000000 +0200 ++++ rpm-5.4.10/scripts/perl.req 2012-07-10 20:25:11.525117519 +0200 +@@ -1,6 +1,6 @@ + #!/usr/bin/perl + +-# RPM (and its source code) is covered under two separate licenses. ++# RPM (and its source code) is covered under two separate licenses. + + # The entire code base may be distributed under the terms of the GNU + # General Public License (GPL), which appears immediately below. +@@ -18,7 +18,7 @@ + # Erik Troan . + + # a simple makedepend like script for perl. +- ++ + # To save development time I do not parse the perl grammmar but + # instead just lex it looking for what I want. I take special care to + # ignore comments and pod's. +@@ -39,22 +39,36 @@ + + # by Ken Estes Mail.com kestes@staff.mail.com + ++use Config; ++ + if ("@ARGV") { + foreach (@ARGV) { + process_file($_); + } + } else { +- ++ + # notice we are passed a list of filenames NOT as common in unix the + # contents of the file. +- ++ + foreach (<>) { ++ chomp $_; + process_file($_); + } + } + + + foreach $module (sort keys %require) { ++ if ($module =~ m/^abi$/) { ++ print "perl($module) = $require{$module}\n"; ++ next; ++ } elsif ($module =~ m/^api$/) { ++ print "perl(abi) >= $require{$module}\n"; ++ next; ++ } ++ # XXX: skip any modules not starting with upper case letters ++ if ($module =~ m/^[^A-Z]/) { ++ next; ++ } + if (length($require{$module}) == 0) { + print "perl($module)\n"; + } else { +@@ -63,7 +77,9 @@ foreach $module (sort keys %require) { + # operators. Also I will need to change the processing of the + # $RPM_* variable when I upgrade. + +- print "perl($module) >= $require{$module}\n"; ++ my $v = qx{ rpm --eval '%perl_convert_version $require{$module}' }; #' workaround vim highlighting issue.. ;) ++ chomp($v); ++ print "perl($module) >= $v\n"; + } + } + +@@ -72,16 +88,24 @@ exit 0; + + + sub process_file { +- ++ + my ($file) = @_; +- chomp $file; +- +- open(FILE, "<$file") || return; +- +- while () { + ++ # XXX: dependendency on perl(abi) = for perl extensions ++ if ($file =~ m/$Config{archname}/) { ++ $require{"abi"} = $Config{version}; ++ } elsif ($file =~ m/($Config{installsitelib}|$Config{installvendorlib}|$Config{installprivlib})/ and $file =~ m/$Config{version}/) { ++ $require{"api"} = $Config{version}; ++ } ++ ++ if (!open(FILE, $file)) { ++ warn("$0: Warning: Could not open file '$file' for reading: $!\n"); ++ return; ++ } ++ ++ while () { + # skip the documentation +- if ( /^ = (?: head\d | pod | item | over | back | (?: begin|end|for ) \s+\S+ ) \b/x ) { ++ if ( /^ = (?: head\d | pod | for | item | over | back | (?: begin|end|for ) \s+\S+ ) \b/x ) { + $_ = until /^=cut/ or eof; + next; + } +@@ -100,12 +124,12 @@ sub process_file { + # skip q{} quoted sections - just hope we don't have curly brackets + # within the quote, nor an escaped hash mark that isn't a comment + # marker, such as occurs right here. Draw the line somewhere. +- if ( m/^.*\Wq[qxwr]?\s*([\{\(\[#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) { ++ if ( m/^.*\Wq[qxwr]?\s*([{([#|\/])[^})\]#|\/]*$/ && ! m/^\s*(require|use)\s/ ) { + $tag = $1; + $tag =~ tr/{([/})]/; + $_ = until m/\Q$tag\E/ or eof; + } +- ++ + # skip the data section + if (m/^__(DATA|END)__$/) { + last; +@@ -115,28 +139,28 @@ sub process_file { + # bother with datastructures to store these strings, + # if we need to print it print it now. + # +- # Again allow for "our". ++ # Again allow for "our". + if ( m/^\s*(our\s+)?\$RPM_Requires\s*=\s*["'](.*)['"]/i) { + foreach $_ (split(/\s+/, $2)) { +- print "$_\n"; ++ print "$_\n"; + } + } + + # handle "use base qw/ foo::bar baz::blah /;" and variations + if ( + m/^ \s* use \s+ base +- (?: \s+ q[wq]? \s* ( [!@#\$%^&*'"\/+=`~,.?-] ) \s* ( [\w:]+? (?: \s+[\w:]+? )*? ) \s* \1 ++ (?: \s+ q[wq]? \s* ( [!@#\$%^&*'"\/+=`~,.?-] ) \s* ( [\w:]+? (?: \s+[\w:]+? )*? ) \s* \1 + | +- \s* ( ["'] ) ( [\w:]+? ) \3 ++ \s* ( ["'] ) ( [\w:]+? ) \3 + | + # qw[], qw(), qw<>, qw{} are handled here; lax, but who gives +- \s+ q[wq]? \s* [\[({<] \s* ( [\w:]+? (?: \s+[\w:]+? )*? ) \s* [\])}>] ++ \s+ q[wq]? \s* [\[({<] \s* ( [\w:]+? (?: \s+[\w:]+? )*? ) \s* [\])}>] + ) + \s* ; + /x + ) + { +- my @deps = ( $1 ? split /\s+/, $2 : $3 ? $4 : split /\s+/, $5 ); ++ my @deps = ( $1 ? split /\s+/, $2 : $3 ? $4 : split /\s+/, $5 ); + for my $mod ( grep !exists $require{$_}, @deps ) { + $require{$mod} = ''; + $line{$mod} = $_; +@@ -153,17 +177,18 @@ sub process_file { + # eval { require Carp } if defined $^S; # If error/warning during compilation, + + +- (m/^(\s*) # we hope the inclusion starts the line +- (require|use)\s+(?!\{) # do not want 'do {' loops +- # quotes around name are always legal +- [\'\"]?([^\;\ \'\"\t]*)[\'\"]?[\t\;\ ] +- # the syntax for 'use' allows version requirements +- \s*([.0-9]*) +- /x) ++ (m/^(\s*) # we hope the inclusion starts the line ++ (require|use)\s+(?!\{) # do not want 'do {' loops ++ # quotes around name are always legal ++ ['"]?([^; '"\t#]+)['"]?[\t; ] ++ # the syntax for 'use' allows version requirements ++ \s*([.0-9]*) ++ /x) + ) { + my ($whitespace, $statement, $module, $version) = ($1, $2, $3,$4); ++ my $usebase; + +- # we only consider require statements that are flush against ++ # we only consider require statements that are flushed against + # the left edge. any other require statements give too many + # false positives, as they are usually inside of an if statement + # as a fallback module or a rarely used option +@@ -173,7 +198,7 @@ sub process_file { + # if there is some interpolation of variables just skip this + # dependency, we do not want + # do "$ENV{LOGDIR}/$rcfile"; +- ++ + ($module =~ m/\$/) && next; + + # skip if the phrase was "use of" -- shows up in gimp-perl, et al. +@@ -198,6 +223,18 @@ sub process_file { + next; + } + ++ # as seen in some perl scripts ++ # use base qw(App::CLI Class::Accessor::Chained::Fast App::CLI::Command); ++ if ($module eq 'base') { ++ $require{$module} = $version; ++ $line{$module} = $current_line; ++ ($module = $_) =~ s/use\s*base\s*//; ++ $module =~ s/qw\((.*)\)\s*;/$1/; ++ $module =~ s/qw(.)(.*)\1\s*;/$2/; ++ $module =~ s/\s*;$//; ++ $module =~ s/#.*//; ++ $usebase = 1; ++ } + # sometimes people do use POSIX qw(foo), or use POSIX(qw(foo)) etc. + # we can strip qw.*$, as well as (.*$: + $module =~ s/qw.*$//; +@@ -205,7 +242,7 @@ sub process_file { + + $module =~ s/\.pm$//; + +- # some perl programmers write 'require URI/URL;' when ++ # some perl programmers write 'require URI/URL;' when + # they mean 'require URI::URL;' + + $module =~ s/\//::/; +@@ -215,45 +252,41 @@ sub process_file { + + $module =~ s/\(\s*\)$//; + +- if ( $module =~ m/^v?([0-9._]+)$/ ) { + # if module is a number then both require and use interpret that +- # to mean that a particular version of perl is specified +- +- my $ver=$1; +- if ($ver =~ /5.00/) { +- print "perl >= 0:$ver\n"; +- next; +- } +- else { +- print "perl >= 1:$ver\n"; +- next; +- } +- +- }; ++ # to mean that a particular version of perl is specified. Don't ++ # add a dependency, though, since the rpm will already require ++ # perl-base at the build version (via find-requires) ++ next if $module =~ /^v?\d/; + + # ph files do not use the package name inside the file. + # perlmodlib documentation says: +- + # the .ph files made by h2ph will probably end up as + # extension modules made by h2xs. +- +- # so do not expend much effort on these. +- ++ # so do not spend much effort on these. + + # there is no easy way to find out if a file named systeminfo.ph + # will be included with the name sys/systeminfo.ph so only use the + # basename of *.ph files + +- ($module =~ m/\.ph$/) && next; ++ ($module =~ m/\.ph$/) && next; + +- $require{$module}=$version; +- $line{$module}=$_; ++ # if the module was loaded trough base, we need to split the list ++ if ($usebase) { ++ my $current_line = $_; ++ foreach (split(/\s+/, $module)) { ++ next unless $_; ++ $require{$_} = $version; ++ $line{$_} = $current_line; ++ } ++ } else { ++ $require{$module}=$version; ++ $line{$module}=$current_line; ++ } + } +- + } + + close(FILE) || + die("$0: Could not close file: '$file' : $!\n"); +- +- return ; ++ ++ return ; + } diff --git a/rpm-5.4.10-search-through-buildroot-library-dirs-for-uclibc-deps.patch b/rpm-5.4.10-search-through-buildroot-library-dirs-for-uclibc-deps.patch new file mode 100644 index 0000000..2160452 --- /dev/null +++ b/rpm-5.4.10-search-through-buildroot-library-dirs-for-uclibc-deps.patch @@ -0,0 +1,57 @@ +--- rpm-5.4.10/lib/rpmds.c.uclibc_buildroot~ 2012-10-04 16:25:30.850199688 +0200 ++++ rpm-5.4.10/lib/rpmds.c 2012-10-04 16:25:40.130349028 +0200 +@@ -3063,8 +3063,10 @@ foo: + } + if (dyn->d_tag == DT_NEEDED) { + char *tmp, *tmp2; +- char buf[MAXPATHLEN]; +- char path[MAXPATHLEN] = ""; ++ /* XXX: we multiply by 4 to make sure to have room for several paths */ ++ char buf[4*MAXPATHLEN] = ""; ++ char path[4*MAXPATHLEN]; ++ char *buildroot; + + libpath = elf_strptr (elf, shdr->sh_link, dyn->d_un.d_val); + if (prev && *prev && libpath && !strcmp(basename(prev), libpath)) +@@ -3084,10 +3086,9 @@ foo: + if (stat(libpath, &statbuf) == 0) + continue; + +- tmp2 = path; ++ tmp2 = buf; + if (rpath && *rpath) { +- tmp2 = stpcpy(tmp2, rpath); +- tmp2 = stpcpy(tmp2, ":"); ++ tmp2 = stpcpy(buf, rpath); + } + tmp = getenv("LD_LIBRARY_PATH"); + if (tmp) +@@ -3096,6 +3097,28 @@ foo: + tmp2 = stpcpy(tmp2, ":"); + /* XXX: do better check to ensure libraries are all of the same class */ + tmp2 = stpcpy(tmp2, (class == ELFCLASS64) ? "/lib64:/usr/lib64" : "/lib:/usr/lib"); ++ /* we need to search through library paths within buildroot as well */ ++ buildroot = rpmExpand("%{buildroot}", NULL); ++ if (stat(buildroot, &statbuf) == 0) { ++ char *tmp3; ++ for (tmp2 = buf, tmp = path; ++ tmp2 != NULL; ++ tmp2 = tmp3) { ++ tmp = stpcpy(tmp, buildroot); ++ tmp3 = strchr(tmp2, ':'); ++ if (tmp3) ++ *tmp3 = '\0'; ++ tmp = stpcpy(tmp, tmp2); ++ tmp = stpcpy(tmp, ":"); ++ if (tmp3) { ++ *tmp3 = ':'; ++ tmp3++; ++ } ++ } ++ } else ++ tmp = path; ++ _free(buildroot); ++ stpcpy(tmp, buf); + tmp = buf; + { + int i, count = 1; 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 new file mode 100644 index 0000000..0708d04 --- /dev/null +++ b/rpm-5.4.10-support-ignore-arch-and-os-again.patch @@ -0,0 +1,45 @@ +--- 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-trigtrans.patch b/rpm-5.4.10-trigtrans.patch new file mode 100644 index 0000000..ba343a0 --- /dev/null +++ b/rpm-5.4.10-trigtrans.patch @@ -0,0 +1,823 @@ +--- rpm-5.4.10/build/parseReqs.c.trigtrans~ 2012-07-17 15:13:13.100370300 +0200 ++++ rpm-5.4.10/build/parseReqs.c 2012-07-17 15:13:13.224368749 +0200 +@@ -66,6 +66,24 @@ rpmRC parseRCPOT(Spec spec, Package pkg, + tagflags |= RPMSENSE_TRIGGERUN; + h = pkg->header; + break; ++#ifdef NOT_YET ++ case RPMTAG_TRIGGERPRETRANSIN: ++ tagflags |= RPMSENSE_TRIGGERPRETRANSIN; ++ h = pkg->header; ++ break; ++ case RPMTAG_TRIGGERPRETRANSUN: ++ tagflags |= RPMSENSE_TRIGGERPRETRANSUN; ++ h = pkg->header; ++ break; ++#endif ++ case RPMTAG_TRIGGERPOSTTRANSIN: ++ tagflags |= RPMSENSE_TRIGGERPOSTTRANSIN; ++ h = pkg->header; ++ break; ++ case RPMTAG_TRIGGERPOSTTRANSUN: ++ tagflags |= RPMSENSE_TRIGGERPOSTTRANSUN; ++ h = pkg->header; ++ break; + case RPMTAG_BUILDSUGGESTS: + case RPMTAG_BUILDENHANCES: + tagflags |= RPMSENSE_MISSINGOK; +--- rpm-5.4.10/build/parseScript.c.trigtrans~ 2012-07-17 15:13:13.110370175 +0200 ++++ rpm-5.4.10/build/parseScript.c 2012-07-17 15:13:13.225368736 +0200 +@@ -181,6 +181,36 @@ int parseScript(Spec spec, int parsePart + progtag = RPMTAG_TRIGGERSCRIPTPROG; + partname = "%triggerpostun"; + break; ++#ifdef NOT_YET ++ case PART_TRIGGERPRETRANSIN: ++ tag = RPMTAG_TRIGGERSCRIPTS; ++ tagflags = 0; ++ reqtag = RPMTAG_TRIGGERPRETRANSIN; ++ progtag = RPMTAG_TRIGGERSCRIPTPROG; ++ partname = "%triggerpretransin"; ++ break; ++ case PART_TRIGGERPRETRANSUN: ++ tag = RPMTAG_TRIGGERSCRIPTS; ++ tagflags = 0; ++ reqtag = RPMTAG_TRIGGERPRETRANSUN; ++ progtag = RPMTAG_TRIGGERSCRIPTPROG; ++ partname = "%triggerpretransun"; ++ break; ++#endif ++ case PART_TRIGGERPOSTTRANSIN: ++ tag = RPMTAG_TRIGGERSCRIPTS; ++ tagflags = 0; ++ reqtag = RPMTAG_TRIGGERPOSTTRANSIN; ++ progtag = RPMTAG_TRIGGERSCRIPTPROG; ++ partname = "%triggerposttransin"; ++ break; ++ case PART_TRIGGERPOSTTRANSUN: ++ tag = RPMTAG_TRIGGERSCRIPTS; ++ tagflags = 0; ++ reqtag = RPMTAG_TRIGGERPOSTTRANSUN; ++ progtag = RPMTAG_TRIGGERSCRIPTPROG; ++ partname = "%triggerposttransun"; ++ break; + /* support "%sanitycheck" script/section */ + case PART_SANITYCHECK: + tag = RPMTAG_SANITYCHECK; +--- rpm-5.4.10/build/parseSpec.c.trigtrans~ 2012-07-17 15:13:12.764374501 +0200 ++++ rpm-5.4.10/build/parseSpec.c 2012-07-17 15:13:13.225368736 +0200 +@@ -47,6 +47,12 @@ static struct PartRec { + { PART_TRIGGERUN, 0, "%triggerun"}, + { PART_TRIGGERIN, 0, "%triggerin"}, + { PART_TRIGGERIN, 0, "%trigger"}, ++#ifdef NOT_YET ++ { PART_TRIGGERPRETRANSIN,0, "%triggerpretransin"}, ++ { PART_TRIGGERPRETRANSUN,0, "%triggerpretransun"}, ++#endif ++ { PART_TRIGGERPOSTTRANSIN,0, "%triggerposttransin"}, ++ { PART_TRIGGERPOSTTRANSUN,0, "%triggerposttransun"}, + { PART_VERIFYSCRIPT, 0, "%verifyscript"}, + { PART_SANITYCHECK, 0, "%sanitycheck"}, /* support "%sanitycheck" scriptlet */ + {0, 0, NULL} +@@ -608,6 +614,12 @@ int parseSpec(rpmts ts, const char *spec + case PART_TRIGGERIN: + case PART_TRIGGERUN: + case PART_TRIGGERPOSTUN: ++#ifdef NOT_YET ++ case PART_TRIGGERPRETRANSIN: ++ case PART_TRIGGERPRETRANSUN: ++#endif ++ case PART_TRIGGERPOSTTRANSIN: ++ case PART_TRIGGERPOSTTRANSUN: + parsePart = parseScript(spec, parsePart); + /*@switchbreak@*/ break; + +--- rpm-5.4.10/build/rpmbuild.h.trigtrans~ 2010-02-10 19:36:17.000000000 +0100 ++++ rpm-5.4.10/build/rpmbuild.h 2012-07-17 15:13:13.226368724 +0200 +@@ -76,10 +76,12 @@ typedef enum rpmParseState_e { + PART_BUILDARCHITECTURES= 29+PART_BASE,/*!< */ + PART_TRIGGERPOSTUN = 30+PART_BASE, /*!< */ + PART_TRIGGERPREIN = 31+PART_BASE, /*!< */ ++ PART_TRIGGERPOSTTRANSIN= 32+PART_BASE, /*!< */ ++ PART_TRIGGERPOSTTRANSUN= 33+PART_BASE, /*!< */ + /* support "%sanitycheck" script */ +- PART_SANITYCHECK = 32+PART_BASE, /*!< */ +- PART_ARBITRARY = 33+PART_BASE, /*!< */ +- PART_LAST = 34+PART_BASE /*!< */ ++ PART_SANITYCHECK = 34+PART_BASE, /*!< */ ++ PART_ARBITRARY = 35+PART_BASE, /*!< */ ++ PART_LAST = 36+PART_BASE /*!< */ + } rpmParseState; + + /** \ingroup rpmbuild +--- rpm-5.4.10/lib/psm.c.trigtrans~ 2012-07-17 15:13:13.144369749 +0200 ++++ rpm-5.4.10/lib/psm.c 2012-07-17 15:14:30.017408705 +0200 +@@ -53,6 +53,7 @@ + (*((unsigned *)&(_psm)->flags) &= ~(RPMPSM_FLAGS_##_FLAG)) + + #define _RPMEVR_INTERNAL ++#define _RPMDS_INTERNAL + #include "rpmds.h" + + #define _RPMTE_INTERNAL +@@ -398,6 +399,10 @@ static /*@observer@*/ const char * tag2s + case RPMTAG_POSTUN: return "%postun"; + case RPMTAG_POSTTRANS: return "%posttrans"; + case RPMTAG_TRIGGERPOSTUN: return "%triggerpostun"; ++ case RPMTAG_TRIGGERPRETRANSIN: return "%triggerpretransin"; ++ case RPMTAG_TRIGGERPRETRANSUN: return "%triggerpretransun"; ++ case RPMTAG_TRIGGERPOSTTRANSIN: return "%triggerposttransin"; ++ case RPMTAG_TRIGGERPOSTTRANSUN: return "%triggerposttransun"; + case RPMTAG_VERIFYSCRIPT: return "%verify"; + case RPMTAG_SANITYCHECK: return "%sanitycheck"; + case RPMTAG_BUILDPREP: return "%prep"; +@@ -428,6 +433,10 @@ static rpmScriptID tag2slx(rpmTag tag) + case RPMTAG_POSTUN: return RPMSCRIPT_POSTUN; + case RPMTAG_POSTTRANS: return RPMSCRIPT_POSTTRANS; + case RPMTAG_TRIGGERPOSTUN: return RPMSCRIPT_TRIGGERPOSTUN; ++ case RPMTAG_TRIGGERPRETRANSIN: return RPMSCRIPT_TRIGGERPRETRANSIN; ++ case RPMTAG_TRIGGERPRETRANSUN: return RPMSCRIPT_TRIGGERPRETRANSUN; ++ case RPMTAG_TRIGGERPOSTTRANSIN: return RPMSCRIPT_TRIGGERPOSTTRANSIN; ++ case RPMTAG_TRIGGERPOSTTRANSUN: return RPMSCRIPT_TRIGGERPOSTTRANSUN; + case RPMTAG_VERIFYSCRIPT: return RPMSCRIPT_VERIFY; + case RPMTAG_SANITYCHECK: return RPMSCRIPT_SANITYCHECK; + case RPMTAG_BUILDPREP: return RPMSCRIPT_PREP; +@@ -1249,7 +1258,6 @@ static rpmRC handleOneTrigger(const rpmp + rpmds Fds = NULL; + rpmds Dds = NULL; + rpmds Pds = NULL; +- const char * sourceName; + const char * triggerName; + rpmRC rc = RPMRC_OK; + int arg1; +@@ -1257,10 +1265,6 @@ static rpmRC handleOneTrigger(const rpmp + int i; + + he->tag = RPMTAG_NAME; +- xx = headerGet(sourceH, he, 0); +- sourceName = he->p.str; +- +- he->tag = RPMTAG_NAME; + xx = headerGet(triggeredH, he, 0); + triggerName = he->p.str; + +@@ -1398,7 +1402,6 @@ exit: + She->p.ptr = _free(She->p.ptr); + Phe->p.ptr = _free(Phe->p.ptr); + triggerName = _free(triggerName); +- sourceName = _free(sourceName); + + return rc; + } +@@ -1719,6 +1722,351 @@ exit: + return rc; + } + ++/** ++ * Return transaction element's file info. ++ * @todo Take a rpmfi refcount here. ++ * @param tsi transaction element iterator ++ * @return transaction element file info ++ */ ++static /*@null@*/ ++rpmfi rpmtsiFi(const rpmtsi tsi) ++ /*@*/ ++{ ++ rpmfi fi = NULL; ++ ++ if (tsi != NULL && tsi->ocsave != -1) { ++ /*@-type -abstract@*/ /* FIX: rpmte not opaque */ ++ rpmte te = rpmtsElement(tsi->ts, tsi->ocsave); ++ /*@-assignexpose@*/ ++ if (te != NULL && (fi = te->fi) != NULL) ++ fi->te = te; ++ /*@=assignexpose@*/ ++ /*@=type =abstract@*/ ++ } ++ /*@-compdef -refcounttrans -usereleased @*/ ++ return fi; ++ /*@=compdef =refcounttrans =usereleased @*/ ++} ++/** ++ * Execute triggers. ++ * @param psm package state machine data ++ * @param sourceH ++ * @param triggeredH ++ * @param arg2 ++ * @return RPMRC_OK on success ++ */ ++static rpmRC handleOneScriptTrigger(const rpmpsm psm, ++ rpmds sourceDs, Header triggeredH, int arg2) ++ /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState@*/ ++ /*@modifies psm, sourceH, triggeredH, ++ rpmGlobalMacroContext, fileSystem, internalState @*/ ++{ ++ static int scareMem = 0; ++ HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); ++ HE_t Ihe = memset(alloca(sizeof(*Ihe)), 0, sizeof(*Ihe)); ++ HE_t She = memset(alloca(sizeof(*She)), 0, sizeof(*She)); ++ HE_t Phe = memset(alloca(sizeof(*Phe)), 0, sizeof(*Phe)); ++ miRE mire = NULL; ++ const rpmts ts = psm->ts; ++ rpmds Tds = NULL; ++ const char * triggerName; ++ rpmRC rc = RPMRC_OK; ++ int arg1; ++ int xx; ++ int i; ++ ++ he->tag = RPMTAG_NAME; ++ xx = headerGet(triggeredH, he, 0); ++ triggerName = he->p.str; ++ ++ arg1 = rpmdbCountPackages(rpmtsGetRdb(ts), triggerName); ++ if (arg1 < 0) { ++ /* XXX W2DO? fails as "execution of script failed" */ ++ rc = RPMRC_FAIL; ++ goto exit; ++ } ++ arg1 += psm->countCorrection; ++ ++ Tds = rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem); ++ if (Tds == NULL) ++ goto exit; ++ xx = rpmdsSetNoPromote(Tds, 1); ++ ++ Ihe->tag = RPMTAG_TRIGGERINDEX; ++ if (!headerGet(triggeredH, Ihe, 0)) ++ goto exit; ++ ++ She->tag = RPMTAG_TRIGGERSCRIPTS; ++ if (!headerGet(triggeredH, She, 0)) ++ goto exit; ++ ++ Phe->tag = RPMTAG_TRIGGERSCRIPTPROG; ++ if (!headerGet(triggeredH, Phe, 0)) ++ goto exit; ++ ++ if ((Tds = rpmdsInit(Tds)) != NULL) ++ while ((i = rpmdsNext(Tds)) >= 0) { ++ rpmuint32_t Flags = rpmdsFlags(Tds); ++ char * depName; ++ ARGV_t matches = NULL; ++ int bingo; ++ ++ /* Skip triggers that are not in this context. */ ++ if (!(Flags & psm->sense)) ++ continue; ++ ++ bingo = 0; /* no trigger to fire. */ ++ depName = (char *) rpmdsN(Tds); ++ if (rpmdsTagN(sourceDs) == RPMTAG_BASENAMES || rpmdsTagN(sourceDs) == RPMTAG_DIRNAMES) { ++ if (mire == NULL) ++ mire = mireNew(depName[0] == '^' ? RPMMIRE_PCRE : RPMMIRE_GLOB, 0); ++ ++ xx = mireRegcomp(mire, depName); ++ for(rpmdsSetIx(sourceDs, 0); ++ rpmdsIx(sourceDs) < rpmdsCount(sourceDs); ++ rpmdsSetIx(sourceDs, rpmdsIx(sourceDs)+1)) { ++ char * N = (char *) sourceDs->N[sourceDs->i]; ++ if (rpmdsTagN(sourceDs) == RPMTAG_DIRNAMES) { ++ size_t nName = strlen(N); ++ N = xmalloc(nName + 1 + 1); ++ stpcpy(N, sourceDs->N[sourceDs->i]); ++ N[nName] = '/'; ++ N[nName+1] = '\0'; ++ } ++ xx = mireRegexec(mire, N, 0); ++ if (xx < 0) ++ /*@innercontinue@*/ continue; ++ bingo = 1; ++ argvAdd(&matches, N); ++ } ++ xx = mireClean(mire); ++ /* If trigger not fired yet, try provided dependency match. */ ++ } else { ++ bingo = rpmdsMatch(Tds, sourceDs); ++ bingo = rpmdsNegateRC(Tds, bingo); ++ } ++ ++ if (!bingo) ++ continue; ++ ++ /* Coerce strings into header argv return. */ ++ { int index = Ihe->p.ui32p[i]; ++ const char * s = Phe->p.argv[index]; ++ char * t; ++ ++ he->tag = Phe->tag; ++ he->t = RPM_STRING_ARRAY_TYPE; ++ he->c = 1; ++ he->p.argv = xmalloc(sizeof(Phe->p.argv[0]) + strlen(s) + 1); ++ he->p.argv[0] = t = (char *) &he->p.argv[1]; ++ t = stpcpy(t, s); ++ *t = '\0'; ++ ++ rc |= runScript(psm, triggeredH, "%trigger", he, ++ She->p.argv[index], arg1, arg2, matches); ++ ++ he->p.ptr = _free(he->p.ptr); ++ } ++ argvFree(matches); ++ } ++ ++ mire = mireFree(mire); ++ (void)rpmdsFree(Tds); ++ Tds = NULL; ++ ++exit: ++ Ihe->p.ptr = _free(Ihe->p.ptr); ++ She->p.ptr = _free(She->p.ptr); ++ Phe->p.ptr = _free(Phe->p.ptr); ++ triggerName = _free(triggerName); ++ ++ return rc; ++} ++ ++/** ++ * Run a dependency set loop against rpmdb triggers. ++ * @param psm package state machine data ++ * @param tagno dependency set to run against rpmdb ++ * @param arg2 scriptlet arg2 ++ * @return RPMRC_OK on success ++ */ ++static rpmRC runScriptTriggersLoop(rpmpsm psm, rpmTag tagno, int arg2) ++ /*@globals rpmGlobalMacroContext, h_errno, ++ fileSystem, internalState @*/ ++ /*@modifies psm, rpmGlobalMacroContext, ++ fileSystem, internalState @*/ ++{ ++ static int scareMem = 0; ++ const rpmts ts = psm->ts; ++ rpmfi fi = NULL; ++ rpmds sourceDs = NULL; ++ char * depName = NULL; ++ ARGI_t instances = NULL; ++ rpmmi mi; ++ Header triggeredH; ++ rpmRC rc = RPMRC_OK; ++ int xx; ++ rpmtsi pi; ++ rpmte p = NULL; ++ ++ ++ pi = rpmtsiInit(ts); ++ while ((p = rpmtsiNext(pi, psm->goal == PSM_PKGINSTALL ? TR_ADDED : TR_REMOVED)) != NULL) { ++ rpmds ds; ++ if (p->isSource) continue; ++ if ((fi = rpmtsiFi(pi)) == NULL) ++ continue; ++ if (psm->goal == PSM_PKGERASE) { ++ if (tagno == RPMTAG_BASENAMES || tagno == RPMTAG_DIRNAMES) { ++ fi = rpmfiInit(fi, 0); ++ if (fi != NULL) { ++ while (rpmfiNext(fi) >= 0) { ++ ds = rpmdsSingle(tagno, (tagno == RPMTAG_DIRNAMES ? rpmfiDN(fi) : rpmfiFN(fi)), NULL, RPMSENSE_ANY); ++ rpmdsMerge(&sourceDs, ds); ++ (void) rpmdsFree(ds); ++ } ++ } ++ } else { ++ char evr[BUFSIZ]; ++ char *ptr = evr; ++ if (rpmteE(p)) ptr = stpcpy(stpcpy(ptr, rpmteE(p)), ":"); ++ ptr = stpcpy(stpcpy(stpcpy(ptr, rpmteV(p)), "-"), rpmteR(p)); ++ if (rpmteD(p)) ptr = stpcpy(stpcpy(ptr, ":"), rpmteD(p)); ++ ds = rpmdsSingle(tagno, rpmteN(p), evr, RPMSENSE_EQUAL); ++ rpmdsMerge(&sourceDs, ds); ++ (void) rpmdsFree(ds); ++ } ++ } else { ++ ds = rpmdsNew(fi->h, tagno, scareMem); ++ if (ds == NULL) continue; ++ rpmdsMerge(&sourceDs, ds); ++ (void) rpmdsFree(ds); ++ } ++ } ++ xx = rpmteClose(p, ts, 0); ++ pi = rpmtsiFree(pi); ++ ++ /* Fire elements against rpmdb trigger strings. */ ++ if (sourceDs != NULL) ++ for(rpmdsSetIx(sourceDs, 0); ++ rpmdsIx(sourceDs) < rpmdsCount(sourceDs); ++ rpmdsSetIx(sourceDs, rpmdsIx(sourceDs)+1)) { ++ const char * Name = sourceDs->N[sourceDs->i]; ++ size_t nName = strlen(Name); ++ unsigned prev, instance; ++ unsigned nvals; ++ ARGint_t vals; ++ ++ if (!nName) continue; ++ ++ depName = _free(depName); ++ if (strcmp(Name, "/") && tagno == RPMTAG_DIRNAMES) { ++ depName = xmalloc(nName + 1 + 1); ++ (void) stpcpy(depName, Name); ++ /* XXX re-add the pesky trailing '/' to dirnames. */ ++ depName[nName] = '/'; ++ depName[nName+1] = '\0'; ++ } else ++ depName = xstrdup(Name); ++ ++ if (depName[0] == '/' && psm->Tmires != NULL) { ++ miRE mire; ++ int j; ++ ++ /* XXX mireApply doesn't tell which pattern matched. */ ++ for (j = 0, mire = psm->Tmires; j < psm->nTmires; j++, mire++) { ++ const char * pattern = psm->Tpats[j]; ++ size_t npattern = strlen(pattern); ++ if (tagno == RPMTAG_DIRNAMES && !PATT_ISDIR(pattern, npattern)) ++ continue; ++ if (mireRegexec(mire, depName, 0) < 0) ++ /*@innercontinue@*/ continue; ++ ++ /* Reset the primary retrieval key to the pattern. */ ++ depName = _free(depName); ++ depName = xstrdup(pattern); ++ /*@innerbreak@*/ break; ++ } ++ } ++ ++ /* Retrieve triggered header(s) by key. */ ++ mi = rpmtsInitIterator(ts, RPMTAG_TRIGGERNAME, depName, 0); ++ nvals = argiCount(instances); ++ vals = argiData(instances); ++ if (nvals > 0) ++ xx = rpmmiPrune(mi, (uint32_t *)vals, nvals, 1); ++ ++ prev = 0; ++ while((triggeredH = rpmmiNext(mi)) != NULL) { ++ instance = rpmmiInstance(mi); ++ if (prev == instance) ++ /*@innercontinue@*/ continue; ++ rc |= handleOneScriptTrigger(psm, sourceDs, triggeredH, arg2); ++ prev = instance; ++ xx = argiAdd(&instances, -1, instance); ++ xx = argiSort(instances, NULL); ++ } ++ mi = rpmmiFree(mi); ++ } ++ ++ instances = argiFree(instances); ++ depName = _free(depName); ++ (void)rpmdsFree(sourceDs); ++ sourceDs = NULL; ++ return rc; ++} ++/** ++ * Run trigger scripts in the database that are fired by this header. ++ * @param psm package state machine data ++ * @return 0 on success ++ */ ++static rpmRC runScriptTriggers(rpmpsm psm) ++ /*@globals rpmGlobalMacroContext, h_errno, ++ fileSystem, internalState @*/ ++ /*@modifies psm, rpmGlobalMacroContext, ++ fileSystem, internalState @*/ ++{ ++ int numPackage = 0; ++ int xx; ++ rpmTag tagno; ++ rpmRC rc = RPMRC_OK; ++ ++ /* Select RPMTAG_NAME or RPMTAG_PROVIDENAME index for triggering. */ ++ if (_trigger_tag == 0) { ++ const char * t = rpmExpand("%{?_trigger_tag}", NULL); ++/*@-mods@*/ ++ _trigger_tag = (!strcmp(t, "name") ? RPMTAG_NAME : RPMTAG_PROVIDENAME); ++/*@=mods@*/ ++ t = _free(t); ++ } ++ tagno = _trigger_tag; ++ ++ /* XXX Save/restore count correction. */ ++ { int countCorrection = psm->countCorrection; ++ ++ psm->countCorrection = 0; ++ ++ /* Try name/providename triggers first. */ ++ rc |= runScriptTriggersLoop(psm, tagno, numPackage); ++ /* If not limited to NEVRA triggers, also try file/dir path triggers. */ ++ if (tagno != RPMTAG_NAME) { ++ /* Retrieve trigger patterns from rpmdb. */ ++ xx = rpmdbTriggerGlobs(psm); ++ ++ rc |= runScriptTriggersLoop(psm, RPMTAG_BASENAMES, numPackage); ++ rc |= runScriptTriggersLoop(psm, RPMTAG_DIRNAMES, numPackage); ++ ++ psm->Tpats = argvFree(psm->Tpats); ++ psm->Tmires = mireFreeAll(psm->Tmires, psm->nTmires); ++ psm->nTmires = 0; ++ } ++ ++ psm->countCorrection = countCorrection; ++ } ++ ++ return rc; ++} ++ + /*@observer@*/ + static const char * pkgStageString(pkgStage a) + /*@*/ +@@ -1746,6 +2094,8 @@ static const char * pkgStageString(pkgSt + case PSM_CHROOT_IN: return "chrootin"; + case PSM_CHROOT_OUT: return "chrootout"; + case PSM_SCRIPT: return "script"; ++ case PSM_PRETRANS: return "pretrans"; ++ case PSM_POSTTRANS: return "posttrans"; + case PSM_TRIGGERS: return "triggers"; + case PSM_IMMED_TRIGGERS: return "immedtriggers"; + +@@ -1785,8 +2135,24 @@ assert(psm != NULL); + case RPMTAG_VERIFYSCRIPT: psm->stepName = "verify"; break; + case RPMTAG_PRETRANS: psm->stepName = "pretrans"; break; + case RPMTAG_POSTTRANS: psm->stepName = "posttrans"; break; ++#ifdef NOT_YET ++ case RPMTAG_TRIGGERPRETRANSIN: psm->stepName = "triggerpretransin"; break; ++ case RPMTAG_TRIGGERPRETRANSUN: psm->stepName = "triggerpretransun"; break; ++#endif ++ case RPMTAG_TRIGGERPOSTTRANSIN: psm->stepName = "triggerposttransin"; break; ++ case RPMTAG_TRIGGERPOSTTRANSUN: psm->stepName = "triggerposttransun"; break; ++ } ++ switch (scriptTag) { ++ default: psm->stage = PSM_SCRIPT; break; ++#ifdef NOT_YET ++ case RPMTAG_TRIGGERPRETRANSIN: ++ case RPMTAG_TRIGGERPRETRANSUN: psm->stage = PSM_PRETRANS; break; ++#endif ++ case RPMTAG_TRIGGERPOSTTRANSIN: ++ case RPMTAG_TRIGGERPOSTTRANSUN: psm->stage = PSM_POSTTRANS; break; + } +- return rpmpsmStage(psm, PSM_SCRIPT); ++ ++ return rpmpsmStage(psm, psm->stage); + } + + /*@-mustmod@*/ +@@ -2223,7 +2589,7 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s + + /* XXX hackery to assert(!scareMem) in rpmfiNew. */ + /*@-castexpose@*/ +-if (fi->h == NULL && fi->te && ((rpmte)fi->te)->h != NULL) fi->h = headerLink(((rpmte)fi->te)->h); ++if (fi != NULL && fi->h == NULL && fi->te && ((rpmte)fi->te)->h != NULL) fi->h = headerLink(((rpmte)fi->te)->h); + /*@=castexpose@*/ + + switch (stage) { +@@ -3007,6 +3373,36 @@ assert(psm->te != NULL); + if (rc) + xx = rpmtxnAbort(rpmtsGetRdb(ts)->db_txn); + else ++ xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn); ++ rpmtsGetRdb(ts)->db_txn = NULL; ++ } break; ++#ifdef NOT_YET ++ case PSM_PRETRANS: ++ { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL); ++ xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL); ++ psm->scriptTag = RPMTAG_PRETRANS; ++ psm->progTag = RPMTAG_PRETRANSPROG; ++ psm->sense = psm->goal == PSM_PKGINSTALL ? RPMSENSE_TRIGGERPRETRANSIN : RPMSENSE_TRIGGERPRETRANSUN; ++ psm->countCorrection = 0; ++ rc = runScriptTriggers(psm); ++ if (rc) ++ xx = rpmtxnAbort(rpmtsGetRdb(ts)->db_txn); ++ else ++ xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn); ++ rpmtsGetRdb(ts)->db_txn = NULL; ++ } break; ++#endif ++ case PSM_POSTTRANS: ++ { rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL); ++ xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL); ++ psm->scriptTag = RPMTAG_POSTTRANS; ++ psm->progTag = RPMTAG_POSTTRANSPROG; ++ psm->sense = psm->goal == PSM_PKGINSTALL ? RPMSENSE_TRIGGERPOSTTRANSIN : RPMSENSE_TRIGGERPOSTTRANSUN; ++ psm->countCorrection = 0; ++ rc = runScriptTriggers(psm); ++ if (rc) ++ xx = rpmtxnAbort(rpmtsGetRdb(ts)->db_txn); ++ else + xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn); + rpmtsGetRdb(ts)->db_txn = NULL; + } break; +--- rpm-5.4.10/lib/psm.h.trigtrans~ 2010-03-06 16:31:29.000000000 +0100 ++++ rpm-5.4.10/lib/psm.h 2012-07-17 15:13:13.228368700 +0200 +@@ -52,9 +52,11 @@ typedef enum pkgStage_e { + PSM_CHROOT_IN = 51, + PSM_CHROOT_OUT = 52, + PSM_SCRIPT = 53, +- PSM_TRIGGERS = 54, +- PSM_IMMED_TRIGGERS = 55, +- PSM_RPMIO_FLAGS = 56, ++ PSM_PRETRANS = 54, ++ PSM_POSTTRANS = 55, ++ PSM_TRIGGERS = 56, ++ PSM_IMMED_TRIGGERS = 57, ++ PSM_RPMIO_FLAGS = 58, + + PSM_RPMDB_LOAD = 97, + PSM_RPMDB_ADD = 98, +--- rpm-5.4.10/lib/transaction.c.trigtrans~ 2012-07-17 15:13:12.814373876 +0200 ++++ rpm-5.4.10/lib/transaction.c 2012-07-17 15:13:13.229368688 +0200 +@@ -1328,8 +1328,9 @@ assert(0); + continue; /* XXX can't happen */ + + /* If no prre/post transaction script, then don't bother. */ +- if (!rpmteHaveTransScript(p, stag)) ++ if (!rpmteHaveTransScript(p, stag)) { + continue; ++ } + + if (rpmteOpen(p, ts, 0)) { + if (p->fi != NULL) /* XXX can't happen */ +@@ -1349,6 +1350,43 @@ assert(0); + return 0; + } + ++/* ++ * Run pre/post transaction script. ++ * param ts transaction set ++ * param stag RPMTAG_TRIGGERPRETRANS or RPMTAG_TRIGGERPOSTTRANS ++ * return 0 on success ++ */ ++static int rpmtsRunScriptTriggers(rpmts ts, rpmTag stag) ++ /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ ++ /*@modifies ts, rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/ ++{ ++ rpmtsi pi; ++ rpmte p; ++ rpmfi fi; ++ rpmpsm psm; ++ int xx; ++ rpmTag ptag; ++ ++FPSDEBUG(0, (stderr, "--> %s(%p,%s(%u))\n", __FUNCTION__, ts, tagName(stag), (unsigned)stag)); ++ switch (stag) { ++ default: ++assert(0); ++ /*@notreached@*/ break; ++#ifdef NOT_YET ++ case RPMTAG_TRIGGERPRETRANSIN: ++ case RPMTAG_TRIGGERPRETRANSUN: ptag = RPMTAG_PRETRANSPROG; break; ++#endif ++ case RPMTAG_TRIGGERPOSTTRANSIN: ++ case RPMTAG_TRIGGERPOSTTRANSUN: ptag = RPMTAG_POSTTRANSPROG; break; ++ } ++ ++ psm = rpmpsmNew(ts, NULL, NULL); ++ psm->goal = (stag == RPMTAG_TRIGGERPOSTTRANSIN) ? PSM_PKGINSTALL : PSM_PKGERASE; ++ xx = rpmpsmScriptStage(psm, stag, ptag); ++ psm = rpmpsmFree(psm, __FUNCTION__); ++ ++ return 0; ++} + /* Add fingerprint for each file not skipped. */ + static void rpmtsAddFingerprints(rpmts ts, uint32_t fileCount, hashTable ht, + fingerPrintCache fpc) +@@ -2319,6 +2357,10 @@ fprintf(stderr, "--> %s(%p,%p,0x%x) tsfl + + rpmlog(RPMLOG_DEBUG, D_("running post-transaction scripts\n")); + xx = rpmtsRunScript(ts, RPMTAG_POSTTRANS); ++ ++ rpmlog(RPMLOG_DEBUG, D_("running post-transaction triggers\n")); ++ xx = rpmtsRunScriptTriggers(ts, RPMTAG_TRIGGERPOSTTRANSIN); ++ xx = rpmtsRunScriptTriggers(ts, RPMTAG_TRIGGERPOSTTRANSUN); + } + + exit: +--- rpm-5.4.10/rpmconstant/rpmconstanttbl.c.trigtrans~ 2012-07-06 19:12:41.000000000 +0200 ++++ rpm-5.4.10/rpmconstant/rpmconstanttbl.c 2012-07-17 15:13:13.230368675 +0200 +@@ -664,6 +662,8 @@ static const struct rpmconstant_s rpmPar + { "PART_BUILDARCHITECTURES", PART_BUILDARCHITECTURES }, /*!< */ + { "PART_TRIGGERPOSTUN", PART_TRIGGERPOSTUN }, /*!< */ + { "PART_TRIGGERPREIN", PART_TRIGGERPREIN }, /*!< */ ++ { "PART_TRIGGERPOSTTRANSIN", PART_TRIGGERPOSTTRANSIN }, /*!< */ ++ { "PART_TRIGGERPOSTTRANSUN", PART_TRIGGERPOSTTRANSUN }, /*!< */ + { "PART_SANITYCHECK", PART_SANITYCHECK }, /*!< */ + { "PART_ARBITRARY", PART_ARBITRARY }, /*!< */ + { "PART_LAST", PART_LAST }, /*!< */ +@@ -680,7 +680,7 @@ const struct rpmconstant_s * rpmParseSta + static const struct rpmconstant_s rpmsenseflagsctbl[] = { + #ifdef H_RPMEVR + { "RPMSENSE_ANY", RPMSENSE_ANY }, +- { "RPMSENSE_SERIAL", RPMSENSE_SERIAL }, ++ { "RPMSENSE_TRIGGERPOSTTRANSIN", RPMSENSE_TRIGGERPOSTTRANSIN }, + { "RPMSENSE_LESS", RPMSENSE_LESS }, + { "RPMSENSE_GREATER", RPMSENSE_GREATER }, + { "RPMSENSE_EQUAL", RPMSENSE_EQUAL }, +@@ -707,7 +707,7 @@ static const struct rpmconstant_s rpmsen + { "RPMSENSE_RPMLIB", RPMSENSE_RPMLIB }, + { "RPMSENSE_TRIGGERPREIN", RPMSENSE_TRIGGERPREIN }, + { "RPMSENSE_KEYRING", RPMSENSE_KEYRING }, +- { "RPMSENSE_STRONG", RPMSENSE_STRONG }, ++ { "RPMSENSE_TRIGGERPOSTTRANSUN", RPMSENSE_TRIGGERPOSTTRANSUN }, + { "RPMSENSE_CONFIG", RPMSENSE_CONFIG }, + { "RPMSENSE_PROBE", RPMSENSE_PROBE }, + { "RPMSENSE_PACKAGE", RPMSENSE_PACKAGE }, +@@ -1085,6 +1085,10 @@ static const struct rpmconstant_s rpmTag + { "RPMTAG_OBSOLETEYAMLENTRY", RPMTAG_OBSOLETEYAMLENTRY }, /* s[] */ + { "RPMTAG_PROVIDEYAMLENTRY", RPMTAG_PROVIDEYAMLENTRY }, /* s[] */ + { "RPMTAG_REQUIREYAMLENTRY", RPMTAG_REQUIREYAMLENTRY }, /* s[] */ ++ { "RPMTAG_TRIGGERPRETRANSIN", RPMTAG_TRIGGERPRETRANSIN }, /* internal */ ++ { "RPMTAG_TRIGGERPRETRANSUN", RPMTAG_TRIGGERPRETRANSUN }, /* internal */ ++ { "RPMTAG_TRIGGERPOSTTRANSIN", RPMTAG_TRIGGERPOSTTRANSIN }, /* internal */ ++ { "RPMTAG_TRIGGERPOSTTRANSUN", RPMTAG_TRIGGERPOSTTRANSUN }, /* internal */ + { "RPMTAG_FILEDIGESTALGO", RPMTAG_FILEDIGESTALGO }, /* i file checksum algorithm */ + { "RPMTAG_BUGURL", RPMTAG_BUGURL }, /* s */ + { "RPMTAG_FIRSTFREE_TAG", RPMTAG_FIRSTFREE_TAG }, /*!< internal */ +--- rpm-5.4.10/rpmdb/hdrfmt.c.trigtrans~ 2012-07-17 15:13:13.079370562 +0200 ++++ rpm-5.4.10/rpmdb/hdrfmt.c 2012-07-17 15:13:13.232368649 +0200 +@@ -671,6 +671,16 @@ assert(ix == 0); + val = xstrdup("un"); + else if (anint & RPMSENSE_TRIGGERPOSTUN) + val = xstrdup("postun"); ++#ifdef NOT_YET ++ else if (anint & RPMSENSE_TRIGGERPRETRANSIN) ++ val = xstrdup("pretransin"); ++ else if (anint & RPMSENSE_TRIGGERPRETRANSUN) ++ val = xstrdup("pretransun"); ++#endif ++ else if (anint & RPMSENSE_TRIGGERPOSTTRANSIN) ++ val = xstrdup("posttransin"); ++ else if (anint & RPMSENSE_TRIGGERPOSTTRANSUN) ++ val = xstrdup("posttransun"); + else + val = xstrdup(""); + } +@@ -2122,6 +2132,16 @@ static int triggertypeTag(Header h, HE_t + he->p.argv[i] = xstrdup("un"); + else if (flags.ui32p[j] & RPMSENSE_TRIGGERPOSTUN) + he->p.argv[i] = xstrdup("postun"); ++#ifdef NOT_YET ++ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPRETRANSIN) ++ he->p.argv[i] = xstrdup("pretransin"); ++ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPRETRANSUN) ++ he->p.argv[i] = xstrdup("pretransun"); ++#endif ++ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPOSTTRANSIN) ++ he->p.argv[i] = xstrdup("posttransin"); ++ else if (flags.ui32p[j] & RPMSENSE_TRIGGERPOSTTRANSUN) ++ he->p.argv[i] = xstrdup("posttransun"); + else + he->p.argv[i] = xstrdup(""); + /*@innerbreak@*/ break; +--- rpm-5.4.10/rpmdb/rpmevr.h.trigtrans~ 2012-06-01 15:20:21.000000000 +0200 ++++ rpm-5.4.10/rpmdb/rpmevr.h 2012-07-17 15:13:13.233368636 +0200 +@@ -27,7 +27,7 @@ typedef enum evrFlags_e { + #if defined(_RPMEVR_INTERNAL) + RPMSENSE_ANY = 0, + /*@-enummemuse@*/ +- RPMSENSE_SERIAL = (1 << 0), /*!< (obsolete). */ ++ RPMSENSE_TRIGGERPOSTTRANSIN = (1 << 0), /*!< (obsolete). */ + /*@=enummemuse@*/ + #endif + RPMSENSE_LESS = (1 << 1), +@@ -60,7 +60,7 @@ typedef enum evrFlags_e { + RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */ + RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ + RPMSENSE_KEYRING = (1 << 26), +- RPMSENSE_STRONG = (1 << 27), /*!< placeholder SuSE */ ++ RPMSENSE_TRIGGERPOSTTRANSUN = (1 << 27), /*!< placeholder SuSE */ + RPMSENSE_CONFIG = (1 << 28), + RPMSENSE_PROBE = (1 << 29), + RPMSENSE_PACKAGE = (1 << 30), +@@ -96,7 +96,8 @@ struct EVR_s { + }; + + #define RPMSENSE_TRIGGER \ +- (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN) ++ (RPMSENSE_TRIGGERPREIN | RPMSENSE_TRIGGERIN | RPMSENSE_TRIGGERUN | RPMSENSE_TRIGGERPOSTUN | \ ++ RPMSENSE_TRIGGERPOSTTRANSIN | RPMSENSE_TRIGGERPOSTTRANSUN) + + #define _ALL_REQUIRES_MASK (\ + RPMSENSE_INTERP | \ +--- rpm-5.4.10/rpmdb/rpmtag.h.trigtrans~ 2012-07-17 15:13:13.179369312 +0200 ++++ rpm-5.4.10/rpmdb/rpmtag.h 2012-07-17 15:13:13.233368636 +0200 +@@ -415,6 +415,10 @@ enum rpmTag_e { + RPMTAG_OBSOLETEYAMLENTRY = 1220, /* s[] */ + RPMTAG_PROVIDEYAMLENTRY = 1221, /* s[] */ + RPMTAG_REQUIREYAMLENTRY = 1222, /* s[] */ ++ RPMTAG_TRIGGERPRETRANSIN = 1223, /* internal */ ++ RPMTAG_TRIGGERPRETRANSUN = 1224, /* internal */ ++ RPMTAG_TRIGGERPOSTTRANSIN = 1225, /* internal */ ++ RPMTAG_TRIGGERPOSTTRANSUN = 1226, /* internal */ + + RPMTAG_FILEDIGESTALGO = 5011, /* i file checksum algorithm */ + RPMTAG_BUGURL = 5012, /* s */ +--- rpm-5.4.10/rpmdb/rpmtypes.h.trigtrans~ 2011-05-03 17:58:19.000000000 +0200 ++++ rpm-5.4.10/rpmdb/rpmtypes.h 2012-07-17 15:13:13.234368624 +0200 +@@ -70,7 +70,11 @@ typedef enum rpmScriptID_e { + RPMSCRIPT_POSTUN = 7, /*!< %postun scriptlet */ + RPMSCRIPT_TRIGGERPOSTUN = 8, /*!< %triggerpostun scriptlet */ + RPMSCRIPT_POSTTRANS = 9, /*!< %posttrans scriptlet */ +- /* 10-15 unused */ ++ RPMSCRIPT_TRIGGERPRETRANSIN = 10, /*!< %triggerpretrans scriptlet */ ++ RPMSCRIPT_TRIGGERPRETRANSUN = 11, /*!< %triggerpretrans scriptlet */ ++ RPMSCRIPT_TRIGGERPOSTTRANSIN= 12, /*!< %triggerposttrans scriptlet */ ++ RPMSCRIPT_TRIGGERPOSTTRANSUN= 13, /*!< %triggerposttrans scriptlet */ ++ /* 14-15 unused */ + RPMSCRIPT_VERIFY = 16, /*!< %verify scriptlet */ + RPMSCRIPT_SANITYCHECK = 17, /*!< %sanitycheck scriptlet */ + /* 18-23 unused */ diff --git a/rpm-5.4.10-unpackaged_subdirs_terminate_build.patch b/rpm-5.4.10-unpackaged_subdirs_terminate_build.patch new file mode 100644 index 0000000..2e7c5b8 --- /dev/null +++ b/rpm-5.4.10-unpackaged_subdirs_terminate_build.patch @@ -0,0 +1,67 @@ +--- 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.10-update-and-use-brp-compress.patch b/rpm-5.4.10-update-and-use-brp-compress.patch new file mode 100644 index 0000000..b8412e6 --- /dev/null +++ b/rpm-5.4.10-update-and-use-brp-compress.patch @@ -0,0 +1,59 @@ +--- rpm-5.4.10/macros/mandriva.in.brpcomp~ 2012-12-26 08:56:29.522684255 +0100 ++++ rpm-5.4.10/macros/mandriva.in 2012-12-26 09:37:59.322548015 +0100 +@@ -137,8 +137,9 @@ end\ + %_enable_debug_packages 1 + + +-# Default extension to use (for info files) ++# Default extension to use (for man & info files) + %_extension .xz ++%_compress xz -0f --text + + + # Macro: %{mklibname [ []] [-s] [-d]} +--- rpm-5.4.10/scripts/brp-compress.brpcomp~ 2012-12-26 08:55:38.248052991 +0100 ++++ rpm-5.4.10/scripts/brp-compress 2012-12-26 09:38:15.914753103 +0100 +@@ -8,8 +8,8 @@ fi + cd "$RPM_BUILD_ROOT" + + # Compress man pages +-COMPRESS="gzip -9 -n" +-COMPRESS_EXT=.gz ++COMPRESS=${COMPRESS:-gzip -9 -n} ++COMPRESS_EXT=${COMPRESS_EXT:-.gz} + + for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \ + ./usr/share/man/man* ./usr/share/man/*/man* ./usr/share/info \ +@@ -17,15 +17,14 @@ for d in ./usr/man/man* ./usr/man/*/man* + ./usr/share/doc/*/man/man* ./usr/lib/*/man/man* + do + [ -d $d ] || continue +- for f in `find $d -type f` ++ for f in `find $d -type f ! -name dir` + do + [ -f "$f" ] || continue +- [ "`basename $f`" = "dir" ] && continue + + case "$f" in +- *.Z) gunzip -f $f; b=`echo $f | sed -e 's/\.Z$//'`;; +- *.gz) gunzip -f $f; b=`echo $f | sed -e 's/\.gz$//'`;; +- *.bz2) bunzip2 -f $f; b=`echo $f | sed -e 's/\.bz2$//'`;; ++ *.gz|*.Z) gunzip -f $f; b=`echo $f | sed -e 's/\.\(gz\|Z\)$//'`;; ++ *.bz2) bunzip2 -f $f; b=`echo $f | sed -e 's/\.bz2$//'`;; ++ *.xz|*.lzma) unxz -f $f; b=`echo $f | sed -e 's/\.\(xz\|lzma\)$//'`;; + *) b=$f;; + esac + +@@ -48,9 +47,10 @@ do + + for f in `find $d -type l` + do +- l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'` ++ l=`ls -l $f | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'` ++ echo $l + rm -f $f +- b=`echo $f | sed -e 's/\.gz$//' -e 's/\.bz2$//' -e 's/\.Z$//'` ++ b=`echo $f | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//'` + ln -sf $l$COMPRESS_EXT $b$COMPRESS_EXT + done + done diff --git a/rpm-5.4.4-add-_specfile-macro.patch b/rpm-5.4.4-add-_specfile-macro.patch new file mode 100644 index 0000000..723a17a --- /dev/null +++ b/rpm-5.4.4-add-_specfile-macro.patch @@ -0,0 +1,10 @@ +--- 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 new file mode 100644 index 0000000..545929a --- /dev/null +++ b/rpm-5.4.4-allow-installation-of-repackaged-rpms.patch @@ -0,0 +1,11 @@ +--- 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-dont-consider-ranged-dependencies-as-overlapping-for-removal.patch b/rpm-5.4.4-dont-consider-ranged-dependencies-as-overlapping-for-removal.patch new file mode 100644 index 0000000..ba65788 --- /dev/null +++ b/rpm-5.4.4-dont-consider-ranged-dependencies-as-overlapping-for-removal.patch @@ -0,0 +1,16 @@ +--- rpm-5.4.4/build/reqprov.c.range_nooverlap~ 2012-02-15 18:58:39.075973279 +0100 ++++ rpm-5.4.4/build/reqprov.c 2012-02-15 19:02:01.120218409 +0100 +@@ -122,7 +122,12 @@ int addReqProv(/*@unused@*/ Spec spec, H + rpmds old = rpmdsSingle(flagtag, names[len], versions[len] ? versions[len] : "", flags[len]); + rpmds new = rpmdsSingle(flagtag, N, EVR, Flags); + +- overlap = rpmdsCompare(new, old); ++ /* do not consider dependency ranges like R: foo > 1, R: foo < 3 ++ * as overlapping (mdvbz#65269) ++ */ ++ if (!((Flags & RPMSENSE_GREATER && flags[len] & RPMSENSE_LESS) || ++ (Flags & RPMSENSE_LESS && flags[len] & RPMSENSE_GREATER))) ++ overlap = rpmdsCompare(new, old); + + if (overlap) { + EVR_t lEVR = rpmEVRnew(RPMSENSE_ANY, 0), diff --git a/rpm-5.4.4-drop-base-dependencies.patch b/rpm-5.4.4-drop-base-dependencies.patch new file mode 100644 index 0000000..c4d1e81 --- /dev/null +++ b/rpm-5.4.4-drop-base-dependencies.patch @@ -0,0 +1,15 @@ +--- rpm-5.4.4/build/reqprov.c.drop_basedeps~ 2011-12-11 03:55:58.958164657 +0100 ++++ rpm-5.4.4/build/reqprov.c 2011-12-11 03:56:04.794169328 +0100 +@@ -48,6 +48,12 @@ int addReqProv(/*@unused@*/ Spec spec, H + indextag = RPMTAG_TRIGGERINDEX; + extra = Flags & RPMSENSE_TRIGGER; + } else { ++#if defined(RPM_VENDOR_MANDRIVA) ++ if (!strcmp(N, "/bin/sh") || !strcmp(N, "/sbin/ldconfig")) { ++ rpmlog(RPMLOG_DEBUG, "%s will be satisfied by glibc or it's dependencies, won't add dependency to package\n"); ++ return 0; ++ } ++#endif + nametag = RPMTAG_REQUIRENAME; + versiontag = RPMTAG_REQUIREVERSION; + flagtag = RPMTAG_REQUIREFLAGS; 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 new file mode 100644 index 0000000..1da18fe --- /dev/null +++ b/rpm-5.4.4-drop-useless-auto-generated-pkgconfig-dependency.patch @@ -0,0 +1,23 @@ +--- 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-enable-rpmgio-net-transport.patch b/rpm-5.4.4-enable-rpmgio-net-transport.patch deleted file mode 100644 index 8f0675e..0000000 --- a/rpm-5.4.4-enable-rpmgio-net-transport.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- rpm-5.4.4/macros/mandriva.in.net_transport~ 2011-12-11 00:11:49.185221624 +0100 -+++ rpm-5.4.4/macros/mandriva.in 2011-12-11 00:13:30.790281912 +0100 -@@ -28,6 +28,9 @@ - - %_changelog_truncate 3 years ago - -+# mdvbz#64914 -+%_rpmgio .ufdio -+ - # This will die as soon as remaining usage has been phased out... - %mkrel(c:) %{-c: 0.%{-c*}.}%{1}%{?subrel:.%subrel} - %manbo_mkrel() %mkrel diff --git a/rpm-5.4.4-find-debuginfo-avoid-excessive-output-from-eu-strip.patch b/rpm-5.4.4-find-debuginfo-avoid-excessive-output-from-eu-strip.patch new file mode 100644 index 0000000..5f1c221 --- /dev/null +++ b/rpm-5.4.4-find-debuginfo-avoid-excessive-output-from-eu-strip.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.4/scripts/find-debuginfo.sh.strip_silent~ 2011-12-06 08:32:19.205381136 +0100 ++++ rpm-5.4.4/scripts/find-debuginfo.sh 2011-12-06 08:33:02.954406789 +0100 +@@ -103,7 +103,7 @@ strip_to_debug() + esac + [ -n "$EXCLUDE_FULL_REGEXP" ] && grep -E -q "$EXCLUDE_FULL_REGEXP" <<< "$2" && g=-g + +- eu-strip --remove-comment $g $([ -n "$DISABLE_DEBUG" ] || echo $r -f "$1") "$2" || exit ++ eu-strip --remove-comment $g $([ -n "$DISABLE_DEBUG" ] || echo $r -f "$1") "$2" 1> /dev/null || exit + [ -n "$DISABLE_DEBUG" ] || chmod 444 "$1" || exit + } + diff --git a/rpm-5.4.4-fix-removal-of-overlapping-dependencies.patch b/rpm-5.4.4-fix-removal-of-overlapping-dependencies.patch new file mode 100644 index 0000000..8b9633c --- /dev/null +++ b/rpm-5.4.4-fix-removal-of-overlapping-dependencies.patch @@ -0,0 +1,95 @@ +--- rpm-5.4.4/build/reqprov.c.overlap~ 2011-04-01 12:39:50.000000000 +0200 ++++ rpm-5.4.4/build/reqprov.c 2011-11-26 02:21:00.125251492 +0100 +@@ -9,6 +9,8 @@ + #include + #define _RPMEVR_INTERNAL + #include "rpmbuild.h" ++#include ++#include + #include "debug.h" + + int addReqProv(/*@unused@*/ Spec spec, Header h, +@@ -110,37 +112,61 @@ int addReqProv(/*@unused@*/ Spec spec, H + * TODO: auto-generated deps too + */ + if (flagtag && versions != NULL) { +- int overlap; ++ int overlap = 0, res = 0; ++ rpmds old = rpmdsSingle(flagtag, names[len], versions[len] ? versions[len] : "", flags[len]); ++ rpmds new = rpmdsSingle(flagtag, N, EVR, Flags); + +- if(*EVR && !*versions[len]) { +- overlap = 1; +- flags[len] = Flags; +- he->tag = flagtag; +- he->t = RPM_UINT32_TYPE; +- he->p.argv = (void *) &Flags; +- xx = headerMod(h, he, 0); +- } else { ++ overlap = rpmdsCompare(new, old); ++ ++ if (overlap) { + EVR_t lEVR = rpmEVRnew(RPMSENSE_ANY, 0), + rEVR = rpmEVRnew(RPMSENSE_ANY, 0); ++ rpmuint32_t newflags; ++ /* if we have both a requires and suggests, we turn it into a requires */ ++ if (!(Flags & RPMSENSE_MISSINGOK) || !(flags[len] & RPMSENSE_MISSINGOK)) { ++ flags[len] &= ~RPMSENSE_MISSINGOK; ++ Flags &= ~RPMSENSE_MISSINGOK; ++ } ++ ++ /* merge all flags about dependency type */ ++ newflags = ((flags[len]| Flags) & _ALL_REQUIRES_MASK); + + rpmEVRparse(EVR, lEVR); + rpmEVRparse(versions[len], rEVR); +- lEVR->Flags = Flags | RPMSENSE_EQUAL; +- rEVR->Flags = flags[len] | RPMSENSE_EQUAL; +- overlap = rpmEVRoverlap(lEVR, rEVR); +- if (!overlap) +- if (rpmEVRoverlap(rEVR, lEVR)) +- duplicate = 1; ++ lEVR->Flags = Flags; ++ rEVR->Flags = flags[len]; ++ ++ res = rpmEVRcompare(lEVR, rEVR); ++ /* we only update version if greater */ ++ if (res > 0) { ++ flags[len] = Flags; ++ ++ versions[len] = EVR; ++ he->tag = versiontag; ++ he->t = RPM_STRING_ARRAY_TYPE; ++ he->p.argv = versions; ++ xx = headerMod(h, he, 0); ++ rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(old), rpmdsDNEVR(new), rpmdsDNEVR(old)); ++ } else if (res < 0) { ++ rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(new), rpmdsDNEVR(old), rpmdsDNEVR(new)); ++ } else { ++ rpmlog(RPMLOG_DEBUG, "%s overlaps %s, removing %s and merging flags\n", rpmdsDNEVR(new), rpmdsDNEVR(old), rpmdsDNEVR(new)); ++ } ++ ++ flags[len] |= newflags; ++ he->tag = flagtag; ++ he->t = RPM_UINT32_TYPE; ++ he->p.ui32p = flags; ++ xx = headerMod(h, he, 0); ++ + lEVR = rpmEVRfree(lEVR); + rEVR = rpmEVRfree(rEVR); ++ duplicate = 1; + } +- if (overlap) { +- versions[len] = EVR; +- he->tag = versiontag; +- he->t = RPM_STRING_ARRAY_TYPE; +- he->p.argv = versions; +- xx = headerMod(h, he, 0); +- } else ++ old = rpmdsFree(old); ++ new = rpmdsFree(new); ++ ++ if (!overlap) + continue; + } + #else 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 new file mode 100644 index 0000000..6d81cf4 --- /dev/null +++ b/rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch @@ -0,0 +1,22 @@ +--- 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 new file mode 100644 index 0000000..67a1c2b --- /dev/null +++ b/rpm-5.4.4-glob-wildcards-for-loading-macro-files.patch @@ -0,0 +1,24 @@ +--- 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 new file mode 100644 index 0000000..1848a96 --- /dev/null +++ b/rpm-5.4.4-pass-_builddir-properly-to-find-debuginfo.patch @@ -0,0 +1,23 @@ +--- 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`" + BUILDDIR=. + out=debugfiles.list + nout=0 diff --git a/rpm-5.4.4-pkgconfigdeps-check-path.patch b/rpm-5.4.4-pkgconfigdeps-check-path.patch new file mode 100644 index 0000000..39858fe --- /dev/null +++ b/rpm-5.4.4-pkgconfigdeps-check-path.patch @@ -0,0 +1,76 @@ +--- 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 "$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-really-always-invoke-clean-at-end.patch b/rpm-5.4.4-really-always-invoke-clean-at-end.patch new file mode 100644 index 0000000..ac81f10 --- /dev/null +++ b/rpm-5.4.4-really-always-invoke-clean-at-end.patch @@ -0,0 +1,41 @@ +--- rpm-5.4.4/build/parseChangelog.c.clean~ 2011-08-15 00:43:47.000000000 +0200 ++++ rpm-5.4.4/build/parseChangelog.c 2011-11-12 17:52:00.756971839 +0100 +@@ -269,11 +269,7 @@ int parseChangelog(Spec spec) + /* There are no options to %changelog */ + if ((rc = readLine(spec, STRIP_COMMENTS)) > 0) { + iob = rpmiobFree(iob); +-#if defined(RPM_VENDOR_MANDRIVA) +- return (spec->clean == NULL) ? PART_CLEAN : PART_NONE; +-#else + return PART_NONE; +-#endif + } + if (rc != RPMRC_OK) + return rc; +@@ -285,11 +281,7 @@ int parseChangelog(Spec spec) + iob = rpmiobAppend(iob, spec->line, 0); + line = _free(line); + if ((rc = readLine(spec, STRIP_COMMENTS | STRIP_NOEXPAND)) > 0) { +-#if defined(RPM_VENDOR_MANDRIVA) +- nextPart = (spec->clean == NULL) ? PART_CLEAN : PART_NONE; +-#else + nextPart = PART_NONE; +-#endif + break; + } + if (rc != RPMRC_OK) +--- rpm-5.4.4/build/parseFiles.c.clean~ 2011-03-25 18:45:46.000000000 +0100 ++++ rpm-5.4.4/build/parseFiles.c 2011-11-12 17:52:00.758971903 +0100 +@@ -114,12 +114,7 @@ int parseFiles(Spec spec) + } + } + +-#if defined(RPM_VENDOR_MANDRIVA) +- /* if no %clean section, add implicit */ +- rc = (nextPart == PART_NONE && spec->clean == NULL) ? PART_CLEAN : nextPart; +-#else + rc = nextPart; +-#endif + + exit: + argv = _free(argv); diff --git a/rpm-5.4.4-rpmbuild-withoutclean.patch b/rpm-5.4.4-rpmbuild-withoutclean.patch new file mode 100644 index 0000000..7dae678 --- /dev/null +++ b/rpm-5.4.4-rpmbuild-withoutclean.patch @@ -0,0 +1,10 @@ +--- 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.4-use-dependency-type-for-ordering.patch b/rpm-5.4.4-use-dependency-type-for-ordering.patch new file mode 100644 index 0000000..f128d24 --- /dev/null +++ b/rpm-5.4.4-use-dependency-type-for-ordering.patch @@ -0,0 +1,84 @@ +--- rpm-5.4.4/lib/order.c.ordering~ 2011-01-14 15:06:08.000000000 +0100 ++++ rpm-5.4.4/lib/order.c 2011-11-16 11:31:23.529577558 +0100 +@@ -332,7 +332,7 @@ static inline /*@observer@*/ const char + /*@-mustmod@*/ /* FIX: hack modifies, but -type disables */ + static /*@owned@*/ /*@null@*/ const char * + zapRelation(rpmte q, rpmte p, +- int zap, /*@in@*/ /*@out@*/ int * nzaps, int msglvl) ++ int zap, /*@in@*/ /*@out@*/ int * nzaps, int msglvl, rpmuint32_t skipFlags) + /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ + /*@modifies q, p, *nzaps, rpmGlobalMacroContext, internalState @*/ + { +@@ -364,6 +364,18 @@ zapRelation(rpmte q, rpmte p, + + dp = rpmdsNewDNEVR( identifyDepend(Flags), requires); + ++ if(Flags & skipFlags) { ++ if(zap) { ++ rpmlog(msglvl, ++ _("not removing %s \"%s\" from tsort relations.\n"), ++ (rpmteNEVRA(p) ? rpmteNEVRA(p) : "???"), dp); ++ if (nzaps) ++ (*nzaps)++; ++ } ++ dp = _free(dp); ++ continue; ++ } ++ + /* + * Attempt to unravel a dependency loop by eliminating Requires's. + */ +@@ -1812,6 +1824,18 @@ int _rpmtsOrder(rpmts ts) + int depth; + int breadth; + int qlen; ++ static const evrFlags orderPriority[] = { ++ RPMSENSE_MISSINGOK, ++ RPMSENSE_SCRIPT_VERIFY, ++ RPMSENSE_PACKAGE, ++ RPMSENSE_FIND_REQUIRES, ++ _ERASE_ONLY_MASK, ++ _INSTALL_ONLY_MASK, ++ _ALL_REQUIRES_MASK ++ }; /* dependency to zap in order to try resolve dependency loops */ ++ rpmuint32_t skipFlags = _ALL_REQUIRES_MASK; ++ unsigned sfi = 0; ++ + #endif /* REFERENCE */ + + if (_rpmts_debug) +@@ -2007,6 +2031,9 @@ fprintf(stderr, "--> %s(%p) tsFlags 0x%x + rescan: + if (pi != NULL) pi = rpmtsiFree(pi); + #endif ++ if (sfi < sizeof(orderPriority)) ++ skipFlags &= ~orderPriority[sfi++]; ++ + q = r = NULL; + qlen = 0; + pi = rpmtsiInit(ts); +@@ -2168,10 +2195,14 @@ rescan: + const char * nevra; + #endif + const char * dp; ++ /* ++ * TODO: use RPMLOG_DEBUG for when loops can be resolved ++ * without zapping all dependencies in it ++ */ + rpmlogLvl msglvl = (anaconda || (rpmtsDFlags(ts) & RPMDEPS_FLAG_DEPLOOPS)) + ? RPMLOG_WARNING : RPMLOG_ERR; + #if defined(RPM_VENDOR_MANDRIVA) /* loop-detection-optional-loglevel */ +- // Report loops as debug-level message by default (7 = RPMLOG_DEBUG), overridable ++ /* Report loops as debug-level message by default (7 = RPMLOG_DEBUG), overridable */ + msglvl = rpmExpandNumeric("%{?_loop_detection_loglevel}%{?!_loop_detection_loglevel:7}"); + #endif + +@@ -2184,7 +2215,7 @@ rescan: + } + + /* Find (and destroy if co-requisite) "q <- p" relation. */ +- dp = zapRelation(q, p, 1, &nzaps, msglvl); ++ dp = zapRelation(q, p, 1, &nzaps, msglvl, skipFlags); + + #if 0 + /* Print next member of loop. */ diff --git a/rpm-5.4.5-break-out-of-elf-link-loop.patch b/rpm-5.4.5-break-out-of-elf-link-loop.patch new file mode 100644 index 0000000..caa8070 --- /dev/null +++ b/rpm-5.4.5-break-out-of-elf-link-loop.patch @@ -0,0 +1,45 @@ +--- rpm-5.4.5/lib/rpmds.c.link_loop~ 2012-03-05 22:32:46.858675088 +0100 ++++ rpm-5.4.5/lib/rpmds.c 2012-03-06 18:52:18.775950015 +0100 +@@ -2938,7 +2938,7 @@ static char * sonameDep(/*@returned@*/ c + return t; + } + +-static char *find_elf_interpreter(GElf_Ehdr *ehdr, Elf *elf, char *filename) ++static char *find_elf_interpreter(GElf_Ehdr *ehdr, Elf *elf, char *filename, char *prev) + { + FILE *fp = NULL; + struct stat statbuf; +@@ -3040,6 +3040,8 @@ foo: + char path[MAXPATHLEN] = ""; + + libpath = elf_strptr (elf, shdr->sh_link, dyn->d_un.d_val); ++ if (prev && *prev && libpath && !strcmp(basename(prev), libpath)) ++ libpath = NULL; + + if (!libpath || !strlen(libpath)) + continue; +@@ -3066,7 +3068,7 @@ foo: + if ((rpath && *rpath) || tmp) + tmp2 = stpcpy(tmp2, ":"); + /* XXX: do better check to ensure libraries are all of the same class */ +- tmp2 = stpcpy(tmp2, (class == ELFCLASS64) ? "/lib64" : "/lib"); ++ tmp2 = stpcpy(tmp2, (class == ELFCLASS64) ? "/lib64:/usr/lib64" : "/lib:/usr/lib"); + tmp = buf; + { + int i, count = 1; +@@ -3116,13 +3118,13 @@ end: + fclose(fp); + } + if (!interp_name && libpath) +- return find_elf_interpreter(NULL, NULL, libpath); ++ return find_elf_interpreter(NULL, NULL, libpath, filename); + return interp_name; + } + + static int checkuClibc(GElf_Ehdr *ehdr, Elf *elf) { + int ret = 0; +- char *interp = find_elf_interpreter(ehdr, elf, NULL); ++ char *interp = find_elf_interpreter(ehdr, elf, NULL, NULL); + + if (interp) { + char *tmp = basename(interp); diff --git a/rpm-5.4.5-desktop-provides.patch b/rpm-5.4.5-desktop-provides.patch new file mode 100644 index 0000000..8489f51 --- /dev/null +++ b/rpm-5.4.5-desktop-provides.patch @@ -0,0 +1,70 @@ +--- rpm-5.4.5/lib/rpmfc.c.desktop~ 2012-03-03 04:52:25.531739631 +0100 ++++ rpm-5.4.5/lib/rpmfc.c 2012-03-03 04:52:28.659741193 +0100 +@@ -993,6 +993,17 @@ static int rpmfcSCRIPT(rpmfc fc) + xx = rpmfcHelper(fc, 'R', "kernel"); + } + mire = mireFree(mire); ++ } ++ if ((fc->fcolor->vals[fc->ix] & RPMFC_SCRIPT)) { ++ miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS); ++ if (!mireRegcomp(mire, "^.*/usr/share/applications/.*\\.desktop$")) ++ if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0) { ++ fc->fcolor->vals[fc->ix] |= (RPMFC_MODULE|RPMFC_SCRIPT); ++ xx = rpmfcHelper(fc, 'P', "desktop"); ++ /* XXX: currently of no use, but for the sake of consistency... */ ++ xx = rpmfcHelper(fc, 'R', "desktop"); ++ } ++ mire = mireFree(mire); + #endif + } + +@@ -1208,6 +1219,12 @@ assert(fc->fn != NULL); + if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0) + fc->fcolor->vals[fc->ix] |= (RPMFC_MODULE|RPMFC_SCRIPT); + mire = mireFree(mire); ++ mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS); ++ /* buttfuckin' retarded, but whatever.. it'll work at least! ;) */ ++ if (!mireRegcomp(mire, "^.*/usr/share/applications/.*\\.desktop$")) ++ if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0) ++ fc->fcolor->vals[fc->ix] |= RPMFC_SCRIPT; ++ mire = mireFree(mire); + #endif + } + } +--- rpm-5.4.5/macros/macros.rpmbuild.in.desktop~ 2012-03-03 04:51:07.041700511 +0100 ++++ rpm-5.4.5/macros/macros.rpmbuild.in 2012-03-03 04:51:50.048721947 +0100 +@@ -685,5 +685,8 @@ done \ + %__font_provides %{_rpmhome}/fontconfig.prov + #%__font_requires %{_rpmhome}/fontconfig.req + ++%__desktop_provides %{_rpmhome}/mandriva/desktop-file.prov ++#%__desktop_requires %{_rpmhome}/mandriva/desktop-file.prov ++ + # \endverbatim + #*/ +--- rpm-5.4.5/scripts/desktop-file.prov.desktop~ 2012-03-03 04:54:39.103806210 +0100 ++++ rpm-5.4.5/scripts/desktop-file.prov 2012-03-03 04:54:27.703800528 +0100 +@@ -0,0 +1,23 @@ ++#!/bin/sh ++# ++# Transform desktop mimetype info into RPM mimehandler(type) provides ++# ++# Author: Richard Hughes ++# Based on other provides scripts from RPM ++ ++OLD_IFS="$IFS" ++while read instfile ; do ++ case "$instfile" in ++ *.desktop) ++ if ! grep -q '^Type=Application$' "$instfile"; then continue; fi ++ if ! grep -q '^Exec=' "$instfile"; then continue; fi ++ mime=`grep '^MimeType=' "$instfile" | cut -d'=' -f2` ++ IFS=';' ++ for type in $mime ; do ++ echo 'mimehandler('$type')' ++ done ++ ;; ++ esac ++done ++IFS=$OLD_IFS ++ diff --git a/rpm-5.4.5-do-not-merge-script-dependencies-with-non-script-dependencies.patch b/rpm-5.4.5-do-not-merge-script-dependencies-with-non-script-dependencies.patch new file mode 100644 index 0000000..a0287c9 --- /dev/null +++ b/rpm-5.4.5-do-not-merge-script-dependencies-with-non-script-dependencies.patch @@ -0,0 +1,36 @@ +--- rpm-5.4.5/build/reqprov.c.script_overlap~ 2012-03-06 21:09:05.867560098 +0100 ++++ rpm-5.4.5/build/reqprov.c 2012-03-06 21:10:49.962670768 +0100 +@@ -125,9 +125,14 @@ int addReqProv(/*@unused@*/ Spec spec, H + /* do not consider dependency ranges like R: foo > 1, R: foo < 3 + * as overlapping (mdvbz#65269) + */ ++#define RPMSENSE_SCRIPTS (RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN|RPMSENSE_SCRIPT_VERIFY) + if (!((Flags & RPMSENSE_GREATER && flags[len] & RPMSENSE_LESS) || +- (Flags & RPMSENSE_LESS && flags[len] & RPMSENSE_GREATER))) ++ (Flags & RPMSENSE_LESS && flags[len] & RPMSENSE_GREATER)) && ++ /* do not merge script dependencies with non-script dependencies */ ++ !(((Flags & RPMSENSE_SCRIPTS) && !(flags[len] & RPMSENSE_SCRIPTS)) || ++ ((flags[len] & RPMSENSE_SCRIPTS) && !(Flags & RPMSENSE_SCRIPTS)))) + overlap = rpmdsCompare(new, old); ++#undef RPMSENSE_SCRIPTS + + if (overlap) { + EVR_t lEVR = rpmEVRnew(RPMSENSE_ANY, 0), +--- rpm-5.4.5/lib/rpmfc.c.script_overlap~ 2012-03-06 21:09:05.870560101 +0100 ++++ rpm-5.4.5/lib/rpmfc.c 2012-03-06 21:09:29.342585059 +0100 +@@ -524,9 +524,14 @@ assert(EVR != NULL); + /* do not consider dependency ranges like R: foo > 1, R: foo < 3 + * as overlapping (mdvbz#65269) + */ ++#define RPMSENSE_SCRIPTS (RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN|RPMSENSE_SCRIPT_VERIFY) + if (!((Flags & RPMSENSE_GREATER && (*depsp)->Flags[(*depsp)->i] & RPMSENSE_LESS) || +- (Flags & RPMSENSE_LESS &&(*depsp)->Flags[(*depsp)->i] & RPMSENSE_GREATER))) ++ (Flags & RPMSENSE_LESS && (*depsp)->Flags[(*depsp)->i] & RPMSENSE_GREATER)) && ++ /* do not merge script dependencies with non-script dependencies */ ++ !(((Flags & RPMSENSE_SCRIPTS) && !((*depsp)->Flags[(*depsp)->i] & RPMSENSE_SCRIPTS)) || ++ (((*depsp)->Flags[(*depsp)->i] & RPMSENSE_SCRIPTS) && !(Flags & RPMSENSE_SCRIPTS)))) + overlap = rpmdsCompare(*depsp, ds); ++#undef RPMSENSE_SCRIPTS + + if (overlap) { + EVR_t lEVR = rpmEVRnew(RPMSENSE_ANY, 0), diff --git a/rpm-5.4.5-dont-generate-php-dependencies-only-when-executable.patch b/rpm-5.4.5-dont-generate-php-dependencies-only-when-executable.patch new file mode 100644 index 0000000..15dcd3f --- /dev/null +++ b/rpm-5.4.5-dont-generate-php-dependencies-only-when-executable.patch @@ -0,0 +1,12 @@ +--- rpm-5.4.5/lib/rpmfc.c.php_dep_gen~ 2012-02-24 13:41:47.442140908 +0100 ++++ rpm-5.4.5/lib/rpmfc.c 2012-02-24 13:41:49.933142149 +0100 +@@ -919,7 +919,9 @@ static int rpmfcSCRIPT(rpmfc fc) + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) { + xx = rpmfcHelper(fc, 'P', "php"); ++#ifdef NOTYET + if (is_executable) ++#endif + xx = rpmfcHelper(fc, 'R', "php"); + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_MONO) { diff --git a/rpm-5.4.5-drop-some-interpreter-deps.patch b/rpm-5.4.5-drop-some-interpreter-deps.patch new file mode 100644 index 0000000..c0ed916 --- /dev/null +++ b/rpm-5.4.5-drop-some-interpreter-deps.patch @@ -0,0 +1,32 @@ +--- rpm-5.4.5/lib/rpmfc.c.interpret_deps~ 2012-02-29 21:36:46.309581229 +0100 ++++ rpm-5.4.5/lib/rpmfc.c 2012-02-29 21:52:44.099058625 +0100 +@@ -843,10 +843,19 @@ static int rpmfcSCRIPT(rpmfc fc) + *se = '\0'; + se++; + ++/*@-moduncon@*/ ++ bn = basename(s); ++ + if (!_filter_values + || (!fc->skipReq + && !rpmfcMatchRegexps(fc->Rmires, fc->Rnmire, s, 'R'))) +- if (is_executable) { ++ if (is_executable && ++ strncmp(bn, "bash", sizeof("bash")-1) && ++ strcmp(bn, "env") && ++ strncmp(bn, "perl", sizeof("perl")-1) && ++ strncmp(bn, "python", sizeof("python")-1) && ++ strncmp(bn, "ruby", sizeof("ruby")-1) && ++ strcmp(bn, "sh")) { + /* Add to package requires. */ + ds = rpmdsSingle(RPMTAG_REQUIRENAME, s, "", RPMSENSE_FIND_REQUIRES); + xx = rpmdsMerge(&fc->requires, ds); +@@ -860,8 +869,6 @@ static int rpmfcSCRIPT(rpmfc fc) + + /* Set color based on interpreter name. */ + /* XXX magic token should have already done this?!? */ +-/*@-moduncon@*/ +- bn = basename(s); + /*@=moduncon@*/ + if (!strcmp(bn, "perl")) + fc->fcolor->vals[fc->ix] |= RPMFC_PERL; diff --git a/rpm-5.4.5-fix-elf-interpreter-resolving-breaking-uclibc-deps.patch b/rpm-5.4.5-fix-elf-interpreter-resolving-breaking-uclibc-deps.patch new file mode 100644 index 0000000..0d58ae3 --- /dev/null +++ b/rpm-5.4.5-fix-elf-interpreter-resolving-breaking-uclibc-deps.patch @@ -0,0 +1,58 @@ +--- rpm-5.4.5/lib/rpmds.c.uclibc~ 2012-03-01 15:13:53.758195733 +0100 ++++ rpm-5.4.5/lib/rpmds.c 2012-03-01 15:15:13.648235553 +0100 +@@ -3016,31 +3016,28 @@ foo: + data = NULL; + while ((data = elf_getdata (scn, data)) != NULL) { + int dynsize = (int)(shdr->sh_size / shdr->sh_entsize)-1; ++ for (cnt = dynsize; cnt >= 0; --cnt) { ++ dyn = gelf_getdyn (data, cnt, &dyn_mem); ++ ++ if (dyn->d_tag == DT_RPATH || dyn->d_tag == DT_RUNPATH) { ++ rpath = elf_strptr (elf, shdr->sh_link, dyn->d_un.d_val); ++ break; ++ } ++ } + for (cnt = 0; cnt <= dynsize; ++cnt) { + dyn = gelf_getdyn (data, cnt, &dyn_mem); + + /* if this an elf interpeter, the only thing we want is to find SONAME + * and return it + */ +- if (phdr) { +- if (dyn->d_tag != DT_SONAME) +- continue; ++ if (phdr && dyn->d_tag == DT_SONAME) { + interp_name = strdup(elf_strptr(elf, shdr->sh_link, dyn->d_un.d_val)); + goto end; + } +- if (rpath == NULL) { +- if (dyn->d_tag == DT_RPATH) +- rpath = elf_strptr (elf, shdr->sh_link, dyn->d_un.d_val); +- else if (cnt == dynsize) +- rpath = ""; +- if (rpath != NULL) +- cnt = -1; +- continue; +- } +- else if (rpath && dyn->d_tag == DT_NEEDED) { ++ if (dyn->d_tag == DT_NEEDED) { + char *tmp, *tmp2; +- char buf[1024]; +- char path[1024] = ""; ++ char buf[MAXPATHLEN]; ++ char path[MAXPATHLEN] = ""; + + libpath = elf_strptr (elf, shdr->sh_link, dyn->d_un.d_val); + +@@ -3106,10 +3103,10 @@ foo: + *tmp = '\0'; + } + libpath = buf; ++ break; + } + } + } +- break; + } + } + diff --git a/rpm-5.4.5-fix-generation-of-uclibc-deps-on-non-lib64.patch b/rpm-5.4.5-fix-generation-of-uclibc-deps-on-non-lib64.patch new file mode 100644 index 0000000..68e3945 --- /dev/null +++ b/rpm-5.4.5-fix-generation-of-uclibc-deps-on-non-lib64.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.5/lib/rpmds.c.uclibc_nolib64~ 2012-03-07 16:45:18.844313010 +0100 ++++ rpm-5.4.5/lib/rpmds.c 2012-03-07 16:45:26.711321576 +0100 +@@ -3131,7 +3131,7 @@ static int checkuClibc(GElf_Ehdr *ehdr, + if (tmp[0] == 'l' && tmp[1] == 'd') { + tmp += ((tmp[2] == '3' && tmp[3] == '2') || + (tmp[2] == '6' && tmp[3] == '4')) ? +- 5 : 7; ++ 5 : 3; + if (!strncasecmp(tmp, "uClibc.so", sizeof("uClibc.so")-1)) + ret = 1; + } diff --git a/rpm-5.4.5-fix-removal-of-overlapping-dependencies-for-internal-dependency-generator.patch b/rpm-5.4.5-fix-removal-of-overlapping-dependencies-for-internal-dependency-generator.patch new file mode 100644 index 0000000..302fb33 --- /dev/null +++ b/rpm-5.4.5-fix-removal-of-overlapping-dependencies-for-internal-dependency-generator.patch @@ -0,0 +1,84 @@ +--- rpm-5.4.5/lib/rpmfc.c.int_gen_overlap~ 2012-02-23 22:12:39.924314353 +0100 ++++ rpm-5.4.5/lib/rpmfc.c 2012-02-23 22:12:49.006318880 +0100 +@@ -514,27 +514,57 @@ assert(EVR != NULL); + ds = rpmdsSingle(tagN, N, EVR, Flags); + + #if defined(RPM_VENDOR_MANDRIVA) /* filter-overlapping-dependencies */ +- int overlap = 0; ++ /* XXX: should really share same code path as with what's in ++ * build/reqprov.c:addReqProv() ++ */ ++ int overlap = 0, res = 0; + if (*depsp) { + int ix = rpmdsSearch(*depsp, ds); + if (ix >= 0) { +- EVR_t lEVR = rpmEVRnew(RPMSENSE_ANY, 0), +- rEVR = rpmEVRnew(RPMSENSE_ANY, 0); ++ /* do not consider dependency ranges like R: foo > 1, R: foo < 3 ++ * as overlapping (mdvbz#65269) ++ */ ++ if (!((Flags & RPMSENSE_GREATER && (*depsp)->Flags[(*depsp)->i] & RPMSENSE_LESS) || ++ (Flags & RPMSENSE_LESS &&(*depsp)->Flags[(*depsp)->i] & RPMSENSE_GREATER))) ++ overlap = rpmdsCompare(*depsp, ds); ++ ++ if (overlap) { ++ EVR_t lEVR = rpmEVRnew(RPMSENSE_ANY, 0), ++ rEVR = rpmEVRnew(RPMSENSE_ANY, 0); ++ rpmuint32_t newflags; ++ ++ /* if we have both a requires and suggests, we turn it into a requires */ ++ if (!(Flags & RPMSENSE_MISSINGOK) || !((*depsp)->Flags[(*depsp)->i] & RPMSENSE_MISSINGOK)) { ++ (*depsp)->Flags[(*depsp)->i] &= ~RPMSENSE_MISSINGOK; ++ Flags &= ~RPMSENSE_MISSINGOK; ++ } ++ ++ /* merge all flags about dependency type */ ++ newflags = (((*depsp)->Flags[(*depsp)->i]| Flags) & _ALL_REQUIRES_MASK); ++ ++ rpmdsSetIx(*depsp, ix); ++ ++ rpmEVRparse(EVR, lEVR); ++ rpmEVRparse(rpmdsEVR(*depsp), rEVR); ++ lEVR->Flags = Flags; ++ rEVR->Flags = (*depsp)->Flags[(*depsp)->i]; ++ ++ res = rpmEVRcompare(lEVR, rEVR); ++ if (res > 0) { ++ (*depsp)->Flags[(*depsp)->i] = Flags; ++ (*depsp)->EVR[(*depsp)->i] = EVR; ++ rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(*depsp), rpmdsDNEVR(ds), rpmdsDNEVR(*depsp)); ++ } else if (res < 0) { ++ rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(ds), rpmdsDNEVR(*depsp), rpmdsDNEVR(ds)); ++ } else { ++ rpmlog(RPMLOG_DEBUG, "%s overlaps %s, removing %s and merging flags\n", rpmdsDNEVR(ds), rpmdsDNEVR(*depsp), rpmdsDNEVR(ds)); ++ } + +- rpmdsSetIx(*depsp, ix); ++ (*depsp)->Flags[(*depsp)->i] |= newflags; + +- rpmEVRparse(rpmdsEVR(*depsp), lEVR); +- rpmEVRparse(EVR, rEVR); +- lEVR->Flags = rpmdsFlags(*depsp) | RPMSENSE_EQUAL; +- rEVR->Flags = Flags | RPMSENSE_EQUAL; +- +- if (rpmEVRcompare(lEVR, rEVR) < 0) { +- (*depsp)->EVR[(*depsp)->i] = EVR; +- (*depsp)->Flags[(*depsp)->i] = Flags; +- overlap = 1; ++ lEVR = rpmEVRfree(lEVR); ++ rEVR = rpmEVRfree(rEVR); + } +- lEVR = rpmEVRfree(lEVR); +- rEVR = rpmEVRfree(rEVR); + } + } + if (!overlap) +@@ -1183,7 +1213,7 @@ assert(se != NULL); + switch (deptype) { + default: + /*@switchbreak@*/ break; +- case 'P': ++ case 'P': + skipping = fc->skipProv; + ds = rpmdsSingle(RPMTAG_PROVIDENAME, N, EVR, Flags); + dix = rpmdsFind(fc->provides, ds); diff --git a/rpm-5.4.5-libsql-conditional.patch b/rpm-5.4.5-libsql-conditional.patch new file mode 100644 index 0000000..62ac52d --- /dev/null +++ b/rpm-5.4.5-libsql-conditional.patch @@ -0,0 +1,12 @@ +--- rpm-5.4.5/lib/Makefile.am.libsql~ 2011-08-15 22:33:15.000000000 +0200 ++++ rpm-5.4.5/lib/Makefile.am 2012-02-20 13:33:03.143259035 +0100 +@@ -88,7 +88,9 @@ librpm.la: $(librpm_la_OBJECTS) $(librpm + $(librpm_la_LINK) -rpath $(usrlibdir) $(librpm_la_OBJECTS) $(librpm_la_LIBADD) + + libsql_la_SOURCES = libsql.c ++if WITH_DBSQL + libsql_la_LIBADD = librpm.la $(RPMDB_LDADD_COMMON) ++endif + + install-data-hook: + if !ENABLE_BUILD_LAFILES diff --git a/rpm-5.4.5-patchset_16004.patch b/rpm-5.4.5-patchset_16004.patch new file mode 100644 index 0000000..87711af --- /dev/null +++ b/rpm-5.4.5-patchset_16004.patch @@ -0,0 +1,405 @@ +--- rpm-5.4.5/lib/rpmds.c.16004~ 2012-02-24 14:13:37.649093023 +0100 ++++ rpm-5.4.5/lib/rpmds.c 2012-02-24 14:13:40.677094532 +0100 +@@ -2901,7 +2901,234 @@ rpmds rpmdsFromPRCO(rpmPRCO PRCO, rpmTag + * @param isElf64 is this an ELF64 symbol? + */ + #if defined(HAVE_GELF_H) && defined(HAVE_LIBELF) && !defined(__FreeBSD__) +-static char * sonameDep(/*@returned@*/ char * t, const char * s, int isElf64) ++#if defined(RPM_VENDOR_MANDRIVA) ++static char * sonameDep(/*@returned@*/ char * t, const char * s, int isElf64, int devel, int uClibc) ++ /*@modifies t @*/ ++{ ++ char *tmp = t; ++ *t = '\0'; ++ if (uClibc) ++ tmp = stpcpy(tmp, "uClibc("); ++ if (devel) { ++ tmp = stpcpy(tmp, "devel("); ++ } ++#if !defined(__alpha__) && !defined(__sun) ++ if (!isElf64) { ++ /* XXX: eehhk, would've been nice with consistency, mandriva legacy... :| */ ++ if (!devel && s[strlen(s)-1] != ')') ++ (void) stpcpy( stpcpy(tmp, s), "()(64bit)"); ++ else { ++ tmp = stpcpy(tmp, s); ++ if (devel) ++ tmp = strstr(t, ".so"); ++ tmp = stpcpy(tmp, "(64bit)"); ++ } ++ }else ++#endif ++ tmp = stpcpy(tmp, s); ++ if (devel) { ++ char *suffix = strstr(t, ".so"); ++ if (suffix) ++ tmp = suffix; ++ tmp = stpcpy(tmp, ")"); ++ } ++ if (uClibc) ++ tmp = stpcpy(tmp, ")"); ++ ++ return t; ++} ++ ++static char *find_elf_interpreter(GElf_Ehdr *ehdr, Elf *elf, char *filename) ++{ ++ FILE *fp = NULL; ++ struct stat statbuf; ++ GElf_Ehdr ehdr_mem; ++ GElf_Shdr shdr_mem, *shdr; ++ GElf_Phdr phdr_mem, *phdr; ++ GElf_Dyn dyn_mem, *dyn; ++ Elf_Data * data; ++ Elf_Scn *scn = NULL; ++ int fdno; ++ char *interp_name = NULL; ++ char *libpath = NULL; ++ int cnt; ++ int class; ++ size_t shstrndx; ++ ++ if (filename) { ++ if (!(fp = fopen(filename, "r"))) { ++ perror(filename); ++ return NULL; ++ } ++ if (fstat((fdno = fileno(fp)), &statbuf) < 0) { ++ perror(filename); ++ goto end; ++ } ++ if ((size_t) statbuf.st_size < sizeof(Elf64_Ehdr) || !S_ISREG(statbuf.st_mode)) ++ goto foo; ++ ++ (void) elf_version(EV_CURRENT); ++ elf = NULL; ++ if ((elf = elf_begin (fdno, ELF_C_READ, NULL)) == NULL ++ || elf_kind(elf) != ELF_K_ELF ++ || (ehdr = gelf_getehdr(elf, &ehdr_mem)) == NULL ++ || !(ehdr->e_type == ET_DYN || ehdr->e_type == ET_EXEC)) ++ goto end; ++ } ++foo: ++ ++ if (ehdr->e_type != ET_EXEC && ehdr->e_type != ET_DYN) { ++ fprintf(stderr, "%s: not a dynamic executable\n", filename); ++ goto end; ++ } ++ class = gelf_getclass(elf); ++ ++ for (cnt = 0; cnt < ehdr->e_phnum; cnt++) { ++ phdr = gelf_getphdr (elf, cnt, &phdr_mem); ++ if (phdr->p_type == PT_INTERP) ++ break; ++ phdr = NULL; ++ } ++ if (phdr) { ++ Elf_Data *data = NULL; ++ ++ scn = gelf_offscn (elf, phdr->p_offset); ++ shdr = gelf_getshdr(scn, &shdr_mem); ++ data = elf_getdata (scn, data); ++ interp_name = strdup(data->d_buf); ++ goto end; ++ } ++ ++ if (elf_getshdrstrndx (elf, &shstrndx) >= 0) ++ while ((scn = elf_nextscn(elf, scn)) != NULL) { ++ shdr = gelf_getshdr(scn, &shdr_mem); ++ if (shdr->sh_type == SHT_DYNAMIC) { ++ char *rpath = NULL; ++ for (cnt = 0; cnt < ehdr->e_phnum; cnt++) { ++ phdr = gelf_getphdr (elf, cnt, &phdr_mem); ++ if (phdr->p_type == PT_LOAD) ++ break; ++ } ++ ++ data = NULL; ++ while ((data = elf_getdata (scn, data)) != NULL) { ++ int dynsize = (int)(shdr->sh_size / shdr->sh_entsize)-1; ++ for (cnt = 0; cnt <= dynsize; ++cnt) { ++ dyn = gelf_getdyn (data, cnt, &dyn_mem); ++ ++ if (rpath == NULL) { ++ if (dyn->d_tag == DT_RPATH) ++ rpath = elf_strptr (elf, shdr->sh_link, dyn->d_un.d_val); ++ else if (cnt == dynsize) ++ rpath = ""; ++ if (rpath != NULL) ++ cnt = -1; ++ continue; ++ } ++ else if (rpath && DT_NEEDED == dyn->d_tag) { ++ char *tmp, *tmp2; ++ char buf[1024]; ++ char path[1024] = ""; ++ ++ libpath = elf_strptr (elf, shdr->sh_link, dyn->d_un.d_val); ++ ++ if (!libpath || !strlen(libpath)) ++ continue; ++ ++ tmp = libpath; ++ while (*tmp) { ++ if (*tmp == '/') ++ libpath = tmp + 1; ++ tmp++; ++ } ++ ++ /* If this is a fully resolved name, we don't need to modify the path */ ++ if (stat(libpath, &statbuf) == 0) ++ continue; ++ ++ tmp2 = path; ++ if (rpath && *rpath) { ++ tmp2 = stpcpy(tmp2, rpath); ++ tmp2 = stpcpy(tmp2, ":"); ++ } ++ tmp = getenv("LD_LIBRARY_PATH"); ++ if (tmp) ++ tmp2 = stpcpy(tmp2, tmp); ++ if ((rpath && *rpath) || tmp) ++ tmp2 = stpcpy(tmp2, ":"); ++ /* XXX: do better check to ensure libraries are all of the same class */ ++ tmp2 = stpcpy(tmp2, (class == ELFCLASS64) ? "/lib64" : "/lib"); ++ tmp = buf; ++ { ++ int i, count = 1; ++ char *path_n; ++ ++ /* Eliminate all double //s */ ++ path_n = path; ++ while ((path_n = strstr(path_n, "//"))) { ++ i = strlen(path_n); ++ memmove(path_n, path_n + 1, i - 1); ++ *(path_n + i - 1) = '\0'; ++ } ++ ++ /* Replace colons with zeros in path_list and count them */ ++ for (i = strlen(path); i > 0; i--) { ++ if (path[i] == ':') { ++ path[i] = 0; ++ count++; ++ } ++ } ++ path_n = path; ++ for (i = 0; i < count; i++) { ++ strcpy(tmp, path_n); ++ strcat(tmp, "/"); ++ strcat(tmp, libpath); ++ if (stat(tmp, &statbuf) == 0 && statbuf.st_mode & S_IRUSR) { ++ path[0] = '\0'; ++ break; ++ } ++ path_n += (strlen(path_n) + 1); ++ } ++ if(path[0]) ++ *tmp = '\0'; ++ } ++ libpath = buf; ++ } ++ } ++ } ++ break; ++ } ++ } ++ ++end: ++ if (fp) { ++ if (elf) (void) elf_end(elf); ++ fclose(fp); ++ } ++ if (!interp_name && libpath) ++ return find_elf_interpreter(NULL, NULL, libpath); ++ return interp_name; ++} ++ ++static int checkuClibc(GElf_Ehdr *ehdr, Elf *elf) { ++ int ret = 0; ++ char *interp = find_elf_interpreter(ehdr, elf, NULL); ++ ++ if (interp) { ++ char *tmp = basename(interp); ++ if (tmp[0] == 'l' && tmp[1] == 'd') { ++ tmp += ((tmp[2] == '3' && tmp[3] == '2') || ++ (tmp[2] == '6' && tmp[3] == '4')) ? ++ 5 : 7; ++ if (!strncasecmp(tmp, "uClibc.so", sizeof("uClibc.so")-1)) ++ ret = 1; ++ } ++ free(interp); ++ } ++ return ret; ++} ++#else ++static char * sonameDep(/*@returned@*/ char * t, const char * s, int isElf64, int devel, int uClibc) + /*@modifies t @*/ + { + *t = '\0'; +@@ -2917,6 +3144,7 @@ static char * sonameDep(/*@returned@*/ c + return t; + } + #endif ++#endif + + /*@-moduncon -noeffectuncon @*/ + int rpmdsELF(const char * fn, int flags, +@@ -2945,6 +3173,7 @@ int rpmdsELF(const char * fn, int flags, + int xx; + int isElf64; + int isDSO; ++ int isuClibc; + int gotSONAME = 0; + int gotDEBUG = 0; + int gotHASH = 0; +@@ -2987,6 +3216,11 @@ fprintf(stderr, "*** rpmdsELF(%s, %d, %p + + isElf64 = ehdr->e_ident[EI_CLASS] == ELFCLASS64; + isDSO = ehdr->e_type == ET_DYN; ++#if defined(RPM_VENDOR_MANDRIVA) ++ isuClibc = checkuClibc(ehdr, elf); ++#else ++ isuClibc = 0; ++#endif + + /*@-uniondef @*/ + scn = NULL; +@@ -3085,7 +3319,7 @@ fprintf(stderr, "*** rpmdsELF(%s, %d, %p + + /* Add next provide dependency. */ + ds = rpmdsSingle(RPMTAG_PROVIDES, +- sonameDep(t, buf, isElf64), ++ sonameDep(t, buf, isElf64, 0, isuClibc), + "", RPMSENSE_FIND_PROVIDES); + xx = add(context, ds); + (void)rpmdsFree(ds); +@@ -3138,7 +3372,7 @@ fprintf(stderr, "*** rpmdsELF(%s, %d, %p + + /* Add next require dependency. */ + ds = rpmdsSingle(RPMTAG_REQUIRENAME, +- sonameDep(t, buf, isElf64), ++ sonameDep(t, buf, isElf64, 0, isuClibc), + "", RPMSENSE_FIND_REQUIRES); + xx = add(context, ds); + (void)rpmdsFree(ds); +@@ -3180,7 +3414,7 @@ fprintf(stderr, "*** rpmdsELF(%s, %d, %p + assert(s != NULL); + buf[0] = '\0'; + ds = rpmdsSingle(RPMTAG_REQUIRENAME, +- sonameDep(buf, s, isElf64), ++ sonameDep(buf, s, isElf64, 0, isuClibc), + "", RPMSENSE_FIND_REQUIRES); + xx = add(context, ds); + (void)rpmdsFree(ds); +@@ -3195,7 +3429,7 @@ assert(s != NULL); + /* Add next provide dependency. */ + buf[0] = '\0'; + ds = rpmdsSingle(RPMTAG_PROVIDENAME, +- sonameDep(buf, s, isElf64), ++ sonameDep(buf, s, isElf64, 0, isuClibc), + "", RPMSENSE_FIND_PROVIDES); + xx = add(context, ds); + (void)rpmdsFree(ds); +@@ -3231,7 +3465,7 @@ assert(s != NULL); + /* Add next provide dependency. */ + buf[0] = '\0'; + ds = rpmdsSingle(RPMTAG_PROVIDENAME, +- sonameDep(buf, s, isElf64), "", RPMSENSE_FIND_PROVIDES); ++ sonameDep(buf, s, isElf64, 0, isuClibc), "", RPMSENSE_FIND_PROVIDES); + xx = add(context, ds); + (void)rpmdsFree(ds); + ds = NULL; +@@ -3251,46 +3485,6 @@ exit: + + + #if defined(RPM_VENDOR_MANDRIVA) +-/** +- * Return a soname dependency constructed from an elf string, Mandriva-style. +- * @retval t soname dependency +- * @param s elf string (NULL uses "") +- * @param isElf64 is this an ELF64 symbol? +- */ +-#if defined(HAVE_GELF_H) && defined(HAVE_LIBELF) && !defined(__FreeBSD__) +-static char * mdvSonameDep(/*@returned@*/ char * t, const char * s, int isElf64, int devel) +- /*@modifies t @*/ +-{ +- char *tmp = t; +- *t = '\0'; +- if (devel) { +- tmp = stpcpy(t, "devel("); +- } +-#if !defined(__alpha__) && !defined(__sun) +- if (!isElf64) { +- /* XXX: eehhk, would've been nice with consistency, mandriva legacy... :| */ +- if (!devel && s[strlen(s)-1] != ')') +- (void) stpcpy( stpcpy(tmp, s), "()(64bit)"); +- else { +- tmp = stpcpy(tmp, s); +- if (devel) +- tmp = strstr(t, ".so"); +- tmp = stpcpy(tmp, "(64bit)"); +- } +- }else +-#endif +- tmp = stpcpy(tmp, s); +- if (devel) { +- char *suffix = strstr(t, ".so"); +- if (suffix) +- tmp = suffix; +- tmp = stpcpy(tmp, ")"); +- } +- +- return t; +-} +-#endif +- + /** \ingroup rpmds + * Extract dependencies from a symlink. + * XXX Prototype added to keep GCC quiet and avoid adding a symbol. +@@ -3324,6 +3518,7 @@ int rpmdsSymlink(const char * fn, int fl + rpmds ds; + int xx; + int isElf64; ++ int isuClibc; + int gotSONAME = 0; + int skipP = (flags & RPMELF_FLAG_SKIPPROVIDES); + int skipR = (flags & RPMELF_FLAG_SKIPREQUIRES); +@@ -3378,6 +3573,11 @@ fprintf(stderr, "*** rpmdsELF(%s, %d, %p + /*@=evalorder@*/ + + isElf64 = ehdr->e_ident[EI_CLASS] == ELFCLASS64; ++#if defined(RPM_VENDOR_MANDRIVA) ++ isuClibc = checkuClibc(ehdr, elf); ++#else ++ isuClibc = 0; ++#endif + + /*@-uniondef @*/ + scn = NULL; +@@ -3413,7 +3613,7 @@ assert(s != NULL); + buf[0] = '\0'; + + for (i = 0; i < (int)(sizeof(filterRequires)/sizeof(filterRequires[0])); i++) +- if (!strncmp(s, filterRequires[i], strlen(filterRequires[i]))) ++ if (!strncmp(s, filterRequires[i], strlen(filterRequires[i])) && !isuClibc) + break; + + if (sizeof(filterRequires)/sizeof(filterRequires[0]) == i) +@@ -3428,7 +3628,7 @@ assert(s != NULL); + + if (!skipP) { + ds = rpmdsSingle(RPMTAG_PROVIDENAME, +- mdvSonameDep(buf, s, isElf64, 1), ++ sonameDep(buf, s, isElf64, 1, isuClibc), + "", RPMSENSE_FIND_PROVIDES); + xx = add(context, ds); + (void)rpmdsFree(ds); +@@ -3447,7 +3647,7 @@ exit: + if (gotSONAME && !skipR) + for (i = 0, cnt = argvCount(deps); i < cnt; i++) { + ds = rpmdsSingle(RPMTAG_REQUIRENAME, +- mdvSonameDep(buf, deps[i], isElf64, 1), ++ sonameDep(buf, deps[i], isElf64, 1, isuClibc), + "", RPMSENSE_FIND_REQUIRES); + xx = add(context, ds); + (void)rpmdsFree(ds); diff --git a/rpm-5.4.5-patchset_16005.patch b/rpm-5.4.5-patchset_16005.patch new file mode 100644 index 0000000..0c8f370 --- /dev/null +++ b/rpm-5.4.5-patchset_16005.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.5/lib/rpmds.c.16005~ 2012-02-24 14:13:40.677094532 +0100 ++++ rpm-5.4.5/lib/rpmds.c 2012-02-24 14:17:17.278202493 +0100 +@@ -2913,7 +2913,7 @@ static char * sonameDep(/*@returned@*/ c + tmp = stpcpy(tmp, "devel("); + } + #if !defined(__alpha__) && !defined(__sun) +- if (!isElf64) { ++ if (isElf64) { + /* XXX: eehhk, would've been nice with consistency, mandriva legacy... :| */ + if (!devel && s[strlen(s)-1] != ')') + (void) stpcpy( stpcpy(tmp, s), "()(64bit)"); diff --git a/rpm-5.4.5-patchset_16022.patch b/rpm-5.4.5-patchset_16022.patch new file mode 100644 index 0000000..46e1559 --- /dev/null +++ b/rpm-5.4.5-patchset_16022.patch @@ -0,0 +1,222 @@ +--- rpm-5.4.5/lib/rpmds.c.16022~ 2012-02-24 14:17:17.278202493 +0100 ++++ rpm-5.4.5/lib/rpmds.c 2012-02-24 14:19:52.416279821 +0100 +@@ -2916,7 +2916,7 @@ static char * sonameDep(/*@returned@*/ c + if (isElf64) { + /* XXX: eehhk, would've been nice with consistency, mandriva legacy... :| */ + if (!devel && s[strlen(s)-1] != ')') +- (void) stpcpy( stpcpy(tmp, s), "()(64bit)"); ++ tmp = stpcpy( stpcpy(tmp, s), "()(64bit)"); + else { + tmp = stpcpy(tmp, s); + if (devel) +@@ -2995,8 +2995,11 @@ foo: + scn = gelf_offscn (elf, phdr->p_offset); + shdr = gelf_getshdr(scn, &shdr_mem); + data = elf_getdata (scn, data); +- interp_name = strdup(data->d_buf); +- goto end; ++ if (data && data->d_buf) { ++ interp_name = strdup(data->d_buf); ++ goto end; ++ } ++ /* no 'data' most likely implies that this is an elf interpreter itself */ + } + + if (elf_getshdrstrndx (elf, &shstrndx) >= 0) +@@ -3016,6 +3019,15 @@ foo: + for (cnt = 0; cnt <= dynsize; ++cnt) { + dyn = gelf_getdyn (data, cnt, &dyn_mem); + ++ /* if this an elf interpeter, the only thing we want is to find SONAME ++ * and return it ++ */ ++ if (phdr) { ++ if (dyn->d_tag != DT_SONAME) ++ continue; ++ interp_name = strdup(elf_strptr(elf, shdr->sh_link, dyn->d_un.d_val)); ++ goto end; ++ } + if (rpath == NULL) { + if (dyn->d_tag == DT_RPATH) + rpath = elf_strptr (elf, shdr->sh_link, dyn->d_un.d_val); +@@ -3025,7 +3037,7 @@ foo: + cnt = -1; + continue; + } +- else if (rpath && DT_NEEDED == dyn->d_tag) { ++ else if (rpath && dyn->d_tag == DT_NEEDED) { + char *tmp, *tmp2; + char buf[1024]; + char path[1024] = ""; +@@ -3083,6 +3095,7 @@ foo: + strcpy(tmp, path_n); + strcat(tmp, "/"); + strcat(tmp, libpath); ++ + if (stat(tmp, &statbuf) == 0 && statbuf.st_mode & S_IRUSR) { + path[0] = '\0'; + break; +@@ -3514,6 +3527,7 @@ int rpmdsSymlink(const char * fn, int fl + char buf[BUFSIZ]; + const char * s; + int is_executable; ++ int is_symlink; + const char * soname = NULL; + rpmds ds; + int xx; +@@ -3539,12 +3553,6 @@ int rpmdsSymlink(const char * fn, int fl + if ((s = strrchr(fn, '.')) && strcmp(s, ".so")) + return 0; + +- if ((lnklen = readlink(fn, path, MAXPATHLEN - 1)) == -1) { +- warn("%s", fn); +- return -1; +- } +- path[lnklen] = '\0'; +- + /*@-castfcnptr@*/ + if (_rpmds_debug < 0) + fprintf(stderr, "*** rpmdsELF(%s, %d, %p, %p)\n", fn, flags, (void *)add, context); +@@ -3555,6 +3563,62 @@ fprintf(stderr, "*** rpmdsELF(%s, %d, %p + if (lstat(fn, st) != 0) + return -1; + is_executable = (int)(st->st_mode & (S_IXUSR|S_IXGRP|S_IXOTH)); ++ is_symlink = S_ISLNK(st->st_mode); ++ } ++ ++ if (is_symlink) { ++#ifdef NOT_YET ++ if ((lnklen = readlink(fn, path, MAXPATHLEN - 1)) == -1) { ++ warn("%s", fn); ++ return -1; ++ } ++ /* XXX: unused, path should expand to absolute path... */ ++ path[lnklen] = '\0'; ++#endif ++ } else { ++ FILE *fp = fopen(fn, "r"); ++ char buf[BUFSIZ]; ++ char *in; ++ stpcpy(path, fn); ++ fn = NULL; ++ if (fp == NULL || ferror(fp)) { ++ if (fp) (void) fclose(fp); ++ return -1; ++ } ++ /* try resolve ld scripts ++ * certainly *not* state of the art, but should in practice work ++ * everywhere where relevant... ++ */ ++ while ((in = fgets(buf, sizeof(buf) - 1, fp))) { ++ in[sizeof(buf)-1] = '\0'; ++ if ((in = strstr(in, "GROUP")) && ++ (in = strchr(in, '(')) && ++ (fn = strchr(in, '/')) && ++ (in = strchr(fn, ' '))) { ++ *in = '\0'; ++ break; ++ } ++ if (ferror(fp) || feof(fp)) ++ break; ++ } ++ fclose(fp); ++ if (!fn) ++ return -1; ++ else { ++ /* XXX: try determine relative root */ ++ struct stat sb, * st = &sb; ++ ++ while((in = strrchr(path, '/'))) { ++ stpcpy(in, fn); ++ if (stat(path, st) == 0) { ++ fn = path; ++ break; ++ } ++ *in = 0; ++ } ++ if (!fn) ++ return -1; ++ } + } + + fdno = open(fn, O_RDONLY); +@@ -3644,8 +3708,10 @@ assert(s != NULL); + /*@=uniondef @*/ + + exit: +- if (gotSONAME && !skipR) ++ if (gotSONAME && !skipR) { + for (i = 0, cnt = argvCount(deps); i < cnt; i++) { ++ if (deps[i][0] == 'l' && deps[i][1] == 'd') ++ continue; + ds = rpmdsSingle(RPMTAG_REQUIRENAME, + sonameDep(buf, deps[i], isElf64, 1, isuClibc), + "", RPMSENSE_FIND_REQUIRES); +@@ -3653,6 +3719,7 @@ exit: + (void)rpmdsFree(ds); + ds = NULL; + } ++ } + + deps = argvFree(deps); + if (elf) (void) elf_end(elf); +--- rpm-5.4.5/lib/rpmfc.c.16022~ 2012-02-24 13:46:30.693282090 +0100 ++++ rpm-5.4.5/lib/rpmfc.c 2012-02-24 14:20:56.062311544 +0100 +@@ -518,7 +518,7 @@ assert(EVR != NULL); + * build/reqprov.c:addReqProv() + */ + int overlap = 0, res = 0; +- if (*depsp) { ++ if (*depsp && rpmExpandNumeric("%{?_use_internal_dependency_generator}")) { + int ix = rpmdsSearch(*depsp, ds); + if (ix >= 0) { + /* do not consider dependency ranges like R: foo > 1, R: foo < 3 +@@ -1045,6 +1045,11 @@ static int rpmfcSYMLINK(rpmfc fc) + flags |= RPMELF_FLAG_SKIPPROVIDES; + if (fc->skipReq) + flags |= RPMELF_FLAG_SKIPREQUIRES; ++ /* XXX: Remove symlink classifier from linker scripts now that we've been ++ * able to feed it to the generator. ++ */ ++ if (fc->fcolor->vals[fc->ix] == (RPMFC_WHITE|RPMFC_INCLUDE|RPMFC_TEXT|RPMFC_SYMLINK)) ++ fc->fcolor->vals[fc->ix] &= ~RPMFC_SYMLINK; + + return rpmdsSymlink(fn, flags, rpmfcMergePR, fc); + } +@@ -1362,6 +1367,36 @@ if (_rpmfc_debug) /* XXX noisy */ + + /* Add (filtered) entry to sorted class dictionary. */ + fcolor = rpmfcColoring(se); ++ ++ /* Quick&dirty hack for linker scripts replacing regular ++ * symlinks. Better *really* needs to be done ASAP. ++ */ ++#if defined(RPM_VENDOR_MANDRIVA) ++ if (fcolor == (RPMFC_WHITE|RPMFC_INCLUDE|RPMFC_TEXT)) { ++ char * fn; ++ ++ if ((fn = strrchr(s, '.')) && !strcmp(fn, ".so")) { ++ FILE * fp = fopen(s, "r"); ++ char buf[BUFSIZ]; ++ char * in; ++ if (fp == NULL || ferror(fp)) { ++ if (fp) (void) fclose(fp); ++ } ++ while ((in = fgets(buf, sizeof(buf) - 1, fp))) { ++ in[sizeof(buf)-1] = '\0'; ++ if (ferror(fp) || feof(fp)) ++ break; ++ if ((fn = strstr(in, "GROUP")) && ++ (fn = strchr(fn, '(')) && (fn = strchr(in, '/'))) { ++ fcolor |= RPMFC_SYMLINK; ++ break; ++ } ++ } ++ if (fp) ++ fclose(fp); ++ } ++ } ++#endif + xx = argiAdd(&fc->fcolor, (int)fc->ix, fcolor); + + if (fcolor != RPMFC_WHITE && (fcolor & RPMFC_INCLUDE)) diff --git a/rpm-5.4.5-python-export-spec-macros.patch b/rpm-5.4.5-python-export-spec-macros.patch new file mode 100644 index 0000000..081deee --- /dev/null +++ b/rpm-5.4.5-python-export-spec-macros.patch @@ -0,0 +1,70 @@ +--- 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 + #include ++#define _MACRO_INTERNAL ++#include + #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 new file mode 100644 index 0000000..06d5470 --- /dev/null +++ b/rpm-5.4.5-rpmfc-apply-python-coloring-from-magic.patch @@ -0,0 +1,10 @@ +--- 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-rpmfc-use-strlen-not-sizeof.patch b/rpm-5.4.5-rpmfc-use-strlen-not-sizeof.patch new file mode 100644 index 0000000..a18a408 --- /dev/null +++ b/rpm-5.4.5-rpmfc-use-strlen-not-sizeof.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.5/lib/rpmfc.c.sizeof~ 2012-03-05 21:01:46.845529682 +0100 ++++ rpm-5.4.5/lib/rpmfc.c 2012-03-05 21:01:51.679533439 +0100 +@@ -909,7 +909,7 @@ static int rpmfcSCRIPT(rpmfc fc) + if (defaultdocdir == NULL || *defaultdocdir == '\0') + defaultdocdir = "/usr/share/doc"; + +- if (strncmp(fn, defaultdocdir, sizeof(defaultdocdir)-1)) { ++ 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)) diff --git a/rpm-5.4.5-rubygems-add-missing-newline.patch b/rpm-5.4.5-rubygems-add-missing-newline.patch new file mode 100644 index 0000000..706e38a --- /dev/null +++ b/rpm-5.4.5-rubygems-add-missing-newline.patch @@ -0,0 +1,16 @@ +--- rpm-5.4.5/scripts/rubygems.rb.rb_newline~ 2012-02-29 17:25:34.815069060 +0100 ++++ rpm-5.4.5/scripts/rubygems.rb 2012-02-29 18:45:41.587464927 +0100 +@@ -61,10 +61,11 @@ for path in $stdin.readlines + end + + if requires or abi_provide +- print "ruby(abi)" ++ abidep = "ruby(abi)" + if ruby_versioned +- print " = %s\n" % RbConfig::CONFIG["ruby_version"] ++ abidep += " = %s" % RbConfig::CONFIG["ruby_version"] + end ++ print abidep + "\n" + end + + if gems.length > 0 diff --git a/rpm-5.4.5-set-proper-file-color-for-scripts-using-env-in-shellbang.patch b/rpm-5.4.5-set-proper-file-color-for-scripts-using-env-in-shellbang.patch new file mode 100644 index 0000000..9c905ee --- /dev/null +++ b/rpm-5.4.5-set-proper-file-color-for-scripts-using-env-in-shellbang.patch @@ -0,0 +1,22 @@ +--- rpm-5.4.5/lib/rpmfc.c.env_color~ 2012-03-05 21:27:16.396663509 +0100 ++++ rpm-5.4.5/lib/rpmfc.c 2012-03-05 21:28:12.112703555 +0100 +@@ -868,7 +868,7 @@ static int rpmfcSCRIPT(rpmfc fc) + + if (!_filter_values + || (!fc->skipReq +- && !rpmfcMatchRegexps(fc->Rmires, fc->Rnmire, s, 'R'))) ++ && !rpmfcMatchRegexps(fc->Rmires, fc->Rnmire, s, 'R'))) { + if (is_executable && + strncmp(bn, "bash", sizeof("bash")-1) && + strcmp(bn, "env") && +@@ -885,6 +885,10 @@ static int rpmfcSCRIPT(rpmfc fc) + + (void)rpmdsFree(ds); + ds = NULL; ++ } else if (!strcmp(bn, "env") && strlen(se)) { ++ bn = se; ++ strsep(&se, " \t\n\r"); ++ } + } + + /* Set color based on interpreter name. */ diff --git a/rpm-5.4.5-skip-dependencies-for-character-devices.patch b/rpm-5.4.5-skip-dependencies-for-character-devices.patch new file mode 100644 index 0000000..790ff48 --- /dev/null +++ b/rpm-5.4.5-skip-dependencies-for-character-devices.patch @@ -0,0 +1,13 @@ +--- 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.5-update-mono-dependency-generator.patch b/rpm-5.4.5-update-mono-dependency-generator.patch new file mode 100644 index 0000000..992184a --- /dev/null +++ b/rpm-5.4.5-update-mono-dependency-generator.patch @@ -0,0 +1,268 @@ +--- rpm-5.4.5/scripts/mono-find-provides.mono_deps_new~ 2007-07-13 04:57:02.000000000 +0200 ++++ rpm-5.4.5/scripts/mono-find-provides 2012-02-24 08:12:34.312909123 +0100 +@@ -7,34 +7,48 @@ + # + # (C) 2005 Novell (http://www.novell.com) + # +-# Args: builddir buildroot libdir + + IFS=$'\n' + filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/')) + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + +-# If monodis is in the package being installed, use that one +-# This is to support building mono +-build_bindir="$2/usr/bin" +-build_libdir="$2$3" +- +-if [ -x $build_bindir/monodis ]; then +- monodis="$build_bindir/monodis" +- export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} +-elif [ -x /usr/bin/monodis ]; then +- monodis="/usr/bin/monodis" +-else +- exit 0; ++# Only include files with /gac/ in path ++# (Allows packages to contain private assemblies that don't conflict with other packages) ++#monolist=($(printf "%s\n" "${monolist[@]}" | egrep "/gac/")) ++# Disabled... see ChangeLog ++ ++# Set the prefix, unless it is overriden (used when building mono rpms) ++: ${prefix=/usr} ++ ++libdir=$prefix/lib64 ++bindir=$prefix/bin ++ ++# Bail out if monodis or libmono is missing ++if [ ! -x $bindir/monodis ] || [ ! -f $libdir/libmono-2.0.so.1 ] ; then ++ echo "monodis missing or unusable, exiting..." 1>&2 ++ exit 1 + fi + +-export MONO_SHARED_DIR=$1 ++ ++# set LD_LIBRARY_PATH to ensure that libmono is found ++export LD_LIBRARY_PATH=$libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ++# and set MONO_PATH to ensure that mscorlib.dll can be found ++export MONO_PATH=$prefix/lib/mono/2.0 + + for i in "${monolist[@]}"; do +- ($monodis --assembly $i | awk ' ++ ($bindir/monodis --assembly $i | awk ' + BEGIN { LIBNAME=""; VERSION=""; } + /^Version:/ { VERSION=$2 } + /^Name:/ { LIBNAME=$2 } + END { ++ if (LIBNAME ~ /^policy/) { ++ cnt = split(LIBNAME, toks, ".") ++ VERSION=toks[2] "." toks[3] ".0.0" ++ LIBNAME="" ++ for (i=4; i<= cnt; i++) ++ LIBNAME = (LIBNAME toks[i] ".") ++ LIBNAME=substr(LIBNAME, 1, length(LIBNAME)-1) ++ } + if (VERSION && LIBNAME) + print "mono(" LIBNAME ") = " VERSION + } +--- rpm-5.4.5/scripts/mono-find-requires.mono_deps_new~ 2011-01-11 18:34:25.000000000 +0100 ++++ rpm-5.4.5/scripts/mono-find-requires 2012-02-24 08:12:34.312909123 +0100 +@@ -4,55 +4,158 @@ + # + # Authors: + # Ben Maurer (bmaurer@ximian.com) ++# Wade Berrier (wberrier@novell.com) + # +-# (C) 2005 Novell (http://www.novell.com) ++# (C) 2008 Novell (http://www.novell.com) + # +-# Args: builddir buildroot libdir + + IFS=$'\n' + filelist=($(grep -Ev '/usr/doc/|/usr/share/doc/')) + monolist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.(exe|dll)\$")) + +-# If monodis is in the package being installed, use that one +-# This is to support building mono +-build_bindir="$2/usr/bin" +-build_libdir="$2$3" +- +-if [ -x $build_bindir/monodis ]; then +- monodis="$build_bindir/monodis" +- export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} +-elif [ -x /usr/bin/monodis ]; then +- monodis="/usr/bin/monodis" ++# parse .config files to find which native libraries to depend on ++# (target attribute must have double quotes for this to work, ie: target="file" ) ++# Add /etc/mono/config ? ++configlist=($(printf "%s\n" "${filelist[@]}" | egrep "\\.config\$")) ++ ++# Set the prefix, unless it is overriden (used when building mono rpms) ++: ${prefix=/usr} ++ ++# Can override .config scanning if specified ++: ${IGNORE_CONFIG_SCAN=0} ++ ++libdir=$prefix/lib64 ++bindir=$prefix/bin ++ ++# Bail out if monodis or libmono is missing ++if [ ! -x $bindir/monodis ] || [ ! -f $libdir/libmono-2.0.so.1 ] ; then ++ echo "monodis missing or unusable, exiting..." 1>&2 ++ exit 1 ++fi ++ ++# special case for 64bit archs ++if test "xlib64" = "xlib64" ; then ++ libext="()(64bit)" + else +- exit 0; ++ # (note, this works on ppc64 since we only have 32bit mono) ++ libext="" + fi + +-export MONO_SHARED_DIR=$1 ++# Exceptions: ++case `uname -m` in ++ # ia64 doesn't use lib64 for 'libdir' (sles 9 rpm used to provide both... no longer) ++ ia64) libext="()(64bit)" ;; ++esac ++ ++# set LD_LIBRARY_PATH to ensure that libmono is found ++export LD_LIBRARY_PATH=$libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} ++# and set MONO_PATH to ensure that mscorlib.dll can be found ++export MONO_PATH=$prefix/lib/mono/2.0 + + REQUIRES=$( + for i in "${monolist[@]}"; do +- ($monodis --assemblyref $i | awk ' ++ ($bindir/monodis --assemblyref $i | awk ' + BEGIN { START=0; LIBNAME=""; VERSION=""; } + (START==0) && /^[0-9]+: Version=/ { + START=1; + sub(/Version=/, "", $2); + VERSION=$2 + } +- ++ + (START==1) && /^\tName=/ { + sub(/Name=/, "", $1); + LIBNAME=$1 +- +- print "mono(" LIBNAME ") = " VERSION ++ # Allow rpm deps to be resolved for 1.0 profile version ++ if (VERSION=="1.0.3300.0") ++ OP=">=" ++ else ++ OP="=" ++ print "mono(" LIBNAME ") " OP " " VERSION + START=0 + } + ') 2> /dev/null + done + ) + ++if [ $IGNORE_CONFIG_SCAN -eq 0 ] ; then ++ ++rpm_config_REQUIRES=$( ++ # Parse the xml .config files to see what native binaries we call into ++ # TODO: also check monodis --moduleref ++ for i in "${configlist[@]}"; do ++ awk 'match($_, //dev/null ++ done ++) ++ ++# Resolve provides to packages, warning on missing to stderr ++config_REQUIRES=$( ++ first=1 # avoid an empty line if no .config reqs are found ++ for i in ${rpm_config_REQUIRES[@]} ; do ++ out=$(rpm -q --whatprovides --queryformat "%{NAME}\n" $i) ++ if [ $? -eq 0 ] ; then ++ if [ $first -eq 1 ] ; then ++ echo "" ++ first=0 ++ fi ++ echo $out ++ else ++ # echo to stderr ++ echo "mono-find-requires: Warning, could not find package that provides: $i" >&2 ++ fi ++ done ++) ++ ++fi ++ ++# Note about above: ++# Use to do: system("rpm -q --whatprovides --queryformat \"%{NAME}\n\" ""\""req"'$libext'""\"") ++# rpmlint prefers to have lib names instead of package names. There was a reason I was using package names but it slips me now... ++# Ah... now I remember... it's for noarch packs. The noarch packages can be built on either 32 or 64 bit... so we have to depend ++# on the package name instead. ++ + PROVIDES=$( + for i in "${monolist[@]}"; do +- ($monodis --assembly $i | awk ' ++ ($bindir/monodis --assembly $i | awk ' + BEGIN { LIBNAME=""; VERSION=""; } + /^Version:/ { VERSION=$2 } + /^Name:/ { LIBNAME=$2 } +@@ -68,9 +171,10 @@ PROVIDES=$( + # in PROVIDES. While RPM functions correctly when such deps exist, + # they make the metadata a bit bloated. + # ++# TODO: make this use the mono-find-provides script, to share code + + # Filter out dups from both lists +-REQUIRES=$(echo "$REQUIRES" | sort | uniq) ++REQUIRES=$(echo "$REQUIRES $config_REQUIRES" | sort | uniq) + PROVIDES=$(echo "$PROVIDES" | sort | uniq) + + # +@@ -80,7 +184,7 @@ UNIQ=$(echo "$PROVIDES + $REQUIRES" | sort | uniq -u) + + # +-# Of those, only chose the ones that are in REQUIRES ++# Of those, only choose the ones that are in REQUIRES + # + echo "$UNIQ +-$REQUIRES" | sort | uniq -d | grep -v "^$" ++$REQUIRES" | sort | uniq -d | grep -v '^\s*$' diff --git a/rpm-5.4.5-update-rpmfc-when-removing-overlapping-dependencies.patch b/rpm-5.4.5-update-rpmfc-when-removing-overlapping-dependencies.patch new file mode 100644 index 0000000..7e3f7f8 --- /dev/null +++ b/rpm-5.4.5-update-rpmfc-when-removing-overlapping-dependencies.patch @@ -0,0 +1,81 @@ +--- rpm-5.4.5/build/reqprov.c.fc_overlap~ 2012-03-02 13:44:16.088580152 +0100 ++++ rpm-5.4.5/build/reqprov.c 2012-03-02 13:59:18.740030066 +0100 +@@ -158,11 +158,10 @@ int addReqProv(/*@unused@*/ Spec spec, H + he->p.argv = versions; + xx = headerMod(h, he, 0); + rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(old), rpmdsDNEVR(new), rpmdsDNEVR(old)); +- } else if (res < 0) { ++ } else if (res < 0) + rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(new), rpmdsDNEVR(old), rpmdsDNEVR(new)); +- } else { +- rpmlog(RPMLOG_DEBUG, "%s overlaps %s, removing %s and merging flags\n", rpmdsDNEVR(new), rpmdsDNEVR(old), rpmdsDNEVR(new)); +- } ++ else if (flags[len] != Flags) ++ rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s and merging flags\n", rpmdsDNEVR(new), rpmdsDNEVR(old), rpmdsDNEVR(new)); + + flags[len] |= newflags; + he->tag = flagtag; +--- rpm-5.4.5/lib/rpmfc.c.fc_overlap~ 2012-03-01 18:00:49.989188179 +0100 ++++ rpm-5.4.5/lib/rpmfc.c 2012-03-01 19:53:37.145561224 +0100 +@@ -518,7 +518,7 @@ assert(EVR != NULL); + * build/reqprov.c:addReqProv() + */ + int overlap = 0, res = 0; +- if (*depsp && rpmExpandNumeric("%{?_use_internal_dependency_generator}")) { ++ if (*depsp) { + int ix = rpmdsSearch(*depsp, ds); + if (ix >= 0) { + /* do not consider dependency ranges like R: foo > 1, R: foo < 3 +@@ -550,18 +550,33 @@ assert(EVR != NULL); + rEVR->Flags = (*depsp)->Flags[(*depsp)->i]; + + res = rpmEVRcompare(lEVR, rEVR); +- if (res > 0) { +- (*depsp)->Flags[(*depsp)->i] = Flags; +- (*depsp)->EVR[(*depsp)->i] = EVR; +- rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(*depsp), rpmdsDNEVR(ds), rpmdsDNEVR(*depsp)); +- } else if (res < 0) { +- rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(ds), rpmdsDNEVR(*depsp), rpmdsDNEVR(ds)); +- } else { +- rpmlog(RPMLOG_DEBUG, "%s overlaps %s, removing %s and merging flags\n", rpmdsDNEVR(ds), rpmdsDNEVR(*depsp), rpmdsDNEVR(ds)); ++ if (res == 0 && rpmdsFlags(*depsp) == rpmdsFlags(ds)) ++ overlap = 0; ++ else { ++ char *oldVal = xstrdup(strchr(rpmfcFileDep(buf, fc->ix, *depsp), ' ')); ++ if (res > 0) { ++ (*depsp)->Flags[(*depsp)->i] = Flags; ++ (*depsp)->EVR[(*depsp)->i] = EVR; ++ rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(*depsp), rpmdsDNEVR(ds), rpmdsDNEVR(*depsp)); ++ } else if (res < 0) ++ rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(ds), rpmdsDNEVR(*depsp), rpmdsDNEVR(ds)); ++ else ++ rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s and merging flags\n", rpmdsDNEVR(ds), rpmdsDNEVR(*depsp), rpmdsDNEVR(ds)); ++ ++ (*depsp)->Flags[(*depsp)->i] |= newflags; ++ ++ /* update references in dictionary */ ++ for (ix = 0; ix < argvCount(fc->ddict); ix++) { ++ if (!strcmp(strchr(fc->ddict[ix], ' '), oldVal)) { ++ size_t fcix = atol(fc->ddict[ix]); ++ _free(fc->ddict[ix]); ++ fc->ddict[ix] = xstrdup(rpmfcFileDep(buf, fcix, *depsp)); ++ } ++ } ++ argvSort(fc->ddict, NULL); ++ free(oldVal); + } + +- (*depsp)->Flags[(*depsp)->i] |= newflags; +- + lEVR = rpmEVRfree(lEVR); + rEVR = rpmEVRfree(rEVR); + } +@@ -573,7 +588,7 @@ assert(EVR != NULL); + xx = rpmdsMerge(depsp, ds); + + /* Add to file dependencies. */ +- xx = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, ds)); ++ xx = rpmfcSaveArg(&fc->ddict, rpmfcFileDep(buf, fc->ix, overlap ? *depsp : ds)); + + (void)rpmdsFree(ds); + ds = NULL; diff --git a/rpm-5.4.7-actually-perform-linking-against-internal-lua.patch b/rpm-5.4.7-actually-perform-linking-against-internal-lua.patch new file mode 100644 index 0000000..ab88e65 --- /dev/null +++ b/rpm-5.4.7-actually-perform-linking-against-internal-lua.patch @@ -0,0 +1,36 @@ +--- rpm-5.4.7/configure.ac.lua~ 2012-03-23 20:27:46.088488158 +0100 ++++ rpm-5.4.7/configure.ac 2012-03-23 20:27:46.102488172 +0100 +@@ -1886,10 +1886,12 @@ RPM_CHECK_LIB( + esac + AC_DEFINE(WITH_LUA_INTERNAL, 1, [Define if building with internal Lua]) + AC_CONFIG_FILES([lua/Makefile]) ++ AM_CONDITIONAL(WITH_LUA_INTERNAL, [true]) + else + AC_CHECK_LIB(m, fabs) + AC_CHECK_LIB(dl, dlopen) + AC_CHECK_FUNC(dlopen) ++ AM_CONDITIONAL(WITH_LUA_INTERNAL, [false]) + fi + ], []) + AC_SUBST(WITH_LUA_SUBDIR_DEF) +--- rpm-5.4.7/rpmio/Makefile.am.lua~ 2012-03-23 20:27:46.088488158 +0100 ++++ rpm-5.4.7/rpmio/Makefile.am 2012-03-23 20:34:09.546888175 +0100 +@@ -114,13 +114,17 @@ librpmio_la_LDFLAGS += -Wl,@LD_VERSION_S + endif + librpmio_la_LIBADD = -lm + if ENABLE_BUILD_INTLIBDEP +-librpmio_la_LIBADD += ++librpmio_la_LIBADD += \ + $(top_builddir)/misc/librpmmisc.la + endif + if ENABLE_BUILD_MAXEXTLIBDEP + librpmio_la_LDFLAGS += $(LDFLAGS) + #librpmio_la_LIBADD += $(LIBS) + endif ++if WITH_LUA_INTERNAL ++librpmio_la_LIBADD += \ ++ $(top_builddir)/lua/liblua.la ++endif + #librpmio.la: $(librpmio_la_OBJECTS) $(librpmio_la_DEPENDENCIES) + # $(librpmio_la_LINK) -rpath $(usrlibdir) $(librpmio_la_OBJECTS) $(librpmio_la_LIBADD) + diff --git a/rpm-5.4.7-always-choose-equal-only-deps-when-overlapping.patch b/rpm-5.4.7-always-choose-equal-only-deps-when-overlapping.patch new file mode 100644 index 0000000..d4d7099 --- /dev/null +++ b/rpm-5.4.7-always-choose-equal-only-deps-when-overlapping.patch @@ -0,0 +1,70 @@ +--- rpm-5.4.7/build/reqprov.c.equal_overlap~ 2012-03-13 15:06:59.272736274 +0100 ++++ rpm-5.4.7/build/reqprov.c 2012-03-13 16:37:17.389488443 +0100 +@@ -128,12 +128,14 @@ int addReqProv(/*@unused@*/ Spec spec, H + #define RPMSENSE_SCRIPTS (RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN|RPMSENSE_SCRIPT_VERIFY) + if (!((Flags & RPMSENSE_GREATER && flags[len] & RPMSENSE_LESS) || + (Flags & RPMSENSE_LESS && flags[len] & RPMSENSE_GREATER)) && ++ /* R: foo >= 1 cannot overlap R: foo <= 1*/ ++ !(((Flags & RPMSENSE_GREATER) && (flags[len] & RPMSENSE_LESS)) || ++ ((flags[len] & RPMSENSE_GREATER) && (Flags & RPMSENSE_LESS))) && + /* do not merge script dependencies with non-script dependencies */ + !(((Flags & RPMSENSE_SCRIPTS) && !(flags[len] & RPMSENSE_SCRIPTS)) || + ((flags[len] & RPMSENSE_SCRIPTS) && !(Flags & RPMSENSE_SCRIPTS)))) + overlap = rpmdsCompare(new, old); + #undef RPMSENSE_SCRIPTS +- + if (overlap) { + EVR_t lEVR = rpmEVRnew(RPMSENSE_ANY, 0), + rEVR = rpmEVRnew(RPMSENSE_ANY, 0); +@@ -165,8 +167,11 @@ int addReqProv(/*@unused@*/ Spec spec, H + rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(old), rpmdsDNEVR(new), rpmdsDNEVR(old)); + } else if (res < 0) + rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(new), rpmdsDNEVR(old), rpmdsDNEVR(new)); +- else if (flags[len] != Flags) ++ else if (flags[len] != Flags) { ++ if (((Flags & RPMSENSE_SENSEMASK) == RPMSENSE_EQUAL && (flags[len] & (RPMSENSE_GREATER|RPMSENSE_LESS)))) ++ flags[len] &= ~(RPMSENSE_GREATER|RPMSENSE_LESS); + rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s and merging flags\n", rpmdsDNEVR(new), rpmdsDNEVR(old), rpmdsDNEVR(new)); ++ } + + flags[len] |= newflags; + he->tag = flagtag; +--- rpm-5.4.7/lib/rpmfc.c.equal_overlap~ 2012-03-13 15:07:42.416787385 +0100 ++++ rpm-5.4.7/lib/rpmfc.c 2012-03-13 16:37:24.110497118 +0100 +@@ -502,11 +502,12 @@ assert(EVR != NULL); + + ds = rpmdsSingle(tagN, N, EVR, Flags); + ++ int overlap = 0; + #if defined(RPM_VENDOR_MANDRIVA) /* filter-overlapping-dependencies */ + /* XXX: should really share same code path as with what's in + * build/reqprov.c:addReqProv() + */ +- int overlap = 0, res = 0; ++ int res = 0; + if (*depsp) { + int ix = rpmdsSearch(*depsp, ds); + if (ix >= 0) { +@@ -516,6 +517,9 @@ assert(EVR != NULL); + #define RPMSENSE_SCRIPTS (RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_POST|RPMSENSE_SCRIPT_PREUN|RPMSENSE_SCRIPT_POSTUN|RPMSENSE_SCRIPT_VERIFY) + if (!((Flags & RPMSENSE_GREATER && (*depsp)->Flags[(*depsp)->i] & RPMSENSE_LESS) || + (Flags & RPMSENSE_LESS && (*depsp)->Flags[(*depsp)->i] & RPMSENSE_GREATER)) && ++ /* R: foo >= 1 cannot overlap R: foo <= 1*/ ++ !(((Flags & RPMSENSE_GREATER) && ((*depsp)->Flags[(*depsp)->i] & RPMSENSE_LESS)) || ++ (((*depsp)->Flags[(*depsp)->i] & RPMSENSE_GREATER) && (Flags & RPMSENSE_LESS))) && + /* do not merge script dependencies with non-script dependencies */ + !(((Flags & RPMSENSE_SCRIPTS) && !((*depsp)->Flags[(*depsp)->i] & RPMSENSE_SCRIPTS)) || + (((*depsp)->Flags[(*depsp)->i] & RPMSENSE_SCRIPTS) && !(Flags & RPMSENSE_SCRIPTS)))) +@@ -554,8 +558,11 @@ assert(EVR != NULL); + rpmlog(RPMLOG_WARNING, "%s (%s) overlaps %s (%s), removing %s\n", rpmdsDNEVR(*depsp), ix < (int)fc->nfiles ? fc->fn[ix] + fc->brlen : "explicit", rpmdsDNEVR(ds), fc->fn[fc->ix] + fc->brlen, rpmdsDNEVR(*depsp)); + } else if (res < 0) + rpmlog(RPMLOG_WARNING, "%s (%s) overlaps %s (%s), removing %s\n", rpmdsDNEVR(ds), fc->fn[fc->ix] + fc->brlen, rpmdsDNEVR(*depsp), ix < (int)fc->nfiles ? fc->fn[ix] + fc->brlen : "explicit", rpmdsDNEVR(ds)); +- else ++ else if ((*depsp)->Flags[(*depsp)->i] != Flags) { ++ if (((Flags & RPMSENSE_SENSEMASK) == RPMSENSE_EQUAL) && ((*depsp)->Flags[(*depsp)->i] & (RPMSENSE_GREATER|RPMSENSE_LESS))) ++ (*depsp)->Flags[(*depsp)->i] &= ~(RPMSENSE_GREATER|RPMSENSE_LESS); + rpmlog(RPMLOG_WARNING, "%s (%s) overlaps %s (%s), removing %s and merging flags\n", rpmdsDNEVR(ds), fc->fn[fc->ix] + fc->brlen, rpmdsDNEVR(*depsp), ix < (int)fc->nfiles ? fc->fn[ix] + fc->brlen : "explicit", rpmdsDNEVR(ds)); ++ } + + (*depsp)->Flags[(*depsp)->i] |= newflags; + diff --git a/rpm-5.4.7-change-to-debuginfo-suffix.patch b/rpm-5.4.7-change-to-debuginfo-suffix.patch new file mode 100644 index 0000000..1bfd400 --- /dev/null +++ b/rpm-5.4.7-change-to-debuginfo-suffix.patch @@ -0,0 +1,21 @@ +--- rpm-5.4.7/macros/macros.in.debuginfo~ 2012-03-16 18:15:56.639500578 +0100 ++++ rpm-5.4.7/macros/macros.in 2012-03-16 18:15:58.278502754 +0100 +@@ -154,15 +154,15 @@ + %debug_package \ + %ifnarch noarch\ + %global __debug_package 1\ +-%package debug\ ++%package debuginfo\ + Summary: Debug information for package %{name}\ + Group: Development/Debug\ + AutoReqProv: 0\ +-%description debug\ ++%description debuginfo\ + This package provides debug information for package %{name}.\ + Debug information is useful when developing applications that use this\ + package or when debugging this package.\ +-%files debug -f debugfiles.list\ ++%files debuginfo -f debugfiles.list\ + %defattr(-,root,root)\ + %endif\ + %{nil} 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 new file mode 100644 index 0000000..bfb9159 --- /dev/null +++ b/rpm-5.4.7-dont-consider-trigger-dependencies-as-overlapping.patch @@ -0,0 +1,12 @@ +--- 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-dont-generate-soname-provides-for-dsos-with-no-soname.patch b/rpm-5.4.7-dont-generate-soname-provides-for-dsos-with-no-soname.patch new file mode 100644 index 0000000..700606a --- /dev/null +++ b/rpm-5.4.7-dont-generate-soname-provides-for-dsos-with-no-soname.patch @@ -0,0 +1,18 @@ +--- rpm-5.4.7/lib/rpmds.c.soname_only~ 2012-03-10 21:25:25.174794826 +0100 ++++ rpm-5.4.7/lib/rpmds.c 2012-03-10 21:25:42.414809878 +0100 +@@ -3472,6 +3472,7 @@ assert(s != NULL); + } + #endif + ++#if !defined(RPM_VENDOR_MANDRIVA) + /* For DSO's, provide the basename of the file if DT_SONAME not found. */ + if (!skipP && isDSO && !gotDEBUG && !gotSONAME) { + s = strrchr(fn, '/'); +@@ -3489,6 +3490,7 @@ assert(s != NULL); + (void)rpmdsFree(ds); + ds = NULL; + } ++#endif + + exit: + soname = _free(soname); 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 new file mode 100644 index 0000000..b75fd38 --- /dev/null +++ b/rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch @@ -0,0 +1,48 @@ +--- rpm-5.4.7/lib/rpmfc.c.rubyabi_prov~ 2012-03-10 21:50:02.143073469 +0100 ++++ rpm-5.4.7/lib/rpmfc.c 2012-03-10 21:57:13.898394232 +0100 +@@ -1204,9 +1204,13 @@ assert(fc->fn != NULL); + } + 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) && +--- rpm-5.4.7/scripts/rubygems.rb.rubyabi_prov~ 2012-03-10 21:50:15.637085059 +0100 ++++ rpm-5.4.7/scripts/rubygems.rb 2012-03-10 21:50:23.928092180 +0100 +@@ -36,7 +36,12 @@ ruby_versioned = false + abi_provide = false + + for path in $stdin.readlines +- if path.match(specpatt) ++ # way fugly, but we make the assumption that if the package has ++ # this file, the package is the current ruby version, and should ++ # therefore provide ruby(abi) = version ++ if provides and path.match(RbConfig::CONFIG["archdir"] + "/rbconfig.rb") ++ abi_provide = true ++ elsif path.match(specpatt) + ruby_versioned = true + gems.push(path.chomp) + # this is quite ugly and lame, but the assumption made is that if any files +@@ -46,12 +51,6 @@ for path in $stdin.readlines + elsif not ruby_versioned + if path.match(RbConfig::CONFIG["rubylibdir"]) + ruby_versioned = true +- # even more fugly, but we make the assumption that if the package has +- # this file, the package is the current ruby version, and should +- # therefore provide ruby(abi) = version +- if provides and path.match(RbConfig::CONFIG["rubylibdir"] + "/Env.rb") +- abi_provide = true +- end + elsif path.match(RbConfig::CONFIG["sitelibdir"]) + ruby_versioned = true + elsif path.match(RbConfig::CONFIG["vendorlibdir"]) diff --git a/rpm-5.4.7-fix-minor-memleaks.patch b/rpm-5.4.7-fix-minor-memleaks.patch new file mode 100644 index 0000000..78a1899 --- /dev/null +++ b/rpm-5.4.7-fix-minor-memleaks.patch @@ -0,0 +1,25 @@ +--- 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-generate-devel-provides-outside-of-libdirs.patch b/rpm-5.4.7-generate-devel-provides-outside-of-libdirs.patch new file mode 100644 index 0000000..5f188d6 --- /dev/null +++ b/rpm-5.4.7-generate-devel-provides-outside-of-libdirs.patch @@ -0,0 +1,36 @@ +--- rpm-5.4.7/lib/rpmds.c.devel_prov~ 2012-03-23 04:36:02.441671158 +0100 ++++ rpm-5.4.7/lib/rpmds.c 2012-03-23 04:36:06.210678312 +0100 +@@ -3533,7 +3533,7 @@ int rpmdsSymlink(const char * fn, int fl + int cnt; + int i; + char buf[BUFSIZ]; +- const char * s; ++ const char * s, * bn; + int is_executable; + int is_symlink; + const char * soname = NULL; +@@ -3558,13 +3558,22 @@ int rpmdsSymlink(const char * fn, int fl + ARGV_t deps = NULL; + miRE mire; + ++ bn = basename((char*)fn); ++ mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS); ++ if (!mireRegcomp(mire, "^lib.*\\.so$")) ++ xx = mireRegexec(mire, bn, (size_t) 0); ++ mire = mireFree(mire); ++ if (xx < 0) ++ return 0; ++ + mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS); + /* Filename must end with ".so" to be devel(...) dependency. */ +- if (!mireRegcomp(mire, "^.*/(|usr/)lib(|64)/lib.*\\.so$")) ++ if (!mireRegcomp(mire, "^.*/(usr/)?lib(64)?/lib.*\\.so$")) + xx = mireRegexec(mire, fn, (size_t) 0); + mire = mireFree(mire); ++ /* if outside of standard library dirs, we refuse to generate requires */ + if (xx < 0) +- return 0; ++ skipR = 1; + + /*@-castfcnptr@*/ + if (_rpmds_debug < 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 new file mode 100644 index 0000000..157a6eb --- /dev/null +++ b/rpm-5.4.7-hdrfmt-fix-unitialized-argv-element.patch @@ -0,0 +1,14 @@ +--- 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 new file mode 100644 index 0000000..b6c383f --- /dev/null +++ b/rpm-5.4.7-kmod-dependencies.patch @@ -0,0 +1,66 @@ +--- 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) ++ } 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 + } + + /*@-observertrans@*/ +@@ -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) ++ } 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-mono-find-requires-strip-newlines.patch b/rpm-5.4.7-mono-find-requires-strip-newlines.patch new file mode 100644 index 0000000..a42e959 --- /dev/null +++ b/rpm-5.4.7-mono-find-requires-strip-newlines.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.7/scripts/mono-find-requires.newline~ 2012-04-25 11:18:24.291758077 +0200 ++++ rpm-5.4.7/scripts/mono-find-requires 2012-04-25 11:19:20.977097581 +0200 +@@ -174,7 +174,7 @@ PROVIDES=$( + # TODO: make this use the mono-find-provides script, to share code + + # Filter out dups from both lists +-REQUIRES=$(echo "$REQUIRES $config_REQUIRES" | sort | uniq) ++REQUIRES=$(echo "$REQUIRES${config_REQUIRES: $config_REQUIRES}" | sort | uniq) + PROVIDES=$(echo "$PROVIDES" | sort | uniq) + + # 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 new file mode 100644 index 0000000..85d52e0 --- /dev/null +++ b/rpm-5.4.7-no-seqid_init-on-rdonly-database.patch @@ -0,0 +1,11 @@ +--- 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.7-only-generate-devel-deps-for-symlinks-start-with-lib.patch b/rpm-5.4.7-only-generate-devel-deps-for-symlinks-start-with-lib.patch new file mode 100644 index 0000000..850bdba --- /dev/null +++ b/rpm-5.4.7-only-generate-devel-deps-for-symlinks-start-with-lib.patch @@ -0,0 +1,44 @@ +--- rpm-5.4.7/lib/rpmds.c.req_devel~ 2012-03-16 19:48:32.709515656 +0100 ++++ rpm-5.4.7/lib/rpmds.c 2012-03-16 19:53:14.181863892 +0100 +@@ -3547,10 +3547,15 @@ int rpmdsSymlink(const char * fn, int fl + "libnss_hesiod.so", "libnss_nis.so", "libnss_nisplus.so", "libpthread.so", + "libresolv.so", "librt.so", "libutil.so", "libthread_db.so"}; + ARGV_t deps = NULL; +- ++ miRE mire; ++ ++ mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS); + /* Filename must end with ".so" to be devel(...) dependency. */ +- if ((s = strrchr(fn, '.')) && strcmp(s, ".so")) +- return 0; ++ if (!mireRegcomp(mire, "^.*/(|usr/)lib(|64)/lib.*\\.so$")) ++ xx = mireRegexec(mire, fn, (size_t) 0); ++ mire = mireFree(mire); ++ if (xx < 0) ++ return 0; + + /*@-castfcnptr@*/ + if (_rpmds_debug < 0) +@@ -3566,14 +3571,20 @@ fprintf(stderr, "*** rpmdsELF(%s, %d, %p + } + + if (is_symlink) { +-#ifdef NOT_YET ++ const char *bn; + if ((lnklen = readlink(fn, path, MAXPATHLEN - 1)) == -1) { + warn("%s", fn); + return -1; + } + /* XXX: unused, path should expand to absolute path... */ + path[lnklen] = '\0'; +-#endif ++ ++ /* if filename of library linked to isn't consistent with symlink ++ * filename, then we skip it ++ */ ++ bn = basename((char*)fn); ++ if (strncmp(bn, basename(path), (size_t)(strstr(bn, ".so") - bn))) ++ return 0; + } else { + FILE *fp = fopen(fn, "r"); + char buf[BUFSIZ]; diff --git a/rpm-5.4.7-only-generate-ruby-and-python-deps-for-executables-and-modules.patch b/rpm-5.4.7-only-generate-ruby-and-python-deps-for-executables-and-modules.patch new file mode 100644 index 0000000..5f0de46 --- /dev/null +++ b/rpm-5.4.7-only-generate-ruby-and-python-deps-for-executables-and-modules.patch @@ -0,0 +1,50 @@ +--- rpm-5.4.7/lib/rpmfc.c.exec_modules~ 2012-03-10 20:05:50.749063779 +0100 ++++ rpm-5.4.7/lib/rpmfc.c 2012-03-10 21:05:28.877795213 +0100 +@@ -912,10 +912,9 @@ static int rpmfcSCRIPT(rpmfc fc) + xx = rpmfcHelper(fc, 'R', "perl"); + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_PYTHON) { +- xx = rpmfcHelper(fc, 'P', "python"); +-#ifdef NOTYET +- if (is_executable) +-#endif ++ if (fc->fcolor->vals[fc->ix] & RPMFC_MODULE && !(fc->fcolor->vals[fc->ix] & RPMFC_SCRIPT)) ++ xx = rpmfcHelper(fc, 'P', "python"); ++ if (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)) + xx = rpmfcHelper(fc, 'R', "python"); + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_LIBTOOL) { +@@ -952,10 +951,9 @@ static int rpmfcSCRIPT(rpmfc fc) + xx = rpmfcHelper(fc, 'R', "mono"); + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_RUBY) { +- xx = rpmfcHelper(fc, 'P', "ruby"); +-#ifdef NOTYET +- if (is_executable) +-#endif ++ if (fc->fcolor->vals[fc->ix] & RPMFC_MODULE) ++ xx = rpmfcHelper(fc, 'P', "ruby"); ++ if (is_executable || (fc->fcolor->vals[fc->ix] & RPMFC_MODULE)) + xx = rpmfcHelper(fc, 'R', "ruby"); + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_FONT) { +@@ -1192,8 +1190,18 @@ assert(fc->fn != NULL); + if ((fn[0] == '3' && fn[1] == '2') || + (fn[0] == '6' && fn[1] == '4')) + fn += 2; +- if (!strncmp(fn, "/python", sizeof("/python")-1)) ++ if (!strncmp(fn, "/python", sizeof("/python")-1)) { + fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON; ++ if (strstr(fn, "site-packages")) ++ fc->fcolor->vals[fc->ix] |= RPMFC_MODULE; ++ else if (strstr(fn, ".egg")) { ++ miRE mire = mireNew(RPMMIRE_REGEX, RPMTAG_FILEPATHS); ++ if (!mireRegcomp(mire, ".*/.*\\.egg(|-info|-link)(|/.*)$")) ++ if (mireRegexec(mire, fc->fn[fc->ix], (size_t) 0) >= 0) ++ fc->fcolor->vals[fc->ix] |= RPMFC_MODULE; ++ mire = mireFree(mire); ++ } ++ } + else if (!strncmp(fn, "/ruby", sizeof("/ruby")-1)) { + fc->fcolor->vals[fc->ix] |= RPMFC_RUBY; + if ((fn = strstr(fn, "/specifications/")) && diff --git a/rpm-5.4.7-print-name-of-files-removed-dependencies-are-generated-from.patch b/rpm-5.4.7-print-name-of-files-removed-dependencies-are-generated-from.patch new file mode 100644 index 0000000..ce67e39 --- /dev/null +++ b/rpm-5.4.7-print-name-of-files-removed-dependencies-are-generated-from.patch @@ -0,0 +1,17 @@ +--- rpm-5.4.7/lib/rpmfc.c.filedep_origins~ 2012-03-13 08:43:44.548981329 +0100 ++++ rpm-5.4.7/lib/rpmfc.c 2012-03-13 08:43:48.658984801 +0100 +@@ -551,11 +551,11 @@ assert(EVR != NULL); + if (res > 0) { + (*depsp)->Flags[(*depsp)->i] = Flags; + (*depsp)->EVR[(*depsp)->i] = EVR; +- rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(*depsp), rpmdsDNEVR(ds), rpmdsDNEVR(*depsp)); ++ rpmlog(RPMLOG_WARNING, "%s (%s) overlaps %s (%s), removing %s\n", rpmdsDNEVR(*depsp), ix < (int)fc->nfiles ? fc->fn[ix] + fc->brlen : "explicit", rpmdsDNEVR(ds), fc->fn[fc->ix] + fc->brlen, rpmdsDNEVR(*depsp)); + } else if (res < 0) +- rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s\n", rpmdsDNEVR(ds), rpmdsDNEVR(*depsp), rpmdsDNEVR(ds)); ++ rpmlog(RPMLOG_WARNING, "%s (%s) overlaps %s (%s), removing %s\n", rpmdsDNEVR(ds), fc->fn[fc->ix] + fc->brlen, rpmdsDNEVR(*depsp), ix < (int)fc->nfiles ? fc->fn[ix] + fc->brlen : "explicit", rpmdsDNEVR(ds)); + else +- rpmlog(RPMLOG_WARNING, "%s overlaps %s, removing %s and merging flags\n", rpmdsDNEVR(ds), rpmdsDNEVR(*depsp), rpmdsDNEVR(ds)); ++ rpmlog(RPMLOG_WARNING, "%s (%s) overlaps %s (%s), removing %s and merging flags\n", rpmdsDNEVR(ds), fc->fn[fc->ix] + fc->brlen, rpmdsDNEVR(*depsp), ix < (int)fc->nfiles ? fc->fn[ix] + fc->brlen : "explicit", rpmdsDNEVR(ds)); + + (*depsp)->Flags[(*depsp)->i] |= newflags; + diff --git a/rpm-5.4.7-rpmds-dont-try-fopen-empty-filenames.patch b/rpm-5.4.7-rpmds-dont-try-fopen-empty-filenames.patch new file mode 100644 index 0000000..3ce9f0b --- /dev/null +++ b/rpm-5.4.7-rpmds-dont-try-fopen-empty-filenames.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.7/lib/rpmds.c.ds_stat~ 2012-03-13 19:42:38.344711524 +0100 ++++ rpm-5.4.7/lib/rpmds.c 2012-03-13 19:42:47.633723723 +0100 +@@ -2961,6 +2961,8 @@ static char *find_elf_interpreter(GElf_E + size_t shstrndx; + + if (filename) { ++ if (!*filename) ++ return NULL; + if (!(fp = fopen(filename, "r"))) { + perror(filename); + return NULL; diff --git a/rpm-5.4.7-rpmfc-fix-invalid-free-if-not-_defaultdocdir-set.patch b/rpm-5.4.7-rpmfc-fix-invalid-free-if-not-_defaultdocdir-set.patch new file mode 100644 index 0000000..9e77639 --- /dev/null +++ b/rpm-5.4.7-rpmfc-fix-invalid-free-if-not-_defaultdocdir-set.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.7/lib/rpmfc.c.free~ 2012-03-10 19:45:12.592164430 +0100 ++++ rpm-5.4.7/lib/rpmfc.c 2012-03-10 19:45:15.353166385 +0100 +@@ -901,7 +901,7 @@ static int rpmfcSCRIPT(rpmfc fc) + if (fc->fcolor->vals[fc->ix] & RPMFC_PERL) { + defaultdocdir = rpmExpand("%{?_defaultdocdir}", NULL); + if (defaultdocdir == NULL || *defaultdocdir == '\0') +- defaultdocdir = "/usr/share/doc"; ++ defaultdocdir = strdup("/usr/share/doc"); + + if (strncmp(fn, defaultdocdir, strlen(defaultdocdir))) { + if (fc->fcolor->vals[fc->ix] & RPMFC_MODULE) diff --git a/rpm-5.4.7-rpmfc-strdup-EVR-in-overlap-removal.patch b/rpm-5.4.7-rpmfc-strdup-EVR-in-overlap-removal.patch new file mode 100644 index 0000000..5c26d39 --- /dev/null +++ b/rpm-5.4.7-rpmfc-strdup-EVR-in-overlap-removal.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.7/lib/rpmfc.c.strdup~ 2012-03-13 18:49:34.187095285 +0100 ++++ rpm-5.4.7/lib/rpmfc.c 2012-03-13 18:49:49.438118160 +0100 +@@ -554,7 +554,7 @@ assert(EVR != NULL); + char *oldVal = xstrdup(strchr(rpmfcFileDep(buf, fc->ix, *depsp), ' ')); + if (res > 0) { + (*depsp)->Flags[(*depsp)->i] = Flags; +- (*depsp)->EVR[(*depsp)->i] = EVR; ++ (*depsp)->EVR[(*depsp)->i] = strdup(EVR); + rpmlog(RPMLOG_WARNING, "%s (%s) overlaps %s (%s), removing %s\n", rpmdsDNEVR(*depsp), ix < (int)fc->nfiles ? fc->fn[ix] + fc->brlen : "explicit", rpmdsDNEVR(ds), fc->fn[fc->ix] + fc->brlen, rpmdsDNEVR(*depsp)); + } else if (res < 0) + rpmlog(RPMLOG_WARNING, "%s (%s) overlaps %s (%s), removing %s\n", rpmdsDNEVR(ds), fc->fn[fc->ix] + fc->brlen, rpmdsDNEVR(*depsp), ix < (int)fc->nfiles ? fc->fn[ix] + fc->brlen : "explicit", rpmdsDNEVR(ds)); diff --git a/rpm-5.4.7-rpmv3-support.patch b/rpm-5.4.7-rpmv3-support.patch new file mode 100644 index 0000000..b24a601 --- /dev/null +++ b/rpm-5.4.7-rpmv3-support.patch @@ -0,0 +1,370 @@ +--- rpm-5.4.7/rpmdb/package.c.rpmv3~ 2012-04-12 13:08:29.214493302 +0200 ++++ rpm-5.4.7/rpmdb/package.c 2012-04-12 16:33:05.021039135 +0200 +@@ -19,6 +19,8 @@ + + #include "rpmts.h" + ++#define _RPMEVR_INTERNAL ++#include + #include "debug.h" + + #define alloca_strdup(_s) strcpy(alloca(strlen(_s)+1), (_s)) +@@ -79,6 +81,349 @@ static int pgpStashKeyid(pgpDig dig) + } + #endif + ++/*@-boundsread@*/ ++static int dncmp(const void * a, const void * b) ++ /*@*/ ++{ ++ const char *const * first = a; ++ const char *const * second = b; ++ return strcmp(*first, *second); ++} ++/*@=boundsread@*/ ++ ++/*@-bounds@*/ ++/** ++ * Convert absolute path tag to (dirname,basename,dirindex) tags. ++ * @param h header ++ */ ++static void compressFilelist(Header h) ++ /*@modifies h @*/ ++{ ++ HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); ++ ++ char ** fileNames; ++ const char ** dirNames; ++ const char ** baseNames; ++ int32_t * dirIndexes; ++ rpmTagType fnt; ++ int count; ++ int i, xx; ++ int dirIndex = -1; ++ ++ /* ++ * This assumes the file list is already sorted, and begins with a ++ * single '/'. That assumption isn't critical, but it makes things go ++ * a bit faster. ++ */ ++ ++ if (headerIsEntry(h, RPMTAG_DIRNAMES)) { ++ he->tag = RPMTAG_OLDFILENAMES; ++ headerDel(h, he, 0); ++ return; /* Already converted. */ ++ } ++ ++ he->tag = RPMTAG_OLDFILENAMES; ++ if (!headerGet(h, he, 0)) ++ return; ++ ++ fileNames = he->p.ptr; ++ if (he->c <= 0) ++ return; ++ count = he->c; ++ ++ dirNames = alloca(sizeof(*dirNames) * count); /* worst case */ ++ baseNames = alloca(sizeof(*dirNames) * count); ++ dirIndexes = alloca(sizeof(*dirIndexes) * count); ++ ++ if (fileNames[0][0] != '/') { ++ /* HACK. Source RPM, so just do things differently */ ++ dirIndex = 0; ++ dirNames[dirIndex] = ""; ++ for (i = 0; i < count; i++) { ++ dirIndexes[i] = dirIndex; ++ baseNames[i] = fileNames[i]; ++ } ++ goto exit; ++ } ++ ++ /*@-branchstate@*/ ++ for (i = 0; i < count; i++) { ++ const char ** needle; ++ char savechar; ++ char * baseName; ++ int len; ++ ++ if (fileNames[i] == NULL) /* XXX can't happen */ ++ continue; ++ baseName = strrchr(fileNames[i], '/') + 1; ++ len = baseName - fileNames[i]; ++ needle = dirNames; ++ savechar = *baseName; ++ *baseName = '\0'; ++/*@-compdef@*/ ++ if (dirIndex < 0 || ++ (needle = bsearch(&fileNames[i], dirNames, dirIndex + 1, sizeof(dirNames[0]), dncmp)) == NULL) { ++ char *s = alloca(len + 1); ++ memcpy(s, fileNames[i], len + 1); ++ s[len] = '\0'; ++ dirIndexes[i] = ++dirIndex; ++ dirNames[dirIndex] = s; ++ } else ++ dirIndexes[i] = needle - dirNames; ++/*@=compdef@*/ ++ ++ *baseName = savechar; ++ baseNames[i] = baseName; ++ } ++ /*@=branchstate@*/ ++ ++exit: ++ if (count > 0) { ++ ++ he->tag = RPMTAG_DIRINDEXES; ++ if (headerGet(h, he, 0)) ++ dirIndexes = he->p.ptr; ++ he->tag = RPMTAG_BASENAMES; ++ if (headerGet(h, he, 0)) ++ baseNames = he->p.ptr; ++ he->tag = RPMTAG_DIRNAMES; ++ if (headerGet(h, he, 0)) ++ dirNames = he->p.ptr; ++ ++ he->tag = RPMTAG_DIRINDEXES; ++ he->t = RPM_UINT32_TYPE; ++ he->p.ptr = dirIndexes; ++ he->c = count; ++ headerPut(h, he, 0); ++ ++ he->tag = RPMTAG_BASENAMES; ++ he->t = RPM_STRING_ARRAY_TYPE; ++ he->p.ptr = baseNames; ++ he->c = count; ++ headerPut(h, he, 0); ++ ++ he->tag = RPMTAG_DIRNAMES; ++ he->t = RPM_STRING_ARRAY_TYPE; ++ he->p.ptr = dirNames; ++ he->c = dirIndex +1; ++ headerPut(h,he,0); ++ } ++ ++ fileNames = _free(fileNames); ++ ++ he->tag = RPMTAG_OLDFILENAMES; ++ headerDel(h, he, 0); ++ ++} ++/*@=bounds@*/ ++ ++/* copied verbatim from build/pack.c */ ++static void providePackageNVR(Header h) ++{ ++ HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); ++ const char *N, *V, *R; ++#ifdef RPM_VENDOR_MANDRIVA ++ const char *D; ++ int gotD; ++#endif ++ rpmuint32_t E; ++ int gotE; ++ const char *pEVR; ++ char *p; ++ rpmuint32_t pFlags = RPMSENSE_EQUAL; ++ const char ** provides = NULL; ++ const char ** providesEVR = NULL; ++ rpmuint32_t * provideFlags = NULL; ++ int providesCount; ++ int bingo = 1; ++ size_t nb; ++ int xx; ++ int i; ++ ++ /* Generate provides for this package N-V-R. */ ++ xx = headerNEVRA(h, &N, NULL, &V, &R, NULL); ++ if (!(N && V && R)) ++ return; ++ ++ nb = 21 + strlen(V) + 1 + strlen(R) + 1; ++#ifdef RPM_VENDOR_MANDRIVA ++ he->tag = RPMTAG_DISTEPOCH; ++ gotD = headerGet(h, he, 0); ++ D = (he->p.str ? he->p.str : NULL); ++ nb += (gotD ? strlen(D) + 1 : 0); ++#endif ++ pEVR = p = alloca(nb); ++ *p = '\0'; ++ he->tag = RPMTAG_EPOCH; ++ gotE = headerGet(h, he, 0); ++ E = (he->p.ui32p ? he->p.ui32p[0] : 0); ++ he->p.ptr = _free(he->p.ptr); ++ if (gotE) { ++ sprintf(p, "%d:", E); ++ p += strlen(p); ++ } ++ p = stpcpy( stpcpy( stpcpy(p, V) , "-") , R); ++#ifdef RPM_VENDOR_MANDRIVA ++ if (gotD) { ++ p = stpcpy( stpcpy( p, ":"), D); ++ D = _free(D); ++ //(void) rpmlibNeedsFeature(h, "DistEpoch", "5.4.7-1"); ++ } ++#endif ++ V = _free(V); ++ R = _free(R); ++ ++ /* ++ * Rpm prior to 3.0.3 does not have versioned provides. ++ * If no provides at all are available, we can just add. ++ */ ++ he->tag = RPMTAG_PROVIDENAME; ++/*@-nullstate@*/ ++ xx = headerGet(h, he, 0); ++/*@=nullstate@*/ ++ provides = he->p.argv; ++ providesCount = he->c; ++ if (!xx) ++ goto exit; ++ ++ /* ++ * Otherwise, fill in entries on legacy packages. ++ */ ++ he->tag = RPMTAG_PROVIDEVERSION; ++/*@-nullstate@*/ ++ xx = headerGet(h, he, 0); ++/*@=nullstate@*/ ++ providesEVR = he->p.argv; ++ if (!xx) { ++ for (i = 0; i < providesCount; i++) { ++ /*@observer@*/ ++ static const char * vdummy = ""; ++ static rpmsenseFlags fdummy = RPMSENSE_ANY; ++ ++ he->tag = RPMTAG_PROVIDEVERSION; ++ he->t = RPM_STRING_ARRAY_TYPE; ++ he->p.argv = &vdummy; ++ he->c = 1; ++ he->append = 1; ++/*@-nullstate@*/ ++ xx = headerPut(h, he, 0); ++/*@=nullstate@*/ ++ he->append = 0; ++ ++ he->tag = RPMTAG_PROVIDEFLAGS; ++ he->t = RPM_UINT32_TYPE; ++ he->p.ui32p = (void *) &fdummy; ++ he->c = 1; ++ he->append = 1; ++/*@-nullstate@*/ ++ xx = headerPut(h, he, 0); ++/*@=nullstate@*/ ++ he->append = 0; ++ } ++ goto exit; ++ } ++ ++ he->tag = RPMTAG_PROVIDEFLAGS; ++/*@-nullstate@*/ ++ xx = headerGet(h, he, 0); ++/*@=nullstate@*/ ++ provideFlags = he->p.ui32p; ++ ++ /*@-nullderef@*/ /* LCL: providesEVR is not NULL */ ++ if (provides && providesEVR && provideFlags) ++ for (i = 0; i < providesCount; i++) { ++ if (!(provides[i] && providesEVR[i])) ++ continue; ++ if (!(provideFlags[i] == RPMSENSE_EQUAL && ++ !strcmp(N, provides[i]) && !strcmp(pEVR, providesEVR[i]))) ++ continue; ++ bingo = 0; ++ break; ++ } ++ /*@=nullderef@*/ ++ ++exit: ++/*@-usereleased@*/ ++ provides = _free(provides); ++ providesEVR = _free(providesEVR); ++ provideFlags = _free(provideFlags); ++/*@=usereleased@*/ ++ ++ if (bingo) { ++ he->tag = RPMTAG_PROVIDENAME; ++ he->t = RPM_STRING_ARRAY_TYPE; ++ he->p.argv = &N; ++ he->c = 1; ++ he->append = 1; ++/*@-nullstate@*/ ++ xx = headerPut(h, he, 0); ++/*@=nullstate@*/ ++ he->append = 0; ++ ++ /* XXX succeeds only at allocating the necessary appended space, ++ * not copying to it..? */ ++ xx = headerGet(h, he, 0); ++ he->p.argv[providesCount] = N; ++ xx = headerPut(h, he, 0); ++ _free(he->p.ptr); ++ ++ he->tag = RPMTAG_PROVIDEVERSION; ++ he->t = RPM_STRING_ARRAY_TYPE; ++ he->p.argv = &pEVR; ++ he->c = 1; ++ he->append = 1; ++/*@-nullstate@*/ ++ xx = headerPut(h, he, 0); ++/*@=nullstate@*/ ++ he->append = 0; ++ ++ he->tag = RPMTAG_PROVIDEFLAGS; ++ he->t = RPM_UINT32_TYPE; ++ he->p.ui32p = &pFlags; ++ he->c = 1; ++ he->append = 1; ++/*@-nullstate@*/ ++ xx = headerPut(h, he, 0); ++/*@=nullstate@*/ ++ he->append = 0; ++ } ++ N = _free(N); ++} ++ ++static void add_RPMTAG_SOURCERPM(Header h) ++{ ++ if (!headerIsEntry(h, RPMTAG_SOURCERPM) && !headerIsEntry(h, RPMTAG_SOURCEPACKAGE)) { ++ /* we have no way to know if this is a srpm or an rpm with no SOURCERPM */ ++ /* but since this is an old v3 rpm, we suppose it's not a srpm */ ++ HE_t he = (HE_t)memset(alloca(sizeof(*he)), 0, sizeof(*he)); ++ ++ he->tag = RPMTAG_SOURCERPM; ++ he->t = RPM_STRING_TYPE; ++ he->p.str = "\0"; ++ he->c = 1; ++ headerPut(h, he, 0); ++ } ++} ++ ++/* rpm v3 compatibility */ ++static void rpm3to4(Header h) { ++ const char * rpmversion = NULL; ++ HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); ++ ++ he->tag = RPMTAG_RPMVERSION; ++ if (headerGet(h, he, 0)) { ++ rpmversion = he->p.str; ++ } ++ ++ if ((!rpmversion) || rpmversion[0] < '4') { ++ add_RPMTAG_SOURCERPM(h); ++ providePackageNVR(h); ++ compressFilelist(h); ++ } ++ rpmversion = _free(rpmversion); ++ return; ++} ++ + /*@-mods@*/ + rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp) + { +@@ -383,6 +728,8 @@ exit: + /* Append (and remap) signature tags to the metadata. */ + headerMergeLegacySigs(h, sigh); + ++ rpm3to4(h); ++ + /* Bump reference count for return. */ + *hdrp = headerLink(h); + } diff --git a/rpm-5.4.7-use-bdb-5.2.patch b/rpm-5.4.7-use-bdb-5.2.patch new file mode 100644 index 0000000..371a996 --- /dev/null +++ b/rpm-5.4.7-use-bdb-5.2.patch @@ -0,0 +1,29 @@ +--- rpm-5.4.7/configure.ac.db52~ 2012-03-09 06:13:04.186897418 +0100 ++++ rpm-5.4.7/configure.ac 2012-03-09 06:13:12.825902025 +0100 +@@ -541,7 +541,7 @@ else + MYPATH=$PATH + fi + +-DBXY=db53 ++DBXY=db52 + + AC_PATH_PROG(__BASH, bash, %{_bindir}/bash, $MYPATH) + AC_PATH_PROG(__BZIP2, bzip2, %{_bindir}/bzip2, $MYPATH) +@@ -1560,7 +1560,7 @@ DBLIBSRCS="" + CPPFLAGS="${CPPFLAGS} -I${prefix}/include/${DBXY}" + RPM_CHECK_LIB( + [Berkeley-DB], [db], +- [db-5.3], [db_create], [db.h], ++ [db-5.2], [db_create], [db.h], + [yes,external], [db3], + [ DBLIBSRCS="$DBLIBSRCS db3.c" + AM_CONDITIONAL(WITH_DB, [ true ]) +@@ -1587,7 +1587,7 @@ dnl # Sqlite 3.7.0.1 from db-5.1.19 + dnl XXX error: `db3' is already registered with AC_CONFIG_SUBDIRS. + RPM_CHECK_LIB( + [Berkeley-DB (+SQLite3)], [dbsql], +- [db_sql-5.3], [sqlite3_open], [dbsql.h], ++ [db_sql-5.2], [sqlite3_open], [dbsql.h], + [yes,external], [db3/sql], + [ + AM_CONDITIONAL(WITH_DBSQL, [ true ]) diff --git a/rpm-5.4.7-use-gnu-hash-style-by-default-and-drop-rtld-dep.patch b/rpm-5.4.7-use-gnu-hash-style-by-default-and-drop-rtld-dep.patch new file mode 100644 index 0000000..a167009 --- /dev/null +++ b/rpm-5.4.7-use-gnu-hash-style-by-default-and-drop-rtld-dep.patch @@ -0,0 +1,29 @@ +--- rpm-5.4.7/lib/rpmds.c.gnu_hash~ 2012-03-10 17:35:53.830770413 +0100 ++++ rpm-5.4.7/lib/rpmds.c 2012-03-10 17:35:53.837770420 +0100 +@@ -3455,6 +3455,7 @@ assert(s != NULL); + } + /*@=uniondef @*/ + ++#if !defined(RPM_VENDOR_MANDRIVA) + /* For DSOs which use the .gnu_hash section and don't have a .hash + * section, we need to ensure that we have a new enough glibc. */ + if (gotGNUHASH && !gotHASH) { +@@ -3464,6 +3465,7 @@ assert(s != NULL); + (void)rpmdsFree(ds); + ds = NULL; + } ++#endif + + /* For DSO's, provide the basename of the file if DT_SONAME not found. */ + if (!skipP && isDSO && !gotDEBUG && !gotSONAME) { +--- rpm-5.4.7/macros/mandriva.in.gnu_hash~ 2012-03-10 17:35:53.000000000 +0100 ++++ rpm-5.4.7/macros/mandriva.in 2012-03-10 17:39:05.871934996 +0100 +@@ -358,7 +358,7 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} - + + %__libtoolize_configure %{?__libtoolize:(cd $CONFIGURE_TOP; [ ! -f configure.in -a ! -f configure.ac ] || %{__libtoolize} --copy --force)} + +-%ldflags %{?!_disable_ld_as_needed: -Wl,--as-needed}%{?!_disable_ld_no_undefined: -Wl,--no-undefined}%{?!_disable_ld_relro: -Wl,-z,relro}%{?!_disable_ld_O1: -Wl,-O1}%{?!_disable_ld_build_id: -Wl,--build-id}%{?!_disable_ld_enable_new_dtags: -Wl,--enable-new-dtags}%{?_hardened_flags: %_hardened_flags} ++%ldflags %{?!_disable_ld_as_needed: -Wl,--as-needed}%{?!_disable_ld_no_undefined: -Wl,--no-undefined}%{?!_disable_ld_relro: -Wl,-z,relro}%{?!_disable_ld_O1: -Wl,-O1}%{?!_disable_ld_build_id: -Wl,--build-id}%{?!_disable_ld_enable_new_dtags: -Wl,--enable-new-dtags}%{?!_disable_hash_style_gnu: -Wl,--hash-style=gnu}%{?_hardened_flags: %_hardened_flags} + + %setup_compile_flags \ + CFLAGS="${CFLAGS:-%optflags}" ; export CFLAGS ; \ diff --git a/rpm-5.4.8-URPM-build-fix.patch b/rpm-5.4.8-URPM-build-fix.patch new file mode 100644 index 0000000..b0e029d --- /dev/null +++ b/rpm-5.4.8-URPM-build-fix.patch @@ -0,0 +1,13 @@ +--- rpm-5.4.8/configure.ac.urpm~ 2012-04-25 19:27:07.929167065 +0200 ++++ rpm-5.4.8/configure.ac 2012-04-25 19:29:04.996867674 +0200 +@@ -1198,8 +1198,8 @@ AC_ARG_WITH(perl-urpm, AS_HELP_STRING([- + AC_SUBST(PERL_URPM_INSTALLDIRS) + WITH_PERL_URPM_SUBDIR=perl-URPM + WITH_PERL_URPM_SUBPACKAGE=1 +- AC_CONFIG_FILES([perl-URPM/Makefile.PL]) +- AC_CONFIG_FILES([perl-URPM/Makefile]) ++ AC_CONFIG_FILES([scripts/URPM-Makefile.PL]) ++ AC_CONFIG_FILES([scripts/URPM-Makefile]) + fi + ]) + AC_SUBST(WITH_PERL_URPM_SUBDIR) diff --git a/rpm-5.4.8-add-armv7l-specific-macros.patch b/rpm-5.4.8-add-armv7l-specific-macros.patch new file mode 100644 index 0000000..4bc053c --- /dev/null +++ b/rpm-5.4.8-add-armv7l-specific-macros.patch @@ -0,0 +1,36 @@ +From 727484174300654bc4b3881f3db2889a05f3895c Mon Sep 17 00:00:00 2001 +From: Franck Bui +Date: Thu, 26 Apr 2012 13:21:45 +0000 +Subject: [PATCH 1/1] Add armv7l target + +Signed-off-by: Franck Bui +--- + cpu-os-macros/armv7l-linux/macros | 82 +++++++++++++++++++++++++++++++++++++ + 2 files changed, 83 insertions(+), 1 deletions(-) + create mode 100644 cpu-os-macros/armv7l-linux/macros + +diff --git a/cpu-os-macros/armv7l-linux/macros b/cpu-os-macros/armv7l-linux/macros +new file mode 100644 +index 0000000..f12a8a2 +--- /dev/null ++++ b/cpu-os-macros/armv7l-linux/macros +@@ -0,0 +1,19 @@ ++# Per-platform rpm configuration file. ++ ++#============================================================================== ++# ---- per-platform macros. ++# ++%_arch arm ++%_os linux ++%_gnu -gnueabi ++%optflags -O2 -g -fpic -fPIC -fno-strict-volatile-bitfields ++ ++#============================================================================== ++# ---- configure macros. ++# ++%_lib lib ++ ++#--------------------------------------------------------------------- ++# Multilibs ++%_multilibno 1 ++%_multilibpatt (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$ diff --git a/rpm-5.4.8-dont-show-suggests-with-requires.patch b/rpm-5.4.8-dont-show-suggests-with-requires.patch new file mode 100644 index 0000000..19cf1e0 --- /dev/null +++ b/rpm-5.4.8-dont-show-suggests-with-requires.patch @@ -0,0 +1,62 @@ +--- 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-add-distepoch-rpmlib-feature.patch b/rpm-5.4.9-add-distepoch-rpmlib-feature.patch new file mode 100644 index 0000000..193e450 --- /dev/null +++ b/rpm-5.4.9-add-distepoch-rpmlib-feature.patch @@ -0,0 +1,14 @@ +--- rpm-5.4.9/lib/rpmds.c.depoch_rpmlib~ 2012-05-15 02:59:01.000000000 +0200 ++++ rpm-5.4.9/lib/rpmds.c 2012-05-15 03:00:11.147448068 +0200 +@@ -1565,6 +1565,11 @@ static struct rpmlibProvides_s rpmlibPro + { "rpmlib(SetVersions)", "4.0.4-alt98", + (evrFlags)(RPMSENSE_RPMLIB|RPMSENSE_EQUAL), + N_("dependencies support set/subset versions.") }, ++#if defined(RPM_VENDOR_MANDRIVA) ++ { "rpmlib(DistEpoch)", "5.4.7-1", ++ (RPMSENSE_RPMLIB|RPMSENSE_EQUAL), ++ N_("package has distepoch.") }, ++#endif + { NULL, NULL, (evrFlags)0, NULL } + }; + diff --git a/rpm-5.4.9-add-filetriggers-regex-matching-support.patch b/rpm-5.4.9-add-filetriggers-regex-matching-support.patch new file mode 100644 index 0000000..b940477 --- /dev/null +++ b/rpm-5.4.9-add-filetriggers-regex-matching-support.patch @@ -0,0 +1,111 @@ +--- rpm-5.4.9/build/parseReqs.c.trig_pcre~ 2009-06-13 11:07:44.000000000 +0200 ++++ rpm-5.4.9/build/parseReqs.c 2012-05-15 03:05:07.438054281 +0200 +@@ -110,7 +110,7 @@ rpmRC parseRCPOT(Spec spec, Package pkg, + ix = 0; + if (N[ix] == '!') + ix++; +- if (!(xisalnum(N[ix]) || N[ix] == '_' || N[ix] == '/' ++ if (!(xisalnum(N[ix]) || N[ix] == '_' || N[ix] == '/' || N[ix] == '^' + || (nr > 5 && N[ix] == '%' && N[ix+1] == '{' && N[nr-1] == '}'))) + { + rpmlog(RPMLOG_ERR, +--- rpm-5.4.9/lib/psm.c.trig_pcre~ 2012-05-15 03:05:07.085052367 +0200 ++++ rpm-5.4.9/lib/psm.c 2012-05-15 03:07:11.367726113 +0200 +@@ -67,6 +67,9 @@ + + #include "debug.h" + ++#define PATT_ISDIR(patt, len) ((patt[0] == '/' && patt[len-1] == '/') || \ ++ (patt[0] == '^' && patt[len-1] == '$' && patt[len-2] == '/')) ++ + #define _PSM_DEBUG 0 + /*@unchecked@*/ + int _psm_debug = _PSM_DEBUG; +@@ -1285,11 +1288,11 @@ static rpmRC handleOneTrigger(const rpmp + + bingo = 0; /* no trigger to fire. */ + depName = (char *) rpmdsN(Tds); +- if (depName[0] == '/') { ++ if (depName[0] == '^' || depName[0] == '/') { + size_t nb = strlen(depName); +- if (Glob_pattern_p(depName, 0)) { ++ if (depName[0] == '^' || Glob_pattern_p(depName, 0)) { + rpmds ds = NULL; +- if (depName[nb-1] == '/') { ++ if (PATT_ISDIR(depName, nb)) { + /* XXX Dirnames w trailing "/" needed. */ + if (Dds == NULL) + Dds = rpmdsNew(sourceH, RPMTAG_DIRNAMES, 0x2); +@@ -1300,7 +1303,7 @@ static rpmRC handleOneTrigger(const rpmp + ds = rpmdsLink(Fds, "Triggers"); + } + if (mire == NULL) +- mire = mireNew(RPMMIRE_GLOB, 0); ++ mire = mireNew(depName[0] == '^' ? RPMMIRE_PCRE : RPMMIRE_GLOB, 0); + + xx = mireRegcomp(mire, depName); + if ((ds = rpmdsInit(ds)) != NULL) +@@ -1318,7 +1321,7 @@ static rpmRC handleOneTrigger(const rpmp + } + + /* If not matched, and directory trigger, try dir names. */ +- if (!bingo && depName[nb-1] == '/') { ++ if (!bingo && PATT_ISDIR(depName, nb)) { + /* XXX Dirnames w trailing "/" needed. */ + if (Dds == NULL) + Dds = rpmdsNew(sourceH, RPMTAG_DIRNAMES, 0x2); +@@ -1401,9 +1404,9 @@ static int rpmdbTriggerGlobs(rpmpsm psm) + if (keys) + for (i = 0; i < nkeys; i++) { + char * t = (char *) keys[i]; +- if (!Glob_pattern_p(t, 0)) ++ if (!(t[0] == '^' || Glob_pattern_p(t, 0))) + continue; +- xx = mireAppend(RPMMIRE_GLOB, 0, t, NULL, ++ xx = mireAppend(t[0] == '^' ? RPMMIRE_PCRE : RPMMIRE_GLOB, 0, t, NULL, + (miRE *)&psm->Tmires, &psm->nTmires); + xx = argvAdd(&psm->Tpats, t); + } +@@ -1461,7 +1464,7 @@ static rpmRC runTriggersLoop(rpmpsm psm, + const char * pattern = psm->Tpats[j]; + if (depName[nName-1] != '/') { + size_t npattern = strlen(pattern); +- depName[nName] = (pattern[npattern-1] == '/') ? '/' : '\0'; ++ depName[nName] = PATT_ISDIR(pattern, npattern) ? '/' : '\0'; + } + if (mireRegexec(mire, depName, 0) < 0) + /*@innercontinue@*/ continue; +@@ -1634,14 +1637,14 @@ assert(fi->h != NULL); + + /* If not limited to NEVRA triggers, use file/dir index. */ + if (tagno != RPMTAG_NAME) { ++ size_t nb = strlen(N); + /* XXX if trigger name ends with '/', use dirnames instead. */ +- if (N[0] == '/') +- tagno = (N[strlen(N)-1] == '/') +- ? RPMTAG_DIRNAMES : RPMTAG_FILEPATHS; ++ if (N[0] == '^' || N[0] == '/') ++ tagno = (PATT_ISDIR(N, nb)) ? RPMTAG_DIRNAMES : RPMTAG_FILEPATHS; + } + /* XXX For now, permit globs only in unversioned triggers. */ +- if ((EVR == NULL || *EVR == '\0') && Glob_pattern_p(N, 0)) +- xx = rpmdbMireApply(rpmtsGetRdb(ts), tagno, RPMMIRE_GLOB, N, &keys); ++ if ((EVR == NULL || *EVR == '\0') && (N[0] == '^' || Glob_pattern_p(N, 0))) ++ xx = rpmdbMireApply(rpmtsGetRdb(ts), tagno, N[0] == '^' ? RPMMIRE_PCRE : RPMMIRE_GLOB, N, &keys); + else + xx = argvAdd(&keys, N); + } +@@ -1657,10 +1660,10 @@ assert(fi->h != NULL); + + /* If not limited to NEVRA triggers, use file/dir index. */ + if (tagno != RPMTAG_NAME) { ++ size_t nb = strlen(Name); + /* XXX if trigger name ends with '/', use dirnames instead. */ +- if (Name[0] == '/') +- tagno = (Name[strlen(Name)-1] == '/') +- ? RPMTAG_DIRNAMES : RPMTAG_FILEPATHS; ++ if (Name[0] == '^' || Name[0] == '/') ++ tagno = PATT_ISDIR(Name, nb) ? RPMTAG_DIRNAMES : RPMTAG_FILEPATHS; + } + + mi = rpmtsInitIterator(ts, tagno, Name, 0); diff --git a/rpm-5.4.9-add-matches-as-arguments-to-triggers.patch b/rpm-5.4.9-add-matches-as-arguments-to-triggers.patch new file mode 100644 index 0000000..67322d4 --- /dev/null +++ b/rpm-5.4.9-add-matches-as-arguments-to-triggers.patch @@ -0,0 +1,135 @@ +--- rpm-5.4.9/lib/psm.c.trigger_args~ 2012-05-15 03:08:19.198093824 +0200 ++++ rpm-5.4.9/lib/psm.c 2012-05-15 03:14:25.545079818 +0200 +@@ -610,28 +610,37 @@ static int exitChroot(rpmpsm psm, int in + * @return RPMRC_OK on success + */ + static rpmRC runEmbeddedScript(rpmpsm psm, const char * sln, HE_t Phe, +- const char *script, int arg1, int arg2) ++ const char *script, int arg1, int arg2, ARGV_t matches) + /*@globals fileSystem, internalState @*/ + /*@modifies psm, fileSystem, internalState @*/ + { +- char * av[] = { NULL, NULL, NULL, NULL }; ++ char ** av = NULL; + int pwdFdno = -1; + int rootFdno = -1; + rpmRC rc = RPMRC_OK; + int xx = 0; + rpmuint32_t * ssp = NULL; + int inChroot = enterChroot(psm, &pwdFdno, &rootFdno); ++ size_t len = 4 + (matches ? argvCount(matches) : 0); + + if (psm->sstates != NULL) + ssp = psm->sstates + tag2slx(psm->scriptTag); + if (ssp != NULL) + *ssp |= (RPMSCRIPT_STATE_EMBEDDED|RPMSCRIPT_STATE_EXEC); + +- av[0] = (char *) Phe->p.argv[0]; ++ av = alloca(len * sizeof(*av)); + if (arg1 >= 0) + (void) sprintf((av[1] = (char *) alloca(32)), "%d", arg1); ++ else ++ av[1] = NULL; + if (arg2 >= 0) + (void) sprintf((av[2] = (char *) alloca(32)), "%d", arg2); ++ else ++ av[2] = NULL; ++ if (matches) ++ memcpy(&av[3], argvData(matches), argvCount(matches) * sizeof(*argvData(matches))); ++ av[len-1] = NULL; ++ + + #if defined(WITH_LUA) + if (!strcmp(Phe->p.argv[0], "")) { +@@ -776,7 +785,7 @@ static const char * ldconfig_path = "/sb + * @return RPMRC_OK on success + */ + static rpmRC runScript(rpmpsm psm, Header h, const char * sln, HE_t Phe, +- const char * script, int arg1, int arg2) ++ const char * script, int arg1, int arg2, ARGV_t matches) + /*@globals ldconfig_done, rpmGlobalMacroContext, h_errno, + fileSystem, internalState@*/ + /*@modifies psm, ldconfig_done, rpmGlobalMacroContext, +@@ -843,7 +852,7 @@ assert(he->p.str != NULL); + rpmlog(RPMLOG_DEBUG, + D_("%s: %s(%s) running %s scriptlet.\n"), + psm->stepName, tag2sln(psm->scriptTag), NVRA, Phe->p.argv[0]); +- rc = runEmbeddedScript(psm, sln, Phe, body, arg1, arg2); ++ rc = runEmbeddedScript(psm, sln, Phe, body, arg1, arg2, matches); + #endif + goto exit; + } +@@ -870,12 +879,12 @@ assert(he->p.str != NULL); + (F_ISSET(psm, UNORDERED) ? "a" : "")); + + if (Phe->p.argv == NULL) { +- argv = (const char **) alloca(5 * sizeof(*argv)); ++ argv = alloca(5 + (matches ? argvCount(matches) : 0 ) * sizeof(*argv)); + argv[0] = "/bin/sh"; + argc = 1; + ldconfig_done = 0; + } else { +- argv = (const char **) alloca((Phe->c + 4) * sizeof(*argv)); ++ argv = alloca((Phe->c + 4) + (matches ? argvCount(matches) : 0 ) * sizeof(*argv)); + memcpy(argv, Phe->p.argv, Phe->c * sizeof(*argv)); + argc = Phe->c; + ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path) +@@ -959,6 +968,10 @@ assert(he->p.str != NULL); + sprintf(av, "%d", arg2); + argv[argc++] = av; + } ++ if (matches) { ++ memcpy(&argv[argc], argvData(matches), argvCount(matches) * sizeof(*argvData(matches))); ++ argc += argvCount(matches); ++ } + } + + argv[argc] = NULL; +@@ -1199,7 +1212,7 @@ assert(fi->h != NULL); + Phe->p.argv[0] = argv0 = rpmExpand(Phe->p.argv[0], NULL); + + rc = runScript(psm, fi->h, tag2sln(psm->scriptTag), Phe, +- She->p.str, psm->scriptArg, -1); ++ She->p.str, psm->scriptArg, -1, NULL); + + exit: + argv0 = _free(argv0); +@@ -1280,6 +1293,7 @@ static rpmRC handleOneTrigger(const rpmp + while ((i = rpmdsNext(Tds)) >= 0) { + rpmuint32_t Flags = rpmdsFlags(Tds); + char * depName; ++ ARGV_t matches = NULL; + int bingo; + + /* Skip triggers that are not in this context. */ +@@ -1313,7 +1327,7 @@ static rpmRC handleOneTrigger(const rpmp + if (xx < 0) + /*@innercontinue@*/ continue; + bingo = 1; +- /*@innerbreak@*/ break; ++ argvAdd(&matches, N); + } + (void)rpmdsFree(ds); + ds = NULL; +@@ -1347,7 +1361,6 @@ static rpmRC handleOneTrigger(const rpmp + continue; + + /* Coerce strings into header argv return. */ +- /* XXX FIXME: permit trigger scripts with arguments. */ + { int index = Ihe->p.ui32p[i]; + const char * s = Phe->p.argv[index]; + char * t; +@@ -1362,11 +1375,12 @@ static rpmRC handleOneTrigger(const rpmp + *t = '\0'; + + if (runScript(psm, triggeredH, "%trigger", he, +- She->p.argv[index], arg1, arg2)) ++ She->p.argv[index], arg1, arg2, matches)) + rc = RPMRC_FAIL; + + he->p.ptr = _free(he->p.ptr); + } ++ argvFree(matches); + } + + mire = mireFree(mire); diff --git a/rpm-5.4.9-add-support-for-using-rpmdsMerge-with-filepath-tags.patch b/rpm-5.4.9-add-support-for-using-rpmdsMerge-with-filepath-tags.patch new file mode 100644 index 0000000..bfcc7c5 --- /dev/null +++ b/rpm-5.4.9-add-support-for-using-rpmdsMerge-with-filepath-tags.patch @@ -0,0 +1,84 @@ +--- rpm-5.4.9/lib/rpmds.c.ds_merge~ 2012-05-15 03:43:11.000000000 +0200 ++++ rpm-5.4.9/lib/rpmds.c 2012-05-15 03:46:37.823554837 +0200 +@@ -973,21 +973,24 @@ static rpmds rpmdsDup(const rpmds ods) + : rpmdsDupArgv(ods->N, ods->Count) ); + + /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */ ++ if (ods->tagN != RPMTAG_BASENAMES && ++ ods->tagN != RPMTAG_DIRNAMES && ++ ods->tagN != RPMTAG_FILEPATHS) { + assert(ods->EVR != NULL); + assert(ods->Flags != NULL); +- +- nb = (ds->Count+1) * sizeof(*ds->EVR); +- ds->EVR = (const char **) (ds->h != NULL +- ? memcpy(xmalloc(nb), ods->EVR, nb) +- : rpmdsDupArgv(ods->EVR, ods->Count) ); +- +- nb = (ds->Count * sizeof(*ds->Flags)); +- ds->Flags = (evrFlags *) (ds->h != NULL +- ? ods->Flags +- : memcpy(xmalloc(nb), ods->Flags, nb) ); +- ds->nopromote = ods->nopromote; +-/*@-assignexpose@*/ +- ds->EVRcmp = ods->EVRcmp;; ++ nb = (ds->Count+1) * sizeof(*ds->EVR); ++ ds->EVR = (ds->h != NULL ++ ? memcpy(xmalloc(nb), ods->EVR, nb) ++ : rpmdsDupArgv(ods->EVR, ods->Count) ); ++ ++ nb = (ds->Count * sizeof(*ds->Flags)); ++ ds->Flags = (ds->h != NULL ++ ? ods->Flags ++ : memcpy(xmalloc(nb), ods->Flags, nb) ); ++ ds->nopromote = ods->nopromote; ++ /*@-assignexpose@*/ ++ ds->EVRcmp = ods->EVRcmp; ++ } + /*@=assignexpose@*/ + + /*@-compmempass@*/ /* FIX: ds->Flags is kept, not only */ +@@ -1075,24 +1078,28 @@ save = ods->i; + + /* XXX rpm prior to 3.0.2 did not always supply EVR and Flags. */ + /*@-nullderef -nullpass -nullptrarith @*/ ++ if (ds->tagN != RPMTAG_BASENAMES && ++ ds->tagN != RPMTAG_DIRNAMES && ++ ds->tagN != RPMTAG_FILEPATHS) { + assert(ods->EVR != NULL); + assert(ods->Flags != NULL); + +- for (j = ds->Count; j > (int)ds->u; j--) +- ds->EVR[j] = ds->EVR[j-1]; +- ds->EVR[ds->u] = ods->EVR[ods->i]; +- EVR = rpmdsDupArgv(ds->EVR, ds->Count+1); +- ds->EVR = _free(ds->EVR); +- ds->EVR = EVR; +- +- Flags = (evrFlags *) xmalloc((ds->Count+1) * sizeof(*Flags)); +- if (ds->u > 0) +- memcpy(Flags, ds->Flags, ds->u * sizeof(*Flags)); +- if (ds->u < ds->Count) +- memcpy(Flags + ds->u + 1, ds->Flags + ds->u, (ds->Count - ds->u) * sizeof(*Flags)); +- Flags[ds->u] = ods->Flags[ods->i]; +- ds->Flags = _free(ds->Flags); +- ds->Flags = Flags; ++ for (j = ds->Count; j > (int)ds->u; j--) ++ ds->EVR[j] = ds->EVR[j-1]; ++ ds->EVR[ds->u] = ods->EVR[ods->i]; ++ EVR = rpmdsDupArgv(ds->EVR, ds->Count+1); ++ ds->EVR = _free(ds->EVR); ++ ds->EVR = EVR; ++ ++ Flags = xmalloc((ds->Count+1) * sizeof(*Flags)); ++ if (ds->u > 0) ++ memcpy(Flags, ds->Flags, ds->u * sizeof(*Flags)); ++ if (ds->u < ds->Count) ++ memcpy(Flags + ds->u + 1, ds->Flags + ds->u, (ds->Count - ds->u) * sizeof(*Flags)); ++ Flags[ds->u] = ods->Flags[ods->i]; ++ ds->Flags = _free(ds->Flags); ++ ds->Flags = Flags; ++ } + /*@=nullderef =nullpass =nullptrarith @*/ + + ds->i = -1; diff --git a/rpm-5.4.9-add-x32-macros.patch b/rpm-5.4.9-add-x32-macros.patch new file mode 100644 index 0000000..e0c0301 --- /dev/null +++ b/rpm-5.4.9-add-x32-macros.patch @@ -0,0 +1,23 @@ +--- rpm-5.4.9/cpu-os-macros/x32-linux/macros.x32~ 2012-05-17 06:09:01.611004408 +0200 ++++ rpm-5.4.9/cpu-os-macros/x32-linux/macros 2012-05-17 06:06:14.725072024 +0200 +@@ -0,0 +1,20 @@ ++# Per-platform rpm configuration file. ++ ++#============================================================================== ++# ---- per-platform macros. ++# ++%_arch x86_64 ++%_os linux ++%_gnu -gnu ++%_target_platform %{_arch}-%{_target_vendor}-%{_target_os}%{?_gnu} ++%optflags %{?__common_cflags_with_ssp:%{__common_cflags_with_ssp} -fPIC}%{!?__common_cflags_with_ssp:-Os -g -mx32 -march=atom -mtune=core-avx-i} ++ ++#============================================================================== ++# ---- configure macros. ++# ++%_lib lib32 ++ ++#--------------------------------------------------------------------- ++# Multilibs ++%_multilibno 1 ++%_multilibpatt (/%{_lib}|/usr/%{_lib}(|/gconv)|/usr/local/%{_lib}|/usr/X11R6/%{_lib}|/opt/%{_lib})/[^/]*\\.([oa]|la|so[0-9.]*)$ diff --git a/rpm-5.4.9-avoid-dependencies-on-self.patch b/rpm-5.4.9-avoid-dependencies-on-self.patch new file mode 100644 index 0000000..8a3ea13 --- /dev/null +++ b/rpm-5.4.9-avoid-dependencies-on-self.patch @@ -0,0 +1,85 @@ +--- 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 new file mode 100644 index 0000000..7535c34 --- /dev/null +++ b/rpm-5.4.9-avoid-double-slash-in-path-for-dirname-filetrigger-matching.patch @@ -0,0 +1,23 @@ +--- 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 new file mode 100644 index 0000000..05e6259 --- /dev/null +++ b/rpm-5.4.9-disable-l10ndir.patch @@ -0,0 +1,11 @@ +--- 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-disable-support-for-i18nstring-type.patch b/rpm-5.4.9-disable-support-for-i18nstring-type.patch new file mode 100644 index 0000000..b64809f --- /dev/null +++ b/rpm-5.4.9-disable-support-for-i18nstring-type.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.9/system.h.no18n~ 2012-05-18 08:09:33.444289007 +0200 ++++ rpm-5.4.9/system.h 2012-05-18 08:09:35.991304560 +0200 +@@ -741,7 +741,7 @@ static inline const char *rcsid(const ch + /** + * Eliminate RPM_I18NSTRING_TYPE. + */ +-#define SUPPORT_I18NSTRING_TYPE 1 ++#define SUPPORT_I18NSTRING_TYPE 0 + + /** + * Eliminate signature/digest disablers. diff --git a/rpm-5.4.9-ditch-install-info-macros.patch b/rpm-5.4.9-ditch-install-info-macros.patch new file mode 100644 index 0000000..08a6b23 --- /dev/null +++ b/rpm-5.4.9-ditch-install-info-macros.patch @@ -0,0 +1,18 @@ +--- rpm-5.4.9/macros/mandriva.in.install_info~ 2012-05-30 21:11:09.893734550 +0200 ++++ rpm-5.4.9/macros/mandriva.in 2012-05-30 21:11:12.643700170 +0200 +@@ -141,15 +141,6 @@ end\ + %_extension .xz + + +-%__install_info /sbin/install-info +- +-%_install_info() if [[ -f %{_infodir}/%{1}%{_extension} ]]; then %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir; fi \ +-%{nil} +-# (nb: keep the "alone on its line ';'") +-%_remove_install_info() if [ "$1" = "0" ]; then if [[ -f %{_infodir}/%{1}%{_extension} ]]; then %{__install_info} %{_infodir}/%{1}%{_extension} --dir=%{_infodir}/dir --remove ; fi; fi \ +-%{nil} +- +- + # Macro: %{mklibname [ []] [-s] [-d]} + # - %{mklibname test} => lib64test, on a lib64 platform + # - %{mklibname test 1 -d} => libtest1-devel diff --git a/rpm-5.4.9-dont-add-versioneddependency-rpmlib-feature-dependency.patch b/rpm-5.4.9-dont-add-versioneddependency-rpmlib-feature-dependency.patch new file mode 100644 index 0000000..9b62123 --- /dev/null +++ b/rpm-5.4.9-dont-add-versioneddependency-rpmlib-feature-dependency.patch @@ -0,0 +1,40 @@ +--- rpm-5.4.9/lib/rpmfc.c.no_verdepfeat~ 2012-05-15 03:02:42.578268986 +0200 ++++ rpm-5.4.9/lib/rpmfc.c 2012-05-15 03:03:46.035612993 +0200 +@@ -504,19 +504,6 @@ assert(EVR != NULL); + if (_filter_values && rpmfcMatchRegexps(mire, nmire, N, deptype)) + continue; + +- /* Add tracking dependency for versioned Provides: */ +- if (!fc->tracked && deptype == 'P' && *EVR != '\0') { +- static evrFlags _Flags = (evrFlags) +- (RPMSENSE_RPMLIB|(RPMSENSE_LESS|RPMSENSE_EQUAL)); +- ds = rpmdsSingle(RPMTAG_REQUIRENAME, +- "rpmlib(VersionedDependencies)", "3.0.3-1", +- _Flags); +- xx = rpmdsMerge(&fc->requires, ds); +- (void)rpmdsFree(ds); +- ds = NULL; +- fc->tracked = 1; +- } +- + ds = rpmdsSingle(tagN, N, EVR, Flags); + + #if defined(RPM_VENDOR_MANDRIVA) /* filter-overlapping-dependencies */ +@@ -2022,7 +2009,6 @@ rpmRC rpmfcGenerateDepends(void * _spec, + fc = rpmfcNew(); + fc->skipProv = !pkg->autoProv; + fc->skipReq = !pkg->autoReq; +- fc->tracked = 0; + + { const char * buildRootURL; + const char * buildRoot; +--- rpm-5.4.9/lib/rpmfc.h.no_verdepfeat~ 2012-04-22 19:07:07.000000000 +0200 ++++ rpm-5.4.9/lib/rpmfc.h 2012-05-15 03:02:42.609269153 +0200 +@@ -76,7 +76,6 @@ struct rpmfc_s { + size_t ix; /*!< current file index */ + int skipProv; /*!< Don't auto-generate Provides:? */ + int skipReq; /*!< Don't auto-generate Requires:? */ +- int tracked; /*!< Versioned Provides: tracking dependency added? */ + size_t brlen; /*!< strlen(spec->buildRoot) */ + + ARGV_t fn; /*!< (no. files) file names */ diff --git a/rpm-5.4.9-dont-remap-i18n-strings-if-enabled.patch b/rpm-5.4.9-dont-remap-i18n-strings-if-enabled.patch new file mode 100644 index 0000000..c33008b --- /dev/null +++ b/rpm-5.4.9-dont-remap-i18n-strings-if-enabled.patch @@ -0,0 +1,14 @@ +--- rpm-5.4.9/rpmdb/tagname.c.i18n_str~ 2012-05-18 07:27:53.216728091 +0200 ++++ rpm-5.4.9/rpmdb/tagname.c 2012-05-18 08:08:19.766839174 +0200 +@@ -493,7 +493,11 @@ void tagTypeValidate(HE_t he) + { + /* XXX Re-map RPM_I18NSTRING_TYPE -> RPM_STRING_TYPE */ + if (he->t == RPM_I18NSTRING_TYPE) ++#if !defined(SUPPORT_I18NSTRING_TYPE) + he->t = RPM_STRING_TYPE; ++#else ++ return; ++#endif + + /* XXX Arbitrary tags are always strings. */ + if ((he->tag & 0x40000000) diff --git a/rpm-5.4.9-drop-dead-cputoolize-macro.patch b/rpm-5.4.9-drop-dead-cputoolize-macro.patch new file mode 100644 index 0000000..521cc6d --- /dev/null +++ b/rpm-5.4.9-drop-dead-cputoolize-macro.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.9/macros/mandriva.in.cputoolize~ 2012-05-30 19:54:36.169164010 +0200 ++++ rpm-5.4.9/macros/mandriva.in 2012-05-30 19:54:37.439148132 +0200 +@@ -355,8 +355,6 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} - + %__fix_libtool_from_moving_options_after_libs @USRLIBRPM@/@RPMCANONVENDOR@/fix-libtool-from-moving-options-after-libs + %__fix_dlsearch_path_in_libtool_for_multilib @USRLIBRPM@/@RPMCANONVENDOR@/fix-dlsearch-path-in-libtool-for-multilib + +-%__cputoolize cputoolize +- + %__libtoolize_configure %{?__libtoolize:(cd $CONFIGURE_TOP; [ ! -f configure.in -a ! -f configure.ac ] || %{__libtoolize} --copy --force)} + + %ldflags %{?!_disable_ld_as_needed: -Wl,--as-needed}%{?!_disable_ld_no_undefined: -Wl,--no-undefined}%{?!_disable_ld_relro: -Wl,-z,relro}%{?!_disable_ld_O1: -Wl,-O1}%{?!_disable_ld_build_id: -Wl,--build-id}%{?!_disable_ld_enable_new_dtags: -Wl,--enable-new-dtags}%{?!_disable_hash_style_gnu: -Wl,--hash-style=gnu}%{?_hardened_flags: %_hardened_flags} diff --git a/rpm-5.4.9-find-debuginfo-strip-reloc-debug-sections.patch b/rpm-5.4.9-find-debuginfo-strip-reloc-debug-sections.patch new file mode 100644 index 0000000..3178f59 --- /dev/null +++ b/rpm-5.4.9-find-debuginfo-strip-reloc-debug-sections.patch @@ -0,0 +1,112 @@ +--- rpm-5.4.9/configure.ac.strip_reloc_debug~ 2012-05-04 10:41:08.000000000 +0200 ++++ rpm-5.4.9/configure.ac 2012-05-15 02:03:16.448634686 +0200 +@@ -625,6 +625,35 @@ AC_PATH_PROG(__STRIP, strip, %{_bindir}/ + AC_CHECK_PROGS(LIBTOOLIZE, libtoolize glibtoolize, libtoolize) + AC_SUBST(LIBTOOLIZE) + ++# check for elfutils eu-strip --reloc-debug_sections ++# elfutils-0.153 introduce the --reloc-debug-sections ++# This is a new option to eu-strip that strips ++# out/resolves relocations between .debug_* elf sections in ET_REL files. ++# This can save a lot of space for kernel module. ++# Use this option in find-debuginfo if supported ++# Check also for the eu_strip path and AC_SUBST it if found ++# not used really today ++old_PATH=$PATH ++PATH=$MYPATH ++AC_CACHE_CHECK([whether eu-strip supports --reloc-debug-sections], [ac_cv_path_EU_STRIP], ++ [AC_PATH_PROGS_FEATURE_CHECK([EU_STRIP], [eu-strip strip], ++ [[eu_stripout=`$ac_path_EU_STRIP --help | grep "\--reloc-debug-sections"` ++ test "x$eu_stripout" != x \ ++ && ac_cv_path_EU_STRIP=$ac_path_EU_STRIP debuginfo_eu_strip_reloc_debug_sections="-r"]], ++ [[ debuginfo_eu_strip_reloc_debug_sections="" ]] ++)]) ++PATH=$old_PATH ++AC_SUBST([debuginfo_eu_strip_reloc_debug_sections]) ++AS_IF([test "x$ac_cv_path_EU_STRIP" != x], [ ++ AC_SUBST([EU_STRIP], [$ac_cv_path_EU_STRIP]) ++], [ ++ AC_SUBST([EU_STRIP], [:]) ++ AC_MSG_RESULT([no]) ++]) ++ ++ ++ ++ + dnl # check for id -u + AC_MSG_CHECKING(whether id supports -u) + if ${__ID} -u 2>&1 > /dev/null; then +--- rpm-5.4.9/macros/macros.in.strip_reloc_debug~ 2012-05-15 02:03:16.377634331 +0200 ++++ rpm-5.4.9/macros/macros.in 2012-05-15 02:03:16.449634691 +0200 +@@ -148,7 +148,7 @@ + # the script. See the script for details. + # + %__debug_install_post \ +- %{_rpmhome}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} "%{_builddir}/%{?buildsubdir}"\ ++ %{_rpmhome}/find-debuginfo.sh %{?_missing_build_ids_terminate_build:--strict-build-id} %{?_find_debuginfo_opts} @debuginfo_eu_strip_reloc_debug_sections@ "%{_builddir}/%{?buildsubdir}"\ + %{nil} + + # Template for debug information sub-package. +--- rpm-5.4.9/macros/macros.rpmbuild.in.strip_reloc_debug~ 2011-10-21 17:39:02.000000000 +0200 ++++ rpm-5.4.9/macros/macros.rpmbuild.in 2012-05-15 02:03:16.450634696 +0200 +@@ -21,6 +21,7 @@ + %__ranlib @RANLIB@ + %__remsh %{__rsh} + %__strip @__STRIP@ ++%__eu_strip @__EU_STRIP@ + + # XXX avoid failures if tools are not installed when rpm is built. + %__libtoolize @LIBTOOLIZE@ +--- rpm-5.4.9/scripts/find-debuginfo.sh.strip_reloc_debug~ 2012-05-08 05:10:17.000000000 +0200 ++++ rpm-5.4.9/scripts/find-debuginfo.sh 2012-05-15 02:04:42.628066270 +0200 +@@ -2,7 +2,7 @@ + #find-debuginfo.sh - automagically generate debug info and file list + #for inclusion in an rpm spec file. + # +-# Usage: find-debuginfo.sh [--strict-build-id] [-g] ++# Usage: find-debuginfo.sh [--strict-build-id] [-g] [-r] + # [-o debugfiles.list] + # [[-l filelist]... [-p 'pattern'] -o debuginfo.list] + # [builddir] +@@ -18,12 +18,16 @@ + # the -l filelist file, or whose names match the -p pattern. + # The -p argument is an egrep-style regexp matching the a file name, + # and must not use anchors (^ or $). ++# The -r flag says to use eu-strip --reloc-debug-sections. + # + # All file names in switches are relative to builddir (. if not given). + # + + # With -g arg, pass it to strip on libraries. + strip_g=false ++# with -r arg, pass --reloc-debug-sections to eu-strip. ++strip_r=false ++ + + # Barf on missing build IDs. + strict=false +@@ -40,6 +44,9 @@ while [ $# -gt 0 ]; do + -g) + strip_g=true + ;; ++ -r) ++ strip_r=true ++ ;; + -o) + if [ -z "${lists[$nout]}" -a -z "${ptns[$nout]}" ]; then + out=$2 +@@ -90,12 +97,13 @@ debugdir="${RPM_BUILD_ROOT}/usr/lib/debu + strip_to_debug() + { + local g= ++ $strip_r && r=--reloc-debug-sections + $strip_g && case "$(file -bi "$2")" in + application/x-sharedlib*) g=-g ;; + esac + [ -n "$EXCLUDE_FULL_REGEXP" ] && grep -E -q "$EXCLUDE_FULL_REGEXP" <<< "$2" && g=-g + +- eu-strip --remove-comment $g $([ -n "$DISABLE_DEBUG" ] || echo -f "$1") "$2" || exit ++ eu-strip --remove-comment $g $([ -n "$DISABLE_DEBUG" ] || echo $r -f "$1") "$2" || exit + [ -n "$DISABLE_DEBUG" ] || chmod 444 "$1" || exit + } + diff --git a/rpm-5.4.9-fix-mdvbz62979.patch b/rpm-5.4.9-fix-mdvbz62979.patch new file mode 100644 index 0000000..eeb2797 --- /dev/null +++ b/rpm-5.4.9-fix-mdvbz62979.patch @@ -0,0 +1,18 @@ +--- rpm-5.4.9/build/parseDescription.c.mdvbz62979~ 2012-05-03 20:39:51.000000000 +0200 ++++ rpm-5.4.9/build/parseDescription.c 2012-05-15 01:55:31.332318888 +0200 +@@ -92,6 +92,7 @@ int parseDescription(Spec spec) + } + + /* Lose the inheirited %description (if present). */ ++#if !defined(RPM_VENDOR_MANDRIVA) /* mdvbz#62979 */ + if (spec->packages->header != pkg->header) { + he->tag = RPMTAG_DESCRIPTION; + xx = headerGet(pkg->header, he, 0); +@@ -99,6 +100,7 @@ int parseDescription(Spec spec) + if (xx && he->t == RPM_STRING_TYPE) + xx = headerDel(pkg->header, he, 0); + } ++#endif + + t = stashSt(spec, pkg->header, RPMTAG_DESCRIPTION, lang); + diff --git a/rpm-5.4.9-fix-rpm_qa-pattern.patch b/rpm-5.4.9-fix-rpm_qa-pattern.patch new file mode 100644 index 0000000..76ce249 --- /dev/null +++ b/rpm-5.4.9-fix-rpm_qa-pattern.patch @@ -0,0 +1,11 @@ +--- 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-russian-typo.patch b/rpm-5.4.9-fix-russian-typo.patch new file mode 100644 index 0000000..b5bf51a --- /dev/null +++ b/rpm-5.4.9-fix-russian-typo.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.9/po/ru.po.ru~ 2012-05-08 05:34:29.000000000 +0200 ++++ rpm-5.4.9/po/ru.po 2012-05-15 01:48:04.461117188 +0200 +@@ -3029,7 +3029,7 @@ msgstr "(ÕÓÔÁÎÏ×ÌÅÎ)" + #: lib/rpmps.c:305 + #, c-format + msgid "%s conflicts with %s%s" +-msgstr "%s ËÏÎÆÌÉËÔÕÅÔ Ó%s%s" ++msgstr "%s ËÏÎÆÌÉËÔÕÅÔ Ó %s%s" + + #: lib/rpmps.c:311 + #, fuzzy, c-format diff --git a/rpm-5.4.9-fix-typo-in-rpmtag-header.patch b/rpm-5.4.9-fix-typo-in-rpmtag-header.patch new file mode 100644 index 0000000..ef1685b --- /dev/null +++ b/rpm-5.4.9-fix-typo-in-rpmtag-header.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.9/rpmdb/rpmtag.h.typo~ 2012-05-03 20:39:52.000000000 +0200 ++++ rpm-5.4.9/rpmdb/rpmtag.h 2012-05-18 05:30:09.780867642 +0200 +@@ -948,7 +948,7 @@ Header headerCopyLoad(const void * uh) + int headerIsEntry(/*@null@*/ Header h, rpmTag tag) + /*@*/; + +-#if defined(SUPPORT_I18BSTRING_TYPE) ++#if defined(SUPPORT_I18NSTRING_TYPE) + /** \ingroup header + * Add locale specific tag to header. + * A NULL lang is interpreted as the C locale. Here are the rules: diff --git a/rpm-5.3.12-fix-verify-segfault.patch b/rpm-5.4.9-fix-verify-segfault.patch similarity index 50% rename from rpm-5.3.12-fix-verify-segfault.patch rename to rpm-5.4.9-fix-verify-segfault.patch index 598eba4..e457b5e 100644 --- a/rpm-5.3.12-fix-verify-segfault.patch +++ b/rpm-5.4.9-fix-verify-segfault.patch @@ -1,9 +1,9 @@ ---- rpm-5.3.12/rpmio/rpmhkp.c 2010-10-12 01:56:41.000000000 +0400 -+++ rpm-5.3.12/rpmio/rpmhkp.c 2012-03-29 12:56:02.322614316 +0400 -@@ -878,6 +878,14 @@ +--- 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'; - rpmRC rpmhkpValidate(rpmhkp hkp, const char * keyname) - { + /*Reset all the temporary variables*/ + hkp->pubx = -1; + hkp->uidx = -1; @@ -12,10 +12,10 @@ + hkp->tvalid = 0; + hkp->uvalidx = -1; + - pgpPkt pp = alloca(sizeof(*pp)); - size_t pleft; - rpmRC rc = RPMRC_NOKEY; /* assume failure */ -@@ -1055,7 +1063,7 @@ + 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: diff --git a/rpm-5.4.9-font-provides.patch b/rpm-5.4.9-font-provides.patch new file mode 100644 index 0000000..e09f3c9 --- /dev/null +++ b/rpm-5.4.9-font-provides.patch @@ -0,0 +1,60 @@ +--- 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 ++# 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 haskelldeps.sh http.req \ ++ freshen.sh fontconfig.prov gendiff getpo.sh haskelldeps.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 haskelldeps.sh http.req \ ++ find-provides.perl find-requires.perl \ ++ fontconfig.prov gem_helper.rb getpo.sh haskelldeps.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-generate-haskell-dependencies.patch b/rpm-5.4.9-generate-haskell-dependencies.patch new file mode 100644 index 0000000..30266b9 --- /dev/null +++ b/rpm-5.4.9-generate-haskell-dependencies.patch @@ -0,0 +1,161 @@ +--- rpm-5.4.9/configure.ac.haskell~ 2012-05-15 02:51:07.328499989 +0200 ++++ rpm-5.4.9/configure.ac 2012-05-15 02:51:07.393500340 +0200 +@@ -2513,7 +2513,7 @@ AC_CONFIG_FILES([ po/Makefile.in + scripts/Makefile + rpmdb/DB_CONFIG + macros/macros macros/macros.rpmbuild +- macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool ++ macros/cmake macros/gstreamer macros/haskell macros/java macros/kernel macros/libtool + macros/mandriva macros/suse macros/fedora macros/mono macros/perl macros/pkgconfig macros/php + macros/python macros/ruby macros/selinux macros/tcl + doc/Makefile +--- rpm-5.4.9/macros/haskell.in.haskell~ 2012-05-15 02:51:07.395500350 +0200 ++++ rpm-5.4.9/macros/haskell.in 2012-05-15 02:51:07.395500350 +0200 +@@ -0,0 +1,69 @@ ++# Ruby specific macro definitions. ++# To make use of these macros insert the following line into your spec file: ++# %{load:%{_usrlibrpm}/macros.d/haskell} ++ ++# Path to scripts to autogenerate haskell package dependencies, ++# ++# Note: Used iff _use_internal_dependency_generator is non-zero. The ++# helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}. ++%__haskell_provides %{_rpmhome}/haskelldeps.sh --provides ++%__haskell_requires %{_rpmhome}/haskelldeps.sh --requires ++ ++# How is named the Setup.?hs ++%_cabal_setup %{?cabal_setup}%{?!cabal_setup:Setup.hs} ++ ++# which compiler (default ghc) ++%_haskell_compiler %{?haskell_compiler}%{?!haskell_compiler:runhaskell} ++ ++# The compilation step ++%_cabal_compil \ ++ %{_haskell_compiler} %{_cabal_setup} configure --prefix=%{_prefix} \ ++ %{_haskell_compiler} %{_cabal_setup} build \ ++ %{?!_no_haddock:%{_haskell_compiler} %{_cabal_setup} haddock} ++ ++# Script need to register module on the system ++%_cabal_genscripts \ ++ %{_haskell_compiler} %{_cabal_setup} register --gen-script || : \ ++ sed -i 's:/usr/bin/ghc-pkg:ghc-pkg --force:' register.sh \ ++ %{_haskell_compiler} %{_cabal_setup} unregister --gen-script || : \ ++ sed -i 's:/usr/bin/ghc-pkg:ghc-pkg --force:' unregister.sh ++ ++# post/pre scriptlet ++%_cabal_in %posttrans -f register.sh ++ ++%_cabal_un %preun -f unregister.sh ++ ++# Using script to register module during install ++%_cabal_scriptlets \ ++%_cabal_in \ ++\ ++%_cabal_un \ ++ ++# The "full" %build step ++%_cabal_build \ ++ %_cabal_compil \ ++ %_cabal_genscripts ++ ++# The "full" %install step ++%_cabal_install \ ++ %{_haskell_compiler} %{_cabal_setup} copy --destdir=%{buildroot} \ ++ ++# The "full" %check step ++%_cabal_check \ ++ %{_haskell_compiler} %{_cabal_setup} test ++ ++%_cabal_rpm_deps_dir %_datadir/haskell-deps ++ ++%_cabal_pkg_deps_dir %_cabal_rpm_deps_dir/%name-%version-%release ++ ++%_cabal_rpm_gen_deps \ ++mkdir -p %{buildroot}%{_cabal_pkg_deps_dir} \ ++touch %{buildroot}%{_cabal_pkg_deps_dir}/{provides,requires} \ ++find . -name "*.cabal" | xargs cabalrpmprov > %{buildroot}%{_cabal_pkg_deps_dir}/provides \ ++cabalrpmreq > %{buildroot}%{_cabal_pkg_deps_dir}/requires \ ++ ++%_cabal_rpm_files \ ++%_cabal_pkg_deps_dir ++ ++%_cabal_haddoc_files \ ++%{?!_no_haddock:%doc dist/doc/html} +--- rpm-5.4.9/Makefile.am.haskell~ 2012-03-17 01:24:19.000000000 +0100 ++++ rpm-5.4.9/Makefile.am 2012-05-15 02:51:09.049509318 +0200 +@@ -116,9 +116,9 @@ pkgbin_SCRIPTS = install-sh mkinstalldir + + pkgcfgdir = $(pkgdatadir)/macros.d + pkgcfg_DATA = \ +- macros/cmake macros/gstreamer macros/java macros/kernel macros/libtool \ +- macros/mandriva macros/mono macros/perl macros/pkgconfig macros/php \ +- macros/python macros/ruby macros/selinux macros/tcl ++ macros/cmake macros/haskell macros/gstreamer macros/java macros/kernel \ ++ macros/libtool macros/mandriva macros/mono macros/perl macros/pkgconfig \ ++ macros/php macros/python macros/ruby macros/selinux macros/tcl + + noinst_HEADERS = build.h debug.h system.h + +--- rpm-5.4.9/scripts/haskelldeps.sh.haskell~ 2012-05-15 02:51:09.050509324 +0200 ++++ rpm-5.4.9/scripts/haskelldeps.sh 2012-05-15 02:51:09.050509324 +0200 +@@ -0,0 +1,40 @@ ++#!/bin/sh ++ ++# Haskell dependency extractor. ++# ++# Author(s): Olivier Thauvin ++# Per Øyvind Karlsen ++# ++ ++provides=0 ++requires=0 ++ ++while [ "$#" -ne 0 ]; do ++ case $1 in ++ -P|--provides) ++ provides=1 ++ ;; ++ -R|--requires) ++ requires=1 ++ ;; ++ esac ++ shift ++done ++ ++finddeps () { ++ while read file; do ++ case "$file" in ++ */usr/share/haskell-deps/*/$1) ++ cat "$file" | grep -v '^\s*$' ++ ;; ++ esac ++ done ++} ++ ++if [ $provides -eq 1 ]; then ++ finddeps provides ++fi ++ ++if [ $requires -eq 1 ]; then ++ finddeps requires ++fi +--- rpm-5.4.9/scripts/Makefile.am.haskell~ 2012-05-04 10:38:44.000000000 +0200 ++++ rpm-5.4.9/scripts/Makefile.am 2012-05-15 02:51:09.050509324 +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 gendiff getpo.sh haskelldeps.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 \ +@@ -56,7 +56,7 @@ pkgdata_SCRIPTS = \ + 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-requires.perl gem_helper.rb getpo.sh haskelldeps.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 new file mode 100644 index 0000000..6e1d61d --- /dev/null +++ b/rpm-5.4.9-keep-loading-script-macros.patch @@ -0,0 +1,81 @@ +--- 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} ++%{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 new file mode 100644 index 0000000..b2d3f32 --- /dev/null +++ b/rpm-5.4.9-mire-fix-strings-lacking-null-terminator.patch @@ -0,0 +1,32 @@ +--- 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.3.8-no-doc-conflicts.patch b/rpm-5.4.9-no-doc-conflicts.patch similarity index 74% rename from rpm-5.3.8-no-doc-conflicts.patch rename to rpm-5.4.9-no-doc-conflicts.patch index 638e04d..a6c185f 100644 --- a/rpm-5.3.8-no-doc-conflicts.patch +++ b/rpm-5.4.9-no-doc-conflicts.patch @@ -1,5 +1,5 @@ ---- rpm-5.3.8/lib/transaction.c.doc_conflicts~ 2011-01-18 23:27:15.243131004 +0100 -+++ rpm-5.3.8/lib/transaction.c 2011-01-18 23:34:38.430131002 +0100 +--- rpm-5.4.9/lib/transaction.c.doc_conflicts~ 2012-04-26 20:36:19.000000000 +0200 ++++ rpm-5.4.9/lib/transaction.c 2012-05-15 01:46:37.964693880 +0200 @@ -68,6 +68,24 @@ /*@access IDTX @*/ /*@access FD_t @*/ @@ -22,10 +22,10 @@ +} +#endif + - static int handleInstInstalledFile(const rpmts ts, rpmte p, rpmfi fi, - Header otherHeader, rpmfi otherFi, - int beingRemoved) -@@ -117,6 +135,17 @@ static int handleInstInstalledFile(const + #ifdef __cplusplus + + #define FF_ISSET(_fflags, _FLAG) ((_fflags) & (RPMFILE_##_FLAG)) +@@ -164,6 +182,17 @@ static int handleInstInstalledFile(const } } @@ -41,9 +41,9 @@ +#endif + if (rConflicts) { - HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he)); + HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he)); rpmps ps = rpmtsProblems(ts); -@@ -381,6 +410,17 @@ assert(otherFi != NULL); +@@ -429,6 +458,17 @@ assert(otherFi != NULL); done = 1; } diff --git a/rpm-5.3.8-non-pre-scripts-dont-fail.patch b/rpm-5.4.9-non-pre-scripts-dont-fail.patch similarity index 69% rename from rpm-5.3.8-non-pre-scripts-dont-fail.patch rename to rpm-5.4.9-non-pre-scripts-dont-fail.patch index 871b3f8..5200a98 100644 --- a/rpm-5.3.8-non-pre-scripts-dont-fail.patch +++ b/rpm-5.4.9-non-pre-scripts-dont-fail.patch @@ -1,6 +1,6 @@ ---- rpm-5.3.8/lib/psm.c.scriptlet~ 2011-01-09 07:18:14.000000000 +0100 -+++ rpm-5.3.8/lib/psm.c 2011-01-19 01:04:33.070131004 +0100 -@@ -2178,6 +2178,10 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s +--- rpm-5.4.9/lib/psm.c.scriptlet~ 2012-04-19 19:26:06.000000000 +0200 ++++ rpm-5.4.9/lib/psm.c 2012-05-15 01:43:59.841922573 +0200 +@@ -2195,6 +2195,10 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage s rpmRC rc = psm->rc; int saveerrno; int xx; @@ -11,56 +11,56 @@ /* XXX hackery to assert(!scareMem) in rpmfiNew. */ /*@-castexpose@*/ -@@ -2399,11 +2403,11 @@ assert(he->p.argv != NULL); +@@ -2416,11 +2420,11 @@ assert(he->p.argv != NULL); if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERUN)) { /* Run triggers in this package other package(s) set off. */ - rc = rpmpsmNext(psm, PSM_IMMED_TRIGGERS); + rc = (rpmRC) rpmpsmNext(psm, PSM_IMMED_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; /* Run triggers in other package(s) this package sets off. */ - rc = rpmpsmNext(psm, PSM_TRIGGERS); + rc = (rpmRC) rpmpsmNext(psm, PSM_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; } if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPREUN)) -@@ -2743,16 +2747,16 @@ assert(psm->te != NULL); +@@ -2759,16 +2763,16 @@ assert(psm->te != NULL); if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOST)) { - rc = rpmpsmNext(psm, PSM_SCRIPT); + rc = (rpmRC) rpmpsmNext(psm, PSM_SCRIPT); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; } if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERIN)) { /* Run triggers in other package(s) this package sets off. */ - rc = rpmpsmNext(psm, PSM_TRIGGERS); + rc = (rpmRC) rpmpsmNext(psm, PSM_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; /* Run triggers in this package other package(s) set off. */ - rc = rpmpsmNext(psm, PSM_IMMED_TRIGGERS); + rc = (rpmRC) rpmpsmNext(psm, PSM_IMMED_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; } /* -@@ -2785,17 +2789,17 @@ assert(psm->te != NULL); +@@ -2801,17 +2805,17 @@ assert(psm->te != NULL); if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOSTUN)) { - rc = rpmpsmNext(psm, PSM_SCRIPT); + rc = (rpmRC) rpmpsmNext(psm, PSM_SCRIPT); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; } if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERPOSTUN)) { /* Run triggers in other package(s) this package sets off. */ - rc = rpmpsmNext(psm, PSM_TRIGGERS); + rc = (rpmRC) rpmpsmNext(psm, PSM_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; /* Run triggers in this package other package(s) set off. */ - rc = rpmpsmNext(psm, PSM_IMMED_TRIGGERS); + rc = (rpmRC) rpmpsmNext(psm, PSM_IMMED_TRIGGERS); - if (rc) break; + if(rc && !non_pre_scripts_dont_fail) break; } diff --git a/rpm-5.4.9-package-name.patch b/rpm-5.4.9-package-name.patch new file mode 100644 index 0000000..53fc301 --- /dev/null +++ b/rpm-5.4.9-package-name.patch @@ -0,0 +1,13 @@ +diff -urN rpm-5.4.9/macros/macros.rpmbuild.in rpm-5.4.9-patched/macros/macros.rpmbuild.in +--- rpm-5.4.9/macros/macros.rpmbuild.in 2012-08-25 12:37:14.939808237 +1100 ++++ rpm-5.4.9-patched/macros/macros.rpmbuild.in 2012-08-25 12:36:37.302808636 +1100 +@@ -303,7 +303,8 @@ + %___build_pre \ + RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\ + RPM_OPT_FLAGS=\"%{optflags}\"\ +- export RPM_BUILD_DIR RPM_OPT_FLAGS\ ++ RPM_PACKAGE_NAME=\"%{name}\"\ ++ export RPM_BUILD_DIR RPM_OPT_FLAGS RPM_PACKAGE_NAME\ + %{?buildroot:RPM_BUILD_ROOT=\"%{u2p:%{buildroot}}\"\ + export RPM_BUILD_ROOT}\ + %{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\ 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 new file mode 100644 index 0000000..f1742d7 --- /dev/null +++ b/rpm-5.4.9-rpmfc-extract-dependencies-for-all-files.patch @@ -0,0 +1,11 @@ +--- 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) }, ++ { 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) }, + #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 new file mode 100644 index 0000000..0589a54 --- /dev/null +++ b/rpm-5.4.9-rpmpython-fix-input.patch @@ -0,0 +1,11 @@ +--- 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 new file mode 100644 index 0000000..2c0ae90 --- /dev/null +++ b/rpm-5.4.9-ruby1.9-fixes.patch @@ -0,0 +1,114 @@ +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 -urN rpm-5.4.9/scripts/gem_helper.rb rpm-5.4.9-patched/scripts/gem_helper.rb +--- rpm-5.4.9/scripts/gem_helper.rb 2010-10-16 20:58:48.000000000 +1100 ++++ rpm-5.4.9-patched/scripts/gem_helper.rb 2012-08-30 18:12:11.233007114 +1100 +@@ -57,10 +57,13 @@ + argv.delete_at(0) + end + +- file_data = Zlib::GzipReader.open("metadata.gz") ++ file_data = Zlib::GzipReader.open("metadata.gz") {|io| io.read} + header = YAML::load(file_data) +- file_data.close() +- body = header.instance_variable_get :@ivars ++ body = {} ++ # I don't know any better.. :/ ++ header.instance_variables.each do |iv| ++ body[iv.to_s.gsub(/^@/,'')] = header.instance_variable_get(iv) ++ end + + require 'rubygems' + spec = Gem::Specification.from_yaml(YAML.dump(header)) +diff -urN rpm-5.4.9/scripts/rubygems.rb rpm-5.4.9-patched/scripts/rubygems.rb +--- rpm-5.4.9/scripts/rubygems.rb 2011-04-01 18:30:28.000000000 +1100 ++++ rpm-5.4.9-patched/scripts/rubygems.rb 2012-08-30 18:09:09.771009037 +1100 +@@ -30,7 +30,7 @@ + exit(1) + end + +-specpatt = Config::CONFIG["rubylibdir"].sub(Config::CONFIG["ruby_version"], ".*/specifications/.*\.gemspec$") ++specpatt = RbConfig::CONFIG["rubylibdir"].sub(RbConfig::CONFIG["ruby_version"], ".*/specifications/.*\.gemspec$") + gems = [] + ruby_versioned = false + abi_provide = false +@@ -44,17 +44,17 @@ + # package is dependent on this specific version. + # FIXME: only supports current ruby version + elsif not ruby_versioned +- if path.match(Config::CONFIG["rubylibdir"]) ++ if path.match(RbConfig::CONFIG["rubylibdir"]) + ruby_versioned = true + # even more fugly, but we make the assumption that if the package has + # this file, the package is the current ruby version, and should + # therefore provide ruby(abi) = version +- if provides and path.match(Config::CONFIG["rubylibdir"] + "/Env.rb") ++ if provides and path.match(RbConfig::CONFIG["rubylibdir"] + "/Env.rb") + abi_provide = true + end +- elsif path.match(Config::CONFIG["sitelibdir"]) ++ elsif path.match(RbConfig::CONFIG["sitelibdir"]) + ruby_versioned = true +- elsif path.match(Config::CONFIG["vendorlibdir"]) ++ elsif path.match(RbConfig::CONFIG["vendorlibdir"]) + ruby_versioned = true + end + end +@@ -63,7 +63,7 @@ + if requires or abi_provide + print "ruby(abi)" + if ruby_versioned +- print " = %s\n" % Config::CONFIG["ruby_version"] ++ print " = %s\n" % RbConfig::CONFIG["ruby_version"] + end + end + +@@ -105,7 +105,7 @@ + end + if requires + for d in spec.dependencies +- print d.requirement.to_rpm(d.name) unless d.type != :runtime ++ print d.requirement.to_rpm(d.name)[0] unless d.type != :runtime + end + for d in spec.required_rubygems_version.to_rpm("rubygems") + print d.gsub(/(rubygem\()|(\))/, "") diff --git a/rpm-5.4.9-specspo.patch b/rpm-5.4.9-specspo.patch new file mode 100644 index 0000000..2df4235 --- /dev/null +++ b/rpm-5.4.9-specspo.patch @@ -0,0 +1,122 @@ +--- rpm-5.3.13/rpmdb/hdrfmt.c 2011-03-26 15:57:24.000000000 +0300 ++++ rpm-5.3.13/rpmdb/hdrfmt.c 2012-04-16 12:32:50.588475008 +0400 +@@ -2096,102 +2096,34 @@ + /*@globals rpmGlobalMacroContext, h_errno, internalState @*/ + /*@modifies he, rpmGlobalMacroContext, internalState @*/ + { +- char * dstring = rpmExpand(_macro_i18ndomains, NULL); +- int rc = 1; /* assume failure */ +- ++ int rc = headerGet(h, he, HEADERGET_NOEXTENSION); + he->t = RPM_STRING_TYPE; +- he->p.str = NULL; +- he->c = 0; +- he->freeData = 0; +- +- if (dstring && *dstring) { +- char *domain, *de; +- const char * langval; +- const char * msgkey; +- const char * msgid; +- +- { HE_t nhe = (HE_t) memset(alloca(sizeof(*nhe)), 0, sizeof(*nhe)); +- const char * tn; +- char * mk; +- size_t nb = sizeof("()"); +- int xx; +- +- nhe->tag = RPMTAG_NAME; +- xx = headerGet(h, nhe, 0); +- /* +- * XXX Ick, tagName() is called by headerGet(), and the tagName() +- * buffer is valid only until next tagName() call. +- * For now, do the tagName() lookup after headerGet(). +- */ +- tn = tagName(he->tag); +- if (tn) nb += strlen(tn); +- if (nhe->p.str) nb += strlen(nhe->p.str); +- mk = alloca(nb); +- (void) snprintf(mk, nb, "%s(%s)", +- (nhe->p.str ? nhe->p.str : ""), (tn ? tn : "")); +- mk[nb-1] = '\0'; +- nhe->p.ptr = _free(nhe->p.ptr); +- msgkey = mk; +- } +- +- /* change to en_US for msgkey -> msgid resolution */ +- langval = getenv(language); +- (void) setenv(language, "en_US", 1); +-#if defined(ENABLE_NLS) +-/*@i@*/ ++_nl_msg_cat_cntr; +-#endif +- +- msgid = NULL; ++ if (rc){ ++ char *de, *domain, *dstring = rpmExpand(_macro_i18ndomains, NULL); ++ const char *msgid = he->p.str; ++ const char *msg; ++ + for (domain = dstring; domain != NULL; domain = de) { + de = strchr(domain, ':'); + if (de) *de++ = '\0'; +-/*@-unrecog@*/ +- msgid = dgettext(domain, msgkey); +-/*@=unrecog@*/ +- if (msgid != msgkey) break; +- } +- +- /* restore previous environment for msgid -> msgstr resolution */ +- if (langval) +- (void) setenv(language, langval, 1); +- else +- unsetenv(language); +-#if defined(ENABLE_NLS) +-/*@i@*/ ++_nl_msg_cat_cntr; +-#endif +- +- if (domain && msgid) { +-/*@-unrecog@*/ +- const char * s = dgettext(domain, msgid); +-/*@=unrecog@*/ +- if (s) { +- rc = 0; +- he->p.str = xstrdup(s); +- he->c = 1; +- he->freeData = 1; ++ msg = dgettext(domain, msgid); ++ if (msg != msgid){ ++ he->p.str = xstrdup(msg); ++ he->c = 1; ++ he->freeData = 1; ++ ++ break; + } + } ++ ++ dstring = _free(dstring); ++ return 0; + } + +-/*@-dependenttrans@*/ +- dstring = _free(dstring); +-/*@=dependenttrans@*/ +- if (!rc) +- return rc; +- +- rc = headerGet(h, he, HEADERGET_NOEXTENSION); +- if (rc) { +- rc = 0; +- he->p.str = xstrtolocale(he->p.str); +- he->freeData = 1; +- return rc; +- } +- +- he->t = RPM_STRING_TYPE; + he->p.str = NULL; + he->c = 0; + he->freeData = 0; +- ++ + return 1; + } + 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 new file mode 100644 index 0000000..8e48830 --- /dev/null +++ b/rpm-5.4.9-strip-buildroot-away-from-duplicate-files-list.patch @@ -0,0 +1,97 @@ +--- 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 new file mode 100644 index 0000000..af9e1a7 --- /dev/null +++ b/rpm-5.4.9-support-signatures-and-digest-disablers.patch @@ -0,0 +1,11 @@ +--- rpm-5.4.9/system.h.nosig~ 2012-05-16 20:52:58.216415034 +0200 ++++ rpm-5.4.9/system.h 2012-05-16 20:53:29.053598105 +0200 +@@ -746,7 +746,7 @@ static inline const char *rcsid(const ch + /** + * Eliminate signature/digest disablers. + */ +-#undef SUPPORT_NOSIGNATURES ++#define SUPPORT_NOSIGNATURES 1 + + /** + * Permit ar(1) payloads. Disabled while rpmio/iosm.c is under development. 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 new file mode 100644 index 0000000..c3b9e35 --- /dev/null +++ b/rpm-5.4.9-update-rpmfc-when-removing-dependencies-on-self.patch @@ -0,0 +1,140 @@ +--- 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) { diff --git a/rpm-5.4.9-updated-pld-mandriva-php-dep-generator.patch b/rpm-5.4.9-updated-pld-mandriva-php-dep-generator.patch new file mode 100644 index 0000000..0f9a3e7 --- /dev/null +++ b/rpm-5.4.9-updated-pld-mandriva-php-dep-generator.patch @@ -0,0 +1,245 @@ +--- rpm-5.4.9/macros/mandriva.in.php_deps~ 2012-06-28 04:25:18.070035644 +0200 ++++ rpm-5.4.9/macros/mandriva.in 2012-06-28 04:25:21.883987963 +0200 +@@ -275,8 +275,6 @@ Group: %{group}\ + # TODO: merge relevant changes into rpm version rather than using our own + %__perl_provides @USRLIBRPM@/@RPMCANONVENDOR@/perl.prov + %__perl_requires @USRLIBRPM@/@RPMCANONVENDOR@/perl.req +-%__php_provides @USRLIBRPM@/@RPMCANONVENDOR@/php.prov +-%__php_requires @USRLIBRPM@/@RPMCANONVENDOR@/php.req + + %__find_provides @USRLIBRPM@/@RPMCANONVENDOR@/filter.sh '%{?_provides_exceptions:%{_provides_exceptions}}%{!?_provides_exceptions: }' '%{?_exclude_files_from_autoprov:%{_exclude_files_from_autoprov}}%{!?_exclude_files_from_autoprov: }' '%{buildroot}' @USRLIBRPM@/@RPMCANONVENDOR@/find-provides + %__find_requires @USRLIBRPM@/@RPMCANONVENDOR@/filter.sh '%{?_requires_exceptions:%{_requires_exceptions}}%{!?_requires_exceptions: }' '%{?_exclude_files_from_autoreq:%{_exclude_files_from_autoreq}}%{!?_exclude_files_from_autoreq: }' '%{buildroot}' @USRLIBRPM@/@RPMCANONVENDOR@/find-requires %{?buildroot:%{buildroot}} %{?_target_cpu:%{_target_cpu}} +--- rpm-5.4.9/scripts/php.prov.php_deps~ 2012-06-28 04:22:17.980287076 +0200 ++++ rpm-5.4.9/scripts/php.prov 2012-06-28 04:22:33.725090237 +0200 +@@ -1,17 +1,44 @@ + #!/usr/bin/perl + ##################################################################### + # # +-# Small script to generate provides for php-pear/php-pecl # ++# Check system dependences between php-pear modules # + # # +-# Adam Go³êbiowski # +-# # +-# Somehow based on previous work by: # +-# Pawe³ Go³aszewski # ++# Pawe³ Go³aszewski # + # Micha³ Moskal # ++# ------------------------------------------------------------------# ++# TODO: # + ##################################################################### + +-# Contest: shrink this one to oneliner +-# Bonus : and fit in 80 columns ;) ++$pear = "/usr/share/pear"; ++@files = (); ++ ++ ++if ("@ARGV") { ++ foreach (@ARGV) { ++ process_file($_); ++ } ++} else { ++ ++ # notice we are passed a list of filenames NOT as common in unix the ++ # contents of the file. ++ ++ foreach (<>) { ++ chomp $_; ++ process_file($_); ++ } ++} ++ ++f: for $f (sort keys %req) { ++ print "pear($f)\n"; ++} ++ ++exit(0); ++ ++sub process_file() { ++ my ($f) = @_; ++ return unless ($f =~ /$pear.*\.php$/); + +-/package.xml/ and open(F, $_) foreach (@ARGV ? @ARGV : <> ); +-/^\s+\([a-zA-Z0-9\_]+)\<\/name\>$/ and print "php-pear-$1" while (); ++ $f =~ s/.*$pear\///; ++ push @files, $f; ++ $req{$f} = 1; ++} +--- rpm-5.4.9/scripts/php.req.php_deps~ 2012-06-28 04:22:21.478243346 +0200 ++++ rpm-5.4.9/scripts/php.req 2012-06-28 04:22:33.986086975 +0200 +@@ -1,78 +1,108 @@ +-#!/usr/bin/perl -W ++#!/usr/bin/perl + ##################################################################### + # # +-# Check system dependencies between php-pear/php-pecl modules # ++# Check system dependences between php-pear modules # + # # +-# Adam Go³êbiowski # +-# # +-# based on previous work by: # + # Pawe³ Go³aszewski # +-# Micha³ Moskal # +-# # +-# ----------------------------------------------------------------- # +-# ChangeLog: # +-# 20031201: complete rewrite to use PEAR's package.xml, now handles # +-# all dependencies, including PHP modules (like php-gmp), # +-# and PECL extensions (adamg) # ++# Micha³ Moskal # ++# ------------------------------------------------------------------# ++# TODO: # ++# - extension_loaded - dependencies. # ++# - some clean-up... # + ##################################################################### + +-@req_arr = (); +-$fname = '/dev/null'; +-foreach ( @ARGV ? $ARGV : <> ) +-{ +- $fname = $_ if (/package.xml/) ++$pear = "/usr/share/pear"; ++ ++@files = (); ++%req = (); ++ ++if ("@ARGV") { ++ foreach (@ARGV) { ++ process_file($_); ++ } ++} else { ++ ++ # notice we are passed a list of filenames NOT as common in unix the ++ # contents of the file. ++ ++ foreach (<>) { ++ chomp $_; ++ process_file($_); ++ } + } + +-open F, $fname; ++f: for $f (keys %req) { ++ for $g (@files) { next f if ($g =~ /\Q$f\E$/); } ++ print "pear($f)\n"; ++} ++ ++exit(0); ++ ++sub process_file() { ++ my ($f) = @_; ++ push @files, $f; ++ ++ # skip non-php files ++ next unless ($f =~ /\.php$/); ++ ++ if (!open(F, $f)) { ++ warn("$0: Warning: Could not open file '$f' for reading: $!\n"); ++ return; ++ } ++ ++ if ($f =~ /$pear/) { ++ $file_dir = $f; ++ $file_dir =~ s|.*$pear/||; ++ $file_dir =~ s|/[^/]*$||; ++ } else { ++ $file_dir = undef; ++ } ++ ++ while () { ++ # skip comments ++ next if (/^\s*(#|\/\/|\*|\/\*)/); ++ while (/(\W|^)(require|include)(_once)? ++ \s* \(? \s* ("([^"]*)"|'([^']*)') ++ \s* \)? \s* ;/xg) { ++ ++ if ($5 ne "") { ++ $x = $5; ++ } elsif ($6 ne "") { ++ $x = $6; ++ } else { ++ next; ++ } ++ $x =~ s/\/\.?\//\//g while $x =~ /\/\.?\//; ++ $x =~ s/(\/|^)[^\/]*[^.]\/\.\.\//\1/g while $x =~ /(\/|^)[^\/]*[^.]\/\.\.\//; ++ next if ($x =~ m|^\.\.?/| or $x =~ /\$/); ++ next unless ($x =~ /\.php$/); ++ $req{$x} = 1; ++ } ++ ++ next unless (defined $file_dir); ++ ++ while (/(\W|^)(require|include)(_once)? ++ \s* \(? \s* dirname \s* \( \s* __FILE__ \s* \) \s* \. \s* ++ ("([^"]*)"|'([^']*)') ++ \s* \)? \s* ;/xg) { ++ if ($5 ne "") { ++ $x = $5; ++ } elsif ($6 ne "") { ++ $x = $6; ++ } else { ++ next; ++ } ++ ++ next unless ($x =~ /\.php$/); ++ ++ $x = "$file_dir/$x"; ++ $x =~ s/\/\.?\//\//g while $x =~ /\/\.?\//; ++ $x =~ s/(\/|^)[^\/]*[^.]\/\.\.\//\1/g while $x =~ /(\/|^)[^\/]*[^.]\/\.\.\//; ++ $req{$x} = 1; ++ } ++ } + +-while () { +- if ( /\s+\([a-zA-Z0-9\_\-]*)\=" if ( $rel eq "ge"); +- $relation = ">" if ( $rel eq "gt"); +- $relation = "=" if ( $rel eq "has"); +- # die if we were unable to substitute relations +- die "ERROR: Unexpected relation! ($rel)\n" if ( $relation eq ""); +- +- $req = ""; +- $relver = ""; +- $relver = "$relation $version" if ( $version !~ /^$/ ); +- $req = "$name $relver" if ( $type =~ /(php|prog)/ ); +- $req = "php-$name $relver" if ( $type =~ /ext/ ); +- $req = "php-pear-$name" if ( $type =~ /pkg/ ); +- +- push @req_arr, $req ++ close(F) || ++ die("$0: Could not close file: '$f' : $!\n"); + +- } + } +-for $r (@req_arr) { print "$r\n"; } diff --git a/rpm-GROUPS b/rpm-GROUPS deleted file mode 100644 index b0612a7..0000000 --- a/rpm-GROUPS +++ /dev/null @@ -1,29 +0,0 @@ -Amusements/Games -Amusements/Graphics -Applications/Archiving -Applications/Communications -Applications/Databases -Applications/Editors -Applications/Emulators -Applications/Engineering -Applications/File -Applications/Internet -Applications/Multimedia -Applications/Productivity -Applications/Publishing -Applications/System -Applications/Text -Development/Debuggers -Development/Languages -Development/Libraries -Development/System -Development/Tools -Documentation -System Environment/Base -System Environment/Daemons -System Environment/Kernel -System Environment/Libraries -System Environment/Shells -User Interface/Desktops -User Interface/X -User Interface/X Hardware Support diff --git a/rpm.rpmlintrc b/rpm.rpmlintrc new file mode 100644 index 0000000..cd0ff54 --- /dev/null +++ b/rpm.rpmlintrc @@ -0,0 +1,4 @@ +from Config import * +from os import environ + +addFilter('rpm\..*: standard-dir-owned-by-package (\(.*\) |)/var/lib/rpm') diff --git a/rpm.spec b/rpm.spec index f816613..1587239 100644 --- a/rpm.spec +++ b/rpm.spec @@ -1,20 +1,27 @@ %bcond_with bootstrap %bcond_with debug -%bcond_without ossp-uuid +%bcond_without ossp_uuid %bcond_without augeas #XXX: this macro is a bit awkward, better can be done! %if %{with bootstrap} %bcond_with perl %bcond_with python +%bcond_with tcl +%bcond_with squirrel +%bcond_with embed %bcond_with docs %bcond_with sqlite %else %bcond_without perl %bcond_without python -%bcond_without docs -%bcond_without sqlite +%bcond_without tcl +%bcond_without squirrel +%bcond_without embed +%bcond_with docs +# use what's in berkeley db +%bcond_with sqlite %endif %bcond_with notyet @@ -22,99 +29,378 @@ %bcond_without xar %bcond_without ruby %bcond_without js -%bcond_without tcl -%bcond_without embed %else %bcond_with xar %bcond_with ruby %bcond_with js -%bcond_with tcl -%bcond_with embed %endif %if %{with debug} -%define debugcflags -g -O0 +%global debugcflags %{debugcflags} -g3 -O0 %endif -#include %{_sourcedir}/bootstrap.spec +# can probably be restored now.. +%if %{with bootstrap} +#include %%{_sourcedir}/bootstrap.spec +%endif -%define bdb db51 +%define bdb db52 -%define libver 5.3 -%define minorver 12 +%define libver 5.4 +%define minorver 10 %define srcver %{libver}.%{minorver} -%define prereldate 20110712 +#define prereldate 20110712 -%define librpmname %mklibname rpm %{libver} +%define librpmname %mklibname rpm %{libver} %define librpmnamedevel %mklibname -d rpm %define librpmstatic %mklibname -d -s rpm Summary: The RPM package management system Name: rpm +Epoch: 1 Version: %{libver}.%{minorver} Release: %{?prereldate:0.%{prereldate}.}8 -Epoch: 1 +License: LGPLv2.1+ Group: System/Configuration/Packaging URL: http://rpm5.org/ - -# snapshot from rpm-5_3 branch: 'cvs -d :pserver:anonymous@rpm5.org:/cvs co -r rpm-5_3 rpm' +# snapshot from rpm-5_4 branch: 'cvs -d :pserver:anonymous@rpm5.org:/cvs co -r rpm-5_4 rpm' # tarball generated with './devtool tarball.xz' -Source0: ftp://ftp.jbj.org/pub/rpm-%{libver}.x/%{name}-%{srcver}.tar.xz +Source0: ftp://ftp.jbj.org/pub/rpm-%{libver}.x/%{name}-%{srcver}.tar.gz #Source1: bootstrap.spec -# Needed by rpmlint. Still required? If so, this file should rather be carried -# with rpmlint itself rather than requiring for rpm to carry... -Source2: rpm-GROUPS # These are a bit dated with a lot of redundant macros and many of them no # of use at all anymore! Should ideally just contain the macros different # from the default; _arch, optflags, _lib & _multilib*. # stripping away the rest (along with os specificity) and create a resulting # cpu-macros.tar.gz to push upstream would seem like a sane improvement. +Source2: rpm.rpmlintrc Source3: cpu-os-macros.tar.gz Source4: legacy_compat.macros # already merged upstream Patch0: rpm-5.3.8-set-default-bdb-log-dir.patch # TODO: should be disable for cooker, packaging needs to be fixed (enable for legacy compatibility) +# status: to be removed later.. Patch1: rpm-5.3.8-dependency-whiteout.patch # TODO: make conditional & disabled through macro by default (enable for legacy compatibility) -Patch2: rpm-5.3.8-non-pre-scripts-dont-fail.patch -Patch3: rpm-5.3.8-no-doc-conflicts.patch +# status: to be removed later +Patch2: rpm-5.4.9-non-pre-scripts-dont-fail.patch +# status: to be removed later +Patch3: rpm-5.4.9-no-doc-conflicts.patch # if distsuffix is defined, use it for disttag (from Anssi) +# status: merged upstream IIRC, could probably be dropped Patch4: rpm-5.3.8-disttag-distsuffix-fallback.patch # ugly hack to workaround disttag/distepoch pattern matching issue to buy some # time to come up with better pattern fix.. +# status: needs to be fixed properly, but can be merged upstream Patch5: rpm-5.3.8-distepoch-pattern-hack.patch # fixes a typo in russian translation (#62333) -Patch11: rpm-5.3.8-fix-russian-typo.patch +# status: needs to be pushed back to the Russian i18n project +Patch11: rpm-5.4.9-fix-russian-typo.patch # temporary workaround for issues with file triggers firing multiple times and # a huge memleak... +# DIE Patch15: rpm-5.3.8-fire-file-triggers-only-once.patch -Patch19: rpm-5.3.10-doxygen-1.7.4-bug.patch -Patch20: rpm-5.3.11-fix-syslog-b0rkage.patch +# status: keep as mandriva specific for now Patch21: rpm-5.3.12-change-dep-loop-errors-to-warnings.patch +# status: need to be revisited and made sure that we get the correct behaviour, +# regression tests certainly required Patch22: rpm-5.3.12-55810-rpmevrcmp-again-grf.patch -Patch23: rpm-5.3.12-fix-verify-segfault.patch -Patch24: rpm-5.3.12-cve-2012-0815,0060,0061.patch -Patch25: rpm-5.3.12.vendor.ROSA.patch +# status: ready to merge, it's already been merged on HEAD, so commiting it to rpm-5_4 +# would basically just mean backporting it.. +Patch29: rpm-5.4.4-add-_specfile-macro.patch +# status: ready for merge +Patch31: rpm-5.4.9-fix-rpm_qa-pattern.patch +# uhm.. broken? +# status: this one was fixed for real in 5.3.12, but I forgot commiting it +# on rpm-5_4 branch back then, and I've been unable to remember and not +# bothered figuring out what was wrong.. +Patch32: rpm-5.4.4-really-always-invoke-clean-at-end.patch +# status: i18n strings is getting dropped, so this one might be of less relevance, +# but feel free to discuss it on rpm-devel +Patch33: rpm-5.4.9-fix-mdvbz62979.patch +# This patch adds support for untangling dependency loops with prioritized removal +# of dependencies from loops. It's very crude for now and certainly needs some obvious +# improvement, but it'll fix the most common scenario giving issues where ie. +# Requires(post) has been used and shouldn't introduce any regressions.. +# REF: http://rpm5.org/community/rpm-devel/4633.html +# status: needs to be finished and probably rewrite the implementation, +# so keep locally for now, but feel free to discuss it on rpm-devel if you run out +# of things to do.. :p +Patch34: rpm-5.4.4-use-dependency-type-for-ordering.patch +# status: needs to be cleaned up and properly reviewed together with rest +# of the patches related to dependency generation +Patch37: rpm-5.4.9-avoid-dependencies-on-self.patch +# status: probably ready to merge +Patch40: rpm-5.4.4-pkgconfigdeps-check-path.patch +# status: probably okay to merge, but discuss on rpm-devel first +Patch42: rpm-5.4.4-glob-wildcards-for-loading-macro-files.patch +# status: needs to be discussed +Patch46: rpm-5.4.4-allow-installation-of-repackaged-rpms.patch +# status: same as for other dependency generation related patches +Patch47: rpm-5.4.4-fix-removal-of-overlapping-dependencies.patch +# status: ready to merge +Patch48: rpm-5.4.8-dont-show-suggests-with-requires.patch +# backport from HEAD +# status: almost ready for merge, the strip reloc flag to debugedit needs to be made +# conditional first in order to not break backwards compatibility with older elfutils versions +Patch55: rpm-5.4.9-find-debuginfo-strip-reloc-debug-sections.patch +# status: ready for merge +Patch61: rpm-5.4.4-fix-same-package-with-epoch-possible-to-upgrade.patch +# status: ready for merge +Patch63: rpm-5.4.9-strip-buildroot-away-from-duplicate-files-list.patch +# status: probably okay to merge, but discuss on rpm-devel first +Patch64: rpm-5.4.10-duplicate_files_terminate_build.patch +# status: same as above +Patch65: rpm-5.4.10-unpackaged_subdirs_terminate_build.patch +# mdvbz#64898 +# status: uncertain, might be okay to merge, discuss on rpm-devel first +Patch66: rpm-5.4.4-rpmbuild-withoutclean.patch +# status: ready for merge +Patch67: rpm-5.4.4-find-debuginfo-avoid-excessive-output-from-eu-strip.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 +Patch69: rpm-5.4.4-drop-useless-auto-generated-pkgconfig-dependency.patch +# drop dependencies such as /bin/sh which will always be satisfied by glibc's dependency on +# bash, and also on /sbin/ldconfig which always will be satisfied by glibc +# status: should *NOT* be merged +Patch70: rpm-5.4.4-drop-base-dependencies.patch +# status: ready for merge +Patch71: rpm-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.. +Patch74: rpm-5.4.4-pass-_builddir-properly-to-find-debuginfo.patch +# status: probably okay to merge, but discuss on rpm-devel first +Patch76: rpm-5.4.10-files-listed-twice-terminates-build.patch +# status: don't merge +Patch77: rpm-5.4.7-use-bdb-5.2.patch +# status: probably okay to merge +Patch78: rpm-5.4.9-ruby1.9-fixes.patch +# mdvbz#65269 +# status: same as for other dependency generation patches +Patch79: rpm-5.4.4-dont-consider-ranged-dependencies-as-overlapping-for-removal.patch +# status: ignoree for now +Patch81: rpm-5.4.5-libsql-conditional.patch +# status: same as for other dependency generation patches +Patch85: rpm-5.4.5-fix-removal-of-overlapping-dependencies-for-internal-dependency-generator.patch +# this updates to using the dependency generator shipped with mono, it has some +# issues which makes me cautious about actually merging it with rpm5 upstream, +# but we'll anyways use it as is for now to prevent any potential regressions +# by switching to the internal dependency generator +# status: shouldn't be merged as is +Patch86: rpm-5.4.5-update-mono-dependency-generator.patch +# status: probably okay to merge +Patch87: rpm-5.4.5-dont-generate-php-dependencies-only-when-executable.patch +# status: these three were lost on rpm-5_3 branch, so should be okay to merge +Patch88: rpm-5.4.5-patchset_16004.patch +Patch89: rpm-5.4.5-patchset_16005.patch +Patch90: rpm-5.4.5-patchset_16022.patch +# status: same as for other dep gen patches +Patch91: rpm-5.4.9-update-rpmfc-when-removing-dependencies-on-self.patch +# status: idem +Patch92: rpm-5.4.9-rpmfc-extract-dependencies-for-all-files.patch +# status: ready for merge +Patch93: rpm-5.4.5-rubygems-add-missing-newline.patch +# status: ugly, keep locally for now +Patch94: rpm-5.4.9-generate-haskell-dependencies.patch +# status: same as for other dep gen patches +Patch95: rpm-5.4.5-drop-some-interpreter-deps.patch +# status: probably okay to merge.. +Patch96: rpm-5.4.5-fix-elf-interpreter-resolving-breaking-uclibc-deps.patch +# status: probably okay to merge +Patch97: rpm-5.4.5-set-proper-file-color-for-scripts-using-env-in-shellbang.patch +Patch98: rpm-5.4.5-update-rpmfc-when-removing-overlapping-dependencies.patch +# status: probably okay to merge +Patch99: rpm-5.4.5-python-export-spec-macros.patch +# status: same as for other dep gen patches +Patch100: rpm-5.4.5-do-not-merge-script-dependencies-with-non-script-dependencies.patch +# status: idem +Patch101: rpm-5.4.9-font-provides.patch +# status: idem +Patch102: rpm-5.4.7-kmod-dependencies.patch +# status: idem +Patch103: rpm-5.4.5-desktop-provides.patch +# status: probably okay to merge, discuss on rpm-devel first +Patch104: rpm-5.4.5-skip-dependencies-for-character-devices.patch +# status: ready to merge +Patch105: rpm-5.4.5-rpmfc-use-strlen-not-sizeof.patch +# status: same as for other dep gen patches +Patch106: rpm-5.4.5-break-out-of-elf-link-loop.patch +# status: probably okay to merge +Patch107: rpm-5.4.5-rpmfc-apply-python-coloring-from-magic.patch +# status: same as for other dep gen patches +Patch109: rpm-5.4.5-fix-generation-of-uclibc-deps-on-non-lib64.patch +# status: idem +Patch110: rpm-5.4.7-only-generate-devel-deps-for-symlinks-start-with-lib.patch +# status: keep locally +Patch111: rpm-5.4.9-keep-loading-script-macros.patch +# status: ready for merge +Patch112: rpm-5.4.7-use-gnu-hash-style-by-default-and-drop-rtld-dep.patch +# status: keep locally only +Patch113: rpm-5.4.9-add-distepoch-rpmlib-feature.patch +# status: probably okay to merge, but discuss on rpm-devel first +Patch114: rpm-5.4.9-dont-add-versioneddependency-rpmlib-feature-dependency.patch +# status: ready to merge +Patch115: rpm-5.4.7-rpmfc-fix-invalid-free-if-not-_defaultdocdir-set.patch +# status: probably okay to merge +Patch116: rpm-5.4.10-dont-try-generate-rpmfc-dependencies-from-doc-files.patch +# status: ready to merge +Patch117: rpm-5.4.7-only-generate-ruby-and-python-deps-for-executables-and-modules.patch +# status: same as for other dep gen patches +Patch118: rpm-5.4.7-dont-generate-soname-provides-for-dsos-with-no-soname.patch +# status: ready +Patch119: rpm-5.4.7-fix-generation-of-ruby-abi-provides.patch +# status: same as for other dep gen patches +Patch120: rpm-5.4.7-print-name-of-files-removed-dependencies-are-generated-from.patch +# status: idem +Patch121: rpm-5.4.7-always-choose-equal-only-deps-when-overlapping.patch +# status: idem +Patch122: rpm-5.4.7-rpmfc-strdup-EVR-in-overlap-removal.patch +# status: idem +Patch123: rpm-5.4.7-rpmds-dont-try-fopen-empty-filenames.patch +# status: ready +Patch124: rpm-5.4.7-change-to-debuginfo-suffix.patch +# crash reproducable with 'rpm -qa --triggers' +# status: ready +Patch125: rpm-5.4.7-hdrfmt-fix-unitialized-argv-element.patch +# status: probably okay to merge, discuss on rpm-devel first +Patch126: rpm-5.4.9-add-filetriggers-regex-matching-support.patch +# status: idem +Patch127: rpm-5.4.9-add-matches-as-arguments-to-triggers.patch +# status: same as for other dep gen patches +Patch128: rpm-5.4.7-dont-consider-trigger-dependencies-as-overlapping.patch +# status: ready +Patch129: rpm-5.4.7-fix-minor-memleaks.patch +# status: ready +Patch130: rpm-5.4.9-mire-fix-strings-lacking-null-terminator.patch +# status: keep locally for now +Patch131: rpm-5.4.10-dlopen-embedded-interpreters.patch +# status: ready +Patch132: rpm-5.4.9-rpmpython-fix-input.patch +# status: same as for other dep gen patches +Patch133: rpm-5.4.7-generate-devel-provides-outside-of-libdirs.patch +# status: ready +Patch134: rpm-5.4.7-actually-perform-linking-against-internal-lua.patch +# status: ready +Patch135: rpm-5.4.7-no-seqid_init-on-rdonly-database.patch +# status: same as for other dep gen patches +Patch136: rpm-5.4.9-add-support-for-using-rpmdsMerge-with-filepath-tags.patch +# status: probably ready for merging +Patch137: rpm-5.4.9-avoid-double-slash-in-path-for-dirname-filetrigger-matching.patch +# status: unfinished +Patch138: rpm-5.4.10-trigtrans.patch +# status: probably ready to merge, discuss on rpm-devel first +Patch139: rpm-5.4.9-fix-verify-segfault.patch +# status: keep locally +Patch140: rpm-5.4.7-rpmv3-support.patch +# status: ready +Patch143: rpm-5.4.7-mono-find-requires-strip-newlines.patch +# status: ready +Patch144: rpm-5.4.8-URPM-build-fix.patch +# status: undefined +Patch145: rpm-5.4.8-add-armv7l-specific-macros.patch +# status: keep locally, might drop this one later.. +Patch146: rpm-5.4.9-support-signatures-and-digest-disablers.patch +# status: undefined +Patch147: rpm-5.4.9-add-x32-macros.patch +# status: ready and should be merged +Patch149: rpm-5.4.9-fix-typo-in-rpmtag-header.patch +# status: can be merged, but doesn't really matter as it's to be removed and +# we now anyways disable the support in question.. +Patch150: rpm-5.4.9-dont-remap-i18n-strings-if-enabled.patch +# status: just keep around and toss away when ripped out upstream... +Patch151: rpm-5.4.9-disable-support-for-i18nstring-type.patch +# lack insight on actual functionality, which anyways seems broken, so let's +# disable it to avoid errors from berkeley db.. +# status: keep locally +Patch152: rpm-5.4.9-disable-l10ndir.patch +# drop this dead macro +# status: ready +Patch154: rpm-5.4.9-drop-dead-cputoolize-macro.patch +# idem +Patch155: rpm-5.4.9-ditch-install-info-macros.patch +# the php dependency generator carried with rpm5 is based on a version from PLD +# that they've backed out later on, reverting to their older version. +# this patch replaces current upstream rpm5 version with mandriva one, which is +# based on the same as PLD currently uses. +# status: current version carried upstream seems useless and unmaintained, so +# replacing it with this one shouldn't hurt.. +Patch156: rpm-5.4.9-updated-pld-mandriva-php-dep-generator.patch +# this patch contains changes from rpm-setup & rpm.org +# status: not entirely convinced by the perl version conversion macro stuff +# in the script, which might not be upstream material, but rest of the patch +# should otherwise be sane 'nuff +Patch157: rpm-5.4.10-merge-rpm.org-and-mandriva-perl-dep-gen-changes.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.. +Patch158: rpm-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 +Patch159: rpm-5.4.10-support-ignore-arch-and-os-again.patch +Patch160: rpm-5.4.10-bump-up-to-default-xz-compression-level.patch +# fix so that we search through library dirs within buildroot for uclibc libraries +# status: same as for other dep gen patches +Patch161: rpm-5.4.10-search-through-buildroot-library-dirs-for-uclibc-deps.patch +# status: same as for other dep gen patches +Patch162: rpm-5.4.10-fix-uninitialized-variable.patch -#Fix error in rpmbuild in GTK2-based terminals -Patch26: rpm-5.3.8-rpmsq-ignored-signal-return-value.patch -# fixes Turkey locale -Patch27: rpm-5.4.4-fix-rpmconstant-to-always-use-LC_CTYPE-C-for-case-conversion.patch -# fixes work with URLs -Patch28: rpm-5.4.4-enable-rpmgio-net-transport.patch +# this patch updates the upstream brp-compress scripts, which will be replacing +# our own locally maintained compress-files script from spec-helper +# status: ready +Patch169: rpm-5.4.10-update-and-use-brp-compress.patch -License: LGPLv2.1+ -BuildRequires: autoconf >= 2.57 bzip2-devel automake >= 1.8 elfutils-devel -BuildRequires: sed >= 4.0.3 beecrypt-devel ed gettext-devel byacc -BuildRequires: neon0.27-devel rpm-%{_target_vendor}-setup-build %{?rpmsetup_version:>= %{rpmsetup_version}} -BuildRequires: readline-devel ncurses-devel openssl-devel -BuildRequires: liblzma-devel lua-devel pcre-devel acl-devel -BuildRequires: magic-devel popt-devel >= 1.15 +# ROSA stuff +Patch501: rpm-5.3.12.vendor.ROSA.patch +# Restore RPM_PACKAGE_NAME export as it's still used by aot-compile-rpm +Patch502: rpm-5.4.9-package-name.patch +# for specspo +Patch503: rpm-5.4.9-specspo.patch + +BuildRequires: autoconf >= 2.57 +BuildRequires: bzip2-devel +BuildRequires: automake >= 1.8 +BuildRequires: elfutils-devel +BuildRequires: sed >= 4.0.3 +BuildRequires: beecrypt-devel >= 4.2.1-8 +BuildRequires: ed +BuildRequires: gettext-devel +BuildRequires: byacc +BuildRequires: pkgconfig(neon) +#BuildRequires: rpm-%{_target_vendor}-setup-build +BuildRequires: rpm-mandriva-setup-build +BuildRequires: readline-devel +BuildRequires: ncurses-devel +BuildRequires: pkgconfig(libssl) +BuildRequires: pkgconfig(libcrypto) +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(libpcre) +BuildRequires: pkgconfig(libpcreposix) +BuildRequires: acl-devel +BuildRequires: magic-devel +BuildRequires: pkgconfig(popt) >= 1.15 +BuildRequires: libxml2-devel >= 2.7.8-9 +# we're now building with internal.. +#BuildRequires: pkgconfig(lua) +# needed by internal lua +BuildRequires: expat-devel %ifarch %{ix86} x86_64 ppc ppc64 ia64 -BuildRequires: cpuinfo-devel +BuildRequires: pkgconfig(libcpuinfo) %endif -BuildRequires: syck-devel keyutils-devel -BuildRequires: libgomp-devel gnutls-devel gnupg2 +BuildRequires: syck-devel +BuildRequires: keyutils-devel +BuildRequires: libgomp-devel +BuildRequires: pkgconfig(gnutls) +BuildRequires: gnupg2 # required by parts of test suite... BuildRequires: wget # Should we prefer internal xar in stead? internal xar contains at least @@ -123,7 +409,7 @@ BuildRequires: wget %if %{with xar} BuildRequires: xar-devel %endif -BuildRequires: %{bdb}-devel >= 5.1.25 +BuildRequires: %{bdb}-devel >= 5.2.36-3 # required by test suite BuildRequires: %{bdb}-utils %if %{with perl} @@ -133,36 +419,53 @@ BuildRequires: perl-devel BuildRequires: python-devel %endif %if %{with js} -BuildRequires: mozjs-devel +BuildRequires: pkgconfig(mozjs185) %endif %if %{with ruby} BuildRequires: ruby-devel %endif %if %{with tcl} -BuildRequires: tcl +BuildRequires: tcl-devel +%endif +%if %{with squirrel} +BuildRequires: squirrel-devel %endif %if %{with docs} -BuildRequires: doxygen graphviz texlive +BuildRequires: doxygen +BuildRequires: graphviz +BuildRequires: texlive %endif %if %{with sqlite} -BuildRequires: sqlite3-devel +BuildRequires: pkgconfig(sqlite3) %endif -%if %{with ossp-uuid} -BuildRequires: ossp-uuid-devel +%if %{with ossp_uuid} +BuildRequires: pkgconfig(ossp-uuid) %endif %if %{with augeas} -BuildRequires: augeas-devel +BuildRequires: pkgconfig(augeas) %endif -Requires: cpio gawk mktemp rpm-%{_target_vendor}-setup >= 1.42 update-alternatives +#BuildRequires: spec-helper >= 0.31.12 +BuildRequires: spec-helper +BuildRequires: libstdc++-static-devel +#BuildRequires: elfutils >= 0.153 +BuildRequires: elfutils >= 0.152 +BuildRequires: libtool +#BuildRequires: libtool >= 2.4.2-3 +Requires: cpio +Requires: gawk +Requires: mktemp +Requires: update-alternatives Requires: %{bdb}_recover Suggests: %{bdb}-utils Requires: %{librpmname} = %{EVRD} Conflicts: rpm-build < 1:5.3.10-0.20110422.3 -Requires(pre): rpm-helper >= 0.8 Requires(pre): coreutils -Requires(postun):rpm-helper >= 0.8 %rename rpmconstant %rename multiarch-utils +%rename rpm-manbo-setup +#rename rpm-%{_target_vendor}-setup +%rename rpm-mandriva-setup +Obsoletes: haskell-macros < 6.4-5 %description RPM is a powerful command line driven package management system capable of @@ -189,7 +492,6 @@ This package contains common files to all applications based on rpm. Summary: Development files for applications which will manipulate RPM packages Group: Development/C Requires: %{librpmname} = %{EVRD} -Provides: librpm-devel = %{EVRD} Provides: rpm-devel = %{EVRD} %rename %{_lib}rpmconstant-devel Obsoletes: %{_lib}rpm4.4-devel @@ -219,14 +521,24 @@ Requires: autoconf Requires: automake Requires: file Requires: gcc-c++ -Requires: libtool-base +Requires: libtool-base >= 2.4 Requires: patch >= 2.5.9-7 Requires: make Requires: unzip -Requires: elfutils +Requires: elfutils >= 0.152 Requires: rpm = %{EVRD} -Requires: rpm-%{_target_vendor}-setup-build +#Requires: rpm-%{_target_vendor}-setup-build +Requires: rpm-mandriva-setup-build +Requires: spec-helper >= 0.31.6 +#Requires: rpmlint-%{_target_vendor}-policy >= 0.3.2 +Requires: rpmlint-mandriva-policy +Requires: python-rpm = %{EVRD} +Requires: perl-RPM = %{EVRD} +Conflicts: rpmlint < 1.4-4 Conflicts: multiarch-utils < 1:5.3.10 +Conflicts: rpm < 1:5.4.4-32 +Obsoletes: rpm5-manbo-setup +%rename rpm-manbo-setup-build %description build This package contains scripts and executable programs that are used to @@ -259,6 +571,36 @@ The RPM Perl module provides an object-oriented interface to querying both the installed RPM database as well as files on the filesystem. %endif +%if %{with ruby} +%package -n rpm-rubyembed +Summary: Ruby embedding module for rpm +Group: Development/Ruby +Requires: ruby(abi) + +%description -n rpm-rubyembed +This package provides embedded ruby interpreter support for RPM. +%endif + +%if %{with tcl} +%package -n rpm-tclembed +Summary: Tcl embedding module for rpm +Group: Development/Other +Requires: tcl + +%description -n rpm-tclembed +This package provides embedded Tcl interpreter support for RPM. +%endif + +%if %{with squirrel} +%package -n rpm-squirrelembed +Summary: Squirrel embedding module for rpm +Group: Development/Other +Requires: squirrel + +%description -n rpm-squirrelembed +This package provides embedded Squirrel interpreter support for RPM. +%endif + %if %{with docs} %package apidocs Summary: API documentation for RPM @@ -271,32 +613,135 @@ This package contains the RPM API documentation generated in HTML format. %prep %setup -q +%patch111 -p1 -b .script_macros~ # These patches has been commited hastily upstream for review, # keeping them around here for now untill finished... %if 0 %patch0 -p1 -b .set_lg_dir~ %patch1 -p1 -b .dep_whiteout~ +%endif %patch2 -p1 -b .scriptlet~ %patch3 -p1 -b .doc_conflicts~ +%patch11 -p1 -b .ru~ +%if 0 %patch4 -p1 -b .distsuffix~ %patch5 -p1 -b .distpatt~ %patch15 -p1 -b .trigger_once~ %endif -%patch19 -p1 -b .doxygen~ -%patch20 -p1 -b .syslog~ -%patch21 -p1 -b .loop_warnings~ -%patch22 -p1 -b .55810~ -%patch23 -p1 -b .verify-segfault~ -%patch24 -p1 -b .cve-2012~ -%patch25 -p1 -%patch27 -p1 -b .locale~ -%patch28 -p1 -b .rpmgio~ +#%%patch21 -p1 -b .loop_warnings~ +#%%patch22 -p1 -b .55810~ +#patch27 -p1 -b .mdv~ +%patch29 -p1 -b .specfile~ +%patch31 -p1 -b .rpm_qa~ +#%%patch32 -p1 -b .clean~ +%patch34 -p1 -b .ordering~ +%patch37 -p1 -b .drop_deps~ +%patch40 -p1 -b .pc_paths~ +%patch42 -p1 -b .glob~ +%patch46 -p1 -b .repackage~ +%patch47 -p1 -b .overlap~ +%patch48 -p1 -b .suggests~ +%patch55 -p1 -b .strip_reloc_debug~ +%patch61 -p1 -b .epoch_cmp~ +%patch63 -p1 -b .buildroot_dups~ +%patch64 -p1 -b .dups_terminate~ +%patch65 -p1 -b .subdir_terminate~ +%patch66 -p1 -b .withoutclean~ +%patch67 -p1 -b .strip_silent~ +%patch69 -p1 -b .oneshot~ +%patch70 -p1 -b .drop_basedeps~ +%patch71 -p1 -b .locale~ +%patch74 -p1 -b .builddir~ +%patch76 -p1 -b .twice_terminate~ +%patch77 -p1 -b .db52~ +%patch78 -p1 -b .ruby19~ +%patch79 -p1 -b .range_nooverlap~ +#patch81 -p1 -b .libsql~ +%patch85 -p1 -b .int_gen_overlap~ +%patch86 -p1 -b .mono_deps_new~ +%patch87 -p1 -b .php_dep_gen~ +%patch88 -p1 -b .16004~ +%patch89 -p1 -b .16005~ +%patch90 -p1 -b .16022~ +%patch91 -p1 -b .fc_deps~ +%patch92 -p1 -b .rpmfc_ruby~ +%patch93 -p1 -b .rb_newline~ +%patch94 -p1 -b .haskell~ +%patch95 -p1 -b .interpret_deps~ +%patch96 -p1 -b .uclibc~ +%patch97 -p1 -b .env_color~ +%patch98 -p1 -b .fc_overlap~ +%patch99 -p1 -b .py_macros~ +%patch100 -p1 -b .script_overlap~ +%patch101 -p1 -b .font~ +%patch102 -p1 -b .kmod~ +%patch103 -p1 -b .desktop~ +%patch104 -p1 -b .skip_chrdev~ +%patch105 -p1 -b .sizeof~ +%patch106 -p1 -b .link_loop~ +%patch107 -p1 -b .python_color~ +%patch109 -p1 -b .uclibc_nolib64~ +%patch110 -p1 -b .req_devel~ +%patch112 -p1 -b .gnu_hash~ +%patch113 -p1 -b .depoch_rpmlib~ +%patch114 -p1 -b .no_verdepfeat~ +%patch115 -p1 -b .free~ +%patch116 -p1 -b .skip_doc~ +%patch117 -p1 -b .exec_modules~ +#patch118 -p1 -b .soname_only~ +%patch119 -p1 -b .rubyabi_prov~ +%patch120 -p1 -b .filedep_origins~ +%patch121 -p1 -b .equal_overlaps~ +%patch122 -p1 -b .strdup~ +%patch123 -p1 -b .ds_fopen~ +%patch124 -p1 -b .debuginfo~ +%patch125 -p1 -b .unitialized~ +%patch126 -p1 -b .trig_pcre~ +%patch127 -p1 -b .trigger_args~ +%patch128 -p1 -b .triggers_nooverlap~ +%patch129 -p1 -b .memleak~ +%patch130 -p1 -b .str_nul~ +%patch131 -p1 -b .dlopen~ +%patch132 -p1 -b .py_input~ +%patch133 -p1 -b .devel_prov~ +#patch134 -p1 -b .lua~ +%patch135 -p1 -b .db_rdonly~ +%patch136 -p1 -b .ds_merge~ +%patch137 -p1 -b .slash~ +#patch138 -p1 -b .trigtrans~ +%patch139 -p1 -b .fix_verify~ +#%patch140 -p1 -b .rpmv3~ +%patch143 -p1 -b .mono_newline~ +%patch144 -p1 -b .urpm~ +%patch146 -p1 -b .nosig~ +%patch147 -p1 +%patch149 -p1 -b .typo~ +%patch150 -p1 -b .i18n_str~ +%patch151 -p1 -b .noi18n~ +%patch152 -p1 -b .l10ndir~ +%patch154 -p1 -b .cputoolize~ +%patch155 -p1 -b .install_info~ +%patch156 -p1 -b .php_deps~ +%patch157 -p1 -b .perl_deps~ +%patch158 -p1 -b .dl_error~ +#patch138 -p1 -b .trigtrans~ +%patch159 -p1 -b .ignore_arch~ +%patch160 -p1 -b .xz_level~ +%patch161 -p1 -b .uclibc_buildroot~ +%patch162 -p1 -b .uninitialized~ + +%patch169 -p1 -b .brpcomp~ + +%patch501 -p1 -b .rosa_vendor~ +%patch502 -p1 -b .package_name~ +%patch503 -p1 -b .specspo~ + +#required by P55, P80, P81, P94.. +./autogen.sh mkdir -p cpu-os-macros tar -zxf %{SOURCE3} -C cpu-os-macros - -# Needed by rpmlint. -cp %{SOURCE2} GROUPS +%patch145 -p1 %build %configure2_5x --enable-nls \ @@ -335,6 +780,9 @@ cp %{SOURCE2} GROUPS %endif %if %{with tcl} --with-tcl=external \ +%endif +%if %{with squirrel} + --with-squirrel=external \ %endif --with-glob \ --without-selinux \ @@ -345,7 +793,8 @@ cp %{SOURCE2} GROUPS --with-popt=external \ --with-xz=external \ --with-bzip2=external \ - --with-lua=external \ + --with-lua=internal \ + --with-expat=external \ --with-pcre=external \ %ifarch %{ix86} x86_64 ppc ppc64 ia64 --with-cpuinfo=external \ @@ -365,15 +814,18 @@ cp %{SOURCE2} GROUPS --with-xar=%{_includedir}/xar \ %endif --with-db \ - --with-db-sql \ + --with-dbsql=external \ --without-db-tools-integrated \ %if %{with sqlite} --with-sqlite=external \ %else --without-sqlite \ %endif -%if %{with ossp-uuid} - --with-uuid=external \ +%if %{with ossp_uuid} +%if 0 +# TODO: needs to be fixed properly for automatic detection in internal lua build +%endif + --with-uuid=%{_libdir}:%{_includedir}/ossp-uuid \ %else --without-uuid \ %endif @@ -407,7 +859,7 @@ echo '#define PREMACROFILES "%{_sysconfdir}/rpm/premacros.d/*.macros"' >> config #make check %install -%makeinstall_std +%makeinstall_std -k # XXX: why isn't this installed by 'make install'? install -m755 scripts/symclash.* %{buildroot}%{_rpmhome} @@ -430,16 +882,17 @@ cat > %{buildroot}%{_sysconfdir}/%{name}/macros < %{buildroot}%{_sysconfdir}/%{name}/premacros.d/cpuinfo_target.macros <> %{name}.lang -done -for i in {0..9}; do - touch %{buildroot}/var/lib/rpm/__db.00$i - echo "%rpmdbattr /var/lib/rpm/__db.00$i" >> %{name}.lang + echo "%attr(0644, root, root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) %{_localstatedir}/lib/rpm/$dbi" >> %{name}.lang done install -d %{buildroot}/bin @@ -472,39 +920,48 @@ mv %{buildroot}%{_bindir}/rpm %{buildroot}/bin/rpm cp -r cpu-os-macros %{buildroot}%{_usrlibrpm}/platform install -m644 %{SOURCE4} -D %{buildroot}%{_sysconfdir}/%{name}/macros.d/legacy_compat.macros -#ln -sf ppc-linux %{buildroot}%{_usrlibrpm}/platform/powerpc-%{_target_vendor}-linux %if %{with docs} install -d %{buildroot}%{_docdir}/rpm cp -r apidocs/html %{buildroot}%{_docdir}/rpm %endif -%pre -# XXX: really sceptical about rpm actually requiring or even using it's own -# dedicated user for any purpose (and there's no suid/guid no binaries either), really -# smells like an old suid/guid relic of the past... -/usr/share/rpm-helper/add-user rpm $1 rpm /var/lib/rpm /bin/false +install -d %{buildroot}%{multiarch_bindir} +install -d %{buildroot}%{multiarch_includedir} +%if "%{_lib}" == "lib64" +install -d %{buildroot}%(linux32 rpm -E %%{multiarch_bindir}) +install -d %{buildroot}%(linux32 rpm -E %%{multiarch_includedir}) +%endif -%postun -/usr/share/rpm-helper/del-user rpm $1 rpm +# should really be handled by make script.. +ln -f %{buildroot}%{_rpmhome}/bin/{rpmlua,lua} +ln -f %{buildroot}%{_rpmhome}/bin/{rpmluac,luac} # TODO: review which files goes into what packages...? %files -f %{name}.lang -%doc GROUPS CHANGES doc/manual/[a-z]* +%doc CHANGES doc/manual/[a-z]* %if %{with docs} %exclude %{_docdir}/rpm/html %endif -# Are these attributes actually still sane? Smells deprecated/legacy... -%defattr(755, rpm, rpm, 755) /bin/rpm %{_bindir}/multiarch-dispatch %{_bindir}/rpmconstant* %{_bindir}/rpm2cpio* %{_rpmhome}/bin/augtool +%{_rpmhome}/bin/chroot +%{_rpmhome}/bin/cp %{_rpmhome}/bin/dbconvert -#%{_rpmhome}/bin/grep +%{_rpmhome}/bin/find +#%%{_rpmhome}/bin/grep +#%%{_rpmhome}/bin/lua %{_rpmhome}/bin/mtree +%{_rpmhome}/bin/mgo +#%%{_rpmhome}/bin/rc %{_rpmhome}/bin/rpmspecdump +%{_rpmhome}/bin/wget +%if %{with xar} +%{_rpmhome}/bin/txar +%endif %{_rpmhome}/dbconvert.sh %{_rpmhome}/rpm.* %{_rpmhome}/rpm2cpio @@ -516,7 +973,6 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm %dir %{_localstatedir}/lib/rpm/tmp -%defattr(0644, rpm, rpm, 755) %{_rpmhome}/macros.d/* %{_rpmhome}/cpuinfo.yaml %{_rpmhome}/macros @@ -524,10 +980,10 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm %{_rpmhome}/platform/*/macros %config(noreplace) %{_localstatedir}/lib/rpm/DB_CONFIG -%defattr(-,root,root) %dir %{_localstatedir}/spool/repackage %dir %{_rpmhome} %dir %{_rpmhome}/bin +%dir %{_rpmhome}/lib %dir %{_rpmhome}/platform/ %dir %{_rpmhome}/platform/*/ %dir %{_rpmhome}/macros.d @@ -549,36 +1005,41 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm %exclude %{_mandir}/man8/rpmbuild.8* %exclude %{_mandir}/man8/rpmdeps.8* -%config(noreplace,missingok) /etc/cron.daily/rpm -%config(noreplace,missingok) /etc/logrotate.d/rpm +%{_sysconfdir}/cron.daily/rpm +%config(noreplace,missingok) %{_sysconfdir}/logrotate.d/rpm + +%dir %{multiarch_bindir} +%dir %{multiarch_includedir} +%if "%{_lib}" == "lib64" +%dir %(linux32 rpm -E %%{multiarch_bindir}) +%dir %(linux32 rpm -E %%{multiarch_includedir}) +%endif %{_includedir}/multiarch-dispatch.h %files build -%defattr(755, rpm, rpm) %{_bindir}/gendiff %{_bindir}/rpmbuild %{_bindir}/multiarch-platform -%{_rpmhome}/bin/abi-compliance-checker.pl +#%%{_rpmhome}/bin/abi-compliance-checker.pl %{_rpmhome}/bin/api-sanity-autotest.pl -%{_rpmhome}/bin/chroot -%{_rpmhome}/bin/cp +%{_rpmhome}/bin/api-sanity-checker.pl %{_rpmhome}/bin/dbsql %{_rpmhome}/bin/debugedit -%{_rpmhome}/bin/find %{_rpmhome}/bin/install-sh +%{_rpmhome}/bin/lua +%{_rpmhome}/bin/luac %{_rpmhome}/bin/mkinstalldirs +%{_rpmhome}/bin/pom2spec %{_rpmhome}/bin/rpmcache %{_rpmhome}/bin/rpmcmp %{_rpmhome}/bin/rpmdeps %{_rpmhome}/bin/rpmdigest %{_rpmhome}/bin/rpmkey +%{_rpmhome}/bin/rpmlua +%{_rpmhome}/bin/rpmluac %{_rpmhome}/bin/rpmrepo %{_rpmhome}/bin/sqlite3 -%if %{with xar} -%{_rpmhome}/bin/txar -%endif -%{_rpmhome}/bin/wget %dir %{_rpmhome}/helpers %{_rpmhome}/helpers/* %dir %{_rpmhome}/qf @@ -594,9 +1055,11 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm %{_rpmhome}/find-provides.perl %{_rpmhome}/find-req.pl %{_rpmhome}/find-requires.perl +%{_rpmhome}/fontconfig.prov %{_rpmhome}/gem_helper.rb %{_rpmhome}/getpo.sh %{_rpmhome}/gstreamer.sh +%{_rpmhome}/haskelldeps.sh %{_rpmhome}/http.req %{_rpmhome}/javadeps.sh %{_rpmhome}/kmod-deps.sh @@ -623,8 +1086,7 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm %if %{with js} %{_rpmhome}/bin/tjs %endif -%attr(0644, rpm, rpm) %{_rpmhome}/macros.rpmbuild -%defattr(-, root, root) +%{_rpmhome}/macros.rpmbuild %{_mandir}/man8/rpmbuild.8* %{_mandir}/man8/rpmdeps.8* @@ -636,18 +1098,15 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm %{_libdir}/librpmmisc-%{libver}.so %{_libdir}/librpmbuild-%{libver}.so %if %{with js} -#FIXME: lib64! why not just place in _libdir? -# at least this one is(/seems to be(?)) a "regular" & "unique" (without risk of -# any conflicts) shared library with "normal" soname, libtool versioning and all... %{_rpmhome}/lib/librpmjsm.so.* %{_rpmhome}/lib/rpmjsm.so %endif -#%if %{with sqlite} -#%{_rpmhome}/libsql*.so.* -#%endif +#%%if %%{with sqlite} +#%%{_rpmhome}/libsql*.so.* +#%%endif %files -n %{librpmnamedevel} -#%doc apidocs/html +#%%doc apidocs/html %{_includedir}/rpm %{_libdir}/librpm.la %{_libdir}/librpm.so @@ -662,18 +1121,16 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm %{_libdir}/librpmbuild.la %{_libdir}/librpmbuild.so %{_libdir}/pkgconfig/rpm.pc +%{_rpmhome}/lib/liblua.la %if %{with js} -#FIXME: lib64! -%{_rpmhome}/lib/librpmjsm.la +%%{_rpmhome}/lib/librpmjsm.la %{_rpmhome}/lib/librpmjsm.so %{_rpmhome}/lib/rpmjsm.la %endif -#%if %{with sqlite} -#%{_rpmhome}/libsql*.la -#%{_rpmhome}/libsql*.so -#%endif - +#%%if %%{with sqlite} +#%%{_rpmhome}/libsql*.so +#%%endif %files -n %{librpmstatic} %{_libdir}/librpm.a @@ -683,18 +1140,13 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm %{_libdir}/librpmmisc.a %{_libdir}/librpmbuild.a -%if %{with js} -#FIXME: lib64! -%{_rpmhome}/lib/librpmjsm.a -%{_rpmhome}/lib/rpmjsm.a -%endif -#%if %{with sqlite} -#%{_rpmhome}/libsql*.a -#%endif - %if %{with perl} %files -n perl-%{perlmod} -#%doc perl/Changes +#%%doc perl/Changes +%if %{with embed} +%{_rpmhome}/lib/rpmperl.so +%{_rpmhome}/lib/rpmperl.la +%endif %{_mandir}/man3/RPM* %{perl_vendorarch}/%{perlmod}.pm %dir %{perl_vendorarch}/%{perlmod} @@ -704,9 +1156,33 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm %if %{with python} %files -n python-rpm +%if %{with embed} +%{_rpmhome}/lib/rpmpython.so +%{_rpmhome}/lib/rpmpython.la +%endif %dir %{py_platsitedir}/rpm %{py_platsitedir}/rpm/*.py %{py_platsitedir}/rpm/*.so +%{py_platsitedir}/rpm/*.la +%endif + +%if %{with ruby} +%files -n rpm-rubyembed +%{_rpmhome}/bin/trb +%{_rpmhome}/lib/rpm.so +%{_rpmhome}/lib/rpmruby.so +%endif + +%if %{with tcl} +%files -n rpm-tclembed +%{_rpmhome}/lib/rpmtcl.so +%{_rpmhome}/lib/rpmtcl.la +%endif + +%if %{with squirrel} +%files -n rpm-squirrelembed +%{_rpmhome}/lib/rpmsquirrel.so +%{_rpmhome}/lib/rpmsquirrel.la %endif %if %{with docs} @@ -717,8 +1193,513 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm %changelog +* Thu Oct 04 2012 Per Øyvind Karlsen 1:5.4.10-5 ++ Revision: 818380 +- fix duplicate /usr/lib/rpm/bin/{{rpmlua,lua},{rpmluac,luac} files to be + hardlinks in stead +- own /usr/lib/rpm/lib +- fix a possibly unitialized variable being used (P162) +- search through library dirs within buildroot for uclibc dependencies (P161) + +* Thu Aug 30 2012 Andrey Bondrov 1:5.4.10-4 ++ Revision: 816074 +- Update ruby1.9-fixes patch to deal with new psych + +* Wed Aug 22 2012 Per Øyvind Karlsen 1:5.4.10-3 ++ Revision: 815594 +- bump binary payload compression level up to xz' default level (6) +- fix so that dependencies really doesn't get generated from doc files, also + allow for enabling generation with %%_generate_dependencies_from_docdir (P116) + +* Tue Aug 14 2012 Per Øyvind Karlsen 1:5.4.10-2 ++ Revision: 814815 +- rebuild for missing x86_64 packages.. + +* Fri Jul 27 2012 Per Øyvind Karlsen 1:5.4.10-1 ++ Revision: 811384 +- support --ignorearch & --ignoreos again (P159) +- try workaround strange issue with tests being run during install when built + on build server... +- new version + +* Wed Jul 04 2012 Per Øyvind Karlsen 1:5.4.9-6 ++ Revision: 808116 +- fix issue with noen saving error pages to target file when hitting errors + after connecting to http server (P158) +- change %%optflags for x32 to '-Os -g -mx32 -march=atom -mtune=core-avx-i' +- merge perl dependency generator scripts from rpm-mandriva-setup +- merge php dependency generator scripts from rpm-mandriva-setup-build +- ditch install-info macros +- drop dead %%cputoolize macro (P154) + +* Sat May 19 2012 Matthew Dawkins 1:5.4.9-5 ++ Revision: 799683 +- added p153 for findlang of the new gnome help directory +- taken from upstream rpm5.org + +* Fri May 18 2012 Per Øyvind Karlsen 1:5.4.9-4 ++ Revision: 799528 +- disable sqlite stuff which seems broken, giving berkeley db errors (P152) +- disable support for localized strings (P150) + +* Fri May 18 2012 Per Øyvind Karlsen 1:5.4.9-3 ++ Revision: 799483 +- fix broken description, group & summary tag for src.rpms generated (P150) +- fix a typo in the internal rpmtag.h header (P149) +- fix build breakage due to use of libgit2 functions when not enabled (P148) +- add initial x32 support (P147) + +* Thu May 17 2012 Per Øyvind Karlsen 1:5.4.9-2 ++ Revision: 799292 +- add back fix for 'rpm -qa \*foo\*' which were wrongly assumed to have been + merged upstream + +* Thu May 17 2012 Per Øyvind Karlsen 1:5.4.9-1 ++ Revision: 799275 +- support signature & digest disablers +- Seqno is now part of %%_dbi_tags_4, so be sure to not make it duplicate in + %files list +- rebase on rpm 5.4.9 (tons of patches merged upstream, beware of possible + regressions..) +- prepare and comment with instructions and status for mdawkins to take care + of upstream merging :) + + + Franck Bui + - clean up the armv7l macro file so it contains target-specific macros only + - Add armv7l specific macros + +* Wed Apr 25 2012 Per Øyvind Karlsen 1:5.4.8-1 ++ Revision: 793419 +- fix lua ossp-uuid as well +- fix uuid being disable (enabling it for real) +- * fix some regressions + * regenerate patches + * update to 5.4.8 +- fix newline from mono dependency generator which will produce empty deps (P143) + +* Sat Apr 21 2012 Matthew Dawkins 1:5.4.7-14 ++ Revision: 792633 +- added p142 for typelib (rediffed from upstream) +- made spec more readable + +* Thu Apr 12 2012 Per Øyvind Karlsen 1:5.4.7-13 ++ Revision: 790449 +- revert "Hash instead of 64b->16b truncate to prevent aliasing" (P141) + +* Thu Apr 12 2012 Per Øyvind Karlsen 1:5.4.7-12 ++ Revision: 790425 +- disable %%triggerposttransin & %%triggerposttransun support for now as + implementation details likely needs to change in ways that will affect any + packages built using this +- add back support for rpmv3 packages (#65443) +- fix --verify segfaulting on packages using old signature type (#64378) +- implement %%triggerposttransin & %%triggerposttransun (P138) + +* Thu Mar 29 2012 Per Øyvind Karlsen 1:5.4.7-11 ++ Revision: 788049 +- fix dependency generator not generating kmod() deps for all dkms packages +- fix so that we don't get double '/' in path for dirname matching against + file triggers (P137) +- add support for using rpmdsMerge() with file path tags (P136) + +* Wed Mar 28 2012 Per Øyvind Karlsen 1:5.4.7-10 ++ Revision: 787993 +- libexpat is needed by lua, so let's enable use of libexpat for rpm as well also +- don't do seqid_init() on read-only database (P135) +- enable internal lua per jbj request + +* Fri Mar 23 2012 Per Øyvind Karlsen 1:5.4.7-9 ++ Revision: 786436 +- allow generating devel() provides for files outside of standard libdirs (P133) +- fix rpmpython input issue resulting in 'BDB4511 Error' (P132) +- merge all interpreter dlopen() patches into one +- add dependencies on python-rpm & perl-RPM for rpm-build package so that we're + sure that we always have embedded python & perl interpreters available during + rpm building, thus making it easier and encouraging usage +- pass trigger matches as arguments to triggers using embedded interpreters also +- load embedded squirrel interpretter via dlopen() (P135) +- load embedded tcl interpreter via dlopen() (P134) and enable it +- implement loading of embedded ruby interpreter via dlopen() (P133), disabled + for now as the embedded interpreter support was already broken and I don't want + to waste anymore time on trying to fix it right now.. :p +- load embedded perl interpreter via dlopen() (P132) and enable it +- load embedded python interpreter via dlopen() (P131) and enable it + +* Thu Mar 22 2012 Per Øyvind Karlsen 1:5.4.7-8 ++ Revision: 785965 +- fix regex & glob matching against strings that's not NUL terminated (P130) +- fix a couple of minor memleak (P129) +- don't consider trigger dependencies as overlapping (P128) +- enable provides generation for DSOs without soname again (for now..) +- add matches as arguments to triggers (P127) +- add filename regex matching support for file triggers (P126) +- fix unitialized value resulting in segfault for 'rpm -qa --triggers' (P125) + +* Fri Mar 16 2012 Per Øyvind Karlsen 1:5.4.7-7 ++ Revision: 785403 +- only generate devel() deps for files under /lib, /lib64, /usr/lib & /usr/lib64 + +* Fri Mar 16 2012 Per Øyvind Karlsen 1:5.4.7-6 ++ Revision: 785399 +- change debug package suffix to '-debuginfo' (P124) +- .la files now gets automatically removed since spec-helper 0.31.12 + +* Fri Mar 16 2012 Per Øyvind Karlsen 1:5.4.7-5 ++ Revision: 785347 +- fix devel() dependencies not being generated if soname has '.' before '.so' +- fix kmod() dependencies not being generated +- own multiarch directories +- don't generate rpmlib(DistEpoch) dependencies quite yet.. + +* Wed Mar 14 2012 Per Øyvind Karlsen 1:5.4.7-3 ++ Revision: 784990 +- pull in fixed libtool version +- don't try fopen() empty filenames when trying to resolve elf interpreter (P123) +- strdup() EVR of package merged while removing overlapping dependencies (P122) +- always choose dependencies with equal only when overlapping (P121) +- print the name of the files that removed dependencies are generated from (P120) + +* Sat Mar 10 2012 Per Øyvind Karlsen 1:5.4.7-2 ++ Revision: 783945 +- eu-strip in elfutils 0.152-5 seems to have suddenly started segfaulting on me, + so let's be sure that we pull in 0.153 when we build rpm +- fix generation of ruby(abi) provides (P119) +- don't generate SONAME provides for DSOs without SONAME (P118) +- only generate ruby and python dependencies for executables and modules (P117) +- don't try generate dependencies from any files under /usr/share/doc (P116) +- fix invalid free() if not %%_defaultdocdir is defined (P115) +- don't generate rpmlib(VersionedDependency) rpmlib feature dependencies (P113) +- add rpmlib(DistEpoch) feature (P113, way overdue, should *really* have been + done before 2011 release in order to prevent broken upgrades.. :/) +- use gnu hash style by default when linking (P112) +- don't bother generating rtld(GNU_HASH) dependencies for packages using gnu + hash style as our glibc has provided this for ages now anyways (P112) + +* Fri Mar 09 2012 Per Øyvind Karlsen 1:5.4.7-1 ++ Revision: 783464 +- new version +- reenable docs + +* Fri Mar 09 2012 Per Øyvind Karlsen 1:5.4.5-2 ++ Revision: 783454 +- disable docs for a brief moment to squeeze by dependenci issues on buildsystem +- set _use_internal_dependency_generator to 1 (disabling scriptlet dependencies) +- only generate devel() dependencies for symlinks with 'libfoo' filename (P110) +- fix generation of uClibc() depsn on non-lib64 (P109) +- fix fontconfig.prov not being installed + +* Tue Mar 06 2012 Per Øyvind Karlsen 1:5.4.5-1 ++ Revision: 782550 +- be sure to scan /usr/lib{,64} for elf interpreter +- fix issue with pythonegg() dependencies not generated with internal dependency + generator when egg metadata is stored in directories rather than archives(P108) +- add rpmfc python color from string returned by file magic (P107) +- break out of elf link loops when trying to resolve elf interpreter (P106) +- fix incorrect use of sizeof() rather than strlen() on strings, affecting + perl dependencies generated by the internal dep generator (P105) +- skip dependency generation for block devices as well.. +- don't try extract dependencies from character devices, otherwise the dependency + generator might get stuck in a eternal loop (P104) +- add mimehandler() provides (P103) +- add missing pieces to get kmod() dependencies working (P102) +- generate font() provides (P101) +- don't consider script dependencies as overlapping to other dependencies (P100) +- add a macros function to python spec class to get macros from a package (P99) +- update dependency references in rpmfc dictionary when removing overlapping + dependencies (P98) +- cron't script isn't a configuration file +- set proper file color for scripts using env in shellbang (P97) +- fix elf interpreter resolving that breaks generation of uclibc deps (P96) +- drop interpreter deps on 'bash', 'env', 'perl', 'python', 'ruby' & 'sh' (P95) +- oboslete haskell-macros +- generate haskell() dependencies (P94) +- SILENCE: I knew this one was wrong.. +- print missing newline for unversioned ruby(abi) dependencies generated (P93) +- be sure to always extract dependencies for all files classified as ruby (P92) +- update rpmfc when removing dependencies on self (P91) +- apply various misc changes for fixing uClibc() dependencies and also devel() + dependencies (P90) +- fix typo inverting (64bit) mark (P89, from rpm-5_3) +- add a uClibc(...) dependency for libraries linked against uClibc to avoid + conflicting duplicates (P88, from rpm-5_3) +- ditch librpm-devel provides +- obsolete rpm-mandriva-setup +- don't generate php dependencies only when scripts are executable (P87) +- use our own dependency generator for php as well for now (updates P84) +- update to using version of mono dependency generator shipped with mono (P86) +- fix removal of overlapping dependencies for internal dependency generator (P85) +- enable internal dependency generator (P83) +- remove dependencies on self generated by internal dependency generator as well +- add support for extracting kmod() deps from xz compressed kernel modules +- fix python bindings using a no longer existing rpm4 function (P82) +- apply russian typo fix again (patch seems to have been accidentally disabled) +- fix build against db 5.2 for now.. (P77) +- fix building of libsql not being conditional (P81) +- fix automake 1.11.2 fix (P80) +- new version + +* Wed Feb 15 2012 Per Øyvind Karlsen 1:5.4.4-36 ++ Revision: 774475 +- do not consider dependency ranges as overlapping for removal (#65269) + +* Sun Feb 12 2012 Per Øyvind Karlsen 1:5.4.4-35 ++ Revision: 773377 +- update ruby macro for ruby 1.9 to avoid deprecation warnings +- fix gem_helper.rb to work with ruby 1.9 + +* Fri Feb 10 2012 Per Øyvind Karlsen 1:5.4.4-34 ++ Revision: 772526 +- hold on with db 5.3 migration a bit, need to get ruby dep extractor working + again first... +- fix actual printing of rubygem dependencies also with ruby 1.9 +- update rubygem dependency extractor for ruby 1.9 +- switch to berkeley db 5.3 + +* Tue Feb 07 2012 Oden Eriksson 1:5.4.4-33 ++ Revision: 771559 +- rebuilt against new pcre (second time) + +* Sun Feb 05 2012 Oden Eriksson 1:5.4.4-32 ++ Revision: 771270 +- rebuilt against new pcre + + + Matthew Dawkins + - moved pom2spec to rpm-build package + - added Obsoletes for rpm5-manbo-setup package + +* Mon Jan 23 2012 Per Øyvind Karlsen 1:5.4.4-31 ++ Revision: 766961 +- terminate build on file listed twice +- hardcore path to rpmlint to prevent breakage with people redefining %%_bindir +- add rpmlintrc file + +* Fri Jan 06 2012 Per Øyvind Karlsen 1:5.4.4-30 ++ Revision: 758125 +- workaround spec-helper not properly removing all .la files properly..(?) +- support loading local rpmlint configuration file from + %{_sourcedir}/%%{name}.rpmlintrc +- add a versioned dependency on rpmlint-mandriva-policy +- add support for %%_srcdefattr macro, setting it to (644,root,root) +- bump rpmlint version conflicts again.. ;) +- enable %%_nonzero_exit_pkgcheck_terminate_build (ghasp!;) +- don't remove Requires(pre) dependencies satisfied by self, but rather print an + error (not terminating build though, leaving this up to rpmlint check to do + later) +- pass '-T' argument to rpmlint for it to always return zero unless error + threshold is exceeded +- silence rpmlint 'macro-in-comment' complaints +- ditch dedicated rpm user and file/directory ownership of + +* Wed Dec 21 2011 Per Øyvind Karlsen 1:5.4.4-29 ++ Revision: 744043 +- reenable rpmlint invokation from rpmbuild and add conflict on older rpmlint + releaes that has bug with paths to extracted files from src.rpm + +* Tue Dec 20 2011 Per Øyvind Karlsen 1:5.4.4-28 ++ Revision: 744028 +- disable rpmlint invokation during rpmbuild untill network transport issues with + src.rpms is resolved +- drop 'GROUPS' file carried and included as doc for 'rpm' package, earlier + required by rpmlint, but no longer... :) + +* Tue Dec 20 2011 Per Øyvind Karlsen 1:5.4.4-27 ++ Revision: 743978 +- add '>= 4.2.1-8' to 'beecrypt-devel' buildrequires to get proper libtool files +- add back $RPM_BUILD_DIR again for now to properly generate paths for debug pkgs +- add support for %%_build_pkgcheck, rpmbuild invoking rpmlint automatically per + package built (P73, from rpm.org) +- disable %%_unpackaged_subdirs_terminate_build untill check fixed.. +- teach debugedit about .debug_macro dwarf section (rhbz#759272, P72 from rpm.org) +- switch to using rpm's own xtoupper() & xtolower() in stead of changing LC_CTYPE + +* Fri Dec 16 2011 Per Øyvind Karlsen 1:5.4.4-26 ++ Revision: 743086 +- fix locale-dependent behaviour of toupper()/tolower() breaking conversion of + string casing and the lookup of rpm constants in languages such as turkish + where 'i' is considered uppercase and 'I' lowercase (P71, fixes mdv#63860) + +* Wed Dec 14 2011 Per Øyvind Karlsen 1:5.4.4-25 ++ Revision: 741297 +- change log level of message about dropping dependencies to debug, way too + annoying otherwise.. + +* Wed Dec 14 2011 Per Øyvind Karlsen 1:5.4.4-24 ++ Revision: 741197 +- actually enable dropping of dependencies on '/bin/sh' & '/sbin/ldconfig' (P70) + +* Sun Dec 11 2011 Per Øyvind Karlsen 1:5.4.4-23 ++ Revision: 740189 +- drop dependencies such as /bin/sh which will always be satisfied by glibc's + dependency on bash, and also on /sbin/ldconfig which always will be satisfied + by glibc (P70) + +* Sun Dec 11 2011 Per Øyvind Karlsen 1:5.4.4-22 ++ Revision: 740168 +- drop useless dependency on 'pkgconfig' on all files which has a pkgconfig file, + it's not really needed to make the packages usable, and any package actually + requiring pkgconfig will pull it in long before anyways (P69) +- fix %%find_lang --with-html +- enable net transport for 'rpm -qp' (closes mdv#64914) + +* Tue Dec 06 2011 Per Øyvind Karlsen 1:5.4.4-21 ++ Revision: 738087 +- avoid excessive output from eu-strip in find-debuginfo.sh now that +--reloc-debug-sections is used (P67) +- add a 'rpmbuild --withoutclean' option (P66, closes mdvbz#64898) +- strip away buildroot from unpackaged subdirs listed as well +- implement %%_unpackaged_subdirs_terminate_build as well (P65) +- implement %%_duplicate_files_terminate_build (P64) +- strip buildroot path from list of files duplicated across packages (P63) +- update buildrequires on libgomp-devel to gomp-devel +- fix path of %%_sys_macros_dir +- don't redefine %%{debugcflags} completely, extend it in stead and add '-g3' + +* Wed Nov 30 2011 Per Øyvind Karlsen 1:5.4.4-20 ++ Revision: 735832 +- fix NULL pointer dereferencing +- add a versioned requires on elfutils to ensure we get --reloc-debug-sections + +* Wed Nov 30 2011 Per Øyvind Karlsen 1:5.4.4-19 ++ Revision: 735726 +- update buildrequires to use pkgconfig(foo) +- fix so that --reloc-debug-sections isn't used when DISABLE_DEBUG is set + +* Tue Nov 29 2011 Per Øyvind Karlsen 1:5.4.4-18 ++ Revision: 735479 +- fix same package with epoch being possible to upgrade (P60, reported by Ze) + +* Tue Nov 29 2011 Per Øyvind Karlsen 1:5.4.4-17 ++ Revision: 735473 +- add missing partial stripping part from our old find-debuginfo.sh (P60) +- add -Wa,--compress-debug-sections to %%debugcflags + +* Tue Nov 29 2011 Per Øyvind Karlsen 1:5.4.4-16 ++ Revision: 735302 +- use DWARF 4 for debugging format (P58) + +* Tue Nov 29 2011 Per Øyvind Karlsen 1:5.4.4-15 ++ Revision: 735291 +- create GDB index from find-debuginfo if possible (rhbz#617166, from rpm.org) +- add quotes around $RPM_BUILD_ROOT everywhere to avoid breakage with filename + spaces (P56, from rpm.org) +- add support for stripping out/resolve relocations between .debug_* elf + sections in ET_REL files. This can save a lot of space for kernel module (P55) +- Add DWARF-4 support to debugedit (rhbz#707677, P54 from rpm.org) +- Bail out of debuginfo if stabs format encountered (rhbz#453506, P53 from rpm.org) +- Remove unused variable in debugedit (P52, from rpm.org) +- fix incorrect error messages regarding -b and -d (P51, from rpm.org/Anssi) +- Make debugedit -i recompute build ID only when any DWARF was actually + changed (P50, from rpm.org) +- Whitespace fixups for tools/debugedit.c (P49, from rpm.org) + +* Sat Nov 26 2011 Per Øyvind Karlsen 1:5.4.4-14 ++ Revision: 733515 +- don't show suggests with --requires +- only log as debug message when only merging flags + +* Fri Nov 25 2011 Per Øyvind Karlsen 1:5.4.4-13 ++ Revision: 733452 +- fix dependencies with different attributes overlapping being removed, they will + now rather have their attributes merged in stead + +* Fri Nov 25 2011 Per Øyvind Karlsen 1:5.4.4-12 ++ Revision: 733368 +- fix buggy removal of overlapping dependencies, also add detection warning (P47) + +* Thu Nov 24 2011 Per Øyvind Karlsen 1:5.4.4-11 ++ Revision: 733223 +- fix build issue caused by libxml libtool files removal +- drop dependency whiteout, time to clean up loops +- allow installation of repackage rpms (P46) +- drop dependency on rpm-mandriva-setup now that it's macros has been merged +- merge build macros from rpm-mandriva-setup-build (P45) +- switch to using xz payload (P44) +- merge remaining common macros from rpm-mandriva-setup package (P44) +- don't redefine %%_vendor and other variables we don't want redefined in + platform-specific macros +- fix versioned dependencies on rpm-mandriva-setup +- implement support for glob for loading macros with %%{load:} (P42) + +* Thu Nov 17 2011 Per Øyvind Karlsen 1:5.4.4-10 ++ Revision: 731397 +- don't apply %%clean patch (P32), it seems to be broken.. +- merge most of macros from rpm-manbo-setup & obsolete it +- make sure pkgconfig files to extract dependencies from are located in right + location (P40) +- drop unnecessary 'sort' in find-debuginfo.sh giving (harmless) error (P39) +- make find-lang.sh handle man pages that's compressed (P38) +- drop auto-generated dependencies for packages that they satisfy themself (P37) + +* Wed Nov 16 2011 Per Øyvind Karlsen 1:5.4.4-9 ++ Revision: 731099 +- fix missing output file with --all-name + +* Wed Nov 16 2011 Per Øyvind Karlsen 1:5.4.4-8 ++ Revision: 731068 +- support passing multiple names to find-lang.sh (last argument will be output + file name) (P36) + +* Wed Nov 16 2011 Per Øyvind Karlsen 1:5.4.4-7 ++ Revision: 730854 +- be sure to rescan for dependency loops again when dependencies has been skipped + +* Wed Nov 16 2011 Per Øyvind Karlsen 1:5.4.4-6 ++ Revision: 730839 +- add support for --with-html to find-lang.sh (P35) +- fix a memleak in ordering patch, and also report dependencies not being removed + from tsort relations + +* Sun Nov 13 2011 Per Øyvind Karlsen 1:5.4.4-5 ++ Revision: 730423 +- apply ordering patch for helping solving dependency loops where ie. + Requires(post) etc. has been used to try solve ordering with loops.. (P33) + +* Sun Nov 13 2011 Per Øyvind Karlsen 1:5.4.4-4 ++ Revision: 730407 +- fix mdvbz#62979 again (P33, forgotten on rpm-5_3) +- really always invoke %%clean at end (P32, forgotten on rpm-5_3) + +* Sat Nov 12 2011 Per Øyvind Karlsen 1:5.4.4-3 ++ Revision: 730209 +- workaround strange issue for lines starting with '%%_'... +- fix rpm -qa \*foo\* regression (P31) + +* Fri Nov 11 2011 Per Øyvind Karlsen 1:5.4.4-2 ++ Revision: 730073 +- use /sbin/nologin rather than /bin/false as login shell for 'rpm' user +- drop patch reverting $RPM_BUILD_DIR++ removal, it's no longer required as we're + no longer using our own version of find-debuginfo.sh using this +- add back fix for rpm -qf /unpackaged-file (P30, forgotten on rpm-5_3) +- add %%_specfile macro (P29, commit forgotten on rpm-5_3) +- reenable scriptlet failure & no doc conflict patches (commits forgotten) + +* Fri Nov 11 2011 Per Øyvind Karlsen 1:5.4.4-1 ++ Revision: 729992 +- merge find-lang.sh changes from rpm.org (P28) +- merge changes from rpm-setup's find-debuginfo.sh (P27) +- new version + +* Mon Nov 07 2011 Per Øyvind Karlsen 1:5.4.3-2 ++ Revision: 727143 +- add back NVRA pattern hack that got lost on rpm-5_3 branch (P27, fixes urpme) + +* Wed Oct 19 2011 Per Øyvind Karlsen 1:5.4.3-1 ++ Revision: 705415 +- revert removal of env vars breaking ie. find-debuginfo.sh (P26, reverts r16320) +- fix different epoch being ignored for packages with same NVRA compared (P25) +- add %%ruby_sitedir and %%ruby_vendor macros (P24) +- climb up to 5.4 series.. :) +- revert previous patch added, already merged upstream after all.. +- revive patch fixing #62262 which got lost earlier +- fix previous hastily reverted patch in a (hopefully) proper way + + + Jon Dill + - bump release to 13 + - moved various {_rpmhome}/bin/ binaries to main rpm pkg from rpm-build as defined in /usr/lib/rpm/macros + - added {_rpmhome}/bin/lua as it was missing from the spec + * Tue Jul 12 2011 Per Øyvind Karlsen 1:5.3.12-0.20110712.2 -+ Revision: 689772 ++ Revision: 689790 - revert a previous commit of mine which broke deps without distepoch (rushed) * Tue Jul 12 2011 Per Øyvind Karlsen 1:5.3.12-0.20110712.1 @@ -1041,7 +2022,7 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm - fix unowned directory, reported by bitshuffler on irc, causing problem when installing rpm and using the wrong umask -* Fri Sep 25 2009 Olivier Blin 1:4.6.0-6mnb2 +* Fri Sep 25 2009 Olivier Blin 1:4.6.0-6mnb2 + Revision: 448653 - remove n32 support for now (not actually used) - handle n32 ABI in find-requires and find-provides (from Arnaud Patard) @@ -1459,7 +2440,7 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm - I suck, don't move man pages around at all and stop messing:p - move man page for perl module to perl-RPM package - + Olivier Blin + + Olivier Blin - do not expand _install_langs macro in default /etc/rpm/macros - fix typo in default /etc/rpm/macros - explicitely require neon-devel 0.26 (does not build with neon 0.27) @@ -2010,3 +2991,4 @@ cp -r apidocs/html %{buildroot}%{_docdir}/rpm * Fri Apr 16 2004 Rafael Garcia-Suarez 4.2.2-8mdk - When unlocking the RPMLOCK file, don't forget to close(2) it too. +