From nobody@FreeBSD.org  Fri Nov 23 09:31:19 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 79DE61F4
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 23 Nov 2012 09:31:19 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 629FD8FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 23 Nov 2012 09:31:19 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qAN9VILS007685
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 23 Nov 2012 09:31:18 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qAN9VI67007677;
	Fri, 23 Nov 2012 09:31:18 GMT
	(envelope-from nobody)
Message-Id: <201211230931.qAN9VI67007677@red.freebsd.org>
Date: Fri, 23 Nov 2012 09:31:18 GMT
From: Matt Smith <matt@xtaz.co.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Mistake in newsyslog.conf
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         173857
>Category:       conf
>Synopsis:       Mistake in newsyslog.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 23 09:40:00 UTC 2012
>Closed-Date:    Sun Jan 20 07:45:18 UTC 2013
>Last-Modified:  Sun Jan 20 07:50:00 UTC 2013
>Originator:     Matt Smith
>Release:        9.1-RC3
>Organization:
>Environment:
FreeBSD tao.xtaz.co.uk 9.1-RC3 FreeBSD 9.1-RC3 #0 r242431M: Thu Nov  1 17:49:06 GMT 2012     root@tao.xtaz.co.uk:/usr/obj/usr/src/sys/TAO  amd64
>Description:
Discussed in forum here: http://forums.freebsd.org/showthread.php?t=35910

I believe there is a mistake in the /etc/newsyslog.conf. The line for rotating the weekly.log has a 1 in the size field where I believe this should be a *. This results in the reason for the log rotation always being because size <1K whereas because it's a log that's designed to be rotated weekly shouldn't this be based on the when clause rather than the size as the daily and monthly ones are?

I apologise if this is done intentionally for some reason, but it seems odd to me and somebody on the forum agreed and so I have filed a PR.
>How-To-Repeat:
Enable the weekly.log in periodic.conf and observe when it gets rotated and the reason for the rotation given at the top of the log file.
>Fix:
Change the 1 under the size field for the weekly.log to a *

Patch attached with submission follows:

--- newsyslog.conf.old	2012-11-23 09:28:33.000000000 +0000
+++ newsyslog.conf	2012-11-23 09:28:42.000000000 +0000
@@ -34,5 +34,5 @@
 /var/log/security			600  10	   100	*     JC
 /var/log/sendmail.st			640  10	   *	168   B
 /var/log/utx.log			644  3	   *	@01T05 B
-/var/log/weekly.log			640  5	   1	$W6D0 JN
+/var/log/weekly.log			640  5	   *	$W6D0 JN
 /var/log/xferlog			600  7	   100	*     JC


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: glebius 
State-Changed-When: Mon Nov 26 19:41:14 UTC 2012 
State-Changed-Why:  
Committed to head, thanks! 


Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Mon Nov 26 19:41:14 UTC 2012 
Responsible-Changed-Why:  
Committed to head, thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173857 
State-Changed-From-To: patched->closed 
State-Changed-By: glebius 
State-Changed-When: Sun Jan 20 07:45:07 UTC 2013 
State-Changed-Why:  
Merged to stable/9. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173857 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/173857: commit references a PR
Date: Sun, 20 Jan 2013 07:45:12 +0000 (UTC)

 Author: glebius
 Date: Sun Jan 20 07:45:04 2013
 New Revision: 245683
 URL: http://svnweb.freebsd.org/changeset/base/245683
 
 Log:
   Merge r243568 from head:
     Fix typo in weekly line which made it to rotated after reaching > 1 Kb.
   
     PR:		conf/173857
     Submitted by:	Matt Smith <matt xtaz.co.uk>
 
 Modified:
   stable/9/etc/newsyslog.conf
 Directory Properties:
   stable/9/etc/   (props changed)
 
 Modified: stable/9/etc/newsyslog.conf
 ==============================================================================
 --- stable/9/etc/newsyslog.conf	Sun Jan 20 07:38:38 2013	(r245682)
 +++ stable/9/etc/newsyslog.conf	Sun Jan 20 07:45:04 2013	(r245683)
 @@ -34,5 +34,5 @@
  /var/log/security			600  10	   100	*     JC
  /var/log/sendmail.st			640  10	   *	168   BN
  /var/log/utx.log			644  3	   *	@01T05 B
 -/var/log/weekly.log			640  5	   1	$W6D0 JN
 +/var/log/weekly.log			640  5	   *	$W6D0 JN
  /var/log/xferlog			600  7	   100	*     JC
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
