From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add ./configure check for "lz4" command
Date: Mon, 14 Feb 2022 01:42:06 +0000
Message-ID: <E1nJQNS-0001cC-FB@gemulon.postgresql.org> (raw)
Add ./configure check for "lz4" command
Some environments may compile with --with-lz4 while the command "lz4"
goes missing, causing two failures in the TAP tests of pg_verifybackup
(008_untar.pl and 010_client_untar.pl) as the code assumed that the
command always existed with a hardcoded value in src/Makefile.global.
Rather than this method, this adds a ./configure check based on
PGAC_PATH_PROGS() to find automatically the command and get an absolute
path to it.
Both tests need to be adjusted for the case where the command does not
exist, actually, as Makefile.global would set now LZ4 to an empty value
in this case. The TAP tests of pg_receivewal already do that.
Per report from buildfarm member copperhead, as an effect of dab2984.
The origin of the failure is actually babbbb5 that did not centralize
the check for the existence of a "lz4" command at ./configure to shave a
few cycles. Note that one just needs to tweak an environment to move
"lz4" out of the way to reproduce the problem, which is what I did to
test this change.
Per discussion with Robert Haas, Tom Lane, Andres Freund and myself.
Discussion: https://postgr.es/m/Ygc51WVAFGocSu4h@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1d084fba1bd144538dfea22c322f1c148c821148
Modified Files
--------------
configure | 55 +++++++++++++++++++++++++++
configure.ac | 1 +
src/Makefile.global.in | 2 +-
src/bin/pg_verifybackup/t/008_untar.pl | 5 ++-
src/bin/pg_verifybackup/t/010_client_untar.pl | 5 ++-
5 files changed, 63 insertions(+), 5 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Add ./configure check for "lz4" command
In-Reply-To: <E1nJQNS-0001cC-FB@gemulon.postgresql.org>
References: <E1nJQNS-0001cC-FB@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox