From gaod@cse.tw  Fri Nov  9 11:19:47 2012
Return-Path: <gaod@cse.tw>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 05E76229
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  9 Nov 2012 11:19:47 +0000 (UTC)
	(envelope-from gaod@cse.tw)
Received: from cse.tw (cse.tw [140.138.145.234])
	by mx1.freebsd.org (Postfix) with ESMTP id AAE348FC0A
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  9 Nov 2012 11:19:46 +0000 (UTC)
Received: from cse.tw (localhost [127.0.0.1])
	by cse.tw (Postfix) with ESMTP id 1DDCF187C5A3
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  9 Nov 2012 19:19:59 +0800 (CST)
Received: (from gaod@localhost)
	by cse.tw (8.14.5/8.14.5/Submit) id qA9BJxLX037119;
	Fri, 9 Nov 2012 19:19:59 +0800 (CST)
	(envelope-from gaod)
Message-Id: <201211091119.qA9BJxLX037119@cse.tw>
Date: Fri, 9 Nov 2012 19:19:59 +0800 (CST)
From: Hung-Yi Chen <gaod@hychen.org>
Reply-To: Hung-Yi Chen <gaod@hychen.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [UPDATE] sysutils/logrotate: update to 3.8.3, take maintainership
X-Send-Pr-Version: 3.113
X-GNATS-Notify: js@iksz.hu

>Number:         173496
>Category:       ports
>Synopsis:       [UPDATE] sysutils/logrotate: update to 3.8.3, take maintainership
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wxs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 09 11:20:00 UTC 2012
>Closed-Date:    Mon Dec 17 15:23:16 UTC 2012
>Last-Modified:  Mon Dec 17 15:23:16 UTC 2012
>Originator:     Hung-Yi Chen
>Release:        FreeBSD 9.0-RELEASE-p3 amd64
>Organization:
>Environment:
System: FreeBSD cse.tw 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64


>Description:
	Update to 3.8.3.
	Take maintainership.
>How-To-Repeat:
>Fix:

--- logrotate.diff begins here ---
Index: Makefile
===================================================================
--- Makefile	(revision 307232)
+++ Makefile	(working copy)
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=		logrotate
-PORTVERSION=		3.7.9
+PORTVERSION=		3.8.3
 CATEGORIES=		sysutils
 MASTER_SITES=		https://fedorahosted.org/releases/l/o/logrotate/
 
Index: distinfo
===================================================================
--- distinfo	(revision 307232)
+++ distinfo	(working copy)
@@ -1,2 +1,2 @@
-SHA256 (logrotate-3.7.9.tar.gz) = 080caf904e70e04da16b8dfa95a5a787ec7d722ee1af18ccea437d3ffdd6fec0
-SIZE (logrotate-3.7.9.tar.gz) = 45301
+SHA256 (logrotate-3.8.3.tar.gz) = 0776bf491171edbcc3ba577751fc912e721e99b834c14251df8109fd3bfa1977
+SIZE (logrotate-3.8.3.tar.gz) = 52210
Index: files/logrotate.conf.sample
===================================================================
--- files/logrotate.conf.sample	(revision 307232)
+++ files/logrotate.conf.sample	(working copy)
@@ -8,15 +8,28 @@
 # create new (empty) log files after rotating old ones
 create
 
+# use date as a suffix of the rotated file
+dateext
+
 # uncomment this if you want your log files compressed
-compress
+#compress
 
 # RPM packages drop log rotation information into this directory
-include __PREFIX__/etc/logrotate.d
+include /etc/logrotate.d
 
-/var/log/lastlog {
+# no packages own wtmp and btmp -- we'll rotate them here
+/var/log/wtmp {
     monthly
+    create 0664 root utmp
+	minsize 1M
     rotate 1
 }
 
-# system-specific logs may be configured here
+/var/log/btmp {
+    missingok
+    monthly
+    create 0600 root utmp
+    rotate 1
+}
+
+# system-specific logs may be also be configured here.
Index: files/patch-config.c
===================================================================
--- files/patch-config.c	(revision 307232)
+++ files/patch-config.c	(working copy)
@@ -1,67 +1,11 @@
-diff --git a/config.c b/config.c
-index e6d5d1d..d14d742 100644
---- a/config.c
-+++ b/config.c
-@@ -1,5 +1,4 @@
+--- config.c.orig	2012-11-09 18:58:51.756188812 +0800
++++ config.c	2012-11-09 19:00:23.064190229 +0800
+@@ -1,8 +1,4 @@
  #include <sys/queue.h>
+-/* Alloca is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
 -#include <alloca.h>
+-#endif
+ #include <limits.h>
  #include <ctype.h>
  #include <dirent.h>
- #include <errno.h>
-@@ -19,6 +18,7 @@
- #include <wctype.h>
- #include <fnmatch.h>
- #include <sys/mman.h>
-+#include <limits.h>
- 
- #include "basenames.h"
- #include "log.h"
-@@ -28,6 +28,14 @@
- #define GLOB_ABORTED GLOB_ABEND
- #endif
- 
-+#if !defined(MAP_POPULATE)
-+#define MAP_POPULATE 0
-+#endif
-+
-+#if !defined(MADV_DONTFORK)
-+#define MADV_DONTFORK 0
-+#endif
-+
- #define REALLOC_STEP    10
- 
- #if defined(SunOS) 
-@@ -100,7 +108,7 @@ static char *readPath(const char *configFile, int lineNum, char *key,
- 
- 	chptr = start;
- 
--	while( (len = mbrtowc(&pwc, chptr, strlen(chptr), NULL)) != 0 ) {
-+	while( (len = strlen(chptr)) != 0 && (len = mbrtowc(&pwc, chptr, len, NULL)) != 0 ) {
- 		if( len == (size_t)(-1) || len == (size_t)(-2) || !iswprint(pwc) || iswblank(pwc) ) {
- 		    message(MESS_ERROR, "%s:%d bad %s path %s\n",
- 			    configFile, lineNum, key, start);
-@@ -519,12 +527,24 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
-        length arrays -- of course, if we aren't run setuid it doesn't
-        matter much */
- 
-+#ifdef __FreeBSD__
-+    fd = open(configFile, O_RDONLY);
-+#else
-     fd = open(configFile, O_RDONLY | O_CLOEXEC);
-+#endif
-     if (fd < 0) {
- 	message(MESS_ERROR, "failed to open config file %s: %s\n",
- 		configFile, strerror(errno));
- 	return 1;
-     }
-+#ifdef __FreeBSD__
-+    if (fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) & FD_CLOEXEC) == -1) {
-+	message(MESS_ERROR, "Could not set close-on-exec for file %s\n",
-+		configFile);
-+	close(fd);
-+	return 1;
-+    }
-+#endif
- 	/* We don't want anybody to change the file while we parse it,
- 	 * let's try to lock it for reading. */
- 	if (fcntl(fd, F_SETLK, &fd_lock) == -1) {
Index: files/patch-logrotate.8
===================================================================
--- files/patch-logrotate.8	(revision 307232)
+++ files/patch-logrotate.8	(working copy)
@@ -1,16 +1,6 @@
-diff --git a/logrotate.8 b/logrotate.8
-index f18c522..33f9a32 100644
---- a/logrotate.8
-+++ b/logrotate.8
-@@ -48,14 +48,14 @@ correctly.
- 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/bin/mailx
- -s\fR.
- 
- .TP
+--- logrotate.8.orig	2012-11-09 19:10:08.054188039 +0800
++++ logrotate.8	2012-11-09 19:10:57.749187879 +0800
+@@ -59,7 +59,7 @@
  \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
@@ -19,7 +9,7 @@
  
  .TP
  \fB-\-usage\fR
-@@ -473,10 +473,10 @@ Log files are rotated if the current year is not the same as the last rotation.
+@@ -507,10 +507,10 @@
  .SH FILES
  .PD 0
  .TP 27
Index: files/patch-logrotate.c
===================================================================
--- files/patch-logrotate.c	(revision 307232)
+++ files/patch-logrotate.c	(working copy)
@@ -1,18 +1,11 @@
-diff --git a/logrotate.c b/logrotate.c
-index 3748918..a528367 100644
---- a/logrotate.c
-+++ b/logrotate.c
-@@ -1,5 +1,4 @@
+--- logrotate.c.orig	2012-11-09 19:00:58.744187984 +0800
++++ logrotate.c	2012-11-09 19:01:05.528189740 +0800
+@@ -1,8 +1,4 @@
  #include <sys/queue.h>
+-/* alloca() is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
 -#include <alloca.h>
+-#endif
+ #include <limits.h>
  #include <ctype.h>
  #include <dirent.h>
- #include <errno.h>
-@@ -16,6 +15,7 @@
- #include <locale.h>
- #include <sys/types.h>
- #include <utime.h>
-+#include <limits.h>
- 
- #if defined(SunOS) 
- #include <syslimits.h>
--- logrotate.diff ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Nov 9 11:20:08 UTC 2012 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: js@iksz.hu
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/173496: [UPDATE] sysutils/logrotate: update to 3.8.3, take maintainership
Date: Fri, 9 Nov 2012 11:20:08 UT

 Maintainer of sysutils/logrotate,
 
 Please note that PR ports/173496 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/173496
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: Balazs Nagy <js@js.hu>
To: bug-followup@FreeBSD.org
Cc: js@iksz.hu
Subject: Re: ports/173496: [UPDATE] sysutils/logrotate: update to 3.8.3, take maintainership
Date: Tue, 13 Nov 2012 08:20:44 +0100

 --Apple-Mail=_4A61642C-892B-4CEF-B780-65C80A0D5B1B
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii
 
 A few quetsions about the patch:
 
 - Why logrotate.conf.sample has to be changed? This is just a sample.
 - Why custom logrotate files go to /etc? Don't every port config go to =
 /usr/local/etc?
 - 'take maintainership' haven't been explained. Please elaborate.
 
 Regards,
 --=20
 -jul-=
 
 --Apple-Mail=_4A61642C-892B-4CEF-B780-65C80A0D5B1B--

From: Balazs Nagy <js@iksz.hu>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/173496: [UPDATE] sysutils/logrotate: update to 3.8.3, take maintainership
Date: Fri, 16 Nov 2012 18:31:40 +0100

 It looks like my previous email hasn't arrived.  Here you are:
 
 - Why logrotate.conf.sample has to be changed? This is just a sample.
 - Why custom logrotate files go to /etc? Don't every port config go to =
 /usr/local/etc?
 - 'take maintainership' haven't been explained. Please elaborate.
 
 Regards,
 --=20
 -jul-
 
 On Nov 9, 2012, at 12:20 PM, Edwin Groothuis <edwin@FreeBSD.org> wrote:
 
 > Maintainer of sysutils/logrotate,
 >=20
 > Please note that PR ports/173496 has just been submitted.
 >=20
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >=20
 > The full text of the PR can be found at:
 >    http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dports/173496
 >=20
 > --=20
 > Edwin Groothuis via the GNATS Auto Assign Tool
 > edwin@FreeBSD.org
 
Responsible-Changed-From-To: freebsd-ports-bugs->wxs 
Responsible-Changed-By: wxs 
Responsible-Changed-When: Thu Nov 29 16:43:27 UTC 2012 
Responsible-Changed-Why:  
I'll take it. 

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

From: Wesley Shields <wxs@FreeBSD.org>
To: js@iksz.hu
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/173496: [UPDATE] sysutils/logrotate: update to 3.8.3, take
 maintainership
Date: Mon, 3 Dec 2012 14:51:16 -0500

 Balazs,
 
 You raise valid points and while the submitter has been non-responsive
 to them parts of his PR are still valid. What do you think of the
 attached patch. It should eliminate all of your concerns (it does not
 touch logrotate.conf.sample, does not put anything in /etc and does not
 touch MAINTAINER) but it does update the port to the newer version.
 
 Do you have any thoughts on this patch? Do I have your approval to
 commit it? Would you just like me to close this PR and you'll eventually
 open another one with an update when you are ready?
 
 Please let me know how you want to proceed from here. Thanks!
 
 -- WXS

From: Balazs Nagy <js@iksz.hu>
To: Wesley Shields <wxs@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/173496: [UPDATE] sysutils/logrotate: update to 3.8.3, take maintainership
Date: Mon, 3 Dec 2012 21:48:49 +0100

 --Apple-Mail=_FED63DDC-B205-4200-9796-4C9BB7AA9A7E
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=us-ascii
 
 Wesley,
 
 I'm fine with all the other changes if the code is functional. However, =
 my old patch used to contain some changes, which become inconsistent:
 
 - patch-config.h has not been touched, and it defines /usr/bin/mailx as =
 default mail command.
 - patch-logrotate.8 has been changed, to remove mentioning mailx as the =
 default mail command.
 
 I haven't tested the latest logrotate myself yet, but it looks like =
 logrotate sets close-on-exec more or less the same as the FreeBSD port =
 handled it (see =
 https://fedorahosted.org/logrotate/changeset/296/trunk/config.c). The =
 other big difference is to add another string length check to mbrtowc =
 call, which was also been addressed (see =
 https://fedorahosted.org/logrotate/changeset/343/trunk/config.c).
 
 To sum up, please leave out logrotate.conf.sample (it contains changes =
 affecting logrotate.d being read from /etc), MAINTAINER, and =
 patch-logrotate.8.  All the other changes can be imported.
 
 Regards,
 --=20
 -jul-
 
 On Dec 3, 2012, at 8:51 PM, Wesley Shields <wxs@FreeBSD.org> wrote:
 
 > Balazs,
 >=20
 > You raise valid points and while the submitter has been non-responsive
 > to them parts of his PR are still valid. What do you think of the
 > attached patch. It should eliminate all of your concerns (it does not
 > touch logrotate.conf.sample, does not put anything in /etc and does =
 not
 > touch MAINTAINER) but it does update the port to the newer version.
 >=20
 > Do you have any thoughts on this patch? Do I have your approval to
 > commit it? Would you just like me to close this PR and you'll =
 eventually
 > open another one with an update when you are ready?
 >=20
 > Please let me know how you want to proceed from here. Thanks!
 >=20
 > -- WXS
 
 
 --Apple-Mail=_FED63DDC-B205-4200-9796-4C9BB7AA9A7E
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/html;
 	charset=us-ascii
 
 <html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
 charset=3Dus-ascii"></head><body style=3D"word-wrap: break-word; =
 -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
 ">Wesley,<div><br></div><div>I'm fine with all the other changes if the =
 code is functional. However, my old patch used to contain some changes, =
 which become inconsistent:</div><div><br></div><div>- patch-config.h has =
 not been touched, and it defines /usr/bin/mailx as default mail =
 command.</div><div>- patch-logrotate.8 has been changed, to remove =
 mentioning mailx as the default mail command.</div><div><br></div><div>I =
 haven't tested the latest logrotate myself yet, but it looks like =
 logrotate sets close-on-exec more or less the same as the FreeBSD port =
 handled it (see&nbsp;<a =
 href=3D"https://fedorahosted.org/logrotate/changeset/296/trunk/config.c">h=
 ttps://fedorahosted.org/logrotate/changeset/296/trunk/config.c</a>). The =
 other big difference is to add another string length check to mbrtowc =
 call, which was also been addressed (see&nbsp;<a =
 href=3D"https://fedorahosted.org/logrotate/changeset/343/trunk/config.c">h=
 ttps://fedorahosted.org/logrotate/changeset/343/trunk/config.c</a>).</div>=
 <div><div><br></div><div>To sum up, please leave out =
 logrotate.conf.sample (it contains changes affecting logrotate.d being =
 read from /etc), MAINTAINER, and patch-logrotate.8. &nbsp;All the other =
 changes can be imported.</div><div><br></div><div>Regards,</div><div>
 <span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
 border-spacing: 0px; "><div>--&nbsp;</div><div>-jul-</div></span>
 
 </div>
 
 <br><div><div>On Dec 3, 2012, at 8:51 PM, Wesley Shields &lt;<a =
 href=3D"mailto:wxs@FreeBSD.org">wxs@FreeBSD.org</a>&gt; wrote:</div><br =
 class=3D"Apple-interchange-newline"><blockquote =
 type=3D"cite">Balazs,<br><br>You raise valid points and while the =
 submitter has been non-responsive<br>to them parts of his PR are still =
 valid. What do you think of the<br>attached patch. It should eliminate =
 all of your concerns (it does not<br>touch logrotate.conf.sample, does =
 not put anything in /etc and does not<br>touch MAINTAINER) but it does =
 update the port to the newer version.<br><br>Do you have any thoughts on =
 this patch? Do I have your approval to<br>commit it? Would you just like =
 me to close this PR and you'll eventually<br>open another one with an =
 update when you are ready?<br><br>Please let me know how you want to =
 proceed from here. Thanks!<br><br>-- =
 WXS<br></blockquote></div><br></div></body></html>=
 
 --Apple-Mail=_FED63DDC-B205-4200-9796-4C9BB7AA9A7E--

From: Wesley Shields <wxs@FreeBSD.org>
To: Balazs Nagy <js@iksz.hu>
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/173496: [UPDATE] sysutils/logrotate: update to 3.8.3, take
 maintainership
Date: Mon, 3 Dec 2012 16:04:21 -0500

 --5mCyUwZo2JvN/JJP
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Mon, Dec 03, 2012 at 09:48:49PM +0100, Balazs Nagy wrote:
 > Wesley,
 > 
 > I'm fine with all the other changes if the code is functional.
 > However, my old patch used to contain some changes, which become
 > inconsistent:
 > 
 > - patch-config.h has not been touched, and it defines /usr/bin/mailx
 > as default mail command.  - patch-logrotate.8 has been changed, to
 > remove mentioning mailx as the default mail command.
 > 
 > I haven't tested the latest logrotate myself yet, but it looks like
 > logrotate sets close-on-exec more or less the same as the FreeBSD port
 > handled it (see
 > https://fedorahosted.org/logrotate/changeset/296/trunk/config.c). The
 > other big difference is to add another string length check to mbrtowc
 > call, which was also been addressed (see
 > https://fedorahosted.org/logrotate/changeset/343/trunk/config.c).
 > 
 > To sum up, please leave out logrotate.conf.sample (it contains changes
 > affecting logrotate.d being read from /etc), MAINTAINER, and
 > patch-logrotate.8.  All the other changes can be imported.
 
 I think I forgot to attach the patch I referenced in my email. Please
 see the attached. I think it will address most of your concerns. Sorry
 about that!
 
 -- WXS
 
 --5mCyUwZo2JvN/JJP
 Content-Type: text/x-diff; charset=us-ascii
 Content-Disposition: attachment; filename="logrotate.diff"
 
 Index: Makefile
 ===================================================================
 --- Makefile	(revision 307953)
 +++ Makefile	(working copy)
 @@ -6,7 +6,7 @@
  #
  
  PORTNAME=		logrotate
 -PORTVERSION=		3.7.9
 +PORTVERSION=		3.8.3
  CATEGORIES=		sysutils
  MASTER_SITES=		https://fedorahosted.org/releases/l/o/logrotate/
  
 Index: distinfo
 ===================================================================
 --- distinfo	(revision 307953)
 +++ distinfo	(working copy)
 @@ -1,2 +1,2 @@
 -SHA256 (logrotate-3.7.9.tar.gz) = 080caf904e70e04da16b8dfa95a5a787ec7d722ee1af18ccea437d3ffdd6fec0
 -SIZE (logrotate-3.7.9.tar.gz) = 45301
 +SHA256 (logrotate-3.8.3.tar.gz) = 0776bf491171edbcc3ba577751fc912e721e99b834c14251df8109fd3bfa1977
 +SIZE (logrotate-3.8.3.tar.gz) = 52210
 Index: files/patch-Makefile
 ===================================================================
 --- files/patch-Makefile	(revision 307953)
 +++ files/patch-Makefile	(working copy)
 @@ -1,9 +1,7 @@
 -diff --git a/Makefile b/Makefile
 -index adb97f2..a2d51f7 100644
 ---- a/Makefile
 -+++ b/Makefile
 -@@ -53,6 +53,13 @@ ifeq ($(OS_NAME),Linux)
 -     BASEDIR = /usr
 +--- Makefile.orig	2012-10-04 03:59:14.000000000 -0400
 ++++ Makefile	2012-12-02 21:44:52.000000000 -0500
 +@@ -71,6 +71,13 @@
 +     LOADLIBES += -L$(BASEDIR)/lib -Wl,-R,$(BASEDIR)/lib
   endif
   
  +# FreeBSD
 @@ -16,20 +14,3 @@
   ifneq ($(POPT_DIR),)
       CFLAGS += -I$(POPT_DIR)
       LOADLIBES += -L$(POPT_DIR)
 -@@ -107,11 +114,15 @@ install:
 - 	$(INSTALL) $(PROG) $(PREFIX)/$(BINDIR) 0755 bin bin; \
 - 	$(INSTALL) $(MAN) $(PREFIX)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"` 0644 bin bin; \
 - 	$(INSTALL) $(MAN5) $(PREFIX)/$(MANDIR)/man`echo $(MAN5) | sed "s/.*\.//"` 0644 bin bin; \
 -+	else if [ "$(OS_NAME)" = FreeBSD ]; then \
 -+	$(BSD_INSTALL_PROGRAM) $(PROG) $(BINDIR); \
 -+	$(BSD_INSTALL_MAN) $(MAN) $(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"`/$(MAN); \
 -+	$(BSD_INSTALL_MAN) $(MAN5) $(MANDIR)/man`echo $(MAN5) | sed "s/.*\.//"`/$(MAN5); \
 - 	else \
 - 	$(INSTALL) -m 755 $(PROG) $(PREFIX)/$(BINDIR); \
 - 	$(INSTALL) -m 644 $(MAN) $(PREFIX)/$(MANDIR)/man`echo $(MAN) | sed "s/.*\.//"`/$(MAN); \
 - 	$(INSTALL) -m 644 $(MAN5) $(PREFIX)/$(MANDIR)/man`echo $(MAN5) | sed "s/.*\.//"`/$(MAN5); \
 --	fi
 -+	fi; fi
 - 
 - co:
 - 	co RCS/*,v
 Index: files/patch-config.c
 ===================================================================
 --- files/patch-config.c	(revision 307953)
 +++ files/patch-config.c	(working copy)
 @@ -1,67 +1,11 @@
 -diff --git a/config.c b/config.c
 -index e6d5d1d..d14d742 100644
 ---- a/config.c
 -+++ b/config.c
 -@@ -1,5 +1,4 @@
 +--- config.c.orig	2012-11-09 18:58:51.756188812 +0800
 ++++ config.c	2012-11-09 19:00:23.064190229 +0800
 +@@ -1,8 +1,4 @@
   #include <sys/queue.h>
 +-/* Alloca is defined in stdlib.h in NetBSD */
 +-#ifndef __NetBSD__
  -#include <alloca.h>
 +-#endif
 + #include <limits.h>
   #include <ctype.h>
   #include <dirent.h>
 - #include <errno.h>
 -@@ -19,6 +18,7 @@
 - #include <wctype.h>
 - #include <fnmatch.h>
 - #include <sys/mman.h>
 -+#include <limits.h>
 - 
 - #include "basenames.h"
 - #include "log.h"
 -@@ -28,6 +28,14 @@
 - #define GLOB_ABORTED GLOB_ABEND
 - #endif
 - 
 -+#if !defined(MAP_POPULATE)
 -+#define MAP_POPULATE 0
 -+#endif
 -+
 -+#if !defined(MADV_DONTFORK)
 -+#define MADV_DONTFORK 0
 -+#endif
 -+
 - #define REALLOC_STEP    10
 - 
 - #if defined(SunOS) 
 -@@ -100,7 +108,7 @@ static char *readPath(const char *configFile, int lineNum, char *key,
 - 
 - 	chptr = start;
 - 
 --	while( (len = mbrtowc(&pwc, chptr, strlen(chptr), NULL)) != 0 ) {
 -+	while( (len = strlen(chptr)) != 0 && (len = mbrtowc(&pwc, chptr, len, NULL)) != 0 ) {
 - 		if( len == (size_t)(-1) || len == (size_t)(-2) || !iswprint(pwc) || iswblank(pwc) ) {
 - 		    message(MESS_ERROR, "%s:%d bad %s path %s\n",
 - 			    configFile, lineNum, key, start);
 -@@ -519,12 +527,24 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
 -        length arrays -- of course, if we aren't run setuid it doesn't
 -        matter much */
 - 
 -+#ifdef __FreeBSD__
 -+    fd = open(configFile, O_RDONLY);
 -+#else
 -     fd = open(configFile, O_RDONLY | O_CLOEXEC);
 -+#endif
 -     if (fd < 0) {
 - 	message(MESS_ERROR, "failed to open config file %s: %s\n",
 - 		configFile, strerror(errno));
 - 	return 1;
 -     }
 -+#ifdef __FreeBSD__
 -+    if (fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) & FD_CLOEXEC) == -1) {
 -+	message(MESS_ERROR, "Could not set close-on-exec for file %s\n",
 -+		configFile);
 -+	close(fd);
 -+	return 1;
 -+    }
 -+#endif
 - 	/* We don't want anybody to change the file while we parse it,
 - 	 * let's try to lock it for reading. */
 - 	if (fcntl(fd, F_SETLK, &fd_lock) == -1) {
 Index: files/patch-logrotate.8
 ===================================================================
 --- files/patch-logrotate.8	(revision 307953)
 +++ files/patch-logrotate.8	(working copy)
 @@ -1,16 +1,6 @@
 -diff --git a/logrotate.8 b/logrotate.8
 -index f18c522..33f9a32 100644
 ---- a/logrotate.8
 -+++ b/logrotate.8
 -@@ -48,14 +48,14 @@ correctly.
 - 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/bin/mailx
 - -s\fR.
 - 
 - .TP
 +--- logrotate.8.orig	2012-11-09 19:10:08.054188039 +0800
 ++++ logrotate.8	2012-11-09 19:10:57.749187879 +0800
 +@@ -59,7 +59,7 @@
   \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
 @@ -19,7 +9,7 @@
   
   .TP
   \fB-\-usage\fR
 -@@ -473,10 +473,10 @@ Log files are rotated if the current year is not the same as the last rotation.
 +@@ -507,10 +507,10 @@
   .SH FILES
   .PD 0
   .TP 27
 Index: files/patch-logrotate.c
 ===================================================================
 --- files/patch-logrotate.c	(revision 307953)
 +++ files/patch-logrotate.c	(working copy)
 @@ -1,18 +1,11 @@
 -diff --git a/logrotate.c b/logrotate.c
 -index 3748918..a528367 100644
 ---- a/logrotate.c
 -+++ b/logrotate.c
 -@@ -1,5 +1,4 @@
 +--- logrotate.c.orig	2012-11-09 19:00:58.744187984 +0800
 ++++ logrotate.c	2012-11-09 19:01:05.528189740 +0800
 +@@ -1,8 +1,4 @@
   #include <sys/queue.h>
 +-/* alloca() is defined in stdlib.h in NetBSD */
 +-#ifndef __NetBSD__
  -#include <alloca.h>
 +-#endif
 + #include <limits.h>
   #include <ctype.h>
   #include <dirent.h>
 - #include <errno.h>
 -@@ -16,6 +15,7 @@
 - #include <locale.h>
 - #include <sys/types.h>
 - #include <utime.h>
 -+#include <limits.h>
 - 
 - #if defined(SunOS) 
 - #include <syslimits.h>
 
 --5mCyUwZo2JvN/JJP--
State-Changed-From-To: feedback->closed 
State-Changed-By: wxs 
State-Changed-When: Mon Dec 17 15:23:11 UTC 2012 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=173496 
>Unformatted:
