Pkg_add

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Pkg_add

Michael Ayres
New to OpenBSD, which I am newly running as a Parallels VM on my Apple MacBook Pro. Shell and basic commands working, and have set path variable PKG_PATH =

On calling PGK_ADD, with -v switch,  I get screen display of

“Update candidates: quits-2.414 -> quirks-2.414
quirks-2.414 signed on 2018-03-29T09:01:59Z"

but then nothing.

Recalling Unix’s reticent personality, I wait, but nothing ever seems to happen. With a new install, downloaded 6, do I have 29 tons of updates, has BSD become to bored with me to even acknowledge I exit, or I have I misspoken to it?


Michael Ayres

Michael Ayres, MS, CISSP, CSEP, CSM, PMI-ACP, PMP | www.mace-associates.com <http://www.mace-associates.com/>
San Francisco, CA. | 415.999.2049 <tel:415.999.2049>  https://www.linkedin.com/in/michaelmaceayres <https://www.linkedin.com/in/michaelmaceayres>
[hidden email] <mailto:[hidden email]>



Screen Shot 2018-09-12 at 10.01.05 PM.png (82K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Pkg_add

Chris Eidem-2
man installurl


On 09/13/2018 12:08 AM, Michael Ayres wrote:

> New to OpenBSD, which I am newly running as a Parallels VM on my Apple MacBook Pro. Shell and basic commands working, and have set path variable PKG_PATH =
>
> On calling PGK_ADD, with -v switch,  I get screen display of
>
> “Update candidates: quits-2.414 -> quirks-2.414
> quirks-2.414 signed on 2018-03-29T09:01:59Z"
>
> but then nothing.
>
> Recalling Unix’s reticent personality, I wait, but nothing ever seems to happen. With a new install, downloaded 6, do I have 29 tons of updates, has BSD become to bored with me to even acknowledge I exit, or I have I misspoken to it?
>
>
> Michael Ayres
>
> Michael Ayres, MS, CISSP, CSEP, CSM, PMI-ACP, PMP | www.mace-associates.com <http://www.mace-associates.com/>
> San Francisco, CA. | 415.999.2049 <tel:415.999.2049>  https://www.linkedin.com/in/michaelmaceayres <https://www.linkedin.com/in/michaelmaceayres>
> [hidden email] <mailto:[hidden email]>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Pkg_add

Martijn van Duren-6
In reply to this post by Michael Ayres
On 09/13/18 07:08, Michael Ayres wrote:

> New to OpenBSD, which I am newly running as a Parallels VM on my Apple MacBook Pro. Shell and basic commands working, and have set path variable PKG_PATH =
>
> On calling PGK_ADD, with -v switch,  I get screen display of
>
> “Update candidates: quits-2.414 -> quirks-2.414
> quirks-2.414 signed on 2018-03-29T09:01:59Z"
>
> but then nothing.
>
> Recalling Unix’s reticent personality, I wait, but nothing ever seems to happen. With a new install, downloaded 6, do I have 29 tons of updates, has BSD become to bored with me to even acknowledge I exit, or I have I misspoken to it?
>
>
> Michael Ayres
>
> Michael Ayres, MS, CISSP, CSEP, CSM, PMI-ACP, PMP | www.mace-associates.com <http://www.mace-associates.com/>
> San Francisco, CA. | 415.999.2049 <tel:415.999.2049>  https://www.linkedin.com/in/michaelmaceayres <https://www.linkedin.com/in/michaelmaceayres>
> [hidden email] <mailto:[hidden email]>
>
>
>
I'm not 100% sure what your question is, but here's my take on things:
pkg_add only works on 3rd party packages. If you have 3rd party
packages installed you can update those with `pkg_add -u`, although
they usually don't get updates on stable releases, which you're
running based on quirks version.
If you want updates on your base OS you can run syspatch(8).

Once you feel familiar enough with the system I encourage you to
run -current, since that's where the cool kids hang out. You can
update to -current by downloading bsd.rd from your favourite mirror
and boot it, similar to how you've installed OpenBSD.
Once you've updated to -current, don't forget to update your packages
with `pkg_add -u`.

For further reading I recommend at least:
http://man.openbsd.org/syspatch
http://man.openbsd.org/pkg_add
https://www.openbsd.org/faq/current.html
https://www.openbsd.org/faq/faq15.html
and if you're up to it the rest of the FAQ and after that some
manpages. They're a never ending source of information.

Hope this helps.

martijn@

Reply | Threaded
Open this post in threaded view
|

Re: Pkg_add

Stuart Henderson
On 2018-09-13, Martijn van Duren <[hidden email]> wrote:
> On 09/13/18 07:08, Michael Ayres wrote:
>> New to OpenBSD, which I am newly running as a Parallels VM on my Apple MacBook Pro. Shell and basic commands working, and have set path variable PKG_PATH =
>>
>> On calling PGK_ADD, with -v switch,  I get screen display of
>>
>> “Update candidates: quits-2.414 -> quirks-2.414
>> quirks-2.414 signed on 2018-03-29T09:01:59Z"

There are some typos here but based on what you're seeing I think you
must have typed "pkg_add -u" to update packages.

>> but then nothing.
>>
>> Recalling Unix’s reticent personality, I wait, but nothing ever seems to happen. With a new install, downloaded 6, do I have 29 tons of updates, has BSD become to bored with me to even acknowledge I exit, or I have I misspoken to it?
>>
>>
>> Michael Ayres
>>
>> Michael Ayres, MS, CISSP, CSEP, CSM, PMI-ACP, PMP | www.mace-associates.com <http://www.mace-associates.com/>
>> San Francisco, CA. | 415.999.2049 <tel:415.999.2049>  https://www.linkedin.com/in/michaelmaceayres <https://www.linkedin.com/in/michaelmaceayres>
>> [hidden email] <mailto:[hidden email]>
>>
>>
>>
> I'm not 100% sure what your question is, but here's my take on things:
> pkg_add only works on 3rd party packages. If you have 3rd party
> packages installed you can update those with `pkg_add -u`, although
> they usually don't get updates on stable releases, which you're
> running based on quirks version.

"3rd party" can be a bit confusing here, the packages installed by
pkg_add are still provided by OpenBSD but aren't part of the base OS.
There are currently no official updates to these packages to work
with a given release for any reason.

There are sometimes updates to *ports* on the -stable branch for
more important problems, these can be used to build packages yourself,
or there is a third-party service that some people use
(https://stable.mtier.org/) which provides binary packags

> If you want updates on your base OS you can run syspatch(8).

Yes (the "openup" tool linked from the above url will run this
automatically).

> Once you feel familiar enough with the system I encourage you to
> run -current, since that's where the cool kids hang out. You can
> update to -current by downloading bsd.rd from your favourite mirror
> and boot it, similar to how you've installed OpenBSD.
> Once you've updated to -current, don't forget to update your packages
> with `pkg_add -u`.

Packages and base os snapshots for -current are built regularly,
they're generally fairly reliable, but 1) you will often need to
update base OS and all installed packages before you can install
a new package, and 2) there will be times when things will be
out of sync and you might not be able to install packages
(usually things get back in-sync within a couple of days).
This works OK for some people but not others and you do really
want to keep an eye on development (i.e. read the source-changes
and ports-changes mailing lists) to ascertain when might be a bad
time to update.


Reply | Threaded
Open this post in threaded view
|

Re: Pkg_add

Michael Ayres
In reply to this post by Michael Ayres

  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.

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.

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.

My reference document
------------------------
Option 2: PKG_PATH
The first thing to do is defining your PKG_PATH. This will usually be the address of a FTP or HTTP server, which has the latest packages available. To have this variable set every time you log in, use the file .profile in your home directory (e.g. /root/.profile). Add the full export line below:
export PKG_PATH=”http://ftp.openbsd.org/pub/OpenBSD/$(uname -r)/packages/$(arch -s)/”
Since it won’t be active the first time you added it, execute the command, so the variable PKG_PATH will be set.
Tip: use a mirror to improve your performance and reduce load on the main systems.
------------------------------------------------------


4) What is a correct string i should use to set my PKG_PATH variable to get packages from location at 2a above?

Thanks

Michael Ayres

Michael Ayres, MS, CISSP, CSEP, CSM, PMI-ACP, PMP | www. <http://www.mace-associates.com/>mace-associates.com
San Francisco, CA. | 415.999.2049  https://www.linkedin.com/in/michaelmaceayres







Reply | Threaded
Open this post in threaded view
|

Re: Pkg_add

Chris Bennett-4
If you are running a release/stable version, then you really ought to
use a mirror versus openbsd.org.

However, if you are running -current, you must be absolutely sure that
the mirror is actually up to date. This bit me pretty hard a few years
ago when I finally discovered the mirror I was using was not being
updated properly.

Annoyed with Google searches, I have tried DuckDuckGo and I am getting
better results. There is a lot of good stuff about OpenBSD on the
Internet, but be careful that it isn't too old. OpenBSD is racing
forward with wonderful changes, so old info is often totally wrong.

And don't despair if you don't get responses on the mailing lists.
Sometimes people don't have the time, or are on vacation or your
question could involve something that is being changed right at that
time so that there really isn't an answer just yet.

Chris Bennett


Reply | Threaded
Open this post in threaded view
|

Re: Pkg_add

Solene Rapenne
In reply to this post by Michael Ayres
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.

> 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.

Are you using i386 architecture in your VM?

> 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

>
>
> 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

Reply | Threaded
Open this post in threaded view
|

Re: Pkg_add

Stuart Henderson
On 2018-09-16, Solène Rapenne <[hidden email]> wrote:
> 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.

Correct it's no longer supported, though packages are available at
some mirrors (especially ftp.eu.openbsd.org).

>> 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/

6.3 packages don't work on 6.0.

>> <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.
>
> Are you using i386 architecture in your VM?
>
>> 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
>
>>
>>
>> 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

6.0 used /etc/pkg.conf, needs to be 6.1+ for /etc/installurl.
PKG_PATH works with both,


Reply | Threaded
Open this post in threaded view
|

Re: Pkg_add

Johan Mellberg
In reply to this post by Solene Rapenne
Den sön 16 sep. 2018 kl 09:40 skrev Solène Rapenne <[hidden email]>:

>
> 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 | Threaded
Open this post in threaded view
|

Re: Pkg_add

Marc Espie-2
On Mon, Sep 17, 2018 at 03:33:06PM +0200, Johan Mellberg wrote:

> Den sön 16 sep. 2018 kl 09:40 skrev Solène Rapenne <[hidden email]>:
> >
> > 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/.

It's a very bad idea anyway, especially security-wise, but also we switched
to clang as a base compiler since, so there have been a lot of improvements.

and bug-fixes.

and issues fixed.

There is no LTS  on OpenBSD, by design.

Security improvements move too much for that to make any sense.

Upgrade. *especially* on 32 bit architectures with the cramped address space.