Poudriere/PREFIX breakage?

Mason Loring Bliss mason at blisses.org
Tue Oct 6 13:59:02 UTC 2020


On Tue, Oct 06, 2020 at 06:20:05PM +0900, Yasuhiro KIMURA wrote:

> This is because base system implicitly assumes PREFIX=/usr/local.

Evidently part of my issue is confused over PREFIX vs LOCALBASE. The most
detailed thing I found was here:

    https://www.freebsd.org/doc/en/books/porters-handbook/porting-prefix.html

Neither is documented in make.conf(5) and I didn't find definitions online.


> If you exec `fgrep -r /usr/local /etc`, then you find '/usr/local' is
> hard-coded in some files under /etc.

This is interesting - see below.


On Tue, Oct 06, 2020 at 12:49:01PM +0200, Mathieu Arnold wrote:

> What problem are you trying to fix by setting PREFIX=/opt ?

I want system-provided tools to live elsewhere so I can reserve /usr/local
for its traditional purpose.


> If the goal is to have what is usually in /usr/local in /opt, then you
> do not need to set PREFIX, but you must set LOCALBASE instead.

Where should I have learned about this? I'm generally pretty good with
search engines, and I was struggling to find how to do this, found nothing
specific to Poudriere, and found the link I noted above that made me think
PREFIX was what I wanted.

I also read through this stuff, which didn't really clarify this:

    https://reviews.freebsd.org/D12666
    https://forums.freebsd.org/threads/prefix-and-localbase-path-aka-compat-any-ez-way.16773/

I tried setting both to /opt last night, and saw lots of breakage. I'd be
happy to try again with only LOCALBASE, but per Yasuhiro's note, there
seems to be a large number of references to /usr/local hardcoded in /etc.


Is there a knob that's honored for general builds such that these
references point to LOCALBASE? Or is LOCALBASE support largely vestigal and
painful to use nowadays? Between these two very good responses, I'm still
left unsure about what's supported and how to go about it comprehensively.

-- 
Mason Loring Bliss    mason at blisses.org
They also surf, who only stand on waves.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20201006/176d9586/attachment.sig>


More information about the freebsd-ports mailing list