From: Michael H. Warfield (mhw_at_wittsend.com)
Date: Fri 09 May 2003 - 14:38:16 BST
On Thu, May 08, 2003 at 08:15:39PM -0700, Keith Smethers wrote:
> RedHat doesn't modify the kernel source, it applies patches to it.
> If you download the source rpm, you get the stock kernel along with the
> patches they apply. What patches and in which order are defined in the
> spec file. The spec file is used to create a shell script which does the
> extracting, patching, and compiling. Looking at the spec file or the
> shell script shows exactly what they are doing to build their kernel.
> It's a rpm thing; look up rpmbuild for further info.
Actually, just to pick a nit before the world class confusion
sets in... You are both right and wrong.
If you use the source SRPMS, you are correct. But there is another
"source" rpm in the binary RPMS. In that case, you are wrong.
The rpm from the source SRPMS installs a source tarball and a
pile of RedHat distro patches in /usr/src/redhat/SOURCES and a spec
file in /usr/src/redhat/SPECS and you go from there with rpm to build
rpm files. Making custom patches here is a royal pain in the fanny
(I'm the maintainer of record of a kernel device driver and I've gone
through the pain of adding a custom patch to the kernel rpm set) and you
have to go through the entire rpm build process. But you can snatch the
vanilla source tarball and unpack it somewhere else and build it from
scratch somewhere else if you want to.
The source rpm from the i386 binary RPMS installs an unpacked
and "RedHat patched" source distribution in /usr/src/linux-2.4... ready
to be configured and compiled for "-custom" builds. This unpacked source
tree has all the redhat patches in place. But this is where you would
normally WANT to do custom patching since you can build what you want and
only what you want without the overhead of an entire rpm build. This is
also where you would typically find the sources if you checked the
"install kernel sources" box at install. That install option doesn't
install the "src.srpm" file, it installs the "kernel.src...i386.rpm"
file. But this is also where the .ctx patches will not apply cleanly,
because they are not vanilla kernel sources.
> -- Cathy Sarisky <cathy_at_acornhosting.net> wrote:
-- Michael H. Warfield | (770) 985-6132 | mhw_at_WittsEnd.com /\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/ NIC whois: MHW9 | An optimist believes we live in the best of all PGP Key: 0xDF1DD471 | possible worlds. A pessimist is sure of it!