Hello community,

here is the log from the commit of package logrotate.2709 for 
openSUSE:13.1:Update checked in at 2014-04-10 08:26:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.1:Update/logrotate.2709 (Old)
 and      /work/SRC/openSUSE:13.1:Update/.logrotate.2709.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "logrotate.2709"

Changes:
--------
New Changes file:

--- /dev/null   2014-02-13 01:09:38.344032506 +0100
+++ /work/SRC/openSUSE:13.1:Update/.logrotate.2709.new/logrotate.changes        
2014-04-10 08:26:18.000000000 +0200
@@ -0,0 +1,560 @@
+-------------------------------------------------------------------
+Tue Apr  1 15:11:22 UTC 2014 - [email protected]
+
+- return error when nomissingok is specified and the log path
+  doesn't exist (bnc#871217)
+  * added logrotate-fail_if_ENOENT_and_nomissingok.patch
+
+-------------------------------------------------------------------
+Thu Nov  7 21:57:31 UTC 2013 - [email protected]
+
+- enable acl support to preserve ACLs during rotation
+
+-------------------------------------------------------------------
+Thu Nov  7 20:26:51 UTC 2013 - [email protected]
+
+- update to 3.8.7, fix bnc#849436
+- Changelog 3.8.7:
+  * Fixed --force/-f option handling together with "size" directive
+    (3.8.5 regression).
+  * Use "logrotate_tmp_t" context for SELinux tests and if this
+    context does not exist, skip SELinux related tests.
+- Changelog 3.8.6
+  * Fixed memory corruption caused by rotation directory which
+    does not exist with "sharedscripts" together with "prerotate"
+    script.
+
+-------------------------------------------------------------------
+Tue Aug 20 12:53:27 UTC 2013 - [email protected]
+
+- install COPYING file (bnc#817870)
+
+-------------------------------------------------------------------
+Thu Aug  1 12:36:57 UTC 2013 - [email protected]
+
+- mention in the manpage that = is an allowed separator in the
+  config file (bnc#831072)
+  * added logrotate-manpage_config_clarification.patch
+
+-------------------------------------------------------------------
+Thu Jul 25 14:19:48 UTC 2013 - [email protected]
+
+- update to 3.8.5
+  * dropped logrotate-3.7.9-compressoptions.patch (upstream)
+  * refreshed other patches
+  Changelog:
+  - Improved rotation during daylight saving time and between timezone
+    changes.
+  - Fixed ACL setting problem caused by ext3 erroneously reporting ENOSYS
+    instead of ENOSUP.
+  - Do not continue with rotation if state file is corrupted.
+  - Make logrotate.status creation atomic.
+  - Allow "hourly" rotation. See manpage for more information.
+  - Use "/bin/echo" in tests. Fixes tests execution in Dash.
+  - Do no try to parse config files bigger than 16MB.
+  - Improved manpage consistency and formatting.
+  - Fix race condition between acl_set_fd() and fchmod().
+  - Added --version command line option
+  - Disable ACL tests if logrotate is not compiled WITH_ACL support or if 
+    ACLs are not supported by the system running tests
+  - Disable SELinux tests if logrotate is not compiled WITH_SELINUX support
+    or if SELinux is not supported by the system running tests
+  - Fixed bug which prevented skipping particular log file config
+    if the config contained errors.
+  - Fixed skipping of configs containing firstaction/lastaction scripts
+    with '}' character in case of error before these scripts.
+  - Support also 'K' unit for *size directives.
+  - Added preremove option to let admin to do something with the old logs
+    before they are removed by logrotate.
+  - Fixed possible loop in tabooext parsing.
+  - Move code to set SELinux context before compressLogFile calls to create
+    compressed log files with the proper context.
+  - Call prerotate/postrotate script only for really rotated files in
+    nosharedscripts mode (as stated in man page).
+  - Fixed setting "size" bigger than 4GB on 32bit architectures
+  - Do not overwrite mode set by "create" option when using ACL. "create"
+    directive is now not mixed up with ACLs. If you use "create" in config
+    file and log file has some ACLs set, ACLs are not kept and are
+    overwritten by the mode set in "create" directive.
+  - Mode argument in "create" directive can be omitted. Only owner and group
+    is set in this case. Check man page for more info.
+  - show error and ignore config if '{' is not present after log files
+    declaration
+  - support whitespaces in compressoptions directive
+  - support for tilde expansion in config files
+  - 'su' directive does not affect script execution - scripts
+    are executed as a root if 'su' directive is present
+  - fixed mail sending for 'mailfirst', 'dateext' and 'delaycompress'
+    combination
+  - do not use gzip/gunzip from /usr/local on Solaris
+  - add O_NOFOLLOW when opening files as safeguard against symlink tricks.
+    Symlinks rotation is now officially unsupported. It didn't work
+    as expected in the past anyway.
+  - do not run external programs with uid != euid
+  - fixed potential bad-free when ACL is used
+  - Do not include alloca.h on NetBSD, since alloca() is declared in
+    stdlib.h there
+
+-------------------------------------------------------------------
+Tue Apr 16 08:23:18 UTC 2013 - [email protected]
+
+- Added url as source.
+  Please see http://en.opensuse.org/SourceUrls
+
+-------------------------------------------------------------------
+Fri Sep 30 15:34:40 UTC 2011 - [email protected]
+
+- cross-build fix: use %__cc macro
+
+-------------------------------------------------------------------
+Wed Sep  7 14:30:29 UTC 2011 - [email protected]
+
+- update to 3.8.1
+- dropped CVE patches as they were merged to upstream
+- changelog
+  - fixed 1 memory leak in prerotateSingleLog
+  - do not redirect logrotate errors to /dev/null in cron script
+  - fixed "size" directive parsing
+  - handle situation when acl_get_fd is supported, but acl_set_fd is not
+  - added "maxsize" directive (see man page)
+  - added "dateyesterday" option (see man page)
+  - fixed crash when config file had exactly 4096*N bytes
+  - added WITH_ACL make option to link against -lacl and preserve ACLs
+    during rotation
+  - added "su" option to define user/group for rotation. Logrotate now
+    skips directories which are world writable or writable by group
+    which is not "root" unless "su" directive is used.
+  - fixed CVE-2011-1098: race condition by creation of new files
+  - fixed possible shell injection when using "shred" directive (CVE-2011-1154)
+  - fixed escaping of file names within 'write state' action (CVE-2011-1155)
+  - better 'size' directive description
+  - fixed possible buffer-overflow when reading config files
+
+-------------------------------------------------------------------
+Wed Sep  7 12:51:41 UTC 2011 - [email protected]
+
+- allow whitespace separated options in compressoptions (bnc#711780)
+
+-------------------------------------------------------------------
+Mon Jul 25 10:25:56 UTC 2011 - [email protected]
+
+- Change compression scheme to xz
+
+-------------------------------------------------------------------
+Tue May 10 14:23:08 UTC 2011 - [email protected]
+
+- add logrotate-CVE-2011-1098.patch (bnc#677336)
+- add logrotate-shred-CVE-2011-1154.patch (bnc#679661)
+- add logrotate-CVE-2011-1155.patch (bnc#679662)
+- use spec-cleaner
+
+-------------------------------------------------------------------
+Thu Nov 18 12:44:55 UTC 2010 - [email protected]
+
+- also rotate /var/log/btmp
+
+-------------------------------------------------------------------
+Tue Sep 14 13:01:46 UTC 2010 - [email protected]
+
+- use proper syslog facility/priority in logrotate cron
+  script (bnc#636236)
+
+-------------------------------------------------------------------
+Tue Aug 17 15:29:49 UTC 2010 - [email protected]
+
+- update to logrotate-3.7.9
+  - don't copy config files on the stack -- mmap them instead
+    (fixes segfaults with too large/invalid config files)
+  - symlinked conf file man page as requested by Fedora guidelines
+  - added rotating (copying) non-writable, readable files
+  - fixed missingok problem with globs
+  - fixed bug when log files could be removed even there was
+    some error in rotation process.
+  - allow setting size greater than 4.2GB in configuration file
+  - pass currently rotated file to postrotate/prerotate script
+    in nosharedscripts mode
+  - added new TabooExts: ".disabled", ".dpkg-old", ".dpkg-dist",
+    ".dpkg-new", ".cfsaved", ".ucf-old", ".ucf-dist", ".ucf-new"
+  - Don't change utime atime/mtime when compressing files
+  - Better *rotate scripts parser.
+  - Allow 'include' directive in log file definitions
+- merge logrotate-3.7.8-cron-check-for-another-instance.patch into
+  logrotate-3.7.8-suse.patch
+- add logrotate-rpmlintrc: suppress false-positive rpmlint warning
+
+-------------------------------------------------------------------
+Sun Dec 20 16:30:04 CET 2009 - [email protected]
+
+- enable parallel build
+
+-------------------------------------------------------------------
+Fri Mar  6 15:31:04 CET 2009 - [email protected]
+
+- update to 3.7.8
+  - do not exit on status file errors
+  - limit config file inclusion nesting
+  - use hashes for status file handling
+  - dateformat to allow unixtime
++++ 363 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.1:Update/.logrotate.2709.new/logrotate.changes

New:
----
  logrotate-3.7.8-addextension.patch
  logrotate-3.7.8-autoext.patch
  logrotate-3.7.8-conf.patch
  logrotate-3.7.8-mess_err.patch
  logrotate-3.7.8-suse.patch
  logrotate-3.8.7.tar.gz
  logrotate-fail_if_ENOENT_and_nomissingok.patch
  logrotate-manpage_config_clarification.patch
  logrotate-rpmlintrc
  logrotate.changes
  logrotate.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ logrotate.spec ++++++
#
# spec file for package logrotate
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Url:            https://fedorahosted.org/releases/l/o/logrotate

Name:           logrotate
Version:        3.8.7
Release:        0
Summary:        Rotate, compress, remove, and mail system log files
License:        GPL-2.0+
Group:          System/Base
Source:         
https://fedorahosted.org/releases/l/o/%{name}/%{name}-%{version}.tar.gz
Source100:      %{name}-rpmlintrc
Patch0:         logrotate-3.7.8-suse.patch
Patch1:         logrotate-3.7.8-conf.patch
Patch2:         logrotate-3.7.8-autoext.patch
Patch3:         logrotate-3.7.8-addextension.patch
Patch4:         logrotate-3.7.8-mess_err.patch
Patch5:         logrotate-manpage_config_clarification.patch
Patch6:         logrotate-fail_if_ENOENT_and_nomissingok.patch
BuildRequires:  acl
BuildRequires:  libacl-devel
BuildRequires:  libselinux-devel
BuildRequires:  popt-devel
PreReq:         %fillup_prereq
PreReq:         /bin/mv
PreReq:         /bin/rm
Requires:       cron
Requires:       xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%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
daily cron job.

%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5 -p1
%patch6 -p1

%build
make %{?_smp_mflags} CC="%__cc" RPM_OPT_FLAGS="%{optflags}" \
   WITH_SELINUX=yes \
   WITH_ACL=yes

%check
make test

%install
make PREFIX=%{buildroot} install
mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,cron.daily}
mkdir -p %{buildroot}%{_prefix}/sbin
install -m 644 examples/logrotate-default 
%{buildroot}%{_sysconfdir}/logrotate.conf
install -m 755 examples/logrotate.cron 
%{buildroot}%{_sysconfdir}/cron.daily/logrotate
install -m 644 examples/logrotate.wtmp 
%{buildroot}%{_sysconfdir}/logrotate.d/wtmp

%post
%{remove_and_set MAX_DAYS_FOR_LOG_FILES}
if [ -f /etc/logrotate.d/aaa_base ] ; then
   echo "Saving old logrotate system configuration"
   mv -v /etc/logrotate.d/aaa_base /etc/logrotate.d.aaa_base.save
fi

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc CHANGES COPYING
%{_sbindir}/logrotate
%{_mandir}/man8/logrotate.8*
%{_mandir}/man5/logrotate.conf.5*
%{_sysconfdir}/cron.daily/logrotate
%config %{_sysconfdir}/logrotate.conf
%config(noreplace)/etc/logrotate.d/wtmp

%changelog
++++++ logrotate-3.7.8-addextension.patch ++++++
Index: test/test
===================================================================
--- test/test.orig      2013-10-10 10:43:36.000000000 +0200
+++ test/test   2013-11-07 21:46:37.112487860 +0100
@@ -1358,4 +1358,27 @@
 test.log.1 0 zero
 EOF
 
+# check rotation with extension appended to the filename
+cleanup 100
+
+preptest test.log 100 1 0
+$RLR test-config.100 --force
+
+checkoutput <<EOF
+test.log 0
+test.log.1.newext 0 zero
+EOF
+
+# check rotation with extension moved after the number
+cleanup 101
+
+preptest test.log 101 1 0
+$RLR test-config.101 --force
+
+checkoutput <<EOF
+test.log 0
+test.1.log 0 zero
+EOF
+
+
 cleanup
Index: config.c
===================================================================
--- config.c.orig       2013-07-25 14:13:02.780567373 +0200
+++ config.c    2013-07-25 14:13:04.196582364 +0200
@@ -530,6 +530,7 @@ int readAllConfigPaths(const char **path
                .preremove = NULL,
                .logAddress = NULL,
                .extension = NULL,
+               .addextension = NULL,
                .compress_prog = NULL,
                .uncompress_prog = NULL,
                .compress_ext = NULL,
@@ -1217,6 +1218,19 @@ static int readConfigFile(const char *co
                                        message(MESS_DEBUG, "extension is now 
%s\n",
                                                newlog->extension);
 
+                               } else if (!strcmp(key, "addextension")) {
+                                       if ((key = isolateValue
+                                               (configFile, lineNum, 
"addextension name", &start,
+                                                       &buf, length)) != NULL) 
{
+                                               freeLogItem (addextension);
+                                               newlog->addextension = key;
+                                               key = NULL;
+                                       }
+                                       else continue;
+
+                                       message(MESS_DEBUG, "addextension is 
now %s\n",
+                                               newlog->addextension);
+
                                } else if (!strcmp(key, "compresscmd")) {
                                        freeLogItem (compress_prog);
 
Index: logrotate.8
===================================================================
--- logrotate.8.orig    2013-07-25 14:13:02.780567373 +0200
+++ logrotate.8 2013-07-25 14:13:04.196582364 +0200
@@ -265,6 +265,15 @@ configured to be run by cron daily. You
 and run \fIlogrotate\fR hourly to be able to really rotate logs hourly.
 
 .TP
+\fBaddextension \fIext\fR
+Log files are given the final extension \fIext\fR after rotation. If
+the original file already ends with \fIext\fR, the extension is not
+duplicated, but merely moved to the end, i.e. both \fBfilename\fR and
+\fBfilename\fIext\fR would get rotated to filename.1\fIext\fR. If
+compression is used, the compression extension (normally \fB.gz\fR)
+appears after \fIext\fR.
+
+.TP
 \fBifempty\fR
 Rotate the log file even if it is empty, overriding the \fBnotifempty\fR
 option (\fBifempty\fR is the default).
Index: logrotate.c
===================================================================
--- logrotate.c.orig    2013-07-25 14:13:02.781567384 +0200
+++ logrotate.c 2013-07-25 14:13:04.196582364 +0200
@@ -964,6 +964,24 @@ int prerotateSingleLog(struct logInfo *l
 
     rotNames->baseName = strdup(ourBaseName(log->files[logNum]));
 
+    if (log->addextension) {
+        size_t baseLen = strlen(rotNames->baseName);
+       size_t extLen = strlen(log->addextension);
+       if (baseLen >= extLen &&
+           strncmp(&(rotNames->baseName[baseLen - extLen]),
+             log->addextension, extLen) == 0) {
+       char *tempstr;
+
+       fileext = log->addextension;
+       tempstr = calloc(baseLen - extLen + 1, sizeof(char));
+       strncat(tempstr, rotNames->baseName, baseLen - extLen);
+       free(rotNames->baseName);
+       rotNames->baseName = tempstr;
+       } else {
+           fileext = log->addextension;
+       }
+    }
+
     if (log->extension &&
        strncmp(&
                (rotNames->
Index: logrotate.h
===================================================================
--- logrotate.h.orig    2013-07-25 14:13:02.781567384 +0200
+++ logrotate.h 2013-07-25 14:13:04.196582364 +0200
@@ -44,6 +44,7 @@ struct logInfo {
     char *pre, *post, *first, *last, *preremove;
     char *logAddress;
     char *extension;
+    char *addextension;
     char *compress_prog;
     char *uncompress_prog;
     char *compress_ext;
Index: test/test-config.100.in
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ test/test-config.100.in     2013-07-25 14:13:04.196582364 +0200
@@ -0,0 +1,7 @@
+create
+
+&DIR&/test.log {
+    monthly
+    rotate 1
+    addextension .newext
+}
Index: test/test-config.101.in
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ test/test-config.101.in     2013-07-25 14:13:04.196582364 +0200
@@ -0,0 +1,7 @@
+create
+
+&DIR&/test.log {
+    monthly
+    rotate 1
+    addextension .log
+}
++++++ logrotate-3.7.8-autoext.patch ++++++
Index: config.c
===================================================================
--- config.c.orig       2013-06-10 14:02:36.000000000 +0200
+++ config.c    2013-07-25 15:42:42.465060702 +0200
@@ -594,6 +594,7 @@ static int readConfigFile(const char *co
     char **scriptDest = NULL;
     struct logInfo *newlog = defConfig;
     char *start, *chptr;
+    char *compresscmd_base;
     char *dirName;
     struct group *group;
     struct passwd *pw = NULL;
@@ -1245,6 +1246,20 @@ static int readConfigFile(const char *co
                                        message(MESS_DEBUG, "compress_prog is 
now %s\n",
                                                newlog->compress_prog);
 
+                                       
compresscmd_base=strdup(basename(newlog->compress_prog));
+                                       fprintf(stdout, "compress_ext is %s\n", 
newlog->compress_prog);
+                                       i=0; /* have to check whether we may do 
this! */
+                                       /* we check whether we changed the 
compress_cmd. In case we use the apropriate extension
+                                          as listed in compress_cmd_list */
+                                       while 
((i>=0)&&(strcmp(compress_cmd_list[i][0], "EOLIST"))){
+                                           if 
(0==strcmp(compress_cmd_list[i][0], compresscmd_base)){
+                                               
newlog->compress_ext=strdup((char *)compress_cmd_list[i][1]);
+                                               message(MESS_DEBUG, 
"compress_ext was changed to %s\n", newlog->compress_ext);
+                                               fprintf(stdout, "compress_ext 
was changed to %s\n", newlog->compress_ext);
+                                               i=-10; /* terminate loop! */
+                                           }
+                                           i++;
+                                       }
                                } else if (!strcmp(key, "uncompresscmd")) {
                                        freeLogItem (uncompress_prog);
 
Index: logrotate.c
===================================================================
--- logrotate.c.orig    2013-06-10 14:02:36.000000000 +0200
+++ logrotate.c 2013-07-25 15:30:36.687434418 +0200
@@ -85,6 +85,16 @@ unsigned int hashSize;
 int numLogs = 0;
 int debug = 0;
 char *mailCommand = DEFAULT_MAIL_COMMAND;
+/* This is the declaration. Note the "2" is needed in the definition 
(logrotate.h), too! */
+const char * compress_cmd_list[][2] = {
+  {"gzip", ".gz"},
+  {"bzip2", ".bz2"},
+  {"xz", ".xz"},
+  {"compress", ".Z"},
+  {"zip", "zip"},
+  {"EOLIST", "EOLIST"} /* end-marker */
+};
+
 time_t nowSecs = 0;
 static uid_t save_euid;
 static gid_t save_egid;
Index: logrotate.h
===================================================================
--- logrotate.h.orig    2013-06-10 14:02:36.000000000 +0200
+++ logrotate.h 2013-07-25 15:30:36.687434418 +0200
@@ -66,6 +66,9 @@ TAILQ_HEAD(logInfoHead, logInfo) logs;
 extern int numLogs;
 extern int debug;
 
+/* This is the definition. Note we have to carry the "2" within the 
declaration (logrotate.c), too! */
+extern const char * compress_cmd_list[][2];
+
 int readAllConfigPaths(const char **paths);
 #if !defined(asprintf) && !defined(_FORTIFY_SOURCE)
 int asprintf(char **string_ptr, const char *format, ...);
Index: test/test
===================================================================
--- test/test.orig      2013-07-25 15:30:36.687434418 +0200
+++ test/test   2013-07-25 16:16:11.992044805 +0200
@@ -536,19 +536,6 @@ checkoutput <<EOF
 test.log 0 zero
 EOF
 
-cleanup 18
-
-# ------------------------------- Test 18 ------------------------------------
-preptest test.log 18 1
-$RLR test-config.18 --force
-
-checkoutput <<EOF
-test.log 0
-test.log.1.gz 1 zero
-EOF
-
-(echo "gzip -f -9") | diff -u - compress-args
-
 cleanup 19
 
 # ------------------------------- Test 19 ------------------------------------
++++++ logrotate-3.7.8-conf.patch ++++++
Index: examples/logrotate-default
===================================================================
--- examples/logrotate-default.orig
+++ examples/logrotate-default
@@ -14,22 +14,13 @@ 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
-}
+# comment these to switch compression to use gzip or another
+# compression scheme
+compresscmd /usr/bin/xz
+uncompresscmd /usr/bin/xzdec
 
-/var/log/btmp {
-    missingok
-    monthly
-    create 0600 root utmp
-    rotate 1
-}
+# former versions had to have the compressext set accordingly
+#compressext .xz
 
-# system-specific logs may be also be configured here.
+# RPM packages drop log rotation information into this directory
+include /etc/logrotate.d
Index: examples/logrotate.wtmp
===================================================================
--- /dev/null
+++ examples/logrotate.wtmp
@@ -0,0 +1,11 @@
+/var/log/wtmp /var/log/btmp {
+    compress
+    dateext
+    maxage 365
+    rotate 99
+    size=+400k
+    notifempty
+    missingok
+    copytruncate
+}
+
++++++ logrotate-3.7.8-mess_err.patch ++++++
Index: logrotate.c
===================================================================
--- logrotate.c.orig    2013-07-25 14:52:57.493518089 +0200
+++ logrotate.c 2013-07-25 14:52:57.499518158 +0200
@@ -1327,7 +1327,7 @@ int prerotateSingleLog(struct logInfo *l
                        message(MESS_FATAL, "could not allocate destFile 
memory\n");
                }
                if (!stat(destFile, &fst_buf)) {
-                       message(MESS_DEBUG,
+                       message(MESS_ERROR,
                                        "destination %s already exists, 
skipping rotation\n",
                                        rotNames->firstRotated);
                        hasErrors = 1;
++++++ logrotate-3.7.8-suse.patch ++++++
Index: Makefile
===================================================================
--- Makefile.orig
+++ Makefile
@@ -81,7 +81,7 @@ ifneq ($(STATEFILE),)
 endif
 
 BINDIR = $(BASEDIR)/sbin
-MANDIR ?= $(BASEDIR)/man
+MANDIR ?= $(BASEDIR)/share/man
 
 #--------------------------------------------------------------------------
 
Index: examples/logrotate.cron
===================================================================
--- examples/logrotate.cron.orig
+++ examples/logrotate.cron
@@ -1,8 +1,23 @@
 #!/bin/sh
 
-/usr/sbin/logrotate /etc/logrotate.conf
-EXITVALUE=$?
-if [ $EXITVALUE != 0 ]; then
-    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
+# exit immediately if there is another instance running
+if checkproc /usr/sbin/logrotate; then
+       /bin/logger -p cron.warning -t logrotate "ALERT another instance of 
logrotate is running - exiting"
+       exit 1
 fi
+
+TMPF=`mktemp /tmp/logrotate.XXXXXXXXXX`
+
+/usr/sbin/logrotate /etc/logrotate.conf 2>&1 | tee $TMPF
+EXITVALUE=${PIPESTATUS[0]}
+
+if [ $EXITVALUE != 0 ]; then
+    # wait a sec, we might just have restarted syslog
+    sleep 1
+    # tell what went wrong
+    /bin/logger -p cron.warning -t logrotate "ALERT exited abnormally with 
[$EXITVALUE]"
+    /bin/logger -p cron.warning -t logrotate -f $TMPF
+ fi
+
+rm -f $TMPF
 exit 0
++++++ logrotate-fail_if_ENOENT_and_nomissingok.patch ++++++
Index: logrotate-3.8.7/logrotate.c
===================================================================
--- logrotate-3.8.7.orig/logrotate.c    2014-04-01 18:39:14.294635014 +0200
+++ logrotate-3.8.7/logrotate.c 2014-04-01 18:40:29.613496763 +0200
@@ -795,8 +795,9 @@ int findNeedRotating(struct logInfo *log
                char *ld = ourDirName(log->files[logNum]);
                if (stat(ld, &sb)) {
                        /* If parent directory doesn't exist, it's not real 
error
+                         (unless nomissingok is specified)
                          and rotation is not needed */
-                       if (errno != ENOENT) {
+                       if (errno != ENOENT || (errno == ENOENT && (log->flags 
& LOG_FLAG_MISSINGOK) == 0)) {
                                message(MESS_ERROR, "stat of %s failed: %s\n", 
ld,
                                        strerror(errno));
                                free(ld);
++++++ logrotate-manpage_config_clarification.patch ++++++
Index: logrotate-3.8.5/logrotate.8
===================================================================
--- logrotate-3.8.5.orig/logrotate.8    2013-07-25 15:30:36.687434418 +0200
+++ logrotate-3.8.5/logrotate.8 2013-07-31 16:08:57.460078472 +0200
@@ -121,6 +121,10 @@ compressed after they are rotated.  Note
 anywhere in the config file as long as the first non-whitespace
 character on the line is a #.
 
+Values are separated from directives by whitespace and/or an optional =.
+Numbers must be specified in a format understood by
+.BR strtoul(3).
+
 The next section of the config files defined how to handle the log file
 \fI/var/log/messages\fR. The log will go through five weekly rotations before
 being removed. After the log file has been rotated (but before the old
++++++ logrotate-rpmlintrc ++++++
addFilter(".*incoherent-logrotate-file /etc/logrotate.d/wtmp")
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to