On Tue, Feb 02, 2016 at 09:47:00PM GMT, Stuart Henderson wrote: > On 2016/02/02 19:48, Raf Czlonka wrote: > > On Sun, Jan 31, 2016 at 07:28:43PM GMT, Joerg Jung wrote: > > > On Mon, Jan 11, 2016 at 03:40:17PM +0000, Raf Czlonka wrote: > > > > Hi all, > > > > > > > > Given that PKG_PATH and pkg.conf(5)'s installpath, now supports %c, %a, > > > > etc. sequences, it might be worth advertising it a bit more by changing > > > > all relevant uname(1), arch(1)/machine(1) occurrences or (hard-coded > > > > release versions or hardware architectures for that matter) in the > > > > documentation. > > > > > > > > While there, I have also taken the liberty of changing ftp.openbsd.org > > > > to your.local.mirror and ftp to http in packages(7) to keep it > > > > consistent with other examples. > > > > > > > > Main benefits: > > > > - as the sequences themselves - not need to hard-code the values > > > > - no need to run uname, arch/machine is sub-shells any more > > > > - short and sweet > > > > > > While I like the reduction below, it seems with upcoming release this > > > can be further shortened [1]. So might make sense to update the diff > > > below? > > > > > > [1] http://marc.info/?l=openbsd-cvs&m=145415350609473&w=2 > > > > Hi Joerg, > > > > I'm not following openbsd-cvs@ at the moment so thanks for bringing this > > to my attention. > > > > However, given that the FAQ is for -release/-stable, and it is still 4 > > months until the next one, this change only affects packages(7) for now. > > Updated diff below - I'll send a revised one when 5.9 gets released in > > order to update the FAQ. > > > > Personally, I'd prefer to use a RFC 2606 compliant domain in all of the > > relevant places but, until IANA reserves .mirror as TLD, I'm not that > > bothered :^) > > > > Regards, > > > > Raf > > > > Index: share/man/man7/packages.7 > > =================================================================== > > RCS file: /cvs/src/share/man/man7/packages.7,v > > retrieving revision 1.40 > > diff -u -p -r1.40 packages.7 > > --- share/man/man7/packages.7 24 Oct 2015 08:44:49 -0000 1.40 > > +++ share/man/man7/packages.7 11 Jan 2016 14:26:49 -0000 > > @@ -240,7 +240,7 @@ are supported: pointing > > .Ev PKG_PATH > > to a distant package repository, e.g., > > .Bd -literal -offset 1n > > -# export PKG_PATH=ftp://ftp.openbsd.org/pub/OpenBSD/5.2/packages/i386/ > > +# export PKG_PATH=http://your.local.mirror/ > > I don't like this "your.local.mirror" at all.. Would it be so bad to > keep using ftp.openbsd.org here but change it to http://? > > In any event it needs to be either more or less than just http://hostname/. > I'd sooner keep the path for now as there are still some mirrors with > odd paths.
Hi Stuart, Like I've mentioned above, I'm not particularly fond of it either. I merely copied what was already in the FAQ - I wish you had kept the rest of the diff, but here is a shortened version anyway :^) faq/faq15.html [...] -$ <b>export PKG_PATH=http://your.local.mirror/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/</b> +$ <b>export PKG_PATH=http://your.local.mirror/pub/OpenBSD/%c/packages/%a/</b> [...] -# <b>pkg_add http://your.local.mirror/pub/OpenBSD/$(uname -r)/packages/$(machine -a)/screen-4.0.3p3.tgz</b> +# <b>pkg_add http://your.local.mirror/pub/OpenBSD/%c/packages/%a/screen-4.0.3p3.tgz</b> [...] faq/faq9.html [...] -# export PKG_PATH=http://your.local.mirror/pub/OpenBSD/$(uname -r)/packages/$(uname -m)/ +# export PKG_PATH=http://your.local.mirror/pub/OpenBSD/%c/packages/%a/ I only checked the latter (faq9.html) - it has been introduced over 10 years ago and it doesn't seem like anyone complained, so naturally I assumed it is the "sanctioned" way of doing things. I don't think I need to explain why I had removed ftp.openbsd.org in the first place. Regards, Raf P.S. PKG_PATH=http://example.org/ would have been my preference.