[UPDATE] repmgr

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[UPDATE] repmgr

Martijn van Duren-7
When trying a new test-setup I found that our repmgr is quite out of
date. Here's a simple update to version 4.2.

I haven't tested it with upgrading from our current version, but I have
tested it very basically on a streaming replication setup with setup,
failover, and switchover via repmgr. Repmgrd untested.

OK?

martijn@

? patches/patch-configfile_c
Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/repmgr/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile 16 Mar 2016 16:46:32 -0000 1.8
+++ Makefile 12 Nov 2018 15:30:18 -0000
@@ -2,9 +2,10 @@
 
 COMMENT = HA and replication cluster management for PostgreSQL
 
-DISTNAME = repmgr-3.0.3
+DISTNAME = repmgr-4.2
 CATEGORIES = databases
 HOMEPAGE = http://www.repmgr.org/
+WRKDIST = ${WRKDIR}/${DISTNAME}.0
 
 # GPLv3
 PERMIT_PACKAGE_CDROM = Yes
@@ -13,6 +14,7 @@ WANTLIB += c crypto m pq pthread readlin
 
 MASTER_SITES = ${HOMEPAGE}download/
 USE_GMAKE = Yes
+CONFIGURE_STYLE = gnu
 MAKE_FLAGS = USE_PGXS=1
 
 # for getopt_long.h
@@ -23,7 +25,7 @@ RUN_DEPENDS = net/rsync
 NO_TEST = Yes
 
 pre-configure:
- ${SUBST_CMD} ${WRKSRC}/config.c
+ ${SUBST_CMD} ${WRKSRC}/configfile.c
 
 post-install:
  ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/repmgr
Index: distinfo
===================================================================
RCS file: /cvs/ports/databases/repmgr/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 23 Jan 2016 18:01:07 -0000 1.4
+++ distinfo 12 Nov 2018 15:30:18 -0000
@@ -1,2 +1,2 @@
-SHA256 (repmgr-3.0.3.tar.gz) = My5PpsuVkZOs7f0UEGDxgjQWR2a/7PQ8cfK3YVQoOBQ=
-SIZE (repmgr-3.0.3.tar.gz) = 102211
+SHA256 (repmgr-4.2.tar.gz) = jfYcn0TgUgesWld6a1KYdpfuQv+FCxTznl7hNaFXzv0=
+SIZE (repmgr-4.2.tar.gz) = 341556
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/databases/repmgr/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 19 Sep 2015 21:37:12 -0000 1.2
+++ pkg/PLIST 12 Nov 2018 15:30:18 -0000
@@ -1,14 +1,17 @@
 @comment $OpenBSD: PLIST,v 1.2 2015/09/19 21:37:12 landry Exp $
 @bin bin/repmgr
 @bin bin/repmgrd
-lib/postgresql/repmgr_funcs.so
+lib/postgresql/repmgr.so
 share/doc/repmgr/
 share/doc/repmgr/README.md
 share/examples/repmgr/
 share/examples/repmgr/repmgr.conf
 @sample ${SYSCONFDIR}/repmgr.conf
-share/postgresql/contrib/
-share/postgresql/contrib/repmgr.sql
-share/postgresql/contrib/repmgr_funcs.sql
-share/postgresql/contrib/uninstall_repmgr.sql
-share/postgresql/contrib/uninstall_repmgr_funcs.sql
+share/postgresql/extension/
+share/postgresql/extension/repmgr--4.0--4.1.sql
+share/postgresql/extension/repmgr--4.0.sql
+share/postgresql/extension/repmgr--4.1--4.2.sql
+share/postgresql/extension/repmgr--4.1.sql
+share/postgresql/extension/repmgr--4.2.sql
+share/postgresql/extension/repmgr--unpackaged--4.0.sql
+share/postgresql/extension/repmgr.control

Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] repmgr

Martijn van Duren-7
On 11/12/18 4:30 PM, Martijn van Duren wrote:

> When trying a new test-setup I found that our repmgr is quite out of
> date. Here's a simple update to version 4.2.
>
> I haven't tested it with upgrading from our current version, but I have
> tested it very basically on a streaming replication setup with setup,
> failover, and switchover via repmgr. Repmgrd untested.
>
> OK?
>
> martijn@
>
And of course I overlooked the patches-directory.

Index: Makefile
===================================================================
RCS file: /cvs/ports/databases/repmgr/Makefile,v
retrieving revision 1.8
diff -u -p -r1.8 Makefile
--- Makefile 16 Mar 2016 16:46:32 -0000 1.8
+++ Makefile 12 Nov 2018 15:33:40 -0000
@@ -2,9 +2,10 @@
 
 COMMENT = HA and replication cluster management for PostgreSQL
 
-DISTNAME = repmgr-3.0.3
+DISTNAME = repmgr-4.2
 CATEGORIES = databases
 HOMEPAGE = http://www.repmgr.org/
+WRKDIST = ${WRKDIR}/${DISTNAME}.0
 
 # GPLv3
 PERMIT_PACKAGE_CDROM = Yes
@@ -13,6 +14,7 @@ WANTLIB += c crypto m pq pthread readlin
 
 MASTER_SITES = ${HOMEPAGE}download/
 USE_GMAKE = Yes
+CONFIGURE_STYLE = gnu
 MAKE_FLAGS = USE_PGXS=1
 
 # for getopt_long.h
@@ -23,7 +25,7 @@ RUN_DEPENDS = net/rsync
 NO_TEST = Yes
 
 pre-configure:
- ${SUBST_CMD} ${WRKSRC}/config.c
+ ${SUBST_CMD} ${WRKSRC}/configfile.c
 
 post-install:
  ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/repmgr
Index: distinfo
===================================================================
RCS file: /cvs/ports/databases/repmgr/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 23 Jan 2016 18:01:07 -0000 1.4
+++ distinfo 12 Nov 2018 15:33:40 -0000
@@ -1,2 +1,2 @@
-SHA256 (repmgr-3.0.3.tar.gz) = My5PpsuVkZOs7f0UEGDxgjQWR2a/7PQ8cfK3YVQoOBQ=
-SIZE (repmgr-3.0.3.tar.gz) = 102211
+SHA256 (repmgr-4.2.tar.gz) = jfYcn0TgUgesWld6a1KYdpfuQv+FCxTznl7hNaFXzv0=
+SIZE (repmgr-4.2.tar.gz) = 341556
Index: patches/patch-config_c
===================================================================
RCS file: patches/patch-config_c
diff -N patches/patch-config_c
--- patches/patch-config_c 23 Jan 2016 18:01:07 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-config_c,v 1.1 2016/01/23 18:01:07 ajacoutot Exp $
---- config.c.orig Sat Jan 23 18:59:43 2016
-+++ config.c Sat Jan 23 18:59:34 2016
-@@ -128,10 +128,10 @@ load_config(const char *config_file, bool verbose, t_c
- /* 2. "/etc/repmgr.conf" */
- if (verbose == true)
- {
-- log_notice(_("looking for configuration file in /etc\n"));
-+ log_notice(_("looking for configuration file in ${SYSCONFDIR}\n"));
- }
-
-- snprintf(config_file_path, MAXPGPATH, "/etc/%s", CONFIG_FILE_NAME);
-+ snprintf(config_file_path, MAXPGPATH, "${SYSCONFDIR}/%s", CONFIG_FILE_NAME);
- if (stat(config_file_path, &stat_config) == 0)
- {
- config_file_found = true;
Index: patches/patch-configfile_c
===================================================================
RCS file: patches/patch-configfile_c
diff -N patches/patch-configfile_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-configfile_c 12 Nov 2018 15:33:40 -0000
@@ -0,0 +1,16 @@
+$OpenBSD: patch-configfile_c,v 1.1 2016/01/23 18:01:07 ajacoutot Exp $
+Index: configfile.c
+--- configfile.c.orig
++++ configfile.c
+@@ -188,9 +188,9 @@ load_config(const char *config_file, bool verbose, boo
+
+ /* 3. "/etc/repmgr.conf" */
+ if (verbose == true)
+- fprintf(stdout, _("INFO: looking for configuration file in /etc\n"));
++ fprintf(stdout, _("INFO: looking for configuration file in ${SYSCONFDIR}\n"));
+
+- maxpath_snprintf(config_file_path, "/etc/%s", CONFIG_FILE_NAME);
++ maxpath_snprintf(config_file_path, "${SYSCONFDIR}/%s", CONFIG_FILE_NAME);
+ if (stat(config_file_path, &stat_config) == 0)
+ {
+ config_file_found = true;
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/databases/repmgr/pkg/PLIST,v
retrieving revision 1.2
diff -u -p -r1.2 PLIST
--- pkg/PLIST 19 Sep 2015 21:37:12 -0000 1.2
+++ pkg/PLIST 12 Nov 2018 15:33:40 -0000
@@ -1,14 +1,17 @@
 @comment $OpenBSD: PLIST,v 1.2 2015/09/19 21:37:12 landry Exp $
 @bin bin/repmgr
 @bin bin/repmgrd
-lib/postgresql/repmgr_funcs.so
+lib/postgresql/repmgr.so
 share/doc/repmgr/
 share/doc/repmgr/README.md
 share/examples/repmgr/
 share/examples/repmgr/repmgr.conf
 @sample ${SYSCONFDIR}/repmgr.conf
-share/postgresql/contrib/
-share/postgresql/contrib/repmgr.sql
-share/postgresql/contrib/repmgr_funcs.sql
-share/postgresql/contrib/uninstall_repmgr.sql
-share/postgresql/contrib/uninstall_repmgr_funcs.sql
+share/postgresql/extension/
+share/postgresql/extension/repmgr--4.0--4.1.sql
+share/postgresql/extension/repmgr--4.0.sql
+share/postgresql/extension/repmgr--4.1--4.2.sql
+share/postgresql/extension/repmgr--4.1.sql
+share/postgresql/extension/repmgr--4.2.sql
+share/postgresql/extension/repmgr--unpackaged--4.0.sql
+share/postgresql/extension/repmgr.control

Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] repmgr

Martijn van Duren-7
ping

repmgrd now also tested correctly.

On 11/12/18 4:34 PM, Martijn van Duren wrote:

> On 11/12/18 4:30 PM, Martijn van Duren wrote:
>> When trying a new test-setup I found that our repmgr is quite out of
>> date. Here's a simple update to version 4.2.
>>
>> I haven't tested it with upgrading from our current version, but I have
>> tested it very basically on a streaming replication setup with setup,
>> failover, and switchover via repmgr. Repmgrd untested.
>>
>> OK?
>>
>> martijn@
>>
> And of course I overlooked the patches-directory.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/databases/repmgr/Makefile,v
> retrieving revision 1.8
> diff -u -p -r1.8 Makefile
> --- Makefile 16 Mar 2016 16:46:32 -0000 1.8
> +++ Makefile 12 Nov 2018 15:33:40 -0000
> @@ -2,9 +2,10 @@
>  
>  COMMENT = HA and replication cluster management for PostgreSQL
>  
> -DISTNAME = repmgr-3.0.3
> +DISTNAME = repmgr-4.2
>  CATEGORIES = databases
>  HOMEPAGE = http://www.repmgr.org/
> +WRKDIST = ${WRKDIR}/${DISTNAME}.0
>  
>  # GPLv3
>  PERMIT_PACKAGE_CDROM = Yes
> @@ -13,6 +14,7 @@ WANTLIB += c crypto m pq pthread readlin
>  
>  MASTER_SITES = ${HOMEPAGE}download/
>  USE_GMAKE = Yes
> +CONFIGURE_STYLE = gnu
>  MAKE_FLAGS = USE_PGXS=1
>  
>  # for getopt_long.h
> @@ -23,7 +25,7 @@ RUN_DEPENDS = net/rsync
>  NO_TEST = Yes
>  
>  pre-configure:
> - ${SUBST_CMD} ${WRKSRC}/config.c
> + ${SUBST_CMD} ${WRKSRC}/configfile.c
>  
>  post-install:
>   ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/repmgr
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/databases/repmgr/distinfo,v
> retrieving revision 1.4
> diff -u -p -r1.4 distinfo
> --- distinfo 23 Jan 2016 18:01:07 -0000 1.4
> +++ distinfo 12 Nov 2018 15:33:40 -0000
> @@ -1,2 +1,2 @@
> -SHA256 (repmgr-3.0.3.tar.gz) = My5PpsuVkZOs7f0UEGDxgjQWR2a/7PQ8cfK3YVQoOBQ=
> -SIZE (repmgr-3.0.3.tar.gz) = 102211
> +SHA256 (repmgr-4.2.tar.gz) = jfYcn0TgUgesWld6a1KYdpfuQv+FCxTznl7hNaFXzv0=
> +SIZE (repmgr-4.2.tar.gz) = 341556
> Index: patches/patch-config_c
> ===================================================================
> RCS file: patches/patch-config_c
> diff -N patches/patch-config_c
> --- patches/patch-config_c 23 Jan 2016 18:01:07 -0000 1.1
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,16 +0,0 @@
> -$OpenBSD: patch-config_c,v 1.1 2016/01/23 18:01:07 ajacoutot Exp $
> ---- config.c.orig Sat Jan 23 18:59:43 2016
> -+++ config.c Sat Jan 23 18:59:34 2016
> -@@ -128,10 +128,10 @@ load_config(const char *config_file, bool verbose, t_c
> - /* 2. "/etc/repmgr.conf" */
> - if (verbose == true)
> - {
> -- log_notice(_("looking for configuration file in /etc\n"));
> -+ log_notice(_("looking for configuration file in ${SYSCONFDIR}\n"));
> - }
> -
> -- snprintf(config_file_path, MAXPGPATH, "/etc/%s", CONFIG_FILE_NAME);
> -+ snprintf(config_file_path, MAXPGPATH, "${SYSCONFDIR}/%s", CONFIG_FILE_NAME);
> - if (stat(config_file_path, &stat_config) == 0)
> - {
> - config_file_found = true;
> Index: patches/patch-configfile_c
> ===================================================================
> RCS file: patches/patch-configfile_c
> diff -N patches/patch-configfile_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-configfile_c 12 Nov 2018 15:33:40 -0000
> @@ -0,0 +1,16 @@
> +$OpenBSD: patch-configfile_c,v 1.1 2016/01/23 18:01:07 ajacoutot Exp $
> +Index: configfile.c
> +--- configfile.c.orig
> ++++ configfile.c
> +@@ -188,9 +188,9 @@ load_config(const char *config_file, bool verbose, boo
> +
> + /* 3. "/etc/repmgr.conf" */
> + if (verbose == true)
> +- fprintf(stdout, _("INFO: looking for configuration file in /etc\n"));
> ++ fprintf(stdout, _("INFO: looking for configuration file in ${SYSCONFDIR}\n"));
> +
> +- maxpath_snprintf(config_file_path, "/etc/%s", CONFIG_FILE_NAME);
> ++ maxpath_snprintf(config_file_path, "${SYSCONFDIR}/%s", CONFIG_FILE_NAME);
> + if (stat(config_file_path, &stat_config) == 0)
> + {
> + config_file_found = true;
> Index: pkg/PLIST
> ===================================================================
> RCS file: /cvs/ports/databases/repmgr/pkg/PLIST,v
> retrieving revision 1.2
> diff -u -p -r1.2 PLIST
> --- pkg/PLIST 19 Sep 2015 21:37:12 -0000 1.2
> +++ pkg/PLIST 12 Nov 2018 15:33:40 -0000
> @@ -1,14 +1,17 @@
>  @comment $OpenBSD: PLIST,v 1.2 2015/09/19 21:37:12 landry Exp $
>  @bin bin/repmgr
>  @bin bin/repmgrd
> -lib/postgresql/repmgr_funcs.so
> +lib/postgresql/repmgr.so
>  share/doc/repmgr/
>  share/doc/repmgr/README.md
>  share/examples/repmgr/
>  share/examples/repmgr/repmgr.conf
>  @sample ${SYSCONFDIR}/repmgr.conf
> -share/postgresql/contrib/
> -share/postgresql/contrib/repmgr.sql
> -share/postgresql/contrib/repmgr_funcs.sql
> -share/postgresql/contrib/uninstall_repmgr.sql
> -share/postgresql/contrib/uninstall_repmgr_funcs.sql
> +share/postgresql/extension/
> +share/postgresql/extension/repmgr--4.0--4.1.sql
> +share/postgresql/extension/repmgr--4.0.sql
> +share/postgresql/extension/repmgr--4.1--4.2.sql
> +share/postgresql/extension/repmgr--4.1.sql
> +share/postgresql/extension/repmgr--4.2.sql
> +share/postgresql/extension/repmgr--unpackaged--4.0.sql
> +share/postgresql/extension/repmgr.control
>

Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] repmgr

Martijn van Duren-7
ping

On 11/20/18 8:27 AM, Martijn van Duren wrote:

> ping
>
> repmgrd now also tested correctly.
>
> On 11/12/18 4:34 PM, Martijn van Duren wrote:
>> On 11/12/18 4:30 PM, Martijn van Duren wrote:
>>> When trying a new test-setup I found that our repmgr is quite out of
>>> date. Here's a simple update to version 4.2.
>>>
>>> I haven't tested it with upgrading from our current version, but I have
>>> tested it very basically on a streaming replication setup with setup,
>>> failover, and switchover via repmgr. Repmgrd untested.
>>>
>>> OK?
>>>
>>> martijn@
>>>
>> And of course I overlooked the patches-directory.
>>
>> Index: Makefile
>> ===================================================================
>> RCS file: /cvs/ports/databases/repmgr/Makefile,v
>> retrieving revision 1.8
>> diff -u -p -r1.8 Makefile
>> --- Makefile 16 Mar 2016 16:46:32 -0000 1.8
>> +++ Makefile 12 Nov 2018 15:33:40 -0000
>> @@ -2,9 +2,10 @@
>>  
>>  COMMENT = HA and replication cluster management for PostgreSQL
>>  
>> -DISTNAME = repmgr-3.0.3
>> +DISTNAME = repmgr-4.2
>>  CATEGORIES = databases
>>  HOMEPAGE = http://www.repmgr.org/
>> +WRKDIST = ${WRKDIR}/${DISTNAME}.0
>>  
>>  # GPLv3
>>  PERMIT_PACKAGE_CDROM = Yes
>> @@ -13,6 +14,7 @@ WANTLIB += c crypto m pq pthread readlin
>>  
>>  MASTER_SITES = ${HOMEPAGE}download/
>>  USE_GMAKE = Yes
>> +CONFIGURE_STYLE = gnu
>>  MAKE_FLAGS = USE_PGXS=1
>>  
>>  # for getopt_long.h
>> @@ -23,7 +25,7 @@ RUN_DEPENDS = net/rsync
>>  NO_TEST = Yes
>>  
>>  pre-configure:
>> - ${SUBST_CMD} ${WRKSRC}/config.c
>> + ${SUBST_CMD} ${WRKSRC}/configfile.c
>>  
>>  post-install:
>>   ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/repmgr
>> Index: distinfo
>> ===================================================================
>> RCS file: /cvs/ports/databases/repmgr/distinfo,v
>> retrieving revision 1.4
>> diff -u -p -r1.4 distinfo
>> --- distinfo 23 Jan 2016 18:01:07 -0000 1.4
>> +++ distinfo 12 Nov 2018 15:33:40 -0000
>> @@ -1,2 +1,2 @@
>> -SHA256 (repmgr-3.0.3.tar.gz) = My5PpsuVkZOs7f0UEGDxgjQWR2a/7PQ8cfK3YVQoOBQ=
>> -SIZE (repmgr-3.0.3.tar.gz) = 102211
>> +SHA256 (repmgr-4.2.tar.gz) = jfYcn0TgUgesWld6a1KYdpfuQv+FCxTznl7hNaFXzv0=
>> +SIZE (repmgr-4.2.tar.gz) = 341556
>> Index: patches/patch-config_c
>> ===================================================================
>> RCS file: patches/patch-config_c
>> diff -N patches/patch-config_c
>> --- patches/patch-config_c 23 Jan 2016 18:01:07 -0000 1.1
>> +++ /dev/null 1 Jan 1970 00:00:00 -0000
>> @@ -1,16 +0,0 @@
>> -$OpenBSD: patch-config_c,v 1.1 2016/01/23 18:01:07 ajacoutot Exp $
>> ---- config.c.orig Sat Jan 23 18:59:43 2016
>> -+++ config.c Sat Jan 23 18:59:34 2016
>> -@@ -128,10 +128,10 @@ load_config(const char *config_file, bool verbose, t_c
>> - /* 2. "/etc/repmgr.conf" */
>> - if (verbose == true)
>> - {
>> -- log_notice(_("looking for configuration file in /etc\n"));
>> -+ log_notice(_("looking for configuration file in ${SYSCONFDIR}\n"));
>> - }
>> -
>> -- snprintf(config_file_path, MAXPGPATH, "/etc/%s", CONFIG_FILE_NAME);
>> -+ snprintf(config_file_path, MAXPGPATH, "${SYSCONFDIR}/%s", CONFIG_FILE_NAME);
>> - if (stat(config_file_path, &stat_config) == 0)
>> - {
>> - config_file_found = true;
>> Index: patches/patch-configfile_c
>> ===================================================================
>> RCS file: patches/patch-configfile_c
>> diff -N patches/patch-configfile_c
>> --- /dev/null 1 Jan 1970 00:00:00 -0000
>> +++ patches/patch-configfile_c 12 Nov 2018 15:33:40 -0000
>> @@ -0,0 +1,16 @@
>> +$OpenBSD: patch-configfile_c,v 1.1 2016/01/23 18:01:07 ajacoutot Exp $
>> +Index: configfile.c
>> +--- configfile.c.orig
>> ++++ configfile.c
>> +@@ -188,9 +188,9 @@ load_config(const char *config_file, bool verbose, boo
>> +
>> + /* 3. "/etc/repmgr.conf" */
>> + if (verbose == true)
>> +- fprintf(stdout, _("INFO: looking for configuration file in /etc\n"));
>> ++ fprintf(stdout, _("INFO: looking for configuration file in ${SYSCONFDIR}\n"));
>> +
>> +- maxpath_snprintf(config_file_path, "/etc/%s", CONFIG_FILE_NAME);
>> ++ maxpath_snprintf(config_file_path, "${SYSCONFDIR}/%s", CONFIG_FILE_NAME);
>> + if (stat(config_file_path, &stat_config) == 0)
>> + {
>> + config_file_found = true;
>> Index: pkg/PLIST
>> ===================================================================
>> RCS file: /cvs/ports/databases/repmgr/pkg/PLIST,v
>> retrieving revision 1.2
>> diff -u -p -r1.2 PLIST
>> --- pkg/PLIST 19 Sep 2015 21:37:12 -0000 1.2
>> +++ pkg/PLIST 12 Nov 2018 15:33:40 -0000
>> @@ -1,14 +1,17 @@
>>  @comment $OpenBSD: PLIST,v 1.2 2015/09/19 21:37:12 landry Exp $
>>  @bin bin/repmgr
>>  @bin bin/repmgrd
>> -lib/postgresql/repmgr_funcs.so
>> +lib/postgresql/repmgr.so
>>  share/doc/repmgr/
>>  share/doc/repmgr/README.md
>>  share/examples/repmgr/
>>  share/examples/repmgr/repmgr.conf
>>  @sample ${SYSCONFDIR}/repmgr.conf
>> -share/postgresql/contrib/
>> -share/postgresql/contrib/repmgr.sql
>> -share/postgresql/contrib/repmgr_funcs.sql
>> -share/postgresql/contrib/uninstall_repmgr.sql
>> -share/postgresql/contrib/uninstall_repmgr_funcs.sql
>> +share/postgresql/extension/
>> +share/postgresql/extension/repmgr--4.0--4.1.sql
>> +share/postgresql/extension/repmgr--4.0.sql
>> +share/postgresql/extension/repmgr--4.1--4.2.sql
>> +share/postgresql/extension/repmgr--4.1.sql
>> +share/postgresql/extension/repmgr--4.2.sql
>> +share/postgresql/extension/repmgr--unpackaged--4.0.sql
>> +share/postgresql/extension/repmgr.control
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: [UPDATE] repmgr

Martijn van Duren-7
ping

On 1/24/19 1:28 PM, Martijn van Duren wrote:

> ping
>
> On 11/20/18 8:27 AM, Martijn van Duren wrote:
>> ping
>>
>> repmgrd now also tested correctly.
>>
>> On 11/12/18 4:34 PM, Martijn van Duren wrote:
>>> On 11/12/18 4:30 PM, Martijn van Duren wrote:
>>>> When trying a new test-setup I found that our repmgr is quite out of
>>>> date. Here's a simple update to version 4.2.
>>>>
>>>> I haven't tested it with upgrading from our current version, but I have
>>>> tested it very basically on a streaming replication setup with setup,
>>>> failover, and switchover via repmgr. Repmgrd untested.
>>>>
>>>> OK?
>>>>
>>>> martijn@
>>>>
>>> And of course I overlooked the patches-directory.
>>>
>>> Index: Makefile
>>> ===================================================================
>>> RCS file: /cvs/ports/databases/repmgr/Makefile,v
>>> retrieving revision 1.8
>>> diff -u -p -r1.8 Makefile
>>> --- Makefile 16 Mar 2016 16:46:32 -0000 1.8
>>> +++ Makefile 12 Nov 2018 15:33:40 -0000
>>> @@ -2,9 +2,10 @@
>>>  
>>>  COMMENT = HA and replication cluster management for PostgreSQL
>>>  
>>> -DISTNAME = repmgr-3.0.3
>>> +DISTNAME = repmgr-4.2
>>>  CATEGORIES = databases
>>>  HOMEPAGE = http://www.repmgr.org/
>>> +WRKDIST = ${WRKDIR}/${DISTNAME}.0
>>>  
>>>  # GPLv3
>>>  PERMIT_PACKAGE_CDROM = Yes
>>> @@ -13,6 +14,7 @@ WANTLIB += c crypto m pq pthread readlin
>>>  
>>>  MASTER_SITES = ${HOMEPAGE}download/
>>>  USE_GMAKE = Yes
>>> +CONFIGURE_STYLE = gnu
>>>  MAKE_FLAGS = USE_PGXS=1
>>>  
>>>  # for getopt_long.h
>>> @@ -23,7 +25,7 @@ RUN_DEPENDS = net/rsync
>>>  NO_TEST = Yes
>>>  
>>>  pre-configure:
>>> - ${SUBST_CMD} ${WRKSRC}/config.c
>>> + ${SUBST_CMD} ${WRKSRC}/configfile.c
>>>  
>>>  post-install:
>>>   ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/repmgr
>>> Index: distinfo
>>> ===================================================================
>>> RCS file: /cvs/ports/databases/repmgr/distinfo,v
>>> retrieving revision 1.4
>>> diff -u -p -r1.4 distinfo
>>> --- distinfo 23 Jan 2016 18:01:07 -0000 1.4
>>> +++ distinfo 12 Nov 2018 15:33:40 -0000
>>> @@ -1,2 +1,2 @@
>>> -SHA256 (repmgr-3.0.3.tar.gz) = My5PpsuVkZOs7f0UEGDxgjQWR2a/7PQ8cfK3YVQoOBQ=
>>> -SIZE (repmgr-3.0.3.tar.gz) = 102211
>>> +SHA256 (repmgr-4.2.tar.gz) = jfYcn0TgUgesWld6a1KYdpfuQv+FCxTznl7hNaFXzv0=
>>> +SIZE (repmgr-4.2.tar.gz) = 341556
>>> Index: patches/patch-config_c
>>> ===================================================================
>>> RCS file: patches/patch-config_c
>>> diff -N patches/patch-config_c
>>> --- patches/patch-config_c 23 Jan 2016 18:01:07 -0000 1.1
>>> +++ /dev/null 1 Jan 1970 00:00:00 -0000
>>> @@ -1,16 +0,0 @@
>>> -$OpenBSD: patch-config_c,v 1.1 2016/01/23 18:01:07 ajacoutot Exp $
>>> ---- config.c.orig Sat Jan 23 18:59:43 2016
>>> -+++ config.c Sat Jan 23 18:59:34 2016
>>> -@@ -128,10 +128,10 @@ load_config(const char *config_file, bool verbose, t_c
>>> - /* 2. "/etc/repmgr.conf" */
>>> - if (verbose == true)
>>> - {
>>> -- log_notice(_("looking for configuration file in /etc\n"));
>>> -+ log_notice(_("looking for configuration file in ${SYSCONFDIR}\n"));
>>> - }
>>> -
>>> -- snprintf(config_file_path, MAXPGPATH, "/etc/%s", CONFIG_FILE_NAME);
>>> -+ snprintf(config_file_path, MAXPGPATH, "${SYSCONFDIR}/%s", CONFIG_FILE_NAME);
>>> - if (stat(config_file_path, &stat_config) == 0)
>>> - {
>>> - config_file_found = true;
>>> Index: patches/patch-configfile_c
>>> ===================================================================
>>> RCS file: patches/patch-configfile_c
>>> diff -N patches/patch-configfile_c
>>> --- /dev/null 1 Jan 1970 00:00:00 -0000
>>> +++ patches/patch-configfile_c 12 Nov 2018 15:33:40 -0000
>>> @@ -0,0 +1,16 @@
>>> +$OpenBSD: patch-configfile_c,v 1.1 2016/01/23 18:01:07 ajacoutot Exp $
>>> +Index: configfile.c
>>> +--- configfile.c.orig
>>> ++++ configfile.c
>>> +@@ -188,9 +188,9 @@ load_config(const char *config_file, bool verbose, boo
>>> +
>>> + /* 3. "/etc/repmgr.conf" */
>>> + if (verbose == true)
>>> +- fprintf(stdout, _("INFO: looking for configuration file in /etc\n"));
>>> ++ fprintf(stdout, _("INFO: looking for configuration file in ${SYSCONFDIR}\n"));
>>> +
>>> +- maxpath_snprintf(config_file_path, "/etc/%s", CONFIG_FILE_NAME);
>>> ++ maxpath_snprintf(config_file_path, "${SYSCONFDIR}/%s", CONFIG_FILE_NAME);
>>> + if (stat(config_file_path, &stat_config) == 0)
>>> + {
>>> + config_file_found = true;
>>> Index: pkg/PLIST
>>> ===================================================================
>>> RCS file: /cvs/ports/databases/repmgr/pkg/PLIST,v
>>> retrieving revision 1.2
>>> diff -u -p -r1.2 PLIST
>>> --- pkg/PLIST 19 Sep 2015 21:37:12 -0000 1.2
>>> +++ pkg/PLIST 12 Nov 2018 15:33:40 -0000
>>> @@ -1,14 +1,17 @@
>>>  @comment $OpenBSD: PLIST,v 1.2 2015/09/19 21:37:12 landry Exp $
>>>  @bin bin/repmgr
>>>  @bin bin/repmgrd
>>> -lib/postgresql/repmgr_funcs.so
>>> +lib/postgresql/repmgr.so
>>>  share/doc/repmgr/
>>>  share/doc/repmgr/README.md
>>>  share/examples/repmgr/
>>>  share/examples/repmgr/repmgr.conf
>>>  @sample ${SYSCONFDIR}/repmgr.conf
>>> -share/postgresql/contrib/
>>> -share/postgresql/contrib/repmgr.sql
>>> -share/postgresql/contrib/repmgr_funcs.sql
>>> -share/postgresql/contrib/uninstall_repmgr.sql
>>> -share/postgresql/contrib/uninstall_repmgr_funcs.sql
>>> +share/postgresql/extension/
>>> +share/postgresql/extension/repmgr--4.0--4.1.sql
>>> +share/postgresql/extension/repmgr--4.0.sql
>>> +share/postgresql/extension/repmgr--4.1--4.2.sql
>>> +share/postgresql/extension/repmgr--4.1.sql
>>> +share/postgresql/extension/repmgr--4.2.sql
>>> +share/postgresql/extension/repmgr--unpackaged--4.0.sql
>>> +share/postgresql/extension/repmgr.control
>>>
>>
>