[PlanetCCRMA] kernel source confusion

Frode Petersen fropeter@online.no
Wed Mar 15 06:30:03 2006

I'm trying to install the kernel source using the 
2.6.14-0.10.rrt.src.rpm file.

I use
	rpm -Uvh 2.6.14-0.10.rrt.src.rpm

to install the source.

Then, as instructed in the FC3 release notes (pasted at the bottom), I 
run (from the /usr/src/redhat/SPECS):

	rpmbuild -bp --target=i386 kernel.spec

which gave the following output:

Building target platforms: i386
Building for target i386
error: line 194: Dependency tokens must begin with alpha-numeric, '_' or 
'/': Prereq: %{kernel_prereq}
[root@x SPECS]#

I don't know whether it's helpful, but here are the lines in question:

194: Prereq: %{kernel_prereq}

referring to:

177: %{?fc4:%define kernel_prereq  fileutils, module-init-tools, 
initscripts >= 5.83, mkinitrd >= 4.2.15-1}

I'm no expert in this area, but my logic tells me that this should 
result in the following:
194: Prereq: fileutils, module-init-tools, initscripts >= 5.83, mkinitrd 
 >= 4.2.15-1
where the dependency token starts with an alpha-numeric character.

I do not know how to proceed, or whether I did something wrong. Any help 
would be most appreciated!

Frode Petersen

Excerpt from the FC3 release notes

In order to eliminate the redundancy inherent in providing a separate 
package for the kernel source code when that source code already exists 
in the kernel's .src.rpm file, Fedora Core 3 no longer includes the 
kernel-source package. Users that require access to the kernel sources 
can find them in the kernel .src.rpm file. To create an exploded source 
tree from this file, perform the following steps (note that <version> 
refers to the version specification for your currently-running kernel):


       Obtain the kernel-<version>.src.rpm file from one of the 
following sources:

             The SRPMS directory on the appropriate "SRPMS" CD iso image

             The FTP site where you got the kernel package

             By running the following command:

             up2date --get-source kernel

       Install kernel-<version>.src.rpm (given the default RPM 
configuration, the files this package contains will be written to 

       Change directory to /usr/src/redhat/SPECS/, and issue the 
following command:

       rpmbuild -bp --target=<arch> kernel.spec

       (Where <arch> is the desired target architecture.)

       On a default RPM configuration, the kernel tree will be located 
in /usr/src/redhat/BUILD/.

       In resulting tree, the configurations for the specific kernels 
shipped in Fedora Core 3 are in the /configs/ directory. For example, 
the i686 SMP configuration file is named 
/configs/kernel-<version>-i686-smp.config. Issue the following command 
to place the desired configuration file in the proper place for building:

       cp <desired-file> ./.config

       Issue the following command:

       make oldconfig

You can then proceed as usual.