OBS User unknown 2008-08-21 22:41:47 +00:00 committed by Git OBS Bridge
parent 0b1ffa9500
commit b367a13fa4
3 changed files with 31 additions and 1 deletions

View File

@ -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

View File

@ -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 Thu Aug 14 17:36:08 CEST 2008 - puzel@suse.cz

View File

@ -23,7 +23,7 @@ Name: logrotate
BuildRequires: popt-devel BuildRequires: popt-devel
Summary: Rotate, Compress, Remove, and Mail System Log Files Summary: Rotate, Compress, Remove, and Mail System Log Files
Version: 3.7.5 Version: 3.7.5
Release: 62 Release: 67
License: GPL v2 or later License: GPL v2 or later
Group: System/Base Group: System/Base
Source: ftp://people.redhat.com/sopwith/logrotate-%{version}.tar.bz2 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 Patch13: logrotate-3.7.5-cfengine.patch
Patch14: logrotate-3.7.5-date.patch Patch14: logrotate-3.7.5-date.patch
Patch15: logrotate-3.7.5-logfn.patch Patch15: logrotate-3.7.5-logfn.patch
Patch16: logrotate-3.7.5-cron-check-for-another-instance.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %fillup_prereq /bin/rm /bin/mv PreReq: %fillup_prereq /bin/rm /bin/mv
Requires: bzip2 cron Requires: bzip2 cron
@ -69,6 +70,7 @@ Authors:
%patch13 -p1 %patch13 -p1
%patch14 -p1 %patch14 -p1
%patch15 -p1 %patch15 -p1
%patch16
%build %build
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS" make RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
@ -104,6 +106,11 @@ rm -rf $RPM_BUILD_ROOT
%config(noreplace)/etc/logrotate.d/wtmp %config(noreplace)/etc/logrotate.d/wtmp
%changelog %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 * Thu Aug 14 2008 puzel@suse.cz
- fix rpmlint warnings: - fix rpmlint warnings:
- make test moved to %%check section - make test moved to %%check section