View Full Version : [SOLVED] Does anyone know how to build a release kernel from the kernel-$(uname -r).src.rpm?
4th March 2012, 02:57 PM
I've been trying to build a non-debug kernel from the F17 alpha kernel source (yumdownloader --source kernel) but the build ends up being a debug build, I can see that from the installed config with grep "DEBUG" /boot/config-$(uname -r).
I've built it with "rpmbuild -bb --without debug,debuginfo" and even changed some kernel configs from the .src.rpm, it still ends up being a debug build
Does anyone know how to build a non-debug release kernel?
4th March 2012, 03:08 PM
4th March 2012, 07:22 PM
ok I found that there's a "release" switch to rpmbuild, supposedly one should be able to do "rpmbuild -bb --with release some.spec" but I don't know if the switch has any effect since it's not documented in man rpmbuild.
---------- Post added at 08:13 PM ---------- Previous post was at 04:25 PM ----------
I built the spec with:
rpmbuild -bb --with release --without debug --without debuginfo kernel.spec
But as it seems from the config file that ends up packaged with the rpm (That is later placed in /boot/), that it's still a debug build. grep "CONFIG_DEBUG" config-3.3.0-0.rc5.git3.1.fc17.x86_64:
---------- Post added at 08:22 PM ---------- Previous post was at 08:13 PM ----------
Nevermind, it seems to be a release build this time.
Steps to build a really fast "release" kernel:
$ yumdownloader --source kernel
$ rpm -ivh kernel*rpm
$ cd $HOME/rpmbuild/SPECS
$ rpmbuild -bb --with release --without debug --without debuginfo kernel.spec
$ cd $HOME/rpmbuild/RPMS/*
$ sudo rpm -Uvh --force *.rpm
5th March 2012, 09:48 PM
The other way to build a release kernel, btw, is to check the kernel package out from git (fedpkg is the easiest way to do this) and run 'make release' then 'fedpkg srpm' to generate a .src.rpm. Then you can build it directly, or via mock, or as a koji scratch build if you're allowed to.
5th March 2012, 10:08 PM
Sounds great if you can make the srpm that way from the latest source!
- Bulancak Photos on Instagram
- Shache Instagram Photos
vBulletin® v3.8.7, Copyright ©2000-2014, vBulletin Solutions, Inc.