Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 169577 - media-tv/mythtv ebuild should have logrotate script
Summary: media-tv/mythtv ebuild should have logrotate script
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Doug Goldstein (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-06 06:47 UTC by Robert Lippmann
Modified: 2007-07-06 16:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to add logrotate functionality to mythtv (mythtvlogrotate.patch,873 bytes, patch)
2007-03-06 06:50 UTC, Robert Lippmann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Lippmann 2007-03-06 06:47:33 UTC
/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 :)
Comment 1 Robert Lippmann 2007-03-06 06:50:08 UTC
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.
Comment 2 Doug Goldstein (RETIRED) gentoo-dev 2007-03-06 14:01:05 UTC
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.
Comment 3 Karl Newman 2007-03-13 05:16:20 UTC
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.
Comment 4 Doug Goldstein (RETIRED) gentoo-dev 2007-03-20 14:48:15 UTC
In some of the newer mythtv revisions.
Comment 5 Kevin Worth 2007-07-06 01:58:13 UTC
> ------- 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.
Comment 6 Doug Goldstein (RETIRED) gentoo-dev 2007-07-06 14:00:07 UTC
The log rotate script is installed unconditionally so there's no need for a logrotate USE flag.
Comment 7 Kevin Worth 2007-07-06 14:23:20 UTC
(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?
Comment 8 Doug Goldstein (RETIRED) gentoo-dev 2007-07-06 14:59:24 UTC
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.
Comment 9 Karl Newman 2007-07-06 16:24:26 UTC
(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)?
Comment 10 Kevin Worth 2007-07-06 16:29:00 UTC
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.