summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut2023-12-21 07:40:32 +0000
committerPeter Eisentraut2023-12-21 09:10:06 +0000
commit9ca6e7b9411e36488ef539a2c1f6846ac92a7072 (patch)
tree59de3f7366350bc31ac00b6bf2d3f808fa61ded7
parent9aa374dcfb760746cd9ebe248dc68979c18849a5 (diff)
meson: Make gzip and tar optional
They are only used for some tests. The tests are already set to skip as appropriate if they are not available. Discussion: https://www.postgresql.org/message-id/flat/ZQzp_VMJcerM1Cs_%40paquier.xyz
-rw-r--r--contrib/basebackup_to_shell/meson.build4
-rw-r--r--meson.build4
-rw-r--r--src/bin/pg_basebackup/meson.build4
-rw-r--r--src/bin/pg_dump/meson.build2
-rw-r--r--src/bin/pg_verifybackup/meson.build4
5 files changed, 9 insertions, 9 deletions
diff --git a/contrib/basebackup_to_shell/meson.build b/contrib/basebackup_to_shell/meson.build
index a5488c30239..331ee1c9be2 100644
--- a/contrib/basebackup_to_shell/meson.build
+++ b/contrib/basebackup_to_shell/meson.build
@@ -24,7 +24,7 @@ tests += {
'tests': [
't/001_basic.pl',
],
- 'env': {'GZIP_PROGRAM': gzip.path(),
- 'TAR': tar.path()},
+ 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
+ 'TAR': tar.found() ? tar.path() : '' },
},
}
diff --git a/meson.build b/meson.build
index 3162d0343bd..4e98cbefe4e 100644
--- a/meson.build
+++ b/meson.build
@@ -333,8 +333,8 @@ flex = find_program(get_option('FLEX'), native: true, version: '>= 2.5.35')
bison = find_program(get_option('BISON'), native: true, version: '>= 2.3')
sed = find_program(get_option('SED'), 'sed', native: true, required: false)
prove = find_program(get_option('PROVE'), native: true, required: false)
-tar = find_program(get_option('TAR'), native: true)
-gzip = find_program(get_option('GZIP'), native: true)
+tar = find_program(get_option('TAR'), native: true, required: false)
+gzip = find_program(get_option('GZIP'), native: true, required: false)
program_lz4 = find_program(get_option('LZ4'), native: true, required: false)
openssl = find_program(get_option('OPENSSL'), native: true, required: false)
program_zstd = find_program(get_option('ZSTD'), native: true, required: false)
diff --git a/src/bin/pg_basebackup/meson.build b/src/bin/pg_basebackup/meson.build
index c426173db3a..5445903a5bc 100644
--- a/src/bin/pg_basebackup/meson.build
+++ b/src/bin/pg_basebackup/meson.build
@@ -80,8 +80,8 @@ tests += {
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'tap': {
- 'env': {'GZIP_PROGRAM': gzip.path(),
- 'TAR': tar.path(),
+ 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
+ 'TAR': tar.found() ? tar.path() : '',
'LZ4': program_lz4.found() ? program_lz4.path() : '',
},
'tests': [
diff --git a/src/bin/pg_dump/meson.build b/src/bin/pg_dump/meson.build
index b6603e26a50..77d162cad48 100644
--- a/src/bin/pg_dump/meson.build
+++ b/src/bin/pg_dump/meson.build
@@ -90,7 +90,7 @@ tests += {
'bd': meson.current_build_dir(),
'tap': {
'env': {
- 'GZIP_PROGRAM': gzip.path(),
+ 'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
'LZ4': program_lz4.found() ? program_lz4.path() : '',
'ZSTD': program_zstd.found() ? program_zstd.path() : '',
'with_icu': icu.found() ? 'yes' : 'no',
diff --git a/src/bin/pg_verifybackup/meson.build b/src/bin/pg_verifybackup/meson.build
index 58f780d1a63..8049011566e 100644
--- a/src/bin/pg_verifybackup/meson.build
+++ b/src/bin/pg_verifybackup/meson.build
@@ -22,8 +22,8 @@ tests += {
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'tap': {
- 'env': {'GZIP_PROGRAM': gzip.path(),
- 'TAR': tar.path(),
+ 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
+ 'TAR': tar.found() ? tar.path() : '',
'LZ4': program_lz4.found() ? program_lz4.path() : '',
'ZSTD': program_zstd.found() ? program_zstd.path() : ''},
'tests': [