Montag, 15. November 2010

unpacking of source rpm's

Sometimes I have the problem to install a source rpm package on a non-rpm based linux distribution (in my case gentoo linux). In opposite to a source tarball, a source rpm can cause a bit of a headache to get the sourcecode. If you know the way, it's easy though... so here's the solution:

get the source-rpm into your test directory in home, e.g. with fedora kernel sources:

cd {HOME}/test

transfer the source-rpm into a cpio file:

rpm2cpio kernel- > kernelsource.cpio

Now it's easy to unpack the cpio package:
cpio --extract --make-directories < kernelsource.cpio

Voilà, we have now the source code in our test directory.

Keine Kommentare: