Hello community, here is the log from the commit of package logrotate for openSUSE:Factory checked in at 2018-09-20 11:40:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/logrotate (Old) and /work/SRC/openSUSE:Factory/.logrotate.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "logrotate" Thu Sep 20 11:40:25 2018 rev:60 rq:635479 version:3.14.0 Changes: -------- --- /work/SRC/openSUSE:Factory/logrotate/logrotate.changes 2018-06-22 13:11:25.535843356 +0200 +++ /work/SRC/openSUSE:Factory/.logrotate.new/logrotate.changes 2018-09-20 11:40:28.652891094 +0200 @@ -1,0 +2,29 @@ +Thu Sep 13 08:13:52 UTC 2018 - Tomáš Chvátal <[email protected]> + +- Rebase the logrotate-3.13.0-systemd_add_home_env.patch to be + unified patch again + +------------------------------------------------------------------- +Mon Sep 10 12:08:24 UTC 2018 - Jan Engelhardt <[email protected]> + +- Use noun phrase. Trim filler wording from description. + Add a note that it is unrelated to journald. + +------------------------------------------------------------------- +Fri Sep 7 10:33:52 UTC 2018 - [email protected] + +- Version update to 3.14.0: + * make configure show support status for SELinux and ACL at the end + * make logrotate build again on FreeBSD + * move wtmp and btmp definitions from logrotate.conf to + separate configuration files in logrotate.d + * print a warning about logrotate doing nothing when -d is used + * do not reject executable config files + * add hardening options to logrotate.service in examples + * fix spurious compressor failure when using su and compress + * keep logrotate version in .tarball-version in release tarballs + * introduce the hourago configuration directive + * ignore empty patterns in tabooext to avoid exclusion of everything + * properly report skipped test cases instead of pretending success + +------------------------------------------------------------------- Old: ---- logrotate-3.13.0.tar.xz New: ---- logrotate-3.14.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ logrotate.spec ++++++ --- /var/tmp/diff_new_pack.CgYaot/_old 2018-09-20 11:40:29.352890683 +0200 +++ /var/tmp/diff_new_pack.CgYaot/_new 2018-09-20 11:40:29.356890680 +0200 @@ -17,9 +17,9 @@ Name: logrotate -Version: 3.13.0 +Version: 3.14.0 Release: 0 -Summary: Rotate, compress, remove, and mail system log files +Summary: Cron service for rotating, compressing, mailing and removing system log files License: GPL-2.0-or-later Group: System/Base Url: https://github.com/logrotate/logrotate @@ -39,13 +39,13 @@ %{?systemd_requires} %description -The logrotate utility is designed to simplify the administration of log -files on a system that generates a lot of log files. Logrotate allows -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 reaches a certain size. Normally, logrotate runs as a +The logrotate utility does automatic rotation, compression, mailing and removal +of log files. Logrotate can be set to handle a log file daily, weekly, monthly, +or when the log file reaches a certain size. Normally, logrotate runs as a daily cron job. +It manages plain files only and is not involved in systemd's journal rotation. + %prep %setup -q %patch0 -p1 ++++++ logrotate-3.13.0-systemd_add_home_env.patch ++++++ --- /var/tmp/diff_new_pack.CgYaot/_old 2018-09-20 11:40:29.376890668 +0200 +++ /var/tmp/diff_new_pack.CgYaot/_new 2018-09-20 11:40:29.376890668 +0200 @@ -1,9 +1,12 @@ -Index: logrotate-3.11.0/examples/logrotate.service +Index: logrotate-3.14.0/examples/logrotate.service =================================================================== ---- logrotate-3.11.0.orig/examples/logrotate.service -+++ logrotate-3.11.0/examples/logrotate.service -@@ -9,3 +9,4 @@ ExecStart=/usr/sbin/logrotate /etc/logro +--- logrotate-3.14.0.orig/examples/logrotate.service ++++ logrotate-3.14.0/examples/logrotate.service +@@ -11,6 +11,7 @@ ExecStart=/usr/sbin/logrotate /etc/logro Nice=19 IOSchedulingClass=best-effort IOSchedulingPriority=7 +Environment=HOME=/root + + # hardening options + # details: https://www.freedesktop.org/software/systemd/man/systemd.exec.html ++++++ logrotate-3.13.0.tar.xz -> logrotate-3.14.0.tar.xz ++++++ ++++ 1725 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/.tarball-version new/logrotate-3.14.0/.tarball-version --- old/logrotate-3.13.0/.tarball-version 1970-01-01 01:00:00.000000000 +0100 +++ new/logrotate-3.14.0/.tarball-version 2018-03-09 18:14:20.000000000 +0100 @@ -0,0 +1 @@ +3.14.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/.version new/logrotate-3.14.0/.version --- old/logrotate-3.13.0/.version 1970-01-01 01:00:00.000000000 +0100 +++ new/logrotate-3.14.0/.version 2018-03-09 18:14:20.000000000 +0100 @@ -0,0 +1 @@ +3.14.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/ChangeLog.md new/logrotate-3.14.0/ChangeLog.md --- old/logrotate-3.13.0/ChangeLog.md 2017-10-13 08:24:14.000000000 +0200 +++ new/logrotate-3.14.0/ChangeLog.md 2018-03-09 18:07:36.000000000 +0100 @@ -4,14 +4,31 @@ ## [UNRELEASED] -[UNRELEASED]: https://github.com/logrotate/logrotate/compare/3.13.0...master +[UNRELEASED]: https://github.com/logrotate/logrotate/compare/3.14.0...master + +## [3.14.0] - 2018-03-09 + + - 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.14.0]: https://github.com/logrotate/logrotate/compare/3.13.0...3.14.0 ## [3.13.0] - 2017-10-13 - make distribution tarballs report logrotate version properly [RHBZ#1500264](https://bugzilla.redhat.com/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) + - remove ```-s``` from ```DEFAULT_MAIL_COMMAND``` and improve its documentation (#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) @@ -478,7 +495,7 @@ ## [2.9] - 1999-03-05 - fixed a bug parsing lines where { immediately follows the filename - - allow log file patterns to be placed in double quotes, which + - allow log file patterns to be placed in double quotes, which allows spaces in names - complain about missing log files (John Van Essen) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/Makefile.am new/logrotate-3.14.0/Makefile.am --- old/logrotate-3.13.0/Makefile.am 2017-09-26 14:18:35.000000000 +0200 +++ new/logrotate-3.14.0/Makefile.am 2018-02-06 16:40:43.000000000 +0100 @@ -31,3 +31,11 @@ rpmbuild $(RPM_FLAGS) -ta $(distdir).tar.gz srpm: dist rpmbuild $(RPM_FLAGS) -ts $(distdir).tar.gz + +# taken from build-aux/git-version-gen +EXTRA_DIST += $(top_srcdir)/.version +BUILT_SOURCES = $(top_srcdir)/.version +$(top_srcdir)/.version: + echo $(VERSION) > $@-t && mv $@-t $@ +dist-hook: + echo $(VERSION) > $(distdir)/.tarball-version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/README.md new/logrotate-3.14.0/README.md --- old/logrotate-3.13.0/README.md 2017-10-13 08:24:14.000000000 +0200 +++ new/logrotate-3.14.0/README.md 2018-03-09 18:10:38.000000000 +0100 @@ -6,10 +6,11 @@ The latest release is: -* [logrotate-3.13.0](https://github.com/logrotate/logrotate/releases/download/3.13.0/logrotate-3.13.0.tar.xz) ([sig](https://github.com/logrotate/logrotate/releases/download/3.13.0/logrotate-3.13.0.tar.xz.asc)) ([Changelog](https://github.com/logrotate/logrotate/releases/tag/3.13.0)) +* [logrotate-3.14.0](https://github.com/logrotate/logrotate/releases/download/3.14.0/logrotate-3.14.0.tar.xz) ([sig](https://github.com/logrotate/logrotate/releases/download/3.14.0/logrotate-3.14.0.tar.xz.asc)) ([Changelog](https://github.com/logrotate/logrotate/releases/tag/3.14.0)) Previous releases: +* [logrotate-3.13.0](https://github.com/logrotate/logrotate/releases/download/3.13.0/logrotate-3.13.0.tar.xz) ([sig](https://github.com/logrotate/logrotate/releases/download/3.13.0/logrotate-3.13.0.tar.xz.asc)) ([Changelog](https://github.com/logrotate/logrotate/releases/tag/3.13.0)) * [logrotate-3.12.3](https://github.com/logrotate/logrotate/releases/download/3.12.3/logrotate-3.12.3.tar.xz) ([sig](https://github.com/logrotate/logrotate/releases/download/3.12.3/logrotate-3.12.3.tar.xz.asc)) ([Changelog](https://github.com/logrotate/logrotate/releases/tag/3.12.3)) * [logrotate-3.12.2](https://github.com/logrotate/logrotate/releases/download/3.12.2/logrotate-3.12.2.tar.xz) ([sig](https://github.com/logrotate/logrotate/releases/download/3.12.2/logrotate-3.12.2.tar.xz.asc)) ([Changelog](https://github.com/logrotate/logrotate/releases/tag/3.12.2)) * [logrotate-3.12.1](https://github.com/logrotate/logrotate/releases/download/3.12.1/logrotate-3.12.1.tar.xz) ([sig](https://github.com/logrotate/logrotate/releases/download/3.12.1/logrotate-3.12.1.tar.xz.asc)) ([Changelog](https://github.com/logrotate/logrotate/releases/tag/3.12.1)) @@ -66,13 +67,13 @@ Install dependencies for Debian systems: ``` apt-get update -apt-get install make autoconf libtool libpopt-dev xz-utils +apt-get install autoconf automake libpopt-dev libtool make xz-utils ``` Install dependencies for Fedora/CentOS systems: ``` -yum install make autoconf automake libtool popt-devel xz +yum install autoconf automake libtool make popt-devel xz ``` Compilation (`autoreconf` is optional if you obtained source from tarball): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/build-aux/git-version-gen new/logrotate-3.14.0/build-aux/git-version-gen --- old/logrotate-3.13.0/build-aux/git-version-gen 2017-10-12 16:19:10.000000000 +0200 +++ new/logrotate-3.14.0/build-aux/git-version-gen 2018-02-06 16:40:43.000000000 +0100 @@ -189,7 +189,7 @@ v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`; v_from_git=1 elif test "x$fallback" = x || git --version >/dev/null 2>&1; then - # fallback for tarballs produced by 'make dist' (use directory suffix) + # fallback in case .tarball-version is missing (use directory suffix) v="`basename "$PWD" | sed 's/^[^-]*-//'`" else v=$fallback diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/compile new/logrotate-3.14.0/compile --- old/logrotate-3.13.0/compile 2017-10-13 08:25:48.000000000 +0200 +++ new/logrotate-3.14.0/compile 2018-03-09 18:14:18.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2017 Free Software Foundation, Inc. # Written by Tom Tromey <[email protected]>. # # This program is free software; you can redistribute it and/or modify @@ -255,7 +255,8 @@ echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -342,6 +343,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/config.c new/logrotate-3.14.0/config.c --- old/logrotate-3.13.0/config.c 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/config.c 2018-03-09 17:47:08.000000000 +0100 @@ -1,6 +1,6 @@ #include "queue.h" -/* Alloca is defined in stdlib.h in NetBSD */ -#ifndef __NetBSD__ +/* Alloca is defined in stdlib.h in NetBSD/FreeBSD */ +#if !defined(__NetBSD__) && !defined(__FreeBSD__) #include <alloca.h> #endif #include <limits.h> @@ -25,6 +25,10 @@ #include <sys/mman.h> #include <libgen.h> +#if !defined(PATH_MAX) && defined(__FreeBSD__) +#include <sys/param.h> +#endif + #include "log.h" #include "logrotate.h" @@ -59,6 +63,7 @@ va_start(arg, format); size = vsnprintf(NULL, 0, format, arg); size++; + va_end(arg); va_start(arg, format); str = malloc(size); if (str == NULL) { @@ -135,6 +140,7 @@ ".dpkg-dist", ".dpkg-new", ".dpkg-old", + ".dpkg-tmp", ".rhn-cfg-tmp-*", ".rpmnew", ".rpmorig", @@ -145,7 +151,7 @@ ".ucf-old", "~" }; -static int defTabooCount = sizeof(defTabooExts) / sizeof(char *); +static const int defTabooCount = sizeof(defTabooExts) / sizeof(char *); /* I shouldn't use globals here :-( */ static char **tabooPatterns = NULL; @@ -233,6 +239,7 @@ 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); + free(start); return NULL; } chptr += len; @@ -351,7 +358,7 @@ char *endtag, *chptr; char *start = *startPtr; char *address; - + if ((endtag = isolateValue(configFile, lineNum, key, startPtr, buf, length)) != NULL) { chptr = endtag; @@ -362,11 +369,12 @@ if (*chptr) { message(MESS_ERROR, "%s:%d bad %s address %s\n", configFile, lineNum, key, start); + free(endtag); return NULL; } address = strdup(endtag); - + free(endtag); return address; @@ -509,7 +517,7 @@ to->olddirUid = from->olddirUid; to->olddirGid = from->olddirGid; if (from->compress_options_count) { - poptDupArgv(from->compress_options_count, from->compress_options_list, + poptDupArgv(from->compress_options_count, from->compress_options_list, &to->compress_options_count, &to->compress_options_list); } if (from->dateformat) @@ -926,7 +934,7 @@ close(fd); return 0; } - + if (!(pw = getpwuid(getuid()))) { message(MESS_ERROR, "Logrotate UID is not in passwd file.\n"); close(fd); @@ -935,15 +943,21 @@ if (getuid() == ROOT_UID) { if ((sb.st_mode & 07533) != 0400) { + message(MESS_DEBUG, + "Potentially dangerous mode on %s: 0%o\n", + configFile, (unsigned) (sb.st_mode & 07777)); + } + + if (sb.st_mode & 0022) { message(MESS_ERROR, - "Ignoring %s because of bad file mode - must be 0644 or 0444.\n", + "Ignoring %s because it is writable by group or others.\n", configFile); close(fd); return 0; } if ((pw = getpwuid(ROOT_UID)) == NULL) { - message(MESS_DEBUG, + message(MESS_ERROR, "Ignoring %s because there's no password entry for the owner.\n", configFile); close(fd); @@ -953,7 +967,7 @@ if (sb.st_uid != ROOT_UID && (pw == NULL || sb.st_uid != pw->pw_uid || pw->pw_uid != ROOT_UID)) { - message(MESS_DEBUG, + message(MESS_ERROR, "Ignoring %s because the file owner is wrong (should be root or user with uid 0).\n", configFile); close(fd); @@ -968,7 +982,7 @@ configFile); close(fd); return 1; - } + } /* We can't mmap empty file... */ if (length == 0) { @@ -1021,7 +1035,7 @@ state = STATE_SKIP_LINE; continue; } - + if (isalpha((unsigned char)*start)) { if ((key = isolateWord(&start, &buf, length)) == NULL) continue; @@ -1035,7 +1049,7 @@ newlog->flags &= ~LOG_FLAG_DELAYCOMPRESS; } else if (!strcmp(key, "shred")) { newlog->flags |= LOG_FLAG_SHRED; - } else if (!strcmp(key, "noshred")) { + } else if (!strcmp(key, "noshred")) { newlog->flags &= ~LOG_FLAG_SHRED; } else if (!strcmp(key, "sharedscripts")) { newlog->flags |= LOG_FLAG_SHAREDSCRIPTS; @@ -1063,6 +1077,8 @@ newlog->flags &= ~LOG_FLAG_DATEEXT; } else if (!strcmp(key, "dateyesterday")) { newlog->flags |= LOG_FLAG_DATEYESTERDAY; + } else if (!strcmp(key, "datehourago")) { + newlog->flags |= LOG_FLAG_DATEHOURAGO; } else if (!strcmp(key, "dateformat")) { freeLogItem(dateformat); newlog->dateformat = isolateLine(&start, &buf, length); @@ -1081,7 +1097,7 @@ if (key == NULL) continue; - rv = readModeUidGid(configFile, lineNum, key, "su", + rv = readModeUidGid(configFile, lineNum, key, "su", &tmp_mode, &newlog->suUid, &newlog->suGid); if (rv == -1) { @@ -1175,7 +1191,7 @@ } } else if (!strcmp(key, "shredcycles")) { free(key); - if ((key = isolateValue(configFile, lineNum, "shred cycles", + if ((key = isolateValue(configFile, lineNum, "shred cycles", &start, &buf, length)) != NULL) { newlog->shred_cycles = strtoul(key, &chptr, 0); if (*chptr || newlog->shred_cycles < 0) { @@ -1255,7 +1271,7 @@ RAISE_ERROR(); } } - else continue; + else continue; } else if (!strcmp(key, "maxage")) { free(key); if ((key = isolateValue @@ -1343,14 +1359,17 @@ while (!isspace((unsigned char)*chptr) && *chptr != ',' && *chptr) chptr++; - tabooPatterns = realloc(tabooPatterns, sizeof(*tabooPatterns) * - (tabooCount + 1)); - bytes = asprintf(&pattern, "*%.*s", (int)(chptr - endtag), endtag); - - /* should test for malloc() failure */ - assert(bytes != -1); - tabooPatterns[tabooCount] = pattern; - tabooCount++; + /* accept only non-empty patterns to avoid exclusion of everything */ + if (endtag < chptr) { + tabooPatterns = realloc(tabooPatterns, sizeof(*tabooPatterns) * + (tabooCount + 1)); + bytes = asprintf(&pattern, "*%.*s", (int)(chptr - endtag), endtag); + + /* should test for malloc() failure */ + assert(bytes != -1); + tabooPatterns[tabooCount] = pattern; + tabooCount++; + } endtag = chptr; if (*endtag == ',') @@ -1606,11 +1625,11 @@ free(globerr_msg); globerr_msg = NULL; } - + rc = glob(argv[argNum], GLOB_NOCHECK #ifdef GLOB_TILDE | GLOB_TILDE -#endif +#endif , globerr, &globResult); if (rc == GLOB_ABORTED) { if (newlog->flags & LOG_FLAG_MISSINGOK) { @@ -1623,7 +1642,7 @@ configFile, lineNum, argv[argNum], strerror(glob_errno)); if (rc == -1) globerr_msg = NULL; - + globResult.gl_pathc = 0; } @@ -1857,16 +1876,16 @@ else { /* isolateWord moves the "start" pointer. * If we have a line like - * rotate 5 + * rotate 5 * after isolateWord "start" points to "5" and it * is OK to skip the line, but if we have a line * like the following * nocompress * after isolateWord "start" points to "\n". In - * this case if we skip a line, we skip the next - * line, not the current "nocompress" one, + * this case if we skip a line, we skip the next + * line, not the current "nocompress" one, * because in the for cycle the "start" - * pointer is increased by one and, after this, + * pointer is increased by one and, after this, * "start" points to the beginning of the next line. */ if (*start != '\n') { @@ -1891,7 +1910,7 @@ } } - + if (scriptStart) { message(MESS_ERROR, "%s:prerotate, postrotate or preremove without endscript\n", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/configure.ac new/logrotate-3.14.0/configure.ac --- old/logrotate-3.13.0/configure.ac 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/configure.ac 2018-03-02 18:13:24.000000000 +0100 @@ -31,6 +31,7 @@ dnl Needed for out-of-source builds mkdir -p test +WITH_SELINUX="no" AC_ARG_WITH([selinux], [AS_HELP_STRING([--with-selinux], [support handling SELinux contexts (yes,no,check) @<:@default=check@:>@])], @@ -41,8 +42,9 @@ [no], [], [AC_CHECK_LIB([selinux],[getfscreatecon_raw])]) AS_IF([test "$ac_cv_lib_selinux_getfscreatecon_raw" = yes], - echo "1" > ./test/test.SELINUX;, echo "0" > ./test/test.SELINUX;) + echo "1" > ./test/test.SELINUX; WITH_SELINUX="yes";, echo "0" > ./test/test.SELINUX;) +WITH_ACL="no" AC_ARG_WITH([acl], [AS_HELP_STRING([--with-acl], [support handling ACL (yes,no,check) @<:@default=check@:>@])], @@ -53,7 +55,7 @@ [no], [], [AC_CHECK_LIB([acl],[acl_get_file])]) AS_IF([test "$ac_cv_lib_acl_acl_get_file" = yes], - echo "1" > ./test/test.ACL;, echo "0" > ./test/test.ACL;) + echo "1" > ./test/test.ACL; WITH_ACL="yes";, echo "0" > ./test/test.ACL;) DEFAULT_MAIL_COMMAND="/bin/mail" COMPRESS_COMMAND="/bin/gzip" @@ -182,6 +184,8 @@ AC_MSG_RESULT([ ${PACKAGE_NAME} ${VERSION} + SELinux support: ${WITH_SELINUX} + ACL support: ${WITH_ACL} default mail command: ${DEFAULT_MAIL_COMMAND} compress command: ${COMPRESS_COMMAND} uncompress command: ${UNCOMPRESS_COMMAND} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/examples/btmp new/logrotate-3.14.0/examples/btmp --- old/logrotate-3.13.0/examples/btmp 1970-01-01 01:00:00.000000000 +0100 +++ new/logrotate-3.14.0/examples/btmp 2018-02-19 11:06:08.000000000 +0100 @@ -0,0 +1,7 @@ +# no packages own btmp -- we'll rotate it here +/var/log/btmp { + missingok + monthly + create 0600 root utmp + rotate 1 +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/examples/logrotate-default new/logrotate-3.14.0/examples/logrotate-default --- old/logrotate-3.13.0/examples/logrotate-default 2017-09-26 14:18:35.000000000 +0200 +++ new/logrotate-3.14.0/examples/logrotate-default 2018-02-19 11:01:25.000000000 +0100 @@ -17,20 +17,4 @@ # 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 { - missingok - monthly - create 0664 root utmp - minsize 1M - rotate 1 -} - -/var/log/btmp { - missingok - monthly - create 0600 root utmp - rotate 1 -} - # system-specific logs may be also be configured here. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/examples/logrotate.service new/logrotate-3.14.0/examples/logrotate.service --- old/logrotate-3.13.0/examples/logrotate.service 2017-09-26 14:18:35.000000000 +0200 +++ new/logrotate-3.14.0/examples/logrotate.service 2018-02-19 10:55:36.000000000 +0100 @@ -6,6 +6,21 @@ [Service] Type=oneshot ExecStart=/usr/sbin/logrotate /etc/logrotate.conf + +# performance options Nice=19 IOSchedulingClass=best-effort IOSchedulingPriority=7 + +# hardening options +# details: https://www.freedesktop.org/software/systemd/man/systemd.exec.html +# no ProtectHome for userdir logs +# no PrivateNetwork for mail deliviery +# no ProtectKernelTunables for working SELinux with systemd older than 235 +MemoryDenyWriteExecute=true +PrivateDevices=true +PrivateTmp=true +ProtectControlGroups=true +ProtectKernelModules=true +ProtectSystem=full +RestrictRealtime=true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/examples/wtmp new/logrotate-3.14.0/examples/wtmp --- old/logrotate-3.13.0/examples/wtmp 1970-01-01 01:00:00.000000000 +0100 +++ new/logrotate-3.14.0/examples/wtmp 2018-02-19 11:06:25.000000000 +0100 @@ -0,0 +1,8 @@ +# no packages own wtmp -- we'll rotate it here +/var/log/wtmp { + missingok + monthly + create 0664 root utmp + minsize 1M + rotate 1 +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/log.c new/logrotate-3.14.0/log.c --- old/logrotate-3.13.0/log.c 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/log.c 2018-03-06 14:13:57.000000000 +0100 @@ -58,13 +58,13 @@ void message(int level, const char *format, ...) { va_list args; - + if (level >= logLevel) { va_start(args, format); log_once(stderr, level, format, args); va_end(args); } - + if (messageFile != NULL) { va_start(args, format); log_once(messageFile, level, format, args); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/logrotate.8 new/logrotate-3.14.0/logrotate.8 --- old/logrotate-3.13.0/logrotate.8 2017-10-13 08:25:51.000000000 +0200 +++ new/logrotate-3.14.0/logrotate.8 2018-03-09 18:14:20.000000000 +0100 @@ -1,4 +1,4 @@ -.TH LOGROTATE 8 "3.13.0" "Linux" "System Administrator's Manual" +.TH LOGROTATE 8 "3.14.0" "Linux" "System Administrator's Manual" .SH NAME logrotate \(hy rotates, compresses, and mails system logs .SH SYNOPSIS @@ -43,8 +43,8 @@ .TP \fB\-d\fR, \fB\-\-debug\fR -Turns on debug mode and implies \fB-v\fR. In debug mode, no changes will -be made to the logs or to the \fBlogrotate\fR state file. +Turn on debug mode, which means that no changes are made to the logs and the +\fBlogrotate\fR state file is not updated. Only debug messages are printed. .TP \fB\-f\fR, \fB\-\-force\fR @@ -282,6 +282,12 @@ the same as the timestamps within it. .TP +\fBdatehourago\fR +Use hour ago instead of current date to create the \fBdateext\fR extension, +so that the rotated log file has a hour in its name that is the same as the +timestamps within it. Useful with rotate \fBhourly\fR. + +.TP \fBdelaycompress\fR Postpone compression of the previous log file to the next rotation cycle. This only has effect when used in combination with \fBcompress\fR. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/logrotate.8.in new/logrotate-3.14.0/logrotate.8.in --- old/logrotate-3.13.0/logrotate.8.in 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/logrotate.8.in 2018-02-19 10:55:46.000000000 +0100 @@ -43,8 +43,8 @@ .TP \fB\-d\fR, \fB\-\-debug\fR -Turns on debug mode and implies \fB-v\fR. In debug mode, no changes will -be made to the logs or to the \fBlogrotate\fR state file. +Turn on debug mode, which means that no changes are made to the logs and the +\fBlogrotate\fR state file is not updated. Only debug messages are printed. .TP \fB\-f\fR, \fB\-\-force\fR @@ -282,6 +282,12 @@ the same as the timestamps within it. .TP +\fBdatehourago\fR +Use hour ago instead of current date to create the \fBdateext\fR extension, +so that the rotated log file has a hour in its name that is the same as the +timestamps within it. Useful with rotate \fBhourly\fR. + +.TP \fBdelaycompress\fR Postpone compression of the previous log file to the next rotation cycle. This only has effect when used in combination with \fBcompress\fR. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/logrotate.c new/logrotate-3.14.0/logrotate.c --- old/logrotate-3.13.0/logrotate.c 2017-10-12 17:19:41.000000000 +0200 +++ new/logrotate-3.14.0/logrotate.c 2018-03-08 14:25:39.000000000 +0100 @@ -1,6 +1,6 @@ #include "queue.h" /* alloca() is defined in stdlib.h in NetBSD */ -#ifndef __NetBSD__ +#if !defined(__NetBSD__) && !defined(__FreeBSD__) #include <alloca.h> #endif #include <limits.h> @@ -27,14 +27,18 @@ #include <limits.h> #endif +#if !defined(PATH_MAX) && defined(__FreeBSD__) +#include <sys/param.h> +#endif + #include "log.h" #include "logrotate.h" static void *prev_context; #ifdef WITH_SELINUX #include <selinux/selinux.h> -int selinux_enabled = 0; -int selinux_enforce = 0; +static int selinux_enabled = 0; +static int selinux_enforce = 0; #endif #ifdef WITH_ACL @@ -533,8 +537,8 @@ close(fd); return -1; } - - if ((sb_create.st_uid != sb->st_uid || sb_create.st_gid != sb->st_gid) && + + if ((sb_create.st_uid != sb->st_uid || sb_create.st_gid != sb->st_gid) && fchown(fd, sb->st_uid, sb->st_gid)) { message(MESS_ERROR, "error setting owner of %s to uid %d and gid %d: %s\n", fileName, sb->st_uid, sb->st_gid, strerror(errno)); @@ -630,7 +634,7 @@ execvp(fullCommand[0], (void *) fullCommand); exit(1); } - + wait(&status); if (!WIFEXITED(status) || WEXITSTATUS(status)) { @@ -760,12 +764,13 @@ movefd(inFile, STDIN_FILENO); movefd(outFile, STDOUT_FILENO); - movefd(compressPipe[1], STDERR_FILENO); if (switch_user_permanently(log) != 0) { exit(1); } + movefd(compressPipe[1], STDERR_FILENO); + envInFilename = alloca(strlen("LOGROTATE_COMPRESSED_FILENAME=") + strlen(name) + 2); sprintf(envInFilename, "LOGROTATE_COMPRESSED_FILENAME=%s", name); putenv(envInFilename); @@ -1217,7 +1222,7 @@ if (force) { /* user forced rotation of logs from command line */ - state->doRotate = 1; + state->doRotate = 1; } else if (log->maxsize && sb.st_size > log->maxsize) { state->doRotate = 1; @@ -1428,7 +1433,7 @@ free(rotNames->baseName); rotNames->baseName = tempstr; } - + /* Adjust "now" if we want yesterday's date */ if (log->flags & LOG_FLAG_DATEYESTERDAY) { now.tm_hour = 12; /* set hour to noon to work around DST issues */ @@ -1436,6 +1441,11 @@ mktime(&now); } + if (log->flags & LOG_FLAG_DATEHOURAGO) { + now.tm_hour -= 1; + mktime(&now); + } + /* Allow only %Y %d %m and create valid strftime format string * Construct the glob pattern corresponding to the date format */ dext_str[0] = '\0'; @@ -1719,7 +1729,7 @@ } if (hasErrors || i - 1 < 0) free(oldName); - + } free(newName); } /* !LOG_FLAG_DATEEXT */ @@ -1892,7 +1902,7 @@ prev_acl = NULL; } #endif /* WITH_ACL */ - + } return hasErrors; } @@ -2004,10 +2014,10 @@ else message(MESS_DEBUG, "empty log files are not rotated, "); - if (log->minsize) + if (log->minsize) message(MESS_DEBUG, "only log files >= %jd bytes are rotated, ", (intmax_t)log->minsize); - if (log->maxsize) + if (log->maxsize) message(MESS_DEBUG, "log files >= %jd are rotated earlier, ", (intmax_t)log->maxsize); if (log->rotateMinAge) @@ -2544,7 +2554,7 @@ filename = strdup(argv[0]); unescape(filename); - + if ((st = findState(filename)) == NULL) { free(argv); free(filename); @@ -2587,7 +2597,7 @@ struct poptOption options[] = { {"debug", 'd', 0, NULL, 'd', - "Don't do anything, just test (implies -v)", NULL}, + "Don't do anything, just test and print debug messages", NULL}, {"force", 'f', 0, &force, 0, "Force file rotation", NULL}, {"mail", 'm', POPT_ARG_STRING, &mailCommand, 0, "Command to send mail (instead of `" DEFAULT_MAIL_COMMAND "')", @@ -2613,6 +2623,9 @@ switch (arg) { case 'd': debug = 1; + message(MESS_NORMAL, "WARNING: logrotate in debug mode does nothing" + " except printing debug messages! Consider using verbose" + " mode (-v) instead if this is not what you want.\n\n"); /* fallthrough */ case 'v': logSetLevel(MESS_DEBUG); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/logrotate.h new/logrotate-3.14.0/logrotate.h --- old/logrotate-3.13.0/logrotate.h 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/logrotate.h 2018-02-19 10:50:02.000000000 +0100 @@ -25,6 +25,7 @@ #define LOG_FLAG_DATEYESTERDAY (1 << 12) #define LOG_FLAG_OLDDIRCREATE (1 << 13) #define LOG_FLAG_TMPFILENAME (1 << 14) +#define LOG_FLAG_DATEHOURAGO (1 << 15) #define NO_MODE ((mode_t) -1) #define NO_UID ((uid_t) -1) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/logrotate.spec new/logrotate-3.14.0/logrotate.spec --- old/logrotate-3.13.0/logrotate.spec 2017-10-13 08:25:51.000000000 +0200 +++ new/logrotate-3.14.0/logrotate.spec 2018-03-09 18:14:20.000000000 +0100 @@ -1,6 +1,6 @@ Summary: Rotates, compresses, removes and mails system log files Name: logrotate -Version: 3.13.0 +Version: 3.14.0 Release: 1%{?dist} License: GPLv2+ Group: System Environment/Base @@ -33,13 +33,15 @@ %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily -mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib - -install -p -m 644 examples/logrotate-default $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.conf -install -p -m 755 examples/logrotate.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/logrotate -touch $RPM_BUILD_ROOT/%{_localstatedir}/lib/logrotate.status +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib + +install -p -m 644 examples/logrotate-default $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.conf +install -p -m 644 examples/btmp $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/btmp +install -p -m 644 examples/wtmp $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/wtmp +install -p -m 755 examples/logrotate.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/logrotate +touch $RPM_BUILD_ROOT%{_localstatedir}/lib/logrotate.status %clean rm -rf $RPM_BUILD_ROOT @@ -52,5 +54,5 @@ %attr(0644, root, root) %{_mandir}/man5/logrotate.conf.5* %attr(0755, root, root) %{_sysconfdir}/cron.daily/logrotate %attr(0644, root, root) %config(noreplace) %{_sysconfdir}/logrotate.conf -%attr(0755, root, root) %dir %{_sysconfdir}/logrotate.d +%attr(0755, root, root) %{_sysconfdir}/logrotate.d %attr(0644, root, root) %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/logrotate.status diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/logrotate.spec.in new/logrotate-3.14.0/logrotate.spec.in --- old/logrotate-3.13.0/logrotate.spec.in 2017-09-26 14:18:35.000000000 +0200 +++ new/logrotate-3.14.0/logrotate.spec.in 2018-03-02 18:11:27.000000000 +0100 @@ -33,13 +33,15 @@ %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir} -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d -mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily -mkdir -p $RPM_BUILD_ROOT/%{_localstatedir}/lib +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib -install -p -m 644 examples/logrotate-default $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.conf -install -p -m 755 examples/logrotate.cron $RPM_BUILD_ROOT/%{_sysconfdir}/cron.daily/logrotate -touch $RPM_BUILD_ROOT/%{_localstatedir}/lib/logrotate.status +install -p -m 644 examples/logrotate-default $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.conf +install -p -m 644 examples/btmp $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/btmp +install -p -m 644 examples/wtmp $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/wtmp +install -p -m 755 examples/logrotate.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/logrotate +touch $RPM_BUILD_ROOT%{_localstatedir}/lib/logrotate.status %clean rm -rf $RPM_BUILD_ROOT @@ -52,5 +54,5 @@ %attr(0644, root, root) %{_mandir}/man5/logrotate.conf.5* %attr(0755, root, root) %{_sysconfdir}/cron.daily/logrotate %attr(0644, root, root) %config(noreplace) %{_sysconfdir}/logrotate.conf -%attr(0755, root, root) %dir %{_sysconfdir}/logrotate.d +%attr(0755, root, root) %{_sysconfdir}/logrotate.d %attr(0644, root, root) %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/logrotate.status diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/missing new/logrotate-3.14.0/missing --- old/logrotate-3.13.0/missing 2017-10-13 08:25:48.000000000 +0200 +++ new/logrotate-3.14.0/missing 2018-03-09 18:14:18.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2017 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <[email protected]>, 1996. # This program is free software; you can redistribute it and/or modify @@ -210,6 +210,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/test/Makefile.am new/logrotate-3.14.0/test/Makefile.am --- old/logrotate-3.13.0/test/Makefile.am 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/test/Makefile.am 2018-02-19 10:50:02.000000000 +0100 @@ -75,6 +75,7 @@ test-0074.sh \ test-0075.sh \ test-0076.sh \ + test-0077.sh \ test-0100.sh \ test-0101.sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/test/test-0032.sh new/logrotate-3.14.0/test/test-0032.sh --- old/logrotate-3.13.0/test/test-0032.sh 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/test/test-0032.sh 2018-01-04 12:58:46.000000000 +0100 @@ -5,7 +5,8 @@ . ./test-common-acl.sh if [ $ACL_TESTS = 0 ]; then echo "Skipping test 32: no ACL support" -else + exit 77 +fi cleanup 32 @@ -50,5 +51,3 @@ test.log 0 test.log.1 0 zero EOF - -fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/test/test-0033.sh new/logrotate-3.14.0/test/test-0033.sh --- old/logrotate-3.13.0/test/test-0033.sh 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/test/test-0033.sh 2018-01-04 12:58:46.000000000 +0100 @@ -5,7 +5,8 @@ . ./test-common-acl.sh if [ $ACL_TESTS = 0 ]; then echo "Skipping test 33: no ACL support" -else + exit 77 +fi cleanup 33 @@ -33,5 +34,3 @@ test.log 0 test.log.1 0 zero EOF - -fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/test/test-0035.sh new/logrotate-3.14.0/test/test-0035.sh --- old/logrotate-3.13.0/test/test-0035.sh 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/test/test-0035.sh 2018-01-04 12:58:46.000000000 +0100 @@ -5,7 +5,8 @@ . ./test-common-acl.sh if [ $ACL_TESTS = 0 ]; then echo "Skipping test 35: no ACL support" -else + exit 77 +fi cleanup 35 @@ -35,5 +36,3 @@ test.log 0 test.log.1 0 zero EOF - -fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/test/test-0047.sh new/logrotate-3.14.0/test/test-0047.sh --- old/logrotate-3.13.0/test/test-0047.sh 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/test/test-0047.sh 2018-01-04 12:58:46.000000000 +0100 @@ -5,7 +5,10 @@ cleanup 47 . ./test-common-selinux.sh -if [ $SELINUX_TESTS = 1 ]; then +if [ $SELINUX_TESTS = 0 ]; then + echo "Skipping SELinux test 47" + exit 77 +fi # ------------------------------- Test 47 ------------------------------------ # test that newly created state file has the same SELinux context as the @@ -30,7 +33,3 @@ checkoutput <<EOF test.log 0 zero EOF - -else - echo "Skipping SELinux test 47" -fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/test/test-0048.sh new/logrotate-3.14.0/test/test-0048.sh --- old/logrotate-3.13.0/test/test-0048.sh 2017-10-12 16:05:41.000000000 +0200 +++ new/logrotate-3.14.0/test/test-0048.sh 2018-01-04 12:58:46.000000000 +0100 @@ -7,7 +7,8 @@ . ./test-common-acl.sh if [ $ACL_TESTS = 0 ]; then echo "Skipping test 48: no ACL support" -else + exit 77 +fi # ------------------------------- Test 48 ------------------------------------ # Test that state file keeps the set ACLs @@ -31,5 +32,3 @@ test.log 0 test.log.1 0 zero EOF - -fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/test/test-0077.sh new/logrotate-3.14.0/test/test-0077.sh --- old/logrotate-3.13.0/test/test-0077.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/logrotate-3.14.0/test/test-0077.sh 2018-01-04 12:58:46.000000000 +0100 @@ -0,0 +1,20 @@ +#!/bin/bash + +. ./test-common.sh + +cleanup 77 + +# ------------------------------- Test 77 ------------------------------------ +# ignore empty patterns given by the tabooext directive +preptest test.log 77 1 +mkdir -p includedir +echo copytruncate > includedir/test-0077.conf + +$RLR test-config.77 --force --verbose + +rm -rf includedir + +checkoutput <<EOF +test.log 0 +test.log.1 0 zero +EOF diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/test/test-config.77.in new/logrotate-3.14.0/test/test-config.77.in --- old/logrotate-3.13.0/test/test-config.77.in 1970-01-01 01:00:00.000000000 +0100 +++ new/logrotate-3.14.0/test/test-config.77.in 2018-01-04 12:58:46.000000000 +0100 @@ -0,0 +1,6 @@ +tabooext + ,v + +include &DIR&/includedir + +&DIR&/test*.log { +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/logrotate-3.13.0/test-driver new/logrotate-3.14.0/test-driver --- old/logrotate-3.13.0/test-driver 2017-10-13 08:25:48.000000000 +0200 +++ new/logrotate-3.14.0/test-driver 2018-03-09 18:14:18.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # test-driver - basic testsuite driver script. -scriptversion=2013-07-13.22; # UTC +scriptversion=2016-01-11.22; # UTC -# Copyright (C) 2011-2014 Free Software Foundation, Inc. +# Copyright (C) 2011-2017 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -143,6 +143,6 @@ # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End:
