commit logrotate for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community,
here is the log from the commit of package logrotate for openSUSE:Factory checked in at 2013-11-12 09:50:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/logrotate (Old)
and /work/SRC/openSUSE:Factory/.logrotate.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "logrotate"
Changes:
--------
--- /work/SRC/openSUSE:Factory/logrotate/logrotate.changes 2013-08-24 10:14:26.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.logrotate.new/logrotate.changes 2013-11-12 09:50:41.000000000 +0100
@@ -1,0 +2,14 @@
+Thu Nov 7 20:26:51 UTC 2013 - sweet_f_a@gmx.de
+
+- 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.
+
+-------------------------------------------------------------------
Old:
----
logrotate-3.8.5.tar.gz
New:
----
logrotate-3.8.7.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ logrotate.spec ++++++
--- /var/tmp/diff_new_pack.sStQrz/_old 2013-11-12 09:50:42.000000000 +0100
+++ /var/tmp/diff_new_pack.sStQrz/_new 2013-11-12 09:50:42.000000000 +0100
@@ -19,7 +19,7 @@
Url: https://fedorahosted.org/releases/l/o/logrotate
Name: logrotate
-Version: 3.8.5
+Version: 3.8.7
Release: 0
Summary: Rotate, compress, remove, and mail system log files
License: GPL-2.0+
++++++ logrotate-3.7.8-addextension.patch ++++++
--- /var/tmp/diff_new_pack.sStQrz/_old 2013-11-12 09:50:42.000000000 +0100
+++ /var/tmp/diff_new_pack.sStQrz/_new 2013-11-12 09:50:42.000000000 +0100
@@ -1,10 +1,10 @@
Index: test/test
===================================================================
---- test/test.orig 2013-07-25 14:13:04.195582354 +0200
-+++ test/test 2013-07-25 14:14:27.468464841 +0200
-@@ -1285,6 +1285,28 @@ echo "Does not have GNU Date, skipping p
- fi
-
+--- 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
@@ -28,8 +28,7 @@
+test.1.log 0 zero
+EOF
+
-
-
++
cleanup
Index: config.c
===================================================================
++++++ logrotate-3.8.5.tar.gz -> logrotate-3.8.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logrotate-3.8.5/CHANGES new/logrotate-3.8.7/CHANGES
--- old/logrotate-3.8.5/CHANGES 2013-06-10 14:02:36.000000000 +0200
+++ new/logrotate-3.8.7/CHANGES 2013-10-10 10:43:36.000000000 +0200
@@ -1,3 +1,13 @@
+3.8.6 -> 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.
+
+3.8.5 -> 3.8.6
+ - Fixed memory corruption caused by rotation directory which does not
+ exist with "sharedscripts" together with "prerotate" script.
+
3.8.4 -> 3.8.5
- Improved rotation during daylight saving time and between timezone
changes.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logrotate-3.8.5/config.c new/logrotate-3.8.7/config.c
--- old/logrotate-3.8.5/config.c 2013-06-10 14:02:36.000000000 +0200
+++ new/logrotate-3.8.7/config.c 2013-07-31 13:34:31.000000000 +0200
@@ -812,7 +812,7 @@
if (key == NULL)
continue;
- rc = sscanf(key, "%200s %200s%c", createOwner,
+ rc = sscanf(key, "%199s %199s%c", createOwner,
createGroup, &foo);
if (rc == 3) {
message(MESS_ERROR, "%s:%d extra arguments for "
@@ -863,11 +863,11 @@
if (key == NULL)
continue;
- rc = sscanf(key, "%o %200s %200s%c", &createMode,
+ rc = sscanf(key, "%o %199s %199s%c", &createMode,
createOwner, createGroup, &foo);
/* We support 'create <owner> <group> notation now */
if (rc == 0) {
- rc = sscanf(key, "%200s %200s%c",
+ rc = sscanf(key, "%199s %199s%c",
createOwner, createGroup, &foo);
/* Simulate that we have read createMode and se it
* to NO_MODE. */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logrotate-3.8.5/logrotate.c new/logrotate-3.8.7/logrotate.c
--- old/logrotate-3.8.5/logrotate.c 2013-06-10 14:02:36.000000000 +0200
+++ new/logrotate-3.8.7/logrotate.c 2013-10-10 10:43:36.000000000 +0200
@@ -830,11 +830,12 @@
return 0;
}
- if (log->criterium == ROT_SIZE) {
- state->doRotate = (sb.st_size >= log->threshhold);
- } else if (force) {
+ if (force) {
/* user forced rotation of logs from command line */
- state->doRotate = 1;
+ state->doRotate = 1;
+ }
+ else if (log->criterium == ROT_SIZE) {
+ state->doRotate = (sb.st_size >= log->threshhold);
} else if (mktime(&state->lastRotated) - mktime(&now) > (25 * 3600)) {
/* 25 hours allows for DST changes as well as geographical moves */
message(MESS_ERROR,
@@ -1601,6 +1602,11 @@
message(MESS_DEBUG, "old logs are removed\n");
}
+ if (log->numFiles == 0) {
+ message(MESS_DEBUG, "No logs found. Rotation not needed.\n");
+ return 0;
+ }
+
if (log->flags & LOG_FLAG_SU) {
if (switch_user(log->suUid, log->suGid) != 0) {
return 1;
@@ -1657,10 +1663,12 @@
hasErrors |= logHasErrors[i];
}
- /* (nemam chyby nebo shared) a (nemam chyby nebo nonshared) */
if (log->pre
- && (!logHasErrors[j] || log->flags & LOG_FLAG_SHAREDSCRIPTS) &&
- ((!hasErrors && state[j]->doRotate) || (!(log->flags & LOG_FLAG_SHAREDSCRIPTS) && state[j]->doRotate) ) ) {
+ && (!(
+ ((logHasErrors[j] || !state[j]->doRotate) && !(log->flags & LOG_FLAG_SHAREDSCRIPTS))
+ || (hasErrors && (log->flags & LOG_FLAG_SHAREDSCRIPTS))
+ ))
+ ) {
if (!numRotated) {
message(MESS_DEBUG, "not running prerotate script, "
"since no logs will be rotated\n");
@@ -1694,8 +1702,11 @@
}
if (log->post
- && (!logHasErrors[j] || log->flags & LOG_FLAG_SHAREDSCRIPTS) &&
- ((!hasErrors && state[j]->doRotate) || (!(log->flags & LOG_FLAG_SHAREDSCRIPTS) && state[j]->doRotate) ) ) {
+ && (!(
+ ((logHasErrors[j] || !state[j]->doRotate) && !(log->flags & LOG_FLAG_SHAREDSCRIPTS))
+ || (hasErrors && (log->flags & LOG_FLAG_SHAREDSCRIPTS))
+ ))
+ ) {
if (!numRotated) {
message(MESS_DEBUG, "not running postrotate script, "
"since no logs were rotated\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/logrotate-3.8.5/logrotate.spec new/logrotate-3.8.7/logrotate.spec
--- old/logrotate-3.8.5/logrotate.spec 2013-06-10 14:02:36.000000000 +0200
+++ new/logrotate-3.8.7/logrotate.spec 2013-10-10 10:43:36.000000000 +0200
@@ -1,6 +1,6 @@
Summary: Rotates, compresses, removes and mails system log files
Name: logrotate
-Version: 3.8.5
+Version: 3.8.7
Release: 1
License: GPL+
Group: System Environment/Base
@@ -52,6 +52,12 @@
%attr(0644, root, root) %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/logrotate.status
%changelog
+* Thu Oct 10 2013 Jan Kaluza
participants (1)
-
root@hilbert.suse.de