Using ports and updates to the release

2020-10-11 Thread Ed Gray
Hi,

I'm still fairly new to openbsd and the idea of using ports in general
rather than binary packages.

Is it necessary to keep the ports tree updated if using a release version
of openbsd e.g. pulling the stable tree from CVS before building new
software?

Regards
Ed Fray


Re: Using ports and updates to the release

2020-10-11 Thread Ingo Schwarze
Hi Ed,

Ed Gray wrote on Sun, Oct 11, 2020 at 07:21:32PM +0100:

> I'm still fairly new to openbsd and the idea of using ports
> in general rather than binary packages.

You are usually better off using packages than using ports,
especially as a new user.

Even as an experienced user doing lots of development and minor
amounts of ports development, i use packages most of the time.

In a nutshell, there are only three common reasons to compile a
port yourself:

 * You want to fix bugs in the port or update it and submit patches.
 * Or you want to experiment with local changes to the port.
 * Or you want to do some kinds of testing that require compiling
   from source (many kinds of testing don't require that).

For details, see

  https://www.openbsd.org/faq/faq15.html# about packages
  https://www.openbsd.org/faq/ports/ports.html  # about ports

The latter page says, at the very top,

  The ports tree is meant for advanced users.  Everyone is encouraged
  to use the pre-compiled binary packages.  If you have questions
  about the ports tree, it is assumed that you have read the manual
  pages and this FAQ, and that you are able to work with it.

> Is it necessary to keep the ports tree updated if using a release version
> of openbsd e.g. pulling the stable tree from CVS before building new
> software?

The -release ports tree is compatible with both the -release and
the -stable base system of the same release.  Updating the -release
ports tree to become a -stable ports tree, or updating the relevant
parts of it in the same way, may be useful if you want to re-build
a specific package and a fix was committed to -stable for that
specific port.  But for the most common architectures, -stable
packages are now routinely available on the mirrors in the directory
/pub/OpenBSD/6.7/packages-stable/, so users rarely need the -stable
ports tree.

Yours,
  Ingo



Re: Using ports and updates to the release

2020-10-28 Thread Marc Espie
On Sun, Oct 11, 2020 at 09:12:13PM +0200, Ingo Schwarze wrote:
> Hi Ed,
> 
> Ed Gray wrote on Sun, Oct 11, 2020 at 07:21:32PM +0100:
> 
> > I'm still fairly new to openbsd and the idea of using ports
> > in general rather than binary packages.
> 
> You are usually better off using packages than using ports,
> especially as a new user.
> 
> Even as an experienced user doing lots of development and minor
> amounts of ports development, i use packages most of the time.

As one of the persons *responsible* for keeping the ports system
working, I do use packages all the time.

Ports are on my development setup.

The machine I write this mail from uses packages,
with about 3 ports that are just there because not committed yet.



Re: Using ports and updates to the release

2020-10-28 Thread Ed Gray
Hi Marc,

Thanks for your reply. I think maybe this belongs to ports more than misc.
But it's a general query about releases and ports as well.

My question was actually about updating the ports tree from an older
release version before trying to use it rather than whether to use ports or
packages.

I installed 6.2 release I believe and later upgraded to 6.6 release. I
pulled the release version of ports at some point and later tried to build
a port which failed due to an outdated dependency. My version of the ports
tree was outdated but even the newer 6.6 stable version was also outdated.
When I sent my original email 6.6 was still one of the supported releases
along with 6.7.

I guess my question is if I run 6.x release and want to build port xyz can
I expect a port to build using the ports tree that came with the 6.x
release or must I always use at least the stable version of the ports tree?

The following question is then if I have a problem building a port due to
an outdated dependency on a supported release should I report it as an
issue with the port even if a newer release of openbsd does not have the
issue?

Regards
Ed Gray

On Wed, 28 Oct 2020, 7:07 am Marc Espie,  wrote:

> On Sun, Oct 11, 2020 at 09:12:13PM +0200, Ingo Schwarze wrote:
> > Hi Ed,
> >
> > Ed Gray wrote on Sun, Oct 11, 2020 at 07:21:32PM +0100:
> >
> > > I'm still fairly new to openbsd and the idea of using ports
> > > in general rather than binary packages.
> >
> > You are usually better off using packages than using ports,
> > especially as a new user.
> >
> > Even as an experienced user doing lots of development and minor
> > amounts of ports development, i use packages most of the time.
>
> As one of the persons *responsible* for keeping the ports system
> working, I do use packages all the time.
>
> Ports are on my development setup.
>
> The machine I write this mail from uses packages,
> with about 3 ports that are just there because not committed yet.
>


Re: Using ports and updates to the release

2020-10-29 Thread Stuart Henderson
On 2020-10-28, Ed Gray  wrote:
> Hi Marc,
>
> Thanks for your reply. I think maybe this belongs to ports more than misc.
> But it's a general query about releases and ports as well.
>
> My question was actually about updating the ports tree from an older
> release version before trying to use it rather than whether to use ports or
> packages.

The ports tree does not install things directly, it *always* builds packages.
"make install" runs pkg_add to install the locally built package. Unless you
modify the ports or there's some non-deterministic build behaviour (which would
usually be considered a bug in the port) there's no difference whether you
build it yourself or use a pre-built package, just an increased chance of
frustration if things don't work (and there are more things that can go
wrong).

> I installed 6.2 release I believe and later upgraded to 6.6 release. I
> pulled the release version of ports at some point and later tried to build
> a port which failed due to an outdated dependency. My version of the ports
> tree was outdated but even the newer 6.6 stable version was also outdated.
> When I sent my original email 6.6 was still one of the supported releases
> along with 6.7.
>
> I guess my question is if I run 6.x release and want to build port xyz can
> I expect a port to build using the ports tree that came with the 6.x
> release or must I always use at least the stable version of the ports tree?

If you run release X.Y then the supported options are to use a ports tree with
cvs tag OPENBSD_X_Y_BASE (the tree at the time of release) or OPENBSD_X_Y
(-stable).

> The following question is then if I have a problem building a port due to
> an outdated dependency on a supported release should I report it as an
> issue with the port even if a newer release of openbsd does not have the
> issue?

Excepting minor problems (not usually seen for releases but sometimes seen in
-current) the tree at a particular checkout should be internally consistent,
the dependencies needed are in that tree. We build complete sets of packages
on the faster architectures several times a week so problems with this would
show up.

If you mean an outdated dependency *on your system* rather than in the ports
tree then that would be because you haven't updated installed packages first.
(There will also likely be a mixture of library versions that will cause
conflicts if you build ports with the system in this stage).

If you really want to build from ports to update your system then you either
need to deal with figuring out which to build first to avoid incorrect
combinations (noting that some ports cannot be built, or cannot be *correctly*
built, while an older version of themselves is already installed), or uninstall
all packages and build the complete set that you want.

Otherwise the standard procedure is update base, pkg_add -u, cvs up the ports
tree for the branch that matches the OpenBSD version you're running, and then
you can expect that versions of dependencies are usually correct (special case:
if you run a slow architecture with -current snapshots, the package snapshot
might be too old to be useful, in that case you will need to build a bunch
more yourself).




Re: Using ports and updates to the release

2020-10-29 Thread Ed Gray
Thanks Stuart,

That was quite a complete answer. I think in my case to be certain any
errors I might find using ports are not due to something outdated on my
system I should follow your instructions and pull the updated CVS first
especially after doing a release upgrade.

Regards
Ed Gray

On Thu, 29 Oct 2020, 10:35 am Stuart Henderson,  wrote:

> On 2020-10-28, Ed Gray  wrote:
> > Hi Marc,
> >
> > Thanks for your reply. I think maybe this belongs to ports more than
> misc.
> > But it's a general query about releases and ports as well.
> >
> > My question was actually about updating the ports tree from an older
> > release version before trying to use it rather than whether to use ports
> or
> > packages.
>
> The ports tree does not install things directly, it *always* builds
> packages.
> "make install" runs pkg_add to install the locally built package. Unless
> you
> modify the ports or there's some non-deterministic build behaviour (which
> would
> usually be considered a bug in the port) there's no difference whether you
> build it yourself or use a pre-built package, just an increased chance of
> frustration if things don't work (and there are more things that can go
> wrong).
>
> > I installed 6.2 release I believe and later upgraded to 6.6 release. I
> > pulled the release version of ports at some point and later tried to
> build
> > a port which failed due to an outdated dependency. My version of the
> ports
> > tree was outdated but even the newer 6.6 stable version was also
> outdated.
> > When I sent my original email 6.6 was still one of the supported releases
> > along with 6.7.
> >
> > I guess my question is if I run 6.x release and want to build port xyz
> can
> > I expect a port to build using the ports tree that came with the 6.x
> > release or must I always use at least the stable version of the ports
> tree?
>
> If you run release X.Y then the supported options are to use a ports tree
> with
> cvs tag OPENBSD_X_Y_BASE (the tree at the time of release) or OPENBSD_X_Y
> (-stable).
>
> > The following question is then if I have a problem building a port due to
> > an outdated dependency on a supported release should I report it as an
> > issue with the port even if a newer release of openbsd does not have the
> > issue?
>
> Excepting minor problems (not usually seen for releases but sometimes seen
> in
> -current) the tree at a particular checkout should be internally
> consistent,
> the dependencies needed are in that tree. We build complete sets of
> packages
> on the faster architectures several times a week so problems with this
> would
> show up.
>
> If you mean an outdated dependency *on your system* rather than in the
> ports
> tree then that would be because you haven't updated installed packages
> first.
> (There will also likely be a mixture of library versions that will cause
> conflicts if you build ports with the system in this stage).
>
> If you really want to build from ports to update your system then you
> either
> need to deal with figuring out which to build first to avoid incorrect
> combinations (noting that some ports cannot be built, or cannot be
> *correctly*
> built, while an older version of themselves is already installed), or
> uninstall
> all packages and build the complete set that you want.
>
> Otherwise the standard procedure is update base, pkg_add -u, cvs up the
> ports
> tree for the branch that matches the OpenBSD version you're running, and
> then
> you can expect that versions of dependencies are usually correct (special
> case:
> if you run a slow architecture with -current snapshots, the package
> snapshot
> might be too old to be useful, in that case you will need to build a bunch
> more yourself).
>
>
>