Skip to content

Commit

Permalink
Import repmgr-4.0.1 as databases/repmgr
Browse files Browse the repository at this point in the history
Based on package provided by Matthieu Guegan in TritonDataCenter#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.
  • Loading branch information
jperkin committed Dec 8, 2017
1 parent bd7204b commit dc09a78
Show file tree
Hide file tree
Showing 5 changed files with 99 additions and 0 deletions.
5 changes: 5 additions & 0 deletions databases/repmgr/DESCR
Original file line number Diff line number Diff line change
@@ -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.
44 changes: 44 additions & 0 deletions databases/repmgr/Makefile
Original file line number Diff line number Diff line change
@@ -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"
9 changes: 9 additions & 0 deletions databases/repmgr/PLIST
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions databases/repmgr/distinfo
Original file line number Diff line number Diff line change
@@ -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
35 changes: 35 additions & 0 deletions databases/repmgr/files/smf/manifest.xml
Original file line number Diff line number Diff line change
@@ -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>

0 comments on commit dc09a78

Please sign in to comment.