English 中文(简体)
rpm2cpio并没有显示RPM包中包含的每个文件
原标题:rpm2cpio doesn t show every file included in the RPM package
  • 时间:2023-07-13 20:09:15
  •  标签:
  • rpm
  • rpm-spec

“whois”包使用Linux“alternates”系统(因为也许jwhois是一种替代方案?)它似乎将/usr/bin/wois打包为符号链接,但尚不清楚如何做到这一点。运行rpm-qp--list whois--5.5.1-2.el8.x86_64.rpm可以得到以下结果:

/etc/whois.conf
/usr/bin/whois
/usr/bin/whois.md
...more files...

但是,rpm2cpio whois--5.5.1-2.el8.x86_64.rpm|cpio-itv显示上一个命令中的所有文件,但/usr/bin/wois除外。

运行rpm-qf/usr/bin/wois表明文件确实是由whois包提供的,该包确实使用了替代系统,如运行rpm-qp脚本whois--5.5.1-2.el8.x86_64.rpm所示,该包包括:

postinstall scriptlet (using /bin/sh):
/usr/sbin/update-alternatives 
    --install /usr/bin/whois 
        whois /usr/bin/whois.md 30 

但是,这并不能解释为什么/usr/bin/wois没有出现在cpio档案中。我有两个理论,但我不知道如何确定哪一个是正确的:

  1. The file /usr/bin/whois is "special" in the RPM so it doesn t appear in rpm2cpio; or
  2. Cpio detects that /usr/bin/whois is a symlink that doesn t point to another file in the archive, and thus does not list it.

这是关于Linux“替代品”系统的信息收集。我想制作我自己的“替代品”,但我不知道是否应该在RPM中包含符号链接。

问题回答

文件/usr/bin/wois实际上并不包含在RPM中。它是通过调用/usr/sbin/update alternates生成的。

它似乎是由于规范文件中的%ghost指令而包含在内的。这样可以确保在卸载时将其删除。

多个程序包可以使用%ghost指令指定同一个文件,rpm-qf将显示它们属于这两个程序包,因此只有在卸载这两个软件包时才会被删除。





相关问题
How can I make an RPM depend on package a OR package b?

This seems like a simple question, but the docs don t seem to have anything to say on the subject. I would like to do something like Requires: vim or emacs but when I do that, I in fact depend on vim,...

rpm build error

I tried to build a rpm package which is giving me the following error /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/RPMS find: invalid predicate ` error: Bad exit status from /var/tmp/rpm-tmp....

find latest version of rpms from a mirror

I want to write a script to find the latest version of rpm of a given package available from a mirror for eg: http://mirror.centos.org/centos/5/updates/x86_64/RPMS/ The script should be able to run ...

How to put license agreement in spec file, RPM

I am using Fedora 10 linux. I want to put license agreement for my spec file. Actually I have created rpm for my application. So my application gets installed perfectly without asking for license ...

How to write .spec file to check JRE version in Fedora 10

I am using fedora 10 linux. I have created an RPM for my software it works fine. But I want the follwing feature "If I install RPM it will check whether JRE 1.5 or greater is availble in that system ...

How to create Customized group in RPM, Fedora

Hi I am using Fedora 10 linux. I have created an rpm for my application. I can run my going to manubar and then application under Applications----> Others--> MyApplication. But I want my ...

How to delete some extra folder using rpm

I am using Fedora 10, I have created an rpm file for my software. It removes all the files from the installed directory. If i use yum remove command or rpm -e command. but after installation my ...

热门标签