git: 73e9076cbb64 - main - databases/pgbarman: Update to 2.17

From: Matthew Seaman <matthew_at_FreeBSD.org>
Date: Fri, 17 Dec 2021 13:51:26 UTC
The branch main has been updated by matthew:

URL: https://cgit.FreeBSD.org/ports/commit/?id=73e9076cbb643952df24c76910e6538d597f92ef

commit 73e9076cbb643952df24c76910e6538d597f92ef
Author:     Matthew Seaman <matthew@FreeBSD.org>
AuthorDate: 2021-12-17 13:40:37 +0000
Commit:     Matthew Seaman <matthew@FreeBSD.org>
CommitDate: 2021-12-17 13:51:15 +0000

    databases/pgbarman: Update to 2.17
    
    Following upstream changes, switch master site to GitHub, including
    for hte pre-build PDF manual.
    
    Drop support for python-3.6 -- the software claims to support this
    version, but setup.py fails with an obscure error, and considering
    that python-3.6 is going out of support at the end of this month, I
    could not justify the time to develop a compatibility fix.
    
    Drop the USE_PYTHON 'optsuffix' flag in favour of an explicit
    PKGNAMESUFFIX
    
    As reported in PR 260340, appending the python version to the barman
    ${ETCDIR} doesn't make sense.  Fix this by dropping the USE_PYTHON
    'concurrent' flag, which doesn't really make sense for end-user
    software rather than library modules. (1)
    
    PR:             260340 (1)
    Reported by:    bsd at abinet.ru
---
 databases/pgbarman/Makefile                     | 37 ++++++++-------
 databases/pgbarman/distinfo                     | 10 ++--
 databases/pgbarman/files/patch-barman_config.py | 16 +++----
 databases/pgbarman/files/patch-doc_barman.5     | 62 ++++++++++++-------------
 databases/pgbarman/files/patch-setup.py         | 37 ++++++---------
 5 files changed, 80 insertions(+), 82 deletions(-)

diff --git a/databases/pgbarman/Makefile b/databases/pgbarman/Makefile
index b335b9056545..392fde0e1183 100644
--- a/databases/pgbarman/Makefile
+++ b/databases/pgbarman/Makefile
@@ -1,26 +1,27 @@
 # Created by: Matthew Seaman
 
-PORTNAME=	barman
-DISTVERSION=	2.12
-CATEGORIES=	databases
-MASTER_SITES=	SF/${PKGNAMEPREFIX}${PORTNAME}/${DISTVERSION}
-PKGNAMEPREFIX=	pg
-DISTFILES=	${DISTNAME}${EXTRACT_SUFX} manual.pdf
-EXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
+PORTNAME=		barman
+DISTVERSIONPREFIX=	release/
+DISTVERSION=		2.17
+CATEGORIES=		databases
+PKGNAMEPREFIX=		pg
+PKGNAMESUFFIX=		${PYTHON_PKGNAMESUFFIX}
 
 MAINTAINER=	matthew@FreeBSD.org
 COMMENT=	Backup and recovery manager for PostgreSQL
 
 LICENSE=	GPLv3
 
-RUN_DEPENDS=	rsync:net/rsync						\
-		${PYTHON_PKGNAMEPREFIX}psycopg2>0:databases/py-psycopg2@${PY_FLAVOR}	\
-		${PYTHON_PKGNAMEPREFIX}dateutil>=2.1:devel/py-dateutil@${PY_FLAVOR}	\
-		${PYTHON_PKGNAMEPREFIX}argh>=0.21.2:devel/py-argh@${PY_FLAVOR} \
+RUN_DEPENDS=	rsync:net/rsync									\
+		${PYTHON_PKGNAMEPREFIX}psycopg2>=2.4.2:databases/py-psycopg2@${PY_FLAVOR}	\
+		${PYTHON_PKGNAMEPREFIX}dateutil>0:devel/py-dateutil@${PY_FLAVOR}		\
 		${PYTHON_PKGNAMEPREFIX}argcomplete>0:devel/py-argcomplete@${PY_FLAVOR}
 
-USES=		pgsql python:3.6+
-USE_PYTHON=	autoplist distutils concurrent optsuffix
+USES=		pgsql python:3.7+
+USE_PYTHON=	autoplist distutils
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	EnterpriseDB
 
 WANT_PGSQL=	client
 NO_ARCH=	yes
@@ -28,9 +29,13 @@ NO_ARCH=	yes
 USERS=		barman
 GROUPS=		barman
 
-PORTDOCS=	manual.pdf
+OPTIONS_DEFINE=		DOCS
 
-OPTIONS_DEFINE=	DOCS
+DOCS_DESC=	Install PDF manual
+DOCS_VARS=	PORTDOCS=barman-${DISTVERSION}-manual.pdf \
+		MASTER_SITES+=https://github.com/${GH_ACCOUNT}/${PORTNAME}/releases/download/release%2F${DISTVERSION}/:docs \
+		DISTFILES+=barman-${DISTVERSION}-manual.pdf:docs \
+		EXTRACT_ONLY=${DISTNAME}${EXTRACT_SUFX}
 
 .include <bsd.port.pre.mk>
 
@@ -40,7 +45,7 @@ PGUSER=		pgsql
 PGUSER=		postgres
 .endif
 
-post-extract:
+post-extract-DOCS-on:
 	${CP} ${DISTDIR}/${PORTDOCS} ${WRKDIR}/
 
 post-patch:
diff --git a/databases/pgbarman/distinfo b/databases/pgbarman/distinfo
index aff7e52a552d..33198a3ea82e 100644
--- a/databases/pgbarman/distinfo
+++ b/databases/pgbarman/distinfo
@@ -1,5 +1,5 @@
-TIMESTAMP = 1604832658
-SHA256 (barman-2.12.tar.gz) = 4ecf08ead94fd86469f7438820a5f2f9c4565af50edd29bceb3ab676d54fe581
-SIZE (barman-2.12.tar.gz) = 1262415
-SHA256 (manual.pdf) = 67ffc0edc6132eb0ec0e3630ba12caeaa21c082ad26af021bbde9b3678c8c664
-SIZE (manual.pdf) = 1317206
+TIMESTAMP = 1639744625
+SHA256 (barman-2.17-manual.pdf) = 0564e09e06cbec63a4fdd64baa7cae00a5d567a78718e30c26dff9687fbfe0de
+SIZE (barman-2.17-manual.pdf) = 1339247
+SHA256 (EnterpriseDB-barman-release-2.17_GH0.tar.gz) = f8ed145525b4ddc8ad3365964c33eced5559ec1441fcf95b2e28c67f30de6766
+SIZE (EnterpriseDB-barman-release-2.17_GH0.tar.gz) = 1392621
diff --git a/databases/pgbarman/files/patch-barman_config.py b/databases/pgbarman/files/patch-barman_config.py
index 9c510c52f6b6..3d22d892e578 100644
--- a/databases/pgbarman/files/patch-barman_config.py
+++ b/databases/pgbarman/files/patch-barman_config.py
@@ -1,13 +1,13 @@
---- barman/config.py.orig	2019-12-02 10:19:28 UTC
+--- barman/config.py.orig	2021-12-01 11:09:36 UTC
 +++ barman/config.py
-@@ -592,8 +592,8 @@ class Config(object):
-     """
+@@ -661,8 +661,8 @@ class Config(object):
+ 
      CONFIG_FILES = [
-         '~/.barman.conf',
--        '/etc/barman.conf',
--        '/etc/barman/barman.conf',
-+        '%%PREFIX%%/etc/barman.conf',
-+        '%%PREFIX%%/etc/barman/barman.conf',
+         "~/.barman.conf",
+-        "/etc/barman.conf",
+-        "/etc/barman/barman.conf",
++        "%%PREFIX%%/etc/barman.conf",
++        "%%PREFIX%%/etc/barman/barman.conf",
      ]
  
      _QUOTE_RE = re.compile(r"""^(["'])(.*)\1$""")
diff --git a/databases/pgbarman/files/patch-doc_barman.5 b/databases/pgbarman/files/patch-doc_barman.5
index f753f01839fc..abaa27b7fbed 100644
--- a/databases/pgbarman/files/patch-doc_barman.5
+++ b/databases/pgbarman/files/patch-doc_barman.5
@@ -1,12 +1,12 @@
---- doc/barman.5.orig	2019-12-02 10:19:28 UTC
+--- doc/barman.5.orig	2021-12-01 11:09:36 UTC
 +++ doc/barman.5
-@@ -17,7 +17,7 @@ The system-level Barman configuration file is located 
+@@ -17,7 +17,7 @@ The system\-level Barman configuration file is located
  .IP
  .nf
  \f[C]
 -/etc/barman.conf
 +%%PREFIX%%/etc/barman.conf
- \f[R]
+ \f[]
  .fi
  .PP
 @@ -25,7 +25,7 @@ or
@@ -15,44 +15,44 @@
  \f[C]
 -/etc/barman/barman.conf
 +%%PREFIX%%/etc/barman/barman.conf
- \f[R]
+ \f[]
  .fi
  .PP
 @@ -51,9 +51,9 @@ configurations.
- If the value of \f[C]configuration_files_directory\f[R] is a directory,
- Barman reads all files with \f[C].conf\f[R] extension that exist in that
- folder.
--For example, if you set it to \f[C]/etc/barman.d\f[R], you can specify
-+For example, if you set it to \f[C]%%PREFIX%%/etc/barman.d\f[R], you can specify
+ If the value of \f[C]configuration_files_directory\f[] is a directory,
+ Barman reads all files with \f[C]\&.conf\f[] extension that exist in
+ that folder.
+-For example, if you set it to \f[C]/etc/barman.d\f[], you can specify
++For example, if you set it to \f[C]%%PREFIX%%/etc/barman.d\f[], you can specify
  your PostgreSQL servers placing each section in a separate
--\f[C].conf\f[R] file inside the \f[C]/etc/barman.d\f[R] folder.
-+\f[C].conf\f[R] file inside the \f[C]%%PREFIX%%/etc/barman.d\f[R] folder.
+-\f[C]\&.conf\f[] file inside the \f[C]/etc/barman.d\f[] folder.
++\f[C]\&.conf\f[] file inside the \f[C]%%PREFIX%%/etc/barman.d\f[] folder.
  .SH OPTIONS
  .TP
- active
-@@ -632,7 +632,7 @@ Here is an example of configuration file:
+ .B active
+@@ -851,7 +851,7 @@ Here is an example of configuration file:
  \f[C]
  [barman]
- ; Main directory
--barman_home = /var/lib/barman
-+barman_home = /var/barman
+ ;\ Main\ directory
+-barman_home\ =\ /var/lib/barman
++barman_home\ =\ /var/barman
  
- ; System user
- barman_user = barman
-@@ -652,13 +652,13 @@ reuse_backup = link
- description =  \[dq]Main PostgreSQL Database\[dq]
+ ;\ System\ user
+ barman_user\ =\ barman
+@@ -871,13 +871,13 @@ reuse_backup\ =\ link
+ description\ =\ \ "Main\ PostgreSQL\ Database"
  
- ; SSH options
--ssh_command = ssh postgres\[at]pg
-+ssh_command = ssh %%PGUSER%%\[at]pg
+ ;\ SSH\ options
+-ssh_command\ =\ ssh\ postgres\@pg
++ssh_command\ =\ ssh\ %%PGUSER%%\@pg
  
- ; PostgreSQL connection string
--conninfo = host=pg user=postgres
-+conninfo = host=pg user=%%PGUSER%%
+ ;\ PostgreSQL\ connection\ string
+-conninfo\ =\ host=pg\ user=postgres
++conninfo\ =\ host=pg\ user=%%PGUSER%%
  
- ; PostgreSQL streaming connection string
--streaming_conninfo = host=pg user=postgres
-+streaming_conninfo = host=pg user=%%PGUSER%%
+ ;\ PostgreSQL\ streaming\ connection\ string
+-streaming_conninfo\ =\ host=pg\ user=postgres
++streaming_conninfo\ =\ host=pg\ user=%%PGUSER%%
  
- ; Minimum number of required backups (redundancy)
- minimum_redundancy = 1
+ ;\ Minimum\ number\ of\ required\ backups\ (redundancy)
+ minimum_redundancy\ =\ 1
diff --git a/databases/pgbarman/files/patch-setup.py b/databases/pgbarman/files/patch-setup.py
index 1dc83e103ea2..4c4266d4ee38 100644
--- a/databases/pgbarman/files/patch-setup.py
+++ b/databases/pgbarman/files/patch-setup.py
@@ -1,27 +1,20 @@
---- setup.py.orig	2020-07-08 09:12:30 UTC
+--- setup.py.orig	2021-12-01 11:09:36 UTC
 +++ setup.py
-@@ -70,15 +70,15 @@ setup(
-     url='http://www.pgbarman.org/',
+@@ -61,7 +61,7 @@ setup(
      packages=find_packages(exclude=["tests"]),
      data_files=[
--        ('share/man/man1', ['doc/barman.1',
--                            'doc/barman-cloud-backup.1',
--                            'doc/barman-cloud-backup-list.1',
--                            'doc/barman-cloud-restore.1',
--                            'doc/barman-cloud-wal-archive.1',
--                            'doc/barman-cloud-wal-restore.1',
--                            'doc/barman-wal-archive.1',
--                            'doc/barman-wal-restore.1']),
--        ('share/man/man5', ['doc/barman.5']),
-+        ('man/man1', ['doc/barman.1',
-+                      'doc/barman-cloud-backup.1',
-+                      'doc/barman-cloud-backup-list.1',
-+                      'doc/barman-cloud-restore.1',
-+                      'doc/barman-cloud-wal-archive.1',
-+                      'doc/barman-cloud-wal-restore.1',
-+                      'doc/barman-wal-archive.1',
-+                      'doc/barman-wal-restore.1']),
-+        ('man/man5', ['doc/barman.5']),
+         (
+-            "share/man/man1",
++            "man/man1",
+             [
+                 "doc/barman.1",
+                 "doc/barman-cloud-backup.1",
+@@ -73,7 +73,7 @@ setup(
+                 "doc/barman-wal-restore.1",
+             ],
+         ),
+-        ("share/man/man5", ["doc/barman.5"]),
++        ("man/man5", ["doc/barman.5"]),
      ],
      entry_points={
-         'console_scripts': [
+         "console_scripts": [