# This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # znapzend # znapzend/Makefile # znapzend/distinfo # znapzend/pkg-plist # znapzend/pkg-descr # znapzend/files # znapzend/files/znapzend.in # znapzend/files/patch-lib_ZnapZend.pm # echo c - znapzend mkdir -p znapzend > /dev/null 2>&1 echo x - znapzend/Makefile sed 's/^X//' >znapzend/Makefile << '9c407ab7eee975bc95838d2d075d304c' X# $FreeBSD$ X XPORTNAME= znapzend XPORTVERSION= 0.17.0 XDISTVERSIONPREFIX= v XCATEGORIES= sysutils X XMAINTAINER= skalmanman@gmail.com XCOMMENT= ZnapZend is a ZFS centric backup tool X XLICENSE= GPLv3 X XBUILD_DEPENDS= p5-Pod-Simple>=0:textproc/p5-Pod-Simple \ X p5-IO-Pipely>=0:devel/p5-IO-Pipely \ X p5-Mojolicious>=7.15:www/p5-Mojolicious \ X p5-Mojo-IOLoop-ForkCall>=0.17:www/p5-Mojo-IOLoop-ForkCall \ X p5-Scalar-List-Utils>=1.45:lang/p5-Scalar-List-Utils \ X p5-Test-Harness>=0:devel/p5-Test-Harness \ X mbuffer>=0:misc/mbuffer XRUN_DEPENDS= p5-Pod-Simple>=0:textproc/p5-Pod-Simple \ X p5-IO-Pipely>=0:devel/p5-IO-Pipely \ X p5-Mojolicious>=7.15:www/p5-Mojolicious \ X p5-Mojo-IOLoop-ForkCall>=0.17:www/p5-Mojo-IOLoop-ForkCall \ X p5-Scalar-List-Utils>=1.45:lang/p5-Scalar-List-Utils \ X p5-Test-Harness>=0:devel/p5-Test-Harness \ X mbuffer>=0:misc/mbuffer X XUSES= gmake autoreconf perl5 XUSE_GITHUB= yes XGH_ACCOUNT= oetiker X XGNU_CONFIGURE= yes XCONFIGURE_ARGS= --prefix=${PREFIX} --libdir=${LOCALBASE}/%%SITE_PERL%% XCONFIGURE_ENV= PERL5LIB=${LOCALBASE}/%%SITE_PERL%% X XUSE_RC_SUBR= znapzend X Xpre-configure: X @${REINPLACE_CMD} -e '/thirdparty\/Makefile/d' ${WRKSRC}/configure.ac X Xpost-configure: X @${REINPLACE_CMD} -e 's/thirdparty//g' ${WRKSRC}/Makefile X X.include 9c407ab7eee975bc95838d2d075d304c echo x - znapzend/distinfo sed 's/^X//' >znapzend/distinfo << '28a53cff2dbb962e560d78ecd93455ae' XTIMESTAMP = 1492393207 XSHA256 (oetiker-znapzend-v0.17.0_GH0.tar.gz) = e64a689babe50140b2f922c78a875dd8750e9c95dad017e231a9b747e6a7cd9e XSIZE (oetiker-znapzend-v0.17.0_GH0.tar.gz) = 151268 28a53cff2dbb962e560d78ecd93455ae echo x - znapzend/pkg-plist sed 's/^X//' >znapzend/pkg-plist << '849a347f01ea065eb1ecb4f8b02662bb' Xbin/znapzend Xbin/znapzendzetup Xbin/znapzendztatz X%%SITE_PERL%%/ZnapZend.pm X%%SITE_PERL%%/ZnapZend/Config.pm X%%SITE_PERL%%/ZnapZend/Time.pm X%%SITE_PERL%%/ZnapZend/ZFS.pm Xman/man1/znapzend.1.gz Xman/man1/znapzendzetup.1.gz Xman/man1/znapzendztatz.1.gz 849a347f01ea065eb1ecb4f8b02662bb echo x - znapzend/pkg-descr sed 's/^X//' >znapzend/pkg-descr << 'c49620051708a6705322853bb9fdc739' XZnapZend is a ZFS centric backup tool. XIt relies on snapshot, send and recieve to do its work. XIt has the built-in ability to manage both local Xsnapshots as well as remote copies by thinning them out Xas time progresses. X XThe ZnapZend configuration is stored as properties in Xthe ZFS filesystem itself. X XWWW: http://www.znapzend.org c49620051708a6705322853bb9fdc739 echo c - znapzend/files mkdir -p znapzend/files > /dev/null 2>&1 echo x - znapzend/files/znapzend.in sed 's/^X//' >znapzend/files/znapzend.in << 'f90a77b5edc00d819b68bd0842d0a992' X#!/bin/sh X# X# $FreeBSD$ X# X X# PROVIDE: znapzend X# REQUIRE: LOGIN X# KEYWORD: shutdown X X# X# Add the following line to /etc/rc.conf to enable znapzend: X# znapzend_enable (bool): Set to "NO" by default. X# Set it to "YES" to enable znapzend. X# X X. /etc/rc.subr X Xname="znapzend" Xrcvar="znapzend_enable" X Xload_rc_config $name X X: ${znapzend_enable="NO"} X Xpidfile=/var/run/${name}.pid Xcommand=%%PREFIX%%/bin/${name} Xcommand_args="--daemonize --pidfile=${pidfile}" X Xrun_rc_command "$1" X f90a77b5edc00d819b68bd0842d0a992 echo x - znapzend/files/patch-lib_ZnapZend.pm sed 's/^X//' >znapzend/files/patch-lib_ZnapZend.pm << 'c8489250059957dec1db3b73e29a6cf2' X--- lib/ZnapZend.pm.orig 2017-02-08 07:38:40 UTC X+++ lib/ZnapZend.pm X@@ -2,7 +2,7 @@ package ZnapZend; X X use Mojo::Base -base; X use Mojo::IOLoop::ForkCall; X-use Mojo::Util qw(slurp); X+use Mojo::File; X use Mojo::Log; X use ZnapZend::Config; X use ZnapZend::ZFS; X@@ -571,12 +571,13 @@ my $createWorkers = sub { X my $daemonize = sub { X my $self = shift; X my $pidFile = $self->pidfile || $self->defaultPidFile; X+ my $pidFileFile = Mojo::File->new($pidFile); X X if (-f $pidFile){ X- chomp(my $pid = slurp $pidFile); X+ chomp(my $pid = $pidFileFile->slurp); X #pid is not empty and is numeric X- if ($pid && ($pid = int($pid)) && kill 0, $pid){ X- die "I Quit! Another copy of znapzend ($pid) seems to be running. See $pidFile\n"; X+ if ($pid && ($pid = int($pid)) && kill 0, $pid){ X+ die "I Quit! Another copy of znapzend ($pid) seems to be running. See $pidFile\n"; X } X } X #make sure pid file is writable before forking c8489250059957dec1db3b73e29a6cf2 exit