Den sön 16 sep. 2018 kl 09:40 skrev Solène Rapenne <[email protected]>:
>
> Le 2018-09-16 03:33, Michael Ayres a écrit :
> > Thanks to everyone who has replied in helping me. I have read up on
> > the man pages and I understand what I need; it is:
> >
> > 1) I want to install some packages on OpenBSD 6.0 which I have
> > operational on a Parallels VM on my precious MacBookPro High Sierra.
>
> are you using 6.0? If so, it's no longer supported and packages are not
> available anymore.

Sure they are, but it can depend on the mirror. See for example
http://ftp.eu.openbsd.org/pub/OpenBSD/6.0/packages/i386/.

>
> > 2) I want to set a environmental variable PKG_PATH to the ftp site to
> > get packages.
> >   2.a) I am trying to set it to
> > https://ftp.openbsd.org/pub/OpenBSD/6.3/packages/i386/
> > <https://ftp.openbsd.org/pub/OpenBSD/6.3/packages/i386/>, which has an
> > index of packages I might want to get. I will later put that
> > PKG_PATH in the start up file so it is always set each time I boot up
> > OpenBSD.

Why are you trying to set the PKG_PATH to use 6.3 packages when you
are according to the above using 6.0? To install 6.3 packages you
first need to upgrade the system to 6.3, one step at a time; 6.0-6.1,
6.1-6.2, 6.2-6.3. Start here:
http://www.openbsd.org/faq/upgrade61.html

Or just reinstall.

>
> > 3) My PKG_PATH string [
> > https://ftp.openbsd.org/pub/OpenBSD/6.3/packages/i386/
> > <https://ftp.openbsd.org/pub/OpenBSD/6.3/packages/i386/> ] does not
> > seem to work. An example I refer to includes some wild cards, “%”,
> > which I can’t seem to get right.k The example I am working from is at:
> > https://linux-audit.com/updating-all-openbsd-packages-with-pkg_add/
> > <https://linux-audit.com/updating-all-openbsd-packages-with-pkg_add/>
> > and one example it uses is passing a variable for name and arch -s,
> > which I have not set.
>
> http://man.openbsd.org/installurl
>
> https://ftp.openbsd.org/pub/OpenBSD is a right content for the file

But that was not introduced until 6.1 and there seems to be some
confusion on which release he is using. If he is using 6.0 installurl
is not available.

>
> >
> >
> > 4) What is a correct string i should use to set my PKG_PATH variable
> > to get packages from location at 2a above?
> >
>
> use /etc/installurl instead of PKG_PATH
>

The PKG_PATH environment variable could for example be set in root's
.profile, which is read when logging in as root (or doing su -) as in
the instructions you pasted earlier:
export PKG_PATH="http://ftp.eu.openbsd.org/pub/OpenBSD/$(uname
-r)/packages/$(arch -s)/"

The $(uname -r) and the $(arch -s) could be replaced with your literal
version and architecture respectively, in your case 6.0 and i386 (if
that is what you are using, please verify, by logging in and issuing
the two commands one after the other, ie. uname -r and arch -s).
Verify that you are installing the same version of packages as your
installed system. Test it on the command line first, works with or
without the quotation marks.

On a fresh install of 6.3 (6.1 or later), /etc/installurl will be
automatically populated during installation. If you are upgrading you
will need to create the file. Note that at some release the url should
be changed to use https, see the upgrade instructions if you go down
that route.

/Johan

Reply via email to