diff --git a/logrotate-3.10.0.tar.xz b/logrotate-3.10.0.tar.xz new file mode 100644 index 0000000..c16f1b1 --- /dev/null +++ b/logrotate-3.10.0.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:15a5d4db53cec8f8e0561e88a0d8ee737a45dee1aba280c6e75f92950ca9306c +size 127492 diff --git a/logrotate-3.7.8-mess_err.patch b/logrotate-3.7.8-mess_err.patch deleted file mode 100644 index 97d572e..0000000 --- a/logrotate-3.7.8-mess_err.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: logrotate.c -=================================================================== ---- logrotate.c.orig 2013-07-25 14:52:57.493518089 +0200 -+++ logrotate.c 2013-07-25 14:52:57.499518158 +0200 -@@ -1327,7 +1327,7 @@ int prerotateSingleLog(struct logInfo *l - message(MESS_FATAL, "could not allocate destFile memory\n"); - } - if (!stat(destFile, &fst_buf)) { -- message(MESS_DEBUG, -+ message(MESS_ERROR, - "destination %s already exists, skipping rotation\n", - rotNames->firstRotated); - hasErrors = 1; diff --git a/logrotate-3.7.8-suse.patch b/logrotate-3.7.8-suse.patch index c10bf73..30b2201 100644 --- a/logrotate-3.7.8-suse.patch +++ b/logrotate-3.7.8-suse.patch @@ -1,16 +1,3 @@ -Index: Makefile -=================================================================== ---- Makefile.orig -+++ Makefile -@@ -81,7 +81,7 @@ ifneq ($(STATEFILE),) - endif - - BINDIR = $(BASEDIR)/sbin --MANDIR ?= $(BASEDIR)/man -+MANDIR ?= $(BASEDIR)/share/man - - #-------------------------------------------------------------------------- - Index: examples/logrotate.cron =================================================================== --- examples/logrotate.cron.orig diff --git a/logrotate-3.9.1.tar.gz b/logrotate-3.9.1.tar.gz deleted file mode 100644 index bff68bd..0000000 --- a/logrotate-3.9.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 -size 79061 diff --git a/logrotate-addextension.patch b/logrotate-addextension.patch index e32a21c..bab3bc5 100644 --- a/logrotate-addextension.patch +++ b/logrotate-addextension.patch @@ -2,9 +2,9 @@ Index: test/test =================================================================== --- test/test.orig +++ test/test -@@ -1599,4 +1599,27 @@ test.log 0 - test.log.1 0 zero - EOF +@@ -1746,5 +1746,28 @@ EOF + rm -rf testdir adir + rm -rf testdir bdir +# check rotation with extension appended to the filename +cleanup 100 @@ -30,6 +30,7 @@ Index: test/test + + cleanup + Index: config.c =================================================================== --- config.c.orig @@ -42,7 +43,7 @@ Index: config.c .compress_prog = NULL, .uncompress_prog = NULL, .compress_ext = NULL, -@@ -1220,6 +1221,19 @@ static int readConfigFile(const char *co +@@ -1224,6 +1225,19 @@ static int readConfigFile(const char *co message(MESS_DEBUG, "extension is now %s\n", newlog->extension); @@ -66,7 +67,7 @@ Index: logrotate.8 =================================================================== --- logrotate.8.orig +++ logrotate.8 -@@ -283,6 +283,15 @@ configured to be run by cron daily. You +@@ -284,6 +284,15 @@ configured to be run by cron daily. You and run \fIlogrotate\fR hourly to be able to really rotate logs hourly. .TP @@ -86,7 +87,7 @@ Index: logrotate.c =================================================================== --- logrotate.c.orig +++ logrotate.c -@@ -1216,6 +1216,24 @@ int prerotateSingleLog(struct logInfo *l +@@ -1219,6 +1219,24 @@ int prerotateSingleLog(struct logInfo *l rotNames->baseName = strdup(ourBaseName(log->files[logNum])); diff --git a/logrotate-autoext.patch b/logrotate-autoext.patch index 6cd37a8..bffd6d2 100644 --- a/logrotate-autoext.patch +++ b/logrotate-autoext.patch @@ -1,8 +1,8 @@ Index: config.c =================================================================== ---- config.c.orig 2013-06-10 14:02:36.000000000 +0200 -+++ config.c 2013-07-25 15:42:42.465060702 +0200 -@@ -712,6 +712,7 @@ +--- config.c.orig ++++ config.c +@@ -716,6 +716,7 @@ static int readConfigFile(const char *co char **scriptDest = NULL; struct logInfo *newlog = defConfig; char *start, *chptr; @@ -10,7 +10,7 @@ Index: config.c char *dirName; struct passwd *pw = NULL; int rc; -@@ -1245,6 +1246,20 @@ static int readConfigFile(const char *co +@@ -1242,6 +1243,20 @@ static int readConfigFile(const char *co message(MESS_DEBUG, "compress_prog is now %s\n", newlog->compress_prog); @@ -33,9 +33,9 @@ Index: config.c Index: logrotate.c =================================================================== ---- logrotate.c.orig 2013-06-10 14:02:36.000000000 +0200 -+++ logrotate.c 2013-07-25 15:30:36.687434418 +0200 -@@ -85,6 +85,16 @@ unsigned int hashSize; +--- logrotate.c.orig ++++ logrotate.c +@@ -104,6 +104,16 @@ unsigned int hashSize; int numLogs = 0; int debug = 0; char *mailCommand = DEFAULT_MAIL_COMMAND; @@ -54,9 +54,9 @@ Index: logrotate.c static gid_t save_egid; Index: logrotate.h =================================================================== ---- logrotate.h.orig 2013-06-10 14:02:36.000000000 +0200 -+++ logrotate.h 2013-07-25 15:30:36.687434418 +0200 -@@ -66,6 +66,9 @@ TAILQ_HEAD(logInfoHead, logInfo) logs; +--- logrotate.h.orig ++++ logrotate.h +@@ -79,6 +79,9 @@ TAILQ_HEAD(logInfoHead, logInfo) logs; extern int numLogs; extern int debug; @@ -68,9 +68,9 @@ Index: logrotate.h int asprintf(char **string_ptr, const char *format, ...); Index: test/test =================================================================== ---- test/test.orig 2013-07-25 15:30:36.687434418 +0200 -+++ test/test 2013-07-25 16:16:11.992044805 +0200 -@@ -536,19 +536,6 @@ checkoutput </dev/null|grep $PWD/test.log.1 2>/dev/null >/dev/null +- if [ $? != 0 ]; then +- echo "syslog message not found" +- exit 1 +- fi +-fi - cleanup 19 diff --git a/logrotate-fix-test62_with_bash-4.4.patch b/logrotate-fix-test62_with_bash-4.4.patch index 09935f2..4008778 100644 --- a/logrotate-fix-test62_with_bash-4.4.patch +++ b/logrotate-fix-test62_with_bash-4.4.patch @@ -14,12 +14,12 @@ a variable. The result is the same. test/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -Index: logrotate-3.9.1/test/test +Index: logrotate-3.10.0/test/test =================================================================== ---- logrotate-3.9.1.orig/test/test -+++ logrotate-3.9.1/test/test -@@ -167,7 +167,7 @@ checkoutput() { - if [ -n "$co_compressed" -a "$co_compressed" != 0 ]; then +--- logrotate-3.10.0.orig/test/test ++++ logrotate-3.10.0/test/test +@@ -183,7 +183,7 @@ checkoutput() { + if [ -n "$co_compressed" ] && [ "$co_compressed" != 0 ]; then contents=`gunzip -c $file` else - contents=`cat $file` diff --git a/logrotate.changes b/logrotate.changes index edfc120..83973a8 100644 --- a/logrotate.changes +++ b/logrotate.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Wed Oct 5 11:38:13 UTC 2016 - tchvatal@suse.com + +- Version update to 3.10.0: + * Update url to point to github +- Remove upstreamed patch: + * logrotate-3.7.8-mess_err.patch +- Rebase patches: + * logrotate-3.7.8-suse.patch + * logrotate-addextension.patch + * logrotate-autoext.patch + * logrotate-fix-test62_with_bash-4.4.patch + ------------------------------------------------------------------- Mon Oct 3 14:46:34 UTC 2016 - dimstar@opensuse.org diff --git a/logrotate.spec b/logrotate.spec index edc2fff..a487aa3 100644 --- a/logrotate.spec +++ b/logrotate.spec @@ -17,13 +17,13 @@ Name: logrotate -Version: 3.9.1 +Version: 3.10.0 Release: 0 Summary: Rotate, compress, remove, and mail system log files License: GPL-2.0+ Group: System/Base -Url: https://fedorahosted.org/releases/l/o/logrotate -Source: https://fedorahosted.org/releases/l/o/%{name}/%{name}-%{version}.tar.gz +Url: https://github.com/logrotate/logrotate +Source0: https://github.com/logrotate/logrotate/releases/download/%{version}/logrotate-%{version}.tar.xz Source100: %{name}-rpmlintrc Source101: %{name}.service Source102: %{name}.timer @@ -31,13 +31,13 @@ Patch0: logrotate-3.7.8-suse.patch Patch1: logrotate-conf.patch Patch2: logrotate-autoext.patch Patch3: logrotate-addextension.patch -Patch4: logrotate-3.7.8-mess_err.patch Patch5: logrotate-manpage_config_clarification.patch # PATCH-FIX-UPSTREAM logrotate-fix-test62_with_bash-4.4.patch gh#logrotate/logrotate#66 dimstar@opensuse.org -- Fix test suite in combination with bash 4.4 Patch6: logrotate-fix-test62_with_bash-4.4.patch BuildRequires: acl BuildRequires: libacl-devel BuildRequires: libselinux-devel +BuildRequires: pkgconfig BuildRequires: popt-devel BuildRequires: pkgconfig(systemd) >= 197 Requires: xz @@ -58,26 +58,24 @@ daily cron job. %patch1 %patch2 %patch3 -%patch4 %patch5 -p1 %patch6 -p1 %build -make %{?_smp_mflags} CC="gcc" RPM_OPT_FLAGS="%{optflags}" \ - WITH_SELINUX=yes \ - WITH_ACL=yes +%configure +make %{?_smp_mflags} %check -make %{?_smp_mflags} test +make %{?_smp_mflags} check %install -make PREFIX=%{buildroot} install -mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,cron.daily} -mkdir -p %{buildroot}%{_prefix}/sbin +%make_install +mkdir -p %{buildroot}%{_sysconfdir}/logrotate.d install -m 644 examples/logrotate-default %{buildroot}%{_sysconfdir}/logrotate.conf install -m 644 examples/logrotate.wtmp %{buildroot}%{_sysconfdir}/logrotate.d/wtmp install -D -m 0644 %{SOURCE101} %{buildroot}%{_unitdir}/%{name}.service install -D -m 0644 %{SOURCE102} %{buildroot}%{_unitdir}/%{name}.timer +ln -s service %{buildroot}%{_sbindir}/rc%{name} %pre #only the timer can be enabled/disabled/masked ! @@ -102,6 +100,7 @@ fi %defattr(-,root,root) %doc CHANGES COPYING %{_sbindir}/logrotate +%{_sbindir}/rc%{name} %{_mandir}/man8/logrotate.8* %{_mandir}/man5/logrotate.conf.5* %config %{_sysconfdir}/logrotate.conf