diff --git a/1001-logrotate-3.15.1-gcc-10-build-fix.patch b/1001-logrotate-3.15.1-gcc-10-build-fix.patch new file mode 100644 index 0000000000000000000000000000000000000000..e3185fdce3185d0f6f4f1eeec92cfdf2eee0355c --- /dev/null +++ b/1001-logrotate-3.15.1-gcc-10-build-fix.patch @@ -0,0 +1,47 @@ +From d515f9a31fb656d31bdbcf8f6700d464e5af9645 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= +Date: Wed, 8 Jan 2020 10:54:53 +0100 +Subject: [PATCH] split declaration and definition of queue variable + +Support compilation with -fno-common flag, which is the default for GCC 10. + +Fixes: #288 +Closes #289 + +Upstream-commit: 908e86191bf062711ea44c922e66d27203e90214 +Signed-off-by: Kamil Dudka +--- + config.c | 2 ++ + logrotate.h | 3 ++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/config.c b/config.c +index 0e9a828..f027c7e 100644 +--- a/config.c ++++ b/config.c +@@ -28,6 +28,8 @@ + #include "log.h" + #include "logrotate.h" + ++struct logInfoHead logs; ++ + #if !defined(GLOB_ABORTED) && defined(GLOB_ABEND) + #define GLOB_ABORTED GLOB_ABEND + #endif +diff --git a/logrotate.h b/logrotate.h +index 1c178da..6c1c2e7 100644 +--- a/logrotate.h ++++ b/logrotate.h +@@ -89,7 +89,8 @@ struct logInfo { + TAILQ_ENTRY(logInfo) list; + }; + +-TAILQ_HEAD(logInfoHead, logInfo) logs; ++TAILQ_HEAD(logInfoHead, logInfo); ++extern struct logInfoHead logs; + + extern int numLogs; + extern int debug; +-- +2.21.1 + diff --git a/logrotate.spec b/logrotate.spec index 51fec390029e096dde0d4ea282368ea3fdeb593e..21a0c9a6f59624e791f517287561222219ecdb00 100644 --- a/logrotate.spec +++ b/logrotate.spec @@ -1,7 +1,8 @@ +%define anolis_release .0.1 Summary: Rotates, compresses, removes and mails system log files Name: logrotate Version: 3.14.0 -Release: 4%{?dist} +Release: 4%{anolis_release}%{?dist} License: GPLv2+ Url: https://github.com/logrotate/logrotate Source: https://github.com/logrotate/logrotate/releases/download/%{version}/logrotate-%{version}.tar.xz @@ -28,6 +29,11 @@ Patch3: 0003-logrotate-3.14.0-broken-symlink.patch # logrotate.8: encourage admins to use the `su` directive (#1759770) Patch4: 0004-logrotate-3.14.0-man-page-su.patch +# Begin: Anolis customized patches +# backport patch from fc33 +Patch1001: 1001-logrotate-3.15.1-gcc-10-build-fix.patch +# End: Anolis customized patches + %description The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files. Logrotate @@ -113,6 +119,9 @@ fi %config(noreplace) %{_sysconfdir}/rwtab.d/logrotate %changelog +* Fri Dec 10 2021 Weitao Zhou 3.14.0-4.0.1 +- Fix gcc10 -fno-common compile issue for compatible with gcc10 build + * Wed May 06 2020 Kamil Dudka - 3.14.0-4 - logrotate.8: encourage admins to use the `su` directive (#1759770) - do not abort globbing on broken symlink (#1723265)