Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Nov 2014 15:47:35 +0000 (UTC)
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r372725 - in head/databases/postgresql-repmgr: . files
Message-ID:  <201411181547.sAIFlZHV013175@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: matthew
Date: Tue Nov 18 15:47:34 2014
New Revision: 372725
URL: https://svnweb.freebsd.org/changeset/ports/372725
QAT: https://qat.redports.org/buildarchive/r372725/

Log:
     * Drop the patches replacing strnlen() -- this function is
       available in libc for all currently supported versions of
       FreeBSD.
  
     * Install the default config file into
       ${PREFIX}/etc/repmgr.conf.sample and uses the standard @sample
       plist functionality.  This is where hier(7) expects config files
       to be installed.
  
     * Add an rc.d script to start up repmgrd automatically on system
       boot, which relies on the config file being in ${PREFIX}/etc/.
  
  PR:		195106
  Submitted by:	matthew
  Approved by:	5u623l20@gmail.com (maintainer)

Added:
  head/databases/postgresql-repmgr/files/repmgrd.in   (contents, props changed)
Deleted:
  head/databases/postgresql-repmgr/files/patch-config.c
  head/databases/postgresql-repmgr/files/patch-repmgr.c
Modified:
  head/databases/postgresql-repmgr/Makefile
  head/databases/postgresql-repmgr/pkg-plist

Modified: head/databases/postgresql-repmgr/Makefile
==============================================================================
--- head/databases/postgresql-repmgr/Makefile	Tue Nov 18 14:33:44 2014	(r372724)
+++ head/databases/postgresql-repmgr/Makefile	Tue Nov 18 15:47:34 2014	(r372725)
@@ -3,7 +3,7 @@
 
 PORTNAME=	postgresql-repmgr
 PORTVERSION=	2.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	databases
 MASTER_SITES=	http://www.repmgr.org/download/
 DISTNAME=	repmgr-${PORTVERSION}
@@ -16,20 +16,19 @@ LICENSE=	GPLv3
 RUN_DEPENDS=	rsync:${PORTSDIR}/net/rsync
 
 USES+=		gmake pgsql:9.0+
+USE_RC_SUBR=	repmgrd
 WANT_PGSQL=	server
 MAKE_ENV=	USE_PGXS=1
 
 OPTIONS_DEFINE=	DOCS
 
-PORTDOCS=	README.*
-
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/repmgr ${STAGEDIR}${PREFIX}/bin
 	${INSTALL_PROGRAM} ${WRKSRC}/repmgrd ${STAGEDIR}${PREFIX}/sbin
+	${INSTALL_DATA} ${WRKSRC}/repmgr.conf.sample ${STAGEDIR}${PREFIX}/etc
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/README.rst ${STAGEDIR}${DOCSDIR}
 	@${MKDIR} ${STAGEDIR}${DATADIR}
-	${INSTALL_DATA} ${WRKSRC}/repmgr.conf.sample ${STAGEDIR}${DATADIR}
 	${INSTALL_DATA} ${WRKSRC}/repmgr.sql ${STAGEDIR}${DATADIR}
 
 .include <bsd.port.mk>

Added: head/databases/postgresql-repmgr/files/repmgrd.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/postgresql-repmgr/files/repmgrd.in	Tue Nov 18 15:47:34 2014	(r372725)
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: repmgrd
+# REQUIRE: postgresql
+# KEYWORD: shutdown
+#
+# Add these lines to /etc/rc.conf.local or /etc/rc.conf to enable this
+# service:
+#
+# repmgrd_enable (bool):   Set to YES to enable repmgrd.  Default: NO
+#
+# repmgrd_config (path):   Default: %%PREFIX%%/etc/repmgr.conf
+#
+
+. /etc/rc.subr
+
+name=repmgrd
+rcvar=repmgrd_enable
+
+load_rc_config $name
+
+: ${repmgrd_enable:="NO"}
+: ${repmgrd_config="%%PREFIX%%/etc/repmgr.conf"}
+
+command=%%PREFIX%%/sbin/${name}
+pidfile=/var/run/${name}.pid
+
+command_args="-p $pidfile -f $repmgrd_config"
+
+run_rc_command "$1"
+

Modified: head/databases/postgresql-repmgr/pkg-plist
==============================================================================
--- head/databases/postgresql-repmgr/pkg-plist	Tue Nov 18 14:33:44 2014	(r372724)
+++ head/databases/postgresql-repmgr/pkg-plist	Tue Nov 18 15:47:34 2014	(r372725)
@@ -1,4 +1,5 @@
 bin/repmgr
+@sample etc/repmgr.conf.sample
 sbin/repmgrd
-%%DATADIR%%/repmgr.conf.sample
+%%PORTDOCS%%%%DOCSDIR%%/README.rst
 %%DATADIR%%/repmgr.sql



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411181547.sAIFlZHV013175>