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
wget http://mirrors.kernel.org/fedora/releases/11/Fedora/source/SRPMS/kernel-2.6.29.4-167.fc11.src.rpm
transfer the source-rpm into a cpio file:
rpm2cpio kernel-2.6.29.4-167.fc11.src.rpm > 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.
Montag, 15. November 2010
Abonnieren
Posts (Atom)