{"thread":{"id":"63735","subject":"[PATCH 0/8] A handful of Meson cleanups and improvements","startedAt":"2025-07-03T09:30:15Z","lastAt":"2025-07-10T16:24:19Z","messageCount":46,"participants":["Patrick Steinhardt","Ramsay Jones","Junio C Hamano","Jeff King","Justin Tobler","Eli Schwartz","Toon Claes"],"isPatch":true,"patchVersion":1,"patchTotal":8},"messages":[{"id":"521244","messageId":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","threadId":"63735","inReplyTo":null,"subject":"[PATCH 0/8] A handful of Meson cleanups and improvements","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-03T09:28:42Z","receivedAt":"2025-07-03T09:30:15Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Hi,\n\nthis patch series contains a couple of more-or-less random cleanups and\nimprovements for Meson that I have accumulated over the last two months.\n\nThanks!\n\nPatrick\n\n---\nPatrick Steinhardt (8):\n      meson: stop discovering native version of Python\n      meson: stop printing 'https' option twice in our summaries\n      meson: improve summary of auto-detected features\n      meson: clean up unnecessary variables\n      meson: fix lookup of shell on MINGW64\n      meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=\n      meson: update subproject wrappers\n      ci: use Meson's new `--slice` option\n\n .github/workflows/main.yml |  2 +-\n .gitlab-ci.yml             |  2 +-\n Documentation/meson.build  |  5 ++---\n meson.build                | 26 ++++++++++++--------------\n subprojects/expat.wrap     | 18 +++++++++---------\n subprojects/pcre2.wrap     | 18 +++++++++---------\n 6 files changed, 34 insertions(+), 37 deletions(-)\n\n\n---\nbase-commit: 8b6f19ccfc3aefbd0f22f6b7d56ad6a3fc5e4f37\nchange-id: 20250703-b4-pks-meson-cleanups-f53858d694f3\n\n"},{"id":"521245","messageId":"20250703-b4-pks-meson-cleanups-v1-1-2804c2932abe@pks.im","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","subject":"[PATCH 1/8] meson: stop discovering native version of Python","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-03T09:28:43Z","receivedAt":"2025-07-03T09:30:16Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"When Python features are enabled we search both for a native and\nnon-native version of Python. This is wrong though: we don't use Python\nin our build process, so there is no need to search for it in the first\nplace.\n\nThere is one location where we use the native version of Python, namely\nwhen deciding whether or not we want to wire up git-p4(1). This check is\ninvalid though, as we shouldn't check for the build host to have Python,\nbut for the target host.\n\nFix this invalid check to use the non-native version of Python and stop\nsearching for a native version of Python altogether.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git a/meson.build b/meson.build\nindex 7fea4a34d68..21fdff0f496 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -866,9 +866,8 @@ if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'\n endif\n build_options_config.set_quoted('X', executable_suffix)\n \n-python = import('python').find_installation('python3', required: get_option('python'))\n-target_python = find_program('python3', native: false, required: python.found())\n-if python.found()\n+target_python = find_program('python3', native: false, required: get_option('python'))\n+if target_python.found()\n   build_options_config.set('NO_PYTHON', '')\n else\n   libgit_c_args += '-DNO_PYTHON'\n@@ -1979,7 +1978,7 @@ if perl_features_enabled\n   subdir('perl')\n endif\n \n-if python.found()\n+if target_python.found()\n   scripts_python = [\n     'git-p4.py'\n   ]\n@@ -2202,7 +2201,7 @@ summary({\n   'iconv': iconv.found(),\n   'pcre2': pcre2.found(),\n   'perl': perl_features_enabled,\n-  'python': python.found(),\n+  'python': target_python.found(),\n }, section: 'Auto-detected features')\n \n summary({\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521246","messageId":"20250703-b4-pks-meson-cleanups-v1-2-2804c2932abe@pks.im","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","subject":"[PATCH 2/8] meson: stop printing 'https' option twice in our summaries","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-03T09:28:44Z","receivedAt":"2025-07-03T09:30:20Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The value for the 'https' backend option is printed twice: once via the\nsummary of auto-detected features and once via our summary of backends.\nDrop it from the former summary.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/meson.build b/meson.build\nindex 21fdff0f496..4e41c3007bb 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -2197,7 +2197,6 @@ summary({\n   'expat': expat.found(),\n   'gettext': intl.found(),\n   'gitweb': gitweb_option.allowed(),\n-  'https': https_backend,\n   'iconv': iconv.found(),\n   'pcre2': pcre2.found(),\n   'perl': perl_features_enabled,\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521247","messageId":"20250703-b4-pks-meson-cleanups-v1-3-2804c2932abe@pks.im","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","subject":"[PATCH 3/8] meson: improve summary of auto-detected features","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-03T09:28:45Z","receivedAt":"2025-07-03T09:30:23Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The summary of auto-detected features prints a boolean for every option\nto tell the user whether or not the feature has been auto-enabled or\nnot. This summary can be improved though, as in some cases this boolean\nis derived from a dependency. So if we pass in the dependency directly,\nthen Meson knows to both print a boolean and, if the dependency was\nfound, it also prints a version number.\n\nAdapt the code accordingly and enable `bool_yn` so that actual booleans\nare formatted similarly to dependencies. Before this change:\n\n  Auto-detected features\n    benchmarks      : true\n    curl            : true\n    expat           : true\n    gettext         : true\n    gitweb          : true\n    iconv           : true\n    pcre2           : true\n    perl            : true\n    python          : true\n\nAnd after this change, we now see the version numbers as expected:\n\n  Auto-detected features\n    benchmarks      : YES\n    curl            : YES 8.14.1\n    expat           : YES 2.7.1\n    gettext         : YES\n    gitweb          : YES\n    iconv           : YES\n    pcre2           : YES 10.44\n    perl            : YES\n    python          : YES\n\nNote that this change also enables colorization of the boolean options,\ngreen for \"YES\" and red for \"NO\".\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/meson.build b/meson.build\nindex 4e41c3007bb..4f22d72641e 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -2193,15 +2193,15 @@ meson.add_dist_script(\n \n summary({\n   'benchmarks': get_option('tests') and perl.found() and time.found(),\n-  'curl': curl.found(),\n-  'expat': expat.found(),\n-  'gettext': intl.found(),\n+  'curl': curl,\n+  'expat': expat,\n+  'gettext': intl,\n   'gitweb': gitweb_option.allowed(),\n-  'iconv': iconv.found(),\n-  'pcre2': pcre2.found(),\n+  'iconv': iconv,\n+  'pcre2': pcre2,\n   'perl': perl_features_enabled,\n   'python': target_python.found(),\n-}, section: 'Auto-detected features')\n+}, section: 'Auto-detected features', bool_yn: true)\n \n summary({\n   'csprng': csprng_backend,\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521248","messageId":"20250703-b4-pks-meson-cleanups-v1-4-2804c2932abe@pks.im","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","subject":"[PATCH 4/8] meson: clean up unnecessary variables","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-03T09:28:46Z","receivedAt":"2025-07-03T09:30:25Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The `manpage_target` variable isn't used at all, and the `manpage_path`\nvariable is only used in a single location. Remove the former variable\nand inline the latter.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n Documentation/meson.build | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/meson.build b/Documentation/meson.build\nindex 2fe1a1369d4..4404c623f00 100644\n--- a/Documentation/meson.build\n+++ b/Documentation/meson.build\n@@ -375,8 +375,7 @@ foreach manpage, category : manpages\n       output: fs.stem(manpage) + '.xml',\n     )\n \n-    manpage_path = fs.stem(manpage) + '.' + category.to_string()\n-    manpage_target = custom_target(\n+    custom_target(\n       command: [\n         xmlto,\n         '-m', '@INPUT0@',\n@@ -392,7 +391,7 @@ foreach manpage, category : manpages\n         'manpage-normal.xsl',\n         'manpage-bold-literal.xsl',\n       ],\n-      output: manpage_path,\n+      output: fs.stem(manpage) + '.' + category.to_string(),\n       install: true,\n       install_dir: get_option('mandir') / 'man' + category.to_string(),\n     )\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521249","messageId":"20250703-b4-pks-meson-cleanups-v1-5-2804c2932abe@pks.im","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","subject":"[PATCH 5/8] meson: fix lookup of shell on MINGW64","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-03T09:28:47Z","receivedAt":"2025-07-03T09:30:28Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In 4cba20fbdc6 (meson: prefer shell at \"/bin/sh\", 2025-04-25) we have\naddressed an issue where the shell path embedded into Git was looked up\nvia PATH, which easily led to unportable shell paths other than the\nusual \"/bin/sh\" location. The fix was to simply add '/bin' to the search\npath explicitly, which made us prefer that directory over the PATH-based\nlookup.\n\nThis fix causes issues on MINGW64 though, which uses Windows-style\npaths. \"/bin\" is not an absolute Windows-style path, but Meson expects\nthe directories to be absolute. This leads to the following error:\n\n    meson.build:248:15: ERROR: Search directory /bin is not an absolute path.\n\nFix this by instead searching for both '/bin/sh' and 'sh', which also\ncauses us to prefer '/bin/sh' over a PATH-based lookup. Meson does\naccept that path alright on MINGW64, even though it's not an absolute\nWindows-style path, either.\n\nFurthermore, this continues to work alright with cross-files, as well,\nin case one wants to explicitly override the shell path:\n\n    $ meson setup build\n    ...\n      Runtime executable paths\n        perl       : /nix/store/gy10hw004rl2xfbfq41vnw0yb1w8rvbl-perl-5.40.0/bin/perl\n        python     : /nix/store/sd81bvmch7njdpwx3lkjslixcbj5mivz-python3-3.13.4/bin/python3\n        shell      : /bin/sh\n\n    $ cat >cross.ini <<-EOF\n    [binaries]\n    sh = '/nix/store/94lg0shvsfc845zy8gnflvpqxxiyijbz-bash-interactive-5.2p37/bin/bash'\n    EOF\n\n    $ meson setup build --cross-file=cross.ini --wipe\n    ...\n      Runtime executable paths\n        perl       : /nix/store/gy10hw004rl2xfbfq41vnw0yb1w8rvbl-perl-5.40.0/bin/perl\n        python     : /nix/store/sd81bvmch7njdpwx3lkjslixcbj5mivz-python3-3.13.4/bin/python3\n        shell      : /nix/store/94lg0shvsfc845zy8gnflvpqxxiyijbz-bash-interactive-5.2p37/bin/bash\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/meson.build b/meson.build\nindex 4f22d72641e..bef80b118a8 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -245,7 +245,7 @@ time = find_program('time', dirs: program_path, required: get_option('benchmarks\n # \"/bin/sh\" over a PATH-based lookup, which provides a working shell on most\n # supported systems. This path is also the default shell path used by our\n # Makefile. This lookup can be overridden via `program_path`.\n-target_shell = find_program('sh', dirs: program_path + [ '/bin' ], native: false)\n+target_shell = find_program('/bin/sh', 'sh', dirs: program_path, native: false)\n \n # Sanity-check that programs required for the build exist.\n foreach tool : ['cat', 'cut', 'grep', 'sort', 'tr', 'uname']\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521250","messageId":"20250703-b4-pks-meson-cleanups-v1-6-2804c2932abe@pks.im","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","subject":"[PATCH 6/8] meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-03T09:28:48Z","receivedAt":"2025-07-03T09:30:32Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In 837f637cf51 (meson.build: correct setting of GIT_EXEC_PATH,\n2025-05-19) we have fixed how we configure GIT_EXEC_PATH in some cases.\nIt was reported [1] though that this causes a new issue when overriding\nlibexecdir with `-Dlibexecdir=`:\n\n    $ meson setup -Dprefix=/tmp/git -Dlibexecdir=libexec-different\n    $ meson install\n    $ /tmp/git/bin/git --exec-path\n    /tmp/git/libexec-different\n    $ /tmp/git/bin/git daemon\n    git: 'daemon' is not a git command. See 'git --help'.\n\nWhile we correctly propagate the libexecdir to Git's GIT_EXEC_PATH, we\nforgot to append 'git-core'. Consequently, it cannot find its binaries\nanymore.\n\nFix this issue by appending 'git-core' to libexecdir. With this, things\nwork as expected:\n\n    $ meson install\n    $ /tmp/git/bin/git --exec-path\n    /tmp/git/libexec-different/git-core\n    $ /tmp/git/bin/git daemon -h\n    ...\n\n[1]: <66fd343a-1351-4350-83eb-c797e47b7693@gmail.com>\n\nReported-by: irecca.kun@gmail.com\nBased-on-patch-by: irecca.kun@gmail.com\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/meson.build b/meson.build\nindex bef80b118a8..0da14255820 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -1596,7 +1596,7 @@ endif\n git_exec_path = 'libexec/git-core'\n libexec = get_option('libexecdir')\n if libexec != 'libexec' and libexec != '.'\n-  git_exec_path = libexec\n+  git_exec_path = libexec / 'git-core'\n endif\n \n if get_option('runtime_prefix')\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521251","messageId":"20250703-b4-pks-meson-cleanups-v1-7-2804c2932abe@pks.im","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","subject":"[PATCH 7/8] meson: update subproject wrappers","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-03T09:28:49Z","receivedAt":"2025-07-03T09:30:35Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Update subproject wrappers to newer versions by executing `meson wrap\nupdate` in the project's root directory\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n subprojects/expat.wrap | 18 +++++++++---------\n subprojects/pcre2.wrap | 18 +++++++++---------\n 2 files changed, 18 insertions(+), 18 deletions(-)\n\ndiff --git a/subprojects/expat.wrap b/subprojects/expat.wrap\nindex 2e0427dcfd1..0e9292f97bf 100644\n--- a/subprojects/expat.wrap\n+++ b/subprojects/expat.wrap\n@@ -1,13 +1,13 @@\n [wrap-file]\n-directory = expat-2.6.3\n-source_url = https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz\n-source_filename = expat-2.6.3.tar.bz2\n-source_hash = 274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc\n-patch_filename = expat_2.6.3-1_patch.zip\n-patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.6.3-1/get_patch\n-patch_hash = cf017fbe105e31428b2768360bd9be39094df4e948a1e8d1c54b6f7c76460cb1\n-source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.6.3-1/expat-2.6.3.tar.bz2\n-wrapdb_version = 2.6.3-1\n+directory = expat-2.7.1\n+source_url = https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.xz\n+source_filename = expat-2.7.1.tar.bz2\n+source_hash = 354552544b8f99012e5062f7d570ec77f14b412a3ff5c7d8d0dae62c0d217c30\n+patch_filename = expat_2.7.1-1_patch.zip\n+patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.7.1-1/get_patch\n+patch_hash = fe28cbbc427a7c9787d08b969ad54d19f59d8dd18294b4a18651cecfc789d4ef\n+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.7.1-1/expat-2.7.1.tar.bz2\n+wrapdb_version = 2.7.1-1\n \n [provide]\n expat = expat_dep\ndiff --git a/subprojects/pcre2.wrap b/subprojects/pcre2.wrap\nindex 7e184472543..f45c968e2f3 100644\n--- a/subprojects/pcre2.wrap\n+++ b/subprojects/pcre2.wrap\n@@ -1,13 +1,13 @@\n [wrap-file]\n-directory = pcre2-10.44\n-source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.tar.bz2\n-source_filename = pcre2-10.44.tar.bz2\n-source_hash = d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96\n-patch_filename = pcre2_10.44-2_patch.zip\n-patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.44-2/get_patch\n-patch_hash = 4336d422ee9043847e5e10dbbbd01940d4c9e5027f31ccdc33a7898a1ca94009\n-source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.44-2/pcre2-10.44.tar.bz2\n-wrapdb_version = 10.44-2\n+directory = pcre2-10.45\n+source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.45/pcre2-10.45.tar.bz2\n+source_filename = pcre2-10.45.tar.bz2\n+source_hash = 21547f3516120c75597e5b30a992e27a592a31950b5140e7b8bfde3f192033c4\n+patch_filename = pcre2_10.45-2_patch.zip\n+patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.45-2/get_patch\n+patch_hash = 7c6f34b703708652a404f9dc2769c67658c437b6043573295fa3428a9b7a6807\n+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.45-2/pcre2-10.45.tar.bz2\n+wrapdb_version = 10.45-2\n \n [provide]\n libpcre2-8 = libpcre2_8\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521252","messageId":"20250703-b4-pks-meson-cleanups-v1-8-2804c2932abe@pks.im","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","subject":"[PATCH 8/8] ci: use Meson's new `--slice` option","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-03T09:28:50Z","receivedAt":"2025-07-03T09:30:38Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"As executing our test suite is notoriously slow on Windows we use matrix\njobs in our CI systems to slice up tests and run them via multiple jobs.\nOn Meson this is done with a comparatively complex PowerShell invocation\nas Meson didn't yet have a native way to slice tests like this.\n\nI have upstreamed a new `--slice` option [1] that addresses this use\ncase though, which has been merged and released with Meson 1.8. Both\nGitLab and GitHub CI have Meson 1.8.2 available by now, so let's update\nthe jobs to use that new option.\n\n[1]: https://github.com/mesonbuild/meson/pull/14092\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n .github/workflows/main.yml | 2 +-\n .gitlab-ci.yml             | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 7dbf9f7f123..f0f653bd853 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -298,7 +298,7 @@ jobs:\n         path: build\n     - name: Test\n       shell: pwsh\n-      run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }\n+      run: meson test -C build --no-rebuild --print-errorlogs --slice ${{ matrix.nr }}/10\n \n   regular:\n     name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex bb6d5b976cd..af10ebb59a3 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -178,7 +178,7 @@ test:msvc-meson:\n     - job: \"build:msvc-meson\"\n       artifacts: true\n   script:\n-    - meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } }\n+    - meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL\n   parallel: 10\n \n test:fuzz-smoke-tests:\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521284","messageId":"ad58469d-e8a7-4a9e-9f34-2afa68458f00@ramsayjones.plus.com","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-6-2804c2932abe@pks.im","subject":"Re: [PATCH 6/8] meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2025-07-03T16:39:31Z","receivedAt":"2025-07-03T16:42:42Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 03/07/2025 10:28, Patrick Steinhardt wrote:\n> In 837f637cf51 (meson.build: correct setting of GIT_EXEC_PATH,\n> 2025-05-19) we have fixed how we configure GIT_EXEC_PATH in some cases.\n> It was reported [1] though that this causes a new issue when overriding\n> libexecdir with `-Dlibexecdir=`:\n\nYep, I noticed this report when I got back. My first thought was 'no, we\nmay just as well revert commit 837f637cf51', since that is in effect what\nthis patch does! ;)\n\nThen I had a quick look and left a diff/commit 'note to myself' which\neffectively did a global search/replace of the string:\n\n    install_dir: get_option('libexecdir') / 'git-core'\n\nwith:\n\n    install_dir: git_exec_path\n\nand put it on my TODO list. (Note, that is *all* I did - I didn't even\nattempt a build, let alone test!)\n\nOf course, I need to spend some time on this (if nothing else, git-gui and\npresumably gitk will need some changes as well?).\n\nHopefully, I can find some time soon (those round tuits are in short supply).\n\n> \n>     $ meson setup -Dprefix=/tmp/git -Dlibexecdir=libexec-different\n>     $ meson install\n>     $ /tmp/git/bin/git --exec-path\n>     /tmp/git/libexec-different\n>     $ /tmp/git/bin/git daemon\n>     git: 'daemon' is not a git command. See 'git --help'.\n> \n> While we correctly propagate the libexecdir to Git's GIT_EXEC_PATH, we\n> forgot to append 'git-core'. Consequently, it cannot find its binaries\n> anymore.\n> \n> Fix this issue by appending 'git-core' to libexecdir. With this, things\n> work as expected:\n> \n>     $ meson install\n>     $ /tmp/git/bin/git --exec-path\n>     /tmp/git/libexec-different/git-core\n>     $ /tmp/git/bin/git daemon -h\n>     ...\n\nHmm, I'm pretty certain I tested commit 837f637cf51 in a similar (but\nnot identical) way! ;) I will use the above test next time.\n\nSorry for causing a regression. :(\n\nATB,\nRamsay Jones\n\n\n"},{"id":"521487","messageId":"xmqqldozzge4.fsf@gitster.g","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-8-2804c2932abe@pks.im","subject":"Re: [PATCH 8/8] ci: use Meson's new `--slice` option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-07-08T00:16:03Z","receivedAt":"2025-07-08T00:16:05Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> As executing our test suite is notoriously slow on Windows we use matrix\n> jobs in our CI systems to slice up tests and run them via multiple jobs.\n> On Meson this is done with a comparatively complex PowerShell invocation\n> as Meson didn't yet have a native way to slice tests like this.\n>\n> I have upstreamed a new `--slice` option [1] that addresses this use\n> case though, which has been merged and released with Meson 1.8. Both\n> GitLab and GitHub CI have Meson 1.8.2 available by now, so let's update\n> the jobs to use that new option.\n>\n> [1]: https://github.com/mesonbuild/meson/pull/14092\n>\n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  .github/workflows/main.yml | 2 +-\n>  .gitlab-ci.yml             | 2 +-\n>  2 files changed, 2 insertions(+), 2 deletions(-)\n\nhttps://github.com/git/git/actions/runs/16129796573/job/45515034049#step:6:17\n\nunfortunately ends like this:\n\nRun meson test -C build --no-rebuild --print-errorlogs --slice 0/10\n  meson test -C build --no-rebuild --print-errorlogs --slice 0/10\n  shell: C:\\Program Files\\PowerShell\\7\\pwsh.EXE -command \". '{0}'\"\n  env:\n    DEVELOPER: 1\nusage: meson test [-h] [--maxfail MAXFAIL] [--repeat REPEAT] [--no-rebuild]\n                  [--gdb] [--gdb-path GDB_PATH] [-i] [--list]\n                  [--wrapper WRAPPER] [-C WD] [--suite SUITE] [--no-suite SUITE]\n                  [--no-stdsplit] [--print-errorlogs] [--benchmark]\n                  [--logbase LOGBASE] [-j NUM_PROCESSES] [-v] [-q]\n                  [-t TIMEOUT_MULTIPLIER] [--setup SETUP]\n                  [--test-args TEST_ARGS] [--max-lines MAX_LINES]\n                  [--slice SLICE/NUM_SLICES]\n                  [args ...]\nmeson test: error: argument --slice: SLICE is not a positive integer\nError: Process completed with exit code 1.\n\n\n> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> index 7dbf9f7f123..f0f653bd853 100644\n> --- a/.github/workflows/main.yml\n> +++ b/.github/workflows/main.yml\n> @@ -298,7 +298,7 @@ jobs:\n>          path: build\n>      - name: Test\n>        shell: pwsh\n> -      run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }\n> +      run: meson test -C build --no-rebuild --print-errorlogs --slice ${{ matrix.nr }}/10\n>  \n>    regular:\n>      name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})\n> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\n> index bb6d5b976cd..af10ebb59a3 100644\n> --- a/.gitlab-ci.yml\n> +++ b/.gitlab-ci.yml\n> @@ -178,7 +178,7 @@ test:msvc-meson:\n>      - job: \"build:msvc-meson\"\n>        artifacts: true\n>    script:\n> -    - meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } }\n> +    - meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL\n>    parallel: 10\n>  \n>  test:fuzz-smoke-tests:\n"},{"id":"521490","messageId":"20250708011249.GA547084@coredump.intra.peff.net","threadId":"63735","inReplyTo":"xmqqldozzge4.fsf@gitster.g","subject":"Re: [PATCH 8/8] ci: use Meson's new `--slice` option","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-07-08T01:12:49Z","receivedAt":"2025-07-08T01:12:50Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 07, 2025 at 05:16:03PM -0700, Junio C Hamano wrote:\n\n> https://github.com/git/git/actions/runs/16129796573/job/45515034049#step:6:17\n> \n> unfortunately ends like this:\n> \n> Run meson test -C build --no-rebuild --print-errorlogs --slice 0/10\n>   meson test -C build --no-rebuild --print-errorlogs --slice 0/10\n>   shell: C:\\Program Files\\PowerShell\\7\\pwsh.EXE -command \". '{0}'\"\n>   env:\n>     DEVELOPER: 1\n> usage: meson test [-h] [--maxfail MAXFAIL] [--repeat REPEAT] [--no-rebuild]\n>                   [--gdb] [--gdb-path GDB_PATH] [-i] [--list]\n>                   [--wrapper WRAPPER] [-C WD] [--suite SUITE] [--no-suite SUITE]\n>                   [--no-stdsplit] [--print-errorlogs] [--benchmark]\n>                   [--logbase LOGBASE] [-j NUM_PROCESSES] [-v] [-q]\n>                   [-t TIMEOUT_MULTIPLIER] [--setup SETUP]\n>                   [--test-args TEST_ARGS] [--max-lines MAX_LINES]\n>                   [--slice SLICE/NUM_SLICES]\n>                   [args ...]\n> meson test: error: argument --slice: SLICE is not a positive integer\n> Error: Process completed with exit code 1.\n\nI was just digging into this, too. I guess:\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 673b1c44b9..717bd2763b 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -289,7 +289,7 @@ jobs:\n     strategy:\n       fail-fast: false\n       matrix:\n-        nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n+        nr: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n     concurrency:\n       group: windows-meson-test-${{ matrix.nr }}-${{ github.ref }}\n       cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}\n\nis probably the right fix?\n\n-Peff\n"},{"id":"521493","messageId":"20250708013935.GA549322@coredump.intra.peff.net","threadId":"63735","inReplyTo":"20250708011249.GA547084@coredump.intra.peff.net","subject":"Re: [PATCH 8/8] ci: use Meson's new `--slice` option","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2025-07-08T01:39:35Z","receivedAt":"2025-07-08T01:39:36Z","isPatch":true,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Jul 07, 2025 at 09:12:49PM -0400, Jeff King wrote:\n\n> I was just digging into this, too. I guess:\n> \n> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> index 673b1c44b9..717bd2763b 100644\n> --- a/.github/workflows/main.yml\n> +++ b/.github/workflows/main.yml\n> @@ -289,7 +289,7 @@ jobs:\n>      strategy:\n>        fail-fast: false\n>        matrix:\n> -        nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n> +        nr: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n>      concurrency:\n>        group: windows-meson-test-${{ matrix.nr }}-${{ github.ref }}\n>        cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}\n> \n> is probably the right fix?\n\nThat does renumber the job titles. Probably not important, but they\nwouldn't match the non-meson ones anymore (though I am not sure if we\neven slice in the same way, so maybe it does not matter at all).\n\nAnyway, the more minimal fix is:\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 673b1c44b9..7739bd2d76 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -306,7 +306,7 @@ jobs:\n         path: build\n     - name: Test\n       shell: pwsh\n-      run: meson test -C build --no-rebuild --print-errorlogs --slice ${{ matrix.nr }}/10\n+      run: meson test -C build --no-rebuild --print-errorlogs --slice \"$(1+${{ matrix.nr }})/10\"\n \n   regular:\n     name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})\n\nwith the additional bonus that I can put \"PowerShell Hacker\" on my\nresume now.\n\nCuriously the quotes around the whole thing are required. If you do\njust:\n\n  $(1+1)/10\n\nyou will get two arguments: \"2\" and \"/10\". Definitely surprising to me\ncoming from a bourne shell background.\n\n-Peff\n"},{"id":"521499","messageId":"xmqqfrf7z471.fsf@gitster.g","threadId":"63735","inReplyTo":"20250708013935.GA549322@coredump.intra.peff.net","subject":"Re: [PATCH 8/8] ci: use Meson's new `--slice` option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-07-08T04:39:30Z","receivedAt":"2025-07-08T04:39:33Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> That does renumber the job titles. Probably not important, but they\n> wouldn't match the non-meson ones anymore (though I am not sure if we\n> even slice in the same way, so maybe it does not matter at all).\n>\n> Anyway, the more minimal fix is:\n>\n> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> index 673b1c44b9..7739bd2d76 100644\n> --- a/.github/workflows/main.yml\n> +++ b/.github/workflows/main.yml\n> @@ -306,7 +306,7 @@ jobs:\n>          path: build\n>      - name: Test\n>        shell: pwsh\n> -      run: meson test -C build --no-rebuild --print-errorlogs --slice ${{ matrix.nr }}/10\n> +      run: meson test -C build --no-rebuild --print-errorlogs --slice \"$(1+${{ matrix.nr }})/10\"\n\nIt is confusing that $(...) is not a command substitution in shell\nbut somehow performs arithmetic X-<.\n\n>    regular:\n>      name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})\n>\n> with the additional bonus that I can put \"PowerShell Hacker\" on my\n> resume now.\n>\n> Curiously the quotes around the whole thing are required. If you do\n> just:\n>\n>   $(1+1)/10\n>\n> you will get two arguments: \"2\" and \"/10\". Definitely surprising to me\n> coming from a bourne shell background.\n\nTrue.\n"},{"id":"521508","messageId":"aGzFzw8pxZRAvtIQ@pks.im","threadId":"63735","inReplyTo":"20250708013935.GA549322@coredump.intra.peff.net","subject":"Re: [PATCH 8/8] ci: use Meson's new `--slice` option","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T07:16:31Z","receivedAt":"2025-07-08T07:16:38Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Mon, Jul 07, 2025 at 09:39:35PM -0400, Jeff King wrote:\n> On Mon, Jul 07, 2025 at 09:12:49PM -0400, Jeff King wrote:\n> \n> > I was just digging into this, too. I guess:\n> > \n> > diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> > index 673b1c44b9..717bd2763b 100644\n> > --- a/.github/workflows/main.yml\n> > +++ b/.github/workflows/main.yml\n> > @@ -289,7 +289,7 @@ jobs:\n> >      strategy:\n> >        fail-fast: false\n> >        matrix:\n> > -        nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\n> > +        nr: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n> >      concurrency:\n> >        group: windows-meson-test-${{ matrix.nr }}-${{ github.ref }}\n> >        cancel-in-progress: ${{ needs.ci-config.outputs.skip_concurrent == 'yes' }}\n> > \n> > is probably the right fix?\n> \n> That does renumber the job titles. Probably not important, but they\n> wouldn't match the non-meson ones anymore (though I am not sure if we\n> even slice in the same way, so maybe it does not matter at all).\n> \n> Anyway, the more minimal fix is:\n> \n> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\n> index 673b1c44b9..7739bd2d76 100644\n> --- a/.github/workflows/main.yml\n> +++ b/.github/workflows/main.yml\n> @@ -306,7 +306,7 @@ jobs:\n>          path: build\n>      - name: Test\n>        shell: pwsh\n> -      run: meson test -C build --no-rebuild --print-errorlogs --slice ${{ matrix.nr }}/10\n> +      run: meson test -C build --no-rebuild --print-errorlogs --slice \"$(1+${{ matrix.nr }})/10\"\n>  \n>    regular:\n>      name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})\n> \n> with the additional bonus that I can put \"PowerShell Hacker\" on my\n> resume now.\n> \n> Curiously the quotes around the whole thing are required. If you do\n> just:\n> \n>   $(1+1)/10\n> \n> you will get two arguments: \"2\" and \"/10\". Definitely surprising to me\n> coming from a bourne shell background.\n\nThanks for digging into this! I probably should make it a habit to\nalways run CI changes through both GitHub and GitLab. :/\n\nPatrick\n"},{"id":"521509","messageId":"20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","subject":"[PATCH v2 0/8] A handful of Meson cleanups and improvements","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T07:57:41Z","receivedAt":"2025-07-08T07:57:50Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Hi,\n\nthis patch series contains a couple of more-or-less random cleanups and\nimprovements for Meson that I have accumulated over the last two months.\n\nChanges in v2:\n  - Fix an off-by-one error for test slices used in GitHub Workflows.\n  - Now tested with both GitLab (https://gitlab.com/gitlab-org/git/-/merge_requests/375)\n    and GitHub (https://github.com/git/git/pull/2010).\n  - Link to v1: https://lore.kernel.org/r/20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im\n\nThanks!\n\nPatrick\n\n---\nPatrick Steinhardt (8):\n      meson: stop discovering native version of Python\n      meson: stop printing 'https' option twice in our summaries\n      meson: improve summary of auto-detected features\n      meson: clean up unnecessary variables\n      meson: fix lookup of shell on MINGW64\n      meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=\n      meson: update subproject wrappers\n      ci: use Meson's new `--slice` option\n\n .github/workflows/main.yml |  2 +-\n .gitlab-ci.yml             |  2 +-\n Documentation/meson.build  |  5 ++---\n meson.build                | 26 ++++++++++++--------------\n subprojects/expat.wrap     | 18 +++++++++---------\n subprojects/pcre2.wrap     | 18 +++++++++---------\n 6 files changed, 34 insertions(+), 37 deletions(-)\n\nRange-diff versus v1:\n\n1:  34bb9288218 = 1:  2130ccdfb14 meson: stop discovering native version of Python\n2:  a6f1b52d44f = 2:  4274c321f0b meson: stop printing 'https' option twice in our summaries\n3:  01a8c379314 = 3:  cdc8c9d8655 meson: improve summary of auto-detected features\n4:  306af85a4a3 = 4:  373496880ce meson: clean up unnecessary variables\n5:  d8308e96c74 = 5:  cd2bfeaccd2 meson: fix lookup of shell on MINGW64\n6:  583c3e701c8 = 6:  9135b7f6012 meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=\n7:  c3edc233952 = 7:  16e0f2d1e22 meson: update subproject wrappers\n8:  22a62721031 ! 8:  2ab73ae33df ci: use Meson's new `--slice` option\n    @@ .github/workflows/main.yml: jobs:\n          - name: Test\n            shell: pwsh\n     -      run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }\n    -+      run: meson test -C build --no-rebuild --print-errorlogs --slice ${{ matrix.nr }}/10\n    ++      run: meson test -C build --no-rebuild --print-errorlogs --slice \"$(1+${{ matrix.nr }})/10\"\n      \n        regular:\n          name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})\n\n---\nbase-commit: 8b6f19ccfc3aefbd0f22f6b7d56ad6a3fc5e4f37\nchange-id: 20250703-b4-pks-meson-cleanups-f53858d694f3\n\n"},{"id":"521510","messageId":"20250708-b4-pks-meson-cleanups-v2-1-94ac53cd4b95@pks.im","threadId":"63735","inReplyTo":"20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im","subject":"[PATCH v2 1/8] meson: stop discovering native version of Python","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T07:57:42Z","receivedAt":"2025-07-08T07:57:53Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"When Python features are enabled we search both for a native and\nnon-native version of Python. This is wrong though: we don't use Python\nin our build process, so there is no need to search for it in the first\nplace.\n\nThere is one location where we use the native version of Python, namely\nwhen deciding whether or not we want to wire up git-p4(1). This check is\ninvalid though, as we shouldn't check for the build host to have Python,\nbut for the target host.\n\nFix this invalid check to use the non-native version of Python and stop\nsearching for a native version of Python altogether.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 9 ++++-----\n 1 file changed, 4 insertions(+), 5 deletions(-)\n\ndiff --git a/meson.build b/meson.build\nindex 7fea4a34d68..21fdff0f496 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -866,9 +866,8 @@ if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'\n endif\n build_options_config.set_quoted('X', executable_suffix)\n \n-python = import('python').find_installation('python3', required: get_option('python'))\n-target_python = find_program('python3', native: false, required: python.found())\n-if python.found()\n+target_python = find_program('python3', native: false, required: get_option('python'))\n+if target_python.found()\n   build_options_config.set('NO_PYTHON', '')\n else\n   libgit_c_args += '-DNO_PYTHON'\n@@ -1979,7 +1978,7 @@ if perl_features_enabled\n   subdir('perl')\n endif\n \n-if python.found()\n+if target_python.found()\n   scripts_python = [\n     'git-p4.py'\n   ]\n@@ -2202,7 +2201,7 @@ summary({\n   'iconv': iconv.found(),\n   'pcre2': pcre2.found(),\n   'perl': perl_features_enabled,\n-  'python': python.found(),\n+  'python': target_python.found(),\n }, section: 'Auto-detected features')\n \n summary({\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521511","messageId":"20250708-b4-pks-meson-cleanups-v2-2-94ac53cd4b95@pks.im","threadId":"63735","inReplyTo":"20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im","subject":"[PATCH v2 2/8] meson: stop printing 'https' option twice in our summaries","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T07:57:43Z","receivedAt":"2025-07-08T07:57:57Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The value for the 'https' backend option is printed twice: once via the\nsummary of auto-detected features and once via our summary of backends.\nDrop it from the former summary.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/meson.build b/meson.build\nindex 21fdff0f496..4e41c3007bb 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -2197,7 +2197,6 @@ summary({\n   'expat': expat.found(),\n   'gettext': intl.found(),\n   'gitweb': gitweb_option.allowed(),\n-  'https': https_backend,\n   'iconv': iconv.found(),\n   'pcre2': pcre2.found(),\n   'perl': perl_features_enabled,\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521512","messageId":"20250708-b4-pks-meson-cleanups-v2-3-94ac53cd4b95@pks.im","threadId":"63735","inReplyTo":"20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im","subject":"[PATCH v2 3/8] meson: improve summary of auto-detected features","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T07:57:44Z","receivedAt":"2025-07-08T07:57:59Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The summary of auto-detected features prints a boolean for every option\nto tell the user whether or not the feature has been auto-enabled or\nnot. This summary can be improved though, as in some cases this boolean\nis derived from a dependency. So if we pass in the dependency directly,\nthen Meson knows to both print a boolean and, if the dependency was\nfound, it also prints a version number.\n\nAdapt the code accordingly and enable `bool_yn` so that actual booleans\nare formatted similarly to dependencies. Before this change:\n\n  Auto-detected features\n    benchmarks      : true\n    curl            : true\n    expat           : true\n    gettext         : true\n    gitweb          : true\n    iconv           : true\n    pcre2           : true\n    perl            : true\n    python          : true\n\nAnd after this change, we now see the version numbers as expected:\n\n  Auto-detected features\n    benchmarks      : YES\n    curl            : YES 8.14.1\n    expat           : YES 2.7.1\n    gettext         : YES\n    gitweb          : YES\n    iconv           : YES\n    pcre2           : YES 10.44\n    perl            : YES\n    python          : YES\n\nNote that this change also enables colorization of the boolean options,\ngreen for \"YES\" and red for \"NO\".\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/meson.build b/meson.build\nindex 4e41c3007bb..4f22d72641e 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -2193,15 +2193,15 @@ meson.add_dist_script(\n \n summary({\n   'benchmarks': get_option('tests') and perl.found() and time.found(),\n-  'curl': curl.found(),\n-  'expat': expat.found(),\n-  'gettext': intl.found(),\n+  'curl': curl,\n+  'expat': expat,\n+  'gettext': intl,\n   'gitweb': gitweb_option.allowed(),\n-  'iconv': iconv.found(),\n-  'pcre2': pcre2.found(),\n+  'iconv': iconv,\n+  'pcre2': pcre2,\n   'perl': perl_features_enabled,\n   'python': target_python.found(),\n-}, section: 'Auto-detected features')\n+}, section: 'Auto-detected features', bool_yn: true)\n \n summary({\n   'csprng': csprng_backend,\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521513","messageId":"20250708-b4-pks-meson-cleanups-v2-4-94ac53cd4b95@pks.im","threadId":"63735","inReplyTo":"20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im","subject":"[PATCH v2 4/8] meson: clean up unnecessary variables","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T07:57:45Z","receivedAt":"2025-07-08T07:58:02Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The `manpage_target` variable isn't used at all, and the `manpage_path`\nvariable is only used in a single location. Remove the former variable\nand inline the latter.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n Documentation/meson.build | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/meson.build b/Documentation/meson.build\nindex 2fe1a1369d4..4404c623f00 100644\n--- a/Documentation/meson.build\n+++ b/Documentation/meson.build\n@@ -375,8 +375,7 @@ foreach manpage, category : manpages\n       output: fs.stem(manpage) + '.xml',\n     )\n \n-    manpage_path = fs.stem(manpage) + '.' + category.to_string()\n-    manpage_target = custom_target(\n+    custom_target(\n       command: [\n         xmlto,\n         '-m', '@INPUT0@',\n@@ -392,7 +391,7 @@ foreach manpage, category : manpages\n         'manpage-normal.xsl',\n         'manpage-bold-literal.xsl',\n       ],\n-      output: manpage_path,\n+      output: fs.stem(manpage) + '.' + category.to_string(),\n       install: true,\n       install_dir: get_option('mandir') / 'man' + category.to_string(),\n     )\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521514","messageId":"20250708-b4-pks-meson-cleanups-v2-5-94ac53cd4b95@pks.im","threadId":"63735","inReplyTo":"20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im","subject":"[PATCH v2 5/8] meson: fix lookup of shell on MINGW64","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T07:57:46Z","receivedAt":"2025-07-08T07:58:06Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In 4cba20fbdc6 (meson: prefer shell at \"/bin/sh\", 2025-04-25) we have\naddressed an issue where the shell path embedded into Git was looked up\nvia PATH, which easily led to unportable shell paths other than the\nusual \"/bin/sh\" location. The fix was to simply add '/bin' to the search\npath explicitly, which made us prefer that directory over the PATH-based\nlookup.\n\nThis fix causes issues on MINGW64 though, which uses Windows-style\npaths. \"/bin\" is not an absolute Windows-style path, but Meson expects\nthe directories to be absolute. This leads to the following error:\n\n    meson.build:248:15: ERROR: Search directory /bin is not an absolute path.\n\nFix this by instead searching for both '/bin/sh' and 'sh', which also\ncauses us to prefer '/bin/sh' over a PATH-based lookup. Meson does\naccept that path alright on MINGW64, even though it's not an absolute\nWindows-style path, either.\n\nFurthermore, this continues to work alright with cross-files, as well,\nin case one wants to explicitly override the shell path:\n\n    $ meson setup build\n    ...\n      Runtime executable paths\n        perl       : /nix/store/gy10hw004rl2xfbfq41vnw0yb1w8rvbl-perl-5.40.0/bin/perl\n        python     : /nix/store/sd81bvmch7njdpwx3lkjslixcbj5mivz-python3-3.13.4/bin/python3\n        shell      : /bin/sh\n\n    $ cat >cross.ini <<-EOF\n    [binaries]\n    sh = '/nix/store/94lg0shvsfc845zy8gnflvpqxxiyijbz-bash-interactive-5.2p37/bin/bash'\n    EOF\n\n    $ meson setup build --cross-file=cross.ini --wipe\n    ...\n      Runtime executable paths\n        perl       : /nix/store/gy10hw004rl2xfbfq41vnw0yb1w8rvbl-perl-5.40.0/bin/perl\n        python     : /nix/store/sd81bvmch7njdpwx3lkjslixcbj5mivz-python3-3.13.4/bin/python3\n        shell      : /nix/store/94lg0shvsfc845zy8gnflvpqxxiyijbz-bash-interactive-5.2p37/bin/bash\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/meson.build b/meson.build\nindex 4f22d72641e..bef80b118a8 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -245,7 +245,7 @@ time = find_program('time', dirs: program_path, required: get_option('benchmarks\n # \"/bin/sh\" over a PATH-based lookup, which provides a working shell on most\n # supported systems. This path is also the default shell path used by our\n # Makefile. This lookup can be overridden via `program_path`.\n-target_shell = find_program('sh', dirs: program_path + [ '/bin' ], native: false)\n+target_shell = find_program('/bin/sh', 'sh', dirs: program_path, native: false)\n \n # Sanity-check that programs required for the build exist.\n foreach tool : ['cat', 'cut', 'grep', 'sort', 'tr', 'uname']\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521515","messageId":"20250708-b4-pks-meson-cleanups-v2-6-94ac53cd4b95@pks.im","threadId":"63735","inReplyTo":"20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im","subject":"[PATCH v2 6/8] meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T07:57:47Z","receivedAt":"2025-07-08T07:58:09Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In 837f637cf51 (meson.build: correct setting of GIT_EXEC_PATH,\n2025-05-19) we have fixed how we configure GIT_EXEC_PATH in some cases.\nIt was reported [1] though that this causes a new issue when overriding\nlibexecdir with `-Dlibexecdir=`:\n\n    $ meson setup -Dprefix=/tmp/git -Dlibexecdir=libexec-different\n    $ meson install\n    $ /tmp/git/bin/git --exec-path\n    /tmp/git/libexec-different\n    $ /tmp/git/bin/git daemon\n    git: 'daemon' is not a git command. See 'git --help'.\n\nWhile we correctly propagate the libexecdir to Git's GIT_EXEC_PATH, we\nforgot to append 'git-core'. Consequently, it cannot find its binaries\nanymore.\n\nFix this issue by appending 'git-core' to libexecdir. With this, things\nwork as expected:\n\n    $ meson install\n    $ /tmp/git/bin/git --exec-path\n    /tmp/git/libexec-different/git-core\n    $ /tmp/git/bin/git daemon -h\n    ...\n\n[1]: <66fd343a-1351-4350-83eb-c797e47b7693@gmail.com>\n\nReported-by: irecca.kun@gmail.com\nBased-on-patch-by: irecca.kun@gmail.com\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/meson.build b/meson.build\nindex bef80b118a8..0da14255820 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -1596,7 +1596,7 @@ endif\n git_exec_path = 'libexec/git-core'\n libexec = get_option('libexecdir')\n if libexec != 'libexec' and libexec != '.'\n-  git_exec_path = libexec\n+  git_exec_path = libexec / 'git-core'\n endif\n \n if get_option('runtime_prefix')\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521516","messageId":"20250708-b4-pks-meson-cleanups-v2-7-94ac53cd4b95@pks.im","threadId":"63735","inReplyTo":"20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im","subject":"[PATCH v2 7/8] meson: update subproject wrappers","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T07:57:48Z","receivedAt":"2025-07-08T07:58:12Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Update subproject wrappers to newer versions by executing `meson wrap\nupdate` in the project's root directory\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n subprojects/expat.wrap | 18 +++++++++---------\n subprojects/pcre2.wrap | 18 +++++++++---------\n 2 files changed, 18 insertions(+), 18 deletions(-)\n\ndiff --git a/subprojects/expat.wrap b/subprojects/expat.wrap\nindex 2e0427dcfd1..0e9292f97bf 100644\n--- a/subprojects/expat.wrap\n+++ b/subprojects/expat.wrap\n@@ -1,13 +1,13 @@\n [wrap-file]\n-directory = expat-2.6.3\n-source_url = https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz\n-source_filename = expat-2.6.3.tar.bz2\n-source_hash = 274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc\n-patch_filename = expat_2.6.3-1_patch.zip\n-patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.6.3-1/get_patch\n-patch_hash = cf017fbe105e31428b2768360bd9be39094df4e948a1e8d1c54b6f7c76460cb1\n-source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.6.3-1/expat-2.6.3.tar.bz2\n-wrapdb_version = 2.6.3-1\n+directory = expat-2.7.1\n+source_url = https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.xz\n+source_filename = expat-2.7.1.tar.bz2\n+source_hash = 354552544b8f99012e5062f7d570ec77f14b412a3ff5c7d8d0dae62c0d217c30\n+patch_filename = expat_2.7.1-1_patch.zip\n+patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.7.1-1/get_patch\n+patch_hash = fe28cbbc427a7c9787d08b969ad54d19f59d8dd18294b4a18651cecfc789d4ef\n+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.7.1-1/expat-2.7.1.tar.bz2\n+wrapdb_version = 2.7.1-1\n \n [provide]\n expat = expat_dep\ndiff --git a/subprojects/pcre2.wrap b/subprojects/pcre2.wrap\nindex 7e184472543..f45c968e2f3 100644\n--- a/subprojects/pcre2.wrap\n+++ b/subprojects/pcre2.wrap\n@@ -1,13 +1,13 @@\n [wrap-file]\n-directory = pcre2-10.44\n-source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.tar.bz2\n-source_filename = pcre2-10.44.tar.bz2\n-source_hash = d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96\n-patch_filename = pcre2_10.44-2_patch.zip\n-patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.44-2/get_patch\n-patch_hash = 4336d422ee9043847e5e10dbbbd01940d4c9e5027f31ccdc33a7898a1ca94009\n-source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.44-2/pcre2-10.44.tar.bz2\n-wrapdb_version = 10.44-2\n+directory = pcre2-10.45\n+source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.45/pcre2-10.45.tar.bz2\n+source_filename = pcre2-10.45.tar.bz2\n+source_hash = 21547f3516120c75597e5b30a992e27a592a31950b5140e7b8bfde3f192033c4\n+patch_filename = pcre2_10.45-2_patch.zip\n+patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.45-2/get_patch\n+patch_hash = 7c6f34b703708652a404f9dc2769c67658c437b6043573295fa3428a9b7a6807\n+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.45-2/pcre2-10.45.tar.bz2\n+wrapdb_version = 10.45-2\n \n [provide]\n libpcre2-8 = libpcre2_8\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521517","messageId":"20250708-b4-pks-meson-cleanups-v2-8-94ac53cd4b95@pks.im","threadId":"63735","inReplyTo":"20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im","subject":"[PATCH v2 8/8] ci: use Meson's new `--slice` option","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T07:57:49Z","receivedAt":"2025-07-08T07:58:16Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"As executing our test suite is notoriously slow on Windows we use matrix\njobs in our CI systems to slice up tests and run them via multiple jobs.\nOn Meson this is done with a comparatively complex PowerShell invocation\nas Meson didn't yet have a native way to slice tests like this.\n\nI have upstreamed a new `--slice` option [1] that addresses this use\ncase though, which has been merged and released with Meson 1.8. Both\nGitLab and GitHub CI have Meson 1.8.2 available by now, so let's update\nthe jobs to use that new option.\n\n[1]: https://github.com/mesonbuild/meson/pull/14092\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n .github/workflows/main.yml | 2 +-\n .gitlab-ci.yml             | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 7dbf9f7f123..d122e79415a 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -298,7 +298,7 @@ jobs:\n         path: build\n     - name: Test\n       shell: pwsh\n-      run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }\n+      run: meson test -C build --no-rebuild --print-errorlogs --slice \"$(1+${{ matrix.nr }})/10\"\n \n   regular:\n     name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex bb6d5b976cd..af10ebb59a3 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -178,7 +178,7 @@ test:msvc-meson:\n     - job: \"build:msvc-meson\"\n       artifacts: true\n   script:\n-    - meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } }\n+    - meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL\n   parallel: 10\n \n test:fuzz-smoke-tests:\n\n-- \n2.50.0.195.g74e6fc65d0.dirty\n\n"},{"id":"521518","messageId":"aGzaZ7zHYbjzFo23@pks.im","threadId":"63735","inReplyTo":"ad58469d-e8a7-4a9e-9f34-2afa68458f00@ramsayjones.plus.com","subject":"Re: [PATCH 6/8] meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-08T08:44:23Z","receivedAt":"2025-07-08T08:44:30Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Thu, Jul 03, 2025 at 05:39:31PM +0100, Ramsay Jones wrote:\n> \n> \n> On 03/07/2025 10:28, Patrick Steinhardt wrote:\n> > In 837f637cf51 (meson.build: correct setting of GIT_EXEC_PATH,\n> > 2025-05-19) we have fixed how we configure GIT_EXEC_PATH in some cases.\n> > It was reported [1] though that this causes a new issue when overriding\n> > libexecdir with `-Dlibexecdir=`:\n> \n> Yep, I noticed this report when I got back. My first thought was 'no, we\n> may just as well revert commit 837f637cf51', since that is in effect what\n> this patch does! ;)\n> \n> Then I had a quick look and left a diff/commit 'note to myself' which\n> effectively did a global search/replace of the string:\n> \n>     install_dir: get_option('libexecdir') / 'git-core'\n> \n> with:\n> \n>     install_dir: git_exec_path\n> \n> and put it on my TODO list. (Note, that is *all* I did - I didn't even\n> attempt a build, let alone test!)\n> \n> Of course, I need to spend some time on this (if nothing else, git-gui and\n> presumably gitk will need some changes as well?).\n\nNeither git-gui nor gitk are currently supported by Meson. I do have a\nlocal patch series that backfills the support though.\n\n> Hopefully, I can find some time soon (those round tuits are in short supply).\n> \n> > \n> >     $ meson setup -Dprefix=/tmp/git -Dlibexecdir=libexec-different\n> >     $ meson install\n> >     $ /tmp/git/bin/git --exec-path\n> >     /tmp/git/libexec-different\n> >     $ /tmp/git/bin/git daemon\n> >     git: 'daemon' is not a git command. See 'git --help'.\n> > \n> > While we correctly propagate the libexecdir to Git's GIT_EXEC_PATH, we\n> > forgot to append 'git-core'. Consequently, it cannot find its binaries\n> > anymore.\n> > \n> > Fix this issue by appending 'git-core' to libexecdir. With this, things\n> > work as expected:\n> > \n> >     $ meson install\n> >     $ /tmp/git/bin/git --exec-path\n> >     /tmp/git/libexec-different/git-core\n> >     $ /tmp/git/bin/git daemon -h\n> >     ...\n> \n> Hmm, I'm pretty certain I tested commit 837f637cf51 in a similar (but\n> not identical) way! ;) I will use the above test next time.\n> \n> Sorry for causing a regression. :(\n\nNo worries, it happens to all of us.\n\nPatrick\n"},{"id":"521562","messageId":"4ql5wzqvcoxrcbi6cznavtnfzwmh72tevixwgotvsx4kzkbljv@a55yhjqqqnym","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-1-2804c2932abe@pks.im","subject":"Re: [PATCH 1/8] meson: stop discovering native version of Python","fromName":"Justin Tobler","fromEmail":"jltobler@gmail.com","sentAt":"2025-07-08T19:38:49Z","receivedAt":"2025-07-08T19:44:26Z","isPatch":true,"sender":{"key":"jltobler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/53454972?v=4"},"body":"On 25/07/03 11:28AM, Patrick Steinhardt wrote:\n> When Python features are enabled we search both for a native and\n> non-native version of Python. This is wrong though: we don't use Python\n> in our build process, so there is no need to search for it in the first\n> place.\n> \n> There is one location where we use the native version of Python, namely\n> when deciding whether or not we want to wire up git-p4(1). This check is\n> invalid though, as we shouldn't check for the build host to have Python,\n> but for the target host.\n\nOk, we are using the native python version, but we should really care\nwether the target host has python.\n\n> Fix this invalid check to use the non-native version of Python and stop\n> searching for a native version of Python altogether.\n> \n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  meson.build | 9 ++++-----\n>  1 file changed, 4 insertions(+), 5 deletions(-)\n> \n> diff --git a/meson.build b/meson.build\n> index 7fea4a34d68..21fdff0f496 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -866,9 +866,8 @@ if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'\n>  endif\n>  build_options_config.set_quoted('X', executable_suffix)\n>  \n> -python = import('python').find_installation('python3', required: get_option('python'))\n> -target_python = find_program('python3', native: false, required: python.found())\n> -if python.found()\n> +target_python = find_program('python3', native: false, required: get_option('python'))\n> +if target_python.found()\n\nOk, so here we are not actually using python to build, but instead need\nto know whether to include this build configuration which is dependent\non the target host having python. Makes sense.\n\nIt might be nice to leave a comment here to explain this. The changes in\nthis patch look good though.\n\n>    build_options_config.set('NO_PYTHON', '')\n>  else\n>    libgit_c_args += '-DNO_PYTHON'\n> @@ -1979,7 +1978,7 @@ if perl_features_enabled\n>    subdir('perl')\n>  endif\n>  \n> -if python.found()\n> +if target_python.found()\n>    scripts_python = [\n>      'git-p4.py'\n>    ]\n> @@ -2202,7 +2201,7 @@ summary({\n>    'iconv': iconv.found(),\n>    'pcre2': pcre2.found(),\n>    'perl': perl_features_enabled,\n> -  'python': python.found(),\n> +  'python': target_python.found(),\n>  }, section: 'Auto-detected features')\n>  \n>  summary({\n> \n> -- \n> 2.50.0.195.g74e6fc65d0.dirty\n> \n> \n"},{"id":"521563","messageId":"apzpu3ydbiyfxckqewqfsgjqm2kwpisj3gx4q5cb73ntsldxqy@vfzpgnu57rl6","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-3-2804c2932abe@pks.im","subject":"Re: [PATCH 3/8] meson: improve summary of auto-detected features","fromName":"Justin Tobler","fromEmail":"jltobler@gmail.com","sentAt":"2025-07-08T19:56:32Z","receivedAt":"2025-07-08T20:02:08Z","isPatch":true,"sender":{"key":"jltobler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/53454972?v=4"},"body":"On 25/07/03 11:28AM, Patrick Steinhardt wrote:\n> The summary of auto-detected features prints a boolean for every option\n> to tell the user whether or not the feature has been auto-enabled or\n> not. This summary can be improved though, as in some cases this boolean\n> is derived from a dependency. So if we pass in the dependency directly,\n> then Meson knows to both print a boolean and, if the dependency was\n> found, it also prints a version number.\n> \n> Adapt the code accordingly and enable `bool_yn` so that actual booleans\n> are formatted similarly to dependencies. Before this change:\n\nOk so without `bool_yn` enabled, only the dependencies listed directly\nwould say YES/NO and not match the other entries.\n\n>   Auto-detected features\n>     benchmarks      : true\n>     curl            : true\n>     expat           : true\n>     gettext         : true\n>     gitweb          : true\n>     iconv           : true\n>     pcre2           : true\n>     perl            : true\n>     python          : true\n> \n> And after this change, we now see the version numbers as expected:\n> \n>   Auto-detected features\n>     benchmarks      : YES\n>     curl            : YES 8.14.1\n>     expat           : YES 2.7.1\n>     gettext         : YES\n>     gitweb          : YES\n>     iconv           : YES\n>     pcre2           : YES 10.44\n>     perl            : YES\n>     python          : YES\n> \n> Note that this change also enables colorization of the boolean options,\n> green for \"YES\" and red for \"NO\".\n\nOk, it looks like colorization it not an explicit option, but comes\nautomatically with the `bool_yn` and dependency change. Nice.\n\n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  meson.build | 12 ++++++------\n>  1 file changed, 6 insertions(+), 6 deletions(-)\n> \n> diff --git a/meson.build b/meson.build\n> index 4e41c3007bb..4f22d72641e 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -2193,15 +2193,15 @@ meson.add_dist_script(\n>  \n>  summary({\n>    'benchmarks': get_option('tests') and perl.found() and time.found(),\n> -  'curl': curl.found(),\n> -  'expat': expat.found(),\n> -  'gettext': intl.found(),\n> +  'curl': curl,\n> +  'expat': expat,\n> +  'gettext': intl,\n>    'gitweb': gitweb_option.allowed(),\n> -  'iconv': iconv.found(),\n> -  'pcre2': pcre2.found(),\n> +  'iconv': iconv,\n> +  'pcre2': pcre2,\n>    'perl': perl_features_enabled,\n>    'python': target_python.found(),\n> -}, section: 'Auto-detected features')\n> +}, section: 'Auto-detected features', bool_yn: true)\n\nLooks good!\n\n-Justin\n"},{"id":"521572","messageId":"jrpk2ydgoc7o2yj5nyr73gvgfjkyjkyqkfunu7showh7uvfuoj@bqiwcidm6gbk","threadId":"63735","inReplyTo":"20250708-b4-pks-meson-cleanups-v2-5-94ac53cd4b95@pks.im","subject":"Re: [PATCH v2 5/8] meson: fix lookup of shell on MINGW64","fromName":"Justin Tobler","fromEmail":"jltobler@gmail.com","sentAt":"2025-07-08T20:44:24Z","receivedAt":"2025-07-08T20:50:00Z","isPatch":true,"sender":{"key":"jltobler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/53454972?v=4"},"body":"On 25/07/08 09:57AM, Patrick Steinhardt wrote:\n> In 4cba20fbdc6 (meson: prefer shell at \"/bin/sh\", 2025-04-25) we have\n> addressed an issue where the shell path embedded into Git was looked up\n> via PATH, which easily led to unportable shell paths other than the\n> usual \"/bin/sh\" location. The fix was to simply add '/bin' to the search\n> path explicitly, which made us prefer that directory over the PATH-based\n> lookup.\n> \n> This fix causes issues on MINGW64 though, which uses Windows-style\n> paths. \"/bin\" is not an absolute Windows-style path, but Meson expects\n> the directories to be absolute. This leads to the following error:\n> \n>     meson.build:248:15: ERROR: Search directory /bin is not an absolute path.\n\nOk so the specifed `dirs` takes higher precedence over searching the\n$PATH and appending `/bin` was how we ensured `/bin/sh` was checked\nfirst. The problem is that for MINGW64, `/bin` is not a valid absolute\npath and results in the above mention error.\n\n> Fix this by instead searching for both '/bin/sh' and 'sh', which also\n> causes us to prefer '/bin/sh' over a PATH-based lookup. Meson does\n> accept that path alright on MINGW64, even though it's not an absolute\n> Windows-style path, either.\n\nTo avoid this problem, we instead search for `/bin/sh` directly. By\nspecifying `/bin/sh` first, we maintain the same preference without\naffecting MINGW64. Makes sense.\n\n> Furthermore, this continues to work alright with cross-files, as well,\n> in case one wants to explicitly override the shell path:\n> \n>     $ meson setup build\n>     ...\n>       Runtime executable paths\n>         perl       : /nix/store/gy10hw004rl2xfbfq41vnw0yb1w8rvbl-perl-5.40.0/bin/perl\n>         python     : /nix/store/sd81bvmch7njdpwx3lkjslixcbj5mivz-python3-3.13.4/bin/python3\n>         shell      : /bin/sh\n> \n>     $ cat >cross.ini <<-EOF\n>     [binaries]\n>     sh = '/nix/store/94lg0shvsfc845zy8gnflvpqxxiyijbz-bash-interactive-5.2p37/bin/bash'\n>     EOF\n> \n>     $ meson setup build --cross-file=cross.ini --wipe\n>     ...\n>       Runtime executable paths\n>         perl       : /nix/store/gy10hw004rl2xfbfq41vnw0yb1w8rvbl-perl-5.40.0/bin/perl\n>         python     : /nix/store/sd81bvmch7njdpwx3lkjslixcbj5mivz-python3-3.13.4/bin/python3\n>         shell      : /nix/store/94lg0shvsfc845zy8gnflvpqxxiyijbz-bash-interactive-5.2p37/bin/bash\n> \n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  meson.build | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/meson.build b/meson.build\n> index 4f22d72641e..bef80b118a8 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -245,7 +245,7 @@ time = find_program('time', dirs: program_path, required: get_option('benchmarks\n>  # \"/bin/sh\" over a PATH-based lookup, which provides a working shell on most\n>  # supported systems. This path is also the default shell path used by our\n>  # Makefile. This lookup can be overridden via `program_path`.\n> -target_shell = find_program('sh', dirs: program_path + [ '/bin' ], native: false)\n> +target_shell = find_program('/bin/sh', 'sh', dirs: program_path, native: false)\n\nLooks good!\n\n-Justin\n"},{"id":"521608","messageId":"aG4JNtURJpMOTls7@pks.im","threadId":"63735","inReplyTo":"4ql5wzqvcoxrcbi6cznavtnfzwmh72tevixwgotvsx4kzkbljv@a55yhjqqqnym","subject":"Re: [PATCH 1/8] meson: stop discovering native version of Python","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-09T06:16:22Z","receivedAt":"2025-07-09T06:16:34Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Tue, Jul 08, 2025 at 02:38:49PM -0500, Justin Tobler wrote:\n> On 25/07/03 11:28AM, Patrick Steinhardt wrote:\n> > diff --git a/meson.build b/meson.build\n> > index 7fea4a34d68..21fdff0f496 100644\n> > --- a/meson.build\n> > +++ b/meson.build\n> > @@ -866,9 +866,8 @@ if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'\n> >  endif\n> >  build_options_config.set_quoted('X', executable_suffix)\n> >  \n> > -python = import('python').find_installation('python3', required: get_option('python'))\n> > -target_python = find_program('python3', native: false, required: python.found())\n> > -if python.found()\n> > +target_python = find_program('python3', native: false, required: get_option('python'))\n> > +if target_python.found()\n> \n> Ok, so here we are not actually using python to build, but instead need\n> to know whether to include this build configuration which is dependent\n> on the target host having python. Makes sense.\n> \n> It might be nice to leave a comment here to explain this. The changes in\n> this patch look good though.\n\nMakes sense, will do.\n\nPatrick\n"},{"id":"521609","messageId":"20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im","threadId":"63735","inReplyTo":"20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im","subject":"[PATCH v3 0/8] A handful of Meson cleanups and improvements","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-09T06:23:34Z","receivedAt":"2025-07-09T06:23:43Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Hi,\n\nthis patch series contains a couple of more-or-less random cleanups and\nimprovements for Meson that I have accumulated over the last two months.\n\nChanges in v2:\n  - Fix an off-by-one error for test slices used in GitHub Workflows.\n  - Now tested with both GitLab (https://gitlab.com/gitlab-org/git/-/merge_requests/375)\n    and GitHub (https://github.com/git/git/pull/2010).\n  - Link to v1: https://lore.kernel.org/r/20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im\n\nChanges in v3:\n  - Add a comment explaining why we only need to search for Python on\n    the build target.\n  - Link to v2: https://lore.kernel.org/r/20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im\n\nThanks!\n\nPatrick\n\n---\nPatrick Steinhardt (8):\n      meson: stop discovering native version of Python\n      meson: stop printing 'https' option twice in our summaries\n      meson: improve summary of auto-detected features\n      meson: clean up unnecessary variables\n      meson: fix lookup of shell on MINGW64\n      meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=\n      meson: update subproject wrappers\n      ci: use Meson's new `--slice` option\n\n .github/workflows/main.yml |  2 +-\n .gitlab-ci.yml             |  2 +-\n Documentation/meson.build  |  5 ++---\n meson.build                | 29 +++++++++++++++--------------\n subprojects/expat.wrap     | 18 +++++++++---------\n subprojects/pcre2.wrap     | 18 +++++++++---------\n 6 files changed, 37 insertions(+), 37 deletions(-)\n\nRange-diff versus v2:\n\n1:  af222af4b0b ! 1:  5b6ff96df15 meson: stop discovering native version of Python\n    @@ meson.build: if host_machine.system() == 'cygwin' or host_machine.system() == 'w\n     -python = import('python').find_installation('python3', required: get_option('python'))\n     -target_python = find_program('python3', native: false, required: python.found())\n     -if python.found()\n    ++# Python is not used for our build system, but exclusively for git-p4.\n    ++# Consequently we only need to determine whether Python is available for the\n    ++# build target.\n     +target_python = find_program('python3', native: false, required: get_option('python'))\n     +if target_python.found()\n        build_options_config.set('NO_PYTHON', '')\n2:  e1fe6822400 = 2:  cb5a42b63a0 meson: stop printing 'https' option twice in our summaries\n3:  9caa9813f94 = 3:  4b165ffa205 meson: improve summary of auto-detected features\n4:  2fbae915050 = 4:  fed79e92b3e meson: clean up unnecessary variables\n5:  2a72ec1cf78 = 5:  f7496adc08a meson: fix lookup of shell on MINGW64\n6:  c44a8783eac = 6:  e7692a76c89 meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=\n7:  3fb621da6ae = 7:  19853592a22 meson: update subproject wrappers\n8:  ad9176ef14e = 8:  5cd1b3ec3c3 ci: use Meson's new `--slice` option\n\n---\nbase-commit: 8b6f19ccfc3aefbd0f22f6b7d56ad6a3fc5e4f37\nchange-id: 20250703-b4-pks-meson-cleanups-f53858d694f3\n\n"},{"id":"521610","messageId":"20250709-b4-pks-meson-cleanups-v3-1-29ab15b9ab85@pks.im","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im","subject":"[PATCH v3 1/8] meson: stop discovering native version of Python","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-09T06:23:35Z","receivedAt":"2025-07-09T06:23:45Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"When Python features are enabled we search both for a native and\nnon-native version of Python. This is wrong though: we don't use Python\nin our build process, so there is no need to search for it in the first\nplace.\n\nThere is one location where we use the native version of Python, namely\nwhen deciding whether or not we want to wire up git-p4(1). This check is\ninvalid though, as we shouldn't check for the build host to have Python,\nbut for the target host.\n\nFix this invalid check to use the non-native version of Python and stop\nsearching for a native version of Python altogether.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 12 +++++++-----\n 1 file changed, 7 insertions(+), 5 deletions(-)\n\ndiff --git a/meson.build b/meson.build\nindex 7fea4a34d68..4ee1a55b0bb 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -866,9 +866,11 @@ if host_machine.system() == 'cygwin' or host_machine.system() == 'windows'\n endif\n build_options_config.set_quoted('X', executable_suffix)\n \n-python = import('python').find_installation('python3', required: get_option('python'))\n-target_python = find_program('python3', native: false, required: python.found())\n-if python.found()\n+# Python is not used for our build system, but exclusively for git-p4.\n+# Consequently we only need to determine whether Python is available for the\n+# build target.\n+target_python = find_program('python3', native: false, required: get_option('python'))\n+if target_python.found()\n   build_options_config.set('NO_PYTHON', '')\n else\n   libgit_c_args += '-DNO_PYTHON'\n@@ -1979,7 +1981,7 @@ if perl_features_enabled\n   subdir('perl')\n endif\n \n-if python.found()\n+if target_python.found()\n   scripts_python = [\n     'git-p4.py'\n   ]\n@@ -2202,7 +2204,7 @@ summary({\n   'iconv': iconv.found(),\n   'pcre2': pcre2.found(),\n   'perl': perl_features_enabled,\n-  'python': python.found(),\n+  'python': target_python.found(),\n }, section: 'Auto-detected features')\n \n summary({\n\n-- \n2.50.1.327.g047016eb4a.dirty\n\n"},{"id":"521611","messageId":"20250709-b4-pks-meson-cleanups-v3-2-29ab15b9ab85@pks.im","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im","subject":"[PATCH v3 2/8] meson: stop printing 'https' option twice in our summaries","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-09T06:23:36Z","receivedAt":"2025-07-09T06:23:48Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The value for the 'https' backend option is printed twice: once via the\nsummary of auto-detected features and once via our summary of backends.\nDrop it from the former summary.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 1 -\n 1 file changed, 1 deletion(-)\n\ndiff --git a/meson.build b/meson.build\nindex 4ee1a55b0bb..0ed00254ef3 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -2200,7 +2200,6 @@ summary({\n   'expat': expat.found(),\n   'gettext': intl.found(),\n   'gitweb': gitweb_option.allowed(),\n-  'https': https_backend,\n   'iconv': iconv.found(),\n   'pcre2': pcre2.found(),\n   'perl': perl_features_enabled,\n\n-- \n2.50.1.327.g047016eb4a.dirty\n\n"},{"id":"521612","messageId":"20250709-b4-pks-meson-cleanups-v3-3-29ab15b9ab85@pks.im","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im","subject":"[PATCH v3 3/8] meson: improve summary of auto-detected features","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-09T06:23:37Z","receivedAt":"2025-07-09T06:23:51Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The summary of auto-detected features prints a boolean for every option\nto tell the user whether or not the feature has been auto-enabled or\nnot. This summary can be improved though, as in some cases this boolean\nis derived from a dependency. So if we pass in the dependency directly,\nthen Meson knows to both print a boolean and, if the dependency was\nfound, it also prints a version number.\n\nAdapt the code accordingly and enable `bool_yn` so that actual booleans\nare formatted similarly to dependencies. Before this change:\n\n  Auto-detected features\n    benchmarks      : true\n    curl            : true\n    expat           : true\n    gettext         : true\n    gitweb          : true\n    iconv           : true\n    pcre2           : true\n    perl            : true\n    python          : true\n\nAnd after this change, we now see the version numbers as expected:\n\n  Auto-detected features\n    benchmarks      : YES\n    curl            : YES 8.14.1\n    expat           : YES 2.7.1\n    gettext         : YES\n    gitweb          : YES\n    iconv           : YES\n    pcre2           : YES 10.44\n    perl            : YES\n    python          : YES\n\nNote that this change also enables colorization of the boolean options,\ngreen for \"YES\" and red for \"NO\".\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 12 ++++++------\n 1 file changed, 6 insertions(+), 6 deletions(-)\n\ndiff --git a/meson.build b/meson.build\nindex 0ed00254ef3..29d076bbaac 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -2196,15 +2196,15 @@ meson.add_dist_script(\n \n summary({\n   'benchmarks': get_option('tests') and perl.found() and time.found(),\n-  'curl': curl.found(),\n-  'expat': expat.found(),\n-  'gettext': intl.found(),\n+  'curl': curl,\n+  'expat': expat,\n+  'gettext': intl,\n   'gitweb': gitweb_option.allowed(),\n-  'iconv': iconv.found(),\n-  'pcre2': pcre2.found(),\n+  'iconv': iconv,\n+  'pcre2': pcre2,\n   'perl': perl_features_enabled,\n   'python': target_python.found(),\n-}, section: 'Auto-detected features')\n+}, section: 'Auto-detected features', bool_yn: true)\n \n summary({\n   'csprng': csprng_backend,\n\n-- \n2.50.1.327.g047016eb4a.dirty\n\n"},{"id":"521613","messageId":"20250709-b4-pks-meson-cleanups-v3-4-29ab15b9ab85@pks.im","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im","subject":"[PATCH v3 4/8] meson: clean up unnecessary variables","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-09T06:23:38Z","receivedAt":"2025-07-09T06:23:54Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"The `manpage_target` variable isn't used at all, and the `manpage_path`\nvariable is only used in a single location. Remove the former variable\nand inline the latter.\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n Documentation/meson.build | 5 ++---\n 1 file changed, 2 insertions(+), 3 deletions(-)\n\ndiff --git a/Documentation/meson.build b/Documentation/meson.build\nindex 2fe1a1369d4..4404c623f00 100644\n--- a/Documentation/meson.build\n+++ b/Documentation/meson.build\n@@ -375,8 +375,7 @@ foreach manpage, category : manpages\n       output: fs.stem(manpage) + '.xml',\n     )\n \n-    manpage_path = fs.stem(manpage) + '.' + category.to_string()\n-    manpage_target = custom_target(\n+    custom_target(\n       command: [\n         xmlto,\n         '-m', '@INPUT0@',\n@@ -392,7 +391,7 @@ foreach manpage, category : manpages\n         'manpage-normal.xsl',\n         'manpage-bold-literal.xsl',\n       ],\n-      output: manpage_path,\n+      output: fs.stem(manpage) + '.' + category.to_string(),\n       install: true,\n       install_dir: get_option('mandir') / 'man' + category.to_string(),\n     )\n\n-- \n2.50.1.327.g047016eb4a.dirty\n\n"},{"id":"521614","messageId":"20250709-b4-pks-meson-cleanups-v3-5-29ab15b9ab85@pks.im","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im","subject":"[PATCH v3 5/8] meson: fix lookup of shell on MINGW64","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-09T06:23:39Z","receivedAt":"2025-07-09T06:23:58Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In 4cba20fbdc6 (meson: prefer shell at \"/bin/sh\", 2025-04-25) we have\naddressed an issue where the shell path embedded into Git was looked up\nvia PATH, which easily led to unportable shell paths other than the\nusual \"/bin/sh\" location. The fix was to simply add '/bin' to the search\npath explicitly, which made us prefer that directory over the PATH-based\nlookup.\n\nThis fix causes issues on MINGW64 though, which uses Windows-style\npaths. \"/bin\" is not an absolute Windows-style path, but Meson expects\nthe directories to be absolute. This leads to the following error:\n\n    meson.build:248:15: ERROR: Search directory /bin is not an absolute path.\n\nFix this by instead searching for both '/bin/sh' and 'sh', which also\ncauses us to prefer '/bin/sh' over a PATH-based lookup. Meson does\naccept that path alright on MINGW64, even though it's not an absolute\nWindows-style path, either.\n\nFurthermore, this continues to work alright with cross-files, as well,\nin case one wants to explicitly override the shell path:\n\n    $ meson setup build\n    ...\n      Runtime executable paths\n        perl       : /nix/store/gy10hw004rl2xfbfq41vnw0yb1w8rvbl-perl-5.40.0/bin/perl\n        python     : /nix/store/sd81bvmch7njdpwx3lkjslixcbj5mivz-python3-3.13.4/bin/python3\n        shell      : /bin/sh\n\n    $ cat >cross.ini <<-EOF\n    [binaries]\n    sh = '/nix/store/94lg0shvsfc845zy8gnflvpqxxiyijbz-bash-interactive-5.2p37/bin/bash'\n    EOF\n\n    $ meson setup build --cross-file=cross.ini --wipe\n    ...\n      Runtime executable paths\n        perl       : /nix/store/gy10hw004rl2xfbfq41vnw0yb1w8rvbl-perl-5.40.0/bin/perl\n        python     : /nix/store/sd81bvmch7njdpwx3lkjslixcbj5mivz-python3-3.13.4/bin/python3\n        shell      : /nix/store/94lg0shvsfc845zy8gnflvpqxxiyijbz-bash-interactive-5.2p37/bin/bash\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/meson.build b/meson.build\nindex 29d076bbaac..02d73188537 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -245,7 +245,7 @@ time = find_program('time', dirs: program_path, required: get_option('benchmarks\n # \"/bin/sh\" over a PATH-based lookup, which provides a working shell on most\n # supported systems. This path is also the default shell path used by our\n # Makefile. This lookup can be overridden via `program_path`.\n-target_shell = find_program('sh', dirs: program_path + [ '/bin' ], native: false)\n+target_shell = find_program('/bin/sh', 'sh', dirs: program_path, native: false)\n \n # Sanity-check that programs required for the build exist.\n foreach tool : ['cat', 'cut', 'grep', 'sort', 'tr', 'uname']\n\n-- \n2.50.1.327.g047016eb4a.dirty\n\n"},{"id":"521615","messageId":"20250709-b4-pks-meson-cleanups-v3-6-29ab15b9ab85@pks.im","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im","subject":"[PATCH v3 6/8] meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-09T06:23:40Z","receivedAt":"2025-07-09T06:24:01Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"In 837f637cf51 (meson.build: correct setting of GIT_EXEC_PATH,\n2025-05-19) we have fixed how we configure GIT_EXEC_PATH in some cases.\nIt was reported [1] though that this causes a new issue when overriding\nlibexecdir with `-Dlibexecdir=`:\n\n    $ meson setup -Dprefix=/tmp/git -Dlibexecdir=libexec-different\n    $ meson install\n    $ /tmp/git/bin/git --exec-path\n    /tmp/git/libexec-different\n    $ /tmp/git/bin/git daemon\n    git: 'daemon' is not a git command. See 'git --help'.\n\nWhile we correctly propagate the libexecdir to Git's GIT_EXEC_PATH, we\nforgot to append 'git-core'. Consequently, it cannot find its binaries\nanymore.\n\nFix this issue by appending 'git-core' to libexecdir. With this, things\nwork as expected:\n\n    $ meson install\n    $ /tmp/git/bin/git --exec-path\n    /tmp/git/libexec-different/git-core\n    $ /tmp/git/bin/git daemon -h\n    ...\n\n[1]: <66fd343a-1351-4350-83eb-c797e47b7693@gmail.com>\n\nReported-by: irecca.kun@gmail.com\nBased-on-patch-by: irecca.kun@gmail.com\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n meson.build | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/meson.build b/meson.build\nindex 02d73188537..ffb1bb61d4a 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -1599,7 +1599,7 @@ endif\n git_exec_path = 'libexec/git-core'\n libexec = get_option('libexecdir')\n if libexec != 'libexec' and libexec != '.'\n-  git_exec_path = libexec\n+  git_exec_path = libexec / 'git-core'\n endif\n \n if get_option('runtime_prefix')\n\n-- \n2.50.1.327.g047016eb4a.dirty\n\n"},{"id":"521616","messageId":"20250709-b4-pks-meson-cleanups-v3-7-29ab15b9ab85@pks.im","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im","subject":"[PATCH v3 7/8] meson: update subproject wrappers","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-09T06:23:41Z","receivedAt":"2025-07-09T06:24:05Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"Update subproject wrappers to newer versions by executing `meson wrap\nupdate` in the project's root directory\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n subprojects/expat.wrap | 18 +++++++++---------\n subprojects/pcre2.wrap | 18 +++++++++---------\n 2 files changed, 18 insertions(+), 18 deletions(-)\n\ndiff --git a/subprojects/expat.wrap b/subprojects/expat.wrap\nindex 2e0427dcfd1..0e9292f97bf 100644\n--- a/subprojects/expat.wrap\n+++ b/subprojects/expat.wrap\n@@ -1,13 +1,13 @@\n [wrap-file]\n-directory = expat-2.6.3\n-source_url = https://github.com/libexpat/libexpat/releases/download/R_2_6_3/expat-2.6.3.tar.xz\n-source_filename = expat-2.6.3.tar.bz2\n-source_hash = 274db254a6979bde5aad404763a704956940e465843f2a9bd9ed7af22e2c0efc\n-patch_filename = expat_2.6.3-1_patch.zip\n-patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.6.3-1/get_patch\n-patch_hash = cf017fbe105e31428b2768360bd9be39094df4e948a1e8d1c54b6f7c76460cb1\n-source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.6.3-1/expat-2.6.3.tar.bz2\n-wrapdb_version = 2.6.3-1\n+directory = expat-2.7.1\n+source_url = https://github.com/libexpat/libexpat/releases/download/R_2_7_1/expat-2.7.1.tar.xz\n+source_filename = expat-2.7.1.tar.bz2\n+source_hash = 354552544b8f99012e5062f7d570ec77f14b412a3ff5c7d8d0dae62c0d217c30\n+patch_filename = expat_2.7.1-1_patch.zip\n+patch_url = https://wrapdb.mesonbuild.com/v2/expat_2.7.1-1/get_patch\n+patch_hash = fe28cbbc427a7c9787d08b969ad54d19f59d8dd18294b4a18651cecfc789d4ef\n+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/expat_2.7.1-1/expat-2.7.1.tar.bz2\n+wrapdb_version = 2.7.1-1\n \n [provide]\n expat = expat_dep\ndiff --git a/subprojects/pcre2.wrap b/subprojects/pcre2.wrap\nindex 7e184472543..f45c968e2f3 100644\n--- a/subprojects/pcre2.wrap\n+++ b/subprojects/pcre2.wrap\n@@ -1,13 +1,13 @@\n [wrap-file]\n-directory = pcre2-10.44\n-source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/pcre2-10.44.tar.bz2\n-source_filename = pcre2-10.44.tar.bz2\n-source_hash = d34f02e113cf7193a1ebf2770d3ac527088d485d4e047ed10e5d217c6ef5de96\n-patch_filename = pcre2_10.44-2_patch.zip\n-patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.44-2/get_patch\n-patch_hash = 4336d422ee9043847e5e10dbbbd01940d4c9e5027f31ccdc33a7898a1ca94009\n-source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.44-2/pcre2-10.44.tar.bz2\n-wrapdb_version = 10.44-2\n+directory = pcre2-10.45\n+source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.45/pcre2-10.45.tar.bz2\n+source_filename = pcre2-10.45.tar.bz2\n+source_hash = 21547f3516120c75597e5b30a992e27a592a31950b5140e7b8bfde3f192033c4\n+patch_filename = pcre2_10.45-2_patch.zip\n+patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.45-2/get_patch\n+patch_hash = 7c6f34b703708652a404f9dc2769c67658c437b6043573295fa3428a9b7a6807\n+source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.45-2/pcre2-10.45.tar.bz2\n+wrapdb_version = 10.45-2\n \n [provide]\n libpcre2-8 = libpcre2_8\n\n-- \n2.50.1.327.g047016eb4a.dirty\n\n"},{"id":"521617","messageId":"20250709-b4-pks-meson-cleanups-v3-8-29ab15b9ab85@pks.im","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im","subject":"[PATCH v3 8/8] ci: use Meson's new `--slice` option","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2025-07-09T06:23:42Z","receivedAt":"2025-07-09T06:24:07Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"As executing our test suite is notoriously slow on Windows we use matrix\njobs in our CI systems to slice up tests and run them via multiple jobs.\nOn Meson this is done with a comparatively complex PowerShell invocation\nas Meson didn't yet have a native way to slice tests like this.\n\nI have upstreamed a new `--slice` option [1] that addresses this use\ncase though, which has been merged and released with Meson 1.8. Both\nGitLab and GitHub CI have Meson 1.8.2 available by now, so let's update\nthe jobs to use that new option.\n\n[1]: https://github.com/mesonbuild/meson/pull/14092\n\nSigned-off-by: Patrick Steinhardt <ps@pks.im>\n---\n .github/workflows/main.yml | 2 +-\n .gitlab-ci.yml             | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/.github/workflows/main.yml b/.github/workflows/main.yml\nindex 7dbf9f7f123..d122e79415a 100644\n--- a/.github/workflows/main.yml\n+++ b/.github/workflows/main.yml\n@@ -298,7 +298,7 @@ jobs:\n         path: build\n     - name: Test\n       shell: pwsh\n-      run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }\n+      run: meson test -C build --no-rebuild --print-errorlogs --slice \"$(1+${{ matrix.nr }})/10\"\n \n   regular:\n     name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})\ndiff --git a/.gitlab-ci.yml b/.gitlab-ci.yml\nindex bb6d5b976cd..af10ebb59a3 100644\n--- a/.gitlab-ci.yml\n+++ b/.gitlab-ci.yml\n@@ -178,7 +178,7 @@ test:msvc-meson:\n     - job: \"build:msvc-meson\"\n       artifacts: true\n   script:\n-    - meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } }\n+    - meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL\n   parallel: 10\n \n test:fuzz-smoke-tests:\n\n-- \n2.50.1.327.g047016eb4a.dirty\n\n"},{"id":"521684","messageId":"xmqqikk1pfiz.fsf@gitster.g","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-1-29ab15b9ab85@pks.im","subject":"Re: [PATCH v3 1/8] meson: stop discovering native version of Python","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-07-09T15:09:24Z","receivedAt":"2025-07-09T15:09:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> When Python features are enabled we search both for a native and\n> non-native version of Python. This is wrong though: we don't use Python\n> in our build process, so there is no need to search for it in the first\n> place.\n>\n> There is one location where we use the native version of Python, namely\n> when deciding whether or not we want to wire up git-p4(1). This check is\n> invalid though, as we shouldn't check for the build host to have Python,\n> but for the target host.\n>\n> Fix this invalid check to use the non-native version of Python and stop\n> searching for a native version of Python altogether.\n>\n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  meson.build | 12 +++++++-----\n>  1 file changed, 7 insertions(+), 5 deletions(-)\n\nThe above explains the reasoning very nicely.\n\n> -python = import('python').find_installation('python3', required: get_option('python'))\n> -target_python = find_program('python3', native: false, required: python.found())\n> -if python.found()\n> +# Python is not used for our build system, but exclusively for git-p4.\n> +# Consequently we only need to determine whether Python is available for the\n> +# build target.\n> +target_python = find_program('python3', native: false, required: get_option('python'))\n> +if target_python.found()\n>    build_options_config.set('NO_PYTHON', '')\n>  else\n>    libgit_c_args += '-DNO_PYTHON'\n\nWe ask explicitly for Python 3 here.\n\nDoes find_program() have some magic to deal with installations where\nPython3 is simply called /usr/bin/python (and worse yet, not as a\nsymbolic link to /usr/bin/python3)?\n\nI found\n\n    \"Since 0.50.0 if the \"python3\" program is requested and it is\n    not found in the system, Meson will return its current\n    interpreter\",\n\nwhich I suspect refers to the path to python3 used during the build\nand is not what we want, at\n\nhttps://mesonbuild.com/Reference-manual_functions.html#find_program\n\nwhich got me a bit worried.\n\nPerhaps everybody with Python3 has it at /usr/bin/python3 these\ndays, and my worries are unfounded? ;-)\n\nThanks.\n\n\n> @@ -1979,7 +1981,7 @@ if perl_features_enabled\n>    subdir('perl')\n>  endif\n>  \n> -if python.found()\n> +if target_python.found()\n>    scripts_python = [\n>      'git-p4.py'\n>    ]\n> @@ -2202,7 +2204,7 @@ summary({\n>    'iconv': iconv.found(),\n>    'pcre2': pcre2.found(),\n>    'perl': perl_features_enabled,\n> -  'python': python.found(),\n> +  'python': target_python.found(),\n>  }, section: 'Auto-detected features')\n>  \n>  summary({\n"},{"id":"521685","messageId":"xmqqcya9pf5o.fsf@gitster.g","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-2-29ab15b9ab85@pks.im","subject":"Re: [PATCH v3 2/8] meson: stop printing 'https' option twice in our summaries","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-07-09T15:17:23Z","receivedAt":"2025-07-09T15:17:25Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> The value for the 'https' backend option is printed twice: once via the\n> summary of auto-detected features and once via our summary of backends.\n> Drop it from the former summary.\n>\n> Signed-off-by: Patrick Steinhardt <ps@pks.im>\n> ---\n>  meson.build | 1 -\n>  1 file changed, 1 deletion(-)\n\nGood eyes.  To me the distinction between \"Auto-detected features\"\nand \"Backends\" feel a bit blurry, but most of the things in the\nformer are what dependency() returned, while https_backend is very\nmuch driven by custom code of ours, so removing from \"Auto-detected\"\ndoes make senseto me.\n\nThanks.\n\n\n> diff --git a/meson.build b/meson.build\n> index 4ee1a55b0bb..0ed00254ef3 100644\n> --- a/meson.build\n> +++ b/meson.build\n> @@ -2200,7 +2200,6 @@ summary({\n>    'expat': expat.found(),\n>    'gettext': intl.found(),\n>    'gitweb': gitweb_option.allowed(),\n> -  'https': https_backend,\n>    'iconv': iconv.found(),\n>    'pcre2': pcre2.found(),\n>    'perl': perl_features_enabled,\n"},{"id":"521712","messageId":"mku4cmu4tgib637ptpile5nch72cr55565o6oyaxjklc756j4c@63zony3qdzio","threadId":"63735","inReplyTo":"xmqqikk1pfiz.fsf@gitster.g","subject":"Re: [PATCH v3 1/8] meson: stop discovering native version of Python","fromName":"Justin Tobler","fromEmail":"jltobler@gmail.com","sentAt":"2025-07-09T21:36:10Z","receivedAt":"2025-07-09T21:41:47Z","isPatch":true,"sender":{"key":"jltobler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/53454972?v=4"},"body":"On 25/07/09 08:09AM, Junio C Hamano wrote:\n> Patrick Steinhardt <ps@pks.im> writes:\n> > -python = import('python').find_installation('python3', required: get_option('python'))\n> > -target_python = find_program('python3', native: false, required: python.found())\n> > -if python.found()\n> > +# Python is not used for our build system, but exclusively for git-p4.\n> > +# Consequently we only need to determine whether Python is available for the\n> > +# build target.\n> > +target_python = find_program('python3', native: false, required: get_option('python'))\n> > +if target_python.found()\n> >    build_options_config.set('NO_PYTHON', '')\n> >  else\n> >    libgit_c_args += '-DNO_PYTHON'\n> \n> We ask explicitly for Python 3 here.\n> \n> Does find_program() have some magic to deal with installations where\n> Python3 is simply called /usr/bin/python (and worse yet, not as a\n> symbolic link to /usr/bin/python3)?\n\nMy understanding is that find_program() won't do anything in this case.\nI would imagine if the target host has Python3 in a non-standard\nlocation, there would probably need to be a cross-file that defines it.\n\n> I found\n> \n>     \"Since 0.50.0 if the \"python3\" program is requested and it is\n>     not found in the system, Meson will return its current\n>     interpreter\",\n> \n> which I suspect refers to the path to python3 used during the build\n> and is not what we want, at\n> \n> https://mesonbuild.com/Reference-manual_functions.html#find_program\n> \n> which got me a bit worried.\n\nAs you mentioned, I think this is only relevant for Python scipts\nexecuted at build time.\n\n-Justin\n"},{"id":"521713","messageId":"wrbw52vfpzhewh2ocarlh3et7kkvso3n7cmy47uw2vv4u7zgyw@blc6negzqkrv","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-0-29ab15b9ab85@pks.im","subject":"Re: [PATCH v3 0/8] A handful of Meson cleanups and improvements","fromName":"Justin Tobler","fromEmail":"jltobler@gmail.com","sentAt":"2025-07-09T21:37:08Z","receivedAt":"2025-07-09T21:42:45Z","isPatch":true,"sender":{"key":"jltobler@gmail.com","avatar":"https://avatars.githubusercontent.com/u/53454972?v=4"},"body":"On 25/07/09 08:23AM, Patrick Steinhardt wrote:\n> Hi,\n> \n> this patch series contains a couple of more-or-less random cleanups and\n> improvements for Meson that I have accumulated over the last two months.\n> \n> Changes in v2:\n>   - Fix an off-by-one error for test slices used in GitHub Workflows.\n>   - Now tested with both GitLab (https://gitlab.com/gitlab-org/git/-/merge_requests/375)\n>     and GitHub (https://github.com/git/git/pull/2010).\n>   - Link to v1: https://lore.kernel.org/r/20250703-b4-pks-meson-cleanups-v1-0-2804c2932abe@pks.im\n> \n> Changes in v3:\n>   - Add a comment explaining why we only need to search for Python on\n>     the build target.\n>   - Link to v2: https://lore.kernel.org/r/20250708-b4-pks-meson-cleanups-v2-0-94ac53cd4b95@pks.im\n\nThanks Patrick! From the range-diff, this version looks good to me :)\n\n-Justin\n"},{"id":"521717","messageId":"1664d442-7985-41b7-9391-78f78ece7601@gentoo.org","threadId":"63735","inReplyTo":"xmqqikk1pfiz.fsf@gitster.g","subject":"Re: [PATCH v3 1/8] meson: stop discovering native version of Python","fromName":"Eli Schwartz","fromEmail":"eschwartz@gentoo.org","sentAt":"2025-07-09T22:22:46Z","receivedAt":"2025-07-09T22:22:50Z","isPatch":true,"sender":{"key":"eschwartz@gentoo.org","avatar":"https://avatars.githubusercontent.com/u/6551424?v=4"},"body":"On 7/9/25 11:09 AM, Junio C Hamano wrote:\n\n>> -python = import('python').find_installation('python3', required: get_option('python'))\n>> -target_python = find_program('python3', native: false, required: python.found())\n>> -if python.found()\n>> +# Python is not used for our build system, but exclusively for git-p4.\n>> +# Consequently we only need to determine whether Python is available for the\n>> +# build target.\n>> +target_python = find_program('python3', native: false, required: get_option('python'))\n>> +if target_python.found()\n>>    build_options_config.set('NO_PYTHON', '')\n>>  else\n>>    libgit_c_args += '-DNO_PYTHON'\n> \n> We ask explicitly for Python 3 here.\n> \n> Does find_program() have some magic to deal with installations where\n> Python3 is simply called /usr/bin/python (and worse yet, not as a\n> symbolic link to /usr/bin/python3)?\n> \n> I found\n> \n>     \"Since 0.50.0 if the \"python3\" program is requested and it is\n>     not found in the system, Meson will return its current\n>     interpreter\",\n> \n> which I suspect refers to the path to python3 used during the build\n> and is not what we want, at\n> \n> https://mesonbuild.com/Reference-manual_functions.html#find_program\n> \n> which got me a bit worried.\n\n\nWell, this patch doesn't really change that. But a cross compile where\nbuild != host and thus the build meson and build python don't represent\nthe host `git`, already needs a cross env setup to define the right C\ncompiler which can produce host binaries, and that's where you'd define\nthe host python too.\n\n[binaries]\nc = 'usr/bin/aarch64-linux-gnu-gcc'\n\n# we have python 3.13, but our cross target is really old\npython3 = '/usr/bin/python3.6'\n\n\n> Perhaps everybody with Python3 has it at /usr/bin/python3 these\n> days, and my worries are unfounded? ;-)\n> \n> Thanks.\n\n\nPython installs as python3.13 or some other major.minor version.\n\"python3\" is a symlink to that.\n\n\"python\" may be a symlink to python 2.x, or 3.x, or not exist at all. I\nam not aware of *any* scenario where a distributor has re-packaged\nPython, \"python\" exists on PATH and is a real Python 3.x interpreter,\nbut \"python3\" doesn't exist.\n\nI am not aware of this ever being an existing real world scenario in the\npast, either -- it is not a \"we no longer live in the bad old days\"\nscenario.\n\nThe only big change to how people deploy python was around the\nunversioned \"python\" name.\n\nSince 1996 and earlier, \"python\" was a symlink pointing to the \"full\"\nname, \"python1.4\". The full name was created by \"make altinstall\".\n\nAnd \"make install\" had a Makefile dependency on \"altinstall\", and then\nadditionally created symlinks. You could run \"install\" for a full\ndefault install, or \"altinstall\" if you wanted to install multiple\nversions side by side.\n\nPython 3.x originally didn't create a \"python\" symlink, only a \"python3\"\nsymlink, because too many people would have scripts running \"python\" and\nexpect it to be version 2.x; this problem obviously never existed for\n\"python3\", as having the major version was new for \"python3\" and indeed\nthe whole point of adding a new \"prog{MAJORVERSION}\" was to avoid\nconfusing versions 2.x and 3.x\n\nAnyways, yes, it is in my reasonably knowledgeable opinion flat out\n*impossible* for\n\n\nfind_program('python')\n\nto ever be a good idea when you could do\n\nfind_program('python3')\n\nThe former will correctly work in a strict subset of cases that the\nlatter already works; in some cases it seems to work but returns a bad\nprogram; in some cases it fails but using the right name would work.\n\n\n-- \nEli Schwartz\n"},{"id":"521719","messageId":"xmqqy0sx9ee2.fsf@gitster.g","threadId":"63735","inReplyTo":"1664d442-7985-41b7-9391-78f78ece7601@gentoo.org","subject":"Re: [PATCH v3 1/8] meson: stop discovering native version of Python","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-07-09T22:40:37Z","receivedAt":"2025-07-09T22:40:41Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Eli Schwartz <eschwartz@gentoo.org> writes:\n\n> \"python\" may be a symlink to python 2.x, or 3.x, or not exist at all. I\n> am not aware of *any* scenario where a distributor has re-packaged\n> Python, \"python\" exists on PATH and is a real Python 3.x interpreter,\n> but \"python3\" doesn't exist.\n>\n> I am not aware of this ever being an existing real world scenario in the\n> past, either -- it is not a \"we no longer live in the bad old days\"\n> scenario.\n\nGood.  Thanks.\n"},{"id":"521754","messageId":"87h5zkcbk2.fsf@iotcl.com","threadId":"63735","inReplyTo":"20250709-b4-pks-meson-cleanups-v3-3-29ab15b9ab85@pks.im","subject":"Re: [PATCH v3 3/8] meson: improve summary of auto-detected features","fromName":"Toon Claes","fromEmail":"toon@iotcl.com","sentAt":"2025-07-10T15:25:49Z","receivedAt":"2025-07-10T15:26:02Z","isPatch":true,"sender":{"key":"toon@iotcl.com","avatar":"https://avatars.githubusercontent.com/u/121621?v=4"},"body":"Patrick Steinhardt <ps@pks.im> writes:\n\n> The summary of auto-detected features prints a boolean for every option\n> to tell the user whether or not the feature has been auto-enabled or\n> not. This summary can be improved though, as in some cases this boolean\n> is derived from a dependency. So if we pass in the dependency directly,\n> then Meson knows to both print a boolean and, if the dependency was\n> found, it also prints a version number.\n>\n> Adapt the code accordingly and enable `bool_yn` so that actual booleans\n> are formatted similarly to dependencies. Before this change:\n>\n>   Auto-detected features\n>     benchmarks      : true\n>     curl            : true\n>     expat           : true\n>     gettext         : true\n>     gitweb          : true\n>     iconv           : true\n>     pcre2           : true\n>     perl            : true\n>     python          : true\n>\n> And after this change, we now see the version numbers as expected:\n>\n>   Auto-detected features\n>     benchmarks      : YES\n>     curl            : YES 8.14.1\n>     expat           : YES 2.7.1\n>     gettext         : YES\n>     gitweb          : YES\n>     iconv           : YES\n>     pcre2           : YES 10.44\n>     perl            : YES\n>     python          : YES\n>\n> Note that this change also enables colorization of the boolean options,\n> green for \"YES\" and red for \"NO\".\n\nNice, I'm really liking this change.\n\nI've also reviewed the rest of the patches, and all looks good to me.\n\n-- \nCheers,\nToon\n"},{"id":"521764","messageId":"xmqqqzyo6mkv.fsf@gitster.g","threadId":"63735","inReplyTo":"87h5zkcbk2.fsf@iotcl.com","subject":"Re: [PATCH v3 3/8] meson: improve summary of auto-detected features","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-07-10T16:24:16Z","receivedAt":"2025-07-10T16:24:19Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Toon Claes <toon@iotcl.com> writes:\n\n> Patrick Steinhardt <ps@pks.im> writes:\n>\n>> The summary of auto-detected features prints a boolean for every option\n>> to tell the user whether or not the feature has been auto-enabled or\n>> not. This summary can be improved though, as in some cases this boolean\n>> is derived from a dependency. So if we pass in the dependency directly,\n>> then Meson knows to both print a boolean and, if the dependency was\n>> found, it also prints a version number.\n>>\n>> Adapt the code accordingly and enable `bool_yn` so that actual booleans\n>> are formatted similarly to dependencies. Before this change:\n>>\n>>   Auto-detected features\n>>     benchmarks      : true\n>>     curl            : true\n>>     expat           : true\n>>     gettext         : true\n>>     gitweb          : true\n>>     iconv           : true\n>>     pcre2           : true\n>>     perl            : true\n>>     python          : true\n>>\n>> And after this change, we now see the version numbers as expected:\n>>\n>>   Auto-detected features\n>>     benchmarks      : YES\n>>     curl            : YES 8.14.1\n>>     expat           : YES 2.7.1\n>>     gettext         : YES\n>>     gitweb          : YES\n>>     iconv           : YES\n>>     pcre2           : YES 10.44\n>>     perl            : YES\n>>     python          : YES\n>>\n>> Note that this change also enables colorization of the boolean options,\n>> green for \"YES\" and red for \"NO\".\n>\n> Nice, I'm really liking this change.\n>\n> I've also reviewed the rest of the patches, and all looks good to me.\n\nThanks.\n"}]}