在rpm规范文件中列出两次文件 [英] File listed twice in rpm spec file
问题描述
我的规格文件的文件部分如下所示:
The files section of my spec-file looks like this:
%files
%{prefix}/htdocs/
%config %{prefix}/htdocs/share/settings/config.inc.php
现在,由于配置文件已经包含在%{prefix}/htdocs/
行中,因此我得到警告文件列出两次".
Now, since the config file is already included in the %{prefix}/htdocs/
line I get the warning 'File listed twice'.
一种解决方法是,列出%{prefix}/htdocs/
中除配置文件之外的每个文件.
One way around would be, to list every single file within %{prefix}/htdocs/
, except the config file.
但是我的问题是:与列出所有文件相比,解决这个问题是否有更好的方法?
But my question is: Is there a better way around this issue, than listing all files?
推荐答案
不幸的是没有. RPM是相当古老的软件,但是效果很好:-)
Unfortunately not. RPM is quite oldschool software, but works fine :-)
但是您也可以使用glob:
But you can use globs too:
%files
%{prefix}/htdocs/*.png
%{prefix}/htdocs/*.html
等
这将使您能够包含所有其余部分,而不必在此添加其他一些文件.这就是RPM打包程序通常这样做的方式.
This will enable you to include all the rest without some other files you do not want there. That's the way how RPM packagers do it usually.
这篇关于在rpm规范文件中列出两次文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!