Raf Czlonka
2016-01-11 15:40:17 UTC
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
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/pub/OpenBSD/%c/packages/%a/
.Ed
.Pp
will let
Index: faq/faq15.html
===================================================================
RCS file: /cvs/www/faq/faq15.html,v
retrieving revision 1.116
diff -u -p -r1.116 faq15.html
--- faq/faq15.html 23 Nov 2015 03:15:50 -0000 1.116
+++ faq/faq15.html 11 Jan 2016 14:29:33 -0000
@@ -203,13 +203,13 @@ A list of possible locations to fetch pa
Example 1: fetching from your <a href="../orders.html">CD-ROM</a>,
assuming you mounted it on <tt>/mnt/cdrom</tt>
<blockquote><pre>
-$ <b>export PKG_PATH=/mnt/cdrom/$(uname -r)/packages/$(machine -a)/</b>
+$ <b>export PKG_PATH=/mnt/cdrom/%c/packages/%a/</b>
</pre></blockquote>
<p>
Example 2: fetching from a nearby <a href="../ftp.html">mirror</a>
<blockquote><pre>
-$ <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>
</pre></blockquote>
<p>
@@ -404,7 +404,7 @@ HTTP, or SCP locations.
Let's consider installation via HTTP in the next example:
<blockquote><pre>
-# <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>
screen-4.0.3p3: complete
</pre></blockquote>
Index: faq/faq9.html
===================================================================
RCS file: /cvs/www/faq/faq9.html,v
retrieving revision 1.116
diff -u -p -r1.116 faq9.html
--- faq/faq9.html 23 Nov 2015 03:16:31 -0000 1.116
+++ faq/faq9.html 11 Jan 2016 14:29:33 -0000
@@ -362,7 +362,7 @@ To find out more about the packages and
To install the above mentioned package you would issue
<blockquote><pre>
-# 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/
# pkg_add fedora_base
</pre></blockquote>
Index: faq/pf/example1.html
===================================================================
RCS file: /cvs/www/faq/pf/example1.html,v
retrieving revision 1.63
diff -u -p -r1.63 example1.html
--- faq/pf/example1.html 10 Jan 2016 01:28:23 -0000 1.63
+++ faq/pf/example1.html 11 Jan 2016 14:29:33 -0000
@@ -346,7 +346,7 @@ to use (<tt>***@53</tt>, for example
installing the tool and choosing a resolver.
<p>
<blockquote><pre>
-# <b>export PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)</b>
+# <b>export PKG_PATH=http://your.local.mirror/pub/OpenBSD/%c/packages/%a/</b>
# <b>pkg_add dnscrypt-proxy</b>
# <b>rcctl enable dnscrypt_proxy</b>
</pre></blockquote>
Index: faq/ports/guide.html
===================================================================
RCS file: /cvs/www/faq/ports/guide.html,v
retrieving revision 1.46
diff -u -p -r1.46 guide.html
--- faq/ports/guide.html 21 Dec 2015 16:35:48 -0000 1.46
+++ faq/ports/guide.html 11 Jan 2016 14:29:33 -0000
@@ -563,7 +563,7 @@ When dealing with multi-packages, it may
+setting <tt>PKG_PATH</tt> to <tt>/usr/ports/packages/%a/all/</tt> in the
environment.
<br><br><li>
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
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/pub/OpenBSD/%c/packages/%a/
.Ed
.Pp
will let
Index: faq/faq15.html
===================================================================
RCS file: /cvs/www/faq/faq15.html,v
retrieving revision 1.116
diff -u -p -r1.116 faq15.html
--- faq/faq15.html 23 Nov 2015 03:15:50 -0000 1.116
+++ faq/faq15.html 11 Jan 2016 14:29:33 -0000
@@ -203,13 +203,13 @@ A list of possible locations to fetch pa
Example 1: fetching from your <a href="../orders.html">CD-ROM</a>,
assuming you mounted it on <tt>/mnt/cdrom</tt>
<blockquote><pre>
-$ <b>export PKG_PATH=/mnt/cdrom/$(uname -r)/packages/$(machine -a)/</b>
+$ <b>export PKG_PATH=/mnt/cdrom/%c/packages/%a/</b>
</pre></blockquote>
<p>
Example 2: fetching from a nearby <a href="../ftp.html">mirror</a>
<blockquote><pre>
-$ <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>
</pre></blockquote>
<p>
@@ -404,7 +404,7 @@ HTTP, or SCP locations.
Let's consider installation via HTTP in the next example:
<blockquote><pre>
-# <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>
screen-4.0.3p3: complete
</pre></blockquote>
Index: faq/faq9.html
===================================================================
RCS file: /cvs/www/faq/faq9.html,v
retrieving revision 1.116
diff -u -p -r1.116 faq9.html
--- faq/faq9.html 23 Nov 2015 03:16:31 -0000 1.116
+++ faq/faq9.html 11 Jan 2016 14:29:33 -0000
@@ -362,7 +362,7 @@ To find out more about the packages and
To install the above mentioned package you would issue
<blockquote><pre>
-# 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/
# pkg_add fedora_base
</pre></blockquote>
Index: faq/pf/example1.html
===================================================================
RCS file: /cvs/www/faq/pf/example1.html,v
retrieving revision 1.63
diff -u -p -r1.63 example1.html
--- faq/pf/example1.html 10 Jan 2016 01:28:23 -0000 1.63
+++ faq/pf/example1.html 11 Jan 2016 14:29:33 -0000
@@ -346,7 +346,7 @@ to use (<tt>***@53</tt>, for example
installing the tool and choosing a resolver.
<p>
<blockquote><pre>
-# <b>export PKG_PATH=http://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(uname -m)</b>
+# <b>export PKG_PATH=http://your.local.mirror/pub/OpenBSD/%c/packages/%a/</b>
# <b>pkg_add dnscrypt-proxy</b>
# <b>rcctl enable dnscrypt_proxy</b>
</pre></blockquote>
Index: faq/ports/guide.html
===================================================================
RCS file: /cvs/www/faq/ports/guide.html,v
retrieving revision 1.46
diff -u -p -r1.46 guide.html
--- faq/ports/guide.html 21 Dec 2015 16:35:48 -0000 1.46
+++ faq/ports/guide.html 11 Jan 2016 14:29:33 -0000
@@ -563,7 +563,7 @@ When dealing with multi-packages, it may
pkg_add(1)</a> and
<a href="http://www.openbsd.org/cgi-bin/man.cgi?sektion=1&query=pkg_delete"pkg_delete(1)</a> directly,
-setting <tt>PKG_PATH</tt> to <tt>/usr/ports/packages/`arch -s`/all/</tt> in the+setting <tt>PKG_PATH</tt> to <tt>/usr/ports/packages/%a/all/</tt> in the
environment.
<br><br><li>