Gentoo Archives: gentoo-commits

From: Mikle Kolyada <zlogene@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/logrotate/, app-admin/logrotate/files/
Date: Sat, 25 Jan 2020 17:48:27
Message-Id: 1579974455.47d22ae9aaaba1133f8f503cdb24a8a9f59494b6.zlogene@gentoo
1 commit: 47d22ae9aaaba1133f8f503cdb24a8a9f59494b6
2 Author: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 25 17:47:35 2020 +0000
4 Commit: Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 25 17:47:35 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=47d22ae9
7
8 app-admin/logrotate: fix build with -fno-common
9
10 Closes: https://bugs.gentoo.org/705882
11 Package-Manager: Portage-2.3.84, Repoman-2.3.20
12 Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>
13
14 app-admin/logrotate/files/gcc-fnocommon.patch | 41 +++++++++++++++++++++++++++
15 app-admin/logrotate/logrotate-3.14.0.ebuild | 2 +-
16 app-admin/logrotate/logrotate-3.15.1.ebuild | 3 +-
17 3 files changed, 44 insertions(+), 2 deletions(-)
18
19 diff --git a/app-admin/logrotate/files/gcc-fnocommon.patch b/app-admin/logrotate/files/gcc-fnocommon.patch
20 new file mode 100644
21 index 00000000000..d490c20ce0a
22 --- /dev/null
23 +++ b/app-admin/logrotate/files/gcc-fnocommon.patch
24 @@ -0,0 +1,41 @@
25 +From 908e86191bf062711ea44c922e66d27203e90214 Mon Sep 17 00:00:00 2001
26 +From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@××××××××××.com>
27 +Date: Wed, 8 Jan 2020 10:54:53 +0100
28 +Subject: [PATCH] split declaration and definition of queue variable
29 +
30 +Support compilation with -fno-common flag, which is the default for GCC 10.
31 +
32 +Fixes: #288
33 +Closes #289
34 +---
35 + config.c | 2 ++
36 + logrotate.h | 3 ++-
37 + 2 files changed, 4 insertions(+), 1 deletion(-)
38 +
39 +diff --git a/config.c b/config.c
40 +index 0e9a828..f027c7e 100644
41 +--- a/config.c
42 ++++ b/config.c
43 +@@ -28,6 +28,8 @@
44 + #include "log.h"
45 + #include "logrotate.h"
46 +
47 ++struct logInfoHead logs;
48 ++
49 + #if !defined(GLOB_ABORTED) && defined(GLOB_ABEND)
50 + #define GLOB_ABORTED GLOB_ABEND
51 + #endif
52 +diff --git a/logrotate.h b/logrotate.h
53 +index 1c178da..6c1c2e7 100644
54 +--- a/logrotate.h
55 ++++ b/logrotate.h
56 +@@ -89,7 +89,8 @@ struct logInfo {
57 + TAILQ_ENTRY(logInfo) list;
58 + };
59 +
60 +-TAILQ_HEAD(logInfoHead, logInfo) logs;
61 ++TAILQ_HEAD(logInfoHead, logInfo);
62 ++extern struct logInfoHead logs;
63 +
64 + extern int numLogs;
65 + extern int debug;
66
67 diff --git a/app-admin/logrotate/logrotate-3.14.0.ebuild b/app-admin/logrotate/logrotate-3.14.0.ebuild
68 index 4cb39bde390..729f5629d43 100644
69 --- a/app-admin/logrotate/logrotate-3.14.0.ebuild
70 +++ b/app-admin/logrotate/logrotate-3.14.0.ebuild
71 @@ -34,7 +34,7 @@ move_old_state_file() {
72 elog "See bug #357275"
73 if [[ -e "${OLDSTATEFILE}" ]] ; then
74 elog "Moving your current state file to new location: ${STATEFILE}"
75 - mv -n "${OLDSTATEFILE}" "${STATEFILE}"
76 + mv -n "${OLDSTATEFILE}" "${STATEFILE}" || die
77 fi
78 }
79
80
81 diff --git a/app-admin/logrotate/logrotate-3.15.1.ebuild b/app-admin/logrotate/logrotate-3.15.1.ebuild
82 index 58b95631d2d..eef82c310b8 100644
83 --- a/app-admin/logrotate/logrotate-3.15.1.ebuild
84 +++ b/app-admin/logrotate/logrotate-3.15.1.ebuild
85 @@ -34,7 +34,7 @@ move_old_state_file() {
86 elog "See bug #357275"
87 if [[ -e "${OLDSTATEFILE}" ]] ; then
88 elog "Moving your current state file to new location: ${STATEFILE}"
89 - mv -n "${OLDSTATEFILE}" "${STATEFILE}"
90 + mv -n "${OLDSTATEFILE}" "${STATEFILE}" || die
91 fi
92 }
93
94 @@ -45,6 +45,7 @@ install_cron_file() {
95
96 PATCHES=(
97 "${FILESDIR}/${PN}-3.15.0-ignore-hidden.patch"
98 + "${FILESDIR}/gcc-fnocommon.patch"
99 )
100
101 src_prepare() {