pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Improve setup of environment values for commands in MSVC's vcreg
6+ messages / 1 participants
[nested] [flat]
* pgsql: Improve setup of environment values for commands in MSVC's vcreg
@ 2022-05-11 01:24 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2022-05-11 01:24 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/f0fb2e9509e90322dfc73f9a817f1488afa03bf6
Modified Files
--------------
doc/src/sgml/install-windows.sgml | 9 ---------
src/tools/msvc/vcregress.pl | 39 ++++++++++++++++++++++++++++++++++++---
2 files changed, 36 insertions(+), 12 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve setup of environment values for commands in MSVC's vcreg
@ 2022-05-11 01:24 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2022-05-11 01:24 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/de6eec10ee2b639a57c4b02b21b834c519f24e5b
Modified Files
--------------
doc/src/sgml/install-windows.sgml | 9 ---------
src/tools/msvc/vcregress.pl | 39 ++++++++++++++++++++++++++++++++++++---
2 files changed, 36 insertions(+), 12 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve setup of environment values for commands in MSVC's vcreg
@ 2022-05-11 01:24 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2022-05-11 01:24 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ca9e9b08e453523314a3b8e87d1894edb23b6e8d
Modified Files
--------------
src/tools/msvc/vcregress.pl | 41 ++++++++++++++++++++++++++++++++++++++---
1 file changed, 38 insertions(+), 3 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve setup of environment values for commands in MSVC's vcreg
@ 2022-05-11 01:24 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2022-05-11 01:24 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/5951ad124845e1a81d6259e36e75989afff7eabd
Modified Files
--------------
doc/src/sgml/install-windows.sgml | 9 ---------
src/tools/msvc/vcregress.pl | 39 ++++++++++++++++++++++++++++++++++++---
2 files changed, 36 insertions(+), 12 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve setup of environment values for commands in MSVC's vcreg
@ 2022-05-11 01:24 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2022-05-11 01:24 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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
Branch
------
REL_13_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/b9d70ef34b833fd63e3ff9f049dbbcdfda9dc9fe
Modified Files
--------------
doc/src/sgml/install-windows.sgml | 9 ---------
src/tools/msvc/vcregress.pl | 40 ++++++++++++++++++++++++++++++++++++---
2 files changed, 37 insertions(+), 12 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve setup of environment values for commands in MSVC's vcreg
@ 2022-05-11 01:24 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 6+ messages in thread
From: Michael Paquier @ 2022-05-11 01:24 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/0826ac89ac18ab05b9991cfbba72351a502ef12c
Modified Files
--------------
src/tools/msvc/vcregress.pl | 43 +++++++++++++++++++++++++++++++++++++++----
1 file changed, 39 insertions(+), 4 deletions(-)
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2022-05-11 01:24 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 01:24 pgsql: Improve setup of environment values for commands in MSVC's vcreg Michael Paquier <michael@paquier.xyz>
2022-05-11 01:24 pgsql: Improve setup of environment values for commands in MSVC's vcreg Michael Paquier <michael@paquier.xyz>
2022-05-11 01:24 pgsql: Improve setup of environment values for commands in MSVC's vcreg Michael Paquier <michael@paquier.xyz>
2022-05-11 01:24 pgsql: Improve setup of environment values for commands in MSVC's vcreg Michael Paquier <michael@paquier.xyz>
2022-05-11 01:24 pgsql: Improve setup of environment values for commands in MSVC's vcreg Michael Paquier <michael@paquier.xyz>
2022-05-11 01:24 pgsql: Improve setup of environment values for commands in MSVC's vcreg Michael Paquier <michael@paquier.xyz>
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