public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: - dont eat newlines on parametrized macro invocations (#1045723)
@ 2026-11-23  9:28 Panu Matilainen
  0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23  9:28 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 98f66a80891353f2a07cab2ebbfd9e1c62c65651
Author : Panu Matilainen <pmatilai@redhat.com>
Date   : 2014-03-26T11:19:54+02:00
Stats  : +32/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/98f66a80891353f2a07cab2ebbfd9e1c62c65651?branch=pmatilai-v6

Log:
- dont eat newlines on parametrized macro invocations (#1045723)

---
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 <pmatilai@redhat.com>
+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 <pmatilai@redhat.com> - 4.11.2-3
+- dont eat newlines on parametrized macro invocations (#1045723)
+
 * Tue Feb 18 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-2
 - reduce the double separator spec parse error into a warning (#1065563)
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-23  9:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:28 [rpms/rpm] pmatilai-v6: - dont eat newlines on parametrized macro invocations (#1045723) Panu Matilainen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox