Hi all,
Many packages drop config files for logrotate in /etc/logrotate.d. without requiring logrotate, which is the owner of /etc/logrotate.d, thus potentially leading to an unowned /etc/logrotate.d for users who don't want logrotate and thus remove it.
I see 2 solutions for this: 1) Add "Requires: logrotate" to all packages which put files in /etc/logrotate.d. IMHO this is not good as the user should be able to choose if he wants logrotate or not. 2) Add /etc/logrotate.d to the filesystem package, this is my preferred solution.
I would like to hear what others think, before filing a bug against filesystem requesting 2) .
Regards,
Hans
Hans de Goede wrote:
Many packages drop config files for logrotate in /etc/logrotate.d. without requiring logrotate, which is the owner of /etc/logrotate.d, thus potentially leading to an unowned /etc/logrotate.d for users who don't want logrotate and thus remove it.
I see 2 solutions for this:
- Add "Requires: logrotate" to all packages which put files in
/etc/logrotate.d. IMHO this is not good as the user should be able to choose if he wants logrotate or not. 2) Add /etc/logrotate.d to the filesystem package, this is my preferred solution.
I would like to hear what others think, before filing a bug against filesystem requesting 2) .
If the package drops a file in logrotate.d, it's likely that it is because something in the package is writing to some log file which the package expects logrotate to operate upon; if logrotate is not there to rotate them, there's a chance of filling /var. I would feel safer with option (1).
Thank you for your consideration, Davide Bolcioni
Davide Bolcioni wrote:
Hans de Goede wrote:
Many packages drop config files for logrotate in /etc/logrotate.d. without requiring logrotate, which is the owner of /etc/logrotate.d, thus potentially leading to an unowned /etc/logrotate.d for users who don't want logrotate and thus remove it.
I see 2 solutions for this:
- Add "Requires: logrotate" to all packages which put files in
/etc/logrotate.d. IMHO this is not good as the user should be able to choose if he wants logrotate or not. 2) Add /etc/logrotate.d to the filesystem package, this is my preferred solution.
I would like to hear what others think, before filing a bug against filesystem requesting 2) .
If the package drops a file in logrotate.d, it's likely that it is because something in the package is writing to some log file which the package expects logrotate to operate upon; if logrotate is not there to rotate them, there's a chance of filling /var. I would feel safer with option (1).
Currently nothing is stopping me from doing rpm -e logrotate, or rpm -e cron even, thus we already have this problem for default logfiles like /var/log/messages. Now should sysklogd have a "Requires: logrotate cron", I would hate to see that happen, I'm very happy without cron and cleaning /var/log manually sometimes. The default shouldn't fill /var/log, but users shouldn't be forced to have / use logrotate if they don't want to.
Regards,
Hans
db-fedora@3di.it (Davide Bolcioni) writes:
If the package drops a file in logrotate.d, it's likely that it is because something in the package is writing to some log file which the package expects logrotate to operate upon; if logrotate is not there to rotate them, there's a chance of filling /var.
There exist more ways to rotate logfiles; e.g. cfengine.
Enrico
Le Ven 24 novembre 2006 11:15, Hans de Goede a écrit :
Hi all,
Many packages drop config files for logrotate in /etc/logrotate.d. without requiring logrotate, which is the owner of /etc/logrotate.d, thus potentially leading to an unowned /etc/logrotate.d for users who don't want logrotate and thus remove it.
I see 2 solutions for this:
- Add "Requires: logrotate" to all packages which put files in
/etc/logrotate.d. IMHO this is not good as the user should be able to choose if he wants logrotate or not. 2) Add /etc/logrotate.d to the filesystem package, this is my preferred solution.
3. add Requires: /etc/logrotate.d to /etc/logrotate.d users
Nicolas Mailhot wrote:
Le Ven 24 novembre 2006 11:15, Hans de Goede a écrit :
Hi all,
Many packages drop config files for logrotate in /etc/logrotate.d. without requiring logrotate, which is the owner of /etc/logrotate.d, thus potentially leading to an unowned /etc/logrotate.d for users who don't want logrotate and thus remove it.
I see 2 solutions for this:
- Add "Requires: logrotate" to all packages which put files in
/etc/logrotate.d. IMHO this is not good as the user should be able to choose if he wants logrotate or not. 2) Add /etc/logrotate.d to the filesystem package, this is my preferred solution.
- add Requires: /etc/logrotate.d to /etc/logrotate.d users
Which effectivly boils down to 1) except that it causes yum to take an extra 5-10 minutes to download file lists for all enabled repos. (on a 1 mbit link) file based dependencies usually are not the answer!
Regards,
Hans
Nicolas Mailhot wrote:
Le Ven 24 novembre 2006 11:15, Hans de Goede a écrit :
Hi all,
Many packages drop config files for logrotate in /etc/logrotate.d. without requiring logrotate, which is the owner of /etc/logrotate.d, thus potentially leading to an unowned /etc/logrotate.d for users who don't want logrotate and thus remove it.
I see 2 solutions for this:
- Add "Requires: logrotate" to all packages which put files in
/etc/logrotate.d. IMHO this is not good as the user should be able to choose if he wants logrotate or not. 2) Add /etc/logrotate.d to the filesystem package, this is my preferred solution.
- add Requires: /etc/logrotate.d to /etc/logrotate.d users
That's not really all that different than 1.
For now, imo, the only viable alternative is 1. Requires: logrotate
-- Rex
Hans de Goede wrote:
Hi all,
Many packages drop config files for logrotate in /etc/logrotate.d. without requiring logrotate, which is the owner of /etc/logrotate.d, thus potentially leading to an unowned /etc/logrotate.d for users who don't want logrotate and thus remove it.
I see 2 solutions for this:
- Add "Requires: logrotate" to all packages which put files in
/etc/logrotate.d. IMHO this is not good as the user should be able to choose if he wants logrotate or not. 2) Add /etc/logrotate.d to the filesystem package, this is my preferred solution.
I would like to hear what others think, before filing a bug against filesystem requesting 2) .
Regards,
Hans
Requiring logrotate is not really preferred, since people may choose to remove logrotate and it does not make any real sense that you can't install httpd or cups or others without a pre-chosen log-management package (exactly as you point out).
On the other hand, putting /etc/logrotate.d in the filesystem package is probably not a too much better, since we will still be installing stuff for a particular log-management package, that may not even be there. This seems wrong to me.
So since we're already discussing this, what if all packages that put stuff in logrotate.d, do so from a sub-package... httpd-logrotate (or something)... The -logrotate sub packages should require logrotate and of-course the main package (httpd in this case). Users can remove logrotate and with it, all the -logrotate subpackages from cups, httpd and the rest, but the software will still install and run just fine. This method has the added benefit of giving us a cleaner way to provide log-management for everything, based on an entirely different log-management tool. Put <XXrotatelogsXX> in extras and provide a http-<XXrotatelogsXX> package and all is good.
Just my .5€s worth
/Thomas
Thomas M Steenholdt wrote:
So since we're already discussing this, what if all packages that put stuff in logrotate.d, do so from a sub-package... httpd-logrotate (or something)... The -logrotate sub packages should require logrotate and of-course the main package (httpd in this case). Users can remove logrotate and with it, all the -logrotate subpackages from cups, httpd and the rest, but the software will still install and run just fine. This method has the added benefit of giving us a cleaner way to provide log-management for everything, based on an entirely different log-management tool. Put <XXrotatelogsXX> in extras and provide a http-<XXrotatelogsXX> package and all is good.
Interesting idea, but the problem is that you would want the -logrotate packages installed by default to prevent the normal use case from filling /var, and I'm not sure this is possible at the moment.