View | Details | Raw Unified | Return to bug 191450
Collapse All | Expand All

(-)Makefile (-1 / +4 lines)
Lines 3-8 Link Here
3
3
4
PORTNAME=	tartarus
4
PORTNAME=	tartarus
5
PORTVERSION=	0.9.8
5
PORTVERSION=	0.9.8
6
PORTREVISION=	2
6
CATEGORIES=	sysutils
7
CATEGORIES=	sysutils
7
MASTER_SITES=	http://wertarbyte.de/tartarus/ \
8
MASTER_SITES=	http://wertarbyte.de/tartarus/ \
8
   		http://ftp.wilbury.sk/pub/FreeBSD/local/distfiles/
9
   		http://ftp.wilbury.sk/pub/FreeBSD/local/distfiles/
Lines 13-19 Link Here
13
LICENSE=	GPLv3
14
LICENSE=	GPLv3
14
LICENSE_FILE=	${WRKSRC}/COPYING
15
LICENSE_FILE=	${WRKSRC}/COPYING
15
16
16
RUN_DEPENDS=	${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash
17
RUN_DEPENDS=	${LOCALBASE}/bin/bash:${PORTSDIR}/shells/bash \
18
   		${LOCALBASE}/bin/gtar:${PORTSDIR}/archivers/gtar \
19
   		${LOCALBASE}/bin/curl:${PORTSDIR}/ftp/curl
17
20
18
USES=		gmake perl5 shebangfix tar:bzip2
21
USES=		gmake perl5 shebangfix tar:bzip2
19
SHEBANG_FILES=	${WRKSRC}/bin/*
22
SHEBANG_FILES=	${WRKSRC}/bin/*
(-)files/patch-bin__tartarus (+106 lines)
Line 0 Link Here
1
--- ./bin/tartarus.orig	2014-06-28 01:35:27.535761589 +0200
2
+++ ./bin/tartarus	2014-06-28 01:38:03.361776923 +0200
3
@@ -41,6 +41,8 @@
4
 set -f
5
 shopt -s nocasematch
6
 
7
+typeset -x PATH=/usr/local/bin:/usr/local/sbin:${PATH}
8
+
9
 CMD_INCREMENTAL="no"
10
 CMD_UPDATE="no"
11
 PROFILE=""
12
@@ -527,7 +529,7 @@
13
 #
14
 # Disabling this option will stop Tartarus from checking its website for updates
15
 # of itself.
16
-CHECK_FOR_UPDATE="yes"
17
+CHECK_FOR_UPDATE="no"
18
 #
19
 #=item FILE_LIST_CREATION
20
 #
21
@@ -540,6 +542,37 @@
22
 # This defines the directory lists of the processed files are placed in.
23
 FILE_LIST_DIRECTORY=""
24
 #
25
+#=item SFTP_AUTH_METHOD
26
+#
27
+# Defines SFTP authentication method: can be "password" or "pubkey"
28
+SFTP_AUTH_METHOD="password"
29
+#
30
+#=item SFTP_AUTH_PRIVKEY
31
+#
32
+# Defines SSH private key for authentication
33
+SFTP_AUTH_PRIVKEY=""
34
+#
35
+#=item SFTP_AUTH_PUBKEY
36
+#
37
+# Defines SSH public key for authentication
38
+SFTP_AUTH_PUBKEY=""
39
+#
40
+#=item SFTP_AUTH_PRIVKEY_TYPE
41
+#
42
+# Defines SSH private key type (PEM|DER|ENG)A
43
+# Defaults to PEM
44
+SFTP_AUTH_PRIVKEY_TYPE="PEM"
45
+#
46
+#=item SFTP_AUTH_PRIVKEY_PASS
47
+#
48
+# Defines SFTP_AUTH_PRIVKEY passphrase
49
+SFTP_AUTH_PRIVKEY_PASS=""
50
+#
51
+#=item SFTP_AUTH_HOSTPUBMD5
52
+#
53
+# Defines SFTP host MD5 pubkey
54
+SFTP_AUTH_HOSTPUBMD5=""
55
+#
56
 #=back
57
 #
58
 #=cut
59
@@ -638,10 +671,10 @@
60
 case "$ASSEMBLY_METHOD" in
61
     tar|"")
62
         # use the traditional tar setup
63
-        requireCommand tar || cleanup 1
64
+        requireCommand gtar || cleanup 1
65
         collate() {
66
             local TAROPTS="--no-unquote --no-recursion $TAR_OPTIONS"
67
-            call tar cpf -  $TAROPTS --null -T -
68
+            call gtar cpf -  $TAROPTS --null -T -
69
             local EXITCODE=$?
70
             # exit code 1 means that some files have changed while backing them
71
             # up, we think that is OK for now
72
@@ -678,17 +711,24 @@
73
         # define storage procedure
74
         storage() {
75
             # stay silent, but print error messages if aborting
76
-            local OPTS="-u $STORAGE_FTP_USER:$STORAGE_FTP_PASSWORD -s -S"
77
-            if isEnabled "$STORAGE_FTP_USE_SSL"; then
78
-                OPTS="$OPTS --ftp-ssl"
79
-            fi
80
-            if isEnabled "$STORAGE_FTP_SSL_INSECURE"; then
81
-                OPTS="$OPTS -k"
82
-            fi
83
+	    local OPTS="-s -S -u $STORAGE_FTP_USER:"
84
             local PROTO="ftp"
85
-            if isEnabled "$STORAGE_FTP_USE_SFTP"; then
86
-                PROTO="sftp"
87
-            fi
88
+	    [ "$SFTP_AUTH_METHOD" != "pubkey" && "$STORAGE_FTP_PASSWORD" != "" ] && OPTS="${OPTS}${STORAGE_FTP_PASSWORD}"
89
+	    if isEnabled "$STORAGE_FTP_USE_SFTP"; then
90
+	       PROTO="sftp"
91
+	       if isEnabled "$STORAGE_FTP_SSL_INSECURE"; then
92
+		   OPTS="$OPTS -k"
93
+	       fi
94
+	       [ "$SFTP_AUTH_PRIVKEY" != "" ] && OPTS="$OPTS --key $SFTP_AUTH_PRIVKEY"
95
+	       [ "$SFTP_AUTH_PUBKEY" != "" ] && OPTS="$OPTS --pubkey $SFTP_AUTH_PUBKEY"
96
+	       [ "$SFTP_AUTH_PRIVKEY_TYPE" != "" ] && OPTS="$OPTS --key-type $SFTP_AUTH_PRIVKEY_TYPE"
97
+	       [ "$SFTP_AUTH_PRIVKEY_PASS" != "" ] && OPTS="$OPTS --pass $SFTP_AUTH_PRIVKEY_PASS"
98
+	       [ "$SFTP_AUTH_HOSTPUBMD5" != "" ] && OPTS="$OPTS --hostpubmd5 $SFTP_AUTH_HOSTPUBMD5"
99
+	    else
100
+	       if isEnabled "$STORAGE_FTP_USE_SSL"; then
101
+		   OPTS="$OPTS --ftp-ssl"
102
+	       fi
103
+	    fi
104
             local FILE=$(constructFilename)
105
             local URL="$PROTO://$STORAGE_FTP_SERVER/$STORAGE_FTP_DIR/$FILE"
106
             debug "Uploading backup to $URL..."

Return to bug 191450