From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Cc: M Hickford <mirth.hickford@gmail.com>,
Junio C Hamano <gitster@pobox.com>, Johannes Sixt <j6t@kdbg.org>
Subject: [PATCH v2 06/10] meson: wire up credential helpers
Date: Wed, 19 Feb 2025 14:13:46 +0100 [thread overview]
Message-ID: <20250219-b4-pks-meson-contrib-v2-6-1ba5d7fde0b9@pks.im> (raw)
In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im>
We've got a couple of credential helpers in "contrib/credential", all
of which aren't yet wired up via Meson. Do so.
Note that ideally, we'd also wire up t0303 to be executed with each of
the credential helpers to verify their functionality. Unfortunately
though, none of them pass the test suite right now, so this is left for
a future change.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
contrib/credential/libsecret/meson.build | 9 +++++++++
contrib/credential/meson.build | 3 +++
contrib/credential/netrc/meson.build | 20 ++++++++++++++++++++
contrib/credential/osxkeychain/meson.build | 9 +++++++++
contrib/credential/wincred/meson.build | 5 +++++
contrib/meson.build | 2 ++
meson.build | 2 +-
meson_options.txt | 2 ++
8 files changed, 51 insertions(+), 1 deletion(-)
diff --git a/contrib/credential/libsecret/meson.build b/contrib/credential/libsecret/meson.build
new file mode 100644
index 00000000000..0137660fe02
--- /dev/null
+++ b/contrib/credential/libsecret/meson.build
@@ -0,0 +1,9 @@
+executable('git-credential-libsecret',
+ sources: 'git-credential-libsecret.c',
+ dependencies: [
+ dependency('glib-2.0'),
+ dependency('libsecret-1'),
+ ],
+ install: true,
+ install_dir: get_option('libexecdir') / 'git-core',
+)
diff --git a/contrib/credential/meson.build b/contrib/credential/meson.build
new file mode 100644
index 00000000000..4216296ae05
--- /dev/null
+++ b/contrib/credential/meson.build
@@ -0,0 +1,3 @@
+foreach helper : get_option('credential_helpers')
+ subdir(helper)
+endforeach
diff --git a/contrib/credential/netrc/meson.build b/contrib/credential/netrc/meson.build
new file mode 100644
index 00000000000..a990dbb86da
--- /dev/null
+++ b/contrib/credential/netrc/meson.build
@@ -0,0 +1,20 @@
+credential_netrc = custom_target(
+ input: 'git-credential-netrc.perl',
+ output: 'git-credential-netrc',
+ command: generate_perl_command,
+ depends: [git_version_file],
+ install: true,
+ install_dir: get_option('libexecdir') / 'git-core',
+)
+
+credential_netrc_testenv = test_environment
+credential_netrc_testenv.set('CREDENTIAL_NETRC_PATH', credential_netrc.full_path())
+
+test('t-git-credential-netrc',
+ shell,
+ args: [ meson.current_source_dir() / 't-git-credential-netrc.sh' ],
+ workdir: meson.current_source_dir(),
+ env: credential_netrc_testenv,
+ depends: test_dependencies + bin_wrappers + [credential_netrc],
+ timeout: 0,
+)
diff --git a/contrib/credential/osxkeychain/meson.build b/contrib/credential/osxkeychain/meson.build
new file mode 100644
index 00000000000..3c7677f736c
--- /dev/null
+++ b/contrib/credential/osxkeychain/meson.build
@@ -0,0 +1,9 @@
+executable('git-credential-osxkeychain',
+ sources: 'git-credential-osxkeychain.c',
+ dependencies: [
+ dependency('CoreFoundation'),
+ dependency('Security'),
+ ],
+ install: true,
+ install_dir: get_option('libexecdir') / 'git-core',
+)
diff --git a/contrib/credential/wincred/meson.build b/contrib/credential/wincred/meson.build
new file mode 100644
index 00000000000..6de23ca17d4
--- /dev/null
+++ b/contrib/credential/wincred/meson.build
@@ -0,0 +1,5 @@
+executable('git-credential-wincred',
+ sources: 'git-credential-wincred.c',
+ install: true,
+ install_dir: get_option('libexecdir') / 'git-core',
+)
diff --git a/contrib/meson.build b/contrib/meson.build
index d74b64a5181..569c23ee768 100644
--- a/contrib/meson.build
+++ b/contrib/meson.build
@@ -1,3 +1,5 @@
foreach feature : get_option('contrib')
subdir(feature)
endforeach
+
+subdir('credential')
diff --git a/meson.build b/meson.build
index d77d7b6b603..20159cef83d 100644
--- a/meson.build
+++ b/meson.build
@@ -771,7 +771,7 @@ endif
# features. It is optional if you want to neither execute tests nor use any of
# these optional features.
perl_required = get_option('perl')
-if get_option('tests') or get_option('gitweb').enabled()
+if get_option('tests') or get_option('gitweb').enabled() or 'netrc' in get_option('credential_helpers')
perl_required = true
endif
diff --git a/meson_options.txt b/meson_options.txt
index 5c12e9055e6..0b0708dd0ed 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -29,6 +29,8 @@ option('version', type: 'string', value: '',
# Features supported by Git.
option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ],
description: 'Contributed features to include.')
+option('credential_helpers', type: 'array', value: [ ], choices: [ 'libsecret', 'netrc', 'osxkeychain', 'wincred' ],
+ description: 'Contributed features to include.')
option('curl', type: 'feature', value: 'enabled',
description: 'Build helpers used to access remotes with the HTTP transport.')
option('expat', type: 'feature', value: 'enabled',
--
2.48.1.666.gff9fcf71b7.dirty
next prev parent reply other threads:[~2025-02-19 13:14 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-18 7:45 [PATCH 00/12] meson: wire up bits and pieces from "contrib/" Patrick Steinhardt
2025-02-18 7:45 ` [PATCH 01/12] GIT-BUILD-OPTIONS: propagate project's source directory Patrick Steinhardt
2025-02-18 7:45 ` [PATCH 02/12] contrib/credential: fix "netrc" tests with out-of-tree builds Patrick Steinhardt
2025-02-18 7:45 ` [PATCH 03/12] contrib/credential: fix compilation of wincred helper with MSVC Patrick Steinhardt
2025-02-18 7:45 ` [PATCH 04/12] contrib/credential: fix compiling "libsecret" helper Patrick Steinhardt
2025-02-18 7:45 ` [PATCH 05/12] contrib/credential: fix compilation of "osxkeychain" helper Patrick Steinhardt
2025-02-18 7:45 ` [PATCH 06/12] meson: wire up credential helpers Patrick Steinhardt
2025-02-18 10:11 ` M Hickford
2025-02-18 11:13 ` Patrick Steinhardt
2025-03-29 7:15 ` M Hickford
2025-03-31 6:55 ` Patrick Steinhardt
2025-02-18 7:45 ` [PATCH 07/12] meson: wire up git-contacts(1) Patrick Steinhardt
2025-02-18 7:45 ` [PATCH 08/12] meson: wire up static analysis via Coccinelle Patrick Steinhardt
2025-02-18 7:45 ` [PATCH 09/12] gitk: extract script to build Gitk Patrick Steinhardt
2025-02-18 22:25 ` Junio C Hamano
2025-02-19 5:53 ` Patrick Steinhardt
2025-02-19 11:42 ` Johannes Sixt
2025-02-19 11:51 ` Patrick Steinhardt
2025-02-19 17:32 ` Johannes Sixt
2025-02-18 7:45 ` [PATCH 10/12] meson: wire up Gitk Patrick Steinhardt
2025-02-18 7:45 ` [PATCH 11/12] ci: fix propagating UTF-8 test locale in musl-based Meson job Patrick Steinhardt
2025-02-18 7:46 ` [PATCH 12/12] ci: exercise credential helpers Patrick Steinhardt
2025-02-18 10:10 ` [PATCH 00/12] meson: wire up bits and pieces from "contrib/" M Hickford
2025-02-19 13:13 ` [PATCH v2 00/10] " Patrick Steinhardt
2025-02-19 13:13 ` [PATCH v2 01/10] GIT-BUILD-OPTIONS: propagate project's source directory Patrick Steinhardt
2025-02-19 13:13 ` [PATCH v2 02/10] contrib/credential: fix "netrc" tests with out-of-tree builds Patrick Steinhardt
2025-02-19 13:13 ` [PATCH v2 03/10] contrib/credential: fix compilation of wincred helper with MSVC Patrick Steinhardt
2025-02-19 13:13 ` [PATCH v2 04/10] contrib/credential: fix compiling "libsecret" helper Patrick Steinhardt
2025-02-19 13:13 ` [PATCH v2 05/10] contrib/credential: fix compilation of "osxkeychain" helper Patrick Steinhardt
2025-02-19 13:13 ` Patrick Steinhardt [this message]
2025-02-19 13:13 ` [PATCH v2 07/10] meson: wire up git-contacts(1) Patrick Steinhardt
2025-02-19 13:13 ` [PATCH v2 08/10] meson: wire up static analysis via Coccinelle Patrick Steinhardt
2025-02-19 13:13 ` [PATCH v2 09/10] ci: fix propagating UTF-8 test locale in musl-based Meson job Patrick Steinhardt
2025-02-19 13:13 ` [PATCH v2 10/10] ci: exercise credential helpers Patrick Steinhardt
2025-02-20 1:25 ` [-SPAM-] [PATCH v2 00/10] meson: wire up bits and pieces from "contrib/" Ramsay Jones
2025-02-20 6:25 ` Patrick Steinhardt
2025-02-21 19:50 ` Ramsay Jones
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250219-b4-pks-meson-contrib-v2-6-1ba5d7fde0b9@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=j6t@kdbg.org \
--cc=mirth.hickford@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).