Index: head/databases/pgbarman/Makefile =================================================================== --- head/databases/pgbarman/Makefile (revision 422996) +++ head/databases/pgbarman/Makefile (revision 422997) @@ -1,46 +1,56 @@ # Created by: Matthew Seaman # $FreeBSD$ PORTNAME= barman -DISTVERSION= 1.6.1 +DISTVERSION= 2.0 CATEGORIES= databases MASTER_SITES= SF/${PKGNAMEPREFIX}${PORTNAME}/${DISTVERSION} PKGNAMEPREFIX= pg DISTFILES= ${DISTNAME}${EXTRACT_SUFX} tutorial.pdf EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} 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 \ ${PYTHON_PKGNAMEPREFIX}dateutil>=2.1:devel/py-dateutil \ ${PYTHON_PKGNAMEPREFIX}argh>=0.21.2:devel/py-argh \ ${PYTHON_PKGNAMEPREFIX}argcomplete>0:devel/py-argcomplete NO_ARCH= yes USERS= barman GROUPS= barman USES= pgsql python WANT_PGSQL= client USE_PYTHON= autoplist distutils PORTDOCS= tutorial.pdf +.include + +.if ${PGSQL_VER:M9\.[12345]} +PGUSER= pgsql +.else +PGUSER= postgres +.endif + post-extract: ${CP} ${DISTDIR}/${PORTDOCS} ${WRKDIR}/ post-patch: ${SED} -i -e "s@%%PREFIX%%@${PREFIX}@" ${WRKSRC}/barman/config.py + ${SED} -i -e "s@%%PREFIX%%@${PREFIX}@" ${WRKSRC}/doc/barman.conf + ${SED} -i -e "s@%%PGUSER%%@${PGUSER}@" ${WRKSRC}/doc/barman.5 post-install: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_MAN} ${WRKDIR}/${PORTDOCS} ${STAGEDIR}${DOCSDIR} ${MKDIR} ${STAGEDIR}${ETCDIR} ${INSTALL_DATA} ${WRKSRC}/doc/barman.conf ${STAGEDIR}${ETCDIR}/barman.conf.sample -.include +.include Index: head/databases/pgbarman/distinfo =================================================================== --- head/databases/pgbarman/distinfo (revision 422996) +++ head/databases/pgbarman/distinfo (revision 422997) @@ -1,5 +1,5 @@ -TIMESTAMP = 1464011005 -SHA256 (barman-1.6.1.tar.gz) = 2fb8bbf0a386114dda4f1ade3e02a79aede5e3dd77c6b8d4f872b75fd1427e65 -SIZE (barman-1.6.1.tar.gz) = 189826 +TIMESTAMP = 1475218946 +SHA256 (barman-2.0.tar.gz) = 063c7bec1cda13175b615fe910418622e564405a68694ea179273f0b3713e8e4 +SIZE (barman-2.0.tar.gz) = 231486 SHA256 (tutorial.pdf) = 21acf6152b959c55b996fb6479c722d3f416eac3384479498a25911a3912a158 SIZE (tutorial.pdf) = 349394 Index: head/databases/pgbarman/files/patch-barman_config.py =================================================================== --- head/databases/pgbarman/files/patch-barman_config.py (revision 422996) +++ head/databases/pgbarman/files/patch-barman_config.py (revision 422997) @@ -1,13 +1,13 @@ ---- barman/config.py.orig 2015-09-25 15:06:25 UTC +--- barman/config.py.orig 2016-09-23 12:56:55 UTC +++ barman/config.py -@@ -429,8 +429,8 @@ class Config(object): +@@ -520,8 +520,8 @@ class Config(object): """ CONFIG_FILES = [ '~/.barman.conf', - '/etc/barman.conf', - '/etc/barman/barman.conf', + '%%PREFIX%%/etc/barman.conf', + '%%PREFIX%%/etc/barman/barman.conf', ] _QUOTE_RE = re.compile(r"""^(["'])(.*)\1$""") Index: head/databases/pgbarman/files/patch-doc_barman.5 =================================================================== --- head/databases/pgbarman/files/patch-doc_barman.5 (revision 422996) +++ head/databases/pgbarman/files/patch-doc_barman.5 (revision 422997) @@ -1,54 +1,58 @@ ---- doc/barman.5.orig 2015-09-25 15:06:25 UTC +--- doc/barman.5.orig 2016-09-26 15:32:17 UTC +++ doc/barman.5 -@@ -8,7 +8,7 @@ The system\-level Barman configuration f +@@ -17,7 +17,7 @@ The system\-level Barman configuration f .IP .nf \f[C] -/etc/barman.conf -+/usr/local/etc/barman.conf ++%%PREFIX%%/etc/barman.conf \f[] .fi .PP -@@ -16,7 +16,7 @@ or +@@ -25,7 +25,7 @@ or .IP .nf \f[C] -/etc/barman/barman.conf -+/usr/local/etc/barman/barman.conf ++%%PREFIX%%/etc/barman/barman.conf \f[] .fi .PP -@@ -42,9 +42,9 @@ configurations. +@@ -51,9 +51,9 @@ configurations. 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]/usr/local/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[] file inside the \f[C]/etc/barman.d\f[] folder. -+\f[C]\&.conf\f[] file inside the \f[C]/usr/local/etc/barman.d\f[] folder. ++\f[C]\&.conf\f[] file inside the \f[C]%%PREFIX%%/etc/barman.d\f[] folder. .SH OPTIONS .TP .B active -@@ -445,7 +445,7 @@ Here is an example of configuration file +@@ -608,7 +608,7 @@ Here is an example of configuration file \f[C] [barman] ;\ Main\ directory -barman_home\ =\ /var/lib/barman +barman_home\ =\ /var/barman ;\ System\ user barman_user\ =\ barman -@@ -465,10 +465,10 @@ reuse_backup\ =\ link +@@ -628,13 +628,13 @@ reuse_backup\ =\ link description\ =\ \ "Main\ PostgreSQL\ Database" ;\ SSH\ options -ssh_command\ =\ ssh\ postgres\@pg -+ssh_command\ =\ ssh\ pgsql\@pg ++ssh_command\ =\ ssh\ %%PGUSER%%\@pg ;\ PostgreSQL\ connection\ string -conninfo\ =\ host=pg\ user=postgres -+conninfo\ =\ host=pg\ user=pgsql\ db=postgres ++conninfo\ =\ host=pg\ user=%%PGUSER%%\ db=postgres + + ;\ 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 Index: head/databases/pgbarman/files/patch-doc_barman.conf =================================================================== --- head/databases/pgbarman/files/patch-doc_barman.conf (revision 422996) +++ head/databases/pgbarman/files/patch-doc_barman.conf (revision 422997) @@ -1,35 +1,17 @@ ---- doc/barman.conf.orig 2014-08-18 10:29:45 UTC +--- doc/barman.conf.orig 2016-09-23 12:56:55 UTC +++ doc/barman.conf -@@ -5,7 +5,7 @@ - - [barman] - ; Main directory --barman_home = /var/lib/barman -+barman_home = /var/barman - - ; System user +@@ -8,11 +8,11 @@ barman_user = barman -@@ -25,8 +25,8 @@ log_file = /var/log/barman/barman.log - ;post_archive_script = env | grep ^BARMAN ; Directory of configuration files. Place your sections in separate files with .conf extension -; For example place the 'main' server section in /etc/barman.d/main.conf --;configuration_files_directory = /etc/barman.d -+; For example place the 'main' server section in /usr/local/etc/barman.d/main.conf -+;configuration_files_directory = /usr/local/etc/barman.d +-configuration_files_directory = /etc/barman.d ++; For example place the 'main' server section in %%PREFIX%%/etc/barman.d/main.conf ++configuration_files_directory = %%PREFIX%%/etc/barman.d - ; Minimum number of required backups (redundancy) - default 0 - ;minimum_redundancy = 0 -@@ -68,10 +68,10 @@ log_file = /var/log/barman/barman.log - ;; description = "Main PostgreSQL Database" - ;; - ;; ; SSH options --;; ssh_command = ssh postgres@pg -+;; ssh_command = ssh pgsql@pg - ;; - ;; ; PostgreSQL connection string --;; conninfo = host=pg user=postgres -+;; conninfo = host=pg user=pgsql dbname=postgres - ;; - ;; ; Minimum number of required backups (redundancy) - ;; ; minimum_redundancy = 1 + ; Main directory +-barman_home = /var/lib/barman ++barman_home = /var/barman + + ; Locks directory - default: %(barman_home)s + ;barman_lock_directory = /var/run/barman Index: head/databases/pgbarman/files/patch-setup.py =================================================================== --- head/databases/pgbarman/files/patch-setup.py (revision 422996) +++ head/databases/pgbarman/files/patch-setup.py (revision 422997) @@ -1,13 +1,13 @@ ---- setup.py.orig 2014-12-03 15:50:50 UTC +--- setup.py.orig 2016-09-23 15:43:57 UTC +++ setup.py -@@ -74,8 +74,8 @@ setup( +@@ -69,8 +69,8 @@ setup( packages=['barman', ], scripts=['bin/barman', ], data_files=[ - ('share/man/man1', ['doc/barman.1']), - ('share/man/man5', ['doc/barman.5']), + ('man/man1', ['doc/barman.1']), + ('man/man5', ['doc/barman.5']), ], license='GPL-3.0', description=__doc__.split("\n")[0],