public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Warn on undefined macros in buildtree setup macros (#1820349)
@ 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 : 9f5580ba45f15875cbc76c2624d98f80e2b80639
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2020-04-20T14:18:05+03:00
Stats : +35/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/9f5580ba45f15875cbc76c2624d98f80e2b80639?branch=pmatilai-v6
Log:
Warn on undefined macros in buildtree setup macros (#1820349)
---
diff --git a/0001-Warn-on-undefined-components-in-buildtree-macros.patch b/0001-Warn-on-undefined-components-in-buildtree-macros.patch
new file mode 100644
index 0000000..afe1493
--- /dev/null
+++ b/0001-Warn-on-undefined-components-in-buildtree-macros.patch
@@ -0,0 +1,30 @@
+From 701736a18a4625557a5181df3a4f3aed7ac13506 Mon Sep 17 00:00:00 2001
+Message-Id: <701736a18a4625557a5181df3a4f3aed7ac13506.1587381334.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Wed, 8 Apr 2020 14:38:46 +0300
+Subject: [PATCH] Warn on undefined components in buildtree macros
+
+Issue a warning if buildtree macros (%_sourcedir etc) contain undefined
+macro(s) after expansion, such as things only defined during spec parse.
+This always was a murky case that doesn't work in all scenarios, so
+a warning seems appropriate. Actual behavior doesn't change here though.
+---
+ rpmio/rpmfileutil.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/rpmio/rpmfileutil.c b/rpmio/rpmfileutil.c
+index 84ee34f4d..4a939dbfe 100644
+--- a/rpmio/rpmfileutil.c
++++ b/rpmio/rpmfileutil.c
+@@ -439,6 +439,8 @@ int rpmMkdirs(const char *root, const char *pathstr)
+
+ for (char **d = dirs; *d; d++) {
+ char *path = rpmGetPath(root ? root : "", *d, NULL);
++ if (strstr(path, "%{"))
++ rpmlog(RPMLOG_WARNING, ("undefined macro(s) in %s: %s\n"), *d, path);
+ if ((rc = rpmioMkpath(path, 0755, -1, -1)) != 0) {
+ const char *msg = _("failed to create directory");
+ /* try to be more informative if the failing part was a macro */
+--
+2.25.2
+
diff --git a/rpm.spec b/rpm.spec
index 65d0b63..a2f2181 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -25,7 +25,7 @@
%global rpmver 4.15.90
%global snapver git14971
-%global rel 5
+%global rel 6
%global srcver %{version}%{?snapver:-%{snapver}}
%global srcdir %{?snapver:testing}%{!?snapver:%{name}-%(echo %{version} | cut -d'.' -f1-2).x}
@@ -60,6 +60,7 @@ Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
Patch100: 0001-Unset-SOURCE_DATE_EPOCH-for-the-test-suite.patch
Patch101: 0001-rpmfc-Do-not-prepend-buildroot-to-a-path-for-paramet.patch
Patch102: 0001-Fix-regression-causing-all-ELF-files-classified-as-O.patch
+Patch103: 0001-Warn-on-undefined-components-in-buildtree-macros.patch
# These are not yet upstream
Patch906: rpm-4.7.1-geode-i686.patch
@@ -525,6 +526,9 @@ make check || (cat tests/rpmtests.log; exit 1)
%doc doc/librpm/html/*
%changelog
+* Fri Apr 20 2020 Panu Matilainen <pmatilai@redhat.com> - 4.15.90-0.git14971.6
+- Warn on undefined macros in buildtree setup macros (#1820349)
+
* Thu Apr 09 2020 Panu Matilainen <pmatilai@redhat.com> - 4.15.90-0.git14971.5
- Fix regression causing all ELF files classified as OCaml
^ 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: Warn on undefined macros in buildtree setup macros (#1820349) Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox