Re: another look at macOS SIP - Mailing list pgsql-hackers

From Tom Lane
Subject Re: another look at macOS SIP
Date
Msg-id 7146.1568136402@sss.pgh.pa.us
Whole thread Raw
In response to another look at macOS SIP  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: another look at macOS SIP
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
> I have figured out another solution to the problem that macOS SIP
> defeats the use of DYLD_LIBRARY_PATH for running the temp-install
> regression tests.  It's not without problems either, but it might show a
> path forward.
> ...
> The precise issue is that /bin/sh filters out DYLD_* environment
> variables (presumably all, but at least the ones we care about) when it
> starts.

Yeah, that was pretty much what we'd speculated.

> I think the way forward here is to get rid of all uses of system() for
> calling between PostgreSQL programs.

We could do that perhaps, but how are you going to get make to not use
/bin/sh while spawning subprocesses?  I don't think we want to also
reimplement make ...

> There is a minor second issue, namely that /usr/bin/perl also filters
> out DYLD_* environment variables.  This can be worked around again by
> using a third-party installation of Perl.

This is not sounding better than just turning off SIP :-(

We could, however, probably fix things so that our Perl test scripts
re-establish those environment variables internally.  We don't need
the perl processes themselves to load test libraries, just their
descendants.

Maybe a similar workaround is possible for the "make" issue?
I have a feeling it would be less flexible than what we have
today, though.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: another look at macOS SIP
Next
From: Alvaro Herrera from 2ndQuadrant
Date:
Subject: Re: Re: libpq host/hostaddr/conninfo inconsistencies