Re: PGXS "check" target forcing an install ?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PGXS "check" target forcing an install ?
Date: 2015-06-26 13:09:15
Message-ID: CA+TgmoYc2-FkYQK7JGZgXfXBCqohop5dS71Q1Fmaha-p4Tjqeg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jun 23, 2015 at 1:31 AM, Michael Paquier
<michael(dot)paquier(at)gmail(dot)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. We could as well use directly
> PGXS in the section "Testing", but that does not sound appealing for
> Makefile.global's readability.

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.

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

Attachment Content-Type Size
careful-with-rm-rf.patch text/x-patch 679 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-06-26 13:42:48 Re: Schedule for 9.5alpha1
Previous Message Andres Freund 2015-06-26 13:06:39 Re: Nitpicking: unnecessary NULL-pointer check in pg_upgrade's controldata.c