summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikle Kolyada <zlogene@gentoo.org>2020-01-25 20:47:35 +0300
committerMikle Kolyada <zlogene@gentoo.org>2020-01-25 20:47:35 +0300
commit47d22ae9aaaba1133f8f503cdb24a8a9f59494b6 (patch)
treef68ae32d720c9533f8de879e53b8e64214cb9cec /app-admin
parentapp-admin/logrotate: Drop old (diff)
downloadgentoo-47d22ae9aaaba1133f8f503cdb24a8a9f59494b6.tar.gz
gentoo-47d22ae9aaaba1133f8f503cdb24a8a9f59494b6.tar.bz2
gentoo-47d22ae9aaaba1133f8f503cdb24a8a9f59494b6.zip
app-admin/logrotate: fix build with -fno-common
Closes: https://bugs.gentoo.org/705882 Package-Manager: Portage-2.3.84, Repoman-2.3.20 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/logrotate/files/gcc-fnocommon.patch41
-rw-r--r--app-admin/logrotate/logrotate-3.14.0.ebuild2
-rw-r--r--app-admin/logrotate/logrotate-3.15.1.ebuild3
3 files changed, 44 insertions, 2 deletions
diff --git a/app-admin/logrotate/files/gcc-fnocommon.patch b/app-admin/logrotate/files/gcc-fnocommon.patch
new file mode 100644
index 000000000000..d490c20ce0a9
--- /dev/null
+++ b/app-admin/logrotate/files/gcc-fnocommon.patch
@@ -0,0 +1,41 @@
+From 908e86191bf062711ea44c922e66d27203e90214 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
+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
+---
+ 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;
diff --git a/app-admin/logrotate/logrotate-3.14.0.ebuild b/app-admin/logrotate/logrotate-3.14.0.ebuild
index 4cb39bde3900..729f5629d43a 100644
--- a/app-admin/logrotate/logrotate-3.14.0.ebuild
+++ b/app-admin/logrotate/logrotate-3.14.0.ebuild
@@ -34,7 +34,7 @@ move_old_state_file() {
elog "See bug #357275"
if [[ -e "${OLDSTATEFILE}" ]] ; then
elog "Moving your current state file to new location: ${STATEFILE}"
- mv -n "${OLDSTATEFILE}" "${STATEFILE}"
+ mv -n "${OLDSTATEFILE}" "${STATEFILE}" || die
fi
}
diff --git a/app-admin/logrotate/logrotate-3.15.1.ebuild b/app-admin/logrotate/logrotate-3.15.1.ebuild
index 58b95631d2dc..eef82c310b87 100644
--- a/app-admin/logrotate/logrotate-3.15.1.ebuild
+++ b/app-admin/logrotate/logrotate-3.15.1.ebuild
@@ -34,7 +34,7 @@ move_old_state_file() {
elog "See bug #357275"
if [[ -e "${OLDSTATEFILE}" ]] ; then
elog "Moving your current state file to new location: ${STATEFILE}"
- mv -n "${OLDSTATEFILE}" "${STATEFILE}"
+ mv -n "${OLDSTATEFILE}" "${STATEFILE}" || die
fi
}
@@ -45,6 +45,7 @@ install_cron_file() {
PATCHES=(
"${FILESDIR}/${PN}-3.15.0-ignore-hidden.patch"
+ "${FILESDIR}/gcc-fnocommon.patch"
)
src_prepare() {