Skip site navigation (1)Skip section navigation (2)
Date:      Tue,  8 Apr 2008 15:45:29 -0500 (CDT)
From:      Kim Scarborough <sluggo@unknown.nu>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        js@iksz.hu
Subject:   ports/122586: Update to sysutils/logrotate
Message-ID:  <20080408204529.A11722841D@housecat.unknown.nu>
Resent-Message-ID: <200804082110.m38LA1d7039341@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         122586
>Category:       ports
>Synopsis:       Update to sysutils/logrotate
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Apr 08 21:10:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Kim Scarborough
>Release:        FreeBSD 7.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD housecat.unknown.nu 7.0-RELEASE FreeBSD 7.0-RELEASE #2: Fri Mar 21 22:25:35 CDT 2008 kjs@housecat.unknown.nu:/usr/src/sys/i386/compile/HOUSECAT i386


	
>Description:

This update to logrotate(8) puts the logrotate status file in a more sensible 
place, and updates the man page and examples for FreeBSD paths.

New file: file/patch-logrotate.8 

cc'ing maintainer on this PR.

>How-To-Repeat:
>Fix:

diff -ruN logrotate.ORIG/Makefile logrotate/Makefile
--- logrotate.ORIG/Makefile	2007-07-29 10:25:25.000000000 -0500
+++ logrotate/Makefile	2008-04-08 15:37:21.000000000 -0500
@@ -7,6 +7,7 @@
 
 PORTNAME=		logrotate
 PORTVERSION=		3.7.1
+PORTREVISION=		1
 CATEGORIES=		sysutils
 MASTER_SITES=		${MASTER_SITE_DEBIAN_POOL}
 MASTER_SITE_SUBDIR=	l/logrotate
diff -ruN logrotate.ORIG/files/logrotate.conf.sample logrotate/files/logrotate.conf.sample
--- logrotate.ORIG/files/logrotate.conf.sample	1999-12-30 06:35:51.000000000 -0600
+++ logrotate/files/logrotate.conf.sample	2008-04-08 15:28:46.000000000 -0500
@@ -14,9 +14,6 @@
 # uncomment this if you want your log files compressed
 compress
 
-# RPM packages drop log rotation information into this directory
-include __PREFIX__/etc/logrotate.d
-
 /var/log/lastlog {
     monthly
     rotate 1
diff -ruN logrotate.ORIG/files/patch-config.h logrotate/files/patch-config.h
--- logrotate.ORIG/files/patch-config.h	2007-07-29 10:25:25.000000000 -0500
+++ logrotate/files/patch-config.h	2008-04-08 15:19:03.000000000 -0500
@@ -9,7 +9,7 @@
 +    #define DEFAULT_MAIL_COMMAND "/usr/bin/mailx -s"
 +    #define COMPRESS_COMMAND "/usr/bin/gzip"
 +    #define UNCOMPRESS_COMMAND "/usr/bin/gunzip"
-+    #define STATEFILE "/var/log/logrotate.status"
++    #define STATEFILE "/var/run/logrotate.status"
 +#endif
 +
  /*
diff -ruN logrotate.ORIG/files/patch-dateext logrotate/files/patch-dateext
--- logrotate.ORIG/files/patch-dateext	2007-07-29 10:25:25.000000000 -0500
+++ logrotate/files/patch-dateext	2008-04-08 15:27:35.000000000 -0500
@@ -397,18 +397,3 @@
  	    } else if (!strcmp(start, "errors")) {
  		message(MESS_DEBUG, "%s: %d: the errors directive is deprecated and no longer used.\n",
  			configFile, lineNum);
---- logrotate-3.7.1/logrotate.8.maxage	2005-05-03 14:41:55.736877916 +0200
-+++ logrotate-3.7.1/logrotate.8	2005-05-03 14:45:33.464585908 +0200
-@@ -256,6 +256,12 @@
- instead of the just-rotated file (this is the default).
- 
- .TP
-+\fBmaxage\fR \fIcount\fR
-+Remove rotated logs older than <count> days. The age is only checked
-+if the logfile is to be rotated. The files are mailed to the
-+configured address if \fBmaillast\fR and \fBmail\fR are configured.
-+
-+.TP
- \fBmissingok\fR
- If the log file is missing, go on to the next one without issuing an error
- message. See also \fBnomissingok\fR.
diff -ruN logrotate.ORIG/files/patch-logrotate.8 logrotate/files/patch-logrotate.8
--- logrotate.ORIG/files/patch-logrotate.8	1969-12-31 18:00:00.000000000 -0600
+++ logrotate/files/patch-logrotate.8	2008-04-08 15:27:21.000000000 -0500
@@ -0,0 +1,72 @@
+--- logrotate.8.orig	2008-04-08 15:19:25.000000000 -0500
++++ logrotate.8	2008-04-08 15:24:54.000000000 -0500
+@@ -47,14 +47,14 @@
+ Tells \fBlogrotate\fR which command to use when mailing logs. This
+ command should accept two arguments: 1) the subject of the message, and
+ 2) the recipient. The command must then read a message on standard input
+-and mail it to the recipient. The default mail command is \fB/bin/mail
++and mail it to the recipient. The default mail command is \fB/usr/bin/mail
+ -s\fR.
+ 
+ .TP
+ \fB-s, -\-state <statefile>\fR
+ Tells \fBlogrotate\fR to use an alternate state file.  This is useful
+ if logrotate is being run as a different user for various sets of
+-log files.  The default state file is \fI/var/lib/logrotate/status\fR.
++log files.  The default state file is \fI/var/run/logrotate/status\fR.
+ 
+ .TP
+ \fB-\-usage\fR
+@@ -77,7 +77,7 @@
+     rotate 5
+     weekly
+     postrotate
+-	/sbin/killall -HUP syslogd
++	/etc/rc.d/syslogd restart
+     endscript
+ }
+ 
+@@ -87,7 +87,7 @@
+     size=100k
+     sharedscripts
+     postrotate
+-	/sbin/killall -HUP httpd
++	/usr/local/bin/apachectl restart
+     endscript
+ }
+ 
+@@ -113,7 +113,7 @@
+ \fI/var/log/messages\fR. The log will go through five weekly rotations before
+ being removed. After the log file has been rotated (but before the old
+ version of the log has been compressed), the command 
+-\fI/sbin/killall -HUP syslogd\fR will be executed.
++\fI/etc/rc.d/syslogd restart\fR will be executed.
+ 
+ The next section defines the parameters for both
+ \fI/var/log/httpd/access.log\fR and \fI/var/log/httpd/error.log\fR.
+@@ -251,6 +251,12 @@
+ instead of the just-rotated file (this is the default).
+ 
+ .TP
++\fBmaxage\fR \fIcount\fR
++Remove rotated logs older than <count> days. The age is only checked
++if the logfile is to be rotated. The files are mailed to the
++configured address if \fBmaillast\fR and \fBmail\fR are configured.
++
++.TP
+ \fBmissingok\fR
+ If the log file is missing, go on to the next one without issuing an error
+ message. See also \fBnomissingok\fR.
+@@ -398,10 +404,10 @@
+ .SH FILES
+ .PD 0
+ .TP 27
+-\fI/var/lib/logrotate/status\fR
++\fI/var/run/logrotate/status\fR
+ Default state file.
+ .TP 27
+-\fI/etc/logrotate.conf\fR
++\fI/usr/local/etc/logrotate.conf\fR
+ Configuration options.
+ 
+ .SH SEE ALSO

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080408204529.A11722841D>