how to 'rip apart' a rpm.

Germán A. Racca german.racca at gmail.com
Sat May 15 15:31:53 UTC 2010


On Sat, 2010-05-15 at 09:22 -0600, reg at dwf.com wrote: 
> I want to look at the individual files in a src rpm.
> How do I 'rip it apart' ??
> Doing an install doesnt seem to be the answer, It does something, but I
> have no idea where the bits and pieces are going.
> They are NOT in /usr/src/redhat nor in /root/rpmbuild.
> -- 
>                                         Reg.Clemens
>                                         reg at dwf.com

Hi Reg:

You can do the following to see the files (it can be srpm or rpm):

$ rpm2cpio file.srpm | cpio -t

and to extract the files:

$ rpm2cpio file.srpm | cpio -ivd

If you install the source rpm file I guess it is extracted into the rpm
build tree, that is:

~/rpmbuild/SPECS/ for the spec file
~/rpmbuild/SOUCES/ for the tarball and patches

but I'm not sure about this.

Hope this helps.

Cheers,
Germán.
-- 
Germán A. Racca
National Institute for Space Research (INPE)
São José dos Campos - SP - Brasil
http://gracca.tk - http://graccablog.tk



More information about the users mailing list