Steve Kemp's Blog Writings relating to Debian & Free Software

Sorry I'm late. Work was murder.

Tue, 24 Jun 2008 12:32:38 GMT

I've spent a few hours recently looking at building RPM packages of GNU/Linux kernels, which has been a frustrating process.

There are many many online guides which give the impression that this is actually a pretty complex process. For example How To Compile A Kernel - The CentOS Way guide. (Did I mention how bad most of the howtoforge guides are recently?)

So, after fiddling around for an afternoon and getting lost I decided to abandon the process.

Here is a tested process for building a binary RPM kernel package:

cd linux-2.6.24.7/
make rpm

Yes this works just fine upon a Centos 5.x machine - I'm used to using make-kpkg to make a Debian kernel package, but it seems that if you just visit kernel.org and download the latest version you can build a RPM without any extra effort thanks to native support. Cool.

Now I need to work out how to create, host, and update a YUM repository. That looks fiddly and annoying too. XML. Eww. Any guides are most welcome - ultimately I need to package and host a "recent" kernel for Centos 4.x, Centos 5.x and Fedora Core 6-9 - each for i386 + amd64.

ObQuote: Spiderman

| 3 comments.

 

Comments On This Entry

[gravitar] Ben Hutchings

Submitted at 16:51:17 on 24 June 2008

I recently went through this at work so we can test our in-tree driver in the form distributions are likely to use it. I found that the RPM's postinst script (or whatever the RPM equivalent is) does not generate an initrd. And the necessary commands differ between distributions, which may be why this isn't done.
[gravitar] Steve Kemp

Submitted at 16:54:50 on 24 June 2008

In our case this isn't required - either the kernels are installed purely to satisfy dependencies, or our imaging system takes care of creating the initial ramdisk as part of the installation.

Definitely worth knowing though, and something I hadn't spotted myself.

[gravitar] Claire Connelly

Submitted at 07:14:21 on 1 July 2008

Actually, setting up a YUM repo is pretty trivial. There are scripts (notably createrepo) that do all the heavy lifting for you -- all you have to do is set up a directory structure, then run createrepo with the right arguments.


 

Comments are closed on posts which are more than ten days old.

Spiral Logo

Search

Recent Posts

Recent Tags

Links

RSS Feed

  • Subscribe to feed