Index: head/sysutils/tartarus/Makefile =================================================================== --- head/sysutils/tartarus/Makefile (revision 362803) +++ head/sysutils/tartarus/Makefile (revision 362804) @@ -1,31 +1,32 @@ # Created by: Juraj Lutter # $FreeBSD$ PORTNAME= tartarus PORTVERSION= 0.9.8 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= http://wertarbyte.de/tartarus/ \ - http://ftp.wilbury.sk/pub/FreeBSD/local/distfiles/ + http://ftp.wilbury.sk/pub/FreeBSD/local/distfiles/ MAINTAINER= otis@sk.FreeBSD.org -COMMENT= Wrappers around common unix tools for simplified backup solution +COMMENT= Wrappers around common Unix tools for simplified backup solution LICENSE= GPLv3 LICENSE_FILE= ${WRKSRC}/COPYING RUN_DEPENDS= ${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \ - ${LOCALBASE}/bin/gtar:${PORTSDIR}/archivers/gtar \ - ${LOCALBASE}/bin/curl:${PORTSDIR}/ftp/curl + ${LOCALBASE}/bin/gtar:${PORTSDIR}/archivers/gtar \ + ${LOCALBASE}/bin/curl:${PORTSDIR}/ftp/curl USES= gmake perl5 shebangfix tar:bzip2 SHEBANG_FILES= ${WRKSRC}/bin/* do-install: - cd ${WRKSRC}/bin; ${INSTALL_SCRIPT} charon charon.ftp charon.local \ + cd ${WRKSRC}/bin && ${INSTALL_SCRIPT} charon charon.ftp charon.local \ charon.pipe orpheus tartarus ${STAGEDIR}${PREFIX}/bin - cd ${WRKSRC}/lib; ${COPYTREE_SHARE} Tartarus ${STAGEDIR}${SITE_PERL} - cd ${WRKSRC}/man; ${INSTALL_MAN} charon.1 charon.ftp.1 charon.local.1 \ - charon.pipe.1 tartarus.1 ${STAGEDIR}${MANPREFIX}/man/man1 + cd ${WRKSRC}/lib && ${COPYTREE_SHARE} Tartarus ${STAGEDIR}${SITE_PERL} + cd ${WRKSRC}/man && ${INSTALL_MAN} charon.ftp.1 charon.local.1 \ + charon.pipe.1 tartarus.1 ${STAGEDIR}${PREFIX}/man/man1 + ${LN} -sf charon.ftp.1 ${STAGEDIR}${PREFIX}/man/man1/charon.1 .include Index: head/sysutils/tartarus/files/patch-bin__tartarus =================================================================== --- head/sysutils/tartarus/files/patch-bin__tartarus (revision 362803) +++ head/sysutils/tartarus/files/patch-bin__tartarus (revision 362804) @@ -1,106 +1,115 @@ --- ./bin/tartarus.orig 2014-06-28 01:35:27.535761589 +0200 +++ ./bin/tartarus 2014-06-28 01:38:03.361776923 +0200 @@ -41,6 +41,8 @@ set -f shopt -s nocasematch +typeset -x PATH=/usr/local/bin:/usr/local/sbin:${PATH} + CMD_INCREMENTAL="no" CMD_UPDATE="no" PROFILE="" @@ -527,7 +529,7 @@ # # Disabling this option will stop Tartarus from checking its website for updates # of itself. -CHECK_FOR_UPDATE="yes" +CHECK_FOR_UPDATE="no" # #=item FILE_LIST_CREATION # @@ -540,6 +542,37 @@ # This defines the directory lists of the processed files are placed in. FILE_LIST_DIRECTORY="" # +#=item SFTP_AUTH_METHOD +# +# Defines SFTP authentication method: can be "password" or "pubkey" +SFTP_AUTH_METHOD="password" +# +#=item SFTP_AUTH_PRIVKEY +# +# Defines SSH private key for authentication +SFTP_AUTH_PRIVKEY="" +# +#=item SFTP_AUTH_PUBKEY +# +# Defines SSH public key for authentication +SFTP_AUTH_PUBKEY="" +# +#=item SFTP_AUTH_PRIVKEY_TYPE +# +# Defines SSH private key type (PEM|DER|ENG)A +# Defaults to PEM +SFTP_AUTH_PRIVKEY_TYPE="PEM" +# +#=item SFTP_AUTH_PRIVKEY_PASS +# +# Defines SFTP_AUTH_PRIVKEY passphrase +SFTP_AUTH_PRIVKEY_PASS="" +# +#=item SFTP_AUTH_HOSTPUBMD5 +# +# Defines SFTP host MD5 pubkey +SFTP_AUTH_HOSTPUBMD5="" +# #=back # #=cut +@@ -616,7 +649,7 @@ + constructFilename() { + local INC="" + if isEnabled "$INCREMENTAL_BACKUP"; then +- local BASEDON=$(date -r "$INCREMENTAL_TIMESTAMP_FILE" '+%Y%m%d-%H%M') ++ local BASEDON=$(stat -f '%Sm' -t '%Y%m%d-%H%M' "$INCREMENTAL_TIMESTAMP_FILE") + INC="-inc-${BASEDON}" + fi + local CHUNK="" @@ -638,10 +671,10 @@ case "$ASSEMBLY_METHOD" in tar|"") # use the traditional tar setup - requireCommand tar || cleanup 1 + requireCommand gtar || cleanup 1 collate() { local TAROPTS="--no-unquote --no-recursion $TAR_OPTIONS" - call tar cpf - $TAROPTS --null -T - + call gtar cpf - $TAROPTS --null -T - local EXITCODE=$? # exit code 1 means that some files have changed while backing them # up, we think that is OK for now @@ -678,17 +711,24 @@ # define storage procedure storage() { # stay silent, but print error messages if aborting - local OPTS="-u $STORAGE_FTP_USER:$STORAGE_FTP_PASSWORD -s -S" - if isEnabled "$STORAGE_FTP_USE_SSL"; then - OPTS="$OPTS --ftp-ssl" - fi - if isEnabled "$STORAGE_FTP_SSL_INSECURE"; then - OPTS="$OPTS -k" - fi + local OPTS="-s -S -u $STORAGE_FTP_USER:" local PROTO="ftp" - if isEnabled "$STORAGE_FTP_USE_SFTP"; then - PROTO="sftp" - fi + [ "$SFTP_AUTH_METHOD" != "pubkey" && "$STORAGE_FTP_PASSWORD" != "" ] && OPTS="${OPTS}${STORAGE_FTP_PASSWORD}" + if isEnabled "$STORAGE_FTP_USE_SFTP"; then + PROTO="sftp" + if isEnabled "$STORAGE_FTP_SSL_INSECURE"; then + OPTS="$OPTS -k" + fi + [ "$SFTP_AUTH_PRIVKEY" != "" ] && OPTS="$OPTS --key $SFTP_AUTH_PRIVKEY" + [ "$SFTP_AUTH_PUBKEY" != "" ] && OPTS="$OPTS --pubkey $SFTP_AUTH_PUBKEY" + [ "$SFTP_AUTH_PRIVKEY_TYPE" != "" ] && OPTS="$OPTS --key-type $SFTP_AUTH_PRIVKEY_TYPE" + [ "$SFTP_AUTH_PRIVKEY_PASS" != "" ] && OPTS="$OPTS --pass $SFTP_AUTH_PRIVKEY_PASS" + [ "$SFTP_AUTH_HOSTPUBMD5" != "" ] && OPTS="$OPTS --hostpubmd5 $SFTP_AUTH_HOSTPUBMD5" + else + if isEnabled "$STORAGE_FTP_USE_SSL"; then + OPTS="$OPTS --ftp-ssl" + fi + fi local FILE=$(constructFilename) local URL="$PROTO://$STORAGE_FTP_SERVER/$STORAGE_FTP_DIR/$FILE" debug "Uploading backup to $URL..." Index: head/sysutils/tartarus/pkg-descr =================================================================== --- head/sysutils/tartarus/pkg-descr (revision 362803) +++ head/sysutils/tartarus/pkg-descr (revision 362804) @@ -1,14 +1,14 @@ Tartarus provides a nice wrapper around basic Unix tools such as tar, find and curl (well, that's not that basic) to provide a seamless backup solution, aimed at automatic gathering and backup. It has the ability to do full as well as incremental backups and is published by Stefan Tomanek under the rules of the GPL. Instead of relying on single usage backup scripts or complicated command lines, -tartarus reads its configuration from easily managable configuration files. +tartarus reads its configuration from easily manageable configuration files. It can store gathered data in regular files, or upload the backup directly (on the fly) to an FTP server. For more specific usage scenarios, custom methods can also be defined within the config file. WWW: http://wertarbyte.de/tartarus.shtml