0005-meson-Fix-deprecation-warnings.patch
text/plain
Filename: 0005-meson-Fix-deprecation-warnings.patch
Type: text/plain
Part: 4
Message:
Re: minimum Meson version
Patch
Format: format-patch
Series: patch 0005
Subject: meson: Fix deprecation warnings
| File | + | − |
|---|---|---|
| contrib/basebackup_to_shell/meson.build | 2 | 2 |
| contrib/dblink/meson.build | 1 | 1 |
| contrib/postgres_fdw/meson.build | 1 | 1 |
| meson.build | 16 | 16 |
| src/backend/jit/llvm/meson.build | 1 | 1 |
| src/bin/pg_basebackup/meson.build | 3 | 3 |
| src/bin/pg_dump/meson.build | 3 | 3 |
| src/bin/pg_verifybackup/meson.build | 4 | 4 |
| src/include/nodes/meson.build | 1 | 1 |
| src/include/pch/meson.build | 3 | 3 |
| src/makefiles/meson.build | 5 | 5 |
| src/pl/plperl/meson.build | 1 | 1 |
| src/test/modules/injection_points/meson.build | 1 | 1 |
| src/test/modules/oauth_validator/meson.build | 1 | 1 |
| src/test/ssl/meson.build | 1 | 1 |
From 38496e5c395b047331f75c028d3346080b8cfd7b Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Wed, 18 Jun 2025 10:18:26 +0200
Subject: [PATCH 5/5] meson: Fix deprecation warnings
WARNING: Project targets '>=0.57' but uses feature deprecated since '0.55.0': ExternalProgram.path. use ExternalProgram.full_path() instead
WARNING: Project targets '>=0.57' but uses feature deprecated since '0.56.0': meson.build_root. use meson.project_build_root() or meson.global_build_root() instead.
---
contrib/basebackup_to_shell/meson.build | 4 +--
contrib/dblink/meson.build | 2 +-
contrib/postgres_fdw/meson.build | 2 +-
meson.build | 32 +++++++++----------
src/backend/jit/llvm/meson.build | 2 +-
src/bin/pg_basebackup/meson.build | 6 ++--
src/bin/pg_dump/meson.build | 6 ++--
src/bin/pg_verifybackup/meson.build | 8 ++---
src/include/nodes/meson.build | 2 +-
src/include/pch/meson.build | 6 ++--
src/makefiles/meson.build | 10 +++---
src/pl/plperl/meson.build | 2 +-
src/test/modules/injection_points/meson.build | 2 +-
src/test/modules/oauth_validator/meson.build | 2 +-
src/test/ssl/meson.build | 2 +-
15 files changed, 44 insertions(+), 44 deletions(-)
diff --git a/contrib/basebackup_to_shell/meson.build b/contrib/basebackup_to_shell/meson.build
index 8c88242456e..8a4f170c5f8 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.found() ? gzip.path() : '',
- 'TAR': tar.found() ? tar.path() : '' },
+ 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.full_path() : '',
+ 'TAR': tar.found() ? tar.full_path() : '' },
},
}
diff --git a/contrib/dblink/meson.build b/contrib/dblink/meson.build
index dfd8eb6877e..a19ce6cf4b9 100644
--- a/contrib/dblink/meson.build
+++ b/contrib/dblink/meson.build
@@ -34,7 +34,7 @@ tests += {
'sql': [
'dblink',
],
- 'regress_args': ['--dlpath', meson.build_root() / 'src/test/regress'],
+ 'regress_args': ['--dlpath', meson.project_build_root() / 'src/test/regress'],
},
'tap': {
'tests': [
diff --git a/contrib/postgres_fdw/meson.build b/contrib/postgres_fdw/meson.build
index 8b29be24dee..5c11bc6496f 100644
--- a/contrib/postgres_fdw/meson.build
+++ b/contrib/postgres_fdw/meson.build
@@ -39,7 +39,7 @@ tests += {
'postgres_fdw',
'query_cancel',
],
- 'regress_args': ['--dlpath', meson.build_root() / 'src/test/regress'],
+ 'regress_args': ['--dlpath', meson.project_build_root() / 'src/test/regress'],
},
'tap': {
'tests': [
diff --git a/meson.build b/meson.build
index 92945cb4291..188a5d55a97 100644
--- a/meson.build
+++ b/meson.build
@@ -1284,7 +1284,7 @@ pyopt = get_option('plpython')
python3_dep = not_found_dep
if not pyopt.disabled()
pm = import('python')
- python3_inst = pm.find_installation(python.path(), required: pyopt)
+ python3_inst = pm.find_installation(python.full_path(), required: pyopt)
if python3_inst.found()
python3_dep = python3_inst.dependency(embed: true, required: pyopt)
# Remove this check after we depend on Meson >= 1.1.0
@@ -3145,13 +3145,13 @@ gen_kwlist_cmd = [
###
if host_system == 'windows'
- pg_ico = meson.source_root() / 'src' / 'port' / 'win32.ico'
+ pg_ico = meson.project_source_root() / 'src' / 'port' / 'win32.ico'
win32ver_rc = files('src/port/win32ver.rc')
rcgen = find_program('src/tools/rcgen', native: true)
rcgen_base_args = [
'--srcdir', '@SOURCE_DIR@',
- '--builddir', meson.build_root(),
+ '--builddir', meson.project_build_root(),
'--rcout', '@OUTPUT0@',
'--out', '@OUTPUT1@',
'--input', '@INPUT@',
@@ -3160,11 +3160,11 @@ if host_system == 'windows'
if cc.get_argument_syntax() == 'msvc'
rc = find_program('rc', required: true)
- rcgen_base_args += ['--rc', rc.path()]
+ rcgen_base_args += ['--rc', rc.full_path()]
rcgen_outputs = ['@BASENAME@.rc', '@BASENAME@.res']
else
windres = find_program('windres', required: true)
- rcgen_base_args += ['--windres', windres.path()]
+ rcgen_base_args += ['--windres', windres.full_path()]
rcgen_outputs = ['@BASENAME@.rc', '@BASENAME@.obj']
endif
@@ -3397,7 +3397,7 @@ foreach t1 : configure_files
potentially_conflicting_files += meson.current_build_dir() / t
endforeach
foreach sub, fnames : generated_sources_ac
- sub = meson.build_root() / sub
+ sub = meson.project_build_root() / sub
foreach fname : fnames
potentially_conflicting_files += sub / fname
endforeach
@@ -3497,7 +3497,7 @@ run_target('install-test-files',
###############################################################
# DESTDIR for the installation we'll run tests in
-test_install_destdir = meson.build_root() / 'tmp_install/'
+test_install_destdir = meson.project_build_root() / 'tmp_install/'
# DESTDIR + prefix appropriately munged
if build_system != 'windows'
@@ -3540,7 +3540,7 @@ test('install_test_files',
is_parallel: false,
suite: ['setup'])
-test_result_dir = meson.build_root() / 'testrun'
+test_result_dir = meson.project_build_root() / 'testrun'
# XXX: pg_regress doesn't assign unique ports on windows. To avoid the
@@ -3551,12 +3551,12 @@ testport = 40000
test_env = environment()
-test_initdb_template = meson.build_root() / 'tmp_install' / 'initdb-template'
+test_initdb_template = meson.project_build_root() / 'tmp_install' / 'initdb-template'
test_env.set('PG_REGRESS', pg_regress.full_path())
test_env.set('REGRESS_SHLIB', regress_module.full_path())
test_env.set('INITDB_TEMPLATE', test_initdb_template)
# for Cluster.pm's portlock logic
-test_env.set('top_builddir', meson.build_root())
+test_env.set('top_builddir', meson.project_build_root())
# Add the temporary installation to the library search path on platforms where
# that works (everything but windows, basically). On windows everything
@@ -3613,7 +3613,7 @@ testwrap = files('src/tools/testwrap')
foreach test_dir : tests
testwrap_base = [
testwrap,
- '--basedir', meson.build_root(),
+ '--basedir', meson.project_build_root(),
'--srcdir', test_dir['sd'],
# Some test suites are not run by default but can be run if selected by the
# user via variable PG_TEST_EXTRA. Pass configuration time value of
@@ -3730,8 +3730,8 @@ foreach test_dir : tests
endif
test_command = [
- perl.path(),
- '-I', meson.source_root() / 'src/test/perl',
+ perl.full_path(),
+ '-I', meson.project_source_root() / 'src/test/perl',
'-I', test_dir['sd'],
]
@@ -3847,7 +3847,7 @@ tar_gz = custom_target('tar.gz',
'--format', 'tar.gz',
'-9',
'--prefix', distdir + '/',
- '-o', join_paths(meson.build_root(), '@OUTPUT@'),
+ '-o', join_paths(meson.project_build_root(), '@OUTPUT@'),
pg_git_revision],
output: distdir + '.tar.gz',
)
@@ -3857,11 +3857,11 @@ if bzip2.found()
build_always_stale: true,
command: [git, '-C', '@SOURCE_ROOT@',
'-c', 'core.autocrlf=false',
- '-c', 'tar.tar.bz2.command="@0@" -c'.format(bzip2.path()),
+ '-c', 'tar.tar.bz2.command="@0@" -c'.format(bzip2.full_path()),
'archive',
'--format', 'tar.bz2',
'--prefix', distdir + '/',
- '-o', join_paths(meson.build_root(), '@OUTPUT@'),
+ '-o', join_paths(meson.project_build_root(), '@OUTPUT@'),
pg_git_revision],
output: distdir + '.tar.bz2',
)
diff --git a/src/backend/jit/llvm/meson.build b/src/backend/jit/llvm/meson.build
index c8e06dfbe35..805fbd69006 100644
--- a/src/backend/jit/llvm/meson.build
+++ b/src/backend/jit/llvm/meson.build
@@ -53,7 +53,7 @@ llvm_irgen_args = [
if ccache.found()
llvm_irgen_command = ccache
- llvm_irgen_args = [clang.path()] + llvm_irgen_args
+ llvm_irgen_args = [clang.full_path()] + llvm_irgen_args
else
llvm_irgen_command = clang
endif
diff --git a/src/bin/pg_basebackup/meson.build b/src/bin/pg_basebackup/meson.build
index 8a1c96b4f5c..3a7fc10eab0 100644
--- a/src/bin/pg_basebackup/meson.build
+++ b/src/bin/pg_basebackup/meson.build
@@ -93,9 +93,9 @@ tests += {
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'tap': {
- 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
- 'TAR': tar.found() ? tar.path() : '',
- 'LZ4': program_lz4.found() ? program_lz4.path() : '',
+ 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.full_path() : '',
+ 'TAR': tar.found() ? tar.full_path() : '',
+ 'LZ4': program_lz4.found() ? program_lz4.full_path() : '',
},
'tests': [
't/010_pg_basebackup.pl',
diff --git a/src/bin/pg_dump/meson.build b/src/bin/pg_dump/meson.build
index d8e9e101254..4a4ebbd8ec9 100644
--- a/src/bin/pg_dump/meson.build
+++ b/src/bin/pg_dump/meson.build
@@ -91,9 +91,9 @@ tests += {
'bd': meson.current_build_dir(),
'tap': {
'env': {
- 'GZIP_PROGRAM': gzip.found() ? gzip.path() : '',
- 'LZ4': program_lz4.found() ? program_lz4.path() : '',
- 'ZSTD': program_zstd.found() ? program_zstd.path() : '',
+ 'GZIP_PROGRAM': gzip.found() ? gzip.full_path() : '',
+ 'LZ4': program_lz4.found() ? program_lz4.full_path() : '',
+ 'ZSTD': program_zstd.found() ? program_zstd.full_path() : '',
'with_icu': icu.found() ? 'yes' : 'no',
},
'tests': [
diff --git a/src/bin/pg_verifybackup/meson.build b/src/bin/pg_verifybackup/meson.build
index 9567d55500d..f45ea790d8e 100644
--- a/src/bin/pg_verifybackup/meson.build
+++ b/src/bin/pg_verifybackup/meson.build
@@ -23,10 +23,10 @@ tests += {
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'tap': {
- '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() : ''},
+ 'env': {'GZIP_PROGRAM': gzip.found() ? gzip.full_path() : '',
+ 'TAR': tar.found() ? tar.full_path() : '',
+ 'LZ4': program_lz4.found() ? program_lz4.full_path() : '',
+ 'ZSTD': program_zstd.found() ? program_zstd.full_path() : ''},
'tests': [
't/001_basic.pl',
't/002_algorithm.pl',
diff --git a/src/include/nodes/meson.build b/src/include/nodes/meson.build
index d1ca24dd32f..ea36cb0fda4 100644
--- a/src/include/nodes/meson.build
+++ b/src/include/nodes/meson.build
@@ -28,7 +28,7 @@ node_support_input_i = [
node_support_input = []
foreach i : node_support_input_i
- node_support_input += meson.source_root() / 'src' / 'include' / i
+ node_support_input += meson.project_source_root() / 'src' / 'include' / i
endforeach
node_support_output = [
diff --git a/src/include/pch/meson.build b/src/include/pch/meson.build
index f6babee6f6d..603add1a351 100644
--- a/src/include/pch/meson.build
+++ b/src/include/pch/meson.build
@@ -1,6 +1,6 @@
# Copyright (c) 2022-2025, PostgreSQL Global Development Group
# See https://github.com/mesonbuild/meson/issues/10338
-pch_c_h = meson.source_root() / meson.current_source_dir() / 'c_pch.h'
-pch_postgres_h = meson.source_root() / meson.current_source_dir() / 'postgres_pch.h'
-pch_postgres_fe_h = meson.source_root() / meson.current_source_dir() / 'postgres_fe_pch.h'
+pch_c_h = meson.project_source_root() / meson.current_source_dir() / 'c_pch.h'
+pch_postgres_h = meson.project_source_root() / meson.current_source_dir() / 'postgres_pch.h'
+pch_postgres_fe_h = meson.project_source_root() / meson.current_source_dir() / 'postgres_fe_pch.h'
diff --git a/src/makefiles/meson.build b/src/makefiles/meson.build
index 91a8de1ee9b..54dbc059ada 100644
--- a/src/makefiles/meson.build
+++ b/src/makefiles/meson.build
@@ -6,7 +6,7 @@
# Emulation of PGAC_CHECK_STRIP
strip_bin = find_program(get_option('STRIP'), required: false, native: true)
-strip_cmd = strip_bin.found() ? [strip_bin.path()] : [':']
+strip_cmd = strip_bin.found() ? [strip_bin.full_path()] : [':']
working_strip = false
if strip_bin.found()
@@ -49,8 +49,8 @@ pgxs_kv = {
'PORTNAME': portname,
'PG_SYSROOT': pg_sysroot,
- 'abs_top_builddir': meson.build_root(),
- 'abs_top_srcdir': meson.source_root(),
+ 'abs_top_builddir': meson.project_build_root(),
+ 'abs_top_srcdir': meson.project_source_root(),
'enable_rpath': get_option('rpath') ? 'yes' : 'no',
'enable_nls': libintl.found() ? 'yes' : 'no',
@@ -123,7 +123,7 @@ pgxs_kv = {
if llvm.found()
pgxs_kv += {
- 'CLANG': clang.path(),
+ 'CLANG': clang.full_path(),
'CXX': ' '.join(cpp.cmd_array()),
'LLVM_BINPATH': llvm_binpath,
}
@@ -258,7 +258,7 @@ pgxs_deps = {
pgxs_cdata = configuration_data(pgxs_kv)
foreach b, p : pgxs_bins
- pgxs_cdata.set(b, p.found() ? p.path() : '')
+ pgxs_cdata.set(b, p.found() ? p.full_path() : '')
endforeach
foreach pe : pgxs_empty
diff --git a/src/pl/plperl/meson.build b/src/pl/plperl/meson.build
index b463d4d56c5..7c4081c3460 100644
--- a/src/pl/plperl/meson.build
+++ b/src/pl/plperl/meson.build
@@ -96,7 +96,7 @@ tests += {
'plperl_transaction',
'plperl_env',
],
- 'regress_args': ['--dlpath', meson.build_root() / 'src/test/regress'],
+ 'regress_args': ['--dlpath', meson.project_build_root() / 'src/test/regress'],
},
}
diff --git a/src/test/modules/injection_points/meson.build b/src/test/modules/injection_points/meson.build
index d61149712fd..7cea10d2c69 100644
--- a/src/test/modules/injection_points/meson.build
+++ b/src/test/modules/injection_points/meson.build
@@ -38,7 +38,7 @@ tests += {
'hashagg',
'reindex_conc',
],
- 'regress_args': ['--dlpath', meson.build_root() / 'src/test/regress'],
+ 'regress_args': ['--dlpath', meson.project_build_root() / 'src/test/regress'],
# The injection points are cluster-wide, so disable installcheck
'runningcheck': false,
},
diff --git a/src/test/modules/oauth_validator/meson.build b/src/test/modules/oauth_validator/meson.build
index e190f9cf15a..a6f937fd7d7 100644
--- a/src/test/modules/oauth_validator/meson.build
+++ b/src/test/modules/oauth_validator/meson.build
@@ -77,7 +77,7 @@ tests += {
't/002_client.pl',
],
'env': {
- 'PYTHON': python.path(),
+ 'PYTHON': python.full_path(),
'with_libcurl': oauth_flow_supported ? 'yes' : 'no',
'with_python': 'yes',
},
diff --git a/src/test/ssl/meson.build b/src/test/ssl/meson.build
index cf8b2b9303a..d8e0fb518e0 100644
--- a/src/test/ssl/meson.build
+++ b/src/test/ssl/meson.build
@@ -7,7 +7,7 @@ tests += {
'tap': {
'env': {
'with_ssl': ssl_library,
- 'OPENSSL': openssl.found() ? openssl.path() : '',
+ 'OPENSSL': openssl.found() ? openssl.full_path() : '',
},
'tests': [
't/001_ssltests.pl',
--
2.49.0