Re: trivial command to extract files from an rpm file.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > As a corollary to creating the rpm file, I'd like a trivial way to
> > extract (install) a rpm file in a non-standard location, in an
> > environment where I don't have root and don't want to 'pollute' the
> > environment, to do various checks on that rpm file.
> >
> > So, how do you do this? I tried:
> >
> > rpm -i <bin.rpm> --root /tmp/myroot --nodeps
> >
> >  but it still looks like it is trying to install the files in the same
> > location as where they were packaged (ie: prefixed with slash, etc,
> > curl goes into /usr/bin/curl as usual)
> >
> > Shouldn't this command put all the files rooted in /tmp/myroot, eg.
> > /tmp/myroot/usr/bin/curl? If not, how do you make it do so?
>
>
> I believe you are looking for --prefix, but the RPM has to support the
> change.  (not sure hot to verify that).
>


Ohh.. and if you just actually want to extract the files and not perform an
install (such as the pre/post scripts) you can use rpm2cpio.

http://www.rpm.org/max-rpm/s1-rpm-miscellania-rpm2cpio.html
http://www.cyberciti.biz/tips/how-to-extract-an-rpm-package-without-installing-it.html

rpm2cpio <filename> | cpio -idmv


-greg

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux