mbox series

[v2,00/10] meson: wire up bits and pieces from "contrib/"

Message ID 20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im (mailing list archive)
Headers show
Series meson: wire up bits and pieces from "contrib/" | expand

Message

Patrick Steinhardt Feb. 19, 2025, 1:13 p.m. UTC
Hi,

this patch series wires up a couple more bits and pieces, mostly from
"contrib/". Included are:

  - The "libsecret", "netrc", "osxkeychain" and "wincred" credential
    helpers.

  - The git-contact(1) script.

  - Coccinelle via a new "coccicheck" target that generates the semantic
    check.

Not a lot of stuff is missing after this small patch series, as far as I
am aware. Omissions that I know of include "git-gui", "sparse" and perf
tests.

This patch series supersedes Mirth's patch series at [1]. I have picked
the compilation fix for MSVC from that series and retained authorship,
but with an amended commit message. I've also forged the SOB -- Mirth,
please let me know whether you're okay with this.

Changes in v2:
  - Dropped the gitk-related parts. I have instead created a pull
    request for gitk at https://github.com/j6t/gitk/pull/8.
  - Link to v1: https://lore.kernel.org/r/20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im

Thanks!

Patrick

[1]: <pull.1859.git.1739471859.gitgitgadget@gmail.com>

---
M Hickford (1):
      contrib/credential: fix compilation of wincred helper with MSVC

Patrick Steinhardt (9):
      GIT-BUILD-OPTIONS: propagate project's source directory
      contrib/credential: fix "netrc" tests with out-of-tree builds
      contrib/credential: fix compiling "libsecret" helper
      contrib/credential: fix compilation of "osxkeychain" helper
      meson: wire up credential helpers
      meson: wire up git-contacts(1)
      meson: wire up static analysis via Coccinelle
      ci: fix propagating UTF-8 test locale in musl-based Meson job
      ci: exercise credential helpers

 .github/workflows/main.yml                         |  2 +-
 .gitlab-ci.yml                                     |  2 +-
 GIT-BUILD-OPTIONS.in                               |  3 +-
 Makefile                                           |  3 +-
 ci/install-dependencies.sh                         |  2 +-
 ci/lib.sh                                          | 10 ++-
 contrib/buildsystems/CMakeLists.txt                |  3 +-
 contrib/coccinelle/meson.build                     | 89 ++++++++++++++++++++++
 contrib/contacts/meson.build                       | 55 +++++++++++++
 .../libsecret/git-credential-libsecret.c           | 10 +--
 contrib/credential/libsecret/meson.build           |  9 +++
 contrib/credential/meson.build                     |  3 +
 contrib/credential/netrc/meson.build               | 20 +++++
 contrib/credential/netrc/t-git-credential-netrc.sh |  2 +-
 contrib/credential/netrc/test.pl                   |  7 +-
 .../osxkeychain/git-credential-osxkeychain.c       |  2 +-
 contrib/credential/osxkeychain/meson.build         |  9 +++
 .../credential/wincred/git-credential-wincred.c    |  2 +
 contrib/credential/wincred/meson.build             |  5 ++
 contrib/meson.build                                |  3 +
 meson.build                                        |  5 +-
 meson_options.txt                                  |  6 +-
 t/lib-gettext.sh                                   |  2 +-
 t/t7609-mergetool--lib.sh                          |  2 +-
 24 files changed, 229 insertions(+), 27 deletions(-)

Range-diff versus v1:

 1:  f038c1b6a45 =  1:  1cbc7a0a2e3 GIT-BUILD-OPTIONS: propagate project's source directory
 2:  493714b2599 =  2:  7b280db6c74 contrib/credential: fix "netrc" tests with out-of-tree builds
 3:  6ca34876222 =  3:  63932bfaca2 contrib/credential: fix compilation of wincred helper with MSVC
 4:  f8004e550e3 =  4:  6f8bdb62e00 contrib/credential: fix compiling "libsecret" helper
 5:  56eaee681fb =  5:  cd01c7cdb28 contrib/credential: fix compilation of "osxkeychain" helper
 6:  fb06e907359 =  6:  2827ed818cc meson: wire up credential helpers
 7:  1720a22498c =  7:  84d5d994674 meson: wire up git-contacts(1)
 8:  d35fe9c7f1f =  8:  9a1a44e9db8 meson: wire up static analysis via Coccinelle
 9:  f3756bea4d2 <  -:  ----------- gitk: extract script to build Gitk
10:  091def75331 <  -:  ----------- meson: wire up Gitk
11:  5a6adc0c756 =  9:  05b11300b60 ci: fix propagating UTF-8 test locale in musl-based Meson job
12:  fdf80deb16a = 10:  92fa0c76c2b ci: exercise credential helpers

---
base-commit: 03944513488db4a81fdb4c21c3b515e4cb260b05
change-id: 20250206-b4-pks-meson-contrib-5d9b3a5d0830

Comments

Ramsay Jones Feb. 20, 2025, 1:25 a.m. UTC | #1
On 19/02/2025 13:13, Patrick Steinhardt wrote:
> Hi,
> 
> this patch series wires up a couple more bits and pieces, mostly from
> "contrib/". Included are:
> 
>   - The "libsecret", "netrc", "osxkeychain" and "wincred" credential
>     helpers.
> 
>   - The git-contact(1) script.
> 
>   - Coccinelle via a new "coccicheck" target that generates the semantic
>     check.
> 
> Not a lot of stuff is missing after this small patch series, as far as I
> am aware. Omissions that I know of include "git-gui", "sparse" and perf
> tests.

I regularly do 'make sparse' and 'make hdr-check' as part of my routine.

Note that ci/run-static-analysis.sh uses several targets:

  ci/run-static-analysis.sh:8:make coccicheck
  ci/run-static-analysis.sh:29:make hdr-check ||
  ci/run-static-analysis.sh:32:make check-pot

  ... and ci/test-documentation.sh some more:

  ci/test-documentation.sh:18:make check-builtins
  ci/test-documentation.sh:19:make check-docs

  ... and then there are some coverage targets like 'coverage-test' and
'coverage-report' (I haven't actually used them in decades ... ;) ).

ATB,
Ramsay Jones
Patrick Steinhardt Feb. 20, 2025, 6:25 a.m. UTC | #2
On Thu, Feb 20, 2025 at 01:25:59AM +0000, Ramsay Jones wrote:
> 
> 
> On 19/02/2025 13:13, Patrick Steinhardt wrote:
> > Hi,
> > 
> > this patch series wires up a couple more bits and pieces, mostly from
> > "contrib/". Included are:
> > 
> >   - The "libsecret", "netrc", "osxkeychain" and "wincred" credential
> >     helpers.
> > 
> >   - The git-contact(1) script.
> > 
> >   - Coccinelle via a new "coccicheck" target that generates the semantic
> >     check.
> > 
> > Not a lot of stuff is missing after this small patch series, as far as I
> > am aware. Omissions that I know of include "git-gui", "sparse" and perf
> > tests.
> 
> I regularly do 'make sparse' and 'make hdr-check' as part of my routine.
> 
> Note that ci/run-static-analysis.sh uses several targets:
> 
>   ci/run-static-analysis.sh:8:make coccicheck
>   ci/run-static-analysis.sh:29:make hdr-check ||
>   ci/run-static-analysis.sh:32:make check-pot
> 
>   ... and ci/test-documentation.sh some more:
> 
>   ci/test-documentation.sh:18:make check-builtins
>   ci/test-documentation.sh:19:make check-docs
> 
>   ... and then there are some coverage targets like 'coverage-test' and
> 'coverage-report' (I haven't actually used them in decades ... ;) ).

Ah, `make hdr-check` is something I forgot about indeed, yes. I guess
introducing those two targets will be one of the next patch series then
once the current patch series both land.

Coverage reports are something that Meson already does natively:

    meson setup build -Db_coverage=true
    meson compile -C build
    meson test -C build
    ninja -C build coverage-html

Patrick
Ramsay Jones Feb. 21, 2025, 7:50 p.m. UTC | #3
On 20/02/2025 06:25, Patrick Steinhardt wrote:
[snip]
> Coverage reports are something that Meson already does natively:
> 
>     meson setup build -Db_coverage=true
>     meson compile -C build
>     meson test -C build
>     ninja -C build coverage-html

I just tried this (I had to install 'gcovr' first) and the results
look pretty good:

  ...

  $ ninja -C build coverage-html
  ninja: Entering directory `build'
  [1/1] Generates HTML coverage report
  Ubuntu LLVM version 18.1.3
    Optimized build.
  (INFO) Reading coverage data...
  (INFO) Writing coverage report...
  lines: 85.2% (144103 out of 169233)
  functions: 93.3% (10404 out of 11151)
  branches: 76.0% (78627 out of 103419)

  Html coverage report can be found at file:///home/ramsay/git/build/meson-logs/coveragereport/index.html
  $ 

:)

[Although I have worked on projects where some of those numbers would have
been considered too low! :( ]


ATB,
Ramsay Jones