From b0ff9c33c75cea4d45c9da85b04ad855735747aa Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Wed, 3 Aug 2016 14:47:17 +0200 Subject: [PATCH] Resolves: #1357215 - document default state file ... used by logrotate cron job --- logrotate-3.9.1-statusfile.patch | 45 ++++++++++++++++++++++++++++++++ logrotate.spec | 1 + 2 files changed, 46 insertions(+) diff --git a/logrotate-3.9.1-statusfile.patch b/logrotate-3.9.1-statusfile.patch index 1610173..af849fc 100644 --- a/logrotate-3.9.1-statusfile.patch +++ b/logrotate-3.9.1-statusfile.patch @@ -1,3 +1,15 @@ +From 70a8b71fd9d4951e69d1c4116dc28d2e1873d0eb Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Wed, 3 Aug 2016 14:30:19 +0200 +Subject: [PATCH] logrotate.cron: use /var/lib/logrotate/logrotate.status as + state file + +Signed-off-by: rpm-build +--- + examples/logrotate.cron | 2 +- + logrotate.8 | 10 ++++++++-- + 2 files changed, 9 insertions(+), 3 deletions(-) + diff --git a/examples/logrotate.cron b/examples/logrotate.cron index c6d50d4..967932e 100644 --- a/examples/logrotate.cron @@ -10,3 +22,36 @@ index c6d50d4..967932e 100644 EXITVALUE=$? if [ $EXITVALUE != 0 ]; then /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" +diff --git a/logrotate.8 b/logrotate.8 +index 3f30472..9c62dc8 100644 +--- a/logrotate.8 ++++ b/logrotate.8 +@@ -66,6 +66,9 @@ and mail it to the recipient. The default mail command is \fB/bin/mail + Tells \fBlogrotate\fR to use an alternate state file. This is useful + if logrotate is being run as a different user for various sets of + log files. The default state file is \fI/var/lib/logrotate.status\fR. ++Note that logrotate cron job on Fedora overrides the default with ++\fI/var/lib/logrotate/logrotate.status\fR in order to support read-only ++mounted root file systems. + + .TP + \fB\-\-usage\fR +@@ -557,10 +560,13 @@ Log files are rotated if the current year is not the same as the last rotation. + + .SH FILES + .PD 0 +-.TP 27 ++.TP 42 + \fI/var/lib/logrotate.status\fR + Default state file. +-.TP 27 ++.TP 42 ++\fI/var/lib/logrotate/logrotate.status\fR ++Default state file used by logrotate cron job on Fedora. ++.TP 42 + \fI/etc/logrotate.conf\fR + Configuration options. + +-- +2.5.5 + diff --git a/logrotate.spec b/logrotate.spec index f698fe7..9d9fd98 100644 --- a/logrotate.spec +++ b/logrotate.spec @@ -79,6 +79,7 @@ fi %changelog * Wed Aug 03 2016 Kamil Dudka - 3.10.0-1 +- document default state file used by logrotate cron job (#1357215) - modernize spec file - new upstream version 3.10.0