mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-01-06 02:17:34 -08:00
dev-db/repmgr: Fix build with gcc-10
Closes: https://bugs.gentoo.org/733304 Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
This commit is contained in:
parent
25e440cde2
commit
ac2eef59aa
51
dev-db/repmgr/files/repmgr-5.1.0-fno-common.patch
Normal file
51
dev-db/repmgr/files/repmgr-5.1.0-fno-common.patch
Normal file
@ -0,0 +1,51 @@
|
||||
--- a/repmgr-action-cluster.c
|
||||
+++ b/repmgr-action-cluster.c
|
||||
@@ -26,6 +26,7 @@
|
||||
|
||||
#define SHOW_HEADER_COUNT 9
|
||||
|
||||
+extern t_conninfo_param_list source_conninfo;
|
||||
typedef enum
|
||||
{
|
||||
SHOW_ID = 0,
|
||||
--- a/repmgr-action-node.c
|
||||
+++ b/repmgr-action-node.c
|
||||
@@ -32,6 +32,7 @@
|
||||
#include "repmgr-action-node.h"
|
||||
#include "repmgr-action-standby.h"
|
||||
|
||||
+extern t_conninfo_param_list source_conninfo;
|
||||
static bool copy_file(const char *src_file, const char *dest_file);
|
||||
static void format_archive_dir(PQExpBufferData *archive_dir);
|
||||
static t_server_action parse_server_action(const char *action);
|
||||
--- a/repmgr-action-service.c
|
||||
+++ b/repmgr-action-service.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "repmgr-client-global.h"
|
||||
#include "repmgr-action-service.h"
|
||||
|
||||
+extern t_conninfo_param_list source_conninfo;
|
||||
|
||||
/*
|
||||
* Possibly also show:
|
||||
--- a/repmgr-action-witness.c
|
||||
+++ b/repmgr-action-witness.c
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "repmgr-client-global.h"
|
||||
#include "repmgr-action-witness.h"
|
||||
|
||||
+extern t_conninfo_param_list source_conninfo;
|
||||
static char repmgr_user[MAXLEN];
|
||||
static char repmgr_db[MAXLEN];
|
||||
|
||||
--- a/repmgr-client-global.h
|
||||
+++ b/repmgr-client-global.h
|
||||
@@ -236,7 +236,7 @@ typedef struct ColHeader
|
||||
extern t_runtime_options runtime_options;
|
||||
extern t_configuration_options config_file_options;
|
||||
|
||||
-t_conninfo_param_list source_conninfo;
|
||||
+extern t_conninfo_param_list source_conninfo;
|
||||
|
||||
|
||||
extern bool config_file_required;
|
||||
@ -1,38 +1,44 @@
|
||||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
inherit eutils multilib
|
||||
|
||||
DESCRIPTION="PostgreSQL Replication Manager"
|
||||
HOMEPAGE="http://www.repmgr.org/"
|
||||
SRC_URI="http://www.repmgr.org/download/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-3"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
IUSE=""
|
||||
|
||||
DEPEND=">=dev-db/postgresql-9.3[server,static-libs]"
|
||||
DEPEND="dev-db/postgresql:*[server,static-libs]"
|
||||
RDEPEND="${DEPEND}
|
||||
net-misc/rsync"
|
||||
|
||||
PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
|
||||
|
||||
src_compile() {
|
||||
emake USE_PGXS=1
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" USE_PGXS=1 install
|
||||
export PGSLOT="$(postgresql-config show)"
|
||||
dodoc CREDITS HISTORY COPYRIGHT *.md
|
||||
|
||||
local PGSLOT="$(postgresql-config show)"
|
||||
einfo "PGSLOT: ${PGSLOT}"
|
||||
PGBASEDIR=/usr/$(get_libdir)/postgresql-${PGSLOT}
|
||||
PGBINDIR=${PGBASEDIR}/bin/
|
||||
PGCONTRIB=/usr/share/postgresql-${PGSLOT}/contrib/
|
||||
dodir $PGCONTRIB $PGBINDIR
|
||||
dosym $PGBINDIR/repmgr /usr/bin/repmgr${PGSLOT//.}
|
||||
dosym $PGBINDIR/repmgrd /usr/bin/repmgrd${PGSLOT//.}
|
||||
dodoc CREDITS HISTORY COPYRIGHT *.md
|
||||
|
||||
dodir /usr/share/postgresql-${PGSLOT}/contrib
|
||||
dodir /usr/$(get_libdir)/postgresql-${PGSLOT}
|
||||
|
||||
local repmgr="/usr/bin/repmgr${PGSLOT//.}"
|
||||
local repmgrd="/usr/bin/repmgrd${PGSLOT//.}"
|
||||
dosym ../$(get_libdir)/postgresql-${PGSLOT}/bin/repmgr ${repmgr}
|
||||
dosym ../$(get_libdir)/postgresql-${PGSLOT}/bin/repmgrd ${repmgrd}
|
||||
|
||||
insinto /etc
|
||||
newins repmgr.conf.sample repmgr.conf
|
||||
|
||||
fowners postgres:postgres /etc/repmgr.conf
|
||||
ewarn "Remember to modify /etc/repmgr.conf"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user