Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/meson_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
libreadline-dev libedit-dev uuid-dev libossp-uuid-dev \
libipc-run-perl libtime-hires-perl libtest-simple-perl \
libgssapi-krb5-2 libicu-dev
curl -L "https://github.com/mesonbuild/meson/releases/download/0.57.2/meson-0.57.2.tar.gz" -o meson-0.57.2.tar.gz
curl -L "https://github.com/mesonbuild/meson/releases/download/1.0.1/meson-1.0.1.tar.gz" -o meson-1.0.1.tar.gz
curl -L "https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-linux.zip" -o ninja-linux.zip
unzip -o ninja-linux.zip
sudo cp ninja /usr/bin/
tar xzf meson-0.57.2.tar.gz
cd meson-0.57.2
tar xzf meson-1.0.1.tar.gz
cd meson-1.0.1
sudo python3 setup.py install
Comment on lines +27 to 33
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Replace tarball + setup.py install with pip; install Ninja via apt (simpler, safer).

Manual curl + setup.py install is brittle and deprecated in Python packaging. Use pip for Meson and apt for Ninja to reduce supply‑chain risk and simplify PATH issues.

Apply this diff:

-        curl -L "https://github.com/mesonbuild/meson/releases/download/1.0.1/meson-1.0.1.tar.gz" -o meson-1.0.1.tar.gz
-        curl -L "https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-linux.zip" -o ninja-linux.zip
-        unzip -o ninja-linux.zip
-        sudo cp ninja /usr/bin/
-        tar xzf meson-1.0.1.tar.gz
-        cd meson-1.0.1
-        sudo python3 setup.py install
+        sudo apt-get install -y ninja-build python3-pip
+        python3 -m pip install --upgrade pip
+        python3 -m pip install "meson==1.0.1"
+        meson --version
+        ninja --version
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
curl -L "https://github.com/mesonbuild/meson/releases/download/1.0.1/meson-1.0.1.tar.gz" -o meson-1.0.1.tar.gz
curl -L "https://github.com/ninja-build/ninja/releases/download/v1.10.1/ninja-linux.zip" -o ninja-linux.zip
unzip -o ninja-linux.zip
sudo cp ninja /usr/bin/
tar xzf meson-0.57.2.tar.gz
cd meson-0.57.2
tar xzf meson-1.0.1.tar.gz
cd meson-1.0.1
sudo python3 setup.py install
sudo apt-get install -y ninja-build python3-pip
python3 -m pip install --upgrade pip
python3 -m pip install "meson==1.0.1"
meson --version
ninja --version
🤖 Prompt for AI Agents
.github/workflows/meson_build.yml around lines 27 to 33: the workflow currently
downloads Meson tarball and runs sudo python3 setup.py install and fetches Ninja
zip/unzips and copies binary; replace these brittle steps by using pip to
install Meson and the distro package for Ninja: remove the curl/tar/unzip/cp and
replace with a step that runs sudo python3 -m pip install "meson==1.0.1" (or
python3 -m pip install --upgrade pip then pip) and install Ninja via the package
manager (e.g., sudo apt-get update && sudo apt-get install -y ninja-build) so
installation uses supported packaging and avoids manual binary handling.

⚠️ Potential issue

🧩 Analysis chain

Confirm Meson 1.0.1 is within your supported range.

If you need a broader window for future Meson releases, consider a semver range via pip (e.g., meson>=1.0,<1.5) after confirming repo constraints.

Run this to check declared Meson requirements and UUID default in the repo:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "Meson minimum in project():"
rg -nP --glob '!**/subprojects/**' "project\([^\)]*meson_version\s*:\s*'[^']+'\)" -n -C0
echo
echo "UUID option default:"
rg -nP "option\(\s*'uuid'.*default\s*:\s*'[^']+'\s*\)" -n meson_options.txt || true

Length of output: 176


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "cwd: $(pwd)"
echo "Top-level files:"
ls -la | sed -n '1,200p'
echo
echo "Find meson.build files:"
find . -type f -iname 'meson.build' -print || true
echo
echo "Find meson options files (meson_options.txt / meson.options):"
find . -type f \( -iname 'meson_options.txt' -o -iname 'meson.options' \) -print || true
echo
echo "Searching meson.build files for project(... meson_version : '...') and showing first 200 lines:"
while IFS= read -r f; do
  echo "---- $f ----"
  rg -nP "project\([^)]*meson_version\s*:\s*'[^']+'\)" -n -C0 "$f" || true
  sed -n '1,200p' "$f"
done < <(find . -type f -iname 'meson.build' -print)
echo
echo "Searching meson options files for option('uuid' ... default : '...') and showing first 200 lines:"
while IFS= read -r f; do
  echo "---- $f ----"
  rg -nP "option\(\s*'uuid'.*default\s*:\s*'[^']+'\s*\)" -n "$f" || true
  sed -n '1,200p' "$f"
done < <(find . -type f \( -iname 'meson_options.txt' -o -iname 'meson.options' \) -print)

Length of output: 16210


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "cwd: $(pwd)"
echo
echo "rg version:"
rg --version || true
echo
echo "Searching for 'meson_version' occurrences:"
rg -n --hidden --no-ignore "meson_version" || true
echo
echo "Searching for 'project(' with 'meson_version' (multiline):"
rg -n --hidden --no-ignore -U "project\([^)]*meson_version" || true
echo
echo "Show top-level meson.build (first 200 lines):"
if [ -f meson.build ]; then sed -n '1,200p' meson.build; else echo "meson.build not found"; fi
echo
echo "Show meson_options.txt (first 200 lines):"
if [ -f meson_options.txt ]; then sed -n '1,200p' meson_options.txt; else echo "meson_options.txt not found"; fi

Length of output: 13153


Pin CI Meson to the project's supported range (<0.56); don't install Meson 1.0.1.

Top-level meson.build declares meson_version: '>=0.54' and contains a comment explicitly preferring <0.56; meson_options.txt sets the 'uuid' default to 'ossp'. Update .github/workflows/meson_build.yml to install a Meson release within that window (for example pip install "meson>=0.54,<0.56" or pin to a tested 0.55.x) or intentionally bump the project's meson_version/comments if you want to move to 1.x. Ensure CI provides the OSSP UUID library when using the 'ossp' default.

🤖 Prompt for AI Agents
.github/workflows/meson_build.yml lines 27-33: the workflow currently downloads
and installs Meson 1.0.1 which is outside the project's declared supported range
(meson_version '>=0.54' with a comment preferring <0.56); remove the hardcoded
Meson 1.0.1 install and instead install a Meson release in the supported window
(for example use pip install "meson>=0.54,<0.56" or pin to a tested 0.55.x), and
ensure the CI also installs/provides the OSSP uuid library (libossp-uuid or
equivalent package) since meson_options.txt defaults to 'ossp' UUID.


- name: configure - linux
Expand Down
50 changes: 50 additions & 0 deletions contrib/gb18030_2022/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Portions Copyright (c) 2023-2025, IvorySQL Global Development Team

gb18030_2022_src_files = files(
'utf8_and_gb18030_2022.c'
)

if host_system == 'windows'
gb18030_2022_src_files += rc_lib_gen.process(win32ver_rc, extra_args: [
'--NAME', 'gb18030_2022',
'--FILEDESC', 'gb18030_2022 - support gb18030 2022 with extension',])
endif

custom_target('gb18030_2022.bc',
output: 'utf8_and_gb18030_2022.bc',
command: [perl, '../contrib/ivorysql_ora/gensql.pl', 'meson', '1.0'],
capture: true,
install: true,
install_dir: contrib_data_args['install_dir'],
)

foreach file : ['utf8_and_gb18030_2022.bc', 'gb18030_2022.bc']
run_target(
file,
command: ['touch', meson.current_build_dir() / file]
)
endforeach

gb18030_2022 = shared_module('gb18030_2022',
gb18030_2022_src_files,
kwargs: contrib_mod_args,
)
contrib_targets += gb18030_2022

install_data(
'gb18030_2022.control',
'gb18030_2022--1.0.sql',
kwargs: contrib_data_args,
)

tests += {
'name': 'gb18030_2022',
'sd': meson.current_source_dir(),
'bd': meson.current_build_dir(),
'regress': {
'sql': [
'gb18030_2022_and_utf8',
'copy',
],
},
}
6 changes: 6 additions & 0 deletions contrib/ivorysql_ora/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ivorysql_ora_sources = files(
'src/builtin_functions/misc_functions.c',
'src/merge/ora_merge.c',
'src/sysview/sysview_functions.c',
'src/xml_functions/ora_xml_functions.c',
)

if host_system == 'windows'
Expand Down Expand Up @@ -52,6 +53,11 @@ install_data(
kwargs: contrib_data_args,
)

install_data(
'preload_ora_misc.sql',
install_dir: dir_data,
)

tests += {
'name': 'ivorysql_ora',
'sd': meson.current_source_dir(),
Expand Down
1 change: 1 addition & 0 deletions contrib/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,5 @@ subdir('tsm_system_time')
subdir('unaccent')
subdir('uuid-ossp')
subdir('vacuumlo')
subdir('gb18030_2022')
subdir('xml2')
10 changes: 7 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ project('postgresql',
]
)

# IvorySQL version
ivorysql_version = '5.0'


###############################################################
Expand Down Expand Up @@ -152,6 +154,8 @@ cdata.set_quoted('PG_MAJORVERSION', pg_version_major.to_string())
cdata.set('PG_MAJORVERSION_NUM', pg_version_major)
cdata.set('PG_MINORVERSION_NUM', pg_version_minor)
cdata.set('PG_VERSION_NUM', pg_version_num)

cdata.set('PACKAGE_IVORYSQL_VERSION', ivorysql_version)
# PG_VERSION_STR is built later, it depends on compiler test results
cdata.set_quoted('CONFIGURE_ARGS', '')

Expand Down Expand Up @@ -487,7 +491,7 @@ pkg = 'postgresql'

dir_prefix = get_option('prefix')

dir_prefix_contains_pg = (dir_prefix.contains('pgsql') or dir_prefix.contains('postgres'))
dir_prefix_contains_pg = (dir_prefix.contains('pgsql') or dir_prefix.contains('postgres') or dir_prefix.contains('IvorySQL'))

dir_bin = get_option('bindir')

Expand Down Expand Up @@ -2973,9 +2977,9 @@ cdata.set_quoted('DLSUFFIX', dlsuffix)

# built later than the rest of the version metadata, we need SIZEOF_VOID_P
cdata.set_quoted('PG_VERSION_STR',
'PostgreSQL @0@ on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
'PostgreSQL (IvorySQL @6@) @0@ on @1@-@2@, compiled by @3@-@4@, @5@-bit'.format(
pg_version, host_machine.cpu_family(), host_system,
cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8,
cc.get_id(), cc.version(), cdata.get('SIZEOF_VOID_P') * 8, cdata.get('PACKAGE_IVORYSQL_VERSION')
)
)

Expand Down
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ option('systemd', type: 'feature', value: 'auto',
description: 'systemd support')

option('uuid', type: 'combo', choices: ['none', 'bsd', 'e2fs', 'ossp'],
value: 'none',
value: 'ossp',
description: 'Use LIB for contrib/uuid-ossp support')

option('zlib', type: 'feature', value: 'auto',
Expand Down
4 changes: 3 additions & 1 deletion src/include/catalog/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ ara_generated_catalog_headers = custom_target('ara_generated_catalog_headers',
'@INPUT@',
'-M=oracle'
],
depends: [generated_catalog_headers]
)

# Target for Oracle
Expand All @@ -187,7 +188,8 @@ ora_generated_catalog_headers = custom_target('ora_generated_catalog_headers',
'--output=@OUTDIR@',
'@INPUT@',
'-M=oracle'
]
],
depends: [ara_generated_catalog_headers]
)


Expand Down