From 3460fbd6602db1f6aae4c8f12e4488599d1ef9ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kalu=C5=BEa?= Date: Tue, 15 Jun 2010 14:06:54 +0000 Subject: [PATCH] Resolves:#603040 - do not remove log if there is an error in rotate process --- logrotate-3.7.8-dont-remove-log.patch | 16 ++++++++++++++++ logrotate.spec | 8 +++++++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 logrotate-3.7.8-dont-remove-log.patch diff --git a/logrotate-3.7.8-dont-remove-log.patch b/logrotate-3.7.8-dont-remove-log.patch new file mode 100644 index 0000000..d68e290 --- /dev/null +++ b/logrotate-3.7.8-dont-remove-log.patch @@ -0,0 +1,16 @@ +Index: logrotate.c +=================================================================== +--- logrotate.c (revision 276) ++++ logrotate.c (working copy) +@@ -848,9 +848,10 @@ + mailLogWrapper(mailFilename, + mailCommand, logNum, + log); +- if (!hasErrors) ++ if (!hasErrors) { + message(MESS_DEBUG, "removing %s\n", mailFilename); + hasErrors = removeLogFile(mailFilename, log); ++ } + } + mail_out = i; + } diff --git a/logrotate.spec b/logrotate.spec index e263919..6509471 100644 --- a/logrotate.spec +++ b/logrotate.spec @@ -1,7 +1,7 @@ Summary: Rotates, compresses, removes and mails system log files Name: logrotate Version: 3.7.8 -Release: 10%{?dist} +Release: 11%{?dist} License: GPL+ Group: System Environment/Base Source: https://fedorahosted.org/releases/l/o/logrotate/logrotate-%{version}.tar.gz @@ -13,6 +13,7 @@ Patch5: logrotate-3.7.8-readonly.patch #Patch6: logrotate-3.7.8-perm.patch Patch7: logrotate-3.7.8-missingok.patch Patch8: logrotate-3.7.8-configsize.patch +Patch9: logrotate-3.7.8-dont-remove-log.patch Requires: coreutils >= 5.92 libsepol libselinux popt BuildRequires: libselinux-devel popt-devel @@ -39,6 +40,7 @@ log files on your system. #%%patch6 -p1 -b .perm %patch7 -p1 -b .missingok %patch8 -p2 -b .configsize +%patch9 -b dont-remove-log.patch %build make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS" WITH_SELINUX=yes @@ -69,6 +71,10 @@ rm -rf $RPM_BUILD_ROOT %attr(0644, root, root) %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/logrotate.status %changelog +* Tue Jun 15 2010 Jan Kaluza 3.7.8-11 +- fix #603040 - do not remove log if there is an error in + rotate process + * Tue Apr 20 2010 Jan Kaluza 3.7.8-10 - fix #602643 - logrotate "size" directive cannot exceed 1895825408 bytes