Updated to version 3.11.0. Upstream Changelog : - Add taboopat configuration directive to exclude configuration files based on globing patterns. - Allow to change default state path at build time (via the --with-state-file-path option of the configure script). - Automatically determine resulting file suffix based on the compression program in use. - Preserve SELinux context with compress and sharedscripts properly. - Rename already existing output files to avoid collisions. - Import systemd service and timer for logrotate from openSUSE. - Introduce the addextension configuration directive. - Create CONTRIBUTING.md with instructions for logrotate contributors. - Maintain ChangeLog.md instead of the legacy CHANGES file. - Make createolddir configuration directive preserve sticky bit. - Add minage configuration directive to specify minimum file age to rotate. - Avoid using local implementation of strndup() and asprintf() if these functions are available at build time. - Fix parsing of su directive to accept usernames starting with numeric symbols. - Make sure that 64-bit file offsets are used on 32-bit systems. Pkgsrc changes : - due to (not so) new compilation system, and recent changes for the manpage, patch-logrotate.8 is now unnecessary and removed ; - fixed compilation issue in config.c about libgen.h ; - updated existing patches to work with new version.diff -r1.14 -r1.15 pkgsrc/sysutils/logrotate/Makefile
(nils)
@@ -1,61 +1,61 @@ | @@ -1,61 +1,61 @@ | |||
1 | # $NetBSD: Makefile,v 1.14 2016/08/03 12:49:36 nils Exp $ | 1 | # $NetBSD: Makefile,v 1.15 2017/01/26 20:12:32 nils Exp $ | |
2 | 2 | |||
3 | DISTNAME= ${GHCOMMIT} | 3 | DISTNAME= ${GHCOMMIT} | |
4 | PKGNAME= logrotate-3.10.0 | 4 | PKGNAME= logrotate-3.11.0 | |
5 | CATEGORIES= sysutils | 5 | CATEGORIES= sysutils | |
6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=logrotate/logrotate/archive/} | 6 | MASTER_SITES= ${MASTER_SITE_GITHUB:=logrotate/logrotate/archive/} | |
7 | 7 | |||
8 | MAINTAINER= nils@NetBSD.org | 8 | MAINTAINER= nils@NetBSD.org | |
9 | HOMEPAGE= https://github.com/logrotate/logrotate/ | 9 | HOMEPAGE= https://github.com/logrotate/logrotate/ | |
10 | COMMENT= Daemon to rotate, compress, remove and mail system log files | 10 | COMMENT= Daemon to rotate, compress, remove and mail system log files | |
11 | LICENSE= gnu-gpl-v2 | 11 | LICENSE= gnu-gpl-v2 | |
12 | 12 | |||
13 | GHCOMMIT= ca742b9dd72b7815e87cb53331f08d46fe21d86c | 13 | GHCOMMIT= f16495b3e5f3e5f333956a384fdc9917fc8ec81a | |
14 | USE_TOOLS+= gmake gzip:run gunzip:run mail:run automake autoconf | 14 | USE_TOOLS+= gmake gzip:run gunzip:run mail:run automake autoconf | |
15 | USE_LIBTOOL= yes | 15 | USE_LIBTOOL= yes | |
16 | GNU_CONFIGURE= yes | 16 | GNU_CONFIGURE= yes | |
17 | HAS_CONFIGURE= yes | 17 | HAS_CONFIGURE= yes | |
18 | NO_EXPORT_CPP= yes | 18 | NO_EXPORT_CPP= yes | |
19 | 19 | |||
20 | WRKSRC= ${WRKDIR}/logrotate-${GHCOMMIT} | 20 | WRKSRC= ${WRKDIR}/logrotate-${GHCOMMIT} | |
21 | CONFIGURE_ENV+= STATEFILE=\"${VARBASE}/db/logrotate.status\" | 21 | CONFIGURE_ENV+= STATEFILE=\"${VARBASE}/db/logrotate.status\" | |
22 | CONFIGURE_ENV+= DEFAULT_MAIL_COMMAND=\"${MAIL_CMD:Q}\" | 22 | CONFIGURE_ENV+= DEFAULT_MAIL_COMMAND=\"${MAIL_CMD:Q}\" | |
23 | CONFIGURE_ENV+= COMPRESS_COMMAND=\"${GZIP_CMD:[1]:Q}\" | 23 | CONFIGURE_ENV+= COMPRESS_COMMAND=\"${GZIP_CMD:[1]:Q}\" | |
24 | CONFIGURE_ENV+= UNCOMPRESS_COMMAND=\"${GUNZIP_CMD:[1]:Q}\" | 24 | CONFIGURE_ENV+= UNCOMPRESS_COMMAND=\"${GUNZIP_CMD:[1]:Q}\" | |
25 | CONFIGURE_ARGS+= --with-state-file-path="${VARBASE}/db/logrotate.status" | |||
25 | 26 | |||
26 | BUILD_DEFS+= VARBASE | 27 | BUILD_DEFS+= VARBASE | |
27 | EGDIR= ${PREFIX}/share/examples/logrotate | 28 | EGDIR= ${PREFIX}/share/examples/logrotate | |
28 | CONF_FILES= ${EGDIR}/logrotate.conf ${PKG_SYSCONFDIR}/logrotate.conf | 29 | CONF_FILES= ${EGDIR}/logrotate.conf ${PKG_SYSCONFDIR}/logrotate.conf | |
29 | OWN_DIRS= ${PKG_SYSCONFDIR}/logrotate.d | 30 | OWN_DIRS= ${PKG_SYSCONFDIR}/logrotate.d | |
30 | MESSAGE_SUBST+= EGDIR=${EGDIR} | 31 | MESSAGE_SUBST+= EGDIR=${EGDIR} | |
31 | INSTALLATION_DIRS+= ${EGDIR} ${PKG_SYSCONFDIR} ${OWN_DIRS} | 32 | INSTALLATION_DIRS+= ${EGDIR} ${PKG_SYSCONFDIR} ${OWN_DIRS} | |
32 | AUTO_MKDIRS= yes | 33 | AUTO_MKDIRS= yes | |
33 | 34 | |||
34 | SUBST_CLASSES+= paths | 35 | SUBST_CLASSES+= paths | |
35 | SUBST_STAGE.paths= pre-build | 36 | SUBST_STAGE.paths= pre-build | |
36 | SUBST_MESSAGE.paths= Substituting paths variables. | 37 | SUBST_MESSAGE.paths= Substituting paths variables. | |
37 | SUBST_FILES.paths= examples/logrotate-default | 38 | SUBST_FILES.paths= examples/logrotate-default | |
38 | SUBST_FILES.paths+= examples/logrotate.cron | 39 | SUBST_FILES.paths+= examples/logrotate.cron | |
39 | SUBST_FILES.paths+= logrotate.8 | |||
40 | SUBST_VARS.paths= PREFIX | 40 | SUBST_VARS.paths= PREFIX | |
41 | SUBST_VARS.paths+= VARBASE | 41 | SUBST_VARS.paths+= VARBASE | |
42 | SUBST_VARS.paths+= PKG_SYSCONFDIR | 42 | SUBST_VARS.paths+= PKG_SYSCONFDIR | |
43 | 43 | |||
44 | DOCDIR= share/doc/logrotate | 44 | DOCDIR= share/doc/logrotate | |
45 | 45 | |||
46 | pre-configure: | 46 | pre-configure: | |
47 | cd ${WRKSRC} && \ | 47 | cd ${WRKSRC} && \ | |
48 | ${SETENV} ${CONFIGURE_ENV} ./autogen.sh | 48 | ${SETENV} ${CONFIGURE_ENV} ./autogen.sh | |
49 | 49 | |||
50 | do-install: | 50 | do-install: | |
51 | ${INSTALL_PROGRAM} ${WRKSRC}/logrotate ${DESTDIR}${PREFIX}/sbin | 51 | ${INSTALL_PROGRAM} ${WRKSRC}/logrotate ${DESTDIR}${PREFIX}/sbin | |
52 | ${INSTALL_DATA} ${WRKSRC}/examples/logrotate-default ${DESTDIR}${EGDIR}/logrotate.conf | 52 | ${INSTALL_DATA} ${WRKSRC}/examples/logrotate-default ${DESTDIR}${EGDIR}/logrotate.conf | |
53 | ${INSTALL_DATA} ${WRKSRC}/examples/logrotate.cron ${DESTDIR}/${EGDIR} | 53 | ${INSTALL_DATA} ${WRKSRC}/examples/logrotate.cron ${DESTDIR}/${EGDIR} | |
54 | ${INSTALL_DATA} ${WRKSRC}/README.* ${DESTDIR}${PREFIX}/${DOCDIR} | 54 | ${INSTALL_DATA} ${WRKSRC}/README.* ${DESTDIR}${PREFIX}/${DOCDIR} | |
55 | ${INSTALL_DATA} ${WRKSRC}/CHANGES ${DESTDIR}${PREFIX}/${DOCDIR} | 55 | ${INSTALL_DATA} ${WRKSRC}/ChangeLog.md ${DESTDIR}${PREFIX}/${DOCDIR} | |
56 | ${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/${DOCDIR} | 56 | ${INSTALL_DATA} ${WRKSRC}/COPYING ${DESTDIR}${PREFIX}/${DOCDIR} | |
57 | ${INSTALL_MAN} ${WRKSRC}/logrotate.conf.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5 | 57 | ${INSTALL_MAN} ${WRKSRC}/logrotate.conf.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5 | |
58 | ${INSTALL_MAN} ${WRKSRC}/logrotate.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8 | 58 | ${INSTALL_MAN} ${WRKSRC}/logrotate.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8 | |
59 | 59 | |||
60 | .include "../../devel/popt/buildlink3.mk" | 60 | .include "../../devel/popt/buildlink3.mk" | |
61 | .include "../../mk/bsd.pkg.mk" | 61 | .include "../../mk/bsd.pkg.mk" |
@@ -1,11 +1,12 @@ | @@ -1,11 +1,12 @@ | |||
1 | @comment $NetBSD: PLIST,v 1.3 2016/02/24 20:50:29 nils Exp $ | 1 | @comment $NetBSD: PLIST,v 1.4 2017/01/26 20:12:32 nils Exp $ | |
2 | man/man5/logrotate.conf.5 | 2 | man/man5/logrotate.conf.5 | |
3 | man/man8/logrotate.8 | 3 | man/man8/logrotate.8 | |
4 | sbin/logrotate | 4 | sbin/logrotate | |
5 | share/doc/logrotate/CHANGES | |||
6 | share/doc/logrotate/COPYING | 5 | share/doc/logrotate/COPYING | |
6 | share/doc/logrotate/ChangeLog.md | |||
7 | share/doc/logrotate/README.HPUX | 7 | share/doc/logrotate/README.HPUX | |
8 | share/doc/logrotate/README.Solaris | 8 | share/doc/logrotate/README.Solaris | |
9 | share/doc/logrotate/README.md | 9 | share/doc/logrotate/README.md | |
10 | share/examples/logrotate/logrotate.conf | 10 | share/examples/logrotate/logrotate.conf | |
11 | share/examples/logrotate/logrotate.cron | 11 | share/examples/logrotate/logrotate.cron | |
12 | @pkgdir etc/logrotate.d |
@@ -1,9 +1,9 @@ | @@ -1,9 +1,9 @@ | |||
1 | $NetBSD: distinfo,v 1.12 2016/08/03 12:49:36 nils Exp $ | 1 | $NetBSD: distinfo,v 1.13 2017/01/26 20:12:32 nils Exp $ | |
2 | 2 | |||
3 | SHA1 (ca742b9dd72b7815e87cb53331f08d46fe21d86c.tar.gz) = f28ad00239d725d36b36286dfffeb5b55801951a | 3 | SHA1 (f16495b3e5f3e5f333956a384fdc9917fc8ec81a.tar.gz) = 895fb10b66008c54fa49e7159bfbaed4eeb7f52c | |
4 | RMD160 (ca742b9dd72b7815e87cb53331f08d46fe21d86c.tar.gz) = 34448a9156d4a30bd978809c595d699a2db091eb | 4 | RMD160 (f16495b3e5f3e5f333956a384fdc9917fc8ec81a.tar.gz) = 70308f6d985b95c89d8ead8021c62265e870b21b | |
5 | SHA512 (ca742b9dd72b7815e87cb53331f08d46fe21d86c.tar.gz) = 50cd05a9558d3958155b1a2e6485e58599590a789ab70d0e523a1205beda7e6c04adec1bdd8b34bd263f2d301b26a66d7634faa5232e1a1251482a210aaf0c12 | 5 | SHA512 (f16495b3e5f3e5f333956a384fdc9917fc8ec81a.tar.gz) = f6a6c23a114e8e56cd0b432a2d41e5e85a568510cfa61482316b9bce63e88ecce5a388c5b485a118bbe14ff26f5b15ef8a9fa10dda34c6688c9c65a57d5cc797 | |
6 | Size (ca742b9dd72b7815e87cb53331f08d46fe21d86c.tar.gz) = 78769 bytes | 6 | Size (f16495b3e5f3e5f333956a384fdc9917fc8ec81a.tar.gz) = 84155 bytes | |
7 | SHA1 (patch-examples_logrotate-default) = 57fc602caa5eeaa830f5d2dc0667e11330bcd1e8 | 7 | SHA1 (patch-config.c) = a6c775599857f01fa11bb99113795794f46664f5 | |
8 | SHA1 (patch-examples_logrotate.cron) = 02981cb2b49e3f3f500fcb3db9b5dcb5fe62bddc | 8 | SHA1 (patch-examples_logrotate-default) = 6d3f575cc6563dd8c00dad4b1baa4e9d5eadae3b | |
9 | SHA1 (patch-logrotate.8) = 0bf7d9cfbc2f5dfff42a82b523926b9c8d0362a0 | 9 | SHA1 (patch-examples_logrotate.cron) = e7e7a3f0ff77b3ee5fbf69ee2acecac136b0be8f |
$NetBSD: patch-config.c,v 1.5 2017/01/26 20:12:32 nils Exp $
Fix NetBSD compilation.
--- config.c.orig 2016-12-02 13:12:33.000000000 +0000
+++ config.c
@@ -3,6 +3,9 @@
#ifndef __NetBSD__
#include <alloca.h>
#endif
+#ifndef _LIBGEN_H_
+# include <libgen.h>
+#endif
#include <limits.h>
#include <ctype.h>
#include <dirent.h>
@@ -1,31 +1,31 @@ | @@ -1,31 +1,31 @@ | |||
1 | $NetBSD: patch-examples_logrotate-default,v 1.3 2015/03/11 21:34:16 nils Exp $ | 1 | $NetBSD: patch-examples_logrotate-default,v 1.4 2017/01/26 20:12:32 nils Exp $ | |
2 | 2 | |||
3 | Add pkgsrc paths compatibility. | 3 | Add pkgsrc paths compatibility. | |
4 | 4 | |||
5 | --- examples/logrotate-default.orig 2014-10-16 11:12:35.000000000 +0000 | 5 | --- examples/logrotate-default.orig 2016-12-02 13:12:33.000000000 +0000 | |
6 | +++ examples/logrotate-default | 6 | +++ examples/logrotate-default | |
7 | @@ -14,22 +14,7 @@ dateext | 7 | @@ -14,22 +14,7 @@ dateext | |
8 | # uncomment this if you want your log files compressed | 8 | # uncomment this if you want your log files compressed | |
9 | #compress | 9 | #compress | |
10 | 10 | |||
11 | -# RPM packages drop log rotation information into this directory | 11 | -# RPM packages drop log rotation information into this directory | |
12 | -include /etc/logrotate.d | 12 | -include /etc/logrotate.d | |
13 | - | 13 | - | |
14 | -# no packages own wtmp and btmp -- we'll rotate them here | 14 | -# no packages own wtmp and btmp -- we'll rotate them here | |
15 | -/var/log/wtmp { | 15 | -/var/log/wtmp { | |
16 | - monthly | 16 | - monthly | |
17 | - create 0664 root utmp | 17 | - create 0664 root utmp | |
18 | - minsize 1M | 18 | - minsize 1M | |
19 | - rotate 1 | 19 | - rotate 1 | |
20 | -} | 20 | -} | |
21 | - | 21 | - | |
22 | -/var/log/btmp { | 22 | -/var/log/btmp { | |
23 | - missingok | 23 | - missingok | |
24 | - monthly | 24 | - monthly | |
25 | - create 0600 root utmp | 25 | - create 0600 root utmp | |
26 | - rotate 1 | 26 | - rotate 1 | |
27 | -} | 27 | -} | |
28 | +# Packages drop log rotation information into this directory | 28 | +# Packages drop log rotation information into this directory | |
29 | +include @PKG_SYSCONFDIR@/logrotate.d | 29 | +include /usr/pkg/etc/logrotate.d | |
30 | 30 | |||
31 | # system-specific logs may be also be configured here. | 31 | # system-specific logs may be also be configured here. |
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | $NetBSD: patch-examples_logrotate.cron,v 1.1.1.1 2012/03/06 04:53:24 sbd Exp $ | 1 | $NetBSD: patch-examples_logrotate.cron,v 1.2 2017/01/26 20:12:32 nils Exp $ | |
2 | 2 | |||
3 | Add pkgsrc paths compatibility | 3 | Add pkgsrc paths compatibility | |
4 | 4 | |||
5 | --- examples/logrotate.cron.orig 2011-08-31 12:39:04.000000000 +0000 | 5 | --- examples/logrotate.cron.orig 2016-12-02 13:12:33.000000000 +0000 | |
6 | +++ examples/logrotate.cron | 6 | +++ examples/logrotate.cron | |
7 | @@ -1,6 +1,6 @@ | 7 | @@ -1,6 +1,6 @@ | |
8 | #!/bin/sh | 8 | #!/bin/sh | |
9 | 9 | |||
10 | -/usr/sbin/logrotate /etc/logrotate.conf | 10 | -/usr/sbin/logrotate /etc/logrotate.conf | |
11 | +@PREFIX@/sbin/logrotate @PKG_SYSCONFDIR@/logrotate.conf | 11 | +/usr/pkg/sbin/logrotate /usr/pkg/etc/logrotate.conf | |
12 | EXITVALUE=$? | 12 | EXITVALUE=$? | |
13 | if [ $EXITVALUE != 0 ]; then | 13 | if [ $EXITVALUE != 0 ]; then | |
14 | /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" | 14 | /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" |