From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Apr 6 18:30:02 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB9A21A3 for ; Sun, 6 Apr 2014 18:30:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8844D09 for ; Sun, 6 Apr 2014 18:30:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s36IU1UO084605 for ; Sun, 6 Apr 2014 18:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s36IU19A084604; Sun, 6 Apr 2014 18:30:01 GMT (envelope-from gnats) Resent-Date: Sun, 6 Apr 2014 18:30:01 GMT Resent-Message-Id: <201404061830.s36IU19A084604@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, toddnni Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECBC26E for ; Sun, 6 Apr 2014 18:25:15 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CD0BACE6 for ; Sun, 6 Apr 2014 18:25:15 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s36IPFED026229 for ; Sun, 6 Apr 2014 18:25:15 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s36IPFVc026220; Sun, 6 Apr 2014 18:25:15 GMT (envelope-from nobody) Message-Id: <201404061825.s36IPFVc026220@cgiserv.freebsd.org> Date: Sun, 6 Apr 2014 18:25:15 GMT From: toddnni To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/188323: postgresql-repmgr (repmgr) update to 2.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Apr 2014 18:30:02 -0000 >Number: 188323 >Category: ports >Synopsis: postgresql-repmgr (repmgr) update to 2.0 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sun Apr 06 18:30:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: toddnni >Release: FreeBSD 9.2-RELEASE >Organization: >Environment: >Description: Hi, I needed (*) repmgr v.2.0 and I updated the port in meantime. I believe that the newer version should work with postgresql-9.3 also. However I tested the port only with postgresql-9.2 The changes I made: - the patch files were removed. They were no longer necessary, the upstream code was fixed - the newer version contains repmgr_funcs postgresql library - repmgr.conf was renamed to repmgr.conf.sample (*) Now 'repmgr standby follow' works correctly in my 3 node cluster >How-To-Repeat: >Fix: Patch attached with submission follows: Index: Makefile =================================================================== --- Makefile (revision 350397) +++ Makefile (working copy) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= postgresql-repmgr -PORTVERSION= 1.2.0 +PORTVERSION= 2.0 CATEGORIES= databases MASTER_SITES= http://www.repmgr.org/download/ DISTNAME= repmgr-${PORTVERSION} @@ -26,10 +26,14 @@ do-install: ${INSTALL_PROGRAM} ${WRKSRC}/repmgr ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${WRKSRC}/repmgrd ${STAGEDIR}${PREFIX}/sbin + @${MKDIR} ${STAGEDIR}${PREFIX}/lib/postgresql + ${INSTALL_PROGRAM} ${WRKSRC}/sql/repmgr_funcs.so ${STAGEDIR}${PREFIX}/lib/postgresql @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.rst ${STAGEDIR}${DOCSDIR} @${MKDIR} ${STAGEDIR}${DATADIR} - ${INSTALL_DATA} ${WRKSRC}/repmgr.conf ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/sql/repmgr_funcs.sql ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/sql/uninstall_repmgr_funcs.sql ${STAGEDIR}${DATADIR} + ${INSTALL_DATA} ${WRKSRC}/repmgr.conf.sample ${STAGEDIR}${DATADIR} ${INSTALL_DATA} ${WRKSRC}/repmgr.sql ${STAGEDIR}${DATADIR} .include Index: distinfo =================================================================== --- distinfo (revision 350397) +++ distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (repmgr-1.2.0.tar.gz) = 191c077a15b9f7fa729b8f1c4e5ace8b340fda6285c7b552545f94ca4490ec5b -SIZE (repmgr-1.2.0.tar.gz) = 51608 +SHA256 (repmgr-2.0.tar.gz) = b891d8a98700f73a58ce9580377978a1e43834f3bdcf6992e565b4aacddee887 +SIZE (repmgr-2.0.tar.gz) = 72227 Index: files/patch-config.c =================================================================== --- files/patch-config.c (revision 350397) +++ files/patch-config.c (working copy) @@ -1,11 +0,0 @@ ---- ./config.c.orig 2012-12-04 19:40:15.395225527 +1100 -+++ ./config.c 2012-12-04 19:40:38.975104852 +1100 -@@ -77,7 +77,7 @@ - fclose (fp); - - /* Check config settings */ -- if (strnlen(options->cluster_name, MAXLEN)==0) -+ if (strlen(options->cluster_name)==0) - { - fprintf(stderr, "Cluster name is missing. " - "Check the configuration file.\n"); Index: files/patch-repmgr.c =================================================================== --- files/patch-repmgr.c (revision 350397) +++ files/patch-repmgr.c (working copy) @@ -1,40 +0,0 @@ ---- ./repmgr.c.orig 2012-07-28 02:30:35.000000000 +1000 -+++ ./repmgr.c 2012-12-04 19:41:06.157429458 +1100 -@@ -28,6 +28,7 @@ - - #include - #include -+#include - #include - #include - -@@ -1603,11 +1604,18 @@ - char script[MAXLEN]; - int r; - -+/* On some OS, true is located in a different place than in Linux */ -+#ifdef __FreeBSD__ -+#define TRUEBIN_PATH "/usr/bin/true" -+#else -+#define TRUEBIN_PATH "/bin/true" -+#endif -+ - /* Check if we have ssh connectivity to host before trying to rsync */ - if (!remote_user[0]) -- maxlen_snprintf(script, "ssh -o Batchmode=yes %s /bin/true", host); -+ maxlen_snprintf(script, "ssh -o Batchmode=yes %s %s", host, TRUEBIN_PATH); - else -- maxlen_snprintf(script, "ssh -o Batchmode=yes %s -l %s /bin/true", host, remote_user); -+ maxlen_snprintf(script, "ssh -o Batchmode=yes %s -l %s %s", host, remote_user, TRUEBIN_PATH); - - log_debug(_("command is: %s"), script); - r = system(script); -@@ -1625,7 +1633,7 @@ - char host_string[MAXLEN]; - int r; - -- if (strnlen(options.rsync_options, MAXLEN) == 0) -+ if (strlen(options.rsync_options) == 0) - maxlen_snprintf( - rsync_flags, "%s", - "--archive --checksum --compress --progress --rsh=ssh"); Index: pkg-plist =================================================================== --- pkg-plist (revision 350397) +++ pkg-plist (working copy) @@ -1,5 +1,8 @@ bin/repmgr sbin/repmgrd -%%PORTDATA%%%%DATADIR%%/repmgr.conf +lib/postgresql/repmgr_funcs.so +%%PORTDATA%%%%DATADIR%%/repmgr_funcs.sql +%%PORTDATA%%%%DATADIR%%/uninstall_repmgr_funcs.sql +%%PORTDATA%%%%DATADIR%%/repmgr.conf.sample %%PORTDATA%%%%DATADIR%%/repmgr.sql %%PORTDATA%%@dirrm %%DATADIR%% >Release-Note: >Audit-Trail: >Unformatted: