aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2010-08-26 09:20:52 +0000
committerPav Lucistnik <pav@FreeBSD.org>2010-08-26 09:20:52 +0000
commit76b68a5d732ba39650890b3dc90f8cbdbdf94c53 (patch)
tree425b1cc15bf0dfb6af62bc7915b0b7cb2a55919c /sysutils
parentf5431cfa8066c1bf9d58c79bd5aeb5d5715e3aae (diff)
downloadports-76b68a5d732ba39650890b3dc90f8cbdbdf94c53.tar.gz
ports-76b68a5d732ba39650890b3dc90f8cbdbdf94c53.zip
- Update to 3.7.9
PR: ports/148849 Submitted by: Balazs Nagy <js@iksz.hu> (maintainer)
Notes
Notes: svn path=/head/; revision=259999
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/logrotate/Makefile7
-rw-r--r--sysutils/logrotate/distinfo6
-rw-r--r--sysutils/logrotate/files/patch-Makefile15
-rw-r--r--sysutils/logrotate/files/patch-aa43
-rw-r--r--sysutils/logrotate/files/patch-config.c67
-rw-r--r--sysutils/logrotate/files/patch-config.h7
-rw-r--r--sysutils/logrotate/files/patch-logrotate.8 (renamed from sysutils/logrotate/files/patch-man)11
-rw-r--r--sysutils/logrotate/files/patch-logrotate.c18
8 files changed, 110 insertions, 64 deletions
diff --git a/sysutils/logrotate/Makefile b/sysutils/logrotate/Makefile
index 0b2ae4dae7f6..627c454b848b 100644
--- a/sysutils/logrotate/Makefile
+++ b/sysutils/logrotate/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= logrotate
-PORTVERSION= 3.7.7
-PORTREVISION= 1
+PORTVERSION= 3.7.9
CATEGORIES= sysutils
MASTER_SITES= https://fedorahosted.org/releases/l/o/logrotate/
DISTNAME= ${PORTNAME}-${PORTVERSION}
@@ -17,11 +16,11 @@ COMMENT= Daemon to rotate, compress, remove and mail system log files
LIB_DEPENDS= popt.0:${PORTSDIR}/devel/popt
+PATCH_STRIP= -p1
USE_GMAKE= yes
MAKE_ENV= "BASEDIR=${PREFIX}"
-PATCH_WRKSRC= ${WRKDIR}
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+MAN5= logrotate.conf.5
MAN8= logrotate.8
MANCOMPRESSED= no
diff --git a/sysutils/logrotate/distinfo b/sysutils/logrotate/distinfo
index 1a896d3cc7ed..9b6d675df7c2 100644
--- a/sysutils/logrotate/distinfo
+++ b/sysutils/logrotate/distinfo
@@ -1,3 +1,3 @@
-MD5 (logrotate-3.7.7.tar.gz) = 431e135abb7f3fe19de4c6a65bb66823
-SHA256 (logrotate-3.7.7.tar.gz) = b281c1f318417184caf2588979a04793809f2c6f558c6249248ebb07494cc93f
-SIZE (logrotate-3.7.7.tar.gz) = 42867
+MD5 (logrotate-3.7.9.tar.gz) = eeba9dbca62a9210236f4b83195e4ea5
+SHA256 (logrotate-3.7.9.tar.gz) = 080caf904e70e04da16b8dfa95a5a787ec7d722ee1af18ccea437d3ffdd6fec0
+SIZE (logrotate-3.7.9.tar.gz) = 45301
diff --git a/sysutils/logrotate/files/patch-Makefile b/sysutils/logrotate/files/patch-Makefile
index 4af87b47397a..6e40d289d848 100644
--- a/sysutils/logrotate/files/patch-Makefile
+++ b/sysutils/logrotate/files/patch-Makefile
@@ -1,7 +1,8 @@
-diff -ruN logrotate-3.7.7-orig/Makefile logrotate-3.7.7/Makefile
---- logrotate-3.7.7-orig/Makefile Mon May 19 10:25:54 2008
-+++ logrotate-3.7.7/Makefile Sun Jun 22 21:49:41 2008
-@@ -51,6 +51,13 @@
+diff --git a/Makefile b/Makefile
+index adb97f2..a2d51f7 100644
+--- a/Makefile
++++ b/Makefile
+@@ -53,6 +53,13 @@ ifeq ($(OS_NAME),Linux)
BASEDIR = /usr
endif
@@ -15,16 +16,18 @@ diff -ruN logrotate-3.7.7-orig/Makefile logrotate-3.7.7/Makefile
ifneq ($(POPT_DIR),)
CFLAGS += -I$(POPT_DIR)
LOADLIBES += -L$(POPT_DIR)
-@@ -103,10 +110,13 @@
- if [ "$(OS_NAME)" = HP-UX ]; then \
+@@ -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
diff --git a/sysutils/logrotate/files/patch-aa b/sysutils/logrotate/files/patch-aa
deleted file mode 100644
index fb7868c1070e..000000000000
--- a/sysutils/logrotate/files/patch-aa
+++ /dev/null
@@ -1,43 +0,0 @@
-diff -u logrotate-3.7.7-orig/config.c logrotate-3.7.7/config.c
---- logrotate-3.7.7-orig/config.c 2008-08-07 15:10:36.000000000 +0200
-+++ logrotate-3.7.7/config.c 2008-08-07 15:11:54.000000000 +0200
-@@ -1,5 +1,4 @@
- #include <sys/queue.h>
--#include <alloca.h>
- #include <ctype.h>
- #include <dirent.h>
- #include <errno.h>
-@@ -18,6 +17,7 @@
- #include <wchar.h>
- #include <wctype.h>
- #include <fnmatch.h>
-+#include <limits.h>
-
- #include "basenames.h"
- #include "log.h"
-@@ -93,7 +93,7 @@
-
- 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);
-diff -u logrotate-3.7.7-orig/logrotate.c logrotate-3.7.7/logrotate.c
---- logrotate-3.7.7-orig/logrotate.c 2008-08-07 15:10:36.000000000 +0200
-+++ logrotate-3.7.7/logrotate.c 2008-08-07 15:10:43.000000000 +0200
-@@ -1,5 +1,4 @@
- #include <sys/queue.h>
--#include <alloca.h>
- #include <ctype.h>
- #include <dirent.h>
- #include <errno.h>
-@@ -14,6 +13,7 @@
- #include <unistd.h>
- #include <glob.h>
- #include <locale.h>
-+#include <limits.h>
-
- #ifdef WITH_SELINUX
- #include <selinux/selinux.h>
diff --git a/sysutils/logrotate/files/patch-config.c b/sysutils/logrotate/files/patch-config.c
new file mode 100644
index 000000000000..7235df9a64bb
--- /dev/null
+++ b/sysutils/logrotate/files/patch-config.c
@@ -0,0 +1,67 @@
+diff --git a/config.c b/config.c
+index e6d5d1d..d14d742 100644
+--- a/config.c
++++ b/config.c
+@@ -1,5 +1,4 @@
+ #include <sys/queue.h>
+-#include <alloca.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) {
diff --git a/sysutils/logrotate/files/patch-config.h b/sysutils/logrotate/files/patch-config.h
index 3f7b61634c55..d5d08ed63a3a 100644
--- a/sysutils/logrotate/files/patch-config.h
+++ b/sysutils/logrotate/files/patch-config.h
@@ -1,6 +1,7 @@
-diff -ruN logrotate-3.7.7-orig/config.h logrotate-3.7.7/config.h
---- logrotate-3.7.7-orig/config.h Sat Nov 12 19:07:56 2005
-+++ logrotate-3.7.7/config.h Sun Jun 22 22:02:29 2008
+diff --git a/config.h b/config.h
+index ae7f308..7c0a2b3 100644
+--- a/config.h
++++ b/config.h
@@ -16,6 +16,13 @@
#define STATEFILE "/var/log/logrotate.status"
#endif
diff --git a/sysutils/logrotate/files/patch-man b/sysutils/logrotate/files/patch-logrotate.8
index 8d175f439e7f..0831d47c7261 100644
--- a/sysutils/logrotate/files/patch-man
+++ b/sysutils/logrotate/files/patch-logrotate.8
@@ -1,7 +1,8 @@
-diff -ruN logrotate-3.7.7-orig/logrotate.8 logrotate-3.7.7/logrotate.8
---- logrotate-3.7.7-orig/logrotate.8 Wed May 14 08:12:14 2008
-+++ logrotate-3.7.7/logrotate.8 Sun Jun 22 22:22:41 2008
-@@ -46,14 +46,14 @@
+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
@@ -18,7 +19,7 @@ diff -ruN logrotate-3.7.7-orig/logrotate.8 logrotate-3.7.7/logrotate.8
.TP
\fB-\-usage\fR
-@@ -456,10 +456,10 @@
+@@ -473,10 +473,10 @@ Log files are rotated if the current year is not the same as the last rotation.
.SH FILES
.PD 0
.TP 27
diff --git a/sysutils/logrotate/files/patch-logrotate.c b/sysutils/logrotate/files/patch-logrotate.c
new file mode 100644
index 000000000000..926f3a1906e2
--- /dev/null
+++ b/sysutils/logrotate/files/patch-logrotate.c
@@ -0,0 +1,18 @@
+diff --git a/logrotate.c b/logrotate.c
+index 3748918..a528367 100644
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -1,5 +1,4 @@
+ #include <sys/queue.h>
+-#include <alloca.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>