From fcf68b3a565971e948389d5123f4234f8d3fda6a Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 16 Feb 2016 10:02:45 +0100 Subject: [PATCH] Fix code indentation to get it build with gcc6. --- logrotate-3.9.1-fix-indents.patch | 20 ++++++++++++++++++++ logrotate.spec | 13 ++++++++++--- 2 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 logrotate-3.9.1-fix-indents.patch diff --git a/logrotate-3.9.1-fix-indents.patch b/logrotate-3.9.1-fix-indents.patch new file mode 100644 index 0000000..c771a40 --- /dev/null +++ b/logrotate-3.9.1-fix-indents.patch @@ -0,0 +1,20 @@ +--- logrotate-3.9.2/logrotate.c.orig 2016-02-16 09:54:23.360000000 +0100 ++++ logrotate-3.9.2/logrotate.c 2016-02-16 09:54:26.328000000 +0100 +@@ -1784,7 +1784,7 @@ + if (!state->doRotate) + return 0; + +- if (!hasErrors && log->flags & LOG_FLAG_TMPFILENAME) { ++ if (!hasErrors && log->flags & LOG_FLAG_TMPFILENAME) { + char *tmpFilename = NULL; + if (asprintf(&tmpFilename, "%s%s", log->files[logNum], ".tmp") < 0) { + message(MESS_FATAL, "could not allocate tmpFilename memory\n"); +@@ -1821,7 +1821,7 @@ + hasErrors = removeLogFile(rotNames->disposeName, log); + + #ifdef WITH_SELINUX +- if (selinux_enabled) { ++ if (selinux_enabled) { + setfscreatecon_raw(prev_context); + freecon(prev_context); + prev_context = NULL; diff --git a/logrotate.spec b/logrotate.spec index e5f0090..8ca9819 100644 --- a/logrotate.spec +++ b/logrotate.spec @@ -1,7 +1,7 @@ Summary: Rotates, compresses, removes and mails system log files Name: logrotate Version: 3.9.2 -Release: 2%{?dist} +Release: 3%{?dist} License: GPL+ Group: System Environment/Base Url: https://fedorahosted.org/logrotate/ @@ -9,6 +9,8 @@ Source: https://github.com/logrotate/logrotate/archive/logrotate-%{version}.tar. Source1: rwtab # Change the location of status file Patch0: logrotate-3.9.1-statusfile.patch +# Fix indents which ends in warnings which ends in errors with gcc6 +Patch1: logrotate-3.9.1-fix-indents.patch Requires: coreutils >= 5.92 popt BuildRequires: libselinux-devel popt-devel libacl-devel acl @@ -29,6 +31,7 @@ log files on your system. %prep %setup -q %patch0 -p1 -b .statusfile +%patch1 -p1 %build export CFLAGS="$RPM_OPT_FLAGS" @@ -83,6 +86,10 @@ rm -rf $RPM_BUILD_ROOT %config(noreplace) %{_sysconfdir}/rwtab.d/logrotate %changelog +* Tue Feb 16 2016 Marcin Juszkiewicz - 3.9.2-3 +- Fix code indentation to get it build with gcc6. +- Fixed dates in changelog. + * Thu Feb 04 2016 Fedora Release Engineering - 3.9.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild @@ -159,7 +166,7 @@ rm -rf $RPM_BUILD_ROOT * Mon Aug 08 2011 Jan Kaluza 3.8.0-5 - fix #723797 - added maxsize option -* Wed Aug 01 2011 Jan Kaluza 3.8.0-4 +* Mon Aug 01 2011 Jan Kaluza 3.8.0-4 - fix #726980 - work properly when acl_get_fd is supported, but acl_set_fd is not @@ -484,7 +491,7 @@ rm -rf $RPM_BUILD_ROOT * Thu Jul 24 2003 Elliot Lee 3.6.10-1 - Fix #100546, change selinux port. -* Wed Jul 18 2003 Dan Walsh 3.6.9-2 +* Fri Jul 18 2003 Dan Walsh 3.6.9-2 - Port to SELinux 2.5 * Wed Jul 09 2003 Elliot Lee 3.6.9-1