On 2024/11/29 01:19, Mike Fischer wrote:
> Thanks for that very thorough explanation Stuart!
>
> And waiting for 7.7 to get PHP 8.4 is fine in this context. I had
> thought that there was less work involved with backporting. PECL is
> not a requirement for what we are using I think. But some of the PHP
> extensions are.

The PHP extensions themselves are fine with this approach.

> I have never built an OpenBSD port before so all of this is new to
> me, and a bit daunting. I should probably start with something on
> -current, just to get the feel for how to set up the environment for
> building ports.
>
> The FAQ describes a lot of it but there are things, such as space
> requirements in the relevant partitions, that I’m not so sure about.
> My -current test VMs tend to have fairly small virtual disks (≈40GB)
> with default partitioning. The production machines have bigger disks
> but use manually tuned partition sizes that did not take into account
> build requirements. For example on one machine:
> 
> #                size           offset  fstype [fsize bsize   cpg]
>   a:          1024.0M               64  4.2BSD   2048 16384 12960 # /
>   b:          4096.0M          2097216    swap                    # none
>   c:         78128.0M                0  unused
>   d:          2048.0M         10485824  4.2BSD   2048 16384 12960 # /tmp
>   e:         20480.0M         14680128  4.2BSD   2048 16384 12960 # /var
>   f:          2560.0M         56623168  4.2BSD   2048 16384 12960 # /usr
>   g:           615.4M         61866048  4.2BSD   2048 16384  9768 # /usr/X11R6
>   h:          2560.0M         63126368  4.2BSD   2048 16384 12960 # /usr/local
>   i:          1613.7M         68369248  4.2BSD   2048 16384 12960 # /usr/src
>   j:          1024.0M         71674016  4.2BSD   2048 16384 12960 # /usr/obj
>   k:         42106.9M         73771168  4.2BSD   2048 16384 12960 # /home
> 
> Any hints on reasonable (minimal) sizes for the relevant partitions (/usr, 
> /usr/src, /usr/obj I think) to enable building ports?

/usr/src and /usr/obj are normally just used for building the
base OS.

If building ports, I would strongly recommend a separate filesystem
for /usr/ports.

For something like this I would have thought around 30GB would be
enough - more would be needed for some of the larger ports or if
you're building a wider variety of things (unless you split things
up further, this includes the build directory aka "pobj", built
packages, distfiles, etc). The filesystem holding the build dir
should be mounted with the "wxallowed" flag.

/usr/local also needs to be large enough to install the dependencies
you need to build things - I usually go with 20GB for this though
you might get away with less.

> But if building my own ports is the way to get PHP 8.4 on -stable then
> for this purpose it might be easier to bite the bullet and install a
> -current VM and set it up to enable the web services. At least for
> that stuff I know what I’m doing ;-)

That probably would be simpler - package snapshots now include 8.4 so
nothing to build yourself. Depends whether you think building things
from ports would be a useful thing to learn really. (OTOH if you're
doing it by hand at the moment, it might be better use of time to note
the steps needed to setup the web environment and script it :-)

Reply via email to