View | Details | Raw Unified | Return to bug 188323
Collapse All | Expand All

(-)Makefile (-2 / +6 lines)
Lines 2-8 Link Here
2
# $FreeBSD$
2
# $FreeBSD$
3
3
4
PORTNAME=	postgresql-repmgr
4
PORTNAME=	postgresql-repmgr
5
PORTVERSION=	1.2.0
5
PORTVERSION=	2.0
6
CATEGORIES=	databases
6
CATEGORIES=	databases
7
MASTER_SITES=	http://www.repmgr.org/download/
7
MASTER_SITES=	http://www.repmgr.org/download/
8
DISTNAME=	repmgr-${PORTVERSION}
8
DISTNAME=	repmgr-${PORTVERSION}
Lines 26-35 Link Here
26
do-install:
26
do-install:
27
	${INSTALL_PROGRAM} ${WRKSRC}/repmgr ${STAGEDIR}${PREFIX}/bin
27
	${INSTALL_PROGRAM} ${WRKSRC}/repmgr ${STAGEDIR}${PREFIX}/bin
28
	${INSTALL_PROGRAM} ${WRKSRC}/repmgrd ${STAGEDIR}${PREFIX}/sbin
28
	${INSTALL_PROGRAM} ${WRKSRC}/repmgrd ${STAGEDIR}${PREFIX}/sbin
29
	@${MKDIR} ${STAGEDIR}${PREFIX}/lib/postgresql
30
	${INSTALL_PROGRAM} ${WRKSRC}/sql/repmgr_funcs.so ${STAGEDIR}${PREFIX}/lib/postgresql
29
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
31
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
30
	${INSTALL_DATA} ${WRKSRC}/README.rst ${STAGEDIR}${DOCSDIR}
32
	${INSTALL_DATA} ${WRKSRC}/README.rst ${STAGEDIR}${DOCSDIR}
31
	@${MKDIR} ${STAGEDIR}${DATADIR}
33
	@${MKDIR} ${STAGEDIR}${DATADIR}
32
	${INSTALL_DATA} ${WRKSRC}/repmgr.conf ${STAGEDIR}${DATADIR}
34
	${INSTALL_DATA} ${WRKSRC}/sql/repmgr_funcs.sql ${STAGEDIR}${DATADIR}
35
	${INSTALL_DATA} ${WRKSRC}/sql/uninstall_repmgr_funcs.sql ${STAGEDIR}${DATADIR}
36
	${INSTALL_DATA} ${WRKSRC}/repmgr.conf.sample ${STAGEDIR}${DATADIR}
33
	${INSTALL_DATA} ${WRKSRC}/repmgr.sql ${STAGEDIR}${DATADIR}
37
	${INSTALL_DATA} ${WRKSRC}/repmgr.sql ${STAGEDIR}${DATADIR}
34
38
35
.include <bsd.port.mk>
39
.include <bsd.port.mk>
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (repmgr-1.2.0.tar.gz) = 191c077a15b9f7fa729b8f1c4e5ace8b340fda6285c7b552545f94ca4490ec5b
1
SHA256 (repmgr-2.0.tar.gz) = b891d8a98700f73a58ce9580377978a1e43834f3bdcf6992e565b4aacddee887
2
SIZE (repmgr-1.2.0.tar.gz) = 51608
2
SIZE (repmgr-2.0.tar.gz) = 72227
(-)files/patch-config.c (-11 lines)
Lines 1-11 Link Here
1
--- ./config.c.orig	2012-12-04 19:40:15.395225527 +1100
2
+++ ./config.c	2012-12-04 19:40:38.975104852 +1100
3
@@ -77,7 +77,7 @@
4
 	fclose (fp);
5
 
6
 	/* Check config settings */
7
-	if (strnlen(options->cluster_name, MAXLEN)==0)
8
+	if (strlen(options->cluster_name)==0)
9
 	{
10
 		fprintf(stderr, "Cluster name is missing. "
11
 		        "Check the configuration file.\n");
(-)files/patch-repmgr.c (-40 lines)
Lines 1-40 Link Here
1
--- ./repmgr.c.orig	2012-07-28 02:30:35.000000000 +1000
2
+++ ./repmgr.c	2012-12-04 19:41:06.157429458 +1100
3
@@ -28,6 +28,7 @@
4
 
5
 #include <stdio.h>
6
 #include <stdlib.h>
7
+#include <sys/wait.h>
8
 #include <time.h>
9
 #include <unistd.h>
10
 
11
@@ -1603,11 +1604,18 @@
12
 	char script[MAXLEN];
13
 	int	 r;
14
 
15
+/* On some OS, true is located in a different place than in Linux */
16
+#ifdef __FreeBSD__
17
+#define TRUEBIN_PATH "/usr/bin/true"
18
+#else
19
+#define TRUEBIN_PATH "/bin/true"
20
+#endif
21
+
22
 	/* Check if we have ssh connectivity to host before trying to rsync */
23
 	if (!remote_user[0])
24
-		maxlen_snprintf(script, "ssh -o Batchmode=yes %s /bin/true", host);
25
+		maxlen_snprintf(script, "ssh -o Batchmode=yes %s %s", host, TRUEBIN_PATH);
26
 	else
27
-		maxlen_snprintf(script, "ssh -o Batchmode=yes %s -l %s /bin/true", host, remote_user);
28
+		maxlen_snprintf(script, "ssh -o Batchmode=yes %s -l %s %s", host, remote_user, TRUEBIN_PATH);
29
 
30
 	log_debug(_("command is: %s"), script);
31
 	r = system(script);
32
@@ -1625,7 +1633,7 @@
33
 	char host_string[MAXLEN];
34
 	int	 r;
35
 
36
-	if (strnlen(options.rsync_options, MAXLEN) == 0)
37
+	if (strlen(options.rsync_options) == 0)
38
 		maxlen_snprintf(
39
 		    rsync_flags, "%s",
40
 		    "--archive --checksum --compress --progress --rsh=ssh");
(-)pkg-plist (-1 / +4 lines)
Lines 1-5 Link Here
1
bin/repmgr
1
bin/repmgr
2
sbin/repmgrd
2
sbin/repmgrd
3
%%PORTDATA%%%%DATADIR%%/repmgr.conf
3
lib/postgresql/repmgr_funcs.so
4
%%PORTDATA%%%%DATADIR%%/repmgr_funcs.sql
5
%%PORTDATA%%%%DATADIR%%/uninstall_repmgr_funcs.sql
6
%%PORTDATA%%%%DATADIR%%/repmgr.conf.sample
4
%%PORTDATA%%%%DATADIR%%/repmgr.sql
7
%%PORTDATA%%%%DATADIR%%/repmgr.sql
5
%%PORTDATA%%@dirrm %%DATADIR%%
8
%%PORTDATA%%@dirrm %%DATADIR%%

Return to bug 188323