diff options
-rw-r--r-- | databases/py-barman/DESCR | 2 | ||||
-rw-r--r-- | databases/py-barman/Makefile | 56 | ||||
-rw-r--r-- | databases/py-barman/PLIST | 64 | ||||
-rw-r--r-- | databases/py-barman/distinfo | 6 | ||||
-rw-r--r-- | databases/py-barman/patches/patch-barman_backup.py | 23 |
5 files changed, 151 insertions, 0 deletions
diff --git a/databases/py-barman/DESCR b/databases/py-barman/DESCR new file mode 100644 index 00000000000..1595797c901 --- /dev/null +++ b/databases/py-barman/DESCR @@ -0,0 +1,2 @@ +Barman (Backup and Recovery Manager) is an open-source administration +tool for disaster recovery of PostgreSQL servers written in Python. diff --git a/databases/py-barman/Makefile b/databases/py-barman/Makefile new file mode 100644 index 00000000000..5c1782f772e --- /dev/null +++ b/databases/py-barman/Makefile @@ -0,0 +1,56 @@ +# $NetBSD: Makefile,v 1.1 2014/11/04 12:56:14 fhajny Exp $ + +DISTNAME= barman-1.3.3 +PKGNAME= ${PYPKGPREFIX}-${DISTNAME} +CATEGORIES= databases python +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pgbarman/} + +MAINTAINER= filip@joyent.com +HOMEPAGE= http://www.pgbarman.org/ +COMMENT= Backup and Recovery Manager for PostgreSQL +LICENSE= gnu-gpl-v3 + +DEPENDS+= ${PYPKGPREFIX}-argcomplete-[0-9]*:../../devel/py-argcomplete +DEPENDS+= ${PYPKGPREFIX}-argh>=0.21.2:../../devel/py-argh +DEPENDS+= ${PYPKGPREFIX}-psycopg2-[0-9]*:../../databases/py-psycopg2 +DEPENDS+= rsync-[0-9]*:../../net/rsync + +PYTHON_VERSIONED_DEPENDENCIES= dateutil + +USE_LANGUAGES= # none + +CONF_FILES+= share/examples/barman/barman.conf \ + ${PKG_SYSCONFDIR}/barman.conf +INSTALLATION_DIRS+= share/examples/barman + +.include "../../mk/bsd.prefs.mk" + +BARMAN_DIR?= ${VARBASE}/lib/barman +BARMAN_LOG_DIR?= ${VARBASE}/log/barman +BARMAN_USER= barman +BARMAN_GROUP= ${BARMAN_USER} + +PKG_GROUPS+= ${BARMAN_GROUP} +PKG_USERS+= ${BARMAN_USER}:${BARMAN_GROUP} +PKG_GECOS.barman= PG Barman user +PKG_HOME.barman= ${BARMAN_DIR} + +OWN_DIRS_PERMS+= ${BARMAN_DIR} ${BARMAN_USER} ${BARMAN_GROUP} 0700 +OWN_DIRS_PERMS+= ${BARMAN_LOG_DIR} ${BARMAN_USER} ${BARMAN_GROUP} 0755 + +SUBST_CLASSES+= path +SUBST_STAGE.path= pre-configure +SUBST_FILES.path= barman/config.py doc/barman.conf setup.py +SUBST_MESSAGE.path= Fixing paths +SUBST_SED.path= -e 's,/etc/,${PKG_SYSCONFDIR}/,g' +SUBST_SED.path+= -e 's,/var/lib/barman,${BARMAN_DIR},g' +SUBST_SED.path+= -e 's,/var/log/barman,${BARMAN_LOG_DIR},g' +SUBST_SED.path+= -e 's,share/man,${PKGMANDIR},g' + +post-install: + ${INSTALL_DATA} ${WRKSRC}/doc/barman.conf \ + ${DESTDIR}${PREFIX}/share/examples/barman/barman.conf + +.include "../../lang/python/egg.mk" +.include "../../lang/python/versioned_dependencies.mk" +.include "../../mk/bsd.pkg.mk" diff --git a/databases/py-barman/PLIST b/databases/py-barman/PLIST new file mode 100644 index 00000000000..6caf70d6b34 --- /dev/null +++ b/databases/py-barman/PLIST @@ -0,0 +1,64 @@ +@comment $NetBSD: PLIST,v 1.1 2014/11/04 12:56:14 fhajny Exp $ +bin/barman +${PYSITELIB}/${EGG_INFODIR}/PKG-INFO +${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt +${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt +${PYSITELIB}/${EGG_INFODIR}/requires.txt +${PYSITELIB}/${EGG_INFODIR}/top_level.txt +${PYSITELIB}/barman/__init__.py +${PYSITELIB}/barman/__init__.pyc +${PYSITELIB}/barman/__init__.pyo +${PYSITELIB}/barman/backup.py +${PYSITELIB}/barman/backup.pyc +${PYSITELIB}/barman/backup.pyo +${PYSITELIB}/barman/cli.py +${PYSITELIB}/barman/cli.pyc +${PYSITELIB}/barman/cli.pyo +${PYSITELIB}/barman/command_wrappers.py +${PYSITELIB}/barman/command_wrappers.pyc +${PYSITELIB}/barman/command_wrappers.pyo +${PYSITELIB}/barman/compression.py +${PYSITELIB}/barman/compression.pyc +${PYSITELIB}/barman/compression.pyo +${PYSITELIB}/barman/config.py +${PYSITELIB}/barman/config.pyc +${PYSITELIB}/barman/config.pyo +${PYSITELIB}/barman/diagnose.py +${PYSITELIB}/barman/diagnose.pyc +${PYSITELIB}/barman/diagnose.pyo +${PYSITELIB}/barman/fs.py +${PYSITELIB}/barman/fs.pyc +${PYSITELIB}/barman/fs.pyo +${PYSITELIB}/barman/hooks.py +${PYSITELIB}/barman/hooks.pyc +${PYSITELIB}/barman/hooks.pyo +${PYSITELIB}/barman/infofile.py +${PYSITELIB}/barman/infofile.pyc +${PYSITELIB}/barman/infofile.pyo +${PYSITELIB}/barman/lockfile.py +${PYSITELIB}/barman/lockfile.pyc +${PYSITELIB}/barman/lockfile.pyo +${PYSITELIB}/barman/output.py +${PYSITELIB}/barman/output.pyc +${PYSITELIB}/barman/output.pyo +${PYSITELIB}/barman/retention_policies.py +${PYSITELIB}/barman/retention_policies.pyc +${PYSITELIB}/barman/retention_policies.pyo +${PYSITELIB}/barman/server.py +${PYSITELIB}/barman/server.pyc +${PYSITELIB}/barman/server.pyo +${PYSITELIB}/barman/testing_helpers.py +${PYSITELIB}/barman/testing_helpers.pyc +${PYSITELIB}/barman/testing_helpers.pyo +${PYSITELIB}/barman/utils.py +${PYSITELIB}/barman/utils.pyc +${PYSITELIB}/barman/utils.pyo +${PYSITELIB}/barman/version.py +${PYSITELIB}/barman/version.pyc +${PYSITELIB}/barman/version.pyo +${PYSITELIB}/barman/xlog.py +${PYSITELIB}/barman/xlog.pyc +${PYSITELIB}/barman/xlog.pyo +man/man1/barman.1 +man/man5/barman.5 +share/examples/barman/barman.conf diff --git a/databases/py-barman/distinfo b/databases/py-barman/distinfo new file mode 100644 index 00000000000..6b5ea586263 --- /dev/null +++ b/databases/py-barman/distinfo @@ -0,0 +1,6 @@ +$NetBSD: distinfo,v 1.1 2014/11/04 12:56:14 fhajny Exp $ + +SHA1 (barman-1.3.3.tar.gz) = 6f8ff87332d58f1228b741c3a2ad5ea6c88f2da7 +RMD160 (barman-1.3.3.tar.gz) = affebf135e6eaa26a3ce56658064fc17c1d4b9f1 +Size (barman-1.3.3.tar.gz) = 111462 bytes +SHA1 (patch-barman_backup.py) = c6755e60fba308518afcb7f884353b689256c900 diff --git a/databases/py-barman/patches/patch-barman_backup.py b/databases/py-barman/patches/patch-barman_backup.py new file mode 100644 index 00000000000..82c38bcb600 --- /dev/null +++ b/databases/py-barman/patches/patch-barman_backup.py @@ -0,0 +1,23 @@ +$NetBSD: patch-barman_backup.py,v 1.1 2014/11/04 12:56:14 fhajny Exp $ + +Make portable for non-glibc platforms too. +--- barman/backup.py.orig 2014-08-14 16:10:43.000000000 +0000 ++++ barman/backup.py +@@ -956,7 +956,7 @@ class BackupManager(object): + backup_size = 0 + for dirpath, _, filenames in os.walk(backup_dest): + # execute fsync() on the containing directory +- dir_fd = os.open(dirpath, os.O_DIRECTORY) ++ dir_fd = os.open(dirpath, os.O_RDONLY) + os.fsync(dir_fd) + os.close(dir_fd) + # execute fsync() on all the contained files +@@ -1166,7 +1166,7 @@ class BackupManager(object): + shutil.move(filename, destfile) + + # execute fsync() on the archived WAL containing directory +- dir_fd = os.open(os.path.dirname(destfile), os.O_DIRECTORY) ++ dir_fd = os.open(os.path.dirname(destfile), os.O_RDONLY) + os.fsync(dir_fd) + os.close(dir_fd) + # execute fsync() on the archived WAL file |