summaryrefslogtreecommitdiff
path: root/backport-Skip-scp3-test-if-there-s-no-scp-on-remote-path.patch
blob: 60f4b9d47db0487ec19267d3015378eef6cd186d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From ea7ecc2c3ae39fdf5c6ad97b7bc0b47a98847f43 Mon Sep 17 00:00:00 2001
From: Darren Tucker <dtucker@dtucker.net>
Date: Sat, 23 Jul 2022 14:36:38 +1000
Subject: [PATCH] Skip scp3 test if there's no scp on remote path.

scp -3 ends up using the scp that's in the remote path and will fail if
one is not available.  Based on a patch from rapier at psc.edu.

Reference:https://github.com/openssh/openssh-portable/commit/ea7ecc2c3ae39fdf5c6ad97b7bc0b47a98847f43
Conflict:NA
---
 regress/scp3.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/regress/scp3.sh b/regress/scp3.sh
index f71b1567..47db47cd 100644
--- a/regress/scp3.sh
+++ b/regress/scp3.sh
@@ -9,6 +9,12 @@ COPY2=${OBJ}/copy2
 DIR=${COPY}.dd
 DIR2=${COPY}.dd2
 
+$SSH -F $OBJ/ssh_proxy somehost \
+    'IFS=":"; for i in $PATH;do [ -x "$i/scp" ] && exit 0; done; exit 1'
+if [ $? -eq 1 ]; then
+	skip "No scp on remote path."
+fi
+
 SRC=`dirname ${SCRIPT}`
 cp ${SRC}/scp-ssh-wrapper.sh ${OBJ}/scp-ssh-wrapper.scp
 chmod 755 ${OBJ}/scp-ssh-wrapper.scp
-- 
2.23.0