diff --git a/rpm-4.11.2-macro-newlines.patch b/rpm-4.11.2-macro-newlines.patch new file mode 100644 index 0000000..11a10de --- /dev/null +++ b/rpm-4.11.2-macro-newlines.patch @@ -0,0 +1,26 @@ +commit 1bdcd0500865efd3566efd7f951228f69b58e755 +Author: Panu Matilainen +Date: Wed Feb 19 14:16:38 2014 +0200 + + Dont eat newlines on parametrized macro invocations (RhBug:1045723) + + - Makes the testcase from commit f082b5baa4dcf9601eeb1e0e520ff06e77dc61c0 + succeed. While the old behavior is non-sensical and most likely entirely + unintentional, we're changing a very long-standing behavior here (tested + back to rpm 4.4.x and almost certainly much much older than that) so + its entirely possible people are actually relying on the old + behavior. Lets see what breaks... + +diff --git a/rpmio/macro.c b/rpmio/macro.c +index e1c2a91..72471a2 100644 +--- a/rpmio/macro.c ++++ b/rpmio/macro.c +@@ -764,7 +764,7 @@ grabArgs(MacroBuf mb, const rpmMacroEntry me, const char * se, + + exit: + argvFree(argv); +- return *lastc ? lastc + 1 : lastc; ++ return (*lastc == '\0' || *lastc == '\n') ? lastc : lastc + 1; + } + + /** diff --git a/rpm.spec b/rpm.spec index 4fc98bb..4de1858 100644 --- a/rpm.spec +++ b/rpm.spec @@ -22,7 +22,7 @@ Summary: The RPM package management system Name: rpm Version: %{rpmver} -Release: %{?snapver:0.%{snapver}.}2%{?dist} +Release: %{?snapver:0.%{snapver}.}3%{?dist} Group: System Environment/Base Url: http://www.rpm.org/ Source0: http://rpm.org/releases/rpm-4.11.x/%{name}-%{srcver}.tar.bz2 @@ -56,6 +56,7 @@ Patch10: rpm-4.11.2-double-separator-warning.patch # Filter soname dependencies by name Patch100: rpm-4.11.x-filter-soname-deps.patch Patch101: rpm-4.11.x-do-not-filter-ld64.patch +Patch102: rpm-4.11.2-macro-newlines.patch # These are not yet upstream Patch301: rpm-4.6.0-niagara.patch @@ -261,6 +262,7 @@ packages on a system. %patch100 -p1 -b .filter-soname-deps %patch101 -p1 -b .dont-filter-ld64 +%patch102 -p1 -b .macro-newlines %patch301 -p1 -b .niagara %patch302 -p1 -b .geode @@ -519,6 +521,9 @@ exit 0 %doc COPYING doc/librpm/html/* %changelog +* Wed Mar 26 2014 Panu Matilainen - 4.11.2-3 +- dont eat newlines on parametrized macro invocations (#1045723) + * Tue Feb 18 2014 Panu Matilainen - 4.11.2-2 - reduce the double separator spec parse error into a warning (#1065563)