'make rpm' fails

Hi all,

I’m running openSUSE 12.2 on Acer Aspire 4741 laptop. I’ve issue with ACPI as discussed here and here. The solution is to apply the ec.c patch and recompile the kernel.

I’ve successfully applied this method on Slackware and Debian and they work just fine. While trying to compile the patched kernel in openSUSE the ‘make rpm’ command fails as follows:

openSuSE:/usr/src/linux # make rpm
scripts/kconfig/conf --silentoldconfig Kconfig
/bin/sh /usr/src/linux-3.4.11-2.16/scripts/package/mkspec > /usr/src/linux-3.4.11-2.16/kernel.spec
make clean
set -e; cd -P ..; ln -sf /usr/src/linux-3.4.11-2.16 kernel-3.4.11_2.10_desktop_sv
/bin/sh /usr/src/linux-3.4.11-2.16/scripts/setlocalversion --save-scmversion
set -e; cd -P ..; tar -cz --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git -f kernel-3.4.11_2.10_desktop_sv.tar.gz kernel-3.4.11_2.10_desktop_sv/.
set -e; cd -P ..; rm kernel-3.4.11_2.10_desktop_sv
rm -f /usr/src/linux-3.4.11-2.16/.scmversion
set -e; \
/bin/sh /usr/src/linux-3.4.11-2.16/scripts/mkversion > /usr/src/linux-3.4.11-2.16/.tmp_version
set -e; \
mv -f /usr/src/linux-3.4.11-2.16/.tmp_version /usr/src/linux-3.4.11-2.16/.version
rpm  --target x86_64 -ta ../kernel-3.4.11_2.10_desktop_sv.tar.gz
rpm: --target: unknown option
make[1]: *** [rpm] Error 1
make: *** [rpm] Error 2

After this I compiled the kernel regular way which is ‘make && make modules_install’. This method worked and my issue with ACPI is solved.

However, I would like to know why I’m not able to create patched-kernel rpm. I think creating an rpm package of the kernel(+initrd) will make it easier to handle them with package managers. Strangely README.SUSE does not talk about ‘make rpm’. But a random read on GregKH’s google+ page has suggestion by Joose to handle kernels in rpm format.

While I primarily request your help on the solving ‘make rpm’ command’s error as given above, I would also request you to point me to some reading on proper kernel compilation method in openSUSE.

Thanks, SV

On 2012-12-21 21:16, saivnoba wrote:
> While I primarily request your help on the solving ‘make rpm’ command’s
> error as given above, I would also request you to point me to some
> reading on proper kernel compilation method in openSUSE.

I don’t know, I never tried (I use make install). However, it seems that
nowdays they prefer to use the buildservice, and it is possible that the
rpm target is broken because they do not use it. Actually some devs
frown upon you if you tell them that you do not use the buildservice but
standalone make… There have been hot discussions about this in the
maillists.

By the way, I see a “make clean” in your text. Never use the mr_proper
target on openSUSE, it breaks things, IMHO.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

It’s strange then that they have not updated the README.SUSE file to reflect their preference for buildservice. Please point me to any reading regarding the buildservice method.

By the way, I see a “make clean” in your text. Never use the mr_proper
target on openSUSE, it breaks things, IMHO.

I remember reading this warning in comment section on some blog entry regarding opensuse kernel compilation. But I did not type it myself. It was part of the ‘make rpm’ command. All I did was patch->make cloneconfig->make menuconfig->make && make modules_install(after make rpm failed)->make install.

Thanks, SV

On 2012-12-22 03:16, saivnoba wrote:

All I did was patch->make
> cloneconfig->make menuconfig->make && make modules_install(after make
> rpm failed)->make install.
>

There is one step more you need after cloneconfig: change kernel name in
menuconfig. This is because the kernel name is used to create the
directory where the modules go; if you use the same unmodified name as
openSUSE, you kernel replaces the original kernel instead of appear as a
new, different one. If it fails and doesn’t boot, you can not boot the
previous one, it no longer exist.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

You need to install rpm-build package.