From e3491e0b975aa557bb98a057d8ae62abe100db1367065f7416b7339d5b7badf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=C4=9Bzslav=20=C4=8C=C3=AD=C5=BEek?= Date: Mon, 22 Jun 2015 14:28:41 +0000 Subject: [PATCH] Accepting request 313088 from home:kstreitova:branches:Base:System - update to 3.9.1 * 3.9.1 - Fix off-by-one error which can lead to crash when copytruncate is used. * 3.9.0 - Fix crash when using long dateformat. [nmerdan] - Add support for %H dateformat. [czchen] - Fix regression introduced in 3.8.9 when when rotating multiple logs when one of them is missing. - In the debug mode, do not skip the code-path which handles the case when the last rotation does not exist. [Sergey Vidishev] - Show more precise description when "log does not need rotating". - Add new -l option to log verbose output to file. The file is overwritten on every logrotate execution. - Allow rotation of sparse files with copytruncate. * update logrotate-addextension.patch - use spec-cleaner - remove unused PreReq tags OBS-URL: https://build.opensuse.org/request/show/313088 OBS-URL: https://build.opensuse.org/package/show/Base:System/logrotate?expand=0&rev=45 --- logrotate-3.8.9.tar.gz | 3 --- logrotate-3.9.1.tar.gz | 3 +++ logrotate-addextension.patch | 42 ++++++++++++++++++------------------ logrotate.changes | 22 +++++++++++++++++++ logrotate.spec | 22 ++++++++----------- 5 files changed, 55 insertions(+), 37 deletions(-) delete mode 100644 logrotate-3.8.9.tar.gz create mode 100644 logrotate-3.9.1.tar.gz diff --git a/logrotate-3.8.9.tar.gz b/logrotate-3.8.9.tar.gz deleted file mode 100644 index fdcd449..0000000 --- a/logrotate-3.8.9.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:700ed7ce9072a1cca324779a74797dfaefdae37ac50a817134b947c4ded1dfa7 -size 77408 diff --git a/logrotate-3.9.1.tar.gz b/logrotate-3.9.1.tar.gz new file mode 100644 index 0000000..bff68bd --- /dev/null +++ b/logrotate-3.9.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 +size 79061 diff --git a/logrotate-addextension.patch b/logrotate-addextension.patch index 5292db4..e32a21c 100644 --- a/logrotate-addextension.patch +++ b/logrotate-addextension.patch @@ -1,9 +1,9 @@ Index: test/test =================================================================== ---- test/test.orig 2013-10-10 10:43:36.000000000 +0200 -+++ test/test 2013-11-07 21:46:37.112487860 +0100 -@@ -1511,4 +1511,27 @@ - test2.log.1 0 test2 +--- test/test.orig ++++ test/test +@@ -1599,4 +1599,27 @@ test.log 0 + test.log.1 0 zero EOF +# check rotation with extension appended to the filename @@ -32,9 +32,9 @@ Index: test/test cleanup Index: config.c =================================================================== ---- config.c.orig 2013-07-25 14:13:02.780567373 +0200 -+++ config.c 2013-07-25 14:13:04.196582364 +0200 -@@ -530,6 +530,7 @@ int readAllConfigPaths(const char **path +--- config.c.orig ++++ config.c +@@ -637,6 +637,7 @@ int readAllConfigPaths(const char **path .preremove = NULL, .logAddress = NULL, .extension = NULL, @@ -42,7 +42,7 @@ Index: config.c .compress_prog = NULL, .uncompress_prog = NULL, .compress_ext = NULL, -@@ -1217,6 +1218,19 @@ static int readConfigFile(const char *co +@@ -1220,6 +1221,19 @@ static int readConfigFile(const char *co message(MESS_DEBUG, "extension is now %s\n", newlog->extension); @@ -64,9 +64,9 @@ Index: config.c Index: logrotate.8 =================================================================== ---- logrotate.8.orig 2013-07-25 14:13:02.780567373 +0200 -+++ logrotate.8 2013-07-25 14:13:04.196582364 +0200 -@@ -265,6 +265,15 @@ configured to be run by cron daily. You +--- logrotate.8.orig ++++ logrotate.8 +@@ -283,6 +283,15 @@ configured to be run by cron daily. You and run \fIlogrotate\fR hourly to be able to really rotate logs hourly. .TP @@ -84,9 +84,9 @@ Index: logrotate.8 option (\fBifempty\fR is the default). Index: logrotate.c =================================================================== ---- logrotate.c.orig 2013-07-25 14:13:02.781567384 +0200 -+++ logrotate.c 2013-07-25 14:13:04.196582364 +0200 -@@ -964,6 +964,24 @@ int prerotateSingleLog(struct logInfo *l +--- logrotate.c.orig ++++ logrotate.c +@@ -1216,6 +1216,24 @@ int prerotateSingleLog(struct logInfo *l rotNames->baseName = strdup(ourBaseName(log->files[logNum])); @@ -113,9 +113,9 @@ Index: logrotate.c (rotNames-> Index: logrotate.h =================================================================== ---- logrotate.h.orig 2013-07-25 14:13:02.781567384 +0200 -+++ logrotate.h 2013-07-25 14:13:04.196582364 +0200 -@@ -44,6 +44,7 @@ struct logInfo { +--- logrotate.h.orig ++++ logrotate.h +@@ -54,6 +54,7 @@ struct logInfo { char *pre, *post, *first, *last, *preremove; char *logAddress; char *extension; @@ -125,8 +125,8 @@ Index: logrotate.h char *compress_ext; Index: test/test-config.100.in =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ test/test-config.100.in 2013-07-25 14:13:04.196582364 +0200 +--- /dev/null ++++ test/test-config.100.in @@ -0,0 +1,7 @@ +create + @@ -137,8 +137,8 @@ Index: test/test-config.100.in +} Index: test/test-config.101.in =================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ test/test-config.101.in 2013-07-25 14:13:04.196582364 +0200 +--- /dev/null ++++ test/test-config.101.in @@ -0,0 +1,7 @@ +create + diff --git a/logrotate.changes b/logrotate.changes index c0a8778..1d83c44 100644 --- a/logrotate.changes +++ b/logrotate.changes @@ -1,3 +1,25 @@ +------------------------------------------------------------------- +Mon Jun 22 12:53:44 UTC 2015 - kstreitova@suse.com + +- update to 3.9.1 + * 3.9.1 + - Fix off-by-one error which can lead to crash when copytruncate + is used. + * 3.9.0 + - Fix crash when using long dateformat. [nmerdan] + - Add support for %H dateformat. [czchen] + - Fix regression introduced in 3.8.9 when when rotating multiple + logs when one of them is missing. + - In the debug mode, do not skip the code-path which handles the + case when the last rotation does not exist. [Sergey Vidishev] + - Show more precise description when "log does not need rotating". + - Add new -l option to log verbose output to file. The file is + overwritten on every logrotate execution. + - Allow rotation of sparse files with copytruncate. + * update logrotate-addextension.patch +- use spec-cleaner +- remove unused PreReq tags + ------------------------------------------------------------------- Tue May 19 23:42:27 UTC 2015 - crrodriguez@opensuse.org diff --git a/logrotate.spec b/logrotate.spec index 44fc6e5..2bb703c 100644 --- a/logrotate.spec +++ b/logrotate.spec @@ -16,14 +16,13 @@ # -Url: https://fedorahosted.org/releases/l/o/logrotate - Name: logrotate -Version: 3.8.9 +Version: 3.9.1 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 Source100: %{name}-rpmlintrc Source101: %{name}.service @@ -39,9 +38,6 @@ BuildRequires: libacl-devel BuildRequires: libselinux-devel BuildRequires: popt-devel BuildRequires: pkgconfig(systemd) >= 197 -PreReq: %fillup_prereq -PreReq: /bin/mv -PreReq: /bin/rm Requires: xz BuildRoot: %{_tmppath}/%{name}-%{version}-build %{?systemd_requires} @@ -64,12 +60,12 @@ daily cron job. %patch5 -p1 %build -make %{?_smp_mflags} CC="%__cc" RPM_OPT_FLAGS="%{optflags}" \ +make %{?_smp_mflags} CC="gcc" RPM_OPT_FLAGS="%{optflags}" \ WITH_SELINUX=yes \ WITH_ACL=yes %check -make test +make %{?_smp_mflags} test %install make PREFIX=%{buildroot} install @@ -77,8 +73,8 @@ mkdir -p %{buildroot}%{_sysconfdir}/{logrotate.d,cron.daily} mkdir -p %{buildroot}%{_prefix}/sbin 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 %{S:101} %{buildroot}%{_unitdir}/%{name}.service -install -D -m 0644 %{S:102} %{buildroot}%{_unitdir}/%{name}.timer +install -D -m 0644 %{SOURCE101} %{buildroot}%{_unitdir}/%{name}.service +install -D -m 0644 %{SOURCE102} %{buildroot}%{_unitdir}/%{name}.timer %pre #only the timer can be enabled/disabled/masked ! @@ -86,9 +82,9 @@ install -D -m 0644 %{S:102} %{buildroot}%{_unitdir}/%{name}.timer %post %{remove_and_set MAX_DAYS_FOR_LOG_FILES} -if [ -f /etc/logrotate.d/aaa_base ] ; then +if [ -f %{_sysconfdir}/logrotate.d/aaa_base ] ; then echo "Saving old logrotate system configuration" - mv -v /etc/logrotate.d/aaa_base /etc/logrotate.d.aaa_base.save + mv -v %{_sysconfdir}/logrotate.d/aaa_base %{_sysconfdir}/logrotate.d.aaa_base.save fi %service_add_post %{name}.service %{name}.timer @@ -106,7 +102,7 @@ fi %{_mandir}/man8/logrotate.8* %{_mandir}/man5/logrotate.conf.5* %config %{_sysconfdir}/logrotate.conf -%config(noreplace)/etc/logrotate.d/wtmp +%config(noreplace)%{_sysconfdir}/logrotate.d/wtmp %{_unitdir}/%{name}.service %{_unitdir}/%{name}.timer