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

(-)./Makefile (-6 / +4 lines)
Lines 1-19 Link Here
1
# New ports collection makefile for: 	repmgr
1
# Created by: alp@sfedu.ru
2
# Date created:		January 15, 2011
3
# Whom:			alp@sfedu.ru
4
# $FreeBSD: ports/databases/postgresql-repmgr/Makefile,v 1.4 2012/11/17 05:55:20 svnexp Exp $
2
# $FreeBSD: ports/databases/postgresql-repmgr/Makefile,v 1.4 2012/11/17 05:55:20 svnexp Exp $
5
3
6
PORTNAME=	postgresql-repmgr
4
PORTNAME=	postgresql-repmgr
7
PORTVERSION=	1.1.0
5
PORTVERSION=	1.2.0
8
CATEGORIES=	databases
6
CATEGORIES=	databases
9
MASTER_SITES=	http://projects.2ndquadrant.it/sites/default/files/
7
MASTER_SITES=	http://www.repmgr.org/download/
10
DISTNAME=	repmgr-${PORTVERSION}
8
DISTNAME=	repmgr-${PORTVERSION}
11
9
12
MAINTAINER=	alp@sfedu.ru
10
MAINTAINER=	alp@sfedu.ru
13
COMMENT=	PostgreSQL replication manager
11
COMMENT=	PostgreSQL replication manager
14
12
15
BUILD_DEPENDS=	postgresql-server>=9.0:${PORTSDIR}/databases/postgresql90-server
13
BUILD_DEPENDS=	postgresql-server>=9.0:${PORTSDIR}/databases/postgresql90-server
16
RUN_DEPENDS=	postgresql-server>=9.0:${PORTSDIR}/databases/postgresql90-server \
14
RUN_DEPENDS:=	${BUILD_DEPENDS} \
17
		rsync:${PORTSDIR}/net/rsync
15
		rsync:${PORTSDIR}/net/rsync
18
16
19
USE_GMAKE=	yes
17
USE_GMAKE=	yes
(-)./distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (repmgr-1.1.0.tar.gz) = 7862c90b18522f59a2a18881eeba355b2fbe1956523005a1449dcc768ab3794c
1
SHA256 (repmgr-1.2.0.tar.gz) = 191c077a15b9f7fa729b8f1c4e5ace8b340fda6285c7b552545f94ca4490ec5b
2
SIZE (repmgr-1.1.0.tar.gz) = 48729
2
SIZE (repmgr-1.2.0.tar.gz) = 51608
(-)./files/patch-config.c (+11 lines)
Line 0 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)
Line 0 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");
(-)./files/patch-strnlen (-23 lines)
Lines 1-23 Link Here
1
--- config.orig.c	2011-03-09 23:27:29.000000000 +0300
2
+++ config.c	2011-09-30 08:30:35.000000000 +0400
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");
12
diff -ru /var/tmp/usr/ports/databases/postgresql-repmgr/work/repmgr-1.1.0/repmgr.c /var/tmp/usr/ports/databases/postgresql-repmgr/work/repmgr-1.1.0.patched/repmgr.c
13
--- repmgr.orig.c	2011-03-09 23:27:29.000000000 +0300
14
+++ repmgr.c	2011-09-30 08:30:19.000000000 +0400
15
@@ -1438,7 +1438,7 @@
16
 	char host_string[MAXLEN];
17
 	int	 r;
18
 
19
-	if (strnlen(options.rsync_options, MAXLEN) == 0)
20
+	if (strlen(options.rsync_options) == 0)
21
 		maxlen_snprintf(
22
 		    rsync_flags, "%s",
23
 		    "--archive --checksum --compress --progress --rsh=ssh");

Return to bug 174216