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@isnic.is>
This commit is contained in:
Neel Chauhan 2021-05-11 12:22:22 -07:00
parent 6884228867
commit 3dd951e0c7
2 changed files with 25 additions and 7 deletions

View File

@ -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

View File

@ -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