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: Patch to go with previous commit (yep, it's a Monday)
Date: Mon, 23 Nov 2026 09:34:54 GMT [thread overview]
Message-ID: <179542649402.1.17246129620228653099.rpms-rpm-1cc558ee1f57@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 1cc558ee1f57800d07ca9ac3d6b4ce56af88e156
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2023-05-29T11:02:50+03:00
Stats : +58/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/1cc558ee1f57800d07ca9ac3d6b4ce56af88e156?branch=pmatilai-v6
Log:
Patch to go with previous commit (yep, it's a Monday)
---
diff --git a/0001-Revert-_smp_build_ncpus-change-to-a-parametric-macro.patch b/0001-Revert-_smp_build_ncpus-change-to-a-parametric-macro.patch
new file mode 100644
index 0000000..664b174
--- /dev/null
+++ b/0001-Revert-_smp_build_ncpus-change-to-a-parametric-macro.patch
@@ -0,0 +1,58 @@
+From 673bd62bd3035575f8fad501f1395b09a0f9f8fe Mon Sep 17 00:00:00 2001
+Message-Id: <673bd62bd3035575f8fad501f1395b09a0f9f8fe.1685346662.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Mon, 29 May 2023 10:34:57 +0300
+Subject: [PATCH] Revert %_smp_build_ncpus change to a parametric macro
+ (RhBug:2210347)
+
+Commit a213101bc3af65c860d045c65fb4e2ef7566a4c6 changed %_smp_build_ncpus
+into a parametric macro, but this breaks common usage via the Lua macros
+table as parametric macros are returned as closures rather than the
+expanded value.
+
+This seems like a design flaw of the macros table, but as an immediate
+remedy for the breakage, add another layer of indirection to revert
+%_smp_build_ncpus back to a non-parametric macro.
+
+Fixes %constrain_build macro in Fedora, which ironically is made obsolete by
+the change that (unintentionally) broke it.
+---
+ macros.in | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/macros.in b/macros.in
+index 5521daba8..4dc6e3ca3 100644
+--- a/macros.in
++++ b/macros.in
+@@ -717,21 +717,23 @@ Supplements: (%{name} = %{version}-%{release} and langpacks-%{1})\
+ # Macro to fix broken permissions in sources
+ %_fixperms %{__chmod} -Rf a+rX,u+w,g-w,o-w
+
+-# Maximum number of CPU's to use when building, 0 for unlimited.
+-#%_smp_ncpus_max 0
+-
+-%_smp_build_ncpus() %([ -z "$RPM_BUILD_NCPUS" ] \\\
++%__smp_use_ncpus() %([ -z "$RPM_BUILD_NCPUS" ] \\\
+ && RPM_BUILD_NCPUS="%{getncpus %{?1}}"; \\\
+ ncpus_max=%{?_smp_ncpus_max}; \\\
+ if [ -n "$ncpus_max" ] && [ "$ncpus_max" -gt 0 ] && [ "$RPM_BUILD_NCPUS" -gt "$ncpus_max" ]; then RPM_BUILD_NCPUS="$ncpus_max"; fi; \\\
+ echo "$RPM_BUILD_NCPUS";)
+
++# Maximum number of CPU's to use when building, 0 for unlimited.
++#%_smp_ncpus_max 0
++
++%_smp_build_ncpus %{__smp_use_ncpus:proc}
++
+ %_smp_mflags -j${RPM_BUILD_NCPUS}
+
+ # Maximum number of threads to use when building, 0 for unlimited
+ #%_smp_nthreads_max 0
+
+-%_smp_build_nthreads %{_smp_build_ncpus:thread}
++%_smp_build_nthreads %{__smp_use_ncpus:thread}
+
+ # Assumed task size of processes and threads in megabytes.
+ # Used to limit the amount of parallelism based on available memory.
+--
+2.40.1
+
reply other threads:[~2026-11-23 9:34 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=179542649402.1.17246129620228653099.rpms-rpm-1cc558ee1f57@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