From fade8f074e52f491808da93e4782376969309a17 Mon Sep 17 00:00:00 2001 From: Thomas Uhle Date: Wed, 5 Nov 2025 20:55:19 +0100 Subject: [PATCH 1/4] wincred: align Makefile with other Makefiles in contrib * Replace $(LOADLIBES) because it is deprecated since long and it is used nowhere else in the git project. * Use $(gitexecdir) instead of $(libexecdir) because config.mak defines $(libexecdir) as $(prefix)/libexec, not as $(prefix)/libexec/git-core. * Similar to other Makefiles, let install target rule create $(gitexecdir) to make sure the directory exists before copying the executable and also let it respect $(DESTDIR). * Shuffle the lines for the default settings to align them with the other Makefiles in contrib/credential. * Define .PHONY for all special targets (all, install, clean). Signed-off-by: Thomas Uhle Acked-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- contrib/credential/wincred/Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/contrib/credential/wincred/Makefile b/contrib/credential/wincred/Makefile index 5b795fc9fe0cc8..d92e721e249beb 100644 --- a/contrib/credential/wincred/Makefile +++ b/contrib/credential/wincred/Makefile @@ -4,20 +4,22 @@ all:: git-credential-wincred.exe -include ../../../config.mak.autogen -include ../../../config.mak -CC ?= gcc -RM ?= rm -f -CFLAGS ?= -O2 -Wall - prefix ?= /usr/local -libexecdir ?= $(prefix)/libexec/git-core +gitexecdir ?= $(prefix)/libexec/git-core +CC ?= gcc +CFLAGS ?= -O2 -Wall INSTALL ?= install +RM ?= rm -f -git-credential-wincred.exe : git-credential-wincred.c - $(LINK.c) $^ $(LOADLIBES) $(LDLIBS) -o $@ +git-credential-wincred.exe: git-credential-wincred.c + $(LINK.c) -o $@ $^ $(LDFLAGS) $(LDLIBS) install: git-credential-wincred.exe - $(INSTALL) -m 755 $^ $(libexecdir) + $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir) + $(INSTALL) -m 755 $< $(DESTDIR)$(gitexecdir) clean: $(RM) git-credential-wincred.exe + +.PHONY: all install clean From 38419bdd45e6fb872383f151b337f030ed30cbb4 Mon Sep 17 00:00:00 2001 From: "D. Ben Knoble" Date: Tue, 4 Nov 2025 13:14:57 -0500 Subject: [PATCH 2/4] perl: also mark git-contacts executable When installing git-contacts with Meson via -Dcontrib=contacts, the default Perl generation fails to mark it executable. As a result, "git contacts" reports "'contacts' is not a git command." Unlike generate-script.sh, we aren't testing the basename here; so, glob the script name in the case arm to match wherever the input comes from. Signed-off-by: D. Ben Knoble Signed-off-by: Junio C Hamano --- generate-perl.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate-perl.sh b/generate-perl.sh index 65f122ebfc76dc..796d8359327f44 100755 --- a/generate-perl.sh +++ b/generate-perl.sh @@ -30,7 +30,7 @@ sed -e '1{' \ "$INPUT" >"$OUTPUT" case "$INPUT" in -*.perl) +*.perl|*git-contacts) chmod a+x "$OUTPUT";; *) ;; From d63417e3ad67e5857cd52f9177fe39719d6ac84a Mon Sep 17 00:00:00 2001 From: "D. Ben Knoble" Date: Tue, 4 Nov 2025 08:58:29 -0500 Subject: [PATCH 3/4] meson: make GIT_HTML_PATH configurable Makefile-based builds can configure Git's internal HTML_PATH by defining htmldir, which is useful for packagers that put documentation in different locations. Gentoo, for example, uses version-suffixed directories like ${prefix}/share/doc/git-2.51 and puts the HTML documentation in an 'html' subdirectory of the same. Propagate the same configuration knob to Meson-based builds so that "git --html-path" on such systems can be configured to output the correct directory. Signed-off-by: D. Ben Knoble Signed-off-by: Junio C Hamano --- Documentation/howto/meson.build | 4 ++-- Documentation/meson.build | 12 ++++++------ Documentation/technical/meson.build | 4 ++-- contrib/contacts/meson.build | 2 +- contrib/subtree/meson.build | 2 +- meson.build | 7 ++++++- meson_options.txt | 2 ++ 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/Documentation/howto/meson.build b/Documentation/howto/meson.build index ece20244af2ad3..16b9056f24e12e 100644 --- a/Documentation/howto/meson.build +++ b/Documentation/howto/meson.build @@ -35,7 +35,7 @@ doc_targets += custom_target( output: 'howto-index.html', depends: documentation_deps, install: true, - install_dir: get_option('datadir') / 'doc/git-doc', + install_dir: htmldir, ) foreach howto : howto_sources @@ -57,6 +57,6 @@ foreach howto : howto_sources output: fs.stem(howto_stripped.full_path()) + '.html', depends: documentation_deps, install: true, - install_dir: get_option('datadir') / 'doc/git-doc/howto', + install_dir: htmldir / 'howto', ) endforeach diff --git a/Documentation/meson.build b/Documentation/meson.build index 9d24f2da544682..c00c9fe7f429a5 100644 --- a/Documentation/meson.build +++ b/Documentation/meson.build @@ -412,7 +412,7 @@ foreach manpage, category : manpages input: manpage, output: fs.stem(manpage) + '.html', install: true, - install_dir: get_option('datadir') / 'doc/git-doc', + install_dir: htmldir, ) endif endforeach @@ -423,7 +423,7 @@ if get_option('docs').contains('html') output: 'docinfo.html', copy: true, install: true, - install_dir: get_option('datadir') / 'doc/git-doc', + install_dir: htmldir, ) configure_file( @@ -431,11 +431,11 @@ if get_option('docs').contains('html') output: 'docbook-xsl.css', copy: true, install: true, - install_dir: get_option('datadir') / 'doc/git-doc', + install_dir: htmldir, ) install_symlink('index.html', - install_dir: get_option('datadir') / 'doc/git-doc', + install_dir: htmldir, pointing_to: 'git.html', ) @@ -466,7 +466,7 @@ if get_option('docs').contains('html') input: 'docbook.xsl', output: 'user-manual.html', install: true, - install_dir: get_option('datadir') / 'doc/git-doc', + install_dir: htmldir, ) articles = [ @@ -492,7 +492,7 @@ if get_option('docs').contains('html') output: fs.stem(article) + '.html', depends: documentation_deps, install: true, - install_dir: get_option('datadir') / 'doc/git-doc', + install_dir: htmldir, ) endforeach diff --git a/Documentation/technical/meson.build b/Documentation/technical/meson.build index be698ef22a30ea..faff3964a9bef5 100644 --- a/Documentation/technical/meson.build +++ b/Documentation/technical/meson.build @@ -53,7 +53,7 @@ doc_targets += custom_target( output: 'api-index.html', depends: documentation_deps, install: true, - install_dir: get_option('datadir') / 'doc/git-doc/technical', + install_dir: htmldir / 'technical', ) foreach article : api_docs + articles @@ -63,6 +63,6 @@ foreach article : api_docs + articles output: fs.stem(article) + '.html', depends: documentation_deps, install: true, - install_dir: get_option('datadir') / 'doc/git-doc/technical', + install_dir: htmldir / 'technical', ) endforeach diff --git a/contrib/contacts/meson.build b/contrib/contacts/meson.build index c8fdb35ed990ee..4ae6b32a033de9 100644 --- a/contrib/contacts/meson.build +++ b/contrib/contacts/meson.build @@ -50,6 +50,6 @@ if get_option('docs').contains('html') input: 'git-contacts.adoc', output: 'git-contacts.html', install: true, - install_dir: get_option('datadir') / 'doc/git-doc', + install_dir: htmldir, ) endif diff --git a/contrib/subtree/meson.build b/contrib/subtree/meson.build index 46cdbcc30c9bd7..161435abebd476 100644 --- a/contrib/subtree/meson.build +++ b/contrib/subtree/meson.build @@ -68,6 +68,6 @@ if get_option('docs').contains('html') input: 'git-subtree.adoc', output: 'git-subtree.html', install: true, - install_dir: get_option('datadir') / 'doc/git-doc', + install_dir: htmldir, ) endif diff --git a/meson.build b/meson.build index 2b763f7c53493c..1f95a06edb7829 100644 --- a/meson.build +++ b/meson.build @@ -768,13 +768,18 @@ if test_output_directory == '' test_output_directory = meson.project_build_root() / 'test-output' endif +htmldir = get_option('htmldir') +if htmldir == '' + htmldir = get_option('datadir') / 'doc/git-doc' +endif + # These variables are used for building libgit.a. libgit_c_args = [ '-DBINDIR="' + get_option('bindir') + '"', '-DDEFAULT_GIT_TEMPLATE_DIR="' + get_option('datadir') / 'git-core/templates' + '"', '-DFALLBACK_RUNTIME_PREFIX="' + get_option('prefix') + '"', '-DGIT_HOST_CPU="' + host_machine.cpu_family() + '"', - '-DGIT_HTML_PATH="' + get_option('datadir') / 'doc/git-doc"', + '-DGIT_HTML_PATH="' + htmldir + '"', '-DGIT_INFO_PATH="' + get_option('infodir') + '"', '-DGIT_LOCALE_PATH="' + get_option('localedir') + '"', '-DGIT_MAN_PATH="' + get_option('mandir') + '"', diff --git a/meson_options.txt b/meson_options.txt index 143dee9237cb41..e0be260ae1bce8 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,6 @@ # Configuration for Git installation +option('htmldir', type: 'string', value: '', + description: 'Directory to install HTML docs to. Defaults to /doc/git-doc') option('perllibdir', type: 'string', value: '', description: 'Directory to install perl lib to. Defaults to /perl5') From 621415c8b5371a4734315232a780dd8282f6fe4f Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 12 Nov 2025 08:17:06 -0800 Subject: [PATCH 4/4] Git 2.52-rc2 Signed-off-by: Junio C Hamano --- Documentation/RelNotes/2.52.0.adoc | 8 ++++++++ GIT-VERSION-GEN | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/RelNotes/2.52.0.adoc b/Documentation/RelNotes/2.52.0.adoc index 6c0e7d05c02f2b..45e7f0a24408e6 100644 --- a/Documentation/RelNotes/2.52.0.adoc +++ b/Documentation/RelNotes/2.52.0.adoc @@ -182,6 +182,14 @@ Performance, Internal Implementation, Development Support etc. * The "debug" ref-backend was missing a method implementation, which has been corrected. + * Build procedure for Wincred credential helper has been updated. + + * The build procedure based on meson learned to allow builders to + specify the directory to install HTML documents. + + * Building "git contacts" script (in contrib/) left the resulting + file unexecutable, which has been corrected. + Fixes since v2.51 ----------------- diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 4929570f2cc2bd..a6b31f2857271b 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,6 +1,6 @@ #!/bin/sh -DEF_VER=v2.52.0-rc1 +DEF_VER=v2.52.0-rc2 LF=' '