Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Linux - Kernel This forum is for all discussion relating to the Linux kernel.


  Search this Thread
Old 01-12-2011, 06:51 AM   #1
Registered: Oct 2007
Location: Netherlands, ZH
Posts: 32

Rep: Reputation: 15
Unable to build kernel RPM with 'custom name'. (need not kernel but kernel-something)

Hi all,

I'm trying to build a custom kernel RPM, but I need to give it a different name.
I can build a RPM as long I don't change the 'Name: kernel' part in the SPEC file. But this results in the following RPM:

But I need to have it in the following format:

This because I don't want our customers to update to this kernel when they issue a 'yum update kernel'.

My SPEC file (partially):
Name: kernel-onno
Summary: The Linux Kernel
Release: 1
License: GPL
Group: System Environment/Kernel
Vendor: The Linux Community
Source: kernel-
BuildRoot: /var/tmp/kernel-%{PACKAGE_VERSION}-root
Provides: kernel-onno-

When I issue a 'make rpm', I get this error:
$ make rpm
make clean
set -e; cd ..; ln -sf /usr/src/linux- kernel-
set -e; cd ..; tar -cz --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git -f kernel- kernel-
set -e; cd ..; rm kernel-
set -e; \
        /bin/sh /usr/src/linux- > /usr/src/linux-
set -e; \
        mv -f /usr/src/linux- /usr/src/linux-
rpmbuild --target x86_64 -ta ../kernel-
Building target platforms: x86_64
Building for target x86_64
Executing(%prep): /bin/sh -e /home/onno/rpm/tmp/rpm-tmp.44904
+ umask 022
+ cd /home/onno/rpm/BUILD
+ cd /home/onno/rpm/BUILD
+ rm -rf kernel-argeweb-
+ /bin/gzip -dc /usr/src/kernel-
+ tar -xf -
+ '[' 0 -ne 0 ']'
+ cd kernel-onno-
/home/onno/rpm/tmp/rpm-tmp.44904: line 31: cd: kernel-onno- No such file or directory
error: Bad exit status from /home/onno/rpm/tmp/rpm-tmp.44904 (%prep)

RPM build errors:
    Bad exit status from /home/onno/rpm/tmp/rpm-tmp.44904 (%prep)
make[1]: *** [rpm] Error 1
make: *** [rpm] Error 2
As you see, the make rpm makes the 'wrong' tar.gz file. At least with the wrong name! That's why the script can't 'cd' into it: cd: kernel-onno- No such file or directory
Anyone an idea on how to get this working?

Kind regards,
Old 01-12-2011, 07:30 PM   #2
Registered: May 2001
Posts: 29,361
Blog Entries: 55

Rep: Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547Reputation: 3547
Your view of priorities may not be the same as mine but there are a few things that need to be said. First of all I strongly disagree with you denying customers to (as I understand it) be able to update a kernel as this makes you responsible for down-streaming any and all fixes in the same time frame upstream releases them which you may likely not have the time for which in turn creates a liability your customers can do without: if you need to protect a package first look at what Yum may offer in terms of protection. Secondly I disagree with you mucking with package names. Doing that is against the distributions' package creation rules, definitely will result in you causing package management breakage in turn creating another liability your customers can do without (and possibly more grey hairs doe to excessive maintenance you need to perform to "fix" breakage): the easier way out could be to supply and make users poll your own repository for kernel updates. Third, and even then, customizing package names needs to follow whatever ENVRA-style ("epoch:name-version-release.architecture") parsing understands: "kernel" is a package "kernel-onno" does not and simply can not ever exist but "kernel-2.6.25-1.x86_64-onno.rpm" can. Not to be pedantic about it, and with all due respect, but if you do not grok any of the above then reading the Fedora package building rules before starting a discussion would be the most efficient approach.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to build kernel modules outside the kernel tree Rovalk Programming 2 01-19-2008 02:18 AM
Custom kernel image on custom slack build using CUSS nykey Slackware 2 07-15-2006 04:05 AM
kernel-source-2.6.5-7.src.rpm requires kernel-dummy to build!? fizzdandantilus SUSE / openSUSE 5 12-02-2004 01:48 PM
New FAQ topic: Should I edit my kernel configuration?/Should I build a custom kernel? chort *BSD 10 09-11-2004 12:15 AM
Unable to build NVIDIA kernel module / determin kernel version Night Ink Fedora 2 05-31-2004 05:54 PM > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 10:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration