PKG_PATH="https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/$(uname -p)/$(uname -r | cut -d_ -f1)/All" echo $PKG_PATH https://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/earmv7hf/9.3/All export PKG_PATHThen I try one:
pkg_add -v ruby pkg_add -v python pkg_add: no pkg found for 'python', sorry.Now this:
armv7# pkg_add ruby pkg_add: Can't process https://cdn.NetBSD.org:443/pub/pkgsrc/packages/NetBSD/earmv7hf/9.3/All/ruby*: Unknown HTTP error pkg_add: no pkg found for 'ruby', sorry. pkg_add: 1 package addition failed armv7# pkg_add ruby31 pkg_add: Can't process https://cdn.NetBSD.org:443/pub/pkgsrc/packages/NetBSD/earmv7hf/9.3/All/ruby31*: Unknown HTTP error pkg_add: no pkg found for 'ruby31', sorry. pkg_add: 1 package addition failed armv7# pkg_add ruby31_3.1.3 pkg_add: Can't process https://cdn.NetBSD.org:443/pub/pkgsrc/packages/NetBSD/earmv7hf/9.3/All/ruby31*: Unknown HTTP error pkg_add: no pkg found for 'ruby31_3.1.3', sorry. pkg_add: 1 package addition failedNot very gratifying. I try this:
pkg_add pkgin pkg_add: no pkg found for 'pkgin', sorry.This seems completely and utterly broken.
I use my browser to navigate to:
I see a myriad of .tgz files, including "ruby31-3.1.2.tgz"But note the error message above. It gives a string ending in "*" and indeed when I feed a URL like this to my browser It gives me a 404 error. No web server is going to accept a URL like that.
libfetch in base doesn't support SNI (virtual host selection with TLS). This is the result of an unhandled `421 Misdirected Request' error. These days, most HTTP servers are hosted by CDNs and they expect an HTTP SNI (Server Name Indication) to be sent by the client when negotiating HTTPS requests.I have no idea what this means or why I should care or who should take care of this. The suggestion is to us http: and not https: OK, so I do this:
PKG_PATH=http://cdn.NetBSD.org/pub/pkgsrc/packages/NetBSD/earmv7hf/9.3/All export PKG_PATHNow, just as a quick experiment, I try:
pkg_add ruby pkg_add: Warning: package `ruby-3.1.2' was built for a platform: pkg_add: NetBSD/earmv7hf 9.0 (pkg) vs. NetBSD/earmv7hf 9.3 (this host)That is progress of a sort. I seem to be getting this same warning for a bunch of ruby related packages. And it does take a long time. But it seems to work.
Whatever shell they ship with NetBSD is a piece of crap, so:
pkg_add bashThis is quick and easy. Now I have bash -- hooray!
I am also instructed:
Ideally, you install pkgin over http, then use pkgin for installing the rest from binary packages. It does proper HTTPS, better dependency resolution and more.So I do "pkg_add pkgin". And after that I do:
pkgin install pythonBut this works:
pkgin install python39 installing python39-3.9.13... installing libuuid-2.32.1nb1... pkg_install warnings: 0, errors: 0 pkgin avail >pkg.listThis seems to work, but typing python or python3 or python39 afterwards does not work. So, if it is installed, it is no good to me, or so it seems. No, wait -- I found it in /usr/pkg/bin as "python3.9"
Some of the list replies instruct me to file a PR (whatever that is) about my initial problems using pkgsrc and pkg_add.
Kyu / [email protected]