From c14ac95363d292bb46e46b309ac1d98d80be9791 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Wed, 20 Aug 2014 11:55:23 +0300 Subject: [PATCH] - Emergency hack for #1131892 --- rpm-4.12-beta-rpmdeps.patch | 29 +++++++++++++++++++++++++++++ rpm.spec | 7 ++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 rpm-4.12-beta-rpmdeps.patch diff --git a/rpm-4.12-beta-rpmdeps.patch b/rpm-4.12-beta-rpmdeps.patch new file mode 100644 index 0000000..2637937 --- /dev/null +++ b/rpm-4.12-beta-rpmdeps.patch @@ -0,0 +1,29 @@ +diff --git a/build/rpmfc.c b/build/rpmfc.c +index e798950..94089e5 100644 +--- a/build/rpmfc.c ++++ b/build/rpmfc.c +@@ -760,6 +760,7 @@ rpmfc rpmfcCreate(const char *buildRoot, rpmFlags flags) + fc->buildRoot = xstrdup(buildRoot); + fc->brlen = strlen(buildRoot); + } ++ fc->pkg = xcalloc(1, sizeof(*fc->pkg)); + fc->pool = rpmstrPoolCreate(); + return fc; + } +@@ -1263,6 +1264,7 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg) + av[ac] = NULL; + + fc = rpmfcCreate(spec->buildRoot, 0); ++ free(fc->pkg); /* XXX HACK */ + fc->pkg = pkg; + fc->skipProv = !pkg->autoProv; + fc->skipReq = !pkg->autoReq; +@@ -1337,6 +1339,8 @@ exit: + + /* Clean up. */ + free(fmode); ++ if (fc) ++ fc->pkg = NULL; /* XXX HACK */ + rpmfcFree(fc); + argvFree(av); + rpmfiFree(fi); diff --git a/rpm.spec b/rpm.spec index 63da7aa..592d872 100644 --- a/rpm.spec +++ b/rpm.spec @@ -27,7 +27,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}3%{?dist} +Release: %{?snapver:0.%{snapver}.}4%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2 @@ -52,6 +52,8 @@ Patch100: rpm-4.12-beta1-fix-buildrequires.patch Patch101: rpm-4.12-beta1-spec-header-deps.patch # These are not yet upstream +# Emergency hack for rpmdeps crash (#1131892) +Patch300: rpm-4.12-beta-rpmdeps.patch Patch302: rpm-4.7.1-geode-i686.patch # Probably to be upstreamed in slightly different form Patch304: rpm-4.9.1.1-ld-flags.patch @@ -528,6 +530,9 @@ exit 0 %doc doc/librpm/html/* %changelog +* Wed Aug 20 2014 Panu Matilainen - 4.12.0-0.beta1.4 +- Emergency hack for #1131892 + * Mon Aug 18 2014 Panu Matilainen - 4.12.0-0.beta1.3 - Fix regression on rpmspec dependency queries