how to declare %config with a list of files ?

Toshio Kuratomi a.badger at gmail.com
Fri Jul 22 06:41:37 UTC 2011


On Fri, Jul 22, 2011 at 07:45:57AM +0200, Olivier Sallou wrote:
> Hi,
> I have in my package config (/etc) a large list of files.
> Is there a way to define the %config from a list of file rather than
> listing individually each of the file ?
> 
> Something like:
> 
> %config -f list_of_my_etc_files
> 
You can use wildcards:

%files
%config(noreplace) %{_sysconfdir}/foo/*.cfg


Or, if you already have the list of files in a file:

%install
command_that_outputs_config_files > list_of_my_etc_files
sed -i list_of_my_etc_files 's!^/etc!%config(noreplace) %{_sysconfdir}!'

%files -f list_of_my_etc_files

-Toshio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/devel/attachments/20110721/2994f15b/attachment-0001.bin 


More information about the devel mailing list