From da52a3d996f362d51893c64120db7d67bd097a62 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 7 Nov 2026 15:57:56 -0500 Subject: [PATCH 1/7] Fix signature and missing vsgi_server_construct --- src/vsgi-multipart-input-stream.vala | 2 +- src/vsgi-server.vala | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/vsgi-multipart-input-stream.vala b/src/vsgi-multipart-input-stream.vala index a1e88698..5a337ac7 100644 --- a/src/vsgi-multipart-input-stream.vala +++ b/src/vsgi-multipart-input-stream.vala @@ -18,7 +18,7 @@ using GLib; #if HAVE_MEMMEM -private extern void* memmem (uint8[] haystack, uint8[] needle); +private extern void* memmem ([CCode(type = "const void*", array_length_type = "size_t")] uint8[] haystack, [CCode(type = "const void*", array_length_type = "size_t")] uint8[] needle); #else private void* memmem (uint8[] haystack, uint8[] needle) { for (var i = 0; i < haystack.length - needle.length + 1; i++) { diff --git a/src/vsgi-server.vala b/src/vsgi-server.vala index 66b01844..543f8757 100644 --- a/src/vsgi-server.vala +++ b/src/vsgi-server.vala @@ -19,6 +19,9 @@ using GLib; namespace VSGI { + [CCode (cname = "vsgi_server_construct")] + public extern unowned Server server_construct (GLib.Type object_type); + /** * Server that feeds a {@link VSGI.Handler} with incoming requests. * From 5699f911fefeb757d9c775604e85d0ecb64aed26 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 7 Nov 2026 16:07:03 -0500 Subject: [PATCH 2/7] Modernize VSGI Require a baseline of Ubuntu 24.04 LTS. --- meson.build | 18 +++++++++--------- src/meson.build | 20 +++++++++++++++++--- src/vsgi-application.vala | 4 ++++ src/vsgi-handler-module.vala | 3 ++- src/vsgi-server-module.vala | 4 ++-- 5 files changed, 34 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 28ef8b07..901eba01 100644 --- a/meson.build +++ b/meson.build @@ -1,21 +1,21 @@ project('vsgi', 'vala', 'c', version: '0.4.0-dev', license: 'LGPL', - meson_version: '>=0.46.0') + meson_version: '>=1.11') api_version = '0.4' add_project_arguments(['--enable-experimental', - '--enable-deprecated', - '--vapidir', join_paths(meson.current_source_dir(), 'vapi')], + '--target-glib=2.80', + '--vapidir', meson.current_source_dir() / 'vapi'], language: 'vala') -glib = dependency('glib-2.0', version: '>=2.56') -gobject = dependency('gobject-2.0', version: '>=2.56') -gio = dependency('gio-2.0', version: '>=2.56') -gio_unix = dependency('gio-unix-2.0', version: '>=2.56') -gmodule = dependency('gmodule-2.0', version: '>=2.40') -soup = dependency('libsoup-2.4', version: '>=2.62') +glib = dependency('glib-2.0', version: '>=2.80') +gobject = dependency('gobject-2.0', version: '>=2.80') +gio = dependency('gio-2.0', version: '>=2.80') +gio_unix = dependency('gio-unix-2.0', version: '>=2.80') +gmodule = dependency('gmodule-2.0', version: '>=2.80') +soup = dependency('libsoup-2.4', version: '>=2.74') openssl = dependency('openssl') posix = meson.get_compiler('vala').find_library('posix') diff --git a/src/meson.build b/src/meson.build index 58c79b12..8bfc5d01 100644 --- a/src/meson.build +++ b/src/meson.build @@ -17,21 +17,35 @@ vsgi_sources = files( 'vsgi-server.vala', 'vsgi-socket-server.vala', 'vsgi-tee-output-stream.vala') +vsgi_lib_extra_args = {} +if meson.version().version_compare('>=1.11.0') + vsgi_lib_extra_args += { + 'install_vala_header': 'include/vsgi-' + api_version, + 'install_vala_vapi': true, + 'install_vala_gir': true, + } +else + vsgi_lib_extra_args += { + 'install_dir': [true, 'include/vsgi-' + api_version, true, true], + } +endif + vsgi_lib = library('vsgi-' + api_version, vsgi_sources, dependencies: [glib, gobject, gio, gio_unix, gmodule, soup, openssl, posix], vala_header: 'vsgi.h', vala_gir: 'VSGI-@0@.gir'.format(api_version), - build_rpath: join_paths(meson.current_build_dir(), 'servers'), + build_rpath: meson.current_build_dir() / 'servers', link_args: ['-Wl,--disable-new-dtags'], install: true, - install_dir: [true, 'include/vsgi-' + api_version, true, true], - install_rpath: join_paths(get_option('prefix'), get_option('libdir'), 'vsgi-@0@/servers'.format(api_version))) + install_rpath: get_option('prefix') / get_option('libdir') / 'vsgi-@0@/servers'.format(api_version), + kwargs: vsgi_lib_extra_args) install_data('vsgi-@0@.deps'.format(api_version), install_dir: 'share/vala/vapi') vsgi_dep = declare_dependency(include_directories: include_directories('.'), link_with: vsgi_lib) +meson.override_dependency('vsgi', vsgi_dep) if get_option('with_introspection') g_ir_compiler = find_program('g-ir-compiler') diff --git a/src/vsgi-application.vala b/src/vsgi-application.vala index 2f9807ee..360bb001 100644 --- a/src/vsgi-application.vala +++ b/src/vsgi-application.vala @@ -161,6 +161,10 @@ public class VSGI.Application : GLib.Application { // default listening interface if (addresses == null && ports == null && sockets == null && fds == null) { + if (ipv4_only != null || ipv6_only != null) { + critical ("The --ipv4-only and --ipv6-only options only work if a port (via --port) is supplied."); + return 1; + } server.listen (); } diff --git a/src/vsgi-handler-module.vala b/src/vsgi-handler-module.vala index c5cbe908..8dab7ab5 100644 --- a/src/vsgi-handler-module.vala +++ b/src/vsgi-handler-module.vala @@ -57,7 +57,8 @@ public class VSGI.HandlerModule : TypeModule { } construct { - path = Module.build_path (directory, name)[0:-Module.SUFFIX.length - 1]; + string module_name = name.has_prefix ("lib") ? name : "lib%s".printf (name); + path = directory != null ? Path.build_filename (directory, module_name) : module_name; } public override bool load () { diff --git a/src/vsgi-server-module.vala b/src/vsgi-server-module.vala index 8b2a7354..694f27c5 100644 --- a/src/vsgi-server-module.vala +++ b/src/vsgi-server-module.vala @@ -57,8 +57,8 @@ public class VSGI.ServerModule : TypeModule { } construct { - // trim the suffix from 'build_path' - path = Module.build_path (directory, "vsgi-%s".printf (name))[0:- Module.SUFFIX.length - 1]; + string module_name = "libvsgi-%s".printf (name); + path = directory != null ? Path.build_filename (directory, module_name) : module_name; } public override bool load () { From 9b342af188488f468bc85291704284abf5418076 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 7 Nov 2026 16:21:57 -0500 Subject: [PATCH 3/7] Set Meson minimium version to 1.2 and remove condition --- meson.build | 2 +- src/meson.build | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/meson.build b/meson.build index 901eba01..f297e5cb 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project('vsgi', 'vala', 'c', version: '0.4.0-dev', license: 'LGPL', - meson_version: '>=1.11') + meson_version: '>=1.2') api_version = '0.4' diff --git a/src/meson.build b/src/meson.build index 8bfc5d01..fffb74f9 100644 --- a/src/meson.build +++ b/src/meson.build @@ -17,18 +17,10 @@ vsgi_sources = files( 'vsgi-server.vala', 'vsgi-socket-server.vala', 'vsgi-tee-output-stream.vala') -vsgi_lib_extra_args = {} -if meson.version().version_compare('>=1.11.0') - vsgi_lib_extra_args += { - 'install_vala_header': 'include/vsgi-' + api_version, - 'install_vala_vapi': true, - 'install_vala_gir': true, - } -else - vsgi_lib_extra_args += { - 'install_dir': [true, 'include/vsgi-' + api_version, true, true], - } -endif + +vsgi_lib_extra_args = { + 'install_dir': [true, 'include/vsgi-' + api_version, true, true], +} vsgi_lib = library('vsgi-' + api_version, vsgi_sources, dependencies: [glib, gobject, gio, gio_unix, gmodule, soup, openssl, posix], From 38201b59dabaffb91e1b0565693060549e841a7f Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 7 Nov 2026 16:48:13 -0500 Subject: [PATCH 4/7] Consistently use the _dep suffix for dependencies --- bin/meson.build | 2 +- meson.build | 18 +++++++++--------- src/meson.build | 2 +- src/servers/meson.build | 8 ++++---- tests/meson.build | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/bin/meson.build b/bin/meson.build index 41d5e5f1..3d6c2eb7 100644 --- a/bin/meson.build +++ b/bin/meson.build @@ -1,3 +1,3 @@ vsgi_loader = executable('vsgi-loader-@0@'.format(api_version), 'vsgi-loader.vala', - dependencies: [glib, gobject, gio, gmodule, soup, vsgi_dep], + dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep, soup_dep, vsgi_dep], install: true) diff --git a/meson.build b/meson.build index f297e5cb..81b273ab 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project('vsgi', 'vala', 'c', version: '0.4.0-dev', license: 'LGPL', - meson_version: '>=1.2') + meson_version: '>=1.3') api_version = '0.4' @@ -10,14 +10,14 @@ add_project_arguments(['--enable-experimental', '--vapidir', meson.current_source_dir() / 'vapi'], language: 'vala') -glib = dependency('glib-2.0', version: '>=2.80') -gobject = dependency('gobject-2.0', version: '>=2.80') -gio = dependency('gio-2.0', version: '>=2.80') -gio_unix = dependency('gio-unix-2.0', version: '>=2.80') -gmodule = dependency('gmodule-2.0', version: '>=2.80') -soup = dependency('libsoup-2.4', version: '>=2.74') -openssl = dependency('openssl') -posix = meson.get_compiler('vala').find_library('posix') +glib_dep = dependency('glib-2.0', version: '>=2.80') +gobject_dep = dependency('gobject-2.0', version: '>=2.80') +gio_dep = dependency('gio-2.0', version: '>=2.80') +gio_unix_dep = dependency('gio-unix-2.0', version: '>=2.80') +gmodule_dep = dependency('gmodule-2.0', version: '>=2.80') +soup_dep = dependency('libsoup-2.4', version: '>=2.74') +openssl_dep = dependency('openssl') +posix_dep = meson.get_compiler('vala').find_library('posix') if meson.get_compiler('c').has_function('memmem') add_project_arguments('--define=HAVE_MEMMEM', language: 'vala') diff --git a/src/meson.build b/src/meson.build index fffb74f9..2e79ce36 100644 --- a/src/meson.build +++ b/src/meson.build @@ -23,7 +23,7 @@ vsgi_lib_extra_args = { } vsgi_lib = library('vsgi-' + api_version, vsgi_sources, - dependencies: [glib, gobject, gio, gio_unix, gmodule, soup, openssl, posix], + dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, gmodule_dep, soup_dep, openssl_dep, posix_dep], vala_header: 'vsgi.h', vala_gir: 'VSGI-@0@.gir'.format(api_version), build_rpath: meson.current_build_dir() / 'servers', diff --git a/src/servers/meson.build b/src/servers/meson.build index ffa21f0f..91903e4d 100644 --- a/src/servers/meson.build +++ b/src/servers/meson.build @@ -1,10 +1,10 @@ shared_module('vsgi-http', ['vsgi-http.vala'], - dependencies: [glib, gobject, gio, soup, vsgi_dep], + dependencies: [glib_dep, gobject_dep, gio_dep, soup_dep, vsgi_dep], install: true, install_dir: join_paths(get_option('libdir'), 'vsgi-@0@/servers'.format(api_version))) shared_module('vsgi-cgi', 'vsgi-cgi.vala', - dependencies: [glib, gobject, gio, gio_unix, soup, vsgi_dep], + dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, soup_dep, vsgi_dep], install: true, install_dir: join_paths(get_option('libdir'), 'vsgi-@0@/servers'.format(api_version))) @@ -13,12 +13,12 @@ if get_option('with_fcgi') fcgi_vapi = meson.get_compiler('vala').find_library('fcgi', dirs: meson.current_source_dir()) vsgi_fastcgi_internal = meson.get_compiler('vala').find_library('vsgi-fastcgi-internal', dirs: meson.current_source_dir()) shared_module('vsgi-fastcgi', ['vsgi-fastcgi.vala', 'vsgi-fastcgi-input-stream.c', 'vsgi-fastcgi-output-stream.c'], - dependencies: [glib, gobject, gio, gio_unix, soup, vsgi_dep, fcgi, fcgi_vapi, vsgi_fastcgi_internal], + dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, soup_dep, vsgi_dep, fcgi, fcgi_vapi, vsgi_fastcgi_internal], install: true, install_dir: join_paths(get_option('libdir'), 'vsgi-@0@/servers'.format(api_version))) endif shared_module('vsgi-scgi', 'vsgi-scgi.vala', - dependencies: [glib, gobject, gio, soup, vsgi_dep], + dependencies: [glib_dep, gobject_dep, gio_dep, soup_dep, vsgi_dep], install: true, install_dir: join_paths(get_option('libdir'), 'vsgi-@0@/servers'.format(api_version))) diff --git a/tests/meson.build b/tests/meson.build index 8cec6fab..34e2c830 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -13,17 +13,17 @@ vsgi_tests = [ foreach name : vsgi_tests test(name, executable(name + '-test', name + '-test.vala', - dependencies: [glib, gobject, gio, gio_unix, soup, vsgi_dep]), + dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, soup_dep, vsgi_dep]), env: ['G_TEST_SRCDIR=' + meson.current_source_dir()]) endforeach if get_option('with_fcgi') test('fastcgi server', executable('fastcgi-server-test', 'fastcgi-server-test.vala', - dependencies: [glib, gobject, gio, gio_unix, soup, vsgi_dep])) + dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, soup_dep, vsgi_dep])) endif loader_test_lib = shared_library('loader-test', 'loader-test.vala', - dependencies: [glib, gobject, gio, gio_unix, soup, vsgi_dep]) + dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, soup_dep, vsgi_dep]) test('loader', vsgi_loader, args: ['--directory', meson.current_build_dir(), '--server=cgi', 'loader-test'], env: ['VSGI_SERVER_PATH=' + join_paths(meson.current_build_dir(), '../src/servers')]) From 2800df7ac93511a88182472f235038baaaad4f16 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 7 Nov 2026 17:21:51 -0500 Subject: [PATCH 5/7] Format Meson configuration --- bin/meson.build | 16 ++++++-- meson.build | 25 ++++++++---- src/meson.build | 82 ++++++++++++++++++++++++++------------ src/servers/meson.build | 87 +++++++++++++++++++++++++++++++--------- tests/meson.build | 88 ++++++++++++++++++++++++++++++++++------- 5 files changed, 228 insertions(+), 70 deletions(-) diff --git a/bin/meson.build b/bin/meson.build index 3d6c2eb7..c60b8739 100644 --- a/bin/meson.build +++ b/bin/meson.build @@ -1,3 +1,13 @@ -vsgi_loader = executable('vsgi-loader-@0@'.format(api_version), 'vsgi-loader.vala', - dependencies: [glib_dep, gobject_dep, gio_dep, gmodule_dep, soup_dep, vsgi_dep], - install: true) +vsgi_loader = executable( + 'vsgi-loader-@0@'.format(api_version), + 'vsgi-loader.vala', + dependencies: [ + glib_dep, + gobject_dep, + gio_dep, + gmodule_dep, + soup_dep, + vsgi_dep, + ], + install: true, +) diff --git a/meson.build b/meson.build index 81b273ab..640b3fc4 100644 --- a/meson.build +++ b/meson.build @@ -1,14 +1,23 @@ -project('vsgi', 'vala', 'c', - version: '0.4.0-dev', - license: 'LGPL', - meson_version: '>=1.3') +project( + 'vsgi', + 'vala', + 'c', + version: '0.4.0-dev', + license: 'LGPL', + meson_version: '>=1.3', +) api_version = '0.4' -add_project_arguments(['--enable-experimental', - '--target-glib=2.80', - '--vapidir', meson.current_source_dir() / 'vapi'], - language: 'vala') +add_project_arguments( + [ + '--enable-experimental', + '--target-glib=2.80', + '--vapidir', + meson.current_source_dir() / 'vapi', + ], + language: 'vala', +) glib_dep = dependency('glib-2.0', version: '>=2.80') gobject_dep = dependency('gobject-2.0', version: '>=2.80') diff --git a/src/meson.build b/src/meson.build index 2e79ce36..b6b8958c 100644 --- a/src/meson.build +++ b/src/meson.build @@ -16,45 +16,75 @@ vsgi_sources = files( 'vsgi-server-module.vala', 'vsgi-server.vala', 'vsgi-socket-server.vala', - 'vsgi-tee-output-stream.vala') + 'vsgi-tee-output-stream.vala', +) vsgi_lib_extra_args = { 'install_dir': [true, 'include/vsgi-' + api_version, true, true], } -vsgi_lib = library('vsgi-' + api_version, vsgi_sources, - dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, gmodule_dep, soup_dep, openssl_dep, posix_dep], - vala_header: 'vsgi.h', - vala_gir: 'VSGI-@0@.gir'.format(api_version), - build_rpath: meson.current_build_dir() / 'servers', - link_args: ['-Wl,--disable-new-dtags'], - install: true, - install_rpath: get_option('prefix') / get_option('libdir') / 'vsgi-@0@/servers'.format(api_version), - kwargs: vsgi_lib_extra_args) +vsgi_lib = library( + 'vsgi-' + api_version, + vsgi_sources, + dependencies: [ + glib_dep, + gobject_dep, + gio_dep, + gio_unix_dep, + gmodule_dep, + soup_dep, + openssl_dep, + posix_dep, + ], + vala_header: 'vsgi.h', + vala_gir: 'VSGI-@0@.gir'.format(api_version), + build_rpath: meson.current_build_dir() / 'servers', + link_args: ['-Wl,--disable-new-dtags'], + install: true, + install_rpath: get_option('prefix') / get_option('libdir') / 'vsgi-@0@/servers'.format( + api_version, + ), + kwargs: vsgi_lib_extra_args, +) -install_data('vsgi-@0@.deps'.format(api_version), - install_dir: 'share/vala/vapi') +install_data('vsgi-@0@.deps'.format(api_version), install_dir: 'share/vala/vapi') -vsgi_dep = declare_dependency(include_directories: include_directories('.'), - link_with: vsgi_lib) +vsgi_dep = declare_dependency( + include_directories: include_directories('.'), + link_with: vsgi_lib, +) meson.override_dependency('vsgi', vsgi_dep) if get_option('with_introspection') g_ir_compiler = find_program('g-ir-compiler') - custom_target('VSGI typelib', - command: [g_ir_compiler, '--shared-library', vsgi_lib.full_path(), '--output', '@OUTPUT@', join_paths(meson.current_build_dir(), 'VSGI-@0@.gir'.format(api_version))], - output: 'VSGI-@0@.typelib'.format(api_version), - depends: vsgi_lib, - install: true, - install_dir: join_paths(get_option('libdir'), 'girepository-1.0')) + custom_target( + 'VSGI typelib', + command: [ + g_ir_compiler, + '--shared-library', + vsgi_lib.full_path(), + '--output', + '@OUTPUT@', + join_paths( + meson.current_build_dir(), + 'VSGI-@0@.gir'.format(api_version), + ), + ], + output: 'VSGI-@0@.typelib'.format(api_version), + depends: vsgi_lib, + install: true, + install_dir: join_paths(get_option('libdir'), 'girepository-1.0'), + ) endif pkgconfig = import('pkgconfig') -pkgconfig.generate(vsgi_lib, - version: meson.project_version(), - name: 'VSGI', - filebase: 'vsgi-' + api_version, - description: 'Interface and implementations for various web server technologies', - subdirs: 'vsgi-' + api_version) +pkgconfig.generate( + vsgi_lib, + version: meson.project_version(), + name: 'VSGI', + filebase: 'vsgi-' + api_version, + description: 'Interface and implementations for various web server technologies', + subdirs: 'vsgi-' + api_version, +) subdir('servers') diff --git a/src/servers/meson.build b/src/servers/meson.build index 91903e4d..5e5d154b 100644 --- a/src/servers/meson.build +++ b/src/servers/meson.build @@ -1,24 +1,75 @@ -shared_module('vsgi-http', ['vsgi-http.vala'], - dependencies: [glib_dep, gobject_dep, gio_dep, soup_dep, vsgi_dep], - install: true, - install_dir: join_paths(get_option('libdir'), 'vsgi-@0@/servers'.format(api_version))) +shared_module( + 'vsgi-http', + ['vsgi-http.vala'], + dependencies: [glib_dep, gobject_dep, gio_dep, soup_dep, vsgi_dep], + install: true, + install_dir: join_paths( + get_option('libdir'), + 'vsgi-@0@/servers'.format(api_version), + ), +) -shared_module('vsgi-cgi', 'vsgi-cgi.vala', - dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, soup_dep, vsgi_dep], - install: true, - install_dir: join_paths(get_option('libdir'), 'vsgi-@0@/servers'.format(api_version))) +shared_module( + 'vsgi-cgi', + 'vsgi-cgi.vala', + dependencies: [ + glib_dep, + gobject_dep, + gio_dep, + gio_unix_dep, + soup_dep, + vsgi_dep, + ], + install: true, + install_dir: join_paths( + get_option('libdir'), + 'vsgi-@0@/servers'.format(api_version), + ), +) if get_option('with_fcgi') fcgi = meson.get_compiler('c').find_library('fcgi') - fcgi_vapi = meson.get_compiler('vala').find_library('fcgi', dirs: meson.current_source_dir()) - vsgi_fastcgi_internal = meson.get_compiler('vala').find_library('vsgi-fastcgi-internal', dirs: meson.current_source_dir()) - shared_module('vsgi-fastcgi', ['vsgi-fastcgi.vala', 'vsgi-fastcgi-input-stream.c', 'vsgi-fastcgi-output-stream.c'], - dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, soup_dep, vsgi_dep, fcgi, fcgi_vapi, vsgi_fastcgi_internal], - install: true, - install_dir: join_paths(get_option('libdir'), 'vsgi-@0@/servers'.format(api_version))) + fcgi_vapi = meson.get_compiler('vala').find_library( + 'fcgi', + dirs: meson.current_source_dir(), + ) + vsgi_fastcgi_internal = meson.get_compiler('vala').find_library( + 'vsgi-fastcgi-internal', + dirs: meson.current_source_dir(), + ) + shared_module( + 'vsgi-fastcgi', + [ + 'vsgi-fastcgi.vala', + 'vsgi-fastcgi-input-stream.c', + 'vsgi-fastcgi-output-stream.c', + ], + dependencies: [ + glib_dep, + gobject_dep, + gio_dep, + gio_unix_dep, + soup_dep, + vsgi_dep, + fcgi, + fcgi_vapi, + vsgi_fastcgi_internal, + ], + install: true, + install_dir: join_paths( + get_option('libdir'), + 'vsgi-@0@/servers'.format(api_version), + ), + ) endif -shared_module('vsgi-scgi', 'vsgi-scgi.vala', - dependencies: [glib_dep, gobject_dep, gio_dep, soup_dep, vsgi_dep], - install: true, - install_dir: join_paths(get_option('libdir'), 'vsgi-@0@/servers'.format(api_version))) +shared_module( + 'vsgi-scgi', + 'vsgi-scgi.vala', + dependencies: [glib_dep, gobject_dep, gio_dep, soup_dep, vsgi_dep], + install: true, + install_dir: join_paths( + get_option('libdir'), + 'vsgi-@0@/servers'.format(api_version), + ), +) diff --git a/tests/meson.build b/tests/meson.build index 34e2c830..1dfc254e 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -9,29 +9,87 @@ vsgi_tests = [ 'request', 'response', 'server', - 'socket-server'] + 'socket-server', +] foreach name : vsgi_tests - test(name, executable(name + '-test', name + '-test.vala', - dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, soup_dep, vsgi_dep]), - env: ['G_TEST_SRCDIR=' + meson.current_source_dir()]) + test( + name, + executable( + name + '-test', + name + '-test.vala', + dependencies: [ + glib_dep, + gobject_dep, + gio_dep, + gio_unix_dep, + soup_dep, + vsgi_dep, + ], + ), + env: ['G_TEST_SRCDIR=' + meson.current_source_dir()], + ) endforeach if get_option('with_fcgi') - test('fastcgi server', executable('fastcgi-server-test', 'fastcgi-server-test.vala', - dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, soup_dep, vsgi_dep])) + test( + 'fastcgi server', + executable( + 'fastcgi-server-test', + 'fastcgi-server-test.vala', + dependencies: [ + glib_dep, + gobject_dep, + gio_dep, + gio_unix_dep, + soup_dep, + vsgi_dep, + ], + ), + ) endif -loader_test_lib = shared_library('loader-test', 'loader-test.vala', - dependencies: [glib_dep, gobject_dep, gio_dep, gio_unix_dep, soup_dep, vsgi_dep]) -test('loader', vsgi_loader, - args: ['--directory', meson.current_build_dir(), '--server=cgi', 'loader-test'], - env: ['VSGI_SERVER_PATH=' + join_paths(meson.current_build_dir(), '../src/servers')]) +loader_test_lib = shared_library( + 'loader-test', + 'loader-test.vala', + dependencies: [ + glib_dep, + gobject_dep, + gio_dep, + gio_unix_dep, + soup_dep, + vsgi_dep, + ], +) +test( + 'loader', + vsgi_loader, + args: [ + '--directory', + meson.current_build_dir(), + '--server=cgi', + 'loader-test', + ], + env: [ + 'VSGI_SERVER_PATH=' + join_paths( + meson.current_build_dir(), + '../src/servers', + ), + ], +) python = find_program('python3') if get_option('with_introspection') - test('gi', python, - args: meson.current_source_dir() + '/gi-test.py' , - env: ['GI_TYPELIB_PATH=' + join_paths(meson.current_build_dir(), '../src'), - 'VSGI_SERVER_PATH=' + join_paths(meson.current_build_dir(), '../src/servers')]) + test( + 'gi', + python, + args: meson.current_source_dir() + '/gi-test.py', + env: [ + 'GI_TYPELIB_PATH=' + join_paths(meson.current_build_dir(), '../src'), + 'VSGI_SERVER_PATH=' + join_paths( + meson.current_build_dir(), + '../src/servers', + ), + ], + ) endif From f936443edd604e89a7c6deccf449b3cbd22deff8 Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 14 Nov 2026 11:25:20 -0500 Subject: [PATCH 6/7] Drop Ubuntu 22.04 from CI --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7ab9e8f9..665a5204 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -8,7 +8,7 @@ jobs: strategy: matrix: - os: [ubuntu-22.04, ubuntu-24.04, ubuntu-26.04] + os: [ubuntu-24.04, ubuntu-26.04] steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it From f8e355e4bfc4ce64880cdda36d7e0dc4e8a8bcdc Mon Sep 17 00:00:00 2001 From: Guillaume Poirier-Morency Date: Sat, 14 Nov 2026 11:28:24 -0500 Subject: [PATCH 7/7] Bump checkout action to v7 --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 665a5204..53bc0239 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -12,7 +12,7 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 + - uses: actions/checkout@v7 - name: Update APT cache run: sudo apt-get update --quiet