pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/sysutils/logrotate Update logrotate to version 3.15.0.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/713c6ded147c
branches:  trunk
changeset: 393542:713c6ded147c
user:      he <he%pkgsrc.org@localhost>
date:      Wed Mar 20 10:34:10 2019 +0000

description:
Update logrotate to version 3.15.0.

Pkgsrc changes:
 * Track rename of logrotate-default to logrotate.conf
 * Add a fix so that the log file name is actually passed
   to the various script hooks(!)
   https://github.com/logrotate/logrotate/pull/245

Upstream changes:

3.15.0
======
 * timer unit: change trigger fuzz from 12h to 1h (#230)
 * service unit: only run if /var/log is mounted (#230)
 * preserve fractional part of timestamps when compressing (#226)
 * re-indent source code using spaces only (#188)
 * minage: avoid rounding issue while comparing the amount of seconds (#36)
 * never remove old log files if rotate -1 is specified (#202)
 * return non-zero exit status if a config file contains an error (#199)
 * make copytruncate work with rotate 0 (#191)
 * warn user if both size and the time interval options are used (#192)
 * pass rotated log file name as the 2nd argument of the postrotate
   script when sharedscript is not enabled (#193)
 * rename logrotate-default to logrotate.conf (#187)

3.14.0
======
 * make configure show support status for SELinux and ACL at the end (#179)
 * make logrotate build again on FreeBSD (#178)
 * move wtmp and btmp definitions from logrotate.conf to
 * separate configuration files in logrotate.d (#168)
 * print a warning about logrotate doing nothing when -d is used (#165)
 * do not reject executable config files (#166)
 * add hardening options to logrotate.service in examples (#143)
 * fix spurious compressor failure when using su and compress (#169)
 * keep logrotate version in .tarball-version in release tarballs (#156)
 * introduce the hourago configuration directive (#159)
 * ignore empty patterns in tabooext to avoid exclusion of everything (#160)
 * properly report skipped test cases instead of pretending success

3.13.0
======
 * make distribution tarballs report logrotate version properly (RHBZ#1500264)
 * make (un)compress work even if stdin and/or stdout are closed (#154)
 * remove -s from DEFAULT_MAIL_COMMAND and improve its documenation (#152)
 * uncompress logs before mailing them even if delaycompress is enabled (#151)
 * handle unlink of a non-existing log file as a warning only (#144)
 * include compile-time options in the output of logrotate --version (#145)
 * make logrotate --version print to stdout instead of stderr (#145)
 * flush write buffers before syncing state file (#148)
 * specify (un)compress utility explicitly in tests (#137)
 * enable running tests in parallel (#132)
 * explicitly map root UID/GID to 0 on Cygwin (#133)
 * add .dpkg-bak and .dpkg-del to default tabooext list (#134)

3.12.3
======
 * copy and copytruncate directives now work together again
 * unlink() is no longer preceded by open() unless shred is enabled (#124)
 * compress and uncompress now take commands from $PATH, too (#122)

3.12.2
======
 * build fixes related to -Werror (#119) and -Werror=format= (#108)
 * configure --enable-werror now controls use of the -Werror flag (#123)

3.12.1
======
 * Included forgotten build-aux directory in release tarballs.

3.12.0
======
 * Fixed accident removal of rotated files with dateext. (#118)
 * Line comments inside globs in config files are now skipped. (#109)
 * logrotate now recovers from a corrupted state file. (#45)
 * Makefile.legacy has been removed. (#103)
 * config.h is now generated by autotools. (#102 and #103)
 * createolddir now creates old directory as unprivileged user. (#114)
 * weekly rotations are now predictable and configurable. (#93)
 * Errors in config files are no longer treated as fatal errors. (#81)
 * configure --with-default-mail-command specifies default mail command. (#100)
 * Fixed heap buffer overflow when parsing crafted config file. (#33)

diffstat:

 sysutils/logrotate/Makefile                                 |   9 +-
 sysutils/logrotate/distinfo                                 |  16 ++--
 sysutils/logrotate/patches/patch-config.c                   |  17 +++--
 sysutils/logrotate/patches/patch-examples_logrotate-default |  31 -----------
 sysutils/logrotate/patches/patch-examples_logrotate.conf    |  14 +++++
 sysutils/logrotate/patches/patch-logrotate.c                |  36 +++++-------
 6 files changed, 50 insertions(+), 73 deletions(-)

diffs (179 lines):

diff -r 4bf102633835 -r 713c6ded147c sysutils/logrotate/Makefile
--- a/sysutils/logrotate/Makefile       Wed Mar 20 10:02:53 2019 +0000
+++ b/sysutils/logrotate/Makefile       Wed Mar 20 10:34:10 2019 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.16 2017/03/06 12:59:53 fhajny Exp $
+# $NetBSD: Makefile,v 1.17 2019/03/20 10:34:10 he Exp $
 
-DISTNAME=              logrotate-3.11.0
-PKGREVISION=           1
+DISTNAME=              logrotate-3.15.0
 CATEGORIES=            sysutils
 MASTER_SITES=          ${MASTER_SITE_GITHUB:=logrotate/}
 
@@ -29,7 +28,7 @@
 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.conf
 SUBST_FILES.paths+=    examples/logrotate.cron
 SUBST_VARS.paths=      PREFIX PKG_SYSCONFDIR
 
@@ -41,7 +40,7 @@
 INSTALLATION_DIRS+=    ${EGDIR}
 
 post-install:
-       ${INSTALL_DATA} ${WRKSRC}/examples/logrotate-default \
+       ${INSTALL_DATA} ${WRKSRC}/examples/logrotate.conf \
                ${DESTDIR}${PREFIX}/${EGDIR}/logrotate.conf
        ${INSTALL_DATA} ${WRKSRC}/examples/logrotate.cron \
                ${DESTDIR}${PREFIX}/${EGDIR}
diff -r 4bf102633835 -r 713c6ded147c sysutils/logrotate/distinfo
--- a/sysutils/logrotate/distinfo       Wed Mar 20 10:02:53 2019 +0000
+++ b/sysutils/logrotate/distinfo       Wed Mar 20 10:34:10 2019 +0000
@@ -1,10 +1,10 @@
-$NetBSD: distinfo,v 1.14 2017/03/06 12:59:53 fhajny Exp $
+$NetBSD: distinfo,v 1.15 2019/03/20 10:34:10 he Exp $
 
-SHA1 (logrotate-3.11.0.tar.gz) = 6891c1024320d211386cdd400668435db47e4c18
-RMD160 (logrotate-3.11.0.tar.gz) = 6aec3505fde3b59a1ca95c0f9d66747884417bee
-SHA512 (logrotate-3.11.0.tar.gz) = 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1
-Size (logrotate-3.11.0.tar.gz) = 176488 bytes
-SHA1 (patch-config.c) = a6c775599857f01fa11bb99113795794f46664f5
-SHA1 (patch-examples_logrotate-default) = 16bb2350115e36aa3ed3f8ebf9625e3aadbb5950
+SHA1 (logrotate-3.15.0.tar.gz) = d5ec365a07d1c64f4ba086e12fcbb7911281058d
+RMD160 (logrotate-3.15.0.tar.gz) = bd1801423d2f7729703db1f354cdb7d0dbae3a1d
+SHA512 (logrotate-3.15.0.tar.gz) = 9520f15eaec54da426699f1f5ce31949d1372fa25c5c127dfbf29ff717a1c15a6fd14437c1d7b67b116b12c8a5c28f6012e39ad4b3ca2b053c874d02efe98d84
+Size (logrotate-3.15.0.tar.gz) = 219496 bytes
+SHA1 (patch-config.c) = 75fea98d120cf1bb8f5f90af9648959a133914aa
+SHA1 (patch-examples_logrotate.conf) = 4d0aad215e66850e8ae1a005764f8bd109fb76c9
 SHA1 (patch-examples_logrotate.cron) = 31a19e1b697e945299bbbe6701674d886379a49c
-SHA1 (patch-logrotate.c) = ad13f4a4e1ae61e66fb937b92bbc41769deaf86a
+SHA1 (patch-logrotate.c) = 4a3a17d51972c9cf11da35b681d1f0f13c8f22e7
diff -r 4bf102633835 -r 713c6ded147c sysutils/logrotate/patches/patch-config.c
--- a/sysutils/logrotate/patches/patch-config.c Wed Mar 20 10:02:53 2019 +0000
+++ b/sysutils/logrotate/patches/patch-config.c Wed Mar 20 10:34:10 2019 +0000
@@ -1,16 +1,17 @@
-$NetBSD: patch-config.c,v 1.5 2017/01/26 20:12:32 nils Exp $
+$NetBSD: patch-config.c,v 1.6 2019/03/20 10:34:10 he 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
+@@ -23,7 +23,9 @@
+ #include <wctype.h>
+ #include <fnmatch.h>
+ #include <sys/mman.h>
+-#include <libgen.h>
 +#ifndef _LIBGEN_H_
 +#  include <libgen.h>
 +#endif
- #include <limits.h>
- #include <ctype.h>
- #include <dirent.h>
+ 
+ #if !defined(PATH_MAX) && defined(__FreeBSD__)
+ #include <sys/param.h>
diff -r 4bf102633835 -r 713c6ded147c sysutils/logrotate/patches/patch-examples_logrotate-default
--- a/sysutils/logrotate/patches/patch-examples_logrotate-default       Wed Mar 20 10:02:53 2019 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-$NetBSD: patch-examples_logrotate-default,v 1.5 2017/03/06 12:59:53 fhajny Exp $
-
-Add pkgsrc paths compatibility.
-
---- examples/logrotate-default.orig    2016-12-02 13:12:33.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 -r 4bf102633835 -r 713c6ded147c sysutils/logrotate/patches/patch-examples_logrotate.conf
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/logrotate/patches/patch-examples_logrotate.conf  Wed Mar 20 10:34:10 2019 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-examples_logrotate.conf,v 1.1 2019/03/20 10:34:10 he Exp $
+
+Use pkgsrc config directory.
+
+--- examples/logrotate.conf.orig       2018-05-25 12:31:21.000000000 +0000
++++ examples/logrotate.conf
+@@ -15,6 +15,6 @@ dateext
+ #compress
+ 
+ # packages drop log rotation information into this directory
+-include /etc/logrotate.d
++include @PKG_SYSCONFDIR@/logrotate.d
+ 
+ # system-specific logs may be also be configured here.
diff -r 4bf102633835 -r 713c6ded147c sysutils/logrotate/patches/patch-logrotate.c
--- a/sysutils/logrotate/patches/patch-logrotate.c      Wed Mar 20 10:02:53 2019 +0000
+++ b/sysutils/logrotate/patches/patch-logrotate.c      Wed Mar 20 10:34:10 2019 +0000
@@ -1,25 +1,19 @@
-$NetBSD: patch-logrotate.c,v 1.3 2017/03/06 12:59:53 fhajny Exp $
+$NetBSD: patch-logrotate.c,v 1.4 2019/03/20 10:34:10 he Exp $
 
-Fixes GCC error:
-"error: missing sentinel in function call [-Werror=format=]"
+Fix the running of scripts:
+ * the "-c" option to "sh" causes subsequent args to not be passed
+   to the script (oops!)
+ * the "logrotate_script" arg ends up as arg1, not arg0 of the script,
+   and is not documented, so get rid of it
 
---- logrotate.c.orig   2016-11-30 13:07:15.000000000 +0000
+--- logrotate.c.orig   2018-10-05 15:01:21.000000000 +0000
 +++ logrotate.c
-@@ -440,7 +440,7 @@ static int runScript(struct logInfo *log
-                               DOEXIT(1);
-                       }
-               }
--              execl("/bin/sh", "sh", "-c", script, "logrotate_script", logfn, NULL);
-+              execl("/bin/sh", "sh", "-c", script, "logrotate_script", logfn, (char *)NULL);
-               DOEXIT(1);
-       }
+@@ -451,7 +451,7 @@ static int runScript(struct logInfo *log
+                 exit(1);
+             }
+         }
+-        execl("/bin/sh", "sh", "-c", script, "logrotate_script", logfn, logrotfn, (char *) NULL);
++        execl("/bin/sh", "sh", script, logfn, logrotfn, (char *) NULL);
+         exit(1);
+     }
  
-@@ -800,7 +800,7 @@ static int mailLog(struct logInfo *log,
-                               DOEXIT(1);
-                       }
- 
--                      execlp(uncompressCommand, uncompressCommand, NULL);
-+                      execlp(uncompressCommand, uncompressCommand, (char *)NULL);
-                       DOEXIT(1);
-               }
- 



Home | Main Index | Thread Index | Old Index