diff options
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/znapzend/Makefile | 44 | ||||
-rw-r--r-- | sysutils/znapzend/distinfo | 3 | ||||
-rw-r--r-- | sysutils/znapzend/files/patch-lib_ZnapZend.pm | 28 | ||||
-rw-r--r-- | sysutils/znapzend/files/znapzend.in | 30 | ||||
-rw-r--r-- | sysutils/znapzend/pkg-descr | 10 | ||||
-rw-r--r-- | sysutils/znapzend/pkg-plist | 10 |
7 files changed, 126 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index b70934eec388..5912485d97f1 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -1351,6 +1351,7 @@ SUBDIR += zfstools SUBDIR += zidrav SUBDIR += zisofs-tools + SUBDIR += znapzend SUBDIR += zogftw SUBDIR += zrep SUBDIR += zsd diff --git a/sysutils/znapzend/Makefile b/sysutils/znapzend/Makefile new file mode 100644 index 000000000000..4c7a95cad532 --- /dev/null +++ b/sysutils/znapzend/Makefile @@ -0,0 +1,44 @@ +# $FreeBSD$ + +PORTNAME= znapzend +PORTVERSION= 0.17.0 +DISTVERSIONPREFIX= v +CATEGORIES= sysutils + +MAINTAINER= skalmanman@gmail.com +COMMENT= ZnapZend is a ZFS centric backup tool + +LICENSE= GPLv3 + +BUILD_DEPENDS= p5-Pod-Simple>=0:textproc/p5-Pod-Simple \ + p5-IO-Pipely>=0:devel/p5-IO-Pipely \ + p5-Mojolicious>=7.15:www/p5-Mojolicious \ + p5-Mojo-IOLoop-ForkCall>=0.17:www/p5-Mojo-IOLoop-ForkCall \ + p5-Scalar-List-Utils>=1.45:lang/p5-Scalar-List-Utils \ + p5-Test-Harness>=0:devel/p5-Test-Harness \ + mbuffer>=0:misc/mbuffer +RUN_DEPENDS= p5-Pod-Simple>=0:textproc/p5-Pod-Simple \ + p5-IO-Pipely>=0:devel/p5-IO-Pipely \ + p5-Mojolicious>=7.15:www/p5-Mojolicious \ + p5-Mojo-IOLoop-ForkCall>=0.17:www/p5-Mojo-IOLoop-ForkCall \ + p5-Scalar-List-Utils>=1.45:lang/p5-Scalar-List-Utils \ + p5-Test-Harness>=0:devel/p5-Test-Harness \ + mbuffer>=0:misc/mbuffer + +USES= gmake autoreconf perl5 +USE_GITHUB= yes +GH_ACCOUNT= oetiker + +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --prefix=${PREFIX} --libdir=${SITE_PERL} +CONFIGURE_ENV= PERL5LIB=${SITE_PERL} + +USE_RC_SUBR= znapzend + +pre-configure: + @${REINPLACE_CMD} -e '/thirdparty\/Makefile/d' ${WRKSRC}/configure.ac + +post-configure: + @${REINPLACE_CMD} -e 's/thirdparty//g' ${WRKSRC}/Makefile + +.include <bsd.port.mk> diff --git a/sysutils/znapzend/distinfo b/sysutils/znapzend/distinfo new file mode 100644 index 000000000000..83b412f6036a --- /dev/null +++ b/sysutils/znapzend/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1492393207 +SHA256 (oetiker-znapzend-v0.17.0_GH0.tar.gz) = e64a689babe50140b2f922c78a875dd8750e9c95dad017e231a9b747e6a7cd9e +SIZE (oetiker-znapzend-v0.17.0_GH0.tar.gz) = 151268 diff --git a/sysutils/znapzend/files/patch-lib_ZnapZend.pm b/sysutils/znapzend/files/patch-lib_ZnapZend.pm new file mode 100644 index 000000000000..b90590615d95 --- /dev/null +++ b/sysutils/znapzend/files/patch-lib_ZnapZend.pm @@ -0,0 +1,28 @@ +--- lib/ZnapZend.pm.orig 2017-02-08 07:38:40 UTC ++++ lib/ZnapZend.pm +@@ -2,7 +2,7 @@ package ZnapZend; + + use Mojo::Base -base; + use Mojo::IOLoop::ForkCall; +-use Mojo::Util qw(slurp); ++use Mojo::File; + use Mojo::Log; + use ZnapZend::Config; + use ZnapZend::ZFS; +@@ -571,12 +571,13 @@ my $createWorkers = sub { + my $daemonize = sub { + my $self = shift; + my $pidFile = $self->pidfile || $self->defaultPidFile; ++ my $pidFileFile = Mojo::File->new($pidFile); + + if (-f $pidFile){ +- chomp(my $pid = slurp $pidFile); ++ chomp(my $pid = $pidFileFile->slurp); + #pid is not empty and is numeric +- if ($pid && ($pid = int($pid)) && kill 0, $pid){ +- die "I Quit! Another copy of znapzend ($pid) seems to be running. See $pidFile\n"; ++ if ($pid && ($pid = int($pid)) && kill 0, $pid){ ++ die "I Quit! Another copy of znapzend ($pid) seems to be running. See $pidFile\n"; + } + } + #make sure pid file is writable before forking diff --git a/sysutils/znapzend/files/znapzend.in b/sysutils/znapzend/files/znapzend.in new file mode 100644 index 000000000000..b85f2ea46bdd --- /dev/null +++ b/sysutils/znapzend/files/znapzend.in @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: znapzend +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable znapzend: +# znapzend_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable znapzend. +# + +. /etc/rc.subr + +name="znapzend" +rcvar="znapzend_enable" + +load_rc_config $name + +: ${znapzend_enable="NO"} + +pidfile=/var/run/${name}.pid +command=%%PREFIX%%/bin/${name} +command_args="--daemonize --pidfile=${pidfile}" + +run_rc_command "$1" + diff --git a/sysutils/znapzend/pkg-descr b/sysutils/znapzend/pkg-descr new file mode 100644 index 000000000000..8e1bae4e8c5a --- /dev/null +++ b/sysutils/znapzend/pkg-descr @@ -0,0 +1,10 @@ +ZnapZend is a ZFS centric backup tool. +It relies on snapshot, send and recieve to do its work. +It has the built-in ability to manage both local +snapshots as well as remote copies by thinning them out +as time progresses. + +The ZnapZend configuration is stored as properties in +the ZFS filesystem itself. + +WWW: http://www.znapzend.org diff --git a/sysutils/znapzend/pkg-plist b/sysutils/znapzend/pkg-plist new file mode 100644 index 000000000000..2c49c0da123c --- /dev/null +++ b/sysutils/znapzend/pkg-plist @@ -0,0 +1,10 @@ +bin/znapzend +bin/znapzendzetup +bin/znapzendztatz +%%SITE_PERL%%/ZnapZend.pm +%%SITE_PERL%%/ZnapZend/Config.pm +%%SITE_PERL%%/ZnapZend/Time.pm +%%SITE_PERL%%/ZnapZend/ZFS.pm +man/man1/znapzend.1.gz +man/man1/znapzendzetup.1.gz +man/man1/znapzendztatz.1.gz |