如何提取 rpm 的内容? [英] How do I extract the contents of an rpm?

查看:37
本文介绍了如何提取 rpm 的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 rpm,我想把它当作一个 tarball.我想将内容提取到目录中,以便检查内容.我熟悉已卸载包的查询命令.我不想简单地列出 rpm 的内容.即

I have an rpm and I want to treat it like a tarball. I want to extract the contents into a directory so I can inspect the contents. I am familiar with the querying commands of an uninstalled package. I do not simply want a list of the contents of the rpm. i.e.

$ rpm -qpl foo.rpm

我想检查 rpm 中包含的几个文件的内容.我不想安装 rpm.我还知道 rpm 可以在 %post 部分进行额外修改,以及如何检查这些.即

I want to inspect the contents of several files contained in the rpm. I do not want to install the rpm. I am also aware of the rpms ability to do additional modifictions in the %post sections, and how to check for those. i.e.

$ rpm -qp --scripts foo.rpm

但是在这种情况下,这与我无关.

However in this case that is of no concern to me.

推荐答案

你试过 rpm2cpio 命令了吗?请看下面的例子:

Did you try the rpm2cpio commmand? See the example below:

$ rpm2cpio php-5.1.4-1.esp1.x86_64.rpm | cpio -idmv

/etc/httpd/conf.d/php.conf  
./etc/php.d  
./etc/php.ini  
./usr/bin/php  
./usr/bin/php-cgi  
etc 

这篇关于如何提取 rpm 的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆