From: Don Zickus <dzickus(a)redhat.com>
Use _smp_build_nthreads for rpm eval
rpm-4.18.1 recently modified how _smp_mflags is defined and it breaks
tarball creation: rpm --eval %{_smp_mflags} because the output is
'-j${RPM_BUILD_NCPUS}' instead of '-j8'.
While that is being worked on, let's simplify things and use what we
already have: RHJOBS.
Now the user controls how many threads with 'make -jX'.
Signed-off-by: Don Zickus <dzickus(a)redhat.com>
diff --git a/redhat/scripts/create-tarball.sh b/redhat/scripts/create-tarball.sh
index blahblah..blahblah 100755
--- a/redhat/scripts/create-tarball.sh
+++ b/redhat/scripts/create-tarball.sh
@@ -4,7 +4,7 @@
[ "$DISTRO" != "fedora" ] && _GITID="$GITID" ||
_GITID="$MARKER"
# shellcheck disable=SC1083
-XZ_THREADS=$(rpm --eval %{_smp_mflags} | sed -e 's!^-j!--threads !')
+XZ_THREADS="--threads $RHJOBS"
ARCH=$(arch)
XZ_OPTIONS=""
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2370