summaryrefslogtreecommitdiff
path: root/databases/repmgr
diff options
context:
space:
mode:
authorjperkin <jperkin@pkgsrc.org>2017-12-08 15:27:46 +0000
committerjperkin <jperkin@pkgsrc.org>2017-12-08 15:27:46 +0000
commit817914cc26b25d36e1acd8660fb014367bf786e3 (patch)
tree8bdc0fc17a49462b46c5f98e065a694ab6f51929 /databases/repmgr
parent1a7f309c110f1f7c7fe19cc37d772b03950687d5 (diff)
downloadpkgsrc-817914cc26b25d36e1acd8660fb014367bf786e3.tar.gz
Import repmgr-4.0.1 as databases/repmgr
Based on package provided by Matthieu Guegan in joyent/pkgsrc#49 repmgr is a suite of open-source tools to manage replication and failover within a cluster of PostgreSQL servers. It enhances PostgreSQL's built-in replication capabilities with utilities to set up standby servers, monitor replication, and perform administrative tasks such as failover or switchover operations.
Diffstat (limited to 'databases/repmgr')
-rw-r--r--databases/repmgr/DESCR5
-rw-r--r--databases/repmgr/Makefile44
-rw-r--r--databases/repmgr/PLIST9
-rw-r--r--databases/repmgr/distinfo6
-rw-r--r--databases/repmgr/files/smf/manifest.xml35
5 files changed, 99 insertions, 0 deletions
diff --git a/databases/repmgr/DESCR b/databases/repmgr/DESCR
new file mode 100644
index 00000000000..750061dd20b
--- /dev/null
+++ b/databases/repmgr/DESCR
@@ -0,0 +1,5 @@
+repmgr is a suite of open-source tools to manage replication and failover
+within a cluster of PostgreSQL servers. It enhances PostgreSQL's built-in
+replication capabilities with utilities to set up standby servers, monitor
+replication, and perform administrative tasks such as failover or
+switchover operations.
diff --git a/databases/repmgr/Makefile b/databases/repmgr/Makefile
new file mode 100644
index 00000000000..68c9544f048
--- /dev/null
+++ b/databases/repmgr/Makefile
@@ -0,0 +1,44 @@
+# $NetBSD: Makefile,v 1.1 2017/12/08 15:27:46 jperkin Exp $
+
+DISTNAME= repmgr-4.0.1
+PKGNAME= postgresql${PGSQL_VERSION}-${DISTNAME}
+CATEGORIES= databases
+MASTER_SITES= ${MASTER_SITE_GITHUB:=2ndQuadrant/}
+GITHUB_PROJECT= repmgr
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= https://github.com/2ndQuadrant/repmgr/
+COMMENT= The Most Popular Replication Manager for PostgreSQL (Postgres)
+LICENSE= gnu-gpl-v3
+
+DEPENDS+= postgresql${PGSQL_VERSION}-server>=0:../../databases/postgresql${PGSQL_VERSION}-server
+
+GNU_CONFIGURE= yes
+USE_TOOLS+= gmake
+
+SMF_NAME= postgresql-repmgr
+
+BUILD_DEFS+= PGUSER PGGROUP PGHOME
+FILES_SUBST+= PGUSER=${PGUSER} PGGROUP=${PGGROUP} PGHOME=${PGHOME}
+
+DOCDIR= share/doc/repmgr
+EGDIR= share/examples/repmgr
+PKG_SYSCONFSUBDIR= postgresql
+
+INSTALLATION_DIRS+= ${DOCDIR} ${EGDIR}
+
+CONF_FILES_PERMS+= ${EGDIR}/repmgr.conf.sample \
+ ${PKG_SYSCONFDIR}/repmgr.conf \
+ ${REAL_ROOT_USER} ${PGGROUP} 0640
+
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/README.md \
+ ${DESTDIR}${PREFIX}/${DOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/repmgr.conf.sample \
+ ${DESTDIR}${PREFIX}/${EGDIR}
+
+.include "../../mk/pgsql.buildlink3.mk"
+.include "../../mk/readline.buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/databases/repmgr/PLIST b/databases/repmgr/PLIST
new file mode 100644
index 00000000000..0dd97a17bbe
--- /dev/null
+++ b/databases/repmgr/PLIST
@@ -0,0 +1,9 @@
+@comment $NetBSD: PLIST,v 1.1 2017/12/08 15:27:46 jperkin Exp $
+bin/repmgr
+bin/repmgrd
+lib/postgresql/repmgr.so
+share/doc/repmgr/README.md
+share/examples/repmgr/repmgr.conf.sample
+share/postgresql/extension/repmgr--4.0.sql
+share/postgresql/extension/repmgr--unpackaged--4.0.sql
+share/postgresql/extension/repmgr.control
diff --git a/databases/repmgr/distinfo b/databases/repmgr/distinfo
new file mode 100644
index 00000000000..7fad32045cc
--- /dev/null
+++ b/databases/repmgr/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1 2017/12/08 15:27:46 jperkin Exp $
+
+SHA1 (repmgr-4.0.1.tar.gz) = dbf6e5b6985c931ef78455ea04c88deec02fd8bc
+RMD160 (repmgr-4.0.1.tar.gz) = 473a68703ecea079a4a12bb8aeac63804aedcb07
+SHA512 (repmgr-4.0.1.tar.gz) = 73c2af83b6b9cb7b4df1a05aa0211083b3ec6d71f7e2dd1c6cbbcde09bef7c5f5d794037b33ad7dba6ef34fe514f6915c9f38ccfea325aeea76c538b1b4809a9
+Size (repmgr-4.0.1.tar.gz) = 275800 bytes
diff --git a/databases/repmgr/files/smf/manifest.xml b/databases/repmgr/files/smf/manifest.xml
new file mode 100644
index 00000000000..18ee01628d9
--- /dev/null
+++ b/databases/repmgr/files/smf/manifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0"?>
+<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
+<service_bundle type="manifest" name="export">
+ <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1">
+ <create_default_instance enabled="false" />
+ <single_instance />
+ <dependency name="network" grouping="require_all" restart_on="none" type="service">
+ <service_fmri value="svc:/milestone/network:default" />
+ </dependency>
+ <dependency name="filesystem-local" grouping="require_all" restart_on="none" type="service">
+ <service_fmri value="svc:/system/filesystem/local:default" />
+ </dependency>
+ <method_context>
+ <method_credential user="@PGUSER@" group="@PGGROUP@" />
+ <method_environment>
+ <envvar name="PATH" value="@PREFIX@/bin:@PREFIX@/sbin:/usr/bin:/usr/sbin:/bin:/sbin"/>
+ </method_environment>
+ </method_context>
+ <exec_method type="method" name="start" exec="@PREFIX@/bin/repmgrd -f %{config_file} -p %{data}/repmgrd.pid -d" timeout_seconds="300" />
+ <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60"/>
+ <exec_method type="method" name="refresh" exec=":kill -HUP" timeout_seconds="60"/>
+ <property_group name="application" type="application">
+ <propval name="data" type="astring" value="@PGHOME@/data" />
+ <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/repmgr.conf" />
+ </property_group>
+ <template>
+ <common_name>
+ <loctext xml:lang="C">Replication Manager for PostgreSQL clusters</loctext>
+ </common_name>
+ <documentation>
+ <doc_link name="repmgr.org" uri="http://repmgr.org" />
+ </documentation>
+ </template>
+ </service>
+</service_bundle>