postgresql/src/tools
Michael Paquier 5951ad1248 Improve setup of environment values for commands in MSVC's vcregress.pl
The current setup assumes that commands for lz4, zstd and gzip always
exist by default if not enforced by a user's environment.  However,
vcpkg, as one example, installs libraries but no binaries, so this
default setup to assume that a command should always be present would
cause failures.  This commit improves the detection of such external
commands as follows:
* If a ENV value is available, trust the environment/user and use it.
* If a ENV value is not available, check its execution by looking in the
current PATH, by launching a simple "$command --version" (that should be
portable enough).
** On execution failure, ignore ENV{command}.
** On execution success, set ENV{command} = "$command".

Note that this new rule applies to gzip, lz4 and zstd but not tar that
we assume will always exist.  Those commands are set up in the
environment only when using bincheck and taptest.  The CI includes all
those commands and I have checked that their setup is correct there.  I
have also tested this change in a MSVC environment where we have none of
those commands.

While on it, remove the references to lz4 from the documentation and
vcregress.pl in ~v13.  --with-lz4 has been added in v14~ so there is no
point to have this information in these older branches.

Reported-by: Andrew Dunstan
Reviewed-by: Andrew Dunstan
Discussion: https://postgr.es/m/14402151-376b-a57a-6d0c-10ad12608e12@dunslane.net
Backpatch-through: 10
2022-05-11 10:22:44 +09:00
..
editors emacs: Set indent-tabs-mode in perl-mode 2015-04-12 23:53:23 -04:00
findoidjoins Prevent accidental linking of system-supplied copies of libpq.so etc. 2018-07-09 17:23:31 -04:00
ifaddrs Initial pgindent run with pg_bsd_indent version 2.0. 2017-06-21 14:39:04 -04:00
make_diff Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
msvc Improve setup of environment values for commands in MSVC's vcregress.pl 2022-05-11 10:22:44 +09:00
pginclude Clean up Perl code according to perlcritic 2017-03-27 08:18:22 -04:00
pgindent Avoid race in RelationBuildDesc() affecting CREATE INDEX CONCURRENTLY. 2021-10-23 18:36:43 -07:00
FAQ2txt Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
RELEASE_CHANGES Update RELEASE_CHANGES' example of branch name format. 2017-08-06 23:26:09 -04:00
ccsym tools/ccsym: update for modern versions of gcc 2015-01-20 13:02:58 -05:00
check_bison_recursion.pl Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
codelines Fix remaining stray references to CVS. 2010-09-22 19:51:39 -04:00
copyright.pl Update copyright via script for 2017 2017-01-03 13:48:53 -05:00
find_badmacros Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
find_static Fix omission of -X (--no-psqlrc) in some psql invocations. 2015-12-28 11:46:43 -05:00
find_typedef Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
fix-old-flex-code.pl Post-PG 10 beta1 pgperltidy run 2017-05-17 19:01:23 -04:00
git-external-diff Add comment to tools/git-external-diff. 2011-03-11 05:06:31 -05:00
git_changelog git_changelog: improve comment 2017-04-13 09:13:43 -04:00
make_ctags Mention original ctags option name. 2012-02-24 16:19:18 -05:00
make_etags Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
make_mkid Add another pgdefine path check, and a cvs-git change. 2011-08-26 21:52:35 -04:00
pgtest pgtest: run clean, build, and check stages separately 2018-07-28 15:34:06 -04:00
testint128.c Initial pgindent run with pg_bsd_indent version 2.0. 2017-06-21 14:39:04 -04:00
valgrind.supp Avoid need for valgrind suppressions for pg_atomic_init_u64 on some platforms. 2020-06-08 20:03:09 -07:00
version_stamp.pl Clean up Perl code according to perlcritic 2017-03-27 08:18:22 -04:00
win32tzlist.pl Update Windows timezone name list to include currently-known zones. 2020-04-24 17:53:23 -04:00