pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Import logorate-3.9.2 as wip/logrotate-git.



Module Name:	pkgsrc-wip
Committed By:	Nils Ratusznik <nils%NetBSD.org@localhost>
Pushed By:	nils
Date:		Wed Jan 20 13:39:39 2016 +0100
Changeset:	35d7fd02fc272bd0ff12bb87e0a77a7c39ee3c27

Added Files:
	logrotate-git/DESCR
	logrotate-git/MESSAGE
	logrotate-git/Makefile
	logrotate-git/PLIST
	logrotate-git/distinfo
	logrotate-git/patches/patch-config.c
	logrotate-git/patches/patch-examples_logrotate-default
	logrotate-git/patches/patch-examples_logrotate.cron
	logrotate-git/patches/patch-logrotate.8

Log Message:
Import logorate-3.9.2 as wip/logrotate-git.

The logrotate utility is designed to simplify the administration of
log files on a system which generates a lot of log files.  Logrotate
allows for the automatic rotation compression, removal and mailing of
log files.  Logrotate can be set to handle a log file daily, weekly,
monthly or when the log file gets to a certain size.  Normally,
logrotate runs as a daily cron job.

This package will replace wip/logrotate-svn since the project is now
hosted on GitHub.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=35d7fd02fc272bd0ff12bb87e0a77a7c39ee3c27

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 logrotate-git/DESCR                                |  6 +++
 logrotate-git/MESSAGE                              | 13 +++++
 logrotate-git/Makefile                             | 61 ++++++++++++++++++++++
 logrotate-git/PLIST                                | 11 ++++
 logrotate-git/distinfo                             | 10 ++++
 logrotate-git/patches/patch-config.c               | 47 +++++++++++++++++
 .../patches/patch-examples_logrotate-default       | 31 +++++++++++
 .../patches/patch-examples_logrotate.cron          | 14 +++++
 logrotate-git/patches/patch-logrotate.8            | 28 ++++++++++
 9 files changed, 221 insertions(+)

diffs:
diff --git a/logrotate-git/DESCR b/logrotate-git/DESCR
new file mode 100644
index 0000000..b16a265
--- /dev/null
+++ b/logrotate-git/DESCR
@@ -0,0 +1,6 @@
+The logrotate utility is designed to simplify the administration of
+log files on a system which generates a lot of log files.  Logrotate
+allows for the automatic rotation compression, removal and mailing of
+log files.  Logrotate can be set to handle a log file daily, weekly,
+monthly or when the log file gets to a certain size.  Normally,
+logrotate runs as a daily cron job.
diff --git a/logrotate-git/MESSAGE b/logrotate-git/MESSAGE
new file mode 100644
index 0000000..b940b5d
--- /dev/null
+++ b/logrotate-git/MESSAGE
@@ -0,0 +1,13 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.2 2013/01/10 18:16:29 wiz Exp $
+To set up ${PKGNAME}:
+
+1/ modify ${PKG_SYSCONFDIR}/logrotate.conf to your needs,
+or better, add your own configuration files in
+${PKG_SYSCONFDIR}/logrotate.d/
+
+2/ set up a daily cron job for logrotate in ${ROOT_USER}'s crontab;
+this can be done with one of the following line:
+0 0 * * * /bin/sh ${EGDIR}/logrotate.cron
+0 0 * * * ${PREFIX}/sbin/logrotate ${PKG_SYSCONFDIR}/logrotate.conf
+===========================================================================
diff --git a/logrotate-git/Makefile b/logrotate-git/Makefile
new file mode 100644
index 0000000..8601c2e
--- /dev/null
+++ b/logrotate-git/Makefile
@@ -0,0 +1,61 @@
+# $NetBSD: Makefile,v 1.10 2015/06/29 12:28:55 nils Exp $
+
+DISTNAME=		${GHCOMMIT}
+PKGNAME=		logorate-3.9.2
+CATEGORIES=		sysutils
+MASTER_SITES=		${MASTER_SITE_GITHUB:=logrotate/logrotate/archive/}
+
+MAINTAINER=		nils%NetBSD.org@localhost
+HOMEPAGE=		${MASTER_SITE_GITHUB:=logrotate/logrotate/}
+COMMENT=		Daemon to rotate, compress, remove and mail system log files
+LICENSE=		gnu-gpl-v2
+
+GHCOMMIT=		f6ca8f386d1444ef46b7eaf8b3f8a19f2b548f60
+USE_TOOLS+=		gmake gzip:run gunzip:run mail:run automake autoconf
+USE_LIBTOOL=		yes
+GNU_CONFIGURE=		yes
+HAS_CONFIGURE=		yes
+NO_EXPORT_CPP=		yes
+
+WRKSRC=			${WRKDIR}/logrotate-${GHCOMMIT}
+CONFIGURE_ENV+=		STATEFILE=\"${VARBASE}/db/logrotate.status\"
+CONFIGURE_ENV+=		DEFAULT_MAIL_COMMAND=\"${MAIL_CMD:Q}\"
+CONFIGURE_ENV+=		COMPRESS_COMMAND=\"${GZIP_CMD:[1]:Q}\"
+CONFIGURE_ENV+=		UNCOMPRESS_COMMAND=\"${GUNZIP_CMD:[1]:Q}\"
+
+BUILD_DEFS+=		VARBASE
+EGDIR=			${PREFIX}/share/examples/logrotate
+CONF_FILES=		${EGDIR}/logrotate.conf ${PKG_SYSCONFDIR}/logrotate.conf
+OWN_DIRS=		${PKG_SYSCONFDIR}/logrotate.d
+MESSAGE_SUBST+=		EGDIR=${EGDIR}
+INSTALLATION_DIRS+=	${EGDIR} ${PKG_SYSCONFDIR} ${OWN_DIRS}
+AUTO_MKDIRS=		yes
+
+SUBST_CLASSES+=		paths
+SUBST_STAGE.paths=	pre-build
+SUBST_MESSAGE.paths=	Substituting paths variables.
+SUBST_FILES.paths=	examples/logrotate-default
+SUBST_FILES.paths+=	examples/logrotate.cron
+SUBST_FILES.paths+=	logrotate.8
+SUBST_VARS.paths=	PREFIX
+SUBST_VARS.paths+=	VARBASE
+SUBST_VARS.paths+=	PKG_SYSCONFDIR
+
+DOCDIR=			share/doc/logrotate
+
+pre-configure:
+	cd ${WRKSRC} && \
+		${SETENV} ${CONFIGURE_ENV} ./autogen.sh
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/logrotate ${DESTDIR}${PREFIX}/sbin
+	${INSTALL_DATA} ${WRKSRC}/examples/logrotate-default ${DESTDIR}${EGDIR}/logrotate.conf
+	${INSTALL_DATA} ${WRKSRC}/examples/logrotate.cron ${DESTDIR}/${EGDIR}
+	${INSTALL_DATA} ${WRKSRC}/README.* ${DESTDIR}${PREFIX}/${DOCDIR}
+	${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${PREFIX}/${DOCDIR}
+	${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/${DOCDIR}
+	${INSTALL_MAN} ${WRKSRC}/logrotate.conf.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
+	${INSTALL_MAN} ${WRKSRC}/logrotate.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
+
+.include "../../devel/popt/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/logrotate-git/PLIST b/logrotate-git/PLIST
new file mode 100644
index 0000000..e0f0627
--- /dev/null
+++ b/logrotate-git/PLIST
@@ -0,0 +1,11 @@
+@comment $NetBSD$
+man/man5/logrotate.conf.5
+man/man8/logrotate.8
+sbin/logrotate
+share/doc/logrotate/CHANGES
+share/doc/logrotate/COPYING
+share/doc/logrotate/README.HPUX
+share/doc/logrotate/README.Solaris
+share/doc/logrotate/README.md
+share/examples/logrotate/logrotate.conf
+share/examples/logrotate/logrotate.cron
diff --git a/logrotate-git/distinfo b/logrotate-git/distinfo
new file mode 100644
index 0000000..01dfa21
--- /dev/null
+++ b/logrotate-git/distinfo
@@ -0,0 +1,10 @@
+$NetBSD: distinfo,v 1.10 2015/11/04 01:32:20 agc Exp $
+
+SHA1 (f6ca8f386d1444ef46b7eaf8b3f8a19f2b548f60.tar.gz) = 888dbb96dc004e029fe8d08356b32ad83a76a61e
+RMD160 (f6ca8f386d1444ef46b7eaf8b3f8a19f2b548f60.tar.gz) = 5933b6bce9475b55fecb55814a7b0943ba219b12
+SHA512 (f6ca8f386d1444ef46b7eaf8b3f8a19f2b548f60.tar.gz) = f2a372dc556504a38b93228ff425f8b812cd951627c0509f42799319b8e1798f24864bd17661d3919afc641c7c640edb32382f7b507c35e8d8d772fd131e5559
+Size (f6ca8f386d1444ef46b7eaf8b3f8a19f2b548f60.tar.gz) = 80878 bytes
+SHA1 (patch-config.c) = aa3e8db2d2aec28c1947187fe19e70a292464cd7
+SHA1 (patch-examples_logrotate-default) = 57fc602caa5eeaa830f5d2dc0667e11330bcd1e8
+SHA1 (patch-examples_logrotate.cron) = 02981cb2b49e3f3f500fcb3db9b5dcb5fe62bddc
+SHA1 (patch-logrotate.8) = 0bf7d9cfbc2f5dfff42a82b523926b9c8d0362a0
diff --git a/logrotate-git/patches/patch-config.c b/logrotate-git/patches/patch-config.c
new file mode 100644
index 0000000..344fbb2
--- /dev/null
+++ b/logrotate-git/patches/patch-config.c
@@ -0,0 +1,47 @@
+$NetBSD$
+
+Solves NetBSD compilation errors. Patch submitted upstream (PR #17).
+
+--- config.c.orig	2016-01-20 09:47:36.000000000 +0000
++++ config.c
+@@ -146,11 +146,11 @@ static char *isolateValue(const char *fi
+ {
+     char *chptr = *startPtr;
+ 
+-    while (chptr - *buf < length && isblank(*chptr))
++    while (chptr - *buf < length && isblank((unsigned char)*chptr))
+ 	chptr++;
+     if (chptr - *buf < length && *chptr == '=') {
+ 	chptr++;
+-	while ( chptr - *buf < length && isblank(*chptr))
++	while ( chptr - *buf < length && isblank((unsigned char)*chptr))
+ 	    chptr++;
+     }
+ 
+@@ -167,7 +167,7 @@ static char *isolateValue(const char *fi
+ static char *isolateWord(char **strt, char **buf, size_t length) {
+ 	char *endtag, *start;
+ 	start = *strt;
+-	while (start - *buf < length && isblank(*start))
++	while (start - *buf < length && isblank((unsigned char)*start))
+ 		start++;
+ 	endtag = start;
+ 	while (endtag - *buf < length && isalpha((unsigned char)*endtag)) {
+@@ -868,7 +868,7 @@ static int readConfigFile(const char *co
+ 	}
+ 	switch (state) {
+ 		case STATE_DEFAULT:
+-			if (isblank(*start))
++			if (isblank((unsigned char)*start))
+ 				continue;
+ 			/* Skip comment */
+ 			if (*start == '#') {
+@@ -1533,7 +1533,7 @@ static int readConfigFile(const char *co
+ 			break;
+ 		case STATE_DEFINITION_END:
+ 		case STATE_DEFINITION_END | STATE_SKIP_CONFIG:
+-			if (isblank(*start))
++			if (isblank((unsigned char)*start))
+ 				continue;
+ 			if (*start != '\n') {
+ 				message(MESS_ERROR, "%s:%d, unexpected text after }\n",
diff --git a/logrotate-git/patches/patch-examples_logrotate-default b/logrotate-git/patches/patch-examples_logrotate-default
new file mode 100644
index 0000000..e94203c
--- /dev/null
+++ b/logrotate-git/patches/patch-examples_logrotate-default
@@ -0,0 +1,31 @@
+$NetBSD: patch-examples_logrotate-default,v 1.3 2015/03/11 21:34:16 nils Exp $
+
+Add pkgsrc paths compatibility.
+
+--- examples/logrotate-default.orig	2014-10-16 11:12:35.000000000 +0000
++++ examples/logrotate-default
+@@ -14,22 +14,7 @@ dateext
+ # uncomment this if you want your log files compressed
+ #compress
+ 
+-# RPM packages drop log rotation information into this directory
+-include /etc/logrotate.d
+-
+-# no packages own wtmp and btmp -- we'll rotate them here
+-/var/log/wtmp {
+-    monthly
+-    create 0664 root utmp
+-    minsize 1M
+-    rotate 1
+-}
+-
+-/var/log/btmp {
+-    missingok
+-    monthly
+-    create 0600 root utmp
+-    rotate 1
+-}
++# Packages drop log rotation information into this directory
++include @PKG_SYSCONFDIR@/logrotate.d
+ 
+ # system-specific logs may be also be configured here.
diff --git a/logrotate-git/patches/patch-examples_logrotate.cron b/logrotate-git/patches/patch-examples_logrotate.cron
new file mode 100644
index 0000000..490c6e0
--- /dev/null
+++ b/logrotate-git/patches/patch-examples_logrotate.cron
@@ -0,0 +1,14 @@
+$NetBSD: patch-examples_logrotate.cron,v 1.1.1.1 2012/03/06 04:53:24 sbd Exp $
+
+Add pkgsrc paths compatibility
+
+--- examples/logrotate.cron.orig	2011-08-31 12:39:04.000000000 +0000
++++ examples/logrotate.cron
+@@ -1,6 +1,6 @@
+ #!/bin/sh
+ 
+-/usr/sbin/logrotate /etc/logrotate.conf
++@PREFIX@/sbin/logrotate @PKG_SYSCONFDIR@/logrotate.conf
+ EXITVALUE=$?
+ if [ $EXITVALUE != 0 ]; then
+     /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
diff --git a/logrotate-git/patches/patch-logrotate.8 b/logrotate-git/patches/patch-logrotate.8
new file mode 100644
index 0000000..4c6ca2f
--- /dev/null
+++ b/logrotate-git/patches/patch-logrotate.8
@@ -0,0 +1,28 @@
+$NetBSD: patch-logrotate.8,v 1.3 2013/07/28 11:21:23 obache Exp $
+
+Add pkgsrc paths compatibility
+
+--- logrotate.8.orig	2013-06-10 12:02:36.000000000 +0000
++++ logrotate.8
+@@ -59,7 +59,7 @@ and mail it to the recipient. The defaul
+ \fB\-s\fR, \fB\-\-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
+-log files.  The default state file is \fI/var/lib/logrotate.status\fR.
++log files.  The default state file is \fI@VARBASE@/db/logrotate.status\fR.
+ 
+ .TP
+ \fB\-\-usage\fR
+@@ -523,10 +523,10 @@ Log files are rotated if the current yea
+ .SH FILES
+ .PD 0
+ .TP 27
+-\fI/var/lib/logrotate.status\fR
++\fI@VARBASE@/db/logrotate.status\fR
+ Default state file.
+ .TP 27
+-\fI/etc/logrotate.conf\fR
++\fI@PKG_SYSCONFDIR@/logrotate.conf\fR
+ Configuration options.
+ 
+ .SH SEE ALSO


Home | Main Index | Thread Index | Old Index