Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 324727 - net-misc/icecast should have logrotate support
Summary: net-misc/icecast should have logrotate support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-19 19:22 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2013-11-26 19:52 UTC (History)
1 user (show)

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


Attachments
/etc/logrotate.d/icecast (icecast,233 bytes, text/plain)
2010-06-19 20:14 UTC, DEMAINE Benoît-Pierre, aka DoubleHP
Details

Note You need to log in before you can comment on or make changes to this bug.
Description DEMAINE Benoît-Pierre, aka DoubleHP 2010-06-19 19:22:18 UTC
uranus logrotate.d # date
Sat Jun 19 21:18:58 CEST 2010
uranus logrotate.d # ls -lha /var/log/icecast/
total 18M
drwxrw-r--  2 icecast nogroup 4.0K Jun 11 03:16 .
drwxr-xr-x 25 root    root    4.0K Jun 19 15:40 ..
-rw-r--r--  1 icecast nogroup 125K Jun 19 02:27 access.log
-rw-r--r--  1 icecast nogroup 8.0M Jun 19 02:27 error.log
-rw-r--r--  1 icecast nogroup 9.8M Jun 11 03:16 error.log.old
-rw-r--r--  1 root    root       0 May 21 13:21 .keep_net-misc_icecast-0
uranus logrotate.d # head -n1 /var/log/icecast/access.log
192.168.0.1 - - [21/May/2010:13:38:46 +0200] "SOURCE /mpd.ogg HTTP/1.0" 200 19 "-" "MPD" 10
uranus logrotate.d #

Like for all other services, I expect logrotate to weekly stop the service, cut the log, restart service, and compress old logs.

Please make an ebuild revision.

net-misc/icecast-2.3.2 ATM for me.

Good luck.
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2010-06-19 19:53:08 UTC
(In reply to comment #0)
> Good luck.

I assume you will be attaching the /etc/logrotate.d file here as well? Otherwise this is pretty much wontfix case.
Comment 2 DEMAINE Benoît-Pierre, aka DoubleHP 2010-06-19 19:57:07 UTC
no, because i have no clue how to write it :)
Comment 3 DEMAINE Benoît-Pierre, aka DoubleHP 2010-06-19 20:14:46 UTC
Created attachment 235981 [details]
/etc/logrotate.d/icecast

Suggestion, untested. It would take 3 weeks to wait and see if it works as expected ...
Comment 4 Oleg Gawriloff 2012-07-10 10:23:22 UTC
any news?
Comment 5 DEMAINE Benoît-Pierre, aka DoubleHP 2012-07-10 12:24:23 UTC
This works for me:

dhp@uranus ~ $ cat /etc/logrotate.d/icecast
# Copied from Apache2 logrotate snipet for Gentoo Linux
# Contributes by Chuck Short
#
/var/log/icecast/*log {
  missingok
  notifempty
  sharedscripts
  postrotate
  /etc/init.d/icecast reload > /dev/null 2>&1 || true
  endscript
}
dhp@uranus ~ $ cat /etc/logrotate.conf
weekly
rotate 4000
create
dateext
compress
include /etc/logrotate.d
notifempty
nomail
noolddir

/var/log/wtmp {
    monthly
    create 0664 root utmp
    rotate 4000
}

/var/log/btmp {
    missingok
    monthly
    create 0600 root utmp
    rotate 4000
}

dhp@uranus ~ $
Comment 6 Oleg Gawriloff 2012-07-10 13:10:17 UTC
Yes. I have similar solution, but think that this must be included in ebuild.
Comment 7 DEMAINE Benoît-Pierre, aka DoubleHP 2012-07-12 11:40:06 UTC
I am not maintainer; I can not alter ebuilds on official repos. I am just a reporter. Not even a dev.

>2y to fix such a trivial issue ...
Comment 8 Markos Chandras (RETIRED) gentoo-dev 2012-12-23 19:13:49 UTC
(In reply to comment #6)
> Yes. I have similar solution, but think that this must be included in ebuild.

if the logrotate script works for you I will include it
Comment 9 Markos Chandras (RETIRED) gentoo-dev 2012-12-23 19:22:33 UTC
(In reply to comment #7)
> I am not maintainer; I can not alter ebuilds on official repos. I am just a
> reporter. Not even a dev.
> 
> >2y to fix such a trivial issue ...

oh and the issue is trivial not critical so it has a very low priority but I admit I haven't noticed this bug until today
Comment 10 Markos Chandras (RETIRED) gentoo-dev 2012-12-23 19:24:21 UTC
+*icecast-2.3.3-r1 (23 Dec 2012)
+
+  23 Dec 2012; Markos Chandras <hwoarang@gentoo.org> +files/icecast.logrotate,
+  +icecast-2.3.3-r1.ebuild, metadata.xml:
+  Add logrotate file thanks to DEMAINE Benoît-Pierre <dhp_gentoo@doublehp.org>.
+  Bug #324727
+
Comment 11 Petr Pisar 2013-03-09 15:50:22 UTC
Excuse me, but the logrotate script invokes `reload' on init script which is not implemented:

# /etc/init.d/icecast reload
 * icecast: unknown function `reload'

One has to add the reload() function into the /etc/init.d/icecast to send SIGHUP to the daemon.
Comment 12 Markos Chandras (RETIRED) gentoo-dev 2013-05-07 18:10:58 UTC
(In reply to comment #11)
> Excuse me, but the logrotate script invokes `reload' on init script which is
> not implemented:
> 
> # /etc/init.d/icecast reload
>  * icecast: unknown function `reload'
> 
> One has to add the reload() function into the /etc/init.d/icecast to send
> SIGHUP to the daemon.

Care to submit a patch?
Comment 13 Markos Chandras (RETIRED) gentoo-dev 2013-11-26 19:52:08 UTC
Fixed