Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Oct 2020 12:37:53 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Stefan Esser <se@freebsd.org>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: [REVIEW] replace literal uses of /usr/local with a macro [D26942]
Message-ID:  <CANCZdfr=QrAP1Dyu_ZiF-Ptmoffv3Nvpcwhe9W59hhcOJLhqXA@mail.gmail.com>
In-Reply-To: <2b938572-dfbb-4597-0095-8490bb3745ee@freebsd.org>
References:  <2b938572-dfbb-4597-0095-8490bb3745ee@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Oct 25, 2020 at 7:11 AM Stefan Esser <se@freebsd.org> wrote:

> I have created
>
>         https://reviews.freebsd.org/D26942
>
> as a suggested patch to remove nearly 20 literal uses of /usr/local
> in the base system.
>
> This requires to add an include of paths.h to some of the source files
> (.c or .h), but none of these includes is leaked to /usr/include and
> they are thus only visible during the build.
>
> I have built the world with this patch applied and the resulting
> binaries are unchanged.
>
> The definition of _PATH_LOCALBASE in paths.h could at a later time
> be derived from the value of LOCALBASE (in src/Makefile.inc1 or
> overridden my the user in src.conf), but this is a change that
> should be discussed separately from this review.
>
> Please comment on this patch, the decision to not touch contrib
> sources and which follow-up steps to perform next (e.g. similar
> changes to shell scripts or configuration files).
>

I hope this is coupled with creating an option to have /usr/local/lib,
/usr/local/inclulde, etc in the default search paths. While some may
dislike it, when I've hacked these in the past I've found that porting some
specialized Linux software to go more quickly since I didn't have to thread
this through autoconfig scripts that were poorly written...  I know it's
not for everybody (hence my use of the word 'option'), though.

Thanks for jumping into this problem and sorting it out. I tend to agree
with comments you've made elsewhere the only hope is a series of
incremental solutions give the twisty nature of where and how this is used.

Warner



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfr=QrAP1Dyu_ZiF-Ptmoffv3Nvpcwhe9W59hhcOJLhqXA>