git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [-SPAM-] [PATCH RFC v7 00/22] Modernize the build system

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Nov 16, 2024, 01:23 UTC
Message-ID
<b9e0f631-b2a3-4c48-8745-a4b1e3f58ad0@ramsayjones.plus.com>
In-Reply-To
<20241115-pks-meson-v7-0-47ec19b780b2@pks.im>

On 15/11/2024 07:21, Patrick Steinhardt wrote: [snip]

Show 23 quoted lines
> Changes in v7:
> 
>   - Fix overriding TEST_OUTPUT_DIRECTORY via the environment.
> 
>   - Rework generation of version information. GIT-VERSION-GEN now knows
>     to replace @PLACEHOLDERS@ in other files, and this gets used across
>     Makefiles, CMake and Meson now. This makes us properly rebuild when
>     the version info changes and fixes the version numbers in "git.rc".
> 
>   - The CMake build instructions are now doing a proper out-of-tree
>     build.
> 
>   - We now generate and install gitweb.js, which gets built via a new
>     "generate-gitweb-js.sh".
> 
>   - Some improvements to the Meson documentation.
> 
>   - Wire up DEVELOPER=1 style warnings via `--warnlevel 2` and above.
> 
>   - Wire up sanitizers properly.
> 
>   - Provide a new "regex" option to disable the platform-provided
>     version of regcomp() et al.
Hmm, OK, but what about all the other 'configurations'?
Show 13 quoted lines
> 
>   - Stop installing git-http-backend into bindir.
> 
>   - Install Perl scripts into libexecdir.
> 
>   - Install git-cvsserver into bindir and libexecdir.
> 
>   - Install template directory into datadir.
> 
> As before, the tip of this patch series catches up with what is
> happening in "seen". If you want to test it without topics in "seen" you
> have to revert it.
> 

Just a quick note to say that I tested this on Linux and Cygwin (just build) and noticed a few things:

  - 'make clean' does not delete the 'version-def.h' file.
  - the RUNTIME_PREFIX set in the GIT-BUILD-OPTIONS file on the master
    branch is not the same as on this 'meson-v7' branch (patches 1-21
    based on current master branch):
    $ diff GBO-master GIT-BUILD-OPTIONS
    3a4,5
    > PERL_LOCALEDIR='/home/ramsay/share/locale'
    > NO_PERL_CPAN_FALLBACKS=''
    19a22,28
    > FSMONITOR_DAEMON_BACKEND=''
    > FSMONITOR_OS_SETTINGS=''
    > TEST_OUTPUT_DIRECTORY=''
    > GIT_TEST_OPTS=''
    > GIT_TEST_CMP=''
    > GIT_TEST_CMP_USE_COPIED_CONTEXT=''
    > GIT_TEST_UTF8_LOCALE=''
    20a30,36
    > GIT_PERF_REPEAT_COUNT=''
    > GIT_PERF_REPO=''
    > GIT_PERF_LARGE_REPO=''
    > GIT_PERF_MAKE_OPTS=''
    > GIT_PERF_MAKE_COMMAND=''
    > GIT_INTEROP_MAKE_OPTS=''
    > GIT_TEST_INDEX_VERSION=''
    22c38,47
    < RUNTIME_PREFIX='false'
    ---
    > GIT_TEST_TEXTDOMAINDIR='/home/ramsay/git/po/build/locale'
    > GIT_TEST_POPATH='/home/ramsay/git/po'
    > GIT_TEST_TEMPLATE_DIR='/home/ramsay/git/templates/blt'
    > GIT_TEST_GITPERLLIB='/home/ramsay/git/perl/build/lib'
    > GIT_TEST_MERGE_TOOLS_DIR='/home/ramsay/git/mergetools'
    > RUNTIME_PREFIX=''
    > GITWEBDIR='/home/ramsay/share/gitweb'
    > USE_GETTEXT_SCHEME=''
    > LOCALEDIR='/home/ramsay/share/locale'
    > BROKEN_PATH_FIX='/^# @BROKEN_PATH_FIX@$/d'
    $ 

Note that master has RUNTIME_PREFIX='false' rather than being un-set. (Indeed, the Makefile on the master branch normalizes the value of RUNTIME_PREFIX to 'true' or 'false').

    - I used the new 'regex' variable, on cygwin, like so:
    $ meson setup .. -Dprefix=$HOME -Dregex=disabled
    after first trying '-Dregex' and then '-Dregex=1', because why not? ;)
    This correctly set NO_REGEX=1 in the build.
    - As a result of the above, the grep-binary test now behaves the same
      way as on Linux (ie that test now 'fails' instead of unexpectedly
      passing). Note:
    $ meson test 't7815-*'
    ninja: Entering directory `/home/ramsay/git/build'
    [2/9] Generating GIT-VERSION-FILE with a custom command
    1/1 t7815-grep-binary        OK              7.55s
    Ok:                 1   
    Expected Fail:      0   
    Fail:               0   
    Unexpected Pass:    0   
    Skipped:            0   
    Timeout:            0   
    Full log written to /home/ramsay/git/build/meson-logs/testlog.txt
    $ vim meson-logs/testlog.txt # test 12 again '# TODO known breakage'
    $ 
    - The format of the GIT-BUILD-OPTIONS file generated by the Makefile
      and meson are formatted differently, so you have to massage the
      top-level file to be able to diff them:
    $ sed -e 's/\x27\x27//' GIT-BUILD-OPTIONS |
    > sed -e 's/\x27/"/g' >GBO
    $ diff GBO build/GIT-BUILD-OPTIONS 
    1,2c1,2
    < SHELL_PATH="/bin/sh"
    < TEST_SHELL_PATH="/bin/sh"
    ---
    > SHELL_PATH="/usr/bin/sh"
    > TEST_SHELL_PATH="/usr/bin/sh"
    6c6
    < DIFF="diff"
    ---
    > DIFF="/usr/bin/diff"
    8c8
    < TAR="tar"
    ---
    > TAR="/usr/bin/tar"
    12c12
    < USE_LIBPCRE2=
    ---
    > USE_LIBPCRE2=1
    21,24c21,24
    < X=
    < FSMONITOR_DAEMON_BACKEND=
    < FSMONITOR_OS_SETTINGS=
    < TEST_OUTPUT_DIRECTORY=
    ---
    > X=""
    > FSMONITOR_DAEMON_BACKEND=""
    > FSMONITOR_OS_SETTINGS=""
    > TEST_OUTPUT_DIRECTORY="/home/ramsay/git/build/test-output"
    26c26
    < GIT_TEST_CMP=
    ---
    > GIT_TEST_CMP="/usr/bin/diff -u"
    37,38c37,38
    < GIT_TEST_PERL_FATAL_WARNINGS="YesPlease"
    < GIT_TEST_TEXTDOMAINDIR="/home/ramsay/git/po/build/locale"
    ---
    > GIT_TEST_PERL_FATAL_WARNINGS=
    > GIT_TEST_TEXTDOMAINDIR="/home/ramsay/git/build/po"
    40,41c40,41
    < GIT_TEST_TEMPLATE_DIR="/home/ramsay/git/templates/blt"
    < GIT_TEST_GITPERLLIB="/home/ramsay/git/perl/build/lib"
    ---
    > GIT_TEST_TEMPLATE_DIR="/home/ramsay/git/build/templates"
    > GIT_TEST_GITPERLLIB="/home/ramsay/git/build/perl"
    44c44
    < GITWEBDIR="/home/ramsay/share/gitweb"
    ---
    > GITWEBDIR=/home/ramsay/share/gitweb
    47c47
    < BROKEN_PATH_FIX="/^# @BROKEN_PATH_FIX@$/d"
    ---
    > BROKEN_PATH_FIX=
    $ 

Note that the Makefile build on Linux does not, by default, build with libpcre, even if the library is installed on the system (as it is for me). Also, note the values of BROKEN_PATH_FIX.

[This was on Linux; cygwin is similar but not identical]

ATB, Ramsay Jones

    
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 27 of 31 in “Modernize the build system”
  1. 00/22 Modernize the build systemPatrick Steinhardt, Nov 15, 2024
  2. 01/22 Makefile: use common template for GIT-BUILD-OPTIONSPatrick Steinhardt, Nov 15, 2024
  3. 02/22 Makefile: consistently use @PLACEHOLDER@ to substitutePatrick Steinhardt, Nov 15, 2024
  4. 03/22 Makefile: refactor GIT-VERSION-GEN to be reusablePatrick Steinhardt, Nov 15, 2024
  5. 04/22 Makefile: propagate Git version via generated headerPatrick Steinhardt, Nov 15, 2024
  6. 05/22 Makefile: generate "git.rc" via GIT-VERSION-GENPatrick Steinhardt, Nov 15, 2024
  7. 06/22 Makefile: consistently use PERL_PATHPatrick Steinhardt, Nov 15, 2024
  8. 07/22 Makefile: extract script to massage Perl scriptsPatrick Steinhardt, Nov 15, 2024
  9. 08/22 Makefile: use "generate-perl.sh" to massage Perl libraryPatrick Steinhardt, Nov 15, 2024
  10. 10/22 Makefile: extract script to generate gitweb.cgiPatrick Steinhardt, Nov 15, 2024
  11. 09/22 Makefile: extract script to massage Shell scriptsPatrick Steinhardt, Nov 15, 2024
  12. 11/22 Makefile: extract script to generate gitweb.jsPatrick Steinhardt, Nov 15, 2024
  13. 12/22 Makefile: refactor generators to be PWD-independentPatrick Steinhardt, Nov 15, 2024
  14. 13/22 Makefile: allow "bin-wrappers/" directory to existPatrick Steinhardt, Nov 15, 2024
  15. 14/22 Makefile: simplify building of templatesPatrick Steinhardt, Nov 15, 2024
  16. 16/22 Documentation: teach "cmd-list.perl" about out-of-tree buildsPatrick Steinhardt, Nov 15, 2024
  17. 15/22 Documentation: allow sourcing generated includes from separate dirPatrick Steinhardt, Nov 15, 2024
  18. 17/22 Documentation: extract script to generate a list of mergetoolsPatrick Steinhardt, Nov 15, 2024
  19. 19/22 t: allow overriding build dirPatrick Steinhardt, Nov 15, 2024
  20. 18/22 t: better support for out-of-tree buildsPatrick Steinhardt, Nov 15, 2024
  21. 20/22 Documentation: add comparison of build systemsPatrick Steinhardt, Nov 15, 2024
  22. 21/22 Introduce support for the Meson build systemPatrick Steinhardt, Nov 15, 2024
  23. Christian CouderNov 15, 2024
  24. Patrick SteinhardtNov 18, 2024
  25. 22/22 meson: fix conflicts with in-flight topicsPatrick Steinhardt, Nov 15, 2024
  26. Patrick SteinhardtNov 15, 2024
  27. Ramsay JonesNov 16, 2024
  28. Patrick SteinhardtNov 18, 2024
  29. Junio C HamanoNov 18, 2024
  30. Patrick SteinhardtNov 18, 2024
  31. Junio C HamanoNov 18, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.