rpmbuild %config: "file listed twice"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Consider the following in a SPEC file:

%files %defattr(-,bubba,users,-)
...
%attr(-,root,users) %{_localstatedir}/foo/
%config %attr(-,root,root) %{_localstatedir}/foo/blah.bar


I want to include all files under foo but also specifically mark blah.bar as a config file (and its permissions may not match foo's). Doing this causes rpmbuild to complain that the file is listed twice.
I tried to add the following between the last two lines above:

%exclude %{_localstatedir}/foo/blah.bar
 
However, this seems to permanently override any other inclusion, because, despite the fact that the next %config line ought to include the file (now as a config file), blah.bar does not get installed when I install the RPM.
 
So what's the right way to do this? "Just make a list of all files in foo instead of adding the whole directory" is not a real answer. And if I simply ignore the warning, how do I know (for sure and that it's reliably reproducible behavior now and forever) whether the file gets marked as config or its inclusion as part of the directory takes precedence, or the behavior is order-dependent, or what?
 
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux