From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Apr 8 21:10:01 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D03261065678 for ; Tue, 8 Apr 2008 21:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id A9D6E8FC23 for ; Tue, 8 Apr 2008 21:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m38LA10T039342 for ; Tue, 8 Apr 2008 21:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m38LA1d7039341; Tue, 8 Apr 2008 21:10:01 GMT (envelope-from gnats) Resent-Date: Tue, 8 Apr 2008 21:10:01 GMT Resent-Message-Id: <200804082110.m38LA1d7039341@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kim Scarborough Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 908EA106566B for ; Tue, 8 Apr 2008 21:01:34 +0000 (UTC) (envelope-from kjs@housecat.unknown.nu) Received: from QMTA01.emeryville.ca.mail.comcast.net (qmta01.emeryville.ca.mail.comcast.net [76.96.30.16]) by mx1.freebsd.org (Postfix) with ESMTP id 5C68D8FC17 for ; Tue, 8 Apr 2008 21:01:34 +0000 (UTC) (envelope-from kjs@housecat.unknown.nu) Received: from OMTA06.emeryville.ca.mail.comcast.net ([76.96.30.51]) by QMTA01.emeryville.ca.mail.comcast.net with comcast id Ayuj1Z00216AWCUA10XE00; Tue, 08 Apr 2008 20:45:27 +0000 Received: from housecat.unknown.nu ([98.206.160.175]) by OMTA06.emeryville.ca.mail.comcast.net with comcast id B8lV1Z00K3nMSVu8S00000; Tue, 08 Apr 2008 20:45:31 +0000 Received: by housecat.unknown.nu (Postfix, from userid 1001) id A11722841D; Tue, 8 Apr 2008 15:45:29 -0500 (CDT) Message-Id: <20080408204529.A11722841D@housecat.unknown.nu> Date: Tue, 8 Apr 2008 15:45:29 -0500 (CDT) From: Kim Scarborough To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: js@iksz.hu Subject: ports/122586: Update to sysutils/logrotate X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Apr 2008 21:10:01 -0000 >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 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 \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 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: