Re: Fixed directory locations in installs - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Fixed directory locations in installs
Date
Msg-id 3408.24.211.141.25.1083584280.squirrel@www.dunslane.net
Whole thread Raw
In response to Re: Fixed directory locations in installs  (Claudio Natoli <claudio.natoli@memetrics.com>)
Responses Re: Fixed directory locations in installs  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
Claudio Natoli said:
>
>
> Peter Eisentraut wrote:
>> Claudio Natoli wrote:
>> > I'm yet to see a convincing argument for why we can't adopt the
>> > "binary-location/../share" approach as submitted late March. AFAICS,
>> > it was rejected on the basis that it was not platform independent
>> > (no arguments there) and that we could not rely on the ".."
>> > approach.
>>
>> The only objection was that it hardcodes the layout already in the
>> source, which gives us no flexibility at all to try out different
>> installation layouts.  If you want to compute the relative paths from
>> bindir to libdir etc. at build time based on actual configure
>> options, then I see no problem with that.
>
> But we want to resolve the locations at run-time, not build or
> configure time. For win32, I'm yet to see why this approach is
> egregious.
>
> Do you have an alternative solution to propose?
>

I hope we are at cross purposes here, or else Peter's suggestion won't
fly - we need to be able to decouple some of these things from
configure/build time and defer them to installation/runtime. Any other
result will have us attracting curses from on high from the whole Windows
community, and other binary packagers won't get what I understand some
want.

How about if we have a configuration flag --enable-relocation which would
require a fixed layout based on an indeterminate root. This would have the
following effects:

. if prefix did not contain 'postgres' or 'pgsql' then 'postgresql' would
be appended.
. all *dir configure options would be forbidden - they would be based on
the prefix as now, and since it would contain 'postgres' the simple layout
we want would be used.
. binaries would have a DEFINE which would mean they would know they
should look for other binaries and shared files in locations which are
fixed relative to their own location rather than in the hardcoded
locations.

None of this should need a single #ifdef WIN32 :-)

(Would we need to turn off rpath for Unix in such a case? I suspect we
would.)

cheers

andrew






pgsql-hackers by date:

Previous
From: jihuang
Date:
Subject: ERROR: heapgettup: failed ReadBuffer
Next
From: Tom Lane
Date:
Subject: Re: ANALYZE locks pg_listener in EXCLUSIVE for long time?