diff --git a/CHANGES b/CHANGES index 027edff1..d4f69885 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,117 @@ +commit 06ddae478277fba10feed6fc2eeabba686e6688a +Author: RageLtMan +Date: Mon Apr 4 00:23:24 2016 -0400 + + sendRecvSnapshots - don't cut dstDataSet in-place + + The current code in sendRecvSnapshots splits the dstDataSet var + early on in the execution chain to provide logging output and the + remote variable contents. This removes the remote information from + dstDataSet which is then passed to listSnapshots without the + remote data and the attempt to list the last snapshot occurs on the + local host, not over SSH on the remote target. + + Address the issue by creating a dstDataSetPath variable to hold the + stripped target path while retaining the original dstDataSet with + the remote information attached for lastAndCommonSnapshots to use + in listSnapshots. + + ----- + + Testing: + 4 hosts with waterfall replication topologies in debug mode + +commit 2e905cbbd753956f373a3bd318794f8e25e11818 +Author: sylvain-ilm +Date: Mon Apr 4 12:22:35 2016 +0200 + + Separate fields by tabs when using -H + +commit 7555b59dbf7d87dc6a909495e50b6a7d2661cb96 +Author: sylvain-ilm +Date: Fri Apr 1 18:24:07 2016 +0200 + + added --only-enabled option in znapzendztatz to filter out disabled datasets + +commit 8ec92aec894d508c00d0cd0cb58a67b2e16c6939 +Author: tisc0 +Date: Tue Mar 22 15:58:18 2016 +0100 + + Update README.md + + Simple typo. Thanks for that project guyz ! + +commit 175b4e93c1cd4b2ed329f0e0f93ac2146e45fd4b +Author: Wouter van Os +Date: Thu Mar 17 21:52:40 2016 +0100 + + Updated exception to exclude remote when local + +commit c46e0fe0df8a75040b2fccd7b147748b2f00b10f +Author: Wouter van Os +Date: Sat Mar 12 17:50:33 2016 +0100 + + Added documentation about the new --autoCreation and createDataSet + +commit 1345311ea4e37e743f3c3beec9380f1677dd9e44 +Author: Wouter van Os +Date: Sat Mar 12 15:36:20 2016 +0100 + + Made an exception message more clear with extra data and info + +commit edef36a5486e93e08971420b018846a201be1828 +Author: Wouter van Os +Date: Sat Mar 12 15:28:05 2016 +0100 + + Improved logs for the createDataSet sub and removed null-check + +commit 4cd300427ab49322339dbdd1fc4b0ddf1e70ab2b +Author: Wouter van Os +Date: Sat Mar 12 12:48:41 2016 +0100 + + Create datasets on dst when it doesn't exist + + It checks f the `$dstDataSet` exists, if not, + it attempts to create it. When creation is succes, + the script continues. When it fails, the script + stops and continues to the next dataset. + +commit 3494e80e37a1ce70f02e27a34d69e9bdc9f6af69 +Author: Tobias Oetiker +Date: Fri Mar 4 14:22:48 2016 +0100 + + actually disable the code in testmode! + +commit e50d481d9900ba2a16ce1338ae5ed7b18cad1278 +Author: Tobias Oetiker +Date: Fri Mar 4 13:33:18 2016 +0100 + + we should add the recurring trick even when not daemonized ... + +commit 5bc7cc5bfdfe80de984493f42233e95dde1c5868 +Author: Tobias Oetiker +Date: Mon Feb 29 14:09:55 2016 +0100 + + our test scripts do not like the recurring event to enable signal handling in connection with EV + +commit b32074bf044eb915b42c87bb00bfc2166a48a18a +Author: Martin Rueegg +Date: Fri Feb 26 14:51:30 2016 +0100 + + wake the io loop periodically to make sure signals get processed even when running with EV + +commit da82e77790423ee7bf347d26230edaad1e073149 +Author: Tobias Oetiker +Date: Thu Feb 25 15:05:18 2016 +0100 + + updated for release + +commit 56ee5792ff201286802aee58ea3480605d40f519 +Author: Tobias Oetiker +Date: Thu Feb 25 15:00:38 2016 +0100 + + release 0.15.3 + commit 547476e6bdb97ecf4fba3cf9f9c3b26e0397006e Author: martin-rueegg Date: Tue Feb 23 10:08:46 2016 +0100 diff --git a/Makefile.in b/Makefile.in index ef908674..2570c50a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -264,6 +264,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL5LIB = @PERL5LIB@ +PERL_CC_PATH = @PERL_CC_PATH@ POD2MAN = @POD2MAN@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/PERL_MODULES b/PERL_MODULES index d0378f30..72ce01a7 100644 --- a/PERL_MODULES +++ b/PERL_MODULES @@ -1,4 +1,5 @@ Mojolicious@6.46 Mojo::IOLoop::ForkCall@0.17 +Scalar::Util@1.45 Test::Harness TAP::Parser diff --git a/README.md b/README.md index bce42297..4108c4f7 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,21 @@ Zetup Inztructionz Follow these zimple inztructionz below to get a custom made copy of znapzend. Yes you need a compiler and stuff for this to work. +On RedHat you get the necessaries with: + + yum install perl-core + +On Ubuntu / Debian with: + + apt-get install perl + +On Solaris you may need the c compiler from Solaris Studio and gnu-make +since the installed perl version is probably very old. + +On OmniOS/SmartOS you will need perl and gnu-make + +with that in place you can now utter: + ```sh wget https://github.com/oetiker/znapzend/releases/download/v0.15.3/znapzend-0.15.3.tar.gz tar zxvf znapzend-0.15.3.tar.gz diff --git a/VERSION b/VERSION index 1985d914..7ffdfa1c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.15.3 +0.15.4 diff --git a/configure b/configure index 904e5653..4a4477ab 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for znapzend 0.15.3. +# Generated by GNU Autoconf 2.69 for znapzend 0.15.4. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='znapzend' PACKAGE_TARNAME='znapzend' -PACKAGE_VERSION='0.15.3' -PACKAGE_STRING='znapzend 0.15.3' +PACKAGE_VERSION='0.15.4' +PACKAGE_STRING='znapzend 0.15.4' PACKAGE_BUGREPORT='tobi@oetiker.ch' PACKAGE_URL='' @@ -592,6 +592,7 @@ PERL5LIB enable_pkgonly GMAKE GREP +PERL_CC_PATH URL_CAT ENABLE_SVCINSTALL_FALSE ENABLE_SVCINSTALL_TRUE @@ -1222,7 +1223,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures znapzend 0.15.3 to adapt to many kinds of systems. +\`configure' configures znapzend 0.15.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1288,7 +1289,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of znapzend 0.15.3:";; + short | recursive ) echo "Configuration of znapzend 0.15.4:";; esac cat <<\_ACEOF @@ -1375,7 +1376,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -znapzend configure 0.15.3 +znapzend configure 0.15.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1392,7 +1393,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by znapzend $as_me 0.15.3, which was +It was created by znapzend $as_me 0.15.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2263,7 +2264,7 @@ fi # Define the identity of the package. PACKAGE='znapzend' - VERSION='0.15.3' + VERSION='0.15.4' cat >>confdefs.h <<_ACEOF @@ -2751,6 +2752,80 @@ else as_fn_error $? "could not find perl" "$LINENO" 5 fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking is perl reasonably complete" >&5 +$as_echo_n "checking is perl reasonably complete... " >&6; } +if $PERL -MExtUtils::MakeMaker -e '' 2>/dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes. ExtUtils::MakeMaker is available" >&5 +$as_echo "yes. ExtUtils::MakeMaker is available" >&6; }; +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "a complete perl ('perl-core' in the redhat world) installation is required" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if require a c compiler to get perl modules compiled" >&5 +$as_echo_n "checking if require a c compiler to get perl modules compiled... " >&6; } +if $PERL -MIO::Socket::IP -e 'exit($IO::Socket::IP::VERSION < 0.37)' 2>/dev/null; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + perl_cc=`$PERL -MConfig -e 'print $Config{cc}'` + # Extract the first word of "$perl_cc", so it can be a program name with args. +set dummy $perl_cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PERL_CC_PATH+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PERL_CC_PATH in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL_CC_PATH="$PERL_CC_PATH" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL_CC_PATH="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PERL_CC_PATH" && ac_cv_path_PERL_CC_PATH="no" + ;; +esac +fi +PERL_CC_PATH=$ac_cv_path_PERL_CC_PATH +if test -n "$PERL_CC_PATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_CC_PATH" >&5 +$as_echo "$PERL_CC_PATH" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking is perls favorite c compiler ($perl_cc) available" >&5 +$as_echo_n "checking is perls favorite c compiler ($perl_cc) available... " >&6; } + if test x$PERL_CC_PATH = xno; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + as_fn_error $? "perl needs the '$perl_cc' compiler package to build dependencies" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : @@ -3455,7 +3530,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by znapzend $as_me 0.15.3, which was +This file was extended by znapzend $as_me 0.15.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3508,7 +3583,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -znapzend config.status 0.15.3 +znapzend config.status 0.15.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 70cb67ac..1fc55b43 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,31 @@ else AC_MSG_ERROR(could not find perl) fi + +AC_MSG_CHECKING(is perl reasonably complete) +if $PERL -MExtUtils::MakeMaker -e '' 2>/dev/null; then + AC_MSG_RESULT(yes. ExtUtils::MakeMaker is available); +else + AC_MSG_RESULT(no) + AC_MSG_ERROR([a complete perl ('perl-core' in the redhat world) installation is required]) +fi + +AC_MSG_CHECKING([if require a c compiler to get perl modules compiled]) +if $PERL -MIO::Socket::IP -e 'exit($IO::Socket::IP::VERSION < 0.37)' 2>/dev/null; then + AC_MSG_RESULT(no) +else + AC_MSG_RESULT(yes) + perl_cc=`$PERL -MConfig -e 'print $Config{cc}'` + AC_PATH_PROG(PERL_CC_PATH, $perl_cc, no) + AC_MSG_CHECKING(is perls favorite c compiler ($perl_cc) available) + if test x$PERL_CC_PATH = xno; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([perl needs the '$perl_cc' compiler package to build dependencies]) + else + AC_MSG_RESULT(yes) + fi +fi + AC_PROG_GREP AC_ARG_VAR(GMAKE, [Path to local GNU Make binary]) diff --git a/lib/Makefile.in b/lib/Makefile.in index 6d49143c..9efeb2ed 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -176,6 +176,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL5LIB = @PERL5LIB@ +PERL_CC_PATH = @PERL_CC_PATH@ POD2MAN = @POD2MAN@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ diff --git a/man/znapzend.1 b/man/znapzend.1 index d49436f4..d217b82f 100644 --- a/man/znapzend.1 +++ b/man/znapzend.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ZNAPZEND 1" -.TH ZNAPZEND 1 "2016-02-14" "0.15.3" "znapzend" +.TH ZNAPZEND 1 "2016-04-02" "0.15.4" "znapzend" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -144,7 +144,7 @@ znapzend \- znapzend daemon .IX Header "SYNOPSIS" \&\fBznapzend\fR [\fIoptions\fR...] .PP -.Vb 12 +.Vb 10 \& \-\-man show man\-page and exit \& \-h,\-\-help display this help and exit \& \-d,\-\-debug print debug messages to STDERR @@ -157,6 +157,7 @@ znapzend \- znapzend daemon \& \-\-runonce=x run one round on source dataset x \& \-\-features=x comma separated list of features to be enabled \& \-\-connectTimeout=x sets the ConnectTimeout for ssh commands +\& \-\-autoCreation automatically create dataset on dest if it not exists .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" @@ -239,6 +240,9 @@ use 'sudo' for zfs commands (e.g. when running znapzend as non-priviledged user) .IP "\fB\-\-connectTimeout\fR=\fItimeout\fR" 4 .IX Item "--connectTimeout=timeout" sets the ssh connection timeout (in seconds) +.IP "\fB\-\-autoCreation\fR" 4 +.IX Item "--autoCreation" +Automatically create a dataset on a destination host if it's not there yet. .SH "EXAMPLE" .IX Header "EXAMPLE" To test a new config diff --git a/man/znapzendzetup.1 b/man/znapzendzetup.1 index c839c81a..38376e35 100644 --- a/man/znapzendzetup.1 +++ b/man/znapzendzetup.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ZNAPZENDZETUP 1" -.TH ZNAPZENDZETUP 1 "2016-02-15" "0.15.3" "znapzend" +.TH ZNAPZENDZETUP 1 "2016-02-25" "0.15.4" "znapzend" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l diff --git a/man/znapzendztatz.1 b/man/znapzendztatz.1 index 4f668d45..00a8dad7 100644 --- a/man/znapzendztatz.1 +++ b/man/znapzendztatz.1 @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ZNAPZENDZTATZ 1" -.TH ZNAPZENDZTATZ 1 "2016-02-15" "0.15.3" "znapzend" +.TH ZNAPZENDZTATZ 1 "2016-04-05" "0.15.4" "znapzend" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l @@ -144,9 +144,11 @@ znapzendztatz \- znapzend statistics utility .IX Header "SYNOPSIS" \&\fBznapzendztatz\fR [\fIoptions\fR...] [src_dataset] .PP -.Vb 6 -\& \-H do not print headers +.Vb 8 +\& \-H do not print headers and separate fields by a single tab +\& instead of arbitrary white space \& \-r,\-\-recursive show statistics for dataset and sub datasets +\& \-\-only\-enabled only show statistics for enabled datasets \& \-\-pfexec use \*(Aqpfexec\*(Aq for commands \& \-\-sudo use \*(Aqsudo\*(Aq for commands \& \-\-man show man\-page and exit diff --git a/thirdparty/Makefile.in b/thirdparty/Makefile.in index f3550309..99993dfb 100644 --- a/thirdparty/Makefile.in +++ b/thirdparty/Makefile.in @@ -146,6 +146,7 @@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ PERL5LIB = @PERL5LIB@ +PERL_CC_PATH = @PERL_CC_PATH@ POD2MAN = @POD2MAN@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@