git: 3dd951e0c7e8 - main - archivers/urbackup-client: Fix the POSTGRESQL_DUMP_ENABLED option

Neel Chauhan nc at FreeBSD.org
Tue May 11 19:30:19 UTC 2021


The branch main has been updated by nc:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3dd951e0c7e881299101922fbb307cdaf375055a

commit 3dd951e0c7e881299101922fbb307cdaf375055a
Author:     Neel Chauhan <nc at FreeBSD.org>
AuthorDate: 2021-05-11 19:22:22 +0000
Commit:     Neel Chauhan <nc at FreeBSD.org>
CommitDate: 2021-05-11 19:30:14 +0000

    archivers/urbackup-client: Fix the POSTGRESQL_DUMP_ENABLED option
    
    The POSTGRESQL_DUMP_ENABLED option looks for the pg_dumpall command
    which is not in the PATH, so we append the PREFIX in the script.
    
    PR:             255509
    Submitted by:   Einar Bjarni Halldórsson <einar at isnic.is>
---
 archivers/urbackup-client/Makefile                      | 17 ++++++++++-------
 .../patch-urbackupclient_backup__scripts_postgresqldump | 15 +++++++++++++++
 2 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/archivers/urbackup-client/Makefile b/archivers/urbackup-client/Makefile
index 51528973f82a..63bc6e5b7c36 100644
--- a/archivers/urbackup-client/Makefile
+++ b/archivers/urbackup-client/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	urbackup-client
 DISTVERSION=	2.4.11.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	archivers
 MASTER_SITES=	https://hndl.urbackup.org/Client/${DISTVERSION:R}/
 
@@ -12,15 +12,16 @@ LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libcryptopp.so:security/cryptopp
 
-USES=		autoreconf compiler:c++11-lang dos2unix gettext localbase libtool \
-			pkgconfig sqlite:3
+USES=		autoreconf compiler:c++11-lang dos2unix gettext libtool \
+		localbase pkgconfig sqlite:3
 USE_RC_SUBR=	urbackup_client
 
 USERS=		urbackup
 GROUPS=		urbackup
 
 GNU_CONFIGURE=	yes
-CONFIGURE_ARGS=	--disable-clientupdate --without-embedded-sqlite3
+CONFIGURE_ARGS=	--disable-clientupdate \
+		--without-embedded-sqlite3
 CXXFLAGS+=	`pkgconf --cflags-only-other libcryptopp`
 
 SUB_FILES=	pkg-message urbackupclient.conf.sample-daemon
@@ -35,11 +36,13 @@ GUI_USE=		WX=3.0+
 GUI_CONFIGURE_ON=	--with-wx-config=${WX_CONFIG}
 GUI_CONFIGURE_OFF=	--enable-headless
 
-CONFFILES=	mariadbdump.conf \
-		mariadbxtrabackup.conf \
-		postgresbase.conf \
+CONFFILES=	mariadbdump.conf mariadbxtrabackup.conf postgresbase.conf \
 		postgresqldump.conf
 
+post-patch:
+	@${SED} -i "" -e "s:%%PREFIX%%:${PREFIX}:g" \
+		${WRKDIR}/urbackupclient/backup_scripts/postgresqldump
+
 post-stage:
 	${INSTALL_DATA} ${WRKDIR}/urbackupclient.conf.sample-daemon \
 		${STAGEDIR}${PREFIX}/etc/urbackup/urbackupclient.conf.sample
diff --git a/archivers/urbackup-client/files/patch-urbackupclient_backup__scripts_postgresqldump b/archivers/urbackup-client/files/patch-urbackupclient_backup__scripts_postgresqldump
new file mode 100644
index 000000000000..c1f1eb734b3f
--- /dev/null
+++ b/archivers/urbackup-client/files/patch-urbackupclient_backup__scripts_postgresqldump
@@ -0,0 +1,15 @@
+--- urbackupclient/backup_scripts/postgresqldump.orig	2021-05-11 19:12:04 UTC
++++ urbackupclient/backup_scripts/postgresqldump
+@@ -31,9 +31,9 @@ alias errcho='>&2 echo'
+ TIME=`date`
+ errcho "Starting dump backup of PostgreSQL at $TIME..."
+ 
+-su postgres -c "pg_dumpall"
++su postgres -c "%%PREFIX%%/bin/pg_dumpall"
+ 
+ TIME=`date`
+ errcho "Backup of PostgreSQL finished at $TIME."
+ 
+-exit 0
+\ No newline at end of file
++exit 0


More information about the dev-commits-ports-main mailing list