From 4495f5c112559f1050a8cae702b6a41ca1df5cd892e08d01cc32f741b8dece3f Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 25 Jul 2013 15:40:16 +0000 Subject: [PATCH] Accepting request 184333 from home:vitezslav_cizek:branches:Base:System - update to 3.8.5 * dropped logrotate-3.7.9-compressoptions.patch (upstream) * refreshed other patches Changelog: - Improved rotation during daylight saving time and between timezone changes. - Fixed ACL setting problem caused by ext3 erroneously reporting ENOSYS instead of ENOSUP. - Do not continue with rotation if state file is corrupted. - Make logrotate.status creation atomic. - Allow "hourly" rotation. See manpage for more information. - Use "/bin/echo" in tests. Fixes tests execution in Dash. - Do no try to parse config files bigger than 16MB. - Improved manpage consistency and formatting. - Fix race condition between acl_set_fd() and fchmod(). - Added --version command line option - Disable ACL tests if logrotate is not compiled WITH_ACL support or if ACLs are not supported by the system running tests - Disable SELinux tests if logrotate is not compiled WITH_SELINUX support or if SELinux is not supported by the system running tests - Fixed bug which prevented skipping particular log file config if the config contained errors. - Fixed skipping of configs containing firstaction/lastaction scripts with '}' character in case of error before these scripts. - Support also 'K' unit for *size directives. - Added preremove option to let admin to do something with the old logs before they are removed by logrotate. - Fixed possible loop in tabooext parsing. - Move code to set SELinux context before compressLogFile calls to create compressed log files with the proper context. OBS-URL: https://build.opensuse.org/request/show/184333 OBS-URL: https://build.opensuse.org/package/show/Base:System/logrotate?expand=0&rev=24 --- logrotate-3.7.8-addextension.patch | 68 ++++++++++++++------------- logrotate-3.7.8-autoext.patch | 46 ++++++++++++++---- logrotate-3.7.8-mess_err.patch | 8 ++-- logrotate-3.7.9-compressoptions.patch | 15 ------ logrotate-3.8.1.tar.gz | 3 -- logrotate-3.8.5.tar.gz | 3 ++ logrotate.changes | 59 +++++++++++++++++++++++ logrotate.spec | 5 +- 8 files changed, 138 insertions(+), 69 deletions(-) delete mode 100644 logrotate-3.7.9-compressoptions.patch delete mode 100644 logrotate-3.8.1.tar.gz create mode 100644 logrotate-3.8.5.tar.gz diff --git a/logrotate-3.7.8-addextension.patch b/logrotate-3.7.8-addextension.patch index da1a750..efc4aa2 100644 --- a/logrotate-3.7.8-addextension.patch +++ b/logrotate-3.7.8-addextension.patch @@ -1,16 +1,16 @@ Index: test/test =================================================================== ---- test/test.orig -+++ test/test -@@ -427,4 +427,26 @@ test.log 0 - test.log.1 0 zero - EOF +--- test/test.orig 2013-07-25 14:13:04.195582354 +0200 ++++ test/test 2013-07-25 14:14:27.468464841 +0200 +@@ -1285,6 +1285,28 @@ echo "Does not have GNU Date, skipping p + fi + +# check rotation with extension appended to the filename -+cleanup 17 ++cleanup 100 + -+preptest test.log 17 1 0 -+$RLR test-config.17 --force ++preptest test.log 100 1 0 ++$RLR test-config.100 --force + +checkoutput <extension); @@ -63,10 +65,10 @@ Index: config.c Index: logrotate.8 =================================================================== ---- logrotate.8.orig -+++ logrotate.8 -@@ -248,6 +248,15 @@ appears after \fIext\fR. For example you - and want to rotate it to mylog.1.foo.gz instead of mylog.foo.1.gz. +--- 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 + and run \fIlogrotate\fR hourly to be able to really rotate logs hourly. .TP +\fBaddextension \fIext\fR @@ -83,9 +85,9 @@ Index: logrotate.8 option (\fBifempty\fR is the default). Index: logrotate.c =================================================================== ---- logrotate.c.orig -+++ logrotate.c -@@ -867,6 +867,24 @@ int prerotateSingleLog(struct logInfo *l +--- 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 rotNames->baseName = strdup(ourBaseName(log->files[logNum])); @@ -112,20 +114,20 @@ Index: logrotate.c (rotNames-> Index: logrotate.h =================================================================== ---- logrotate.h.orig -+++ 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 { - char *pre, *post, *first, *last; + char *pre, *post, *first, *last, *preremove; char *logAddress; char *extension; + char *addextension; char *compress_prog; char *uncompress_prog; char *compress_ext; -Index: test/test-config.17.in +Index: test/test-config.100.in =================================================================== ---- /dev/null -+++ test/test-config.17.in +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ test/test-config.100.in 2013-07-25 14:13:04.196582364 +0200 @@ -0,0 +1,7 @@ +create + @@ -134,10 +136,10 @@ Index: test/test-config.17.in + rotate 1 + addextension .newext +} -Index: test/test-config.18.in +Index: test/test-config.101.in =================================================================== ---- /dev/null -+++ test/test-config.18.in +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ test/test-config.101.in 2013-07-25 14:13:04.196582364 +0200 @@ -0,0 +1,7 @@ +create + diff --git a/logrotate-3.7.8-autoext.patch b/logrotate-3.7.8-autoext.patch index 6dde180..e32a57c 100644 --- a/logrotate-3.7.8-autoext.patch +++ b/logrotate-3.7.8-autoext.patch @@ -1,8 +1,8 @@ Index: config.c =================================================================== ---- config.c.orig -+++ config.c -@@ -583,6 +583,7 @@ static int readConfigFile(const char *co +--- config.c.orig 2013-06-10 14:02:36.000000000 +0200 ++++ config.c 2013-07-25 15:42:42.465060702 +0200 +@@ -594,6 +594,7 @@ static int readConfigFile(const char *co char **scriptDest = NULL; struct logInfo *newlog = defConfig; char *start, *chptr; @@ -10,11 +10,12 @@ Index: config.c char *dirName; struct group *group; struct passwd *pw = NULL; -@@ -1205,6 +1206,18 @@ static int readConfigFile(const char *co +@@ -1245,6 +1246,20 @@ static int readConfigFile(const char *co message(MESS_DEBUG, "compress_prog is now %s\n", newlog->compress_prog); + compresscmd_base=strdup(basename(newlog->compress_prog)); ++ fprintf(stdout, "compress_ext is %s\n", newlog->compress_prog); + i=0; /* have to check whether we may do this! */ + /* we check whether we changed the compress_cmd. In case we use the apropriate extension + as listed in compress_cmd_list */ @@ -22,6 +23,7 @@ Index: config.c + if (0==strcmp(compress_cmd_list[i][0], compresscmd_base)){ + newlog->compress_ext=strdup((char *)compress_cmd_list[i][1]); + message(MESS_DEBUG, "compress_ext was changed to %s\n", newlog->compress_ext); ++ fprintf(stdout, "compress_ext was changed to %s\n", newlog->compress_ext); + i=-10; /* terminate loop! */ + } + i++; @@ -31,9 +33,9 @@ Index: config.c Index: logrotate.c =================================================================== ---- logrotate.c.orig -+++ logrotate.c -@@ -76,6 +76,16 @@ unsigned int hashSize; +--- 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; int numLogs = 0; int debug = 0; char *mailCommand = DEFAULT_MAIL_COMMAND; @@ -52,8 +54,8 @@ Index: logrotate.c static gid_t save_egid; Index: logrotate.h =================================================================== ---- logrotate.h.orig -+++ 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; extern int numLogs; extern int debug; @@ -62,5 +64,29 @@ Index: logrotate.h +extern const char * compress_cmd_list[][2]; + int readAllConfigPaths(const char **paths); - #if !defined(asprintf) + #if !defined(asprintf) && !defined(_FORTIFY_SOURCE) 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 <finalName, compext); if (!stat(destFile, &fst_buf)) { - message(MESS_DEBUG, + message(MESS_ERROR, diff --git a/logrotate-3.7.9-compressoptions.patch b/logrotate-3.7.9-compressoptions.patch deleted file mode 100644 index 5f1d86a..0000000 --- a/logrotate-3.7.9-compressoptions.patch +++ /dev/null @@ -1,15 +0,0 @@ -Index: logrotate-3.8.1/config.c -=================================================================== ---- logrotate-3.8.1.orig/config.c -+++ logrotate-3.8.1/config.c -@@ -192,7 +192,9 @@ static char *readPath(const char *config - chptr = start; - - while( (len = mbrtowc(&pwc, chptr, strlen(chptr), NULL)) != 0 ) { -- if( len == (size_t)(-1) || len == (size_t)(-2) || !iswprint(pwc) || iswblank(pwc) ) { -+ if( len == (size_t)(-1) || len == (size_t)(-2) || !iswprint(pwc) || -+ /* allow more compress options separated by whitespace */ -+ ( strcmp(key, "compressoptions") && iswblank(pwc) ) ) { - message(MESS_ERROR, "%s:%d bad %s path %s\n", - configFile, lineNum, key, start); - return NULL; diff --git a/logrotate-3.8.1.tar.gz b/logrotate-3.8.1.tar.gz deleted file mode 100644 index d9e8a59..0000000 --- a/logrotate-3.8.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c12471e70ae8bc923bd5c4f25e8fd6483b68c6301f3cd79f7cfe37bc5b370169 -size 48827 diff --git a/logrotate-3.8.5.tar.gz b/logrotate-3.8.5.tar.gz new file mode 100644 index 0000000..8b9bb75 --- /dev/null +++ b/logrotate-3.8.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b695bffeb54ed6f6c9a560780231a55c3548a24b96cb06f33b84f8cea600079 +size 57818 diff --git a/logrotate.changes b/logrotate.changes index 5cf7409..2e9e45c 100644 --- a/logrotate.changes +++ b/logrotate.changes @@ -1,3 +1,62 @@ +------------------------------------------------------------------- +Thu Jul 25 14:19:48 UTC 2013 - vcizek@suse.com + +- update to 3.8.5 + * dropped logrotate-3.7.9-compressoptions.patch (upstream) + * refreshed other patches + Changelog: + - Improved rotation during daylight saving time and between timezone + changes. + - Fixed ACL setting problem caused by ext3 erroneously reporting ENOSYS + instead of ENOSUP. + - Do not continue with rotation if state file is corrupted. + - Make logrotate.status creation atomic. + - Allow "hourly" rotation. See manpage for more information. + - Use "/bin/echo" in tests. Fixes tests execution in Dash. + - Do no try to parse config files bigger than 16MB. + - Improved manpage consistency and formatting. + - Fix race condition between acl_set_fd() and fchmod(). + - Added --version command line option + - Disable ACL tests if logrotate is not compiled WITH_ACL support or if + ACLs are not supported by the system running tests + - Disable SELinux tests if logrotate is not compiled WITH_SELINUX support + or if SELinux is not supported by the system running tests + - Fixed bug which prevented skipping particular log file config + if the config contained errors. + - Fixed skipping of configs containing firstaction/lastaction scripts + with '}' character in case of error before these scripts. + - Support also 'K' unit for *size directives. + - Added preremove option to let admin to do something with the old logs + before they are removed by logrotate. + - Fixed possible loop in tabooext parsing. + - Move code to set SELinux context before compressLogFile calls to create + compressed log files with the proper context. + - Call prerotate/postrotate script only for really rotated files in + nosharedscripts mode (as stated in man page). + - Fixed setting "size" bigger than 4GB on 32bit architectures + - Do not overwrite mode set by "create" option when using ACL. "create" + directive is now not mixed up with ACLs. If you use "create" in config + file and log file has some ACLs set, ACLs are not kept and are + overwritten by the mode set in "create" directive. + - Mode argument in "create" directive can be omitted. Only owner and group + is set in this case. Check man page for more info. + - show error and ignore config if '{' is not present after log files + declaration + - support whitespaces in compressoptions directive + - support for tilde expansion in config files + - 'su' directive does not affect script execution - scripts + are executed as a root if 'su' directive is present + - fixed mail sending for 'mailfirst', 'dateext' and 'delaycompress' + combination + - do not use gzip/gunzip from /usr/local on Solaris + - add O_NOFOLLOW when opening files as safeguard against symlink tricks. + Symlinks rotation is now officially unsupported. It didn't work + as expected in the past anyway. + - do not run external programs with uid != euid + - fixed potential bad-free when ACL is used + - Do not include alloca.h on NetBSD, since alloca() is declared in + stdlib.h there + ------------------------------------------------------------------- Tue Apr 16 08:23:18 UTC 2013 - mmeister@suse.com diff --git a/logrotate.spec b/logrotate.spec index cf18cbf..bc88ec6 100644 --- a/logrotate.spec +++ b/logrotate.spec @@ -19,7 +19,7 @@ Url: https://fedorahosted.org/releases/l/o/logrotate Name: logrotate -Version: 3.8.1 +Version: 3.8.5 Release: 0 Summary: Rotate, compress, remove, and mail system log files License: GPL-2.0+ @@ -31,8 +31,6 @@ Patch1: logrotate-3.7.8-conf.patch Patch2: logrotate-3.7.8-autoext.patch Patch3: logrotate-3.7.8-addextension.patch Patch4: logrotate-3.7.8-mess_err.patch -# PATCH-FIX-UPSTREAM allow separated compressoptions (bnc#711780) -Patch8: logrotate-3.7.9-compressoptions.patch BuildRequires: libselinux-devel BuildRequires: popt-devel PreReq: %fillup_prereq @@ -57,7 +55,6 @@ daily cron job. %patch2 %patch3 %patch4 -%patch8 -p1 %build make %{?_smp_mflags} CC="%__cc" RPM_OPT_FLAGS="%{optflags}" WITH_SELINUX=yes