Marc Espie writes:

> It's very easy to miss some dependencies in ports.
>
> With recent additions, unless you really don't have any space available,
> I heartily recommend reproducing the build in a chroot.
>
> That's about as difficult as using
> proot -B /build
> (or some other location), making darn sure that partition is dev,wxallowed,
> and then copying the requisite parts of the ports tree.
>
> (if you do frequent port development, you might consider locating your ports
> tree INSIDE the chroot, actually).
>
> Also, you really really want to pay close attention to configure output.
> Especially about parts that DO exist in the ports tree
> (pkglocatedb is your friend, so is sqlports).
>
> And finally, setting things up for PORTS_PRIVSEP will help you avoid some
> other issues.  One nice thing with this is that the build is done as _pbuild
> which has *no network access whatsover*.
>
> All of this should help avoid quite a few 'hidden dependencies' or
> 'incomplete port' issues  that we tend to figure out when running actual
> full builds or reviewing ports...

This makes me think that we don't have some kind of a reference setup
for working with ports. Of course we have some nice man pages like
bsd.port.mk(5), ports(7), dpb(1) and proot(1) but I think that it's not
easy to figure out how to work with all of this at first.

Would it be interesting to add a new section in the FAQ like "Setup a
chroot to build ports wihin a jail with PORTS_PRIVSEP" ? I'd be happy to
write it.

Reply via email to