Re: PGXS "check" target forcing an install ? - Mailing list pgsql-hackers

From Robert Haas
Subject Re: PGXS "check" target forcing an install ?
Date
Msg-id CA+Tgmob1xG-dwMczYoM=JONmRWzrF8Un7CRR+3MVr0RR_rfyYQ@mail.gmail.com
Whole thread Raw
In response to Re: PGXS "check" target forcing an install ?  (Noah Misch <noah@leadboat.com>)
List pgsql-hackers
On Thu, Sep 24, 2015 at 4:21 PM, Noah Misch <noah@leadboat.com> wrote:
> On Fri, Jun 26, 2015 at 09:09:15AM -0400, Robert Haas wrote:
>> On Tue, Jun 23, 2015 at 1:31 AM, Michael Paquier <michael.paquier@gmail.com> wrote:
>> >> I tracked the dangerous -rf to come from Makefile.global and it's empty
>> >> string being due to abs_top_builddir not being define in my own Makefile.
>> >> But beside that, which I can probably fix, it doesn't sound correct
>> >> that a "check" rule insists in finding an "install" rule.
>> >
>> > Oops, this is a regression, and a dangerous one indeed. This is caused
>> > by dcae5fac.
>> >
>> > One fix is to use NO_TEMP_INSTALL=yes in Makefile.global in the
>> > context of PGXS, like in the patch attached, this variable needing to
>> > be set before Makefile.global is loaded.
>
> This seems reasonable in concept, though the patch's addition is off-topic in
> a section marked "# Support for VPATH builds".  However, ...
>
>> Gulp.  I certainly agree that emitting rm -rf /tmp_install is a scary
>> thing for a PostgreSQL Makefile to be doing.  Fortunately, people
>> aren't likely to have a directory under / by that name, and maybe not
>> permissions on it even if they did, but all the same it's not good.  I
>> propose trying to guard against that a bit more explicitly, as in the
>> attached.
>
> ... agreed.

Thanks for reminding me about this patch.  I've rebased it and
committed it to master and 9.5.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: zhangjinyu
Date:
Subject: Re: BRIN Scan: Optimize memory allocation in function 'bringetbitmap'
Next
From: Robert Haas
Date:
Subject: Re: Manual bitswizzling -> LOCKBIT_ON