mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
Add sysutils/znapzend
PR: 218708 Submitted by: Anton Eriksson <skalmanman@gmail.com>
This commit is contained in:
parent
e398ba7dd6
commit
217c6558ae
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=449808
@ -1351,6 +1351,7 @@
|
||||
SUBDIR += zfstools
|
||||
SUBDIR += zidrav
|
||||
SUBDIR += zisofs-tools
|
||||
SUBDIR += znapzend
|
||||
SUBDIR += zogftw
|
||||
SUBDIR += zrep
|
||||
SUBDIR += zsd
|
||||
|
44
sysutils/znapzend/Makefile
Normal file
44
sysutils/znapzend/Makefile
Normal file
@ -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>
|
3
sysutils/znapzend/distinfo
Normal file
3
sysutils/znapzend/distinfo
Normal file
@ -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
|
28
sysutils/znapzend/files/patch-lib_ZnapZend.pm
Normal file
28
sysutils/znapzend/files/patch-lib_ZnapZend.pm
Normal file
@ -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
|
30
sysutils/znapzend/files/znapzend.in
Normal file
30
sysutils/znapzend/files/znapzend.in
Normal file
@ -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"
|
||||
|
10
sysutils/znapzend/pkg-descr
Normal file
10
sysutils/znapzend/pkg-descr
Normal file
@ -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
|
10
sysutils/znapzend/pkg-plist
Normal file
10
sysutils/znapzend/pkg-plist
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user