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 a BS 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?
I have no idea which version of openSUSE you use or which application you are talking about. After reading and re-reading, I come to the conclusion that you might mean to have this thread in Developement > Programming/Scripting or Development > OpenBuild Service.
When that is the case, please confirm here where you want to have it and I will move it for you. When I am wrong with my assumption, then please explain more about what you are doing in which openSUSE.