Skip to contentSkip to conversation

scripts/package: don't break if %{_smp_mflags} isn't set

PATCH In review Nishanth Aravamudan 2 participants 2 messages Oct 13, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/package: don't break if %{_smp_mflags} isn't set

Same fix as in 13797b77d419fc1b16eebf2993bf7b5cea65f0bf is needed for the "new" line invoking _smp_mflags for modules_install. Without the fix, make binrpm-pkg fails with:

+ make '%{_smp_mflags}' KBUILD_SRC= modules_install
make[2]: warning: jobserver unavailable: using -j1. Add +' to parent make rule. make[2]: *** No rule to make target %{_smp_mflags}'. Stop.
error: Bad exit status from /var/tmp/rpm-tmp.8S9B9e (%install)

---
 scripts/package/mkspec |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/package/mkspec +1 -1
index 15440f5..e1c1d5b 100755
@@ -70,7 +70,7 @@ echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules'
 echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware'
 echo "%endif"
 
-echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} KBUILD_SRC= modules_install'
+echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{?_smp_mflags} KBUILD_SRC= modules_install'
 echo "%ifarch ia64"
 echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE"
 echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/"
Signature · 1 line
1.7.1
#1 lore raw
Quoted 10 lines · Nishanth Aravamudan

Same fix as in 13797b77d419fc1b16eebf2993bf7b5cea65f0bf is needed for the "new" line invoking _smp_mflags for modules_install. Without the fix, make binrpm-pkg fails with:

+ make '%{_smp_mflags}' KBUILD_SRC= modules_install
make[2]: warning: jobserver unavailable: using -j1. Add +' to parent make rule. make[2]: *** No rule to make target %{_smp_mflags}'. Stop.
error: Bad exit status from /var/tmp/rpm-tmp.8S9B9e (%install)

Thanks for the fix, applied to kbuild-2.6.git#packaging.

Michal