/var/log/mythtv/mythbackend.log tends to get very chatty. logrotate can be used to manage it. Reproducible: Always Steps to Reproduce: Actual Results: Log grows without bounds. Patch is attached to add a mythtv configure to logrotate. Be gentle, this is my first ebuild patch :)
Created attachment 112247 [details, diff] Patch to add logrotate functionality to mythtv This was patched against the latest x86 unstable ebuild. It's pretty basic and should also work against older ebuilds.
yeah I know. I've actually had a logrotate script for months on my own system. I've just totally forgotten to include it. I've copied it in for the next rev bump. Thanks for the reminder.
I'd recommend you add a "logrotate" local use flag to control whether the logrotate file is installed or not (pattern after acpid, etc.). I think all you would need to do is surround the logrotate config file installation section with "if use logrotate; then" ... "fi". You could also use the flag to add logrotate as a dependency.
In some of the newer mythtv revisions.
> ------- Comment #3 From Karl Newman 2007-03-13 05:16:20 0000 [reply] ------- > >I'd recommend you add a "logrotate" local use flag to control whether the >logrotate file is installed or not (pattern after acpid, etc.). I think all you >would need to do is surround the logrotate config file installation section >with "if use logrotate; then" ... "fi". You could also use the flag to add >logrotate as a dependency. > >(In reply to comment #4) > In some of the newer mythtv revisions. > Did this ever happen? I am guessing not because I just found out today that my mythfrontend.log was 25GB! I installed logrotate, went to configure /etc/logrotate.d/mythtv and found the file was already there (presumably due to this bug). Thanks for resolving it, but to avoid this type of thing happening to others, it would be nice to add the USE flag for logrotate.
The log rotate script is installed unconditionally so there's no need for a logrotate USE flag.
(In reply to comment #6) > The log rotate script is installed unconditionally so there's no need for a > logrotate USE flag. > OK then would it make sense for logrotate to be added as a dependency?
It's not a dependency though. logrotate is a user installable system administration tool. There are other ways to manage log files and people perform other steps.
(In reply to comment #8) > It's not a dependency though. logrotate is a user installable system > administration tool. > > There are other ways to manage log files and people perform other steps. > That was why I suggested a USE flag, though--then logrotate could be added as a dependency if the flag is set. Then when someone does a emerge -pv mythtv, they'll see the "logrotate" use flag and investigate what it's about and see that logrotate could be a good thing for them to use. The logrotate script that is currently installed unconditionally is only used with logrotate, so why not have it as a dependency (conditional on the USE flag)?
Yeah that's what I was getting at... no reason to include scripts in /etc/logrotate.d if the person doesn't even use logrotate.