Gentoo Archives: gentoo-portage-dev

From: Amit Dor-Shifer <amitds@××××××.com>
To: gentoo-portage-dev@l.g.o
Subject: [gentoo-portage-dev] use of sftp/scp transfer protocol in ebuilds.
Date: Thu, 29 Jan 2009 08:10:08
Message-Id: 4981645B.4010906@oversi.com
1 Hi.
2
3 I'm trying to make a package that downloads the distfile using a secured
4 transfer protocol and ssh's pubkey authentication.
5
6 I've modified /etc/make.conf:
7
8 amit0 myapp # grep SFTP /etc/make.conf
9 FETCHCOMMAND_SFTP="/usr/bin/sftp \${URI} \${DISTDIR}"
10
11 When I'm setting SRC_URI like this:
12
13 amit0 myapp # grep SRC_UR myapp-1.0.ebuild
14 SRC_URI="sftp://my.server.com:/home/public/mydistfile.tar.gz"
15
16 seems like the URL is passed as-is to the sftp-client, which can't
17 handle the "sftp://" prefix:
18
19 amit0 myapp # ebuild --debug myapp-1.0.ebuild digest
20 <SNIP>
21 >>> Downloading 'sftp://my.server.com:/home/public/mydistfile.tar.gz'
22 Connecting to sftp...
23 ssh: sftp: Name or service not known
24 Couldn't read packet: Connection reset by peer
25 No digest file available and download failed.
26
27 !!! Couldn't download 'mydistfile.tar.gz'. Aborting.
28 !!! File mydistfile.tar.gz doesn't exist, can't update Manifest
29 <SNIP>
30
31 Seems then to me I'm not on the right track. Should I be using a
32 different method? Or is this method supposed to work? If not, would
33 rsync be my favored approach? How is rsync transfer configured?
34
35 Thanks,
36 Amit

Replies