Skip to content

Commit

Permalink
Update logrotate to version 3.15.0.
Browse files Browse the repository at this point in the history
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(!)
   logrotate/logrotate#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)
  • Loading branch information
he32 committed Mar 20, 2019
1 parent e077f4c commit 68e834c
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 73 deletions.
9 changes: 4 additions & 5 deletions sysutils/logrotate/Makefile
Original file line number Diff line number Diff line change
@@ -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/}

Expand Down Expand Up @@ -29,7 +28,7 @@ MESSAGE_SUBST+= EGDIR=${EGDIR}
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

Expand All @@ -41,7 +40,7 @@ EGDIR= share/examples/logrotate
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}
Expand Down
16 changes: 8 additions & 8 deletions sysutils/logrotate/distinfo
Original file line number Diff line number Diff line change
@@ -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
17 changes: 9 additions & 8 deletions sysutils/logrotate/patches/patch-config.c
Original file line number Diff line number Diff line change
@@ -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>
31 changes: 0 additions & 31 deletions sysutils/logrotate/patches/patch-examples_logrotate-default

This file was deleted.

14 changes: 14 additions & 0 deletions sysutils/logrotate/patches/patch-examples_logrotate.conf
Original file line number Diff line number Diff line change
@@ -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.
36 changes: 15 additions & 21 deletions sysutils/logrotate/patches/patch-logrotate.c
Original file line number Diff line number Diff line change
@@ -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);
}

@@ -800,7 +800,7 @@ static int mailLog(struct logInfo *log,
DOEXIT(1);
}

- execlp(uncompressCommand, uncompressCommand, NULL);
+ execlp(uncompressCommand, uncompressCommand, (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);
}

0 comments on commit 68e834c

Please sign in to comment.