Date: Fri, 9 Nov 2012 19:19:59 +0800 (CST) From: Hung-Yi Chen <gaod@hychen.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/173496: [UPDATE] sysutils/logrotate: update to 3.8.3, take maintainership Message-ID: <201211091119.qA9BJxLX037119@cse.tw> Resent-Message-ID: <201211091120.qA9BK13Z048425@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 173496 >Category: ports >Synopsis: [UPDATE] sysutils/logrotate: update to 3.8.3, take maintainership >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Fri Nov 09 11:20:00 UTC 2012 >Closed-Date: >Last-Modified: >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: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211091119.qA9BJxLX037119>