Hi Antti, your questions can be answered from /usr/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm:
Antti Harri wrote on Mon, May 28, 2007 at 10:19:59AM +0300: > what's the correct method to make pkg_add understand > PKG_PATH=ftp://[EMAIL PROTECTED]/path/to/packages/ ? OpenBSD::PackageRepository::HTTPorFTP::grab_object() simply issues ftp -o - $self->{baseurl}.$object->{name}.".tgz", i.e. ftp -o - ftp://[EMAIL PROTECTED]/path/to/packages/mydistro.tgz which is NOT supported by ftp(1). Instead, the syntax specified in ftp(1) is ftp [-o output] ftp://[user:[EMAIL PROTECTED]:port]/file[/] so you need to specify the password, i.e. PKG_PATH=ftp://ftp:[EMAIL PROTECTED]/path/to/packages/ Note using this for anything in any context is almost certainly a bad idea. It sends cleartext passwords unencrypted over the wire and includes them in arguments passed to exec(3), exposing them to ps(1). In case neither is an issue in your context, why do you need authentication at all? By the way, if your packages are secret, are you sure you want to install them? On the other hand, in case you just use wierd non-standard usernames for anonymous ftp, you are successfully implementing obscurity by obscurity which is probably a bad idea, too. Thus, i suggest to just use standard anonymous ftp instead. > In my case scp is also available (why isn't sftp:// working > btw?), but it's *terribly* slow so I'd rather just use ftp. sftp:// simply isn't implemented, see the list in OpenBSD::PackageRepository::new(): ftp, http, scp, src. By the way, i have no idea why sftp should be quicker than scp. Still, sftp:// might be useful for servers offering SFTP access without offering shell access. Try submitting a patch to OpenBSD/PackageRepository* if you need it. The pkg_add part will probably be easy. What might be a bother is that sftp(1), contrary to ftp(1), doesn't appear to support output to stdout(4). Yours, Ingo
