From b367a13fa4a7c4a2a508ed6dfe9395332c9bf86303cbe2657342d0b67facd067 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 21 Aug 2008 22:41:47 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/logrotate?expand=0&rev=6 --- ...te-3.7.5-cron-check-for-another-instance.patch | 15 +++++++++++++++ logrotate.changes | 8 ++++++++ logrotate.spec | 9 ++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 logrotate-3.7.5-cron-check-for-another-instance.patch diff --git a/logrotate-3.7.5-cron-check-for-another-instance.patch b/logrotate-3.7.5-cron-check-for-another-instance.patch new file mode 100644 index 0000000..18805bc --- /dev/null +++ b/logrotate-3.7.5-cron-check-for-another-instance.patch @@ -0,0 +1,15 @@ +# Fix (bnc#416221) +--- examples/logrotate.cron ++++ examples/logrotate.cron +@@ -1,5 +1,11 @@ + #!/bin/sh + ++# exit immediately if there is another instance running ++if pgrep logrotate; then ++ /bin/logger -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 diff --git a/logrotate.changes b/logrotate.changes index 81dd65d..dffdfe4 100644 --- a/logrotate.changes +++ b/logrotate.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Aug 20 11:05:19 CEST 2008 - puzel@suse.cz + +- added logrotate-3.7.5-cron-check-for-another-instance.patch + - cronjob exits immediately if there is another logrotate instance + running + - fixes (bnc#415072) + ------------------------------------------------------------------- Thu Aug 14 17:36:08 CEST 2008 - puzel@suse.cz diff --git a/logrotate.spec b/logrotate.spec index b2806a8..cb0cd85 100644 --- a/logrotate.spec +++ b/logrotate.spec @@ -23,7 +23,7 @@ Name: logrotate BuildRequires: popt-devel Summary: Rotate, Compress, Remove, and Mail System Log Files Version: 3.7.5 -Release: 62 +Release: 67 License: GPL v2 or later Group: System/Base Source: ftp://people.redhat.com/sopwith/logrotate-%{version}.tar.bz2 @@ -37,6 +37,7 @@ Patch12: logrotate-3.7.5-shred.patch Patch13: logrotate-3.7.5-cfengine.patch Patch14: logrotate-3.7.5-date.patch Patch15: logrotate-3.7.5-logfn.patch +Patch16: logrotate-3.7.5-cron-check-for-another-instance.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: %fillup_prereq /bin/rm /bin/mv Requires: bzip2 cron @@ -69,6 +70,7 @@ Authors: %patch13 -p1 %patch14 -p1 %patch15 -p1 +%patch16 %build make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" @@ -104,6 +106,11 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace)/etc/logrotate.d/wtmp %changelog +* Wed Aug 20 2008 puzel@suse.cz +- added logrotate-3.7.5-cron-check-for-another-instance.patch + - cronjob exits immediately if there is another logrotate instance + running + - fixes (bnc#415072) * Thu Aug 14 2008 puzel@suse.cz - fix rpmlint warnings: - make test moved to %%check section