aboutsummaryrefslogtreecommitdiffstats
path: root/databases/postgresql-repmgr/files
diff options
context:
space:
mode:
authorswills <swills@FreeBSD.org>2012-12-10 10:27:32 +0800
committerswills <swills@FreeBSD.org>2012-12-10 10:27:32 +0800
commita989abcc07db54b57a4cb197c846c25853410565 (patch)
tree2df2effe4a5bceb85c7ad1f4c35644e3f9811ed5 /databases/postgresql-repmgr/files
parent6979444755d0ac8c5d2b19878c2953c7d64be64f (diff)
downloadfreebsd-ports-gnome-a989abcc07db54b57a4cb197c846c25853410565.tar.gz
freebsd-ports-gnome-a989abcc07db54b57a4cb197c846c25853410565.tar.zst
freebsd-ports-gnome-a989abcc07db54b57a4cb197c846c25853410565.zip
- 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 - Trim Makefile header PR: ports/174216 Submitted by: Kubilay Kocak <koobs.freebsd@gmail.com> (maintainer) Approved by: Alexander Pyhalov <alp@rsu.ru> (maintainer)
Diffstat (limited to 'databases/postgresql-repmgr/files')
-rw-r--r--databases/postgresql-repmgr/files/patch-config.c11
-rw-r--r--databases/postgresql-repmgr/files/patch-repmgr.c40
-rw-r--r--databases/postgresql-repmgr/files/patch-strnlen23
3 files changed, 51 insertions, 23 deletions
diff --git a/databases/postgresql-repmgr/files/patch-config.c b/databases/postgresql-repmgr/files/patch-config.c
new file mode 100644
index 000000000000..e13f48a80521
--- /dev/null
+++ b/databases/postgresql-repmgr/files/patch-config.c
@@ -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 --git a/databases/postgresql-repmgr/files/patch-repmgr.c b/databases/postgresql-repmgr/files/patch-repmgr.c
new file mode 100644
index 000000000000..98301dd07338
--- /dev/null
+++ b/databases/postgresql-repmgr/files/patch-repmgr.c
@@ -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 --git a/databases/postgresql-repmgr/files/patch-strnlen b/databases/postgresql-repmgr/files/patch-strnlen
deleted file mode 100644
index 5590e542e2d7..000000000000
--- a/databases/postgresql-repmgr/files/patch-strnlen
+++ /dev/null
@@ -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");