Marking files in /etc/cron.* as %config
David Mansfield
fedora at dm.cobite.com
Mon Mar 17 14:29:02 UTC 2008
On Sun, 2008-03-16 at 10:57 +0000, Tim Jackson wrote:
> In the awstats package we have a cron.hourly script which updates
> statistics. It's currently (intentionally on the part of the Fedora
> maintainer Aurelien) marked as %config(noreplace), on the basis that users
> expect to be able to edit these scripts and don't expect RPMs to clobber
> them. I noticed today that rpmlint complains about this:
>
> awstats.noarch: E: executable-marked-as-config-file /etc/cron.hourly/awstats
>
> I had a look in the guidelines and couldn't see anything explicit about
> this case. I can see the arguments both ways. Personally I generally leave
> RPM-installed /etc/cron.* scripts alone where I can, and install my own
> ones if I want to do something different. However I can see that not
> everyone would do that. Additionally, there is the complication that (as
> with awstats) people might not like the default functionality (e.g. they
> might want to update their stats every day, not every hour).
>
> One way of solving this would be to do it in a similar way to how we do
> init scripts e.g. have /etc/sysconfig/awstats with:
>
> UPDATEFREQ=hourly|daily|none
>
> and have the default-installed cron.* scripts act accordingly.
>
> Alternatively, clamav drops a crontab file into /etc/cron.d which in turn
> calls an update script. Since this is not an executable, rpmlint won't
> complain.
>
> Any comments? I think we should cover this in the guidelines.
>
Specifically to awstats: I have had to modify the cron.d script in order
to add environment variables necessary for some further customizations
we had made to the config for a few sites.
In general, I think the 'executableness' of these is irrelevant: they
are config files and should be marked so in rpm. All files that could
conceivable be edited in /etc should be marked as config IMHO, and all
OTHER files should be removed from etc. cf some previous discussion on
the hal/freedesktop files: they were moved to /usr because people kept
editing them and getting screwed.
Thanks,
David
More information about the devel
mailing list