Accepting request 45720 from Base:System

Copy from Base:System/logrotate based on submit request 45720 from user puzel

OBS-URL: https://build.opensuse.org/request/show/45720
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/logrotate?expand=0&rev=18
This commit is contained in:
OBS User autobuild 2010-08-24 15:44:55 +00:00 committed by Git OBS Bridge
parent 3c662d5829
commit 99aa203f9d
7 changed files with 51 additions and 36 deletions

View File

@ -1,15 +0,0 @@
# Fix (bnc#416221)
--- examples/logrotate.cron
+++ examples/logrotate.cron
@@ -1,5 +1,11 @@
#!/bin/sh
+# exit immediately if there is another instance running
+if checkproc /usr/sbin/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,8 +1,8 @@
Index: Makefile Index: Makefile
=================================================================== ===================================================================
--- Makefile.orig 2008-05-19 12:25:54.000000000 +0200 --- Makefile.orig
+++ Makefile 2009-03-06 13:57:22.000000000 +0100 +++ Makefile
@@ -61,7 +61,7 @@ @@ -63,7 +63,7 @@ ifneq ($(STATEFILE),)
endif endif
BINDIR = $(BASEDIR)/sbin BINDIR = $(BASEDIR)/sbin
@ -13,13 +13,19 @@ Index: Makefile
Index: examples/logrotate.cron Index: examples/logrotate.cron
=================================================================== ===================================================================
--- examples/logrotate.cron.orig 2003-07-09 21:36:35.000000000 +0200 --- examples/logrotate.cron.orig
+++ examples/logrotate.cron 2009-03-06 13:57:22.000000000 +0100 +++ examples/logrotate.cron
@@ -1,8 +1,17 @@ @@ -1,8 +1,23 @@
#!/bin/sh #!/bin/sh
-/usr/sbin/logrotate /etc/logrotate.conf -/usr/sbin/logrotate /etc/logrotate.conf >/dev/null 2>&1
-EXITVALUE=$? -EXITVALUE=$?
+# exit immediately if there is another instance running
+if checkproc /usr/sbin/logrotate; then
+ /bin/logger -t logrotate "ALERT another instance of logrotate is running - exiting"
+ exit 1;
+fi;
+
+TMPF=`mktemp /tmp/logrotate.XXXXXXXXXX` +TMPF=`mktemp /tmp/logrotate.XXXXXXXXXX`
+ +
+/usr/sbin/logrotate /etc/logrotate.conf 2>&1 | tee $TMPF +/usr/sbin/logrotate /etc/logrotate.conf 2>&1 | tee $TMPF

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65fe448828145f3d83eb9e5f92654dfe1bc4dcd865586ec041c71fac009b4479
size 37763

3
logrotate-3.7.9.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:916a934a096af34c83fa664fa77036d5b6cf4f6b265fe6dcffa25ce51cc702e0
size 39181

1
logrotate-rpmlintrc Normal file
View File

@ -0,0 +1 @@
addFilter(".*incoherent-logrotate-file /etc/logrotate.d/wtmp")

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Tue Aug 17 15:29:49 UTC 2010 - puzel@novell.com
- update to logrotate-3.7.9
- don't copy config files on the stack -- mmap them instead
(fixes segfaults with too large/invalid config files)
- symlinked conf file man page as requested by Fedora guidelines
- added rotating (copying) non-writable, readable files
- fixed missingok problem with globs
- fixed bug when log files could be removed even there was
some error in rotation process.
- allow setting size greater than 4.2GB in configuration file
- pass currently rotated file to postrotate/prerotate script
in nosharedscripts mode
- added new TabooExts: ".disabled", ".dpkg-old", ".dpkg-dist",
".dpkg-new", ".cfsaved", ".ucf-old", ".ucf-dist", ".ucf-new"
- Don't change utime atime/mtime when compressing files
- Better *rotate scripts parser.
- Allow 'include' directive in log file definitions
- merge logrotate-3.7.8-cron-check-for-another-instance.patch into
logrotate-3.7.8-suse.patch
- add logrotate-rpmlintrc: suppress false-positive rpmlint warning
------------------------------------------------------------------- -------------------------------------------------------------------
Sun Dec 20 16:30:04 CET 2009 - jengelh@medozas.de Sun Dec 20 16:30:04 CET 2009 - jengelh@medozas.de

View File

@ -1,5 +1,5 @@
# #
# spec file for package logrotate (Version 3.7.8) # spec file for package logrotate (Version 3.7.9)
# #
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -23,17 +23,17 @@ Name: logrotate
BuildRequires: popt-devel BuildRequires: popt-devel
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
Summary: Rotate, Compress, Remove, and Mail System Log Files Summary: Rotate, Compress, Remove, and Mail System Log Files
Version: 3.7.8 Version: 3.7.9
Release: 2 Release: 1
License: GPL v2 or later License: GPLv2+
Group: System/Base Group: System/Base
Source: %{name}-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Patch: %{name}-%{version}-suse.patch Source100: %{name}-rpmlintrc
Patch1: %{name}-%{version}-conf.patch Patch: logrotate-3.7.8-suse.patch
Patch2: %{name}-%{version}-autoext.patch Patch1: logrotate-3.7.8-conf.patch
Patch3: %{name}-%{version}-addextension.patch Patch2: logrotate-3.7.8-autoext.patch
Patch4: %{name}-%{version}-mess_err.patch Patch3: logrotate-3.7.8-addextension.patch
Patch5: %{name}-%{version}-cron-check-for-another-instance.patch Patch4: logrotate-3.7.8-mess_err.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
@ -61,7 +61,6 @@ Authors:
%patch2 %patch2
%patch3 %patch3
%patch4 %patch4
%patch5
%build %build
make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS" WITH_SELINUX=yes make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS" WITH_SELINUX=yes
@ -92,6 +91,7 @@ rm -rf $RPM_BUILD_ROOT
%doc CHANGES %doc CHANGES
%{_sbindir}/logrotate %{_sbindir}/logrotate
%{_mandir}/man8/logrotate.8* %{_mandir}/man8/logrotate.8*
%{_mandir}/man5/logrotate.conf.5*
/etc/cron.daily/logrotate /etc/cron.daily/logrotate
%config /etc/logrotate.conf %config /etc/logrotate.conf
%config(noreplace)/etc/logrotate.d/wtmp %config(noreplace)/etc/logrotate.d/wtmp