public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - dont eat newlines on parametrized macro invocations (#1045723)
Date: Mon, 23 Nov 2026 09:28:39 GMT [thread overview]
Message-ID: <179542611909.1.15311391727639160984.rpms-rpm-98f66a808913@fedoraproject.org> (raw)
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)
reply other threads:[~2026-11-23 9:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179542611909.1.15311391727639160984.rpms-rpm-98f66a808913@fedoraproject.org \
--to=pmatilai@redhat.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox