Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Now, since the config file is already included in the %{prefix}/htdocs/ line I get the warning 'File listed twice'.

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?

like image 809
JochenJung Avatar asked Oct 21 '22 18:10

JochenJung


1 Answers

Unfortunately not. RPM is quite oldschool software, but works fine :-)

But you can use globs too:

%files
%{prefix}/htdocs/*.png
%{prefix}/htdocs/*.html

etc.

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.

like image 109
lzap Avatar answered Oct 31 '22 11:10

lzap