ports/174216: [PATCH] databases/postgresql-repmgr: update to 1.2.0, refactor and add patches, more
Kubilay Kocak
koobs.freebsd at gmail.com
Thu Dec 6 07:40:01 UTC 2012
>Number: 174216
>Category: ports
>Synopsis: [PATCH] databases/postgresql-repmgr: update to 1.2.0, refactor and add patches, more
>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: Thu Dec 06 07:40:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator: Kubilay Kocak
>Release: FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD freebsd-91-amd64 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243872: Wed Dec 5 16:49:35
>Description:
- Update to 1.2.0
- Update MASTER_SITES
- Assign with expansion for RUN_DEPENDS -> BUILD_DEPENDS
- Remove patch-strnlen after refactoring changes into new patches
- Add patch to fix compilation by cherrypicking a commit in 2.x (See references)
- Trim Makefile header
<ChangeLog>
1.2.0 2012-07-27
Test ssh connection before trying to rsync (Cédric)
Add CLUSTER SHOW command (Carlo)
Add CLUSTER CLEANUP command (Jaime)
Add function write_primary_conninfo (Marco)
Teach repmgr how to get tablespace's location in different pg version (Jaime)
Improve version message (Carlo)
1.1.1 2012-04-18
Add --ignore-rsync-warning (Cédric)
Add strnlen for compatibility with OS X (Greg)
Improve performance of the repl_status view (Jaime)
Remove last argument from log_err (Jaime, Reported by Jeroen Dekkers)
Complete documentation about possible error conditions (Jaime)
Document how to clean history (Jaime)
</ChangeLog>
Refences:
https://github.com/2ndQuadrant/repmgr/commit/2803bb92a85ee3ee256cbf0a8dbefc08a1a4468d
====[QA]====
portlint: One MASTER_SITE, Hyphen in PORTNAME
testport: (poudriere)
VERSION ARCH STATUS
10.0-CURRENT amd64 OK
10.0-CURRENT i386 OK
8.3-RELEASE amd64 OK
8.3-RELEASE i386 OK
9.0-RELEASE amd64 OK
9.0-RELEASE i386 OK
9.1-RC3 amd64 OK
============
Added file(s):
- files/patch-config.c
- files/patch-repmgr.c
Removed file(s):
- files/patch-strnlen
Port maintainer (alp at sfedu.ru) is cc'd.
Generated with FreeBSD Port Tools 0.99_6 (mode: update, diff: ports)
>How-To-Repeat:
>Fix:
--- postgresql-repmgr-1.2.0.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/databases/postgresql-repmgr/Makefile ./Makefile
--- /usr/ports/databases/postgresql-repmgr/Makefile 2012-11-17 16:55:20.000000000 +1100
+++ ./Makefile 2012-12-04 19:46:03.147398196 +1100
@@ -1,19 +1,17 @@
-# New ports collection makefile for: repmgr
-# Date created: January 15, 2011
-# Whom: alp at sfedu.ru
+# Created by: alp at sfedu.ru
# $FreeBSD: ports/databases/postgresql-repmgr/Makefile,v 1.4 2012/11/17 05:55:20 svnexp Exp $
PORTNAME= postgresql-repmgr
-PORTVERSION= 1.1.0
+PORTVERSION= 1.2.0
CATEGORIES= databases
-MASTER_SITES= http://projects.2ndquadrant.it/sites/default/files/
+MASTER_SITES= http://www.repmgr.org/download/
DISTNAME= repmgr-${PORTVERSION}
MAINTAINER= alp at sfedu.ru
COMMENT= PostgreSQL replication manager
BUILD_DEPENDS= postgresql-server>=9.0:${PORTSDIR}/databases/postgresql90-server
-RUN_DEPENDS= postgresql-server>=9.0:${PORTSDIR}/databases/postgresql90-server \
+RUN_DEPENDS:= ${BUILD_DEPENDS} \
rsync:${PORTSDIR}/net/rsync
USE_GMAKE= yes
diff -ruN --exclude=CVS /usr/ports/databases/postgresql-repmgr/distinfo ./distinfo
--- /usr/ports/databases/postgresql-repmgr/distinfo 2011-04-24 21:05:16.000000000 +1000
+++ ./distinfo 2012-12-04 15:14:56.777309583 +1100
@@ -1,2 +1,2 @@
-SHA256 (repmgr-1.1.0.tar.gz) = 7862c90b18522f59a2a18881eeba355b2fbe1956523005a1449dcc768ab3794c
-SIZE (repmgr-1.1.0.tar.gz) = 48729
+SHA256 (repmgr-1.2.0.tar.gz) = 191c077a15b9f7fa729b8f1c4e5ace8b340fda6285c7b552545f94ca4490ec5b
+SIZE (repmgr-1.2.0.tar.gz) = 51608
diff -ruN --exclude=CVS /usr/ports/databases/postgresql-repmgr/files/patch-config.c ./files/patch-config.c
--- /usr/ports/databases/postgresql-repmgr/files/patch-config.c 1970-01-01 10:00:00.000000000 +1000
+++ ./files/patch-config.c 2012-12-04 19:41:11.168316194 +1100
@@ -0,0 +1,11 @@
+--- ./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");
diff -ruN --exclude=CVS /usr/ports/databases/postgresql-repmgr/files/patch-repmgr.c ./files/patch-repmgr.c
--- /usr/ports/databases/postgresql-repmgr/files/patch-repmgr.c 1970-01-01 10:00:00.000000000 +1000
+++ ./files/patch-repmgr.c 2012-12-04 19:41:11.177675247 +1100
@@ -0,0 +1,40 @@
+--- ./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 <stdio.h>
+ #include <stdlib.h>
++#include <sys/wait.h>
+ #include <time.h>
+ #include <unistd.h>
+
+@@ -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");
diff -ruN --exclude=CVS /usr/ports/databases/postgresql-repmgr/files/patch-strnlen ./files/patch-strnlen
--- /usr/ports/databases/postgresql-repmgr/files/patch-strnlen 2011-10-01 04:52:32.000000000 +1000
+++ ./files/patch-strnlen 1970-01-01 10:00:00.000000000 +1000
@@ -1,23 +0,0 @@
---- config.orig.c 2011-03-09 23:27:29.000000000 +0300
-+++ config.c 2011-09-30 08:30:35.000000000 +0400
-@@ -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");
-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
---- repmgr.orig.c 2011-03-09 23:27:29.000000000 +0300
-+++ repmgr.c 2011-09-30 08:30:19.000000000 +0400
-@@ -1438,7 +1438,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");
--- postgresql-repmgr-1.2.0.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list