public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Temporarily revert macro file loading fix due to regression #1953910
@ 2026-11-23 9:33 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23 9:33 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : d56ba0c11fb27a93776a33d2c1ccf30ce48461a0
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2021-04-27T10:55:36+03:00
Stats : +81/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/d56ba0c11fb27a93776a33d2c1ccf30ce48461a0?branch=pmatilai-v6
Log:
Temporarily revert macro file loading fix due to regression #1953910
---
diff --git a/0001-Revert-Fix-logic-error-in-macro-file-reader.patch b/0001-Revert-Fix-logic-error-in-macro-file-reader.patch
new file mode 100644
index 0000000..468b015
--- /dev/null
+++ b/0001-Revert-Fix-logic-error-in-macro-file-reader.patch
@@ -0,0 +1,74 @@
+From eb8aee3f45024fa1e631ac2da5b06f5a9abf16d3 Mon Sep 17 00:00:00 2001
+Message-Id: <eb8aee3f45024fa1e631ac2da5b06f5a9abf16d3.1619509954.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Tue, 27 Apr 2021 10:51:14 +0300
+Subject: [PATCH] Revert "Fix logic error in macro file reader"
+
+This trips over the following comment line in macros.python-srpm,
+preventing all subsequent macros from loading:
+
+Temporarily revert to let Python builds continue while looking for
+proper fix.
+
+This reverts commit 75275a87cff04da65d3557f2c40ea2b526528c4c.
+---
+ rpmio/macro.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/rpmio/macro.c b/rpmio/macro.c
+index 6dfc73336..f2a2335df 100644
+--- a/rpmio/macro.c
++++ b/rpmio/macro.c
+@@ -209,24 +209,24 @@ findEntry(rpmMacroContext mc, const char *name, size_t namelen, size_t *pos)
+ static int
+ rdcl(char * buf, size_t size, FILE *f)
+ {
++ char *q = buf - 1; /* initialize just before buffer. */
+ size_t nb = 0;
++ size_t nread = 0;
+ int pc = 0, bc = 0, xc = 0;
+ int nlines = 0;
+ char *p = buf;
+- char *q = buf;
+
+ if (f != NULL)
+ do {
+- *q = '\0'; /* terminate */
++ *(++q) = '\0'; /* terminate and move forward. */
+ if (fgets(q, size, f) == NULL) /* read next line. */
+ break;
+ nlines++;
+ nb = strlen(q);
+- for (q += nb; nb > 0 && iseol(q[-1]); q--)
++ nread += nb; /* trim trailing \r and \n */
++ for (q += nb - 1; nb > 0 && iseol(*q); q--)
+ nb--;
+- if (*q == 0)
+- break; /* no newline found, EOF */
+- for (; p < q; p++) {
++ for (; p <= q; p++) {
+ switch (*p) {
+ case '\\':
+ switch (*(p+1)) {
+@@ -250,14 +250,14 @@ rdcl(char * buf, size_t size, FILE *f)
+ case ']': if (xc > 0) xc--; break;
+ }
+ }
+- if ((nb == 0 || q[-1] != '\\') && !bc && !pc && !xc) {
+- *q = '\0'; /* trim trailing \r, \n */
++ if (nb == 0 || (*q != '\\' && !bc && !pc && !xc) || *(q+1) == '\0') {
++ *(++q) = '\0'; /* trim trailing \r, \n */
+ break;
+ }
+ q++; nb++; /* copy newline too */
+ size -= nb;
+- if (q[-1] == '\r') /* XXX avoid \r madness */
+- q[-1] = '\n';
++ if (*q == '\r') /* XXX avoid \r madness */
++ *q = '\n';
+ } while (size > 0);
+ return nlines;
+ }
+--
+2.30.2
+
diff --git a/rpm.spec b/rpm.spec
index 8dc45c6..0c1374a 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -32,7 +32,7 @@
%global rpmver 4.16.90
%global snapver git15395
-%global rel 2
+%global rel 3
%global sover 9
%global srcver %{rpmver}%{?snapver:-%{snapver}}
@@ -54,6 +54,9 @@ Patch3: rpm-4.9.90-no-man-dirs.patch
# https://github.com/rpm-software-management/rpm/pull/473
Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
+# Temporarily for https://bugzilla.redhat.com/show_bug.cgi?id=1953910
+Patch10: 0001-Revert-Fix-logic-error-in-macro-file-reader.patch
+
# Patches already upstream:
# These are not yet upstream
@@ -554,6 +557,9 @@ fi
%doc doc/librpm/html/*
%changelog
+* Tue Apr 27 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.3
+- Temporarily revert macro file loading fix due to regression #1953910
+
* Mon Apr 26 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.2
- Add a bcond to build with external debugedit
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:33 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:33 [rpms/rpm] pmatilai-v6: Temporarily revert macro file loading fix due to regression #1953910 Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox