GSoC: Separation of Ports Build Process from Local Installation
Theron
theron.tarigo at gmail.com
Wed May 29 22:58:19 UTC 2019
On 2019-05-29 09:49, Matthew Seaman wrote:
> On 29/05/2019 10:56, Peter Pentchev wrote:
>> Hmm, I could be wrong, but isn't ${LOCALBASE} supposed to be where
>> ports find stuff*during the build*, and ${PREFIX} where they
>> install the built files? Of course, I haven't actually touched
>> a FreeBSD ports build in years, so I might very likely be wrong.
>> I also seem to remember a series of test port builds done a long
>> time ago with a different value for LOCALBASE, specifically to catch
>> ports that do not honor the policy in this regard.
>
> No, you are correct. The LOCALBASE setting is where the ports will
> look for build dependencies. However, the problem here is there is no
> guarrantee that the LOCALBASE value will not somehow be compiled into
> a resulting package (eg. as RPATH for dynamically loading a shlib) so
> would also be needed for runtime dependencies.
LOCALBASE does control where ports find their dependencies at build
time, but it is not the only purpose. There is, as best I can tell, no
kind of separation between LOCALBASE as location to find files at
compile time vs. at run time. LOCALBASE serves the same effective
purpose as PREFIX, except that the separation is maintained so that a
port can use some other PREFIX in special cases. Therefore it seems
reasonable to me to leave the established meaning of LOCALBASE as-is and
to use a different mechanism for accessing the dependency install
location at build time.
Besides, hijacking LOCALBASE is not really an option, since there are
existing tests such as:
.if (${PREFIX} != ${LOCALBASE} && ${PREFIX} != ${LINUXBASE} && \
which seem reasonable to me.
On 2019-05-29 05:56, Peter Pentchev wrote:
> I also seem to remember a series of test port builds done a long
> time ago with a different value for LOCALBASE, specifically to catch
> ports that do not honor the policy in this regard.
I will be doing a similar test, using syscall tracing, to check that
nothing reads from the real ${LOCALBASE} during building.
On 2019-05-29 17:42, Lorenzo Salvadore via freebsd-ports wrote:
> Indeed, I maintain a port where LOCALBASE is a value that appears in the
> resulting package's files (not as RPATH): math/maxima. See its Makefile at
> line 65.
Indeed, many other ports as well make this kind of assumption.
More information about the freebsd-ports
mailing list