1

I have an RPM contaning files in ./var/lib which I need to extract onto my filesystem on a Debian machine. I'm trying to do this:

rpm2cpio myrpm.rpm | cpio -ivd ./var/lib

Nothis is extracted. If I specify the full path to the exact file which I want, I get it, but I need to extract the entire tree.

How can I extract the entire tree (ie: all files within a directory in the RPM) to the local filesystem?

2
  • Not sure why the directory argument is not working. This works for me: cd <destdir>; rpm2cpio /path/to/rpm | cpio -idmv Commented Apr 29, 2015 at 21:01
  • 1. Have you considered using Debian's alien to do this for you? 2. Does rpm2cpio generate paths starting ./ Commented Apr 29, 2015 at 22:51

1 Answer 1

1

I was ultimately able to do it using something like this:

rpm2cpio myrpm.rpm | cpio -ivd './var/lib/**/*'

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.