Red Hat: What are you supposed to do with a Kernel Source RPM?

Red Hat: What are you supposed to do with a Kernel Source RPM?

Post by Jeremy Mathe » Sat, 24 Oct 1998 04:00:00



I downloaded kernel-2.0.35-7.src.rpm from Sunsite, logged in as root and
"rpm -Uvh"'d it.  I got nothing in /usr/src/linux, where I'd hope to find it,
but instead got stuff in /usr/src/redhat, where I guess I expect it
(having used RH SRPM's before).  What I got was a whole bunch of files in
/usr/src/redhat/SOURCES and one "interesting" file in /usr/src/redhat/SPECS.

However, there is nothing in the SOURCES dir telling you what to unpack
and what to do to get to a normal kernel source setup (in /usr/src/linux).

Where do I go from here?  (I did look at the linux-2.0.34.tar.gz file
and the patch-2.0.35.gz file - and I think I see the general direction
they want you to go in - install the 2.0.34 sources and then apply the
patch to get to 2.0.35).

Here is the contents of my /usr/src/redhat/SOURCES dir (as far as I can
tell, this was empty before today):

total 8609
   1 drwxr-xr-x   2 root     root         1024 Oct 23 15:52 .
   1 drwxr-xr-x   7 root     root         1024 Oct 20 13:32 ..
 153 -rw-rw-r--   1 root     root       155473 Nov  7  1997 axp-diffs-2.0.31.patch
  21 -rw-rw-r--   1 root     root        19845 Mar 20  1997 bpcd.c
  60 -rw-r--r--   1 root     root        60043 Jul 31 10:34 gdtp2031
   1 -rw-rw-r--   1 root     root          498 Feb 26  1998 ibcs-2.0-make.patch
   1 -rw-rw-r--   1 root     root          608 Aug 25  1997 ibcs-2.0.970513-glibc.patch
   1 -rw-rw-r--   1 root     root          858 Nov  9  1997 ibcs-2.0.970513-nonsmp.patch
 200 -rw-r--r--   1 root     root       202807 Aug 25  1997 ibcs-2.0.970513.tar.gz
   1 -rw-rw-r--   1 root     root          728 Mar 25  1997 installkernel
   6 -rw-r--r--   1 root     root         5936 Apr 21  1997 kernel-config.axp
   8 -rw-rw-r--   1 root     root         8134 Jul 27 12:46 kernel-config.i386
   1 -rw-rw-r--   1 root     root          378 Jun 19  1996 kernel-make.patch
  39 -rw-r--r--   1 root     root        38815 Apr 21  1997 linux-2.0.30-alphamachines.patch.gz
 140 -rw-r--r--   1 root     root       141769 Dec 29  1997 linux-2.0.30-sound-20.patch
   1 -rw-r--r--   1 root     root          341 May  5 20:50 linux-2.0.34-firewallmoduleHACK.patch
6711 -rw-rw-r--   1 root     root      6842843 Jun  4 08:19 linux-2.0.34.tar.gz
  12 -rw-r--r--   1 root     root        11773 Sep  2  1996 module-info
 465 -rw-r--r--   1 root     root       472352 Jul 14 14:49 patch-2.0.35.gz
   1 -rwxr-xr-x   1 root     root          503 Oct  6  1997 pcmcia-cs-2.8.8-network.script
   1 -rw-rw-r--   1 root     root          965 Aug  3 12:26 pcmcia-cs-3.0.0-chkconfig.patch
   1 -rw-r--r--   1 root     root          700 Aug  3 12:35 pcmcia-cs-3.0.0-preferred.patch
 773 -rw-r--r--   1 root     root       787281 Aug  1 07:46 pcmcia-cs-3.0.4.tar.gz
   1 -rw-rw-r--   1 root     root          109 Jul  1 11:38 rhkmvtag.c
   9 -rw-rw-r--   1 root     root         8898 Feb 26  1998 unistd.h

 
 
 

Red Hat: What are you supposed to do with a Kernel Source RPM?

Post by Thornton Prim » Sat, 24 Oct 1998 04:00:00



> I downloaded kernel-2.0.35-7.src.rpm from Sunsite, logged in as root and
> "rpm -Uvh"'d it.  I got nothing in /usr/src/linux, where I'd hope to find it,
> but instead got stuff in /usr/src/redhat, where I guess I expect it
> (having used RH SRPM's before).  What I got was a whole bunch of files in
> /usr/src/redhat/SOURCES and one "interesting" file in /usr/src/redhat/SPECS.

The src.rpm files are the sources to the RPM ... what you were probably
looking for was kernel-source-2.0.35-7.i386.rpm and
kernel-headers-2.0.35-7.i386.rpm ... It is kinda strange, but it makes
sense once you get used to RPM files.

The SPEC is the specification file ... intructions on how to build the
package file. If you type rpm -ba <SPECFILE> it would build

kernel-2.0.35-*.i386.rpm
kernel-headers-2.0.35-*.i386.rpm
kernel-ibcs-2.0.35-*.i386.rpm
kernel-pcmcia-2.0.35-*.i386.rpm
kernel-source-2.0.35-*.i386.rpm

[though the list will vary depending on your architecture]

Quote:> However, there is nothing in the SOURCES dir telling you what to unpack
> and what to do to get to a normal kernel source setup (in /usr/src/linux).

> Where do I go from here?  (I did look at the linux-2.0.34.tar.gz file
> and the patch-2.0.35.gz file - and I think I see the general direction
> they want you to go in - install the 2.0.34 sources and then apply the
> patch to get to 2.0.35).

I usually ignore the RedHat RPMS for kernel, go to ftp.kernel.org,
download the latest kernel tarred/bzipped (or just the patch if it is
only one or two). I then remove or rename my existing /usr/src/linux dir
and unpack there ... then follow the instructions.

You could download the kernel-src-*.i386.rpm file, download it, install
it, then build your own kernel (it installs the files into
/usr/src/linux as you would expect).

You COULD also unpack the src.rpm file (as you have done), play with the
spec file, add your own patches, etc., then build the kernel binary rpms
yourself. The advantage of this is that if you have several machines
with identical or nearly identical kernel requirements you can easily
distribute and synchronize kernel versions.

You might want to visit www.rpm.org and read the RPM HOWTO and FAQ for
more info on the difference between src.rpm files and
{noarch|i386|i586|i686|sparc|alpha|ppc|sparc64}.rpm files. They have
complete instructions on how to make RPM files too.

thornton

 
 
 

1. Red Hat 7.1 - Installing Red Hat packages after Red Hat is already installed.

How can I install packages that I forgot to install with the Red Hat
7.1 installation?

Here's my problem:
Various pieces of Red Hat keep saying that I am missing a file and
that it needs to be installed with a certain package (namely most of
the Kontrol Panel).  But I have been unsuccessful at finding where
this is done.  I am still a newbie with Linux, but I would assume that
there should be an "Add/Remove Programs" equivalent with Linux.

Please help!

2. xmkmf for Motif clients under Solaris 2.4

3. Can't find iostream.h... what rpm pagckages am I suppose to install?

4. glibc...HELP! :o

5. Red Hat: Keeping Old Sources when Upgrading w/ RPM?

6. HFS+ driver

7. Emacs sources and Red Hat RPMs

8. Placing time limits on reads and other system calls

9. Red Hat RPM troubles: cannot install kernel-header

10. Red Hat: Env vars HOST & HOSTNAME - are they supposed to be the same?

11. util-linux-rhcn-2.9r RPMs for Red Hat 5.2/6.0 and kernel 2.2

12. Red Hat (rpm) kernel upgrades?

13. util-linux-rhcn-2.9i RPMs for Red Hat 5.2 and kernel 2.2.x