[ale] RPM PITA: how to extract files without installing the rpm

Keith Hopkins hne at hopnet.net
Sun Mar 9 03:13:07 EST 2003


Keith Hopkins wrote:
> Hi all,
> 
>   How do you extract individual files from an rpm file, without installing the rpm?
> 
>   The thing is, I have the latest mysql rpm files from mysql, but they don't include the /etc/init.d/mysql and /etc/logrotate.d/mysql files that are included in the mysql rpms that come with my distro.  So, I want to rip those two files our of the distro rpms.  I looked at the --root option of rpm, but it requires setting up a fake root complete with an rpm database.
> 
>   Any ideas?  alien? rpm2pkg?
> 

Hey, this works...  :-)

cd to empty directory
rpm2cpio file_to_extract_from.rpm | cpio -i --make-directories [filename_to_extract]

-- 
Lost in Tokyo,
  Keith


_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list