[packages/rpm-pld-macros] Use existing __smp_use_ncpus. We stop doing /2 as this was introduced in 2012 to not hog machines at
arekm
arekm at pld-linux.org
Thu Apr 16 08:59:31 CEST 2026
commit 545922059f7a256c6aab4cdbff3900052be55a10
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Apr 16 08:59:13 2026 +0200
Use existing __smp_use_ncpus. We stop doing /2 as this was introduced in 2012 to not hog machines at that time. We also get capability of limiting max cpus via _smp_ncpus_max
macros.pld | 4 +++-
rpm-pld-macros.spec | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/rpm-pld-macros.spec b/rpm-pld-macros.spec
index 50746f4..e14521b 100644
--- a/rpm-pld-macros.spec
+++ b/rpm-pld-macros.spec
@@ -1,4 +1,4 @@
-%define rpm_macros_rev 2.059
+%define rpm_macros_rev 2.060
%define find_lang_rev 1.42
# split into individual X_prov_ver if there is a reason to desync
%define prov_ver 4.15
diff --git a/macros.pld b/macros.pld
index 5b6e48b..56b49f2 100644
--- a/macros.pld
+++ b/macros.pld
@@ -224,7 +224,9 @@ pakietu oraz przy odpluskwianiu samego pakietu.\
#
# if you want to disable parallel build do:
# echo '%__jobs %{nil}' >> ~/.rpmmacros
-%__jobs %{expand:%%global __jobs %(_NCPUS=$(/usr/bin/getconf _NPROCESSORS_ONLN); [ "$_NCPUS" -gt 3 ] && echo $(($_NCPUS / 2)))%%{nil}}%__jobs
+#
+# to cap parallelism in a spec: %define _smp_ncpus_max 16
+%__jobs %{expand:%%global __jobs %{__smp_use_ncpus}}%__jobs
%_smp_build_ncpus %{__jobs}
%_smp_build_nthreads %{__jobs}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/rpm-pld-macros.git/commitdiff/545922059f7a256c6aab4cdbff3900052be55a10
More information about the pld-cvs-commit
mailing list