Summary: | sys-apps/portage should support logrotate | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | DEMAINE Benoît-Pierre, aka DoubleHP <dhp_gentoo> |
Component: | Current packages | Assignee: | Portage team <dev-portage> |
Status: | CONFIRMED --- | ||
Severity: | enhancement | CC: | gef.kornflakes, gentoo, Liganic, pacho |
Priority: | High | ||
Version: | 10.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
DEMAINE Benoît-Pierre, aka DoubleHP
2010-06-19 19:31:36 UTC
DUPLICATE of bug #324191 ? No. bug #324191 is a proposed solution only for my second proposition. If various scripts (genlop for example, and maybe other ones) need (at least for now) logs to be raw text (but maybe those tools can be patched in order to support ompressed logs), maybe logrotate is a better place to do it. So, that bug will be the solution only if it is easier than logrotate, and, possible any way. I don't know portage tools well enough to decide. So, conditionnaly, maybe yes. As bug #324191 been fixed, i don't think any one will ever bother with cron or logrotate. I would personaly prefer something like (untested): find /var/log/portage/ -maxdepth 1 -type f -mtime +8 -exec gzip {} \; over the portage FEATURE; but i don't think any one will take time to update the portage ebuild: - make portage sensible to logrotate - if yes, add the following untested script, as /etc/logrotate.d/portage # Portage logrotate script for Gentoo Linux # rotate only logs that are older than 8d, to not force people who have bugs have to extract logs # /var/log/portage/*log { weekly nodateext missingok compress noolddir endscript } It will rename foobar.log into foobar.log.0.gz ... don't know how to not get the .0 part ... (In reply to comment #3) > As bug #324191 been fixed, i don't think any one will ever bother with cron or > logrotate. I would personaly prefer something like (untested): > > find /var/log/portage/ -maxdepth 1 -type f -mtime +8 -exec gzip {} \; > > over the portage FEATURE; What reasons do you have to prefer that over FEATURES=compress-build-logs? Both aproaches (logrotate, and find in cron): - keep compression independant of portage - delay compression, so that, if an emerge fails, you don't need to zcat; for example, to paste an error on IRC, you can keep using the usual "wgetpaste logile" ... and it's easier to debug and search. In short, i want to keep fresh logs as raw text, uncompressed. 3rd aspect: it's not portage work to compress logs. ALL other "daemons" write logs in raw text; with FEATURES=compress-build-logs Portage becomes the first application to write raw-data=non-ASCII things in /var/log ever. It's logrotate job to "take old logs, and either remove them, or compress". + : the logrotate aproach will let people who want to delete old logs ... remove old logs. Nobody needs to keep build logs for life time. So, if your /etc/logrotate.conf policy is to remove logs after 4 weeks ... and all your applications work fine, really, you don't need to keep logs. You need logs only for apps that don't work; and also for people who do dev and debug; dev and debug people will do like me: rotate 4000 My final /etc/logrotate.d/portage # Portage logrotate script for Gentoo Linux # rotate only logs that are older than 8d, to not force people who have bugs have to extract logs # /var/log/portage/*log { weekly nodateext missingok compress noolddir notifempty nocreate } |