public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Further dynamic buildrequires cli switch regression fixes (#2078744)
@ 2026-11-23  9:34 Panu Matilainen
  0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-11-23  9:34 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/rpm
            Branch : pmatilai-v6
            Commit : 2f2f9ed291ca8b258647001b5b40d3c6c9c4d4b4
            Author : Panu Matilainen <pmatilai@redhat.com>
            Date   : 2022-04-26T18:25:30+03:00
            Stats  : +113/-95 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpm/c/2f2f9ed291ca8b258647001b5b40d3c6c9c4d4b4?branch=pmatilai-v6

            Log:
            Further dynamic buildrequires cli switch regression fixes (#2078744)

Third time's the charm, eh?

---
diff --git a/0001-Fix-regression-on-dynamic-buildrequires-with-ba-node.patch b/0001-Fix-regression-on-dynamic-buildrequires-with-ba-node.patch
deleted file mode 100644
index 69556ed..0000000
--- a/0001-Fix-regression-on-dynamic-buildrequires-with-ba-node.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From d220e0063e836ba14806c7efb2a85d1be04cd673 Mon Sep 17 00:00:00 2001
-Message-Id: <d220e0063e836ba14806c7efb2a85d1be04cd673.1650979848.git.pmatilai@redhat.com>
-From: Panu Matilainen <pmatilai@redhat.com>
-Date: Tue, 26 Apr 2022 16:27:10 +0300
-Subject: [PATCH] Fix regression on dynamic buildrequires with -ba --nodeps
- (RhBug:2078744)
-
----
- rpmbuild.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/rpmbuild.c b/rpmbuild.c
-index da3810f75..377d672a7 100644
---- a/rpmbuild.c
-+++ b/rpmbuild.c
-@@ -673,9 +673,10 @@ int main(int argc, char *argv[])
- 	/* fallthrough */
-     case 'd':
- 	ba->buildAmount |= RPMBUILD_BUILDREQUIRES;
--	ba->buildAmount |= RPMBUILD_DUMPBUILDREQUIRES;
--	if (!noDeps)
-+	if ((buildChar == 'd' || buildChar == 'r') || noDeps == 0) {
-+	    ba->buildAmount |= RPMBUILD_DUMPBUILDREQUIRES;
- 	    ba->buildAmount |= RPMBUILD_CHECKBUILDREQUIRES;
-+	}
- 	if ((buildChar == 'r' || buildChar == 'd') && shortCircuit)
- 	    break;
- 	/* fallthrough */
--- 
-2.35.1
-

diff --git a/0001-Fix-regressions-on-dynamic-buildrequires-cli-switche.patch b/0001-Fix-regressions-on-dynamic-buildrequires-cli-switche.patch
new file mode 100644
index 0000000..49f9108
--- /dev/null
+++ b/0001-Fix-regressions-on-dynamic-buildrequires-cli-switche.patch
@@ -0,0 +1,108 @@
+From 0aedb84b3c6535b0befb2cc64912645d927b9dfd Mon Sep 17 00:00:00 2001
+Message-Id: <0aedb84b3c6535b0befb2cc64912645d927b9dfd.1650986658.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Tue, 26 Apr 2022 18:08:14 +0300
+Subject: [PATCH] Fix regressions on dynamic buildrequires cli switches
+ (RhBug:2078744)
+
+This effectively reverts commits b8935fb23518e26aa7b9316d27f2565813d20291
+and ad8b9bd2ca93cf4319680f056bb40bfc24661991 and separating -br and -bd
+from the normal build flow: these are so different from regular builds
+and in particular, have special semantics wrt --nodeps that trying to
+cram them into the normal flow only makes it far harder to read and
+understand.
+---
+ rpmbuild.c        | 22 +++++++++++++++-------
+ tests/rpmbuild.at | 32 ++++++++++++++++++++++++++++++++
+ 2 files changed, 47 insertions(+), 7 deletions(-)
+
+diff --git a/rpmbuild.c b/rpmbuild.c
+index de78976ff..abe164e32 100644
+--- a/rpmbuild.c
++++ b/rpmbuild.c
+@@ -663,24 +663,32 @@ int main(int argc, char *argv[])
+ 	/* fallthrough */
+     case 'f':
+ 	ba->buildAmount |= RPMBUILD_CONF;
++	ba->buildAmount |= RPMBUILD_BUILDREQUIRES;
++	if (!noDeps) {
++	    ba->buildAmount |= RPMBUILD_DUMPBUILDREQUIRES;
++	    ba->buildAmount |= RPMBUILD_CHECKBUILDREQUIRES;
++	}
+ 	if ((buildChar == 'f') && shortCircuit)
+ 	    break;
+ 	/* fallthrough */
++    case 'p':
++	ba->buildAmount |= RPMBUILD_PREP;
++	break;
++    case 'l':
++	ba->buildAmount |= RPMBUILD_FILECHECK;
++	break;
+     case 'r':
++	/* fallthrough */
+     case 'd':
++	if (!shortCircuit)
++	    ba->buildAmount |= RPMBUILD_PREP;
+ 	ba->buildAmount |= RPMBUILD_BUILDREQUIRES;
+ 	ba->buildAmount |= RPMBUILD_DUMPBUILDREQUIRES;
+ 	if (!noDeps)
+ 	    ba->buildAmount |= RPMBUILD_CHECKBUILDREQUIRES;
+-	if ((buildChar == 'r' || buildChar == 'd') && shortCircuit)
++	if (buildChar == 'd')
+ 	    break;
+ 	/* fallthrough */
+-    case 'p':
+-	ba->buildAmount |= RPMBUILD_PREP;
+-	break;
+-    case 'l':
+-	ba->buildAmount |= RPMBUILD_FILECHECK;
+-	break;
+     case 's':
+ 	ba->buildAmount |= RPMBUILD_PACKAGESOURCE;
+ 	break;
+diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at
+index b7bd0d7f0..6142bb1ae 100644
+--- a/tests/rpmbuild.at
++++ b/tests/rpmbuild.at
+@@ -1707,6 +1707,38 @@ runroot rpmbuild \
+ )
+ AT_CLEANUP
+ 
++# Test that -br creates an src.rpm on success
++AT_SETUP([rpmbuild -br success])
++AT_KEYWORDS([build])
++AT_CHECK([
++RPMDB_INIT
++
++runroot rpmbuild \
++  -br  /data/SPECS/mini.spec
++],
++[0],
++[Wrote: /build/SRPMS/mini-1-1.src.rpm
++],
++[],
++)
++AT_CLEANUP
++
++# Test that -br creates an src.rpm on success
++AT_SETUP([rpmbuild -br success])
++AT_KEYWORDS([build])
++AT_CHECK([
++RPMDB_INIT
++
++runroot rpmbuild \
++  -br  /data/SPECS/mini.spec
++],
++[0],
++[Wrote: /build/SRPMS/mini-1-1.src.rpm
++],
++[],
++)
++AT_CLEANUP
++
+ # ------------------------------
+ # Check dynamic build requires
+ AT_SETUP([rpmbuild -bd with errors])
+-- 
+2.35.1
+

diff --git a/0001-Fix-rpmbuild-br-not-building-.src.rpm-regression-RhB.patch b/0001-Fix-rpmbuild-br-not-building-.src.rpm-regression-RhB.patch
deleted file mode 100644
index 3214413..0000000
--- a/0001-Fix-rpmbuild-br-not-building-.src.rpm-regression-RhB.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From feeeca5148ceadba5fa0af13bfabda0b716566d5 Mon Sep 17 00:00:00 2001
-Message-Id: <feeeca5148ceadba5fa0af13bfabda0b716566d5.1650961200.git.pmatilai@redhat.com>
-From: Panu Matilainen <pmatilai@redhat.com>
-Date: Tue, 26 Apr 2022 11:00:41 +0300
-Subject: [PATCH] Fix rpmbuild -br not building .src.rpm regression
- (RhBug:2078744)
-
-Successful rpmbuild -br needs to produce an src.rpm, this was untested
-in the testsuite and commit ad8b9bd2ca93cf4319680f056bb40bfc24661991
-missed this twist in the logic. Fixing is an obvious one-liner now,
-add a test to ensure it doesn't happen again.
----
- rpmbuild.c        |  4 ++++
- tests/rpmbuild.at | 16 ++++++++++++++++
- 2 files changed, 20 insertions(+)
-
-diff --git a/rpmbuild.c b/rpmbuild.c
-index de78976ff..da3810f75 100644
---- a/rpmbuild.c
-+++ b/rpmbuild.c
-@@ -667,6 +667,10 @@ int main(int argc, char *argv[])
- 	    break;
- 	/* fallthrough */
-     case 'r':
-+	/* build src.rpm only on explicit -br */
-+	if (buildChar == 'r')
-+	    ba->buildAmount |= RPMBUILD_PACKAGESOURCE;
-+	/* fallthrough */
-     case 'd':
- 	ba->buildAmount |= RPMBUILD_BUILDREQUIRES;
- 	ba->buildAmount |= RPMBUILD_DUMPBUILDREQUIRES;
-diff --git a/tests/rpmbuild.at b/tests/rpmbuild.at
-index b7bd0d7f0..8746fa501 100644
---- a/tests/rpmbuild.at
-+++ b/tests/rpmbuild.at
-@@ -1707,6 +1707,22 @@ runroot rpmbuild \
- )
- AT_CLEANUP
- 
-+# Test that -br creates an src.rpm on success
-+AT_SETUP([rpmbuild -br success])
-+AT_KEYWORDS([build])
-+AT_CHECK([
-+RPMDB_INIT
-+
-+runroot rpmbuild \
-+  -br  /data/SPECS/mini.spec
-+],
-+[0],
-+[Wrote: /build/SRPMS/mini-1-1.src.rpm
-+],
-+[],
-+)
-+AT_CLEANUP
-+
- # ------------------------------
- # Check dynamic build requires
- AT_SETUP([rpmbuild -bd with errors])
--- 
-2.35.1
-

diff --git a/rpm.spec b/rpm.spec
index 427e622..e05e7b8 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -30,7 +30,7 @@
 
 %global rpmver 4.18.0
 %global snapver alpha1
-%global baserelease 3
+%global baserelease 4
 %global sover 9
 
 %global srcver %{rpmver}%{?snapver:-%{snapver}}
@@ -58,8 +58,7 @@ Patch3: rpm-4.9.90-no-man-dirs.patch
 # Patches already upstream:
 Patch100: 0001-Fix-OpenPGP-key-ID-parsing-regression.patch
 Patch101: 0001-Revert-Fix-shared-colored-files-not-removed-on-erasu.patch
-Patch102: 0001-Fix-rpmbuild-br-not-building-.src.rpm-regression-RhB.patch
-Patch103: 0001-Fix-regression-on-dynamic-buildrequires-with-ba-node.patch
+Patch102: 0001-Fix-regressions-on-dynamic-buildrequires-cli-switche.patch
 
 # These are not yet upstream
 Patch906: rpm-4.7.1-geode-i686.patch
@@ -614,6 +613,9 @@ fi
 %doc docs/librpm/html/*
 
 %changelog
+* Tue Apr 26 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.4
+- Further dynamic buildrequires cli switch regression fixes (#2078744)
+
 * Tue Apr 26 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.3
 - Fix rpmbuild -ba --nodeps regression wrt dynamic buildrequires (#2078744)
 

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

only message in thread, other threads:[~2026-11-23  9:34 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:34 [rpms/rpm] pmatilai-v6: Further dynamic buildrequires cli switch regression fixes (#2078744) Panu Matilainen

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