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:
kernel-2.6.25.11CUSTOM-1.x86_64.rpm
But I need to have it in the following format:
kernel-{myname}-2.6.25.11CUSTOM-1.x86_64.rpm
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
Version: 2.6.25.11CUSTOM1
Release: 1
License: GPL
Group: System Environment/Kernel
Vendor: The Linux Community
URL:
http://www.kernel.org
Source: kernel-2.6.25.11CUSTOM1.tar.gz
BuildRoot: /var/tmp/kernel-%{PACKAGE_VERSION}-root
Provides: kernel-onno-2.6.25.11CUSTOM1
When I issue a 'make rpm', I get this error:
Code:
$ make rpm
make clean
set -e; cd ..; ln -sf /usr/src/linux-2.6.25.11 kernel-2.6.25.11CUSTOM1
set -e; cd ..; tar -cz --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg --exclude .git -f kernel-2.6.25.11CUSTOM1.tar.gz kernel-2.6.25.11CUSTOM1/.
set -e; cd ..; rm kernel-2.6.25.11CUSTOM1
set -e; \
/bin/sh /usr/src/linux-2.6.25.11/scripts/mkversion > /usr/src/linux-2.6.25.11/.tmp_version
set -e; \
mv -f /usr/src/linux-2.6.25.11/.tmp_version /usr/src/linux-2.6.25.11/.version
rpmbuild --target x86_64 -ta ../kernel-2.6.25.11CUSTOM1.tar.gz
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-2.6.25.11CUSTOM1
+ /bin/gzip -dc /usr/src/kernel-2.6.25.11CUSTOM1.tar.gz
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd kernel-onno-2.6.25.11CUSTOM1
/home/onno/rpm/tmp/rpm-tmp.44904: line 31: cd: kernel-onno-2.6.25.11CUSTOM1: 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-2.6.25.11CUSTOM1: No such file or directory
Anyone an idea on how to get this working?
Kind regards,
Onno.