From 985d349b70377c70eae9222a8b12c15162f99cbe Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Feb 25 2016 15:59:56 +0000 Subject: - Fix dependencies for RemovePathPostfixes - Resolves: #1306559 --- diff --git a/rpm-4.13.0-Use-pkg-dpaths-during-dependency-generation.patch b/rpm-4.13.0-Use-pkg-dpaths-during-dependency-generation.patch new file mode 100644 index 0000000..1fe99e2 --- /dev/null +++ b/rpm-4.13.0-Use-pkg-dpaths-during-dependency-generation.patch @@ -0,0 +1,63 @@ +From 2a6926d531ca9aa797db678b648509ca251de3f2 Mon Sep 17 00:00:00 2001 +From: Florian Festi +Date: Thu, 25 Feb 2016 16:51:02 +0100 +Subject: [PATCH] Use pkg->dpaths during dependency generation instead of + buildRoot + filename + +This passes the filenames with the actual file content to the dependency +generators when using RemovePathPostfixes. +--- + build/rpmfc.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/build/rpmfc.c b/build/rpmfc.c +index 7c61d9d..59cf472 100644 +--- a/build/rpmfc.c ++++ b/build/rpmfc.c +@@ -1267,7 +1267,6 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg) + { + rpmfi fi = rpmfilesIter(pkg->cpioList, RPMFI_ITER_FWD); + rpmfc fc = NULL; +- ARGV_t av = NULL; + rpm_mode_t * fmode = NULL; + int ac = rpmfiFC(fi); + int genConfigDeps = 0; +@@ -1280,18 +1279,14 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg) + goto exit; + + /* Extract absolute file paths in argv format. */ +- av = xcalloc(ac+1, sizeof(*av)); + fmode = xcalloc(ac+1, sizeof(*fmode)); + + fi = rpmfiInit(fi, 0); + while ((idx = rpmfiNext(fi)) >= 0) { + /* Does package have any %config files? */ + genConfigDeps |= (rpmfiFFlags(fi) & RPMFILE_CONFIG); +- +- av[idx] = rstrscat(NULL, spec->buildRoot, rpmfiFN(fi), NULL); + fmode[idx] = rpmfiFMode(fi); + } +- av[ac] = NULL; + + fc = rpmfcCreate(spec->buildRoot, 0); + free(fc->pkg); +@@ -1316,7 +1311,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg) + } + + /* Build file class dictionary. */ +- rc = rpmfcClassify(fc, av, fmode); ++ rc = rpmfcClassify(fc, pkg->dpaths, fmode); + if ( rc != RPMRC_OK ) + goto exit; + +@@ -1371,7 +1366,6 @@ exit: + fc->pkg = NULL; + free(fmode); + rpmfcFree(fc); +- argvFree(av); + rpmfiFree(fi); + + return rc; +-- +2.5.0 + diff --git a/rpm.spec b/rpm.spec index 641bcc0..9d81397 100644 --- a/rpm.spec +++ b/rpm.spec @@ -29,7 +29,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}24%{?dist} +Release: %{?snapver:0.%{snapver}.}25%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/rpm-4.12.x/%{name}-%{srcver}.tar.bz2 @@ -70,6 +70,7 @@ Patch114: rpm-4.13.0-autosetup-errors.patch Patch115: rpm-4.13.0-unlimited-macro-expand.patch Patch116: rpm-4.13.0-idle-and-sleep-in-systemd-inhibit.patch Patch117: rpm-4.13.0-add-mipsr6-support.patch +Patch118: rpm-4.13.0-Use-pkg-dpaths-during-dependency-generation.patch # These are not yet upstream Patch302: rpm-4.7.1-geode-i686.patch @@ -580,6 +581,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Thu Feb 25 2016 Florian Festi - 4.4.13.0-0.rc1.25 +- Fix dependencies for RemovePathPostfixes (#1306559) + * Fri Feb 19 2016 Florian Festi - 4.4.13.0-0.rc1.24 - Also block idle and sleep in the systemd-inhibit plugin (#1297984) - Add support for MIPS release 6