Some feedback and patches for your branch at 3274198960c139328fef3c725cee1468bbfff469:

0001-Install-a-few-more-files.patch

These are just some files that were apparently forgotten to be installed so far.

0002-Adjust-some-header-file-installation-paths.patch

The installation of server headers is apparently still in progress. This just adjusts the installation directory of those that are already being dealt with, so they match the existing installation layout.

0003-Fix-warnings-about-deprecated-features.patch

This fixes some deprecation warnings and raises the requirement to 0.56. I'm not sure why the current cutoff at 0.54 was chosen. Perhaps that could be documented. If we choose to stay with 0.54, is there a way to turn off deprecation warnings, so not everyone needs to see them?

0004-Install-postmaster-symlink.patch

This needs 0.61, so maybe it's a bit too new. Or we could get rid of the postmaster symlink altogether?

0005-Workaround-for-Perl-detection.patch

This is needed on my system to get the Perl detection to pass. If I look at the equivalent configure code, some more refinement appears to be needed in this area.
From 15108c90960235a9c61b8d001eb68c563f9f8aa1 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 13 Apr 2022 11:06:28 +0200
Subject: [PATCH 1/5] Install a few more files

---
 contrib/hstore/meson.build    | 1 +
 src/backend/utils/meson.build | 2 ++
 src/bin/psql/meson.build      | 2 ++
 src/include/meson.build       | 2 ++
 4 files changed, 7 insertions(+)

diff --git a/contrib/hstore/meson.build b/contrib/hstore/meson.build
index 661e61f969..e1e634b948 100644
--- a/contrib/hstore/meson.build
+++ b/contrib/hstore/meson.build
@@ -17,6 +17,7 @@ hstore = shared_module('hstore',
 install_data(
   'hstore.control',
   'hstore--1.1--1.2.sql',
+  'hstore--1.2--1.3.sql',
   'hstore--1.3--1.4.sql',
   'hstore--1.4.sql',
   'hstore--1.4--1.5.sql',
diff --git a/src/backend/utils/meson.build b/src/backend/utils/meson.build
index afb1c0346b..a936005886 100644
--- a/src/backend/utils/meson.build
+++ b/src/backend/utils/meson.build
@@ -1,3 +1,5 @@
+install_data('errcodes.txt', install_dir: 'share/')
+
 subdir('activity')
 subdir('adt')
 subdir('cache')
diff --git a/src/bin/psql/meson.build b/src/bin/psql/meson.build
index 75905a52c1..f9e3b1a32b 100644
--- a/src/bin/psql/meson.build
+++ b/src/bin/psql/meson.build
@@ -52,6 +52,8 @@ executable('psql',
   kwargs: default_bin_args,
 )
 
+install_data('psqlrc.sample', install_dir: 'share/')
+
 tap_tests += {
   'name': 'psql',
   'sd': meson.current_source_dir(),
diff --git a/src/include/meson.build b/src/include/meson.build
index c3af4a2574..86d91f55d6 100644
--- a/src/include/meson.build
+++ b/src/include/meson.build
@@ -43,6 +43,8 @@ configure_file(
   install: false
 )
 
+install_headers('postgres_ext.h')
+
 
 subdir('utils')
 subdir('storage')
-- 
2.35.1

From a5eaca807fb46fb20148cec28392d9fc13174d4d Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 13 Apr 2022 11:07:02 +0200
Subject: [PATCH 2/5] Adjust some header file installation paths

---
 src/include/catalog/meson.build  | 4 ++--
 src/include/parser/meson.build   | 2 +-
 src/include/storage/meson.build  | 2 +-
 src/interfaces/libpq/meson.build | 3 +--
 4 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/include/catalog/meson.build b/src/include/catalog/meson.build
index f5bc294c81..5ccb84ee34 100644
--- a/src/include/catalog/meson.build
+++ b/src/include/catalog/meson.build
@@ -94,13 +94,13 @@ bki_data = files(
 
 input = []
 output_files = ['postgres.bki', 'schemapg.h', 'system_fk_info.h', 
'system_constraints.sql']
-output_install = [get_option('datadir'), get_option('includedir'), 
get_option('includedir'), get_option('datadir')]
+output_install = [get_option('datadir'), get_option('includedir') / 
'server/catalog', get_option('includedir') / 'server/catalog', 
get_option('datadir')]
 
 foreach h : catalog_headers
   fname = h.split('.h')[0]+'_d.h'
   input += files(h)
   output_files += fname
-  output_install += get_option('includedir')
+  output_install += get_option('includedir') / 'server/catalog'
 endforeach
 
 generated_headers += custom_target('generated_catalog_headers',
diff --git a/src/include/parser/meson.build b/src/include/parser/meson.build
index caf4c09290..a8df3db7fe 100644
--- a/src/include/parser/meson.build
+++ b/src/include/parser/meson.build
@@ -4,7 +4,7 @@ backend_parser_header = custom_target('gram',
   command: [bison, bisonflags, '-d', '-o', '@OUTPUT0@', '@INPUT0@'],
   install: true,
   # Only install gram.h, not gram.c
-  install_dir: [false, get_option('includedir')]
+  install_dir: [false, get_option('includedir') / 'server/parser']
 )
 
 #generated_backend_headers += backend_parser[1]
diff --git a/src/include/storage/meson.build b/src/include/storage/meson.build
index ef2bbb7c6f..63b110cbef 100644
--- a/src/include/storage/meson.build
+++ b/src/include/storage/meson.build
@@ -8,7 +8,7 @@ lwlocknames = custom_target('lwlocknames',
   command : [perl, 
files('../../backend/storage/lmgr/generate-lwlocknames.pl'), '-o', '@OUTDIR@', 
'@INPUT@'],
   build_by_default: true,
   install: true,
-  install_dir: [get_option('includedir'), false],
+  install_dir: [get_option('includedir') / 'server/storage', false],
 )
 
 lwlocknames_h = lwlocknames[0]
diff --git a/src/interfaces/libpq/meson.build b/src/interfaces/libpq/meson.build
index 0e422c1ae6..ce948e7568 100644
--- a/src/interfaces/libpq/meson.build
+++ b/src/interfaces/libpq/meson.build
@@ -103,8 +103,7 @@ libpq = declare_dependency(
 )
 
 install_headers('libpq-fe.h', 'libpq-events.h')
-# FIXME: adjust path
-install_headers('libpq-int.h', 'pqexpbuffer.h')
+install_headers('libpq-int.h', 'pqexpbuffer.h', install_dir: 
get_option('includedir') / 'internal')
 install_data('pg_service.conf.sample', install_dir: get_option('datadir'))
 
 
-- 
2.35.1

From 4a5a7439265bd671a14284025b2fac3c6932930b Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 13 Apr 2022 11:18:46 +0200
Subject: [PATCH 3/5] Fix warnings about deprecated features

---
 contrib/dblink/meson.build        |  2 +-
 contrib/postgres_fdw/meson.build  |  2 +-
 meson.build                       | 26 +++++++++++++-------------
 src/bin/pg_basebackup/meson.build |  8 ++++----
 4 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/contrib/dblink/meson.build b/contrib/dblink/meson.build
index af277b9600..02e6a85a15 100644
--- a/contrib/dblink/meson.build
+++ b/contrib/dblink/meson.build
@@ -24,5 +24,5 @@ regress_tests += {
   'sql': [
     'dblink',
   ],
-  'regress_args': ['--dlpath', meson.build_root() / 'src/test/regress'],
+  'regress_args': ['--dlpath', meson.project_build_root() / 
'src/test/regress'],
 }
diff --git a/contrib/postgres_fdw/meson.build b/contrib/postgres_fdw/meson.build
index 507d01448b..9e8a95ddc5 100644
--- a/contrib/postgres_fdw/meson.build
+++ b/contrib/postgres_fdw/meson.build
@@ -27,5 +27,5 @@ regress_tests += {
   'sql': [
     'postgres_fdw'
   ],
-  'regress_args': ['--dlpath', meson.build_root() / 'src/test/regress'],
+  'regress_args': ['--dlpath', meson.project_build_root() / 
'src/test/regress'],
 }
diff --git a/meson.build b/meson.build
index adb6a5666c..9df1c85d51 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@ project('postgresql',
   ['c'],
   version: '15devel',
   license: 'PostgreSQL',
-  meson_version: '>=0.54',
+  meson_version: '>=0.56',
   default_options: [
     'warning_level=2',
     'b_pie=true',
@@ -358,7 +358,7 @@ if not llvmopt.disabled()
 
     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
@@ -1935,7 +1935,7 @@ endif
 ###
 
 rc_cdata = configuration_data()
-rc_cdata.set_quoted('ICO', meson.source_root() / 'src' / 'port' / 'win32.ico')
+rc_cdata.set_quoted('ICO', meson.project_source_root() / 'src' / 'port' / 
'win32.ico')
 
 rc_lib_cdata = rc_cdata
 rc_lib_cdata.set('VFT_TYPE', 'VFT_DLL')
@@ -2074,7 +2074,7 @@ if fs.is_absolute(get_option('prefix'))
 endif
 
 # DESTDIR for the installation used to run tests in
-test_install_destdir = meson.build_root() / 'tmp_install/'
+test_install_destdir = meson.project_build_root() / 'tmp_install/'
 # DESTDIR + prefix appropriately munged
 test_install_location = test_install_destdir / test_prefix
 
@@ -2086,7 +2086,7 @@ test('tmp_install',
     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
@@ -2150,9 +2150,9 @@ foreach t : regress_tests
     'depends': test_deps + t.get('deps', []),
     'env': env,
     'args': [
-      testwrap.path(),
+      testwrap.full_path(),
       t['sd'],
-      meson.build_root(),
+      meson.project_build_root(),
       t['bd'],
       t['name'],
       'pg_regress',
@@ -2207,9 +2207,9 @@ foreach t : isolation_tests
     'depends': test_deps + t.get('deps', []),
     'env': env,
     'args': [
-      testwrap.path(),
+      testwrap.full_path(),
       t['sd'],
-      meson.build_root(),
+      meson.project_build_root(),
       t['bd'],
       t['name'],
       'isolation',
@@ -2244,8 +2244,8 @@ if get_option('enable-tap-tests')
 
   foreach t : tap_tests
     test_command = [
-      perl.path(),
-      '-I', meson.source_root() / 'src/test/perl',
+      perl.full_path(),
+      '-I', meson.project_source_root() / 'src/test/perl',
       '-I', t['sd'],
     ]
 
@@ -2272,9 +2272,9 @@ if get_option('enable-tap-tests')
         sh,
         kwargs: test_kwargs,
         args: [
-          testwrap.path(),
+          testwrap.full_path(),
           t['sd'],
-          meson.build_root(),
+          meson.project_build_root(),
           t['bd'],
           t['name'],
           onetap,
diff --git a/src/bin/pg_basebackup/meson.build 
b/src/bin/pg_basebackup/meson.build
index 9bd45585a9..b5617b818f 100644
--- a/src/bin/pg_basebackup/meson.build
+++ b/src/bin/pg_basebackup/meson.build
@@ -42,10 +42,10 @@ tap_tests += {
   'name' : 'pg_basebackup',
   'sd': meson.current_source_dir(),
   'bd': meson.current_build_dir(),
-  'env': {'GZIP_PROGRAM': gzip.path(),
-          'TAR': tar.path(),
-          'LZ4': program_lz4.found() ? program_lz4.path() : '',
-          'ZSTD': program_zstd.found() ? program_zstd.path() : ''},
+  'env': {'GZIP_PROGRAM': gzip.full_path(),
+          'TAR': tar.full_path(),
+          'LZ4': program_lz4.found() ? program_lz4.full_path() : '',
+          'ZSTD': program_zstd.found() ? program_zstd.full_path() : ''},
   'tests': [
     't/010_pg_basebackup.pl',
     't/020_pg_receivewal.pl',
-- 
2.35.1

From 5369fde7cce715a1b7a9072b724ebff60796a2de Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 13 Apr 2022 11:19:47 +0200
Subject: [PATCH 4/5] Install postmaster symlink

---
 meson.build             | 2 +-
 src/backend/meson.build | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 9df1c85d51..1bf53ea24d 100644
--- a/meson.build
+++ b/meson.build
@@ -2,7 +2,7 @@ project('postgresql',
   ['c'],
   version: '15devel',
   license: 'PostgreSQL',
-  meson_version: '>=0.56',
+  meson_version: '>=0.61',
   default_options: [
     'warning_level=2',
     'b_pie=true',
diff --git a/src/backend/meson.build b/src/backend/meson.build
index 0098411c6b..6814d5094c 100644
--- a/src/backend/meson.build
+++ b/src/backend/meson.build
@@ -118,6 +118,8 @@ else
     kwargs: default_bin_args,
   )
 
+  install_symlink('postmaster', pointing_to: 'postgres', install_dir: 
get_option('bindir'))
+
 endif
 
 backend_targets += postgres
-- 
2.35.1

From 1f80e1ebb8efeb0eba7d57032282520fd6455b0d Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Wed, 13 Apr 2022 11:50:52 +0200
Subject: [PATCH 5/5] Workaround for Perl detection

---
 meson.build | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meson.build b/meson.build
index 1bf53ea24d..e33ed11b08 100644
--- a/meson.build
+++ b/meson.build
@@ -545,9 +545,9 @@ else
   # file existence.
   if perl_may_work
     perl_ccflags += ['-I@0@'.format(perl_inc_dir)]
-    if host_machine.system() == 'darwin'
-      perl_ccflags += ['-iwithsysroot', perl_inc_dir]
-    endif
+    #if host_machine.system() == 'darwin'
+    #  perl_ccflags += ['-iwithsysroot', perl_inc_dir]
+    #endif
   endif
 
   # check required headers are present
-- 
2.35.1

Reply via email to