From patchwork Tue Feb 18 07:45:49 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979155 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09B731D5CFF for ; Tue, 18 Feb 2025 07:46:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864771; cv=none; b=TQ2GoqiUZtO9i3+/bBWFXn95PiXsTCzh5CFVoRA7yP9OXnJn5I323LoMd8FbTYn3ojHXAoTyPIHUaJFWMqnwViMHC0zaMIqVblZvZBRCWXgXH7cpYkZ9ETMuT7kjXO5f6gMYekTICpDP/MLKsLp5wOacx68oREcx3jn2LESeVss= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864771; c=relaxed/simple; bh=Rd9wQ5zgXkkM3T2Gu64uxETczmCGqKhp0H3DqVxDsas=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=jyuyKL/wBj3UlEGvByceqtQinTcNKjo5BmyY3dcRSlrMzAzygOQbGQfEEsZkJUj4Wf1cre9o/yDtNnufsDFQvY9V+ujD317+5tPEboo32/rDjZAIu7h9As2eWN2HZlucQoNBermUY2SpyHXocUvs+Z+6LWQAUNs6pD+IwmRo/wM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=qtCNVKrp; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=OAtbOWRN; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="qtCNVKrp"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="OAtbOWRN" Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfout.phl.internal (Postfix) with ESMTP id CE3F51380A39; Tue, 18 Feb 2025 02:46:07 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Tue, 18 Feb 2025 02:46:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864767; x=1739951167; bh=SyHglFKHmLfI+/6kFH4OxJTSPVCdEVLD9u+PUcUmZMM=; b= qtCNVKrpimDoudBehnXEZ+g1gBbQGSGVwqALaVIPThLbarlOcgWIo8/xqCWRV33A uN3q4uWSdlByNPcQjJIbQ626978yxMOV+N9W75eN8f5D85e+QFJYXeDRTHT9+lId fxRe6kOmpeiKPQqhhy7YNw++mWoxt16dKv419ihLckzYcXqj6NQk6rOrT0jgg9xO vXAQbuM+GwxMRCVO1wLluOpgIde8supEfxj8an3hrZPIG1LMluzX2+O4vCa9Mz+E tHEA5XeFb+KUYbRM1wgVD3+angMGZ7KLi+D4OOMmw2iDdc7tKpI7mDX7WVy+qQYK fyKvIQH60ZPD5DuVG21uxg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864767; x= 1739951167; bh=SyHglFKHmLfI+/6kFH4OxJTSPVCdEVLD9u+PUcUmZMM=; b=O AtbOWRNXlfs8KOf8Fu9kJvdBw2CCbN+AnUL+dLhv0exj9aDWsrCc20pdeTHvO2tE p16yeCOpe+Zi5K3LvOShqzgHdoUwrsIykyNfDocVylv5b2hjkIdCwFGAEfaJ4TMj oJqAfoHvOpKVBAL31LsgDOlHyyC7mtQEkB9vo22K7NMlIyrQ5jg4e4176C21iERN F1GVPNGpodkUgqs4HLEcOjCrwPmvw0+boh4rSDpJEcTJIwYpkGjpb2tK+3WLerFa 7GsgIA+OfMJqMaS9IkBXBV7OiVM7tywmVOfuDP8ZH3hwBjgFjlfKVHmqrTzRrrMD QjyuCV86d0JH8ilbPcsaQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrih hlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:06 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 974fc5d8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:05 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:49 +0100 Subject: [PATCH 01/12] GIT-BUILD-OPTIONS: propagate project's source directory Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-1-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 A couple of our tests require knowledge around where to find the project's source directory in order to locate files required for the test itself. Until now we have been wiring these up ad-hoc via new, specialized variables catered to the specific usecase. This is quite awkward though, as every test that potentially needs to locate paths relative to the source directory needs to grow another variable. Introduce a new "GIT_SOURCE_DIR" variable into GIT-BUILD-OPTIONS to stop this proliferation. Remove existing variables that can be derived from it. Signed-off-by: Patrick Steinhardt --- GIT-BUILD-OPTIONS.in | 3 +-- Makefile | 3 +-- contrib/buildsystems/CMakeLists.txt | 3 +-- meson.build | 3 +-- t/lib-gettext.sh | 2 +- t/t7609-mergetool--lib.sh | 2 +- 6 files changed, 6 insertions(+), 10 deletions(-) diff --git a/GIT-BUILD-OPTIONS.in b/GIT-BUILD-OPTIONS.in index ada575fbcb7..0a9884e0ade 100644 --- a/GIT-BUILD-OPTIONS.in +++ b/GIT-BUILD-OPTIONS.in @@ -9,14 +9,13 @@ GIT_PERF_MAKE_COMMAND=@GIT_PERF_MAKE_COMMAND@ GIT_PERF_MAKE_OPTS=@GIT_PERF_MAKE_OPTS@ GIT_PERF_REPEAT_COUNT=@GIT_PERF_REPEAT_COUNT@ GIT_PERF_REPO=@GIT_PERF_REPO@ +GIT_SOURCE_DIR=@GIT_SOURCE_DIR@ GIT_TEST_CMP=@GIT_TEST_CMP@ GIT_TEST_CMP_USE_COPIED_CONTEXT=@GIT_TEST_CMP_USE_COPIED_CONTEXT@ GIT_TEST_GITPERLLIB=@GIT_TEST_GITPERLLIB@ GIT_TEST_INDEX_VERSION=@GIT_TEST_INDEX_VERSION@ -GIT_TEST_MERGE_TOOLS_DIR=@GIT_TEST_MERGE_TOOLS_DIR@ GIT_TEST_OPTS=@GIT_TEST_OPTS@ GIT_TEST_PERL_FATAL_WARNINGS=@GIT_TEST_PERL_FATAL_WARNINGS@ -GIT_TEST_POPATH=@GIT_TEST_POPATH@ GIT_TEST_TEMPLATE_DIR=@GIT_TEST_TEMPLATE_DIR@ GIT_TEST_TEXTDOMAINDIR=@GIT_TEST_TEXTDOMAINDIR@ GIT_TEST_UTF8_LOCALE=@GIT_TEST_UTF8_LOCALE@ diff --git a/Makefile b/Makefile index cd0806e1e69..a3483e15c4a 100644 --- a/Makefile +++ b/Makefile @@ -3192,14 +3192,13 @@ GIT-BUILD-OPTIONS: FORCE -e "s|@GIT_PERF_MAKE_OPTS@|\'$(GIT_PERF_MAKE_OPTS)\'|" \ -e "s|@GIT_PERF_REPEAT_COUNT@|\'$(GIT_PERF_REPEAT_COUNT)\'|" \ -e "s|@GIT_PERF_REPO@|\'$(GIT_PERF_REPO)\'|" \ + -e "s|@GIT_SOURCE_DIR@|\'$(shell pwd)\'|" \ -e "s|@GIT_TEST_CMP@|\'$(GIT_TEST_CMP)\'|" \ -e "s|@GIT_TEST_CMP_USE_COPIED_CONTEXT@|\'$(GIT_TEST_CMP_USE_COPIED_CONTEXT)\'|" \ -e "s|@GIT_TEST_GITPERLLIB@|\'$(shell pwd)/perl/build/lib\'|" \ -e "s|@GIT_TEST_INDEX_VERSION@|\'$(GIT_TEST_INDEX_VERSION)\'|" \ - -e "s|@GIT_TEST_MERGE_TOOLS_DIR@|\'$(shell pwd)/mergetools\'|" \ -e "s|@GIT_TEST_OPTS@|\'$(GIT_TEST_OPTS)\'|" \ -e "s|@GIT_TEST_PERL_FATAL_WARNINGS@|\'$(GIT_TEST_PERL_FATAL_WARNINGS)\'|" \ - -e "s|@GIT_TEST_POPATH@|\'$(shell pwd)/po\'|" \ -e "s|@GIT_TEST_TEMPLATE_DIR@|\'$(shell pwd)/templates/blt\'|" \ -e "s|@GIT_TEST_TEXTDOMAINDIR@|\'$(shell pwd)/po/build/locale\'|" \ -e "s|@GIT_TEST_UTF8_LOCALE@|\'$(GIT_TEST_UTF8_LOCALE)\'|" \ diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt index 3179e7ff7a3..c6fbd57e158 100644 --- a/contrib/buildsystems/CMakeLists.txt +++ b/contrib/buildsystems/CMakeLists.txt @@ -1169,14 +1169,13 @@ string(REPLACE "@GIT_PERF_MAKE_COMMAND@" "" git_build_options "${git_build_optio string(REPLACE "@GIT_PERF_MAKE_OPTS@" "" git_build_options "${git_build_options}") string(REPLACE "@GIT_PERF_REPEAT_COUNT@" "" git_build_options "${git_build_options}") string(REPLACE "@GIT_PERF_REPO@" "" git_build_options "${git_build_options}") +string(REPLACE "@GIT_SOURCE_DIR@" "${CMAKE_SOURCE_DIR}" git_build_options "${git_build_options}") string(REPLACE "@GIT_TEST_CMP@" "" git_build_options "${git_build_options}") string(REPLACE "@GIT_TEST_CMP_USE_COPIED_CONTEXT@" "" git_build_options "${git_build_options}") string(REPLACE "@GIT_TEST_GITPERLLIB@" "'${CMAKE_BINARY_DIR}/perl/build/lib'" git_build_options "${git_build_options}") string(REPLACE "@GIT_TEST_INDEX_VERSION@" "" git_build_options "${git_build_options}") -string(REPLACE "@GIT_TEST_MERGE_TOOLS_DIR@" "'${CMAKE_BINARY_DIR}/mergetools'" git_build_options "${git_build_options}") string(REPLACE "@GIT_TEST_OPTS@" "" git_build_options "${git_build_options}") string(REPLACE "@GIT_TEST_PERL_FATAL_WARNINGS@" "" git_build_options "${git_build_options}") -string(REPLACE "@GIT_TEST_POPATH@" "'${CMAKE_BINARY_DIR}/po'" git_build_options "${git_build_options}") string(REPLACE "@GIT_TEST_TEMPLATE_DIR@" "'${CMAKE_BINARY_DIR}/templates/blt'" git_build_options "${git_build_options}") string(REPLACE "@GIT_TEST_TEXTDOMAINDIR@" "'${CMAKE_BINARY_DIR}/po/build/locale'" git_build_options "${git_build_options}") string(REPLACE "@GIT_TEST_UTF8_LOCALE@" "" git_build_options "${git_build_options}") diff --git a/meson.build b/meson.build index 0df3872c6ad..d77d7b6b603 100644 --- a/meson.build +++ b/meson.build @@ -1960,10 +1960,9 @@ subdir('contrib') foreach key, value : { 'DIFF': diff.full_path(), + 'GIT_SOURCE_DIR': meson.project_source_root(), 'GIT_TEST_CMP': diff.full_path() + ' -u', 'GIT_TEST_GITPERLLIB': meson.project_build_root() / 'perl', - 'GIT_TEST_MERGE_TOOLS_DIR': meson.project_source_root() / 'mergetools', - 'GIT_TEST_POPATH': meson.project_source_root() / 'po', 'GIT_TEST_TEMPLATE_DIR': meson.project_build_root() / 'templates', 'GIT_TEST_TEXTDOMAINDIR': meson.project_build_root() / 'po', 'PAGER_ENV': get_option('pager_environment'), diff --git a/t/lib-gettext.sh b/t/lib-gettext.sh index 7a734c6973e..b3dd68b0b95 100644 --- a/t/lib-gettext.sh +++ b/t/lib-gettext.sh @@ -7,7 +7,7 @@ . ./test-lib.sh GIT_TEXTDOMAINDIR="$GIT_TEST_TEXTDOMAINDIR" -GIT_PO_PATH="$GIT_TEST_POPATH" +GIT_PO_PATH="$GIT_SOURCE_DIR/po" export GIT_TEXTDOMAINDIR GIT_PO_PATH if test -n "$GIT_TEST_INSTALLED" diff --git a/t/t7609-mergetool--lib.sh b/t/t7609-mergetool--lib.sh index e8e205707e4..af3ad284eed 100755 --- a/t/t7609-mergetool--lib.sh +++ b/t/t7609-mergetool--lib.sh @@ -7,7 +7,7 @@ Testing basic merge tools options' . ./test-lib.sh test_expect_success 'mergetool --tool=vimdiff creates the expected layout' ' - . "$GIT_TEST_MERGE_TOOLS_DIR"/vimdiff && + . "$GIT_SOURCE_DIR"/mergetools/vimdiff && run_unit_tests ' From patchwork Tue Feb 18 07:45:50 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979156 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F9EB1D61B9 for ; Tue, 18 Feb 2025 07:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864772; cv=none; b=B7cIK6G5fZsD+IJYq5AAErK2KCawr86fOqtyUCGuJUZ1aSy539eTNW0yQlAMHtOWmVt0rwFtYTYPzFohBTej/xK1fAkkma7+AYSMuFlyYGn7Sh5TCPOTmCr2I6HKF6VtN5XDn2qOuyZhSE+Qqcf8iSjxPYG6aghQ8wzZKn2VmP0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864772; c=relaxed/simple; bh=HFQWyZjRhwHglC3UhVOgAr7YOWEKQdQgU17NhNA0iyM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=l7bGqy4hw97xlNFjH0IznGD4ZTNZcotHkHYEBNbENS9auprk6qRhzJhyG0fkB3IatzVxFAGh5s7m7OClqpdctYrYIFLLdndmRiZKUvtBo87taJhDiBfRYC0J1rCU1z54iqD8QFrGQQGl2US49xUpeHGYMHJFvVu74BjAujfCQtE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=kKV092dF; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=slCG0Zkw; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="kKV092dF"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="slCG0Zkw" Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfout.phl.internal (Postfix) with ESMTP id D21CE1380A36; Tue, 18 Feb 2025 02:46:08 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 18 Feb 2025 02:46:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864768; x=1739951168; bh=vgt4wMFS1iiz6IOHy6D6csP0Vz64K+GXFckqy38ABfE=; b= kKV092dFeaRsnVExNSb73Vqfb3KaIUSi/Ng9NGpc1ykL6OCSAGxmRIOeCTn5xIYj lmBkjM4MxLe6ibWyzNA8XvpKdt9ujaWFoX6mUs8Hqp7H4FTmsTREzv4feRTrZxg1 b8gSJ6IyKNB8bb+kuF1rcivRKmZxXG8BR+i6tXbx1+R4uHT6veqf77jECmWoh77b 7Zj0nLbkVPsTtpcqq61VHgGfHscb6n4KzyWXnzIbZWAJ+nkL+LWH/h3tcix7xsn8 dXa2Xx18sukXqCIwXYAMSo8yMY9Tfc+NoVZlmTfBCA6FADTkREc3vede3gsWdZAf KnHK9Jft6lWYsMHCWKI+jA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864768; x= 1739951168; bh=vgt4wMFS1iiz6IOHy6D6csP0Vz64K+GXFckqy38ABfE=; b=s lCG0ZkwZACF10Fnpfowat35JbTRt4OUkRt5RBUNyDQnD69MO3g/FpGZCGM9GPSAz FnCKK+9EnhWaCi3el3tVrJ13heULSlEe0N2JXaOUsjCcvD3dFWG0phmjX6t7A7Ov hDllUcR5FxzuQsHJVm+oj/6PIvmSfcWn965AQz0IwdLCRGh/Vw4Axx83T4lZd90j i4d7yV8/aOqV61rMQa1pE36oLW7MU8sIvsXkLyQ9NFFLWehepdPhWIex+OdqbhCE heu9EWrkBqGYcTykuDVeskbsvDsJ1E8/GJyuQRK6YpPIrk5hfpCDn0NbmOPeT73Y V6J7XpZUuT6ywBZA6S2+g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrih hlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:07 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 3b22e35c (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:05 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:50 +0100 Subject: [PATCH 02/12] contrib/credential: fix "netrc" tests with out-of-tree builds Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-2-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 Tests of the "netrc" credential helper aren't prepared to handle out-of-tree builds: - They expect the "test.pl" script to be located relative to the build directory, even though it is located in the source directory. - They expect the built "git-credential-netrc" helper to be located relative to the "test.pl" file, evne though it is loated in the build directory. This works alright as long as source and build directories are the same, but starts to break apart with Meson. Fix these first issue by using the new "GIT_SOURCE_DIR" variable to locate the test script itself. And fix the second issue by introducing a new environment variable "CREDENTIAL_NETRC_PATH" that can be set for out-of-tree builds to locate the built credential helper. Signed-off-by: Patrick Steinhardt --- contrib/credential/netrc/t-git-credential-netrc.sh | 2 +- contrib/credential/netrc/test.pl | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/credential/netrc/t-git-credential-netrc.sh b/contrib/credential/netrc/t-git-credential-netrc.sh index bf2777308a5..1b7b8b3a9aa 100755 --- a/contrib/credential/netrc/t-git-credential-netrc.sh +++ b/contrib/credential/netrc/t-git-credential-netrc.sh @@ -15,7 +15,7 @@ export PERL5LIB="$GITPERLLIB" test_expect_success 'git-credential-netrc' ' - perl "$GIT_BUILD_DIR"/contrib/credential/netrc/test.pl + perl "$GIT_SOURCE_DIR"/contrib/credential/netrc/test.pl ' test_done diff --git a/contrib/credential/netrc/test.pl b/contrib/credential/netrc/test.pl index c0fb3718b28..67a0ede5644 100755 --- a/contrib/credential/netrc/test.pl +++ b/contrib/credential/netrc/test.pl @@ -15,10 +15,11 @@ BEGIN my @global_credential_args = @ARGV; my $scriptDir = dirname rel2abs $0; -my ($netrc, $netrcGpg, $gcNetrc) = map { catfile $scriptDir, $_; } +my ($netrc, $netrcGpg) = map { catfile $scriptDir, $_; } qw(test.netrc - test.netrc.gpg - git-credential-netrc); + test.netrc.gpg); +my $gcNetrc = $ENV{CREDENTIAL_NETRC_PATH} || catfile $scriptDir, qw(git-credential-netrc); + local $ENV{PATH} = join ':' , $scriptDir , $ENV{PATH} From patchwork Tue Feb 18 07:45:51 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979159 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EAAA1D63CE for ; Tue, 18 Feb 2025 07:46:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864773; cv=none; b=Cbs3BPGSO+8N18ArJ9slYDgvkM0e+sE0HzzRXBaNoG6xpwp7kDd2jQEjKg+XrY1ip6LGeMVwOnqGiuISClaGU1atadrfQmet5Raix4AbrGK9PHMuv/wc/HlgqABW97dW7743Y3R222ijaufJkWU1yuN5CI7it0FBYVj32vb0EXU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864773; c=relaxed/simple; bh=P7belojgmpWqg6uu+gumhfaimrGgyr69IOfM6F5m33M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TqM2cQ621i0EGfornhj1Q7tX/Ms0ozuU/5/+UPB9F16yyTmuv2lySmuGu0IREXWNXLcNQhf2RSMSHW2+YKjR3FlAArndD+akXolsNOWsO3r3lXeKCfAk1Ky+Acwo7q2JdSjz+nrkIpo6rodsro2v4Q1yupbbtKi7jLlj3n0Wosk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=rsGwwfLO; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=dZ8FGRat; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="rsGwwfLO"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="dZ8FGRat" Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id E50C71140257; Tue, 18 Feb 2025 02:46:08 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-06.internal (MEProxy); Tue, 18 Feb 2025 02:46:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864768; x=1739951168; bh=SyCuoN07KpprDPsZYdCQnC/i7dD0nywt1RH8i+RgF20=; b= rsGwwfLOEZ50s/80hweFrj6K6Lg9uBEKduHmchnUtXgFsdHz7PGgLU62v9r8emGu 9GqSOLn//YVVJnxYIFA6BuMPpvmVg6uJV2Qatc8dVooE4zhIcG0AeWq7lY59vv24 avslCn7bAqJ7wRwu0Tr61KQO39BJijQ+SWv1W27+E+AAZw/oTpW6t4IggRq5VpZl lRF4tYxfhMB+yp7LRzJ7fNfjziZP/uJZJYFSCh04dTZfG4INFQx4NzhC1J7ODB0Q TbDFw6Lj6bj5JK6hxXYs/rE5yYpJDtUjzl2boixvrJ5/Bgh2Vqesbphd5ISzCgeG nji8qkzuNFMHrPvXfjTzPQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864768; x= 1739951168; bh=SyCuoN07KpprDPsZYdCQnC/i7dD0nywt1RH8i+RgF20=; b=d Z8FGRatoFf+YjdmhwfOhJTGv+Vw8hWFyULSJO5nL63BtWVgoChLXVqDA9jbXDNRH 4lzVCfx9dzFtQjCK0LHU6mhcVs0NcmtNWfDyheQja0UCDcQaFBvQcyFfBuWjBi36 kgoC1rCuJ0MFMLsVbtgR0TBPLDmM14EcgGT2nMiQynz4fX1jF0ongCOzSwkZkweY rDYMkuxUwb7vkCCbKrVTgTYqsj6jeN7q+21daKebVPmX76ilLLgnanQeDeYyToR3 /Fc1kvazuFGOD0SAN+sRfrkG4jzMayRJNZrhGXPdBrBZmieYlhmps9xZ+SBtefw6 743u61F3BtrP/WAB+ldzg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrih hlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:08 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id a0b04632 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:06 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:51 +0100 Subject: [PATCH 03/12] contrib/credential: fix compilation of wincred helper with MSVC Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-3-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 From: M Hickford The git-credential-wincred helper does not compile on Windows with Microsoft Visual Studio because of our use of `__attribute__()`, which its compiler doesn't support. While the rest of our codebase would know to handle this because we redefine the macro in "compat/msvc.h", this stub isn't available here because we don't include "git-compat-util.h" in the first place. Fix the issue by making the attribute depend on the `_MSC_VER` preprocessor macro. Signed-off-by: M Hickford Signed-off-by: Patrick Steinhardt --- contrib/credential/wincred/git-credential-wincred.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/credential/wincred/git-credential-wincred.c b/contrib/credential/wincred/git-credential-wincred.c index 4be0d58cd89..04145b51183 100644 --- a/contrib/credential/wincred/git-credential-wincred.c +++ b/contrib/credential/wincred/git-credential-wincred.c @@ -12,7 +12,9 @@ #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) +#ifndef _MSC_VER __attribute__((format (printf, 1, 2))) +#endif static void die(const char *err, ...) { char msg[4096]; From patchwork Tue Feb 18 07:45:52 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979158 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4B711DF268 for ; Tue, 18 Feb 2025 07:46:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864772; cv=none; b=L9xdlWfZpLjuE2if2042RHCLFuat97bHjs8ubmkF/Lu1rH+CiWCr/8LPECrAC9uUdKumTuYhjuZ5FdnUWr5BeAu/qrno6HnRKEe/+fQujKQF6GDB1QDPvpmWxXtZ4aMTqVAaROiBK3DjuFKkWOJguYDP09PGUDuj50OW5vpw08Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864772; c=relaxed/simple; bh=ev25QBCFxCsMROqadZNqNUC0fFcjryvDj+jK0eMMpkQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=grwZJKFQCQQKHvdNODyRWA+MMZ0CjibLuXoUODNBy3uKhFZ07z64d5lbxLuE6q736CrfXOAd/7vlfUxWsELysgUPVYurTPlDEyg39x3EExj4qcGArb1lF+wmnmGruRNz1NMXwoUM28Qax4U0sVNfdR2p0ol/fzaVSmkzos1BDl8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=NDw3Y5ia; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=IyqRTJ0R; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="NDw3Y5ia"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="IyqRTJ0R" Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id E4ED01140195; Tue, 18 Feb 2025 02:46:09 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Tue, 18 Feb 2025 02:46:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864769; x=1739951169; bh=6YteMnT3qiXJXMXtro8FgypLgbVaKSqZCam4z/x8vTM=; b= NDw3Y5ia9s0+VLHu+GT9wPchUXJ3D7DXN+xEyEZd/zt45vSWH2VSM2bil+NTKv8p s/C4ldMWDvGaIt+EO6YABm9ET2W/Eceo0q9PpuOB2GPiV8tm+ukixWuSvc+osQ6P ftatZcm2rCIdFKBPz+DTqMSFu9UxJ1Q3R81EgXiwKlQhtkad18iZ4LWf1EMgxzA4 kiNv6pJO8MGc+Xo5Ngs2Zidl4u6rh4OWlOlg89PufTYoqWzQVq/Wkut6vHL5IAc9 NcJNHsJszO6KCtZrEyzokRZOAPS3wkTDWjd9VlTbE0XwVL2sUjwwLT1e2Q7uEtdc mYEl14tYW1Nkma8sUYXOPw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864769; x= 1739951169; bh=6YteMnT3qiXJXMXtro8FgypLgbVaKSqZCam4z/x8vTM=; b=I yqRTJ0R30dO+JtB9/dyHaPHVceQZie4684IXH/gwnUr7eqOGuD1MYRV79gMWjBjA Rwb9CxWr44Eb52G7TapOEw2OXIUClIjPfu7z+yuZDQLnnQIHPuGG5qINfIgK9f0b sX6s3gtf+2a9yamUAmgbKPurZoctAFZEYmenX7SCMGs4kpDSiW/6yq76U4aSP+Lr TFgQQDo/il2J2RwAVme+58J+PedlpZQqHwFjwg+gQOkTNOFmp2TwTXJgEsJGFXeF PR+qd2Vu9tYHFVKLX4/tiaPvnVmfULQ/TDydKWBRwsp1eOkR6YoAhKSbsVg5I3z3 DP67sDpVCpSumynhQABrw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthekredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepteeffefffefhtdevudehtdfgfeefhedvleefveeh veehveeiteduteejgfffueeinecuffhomhgrihhnpehprghsshifohhrugdrnhgrmhgvne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehp khhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpth htohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehmihhrthhh rdhhihgtkhhfohhrugesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:08 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 24e32d2f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:07 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:52 +0100 Subject: [PATCH 04/12] contrib/credential: fix compiling "libsecret" helper Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-4-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 The "libsecret" credential helper does not compile when developer warnings are enabled due to three warnings: - contrib/credential/libsecret/git-credential-libsecret.c:78:1: missing initializer for field ‘reserved’ of ‘SecretSchema’ [-Werror=missing-field-initializers]. This issue is fixed by using designated initializers. - contrib/credential/libsecret/git-credential-libsecret.c:171:43: comparison of integer expressions of different signedness: ‘int’ and ‘guint’ {aka ‘unsigned int’} [-Werror=sign-compare]. This issue is fixed by using an unsigned variable to iterate through the string vector. - contrib/credential/libsecret/git-credential-libsecret.c:420:14: unused parameter ‘argc’ [-Werror=unused-parameter]. This issue is fixed by checking the number of arguments, but in the least restrictive way possible. Signed-off-by: Patrick Steinhardt --- contrib/credential/libsecret/git-credential-libsecret.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/credential/libsecret/git-credential-libsecret.c b/contrib/credential/libsecret/git-credential-libsecret.c index 90034d0cf1e..941b2afd5ee 100644 --- a/contrib/credential/libsecret/git-credential-libsecret.c +++ b/contrib/credential/libsecret/git-credential-libsecret.c @@ -59,10 +59,10 @@ static void credential_clear(struct credential *c); /* ----------------- Secret Service functions ----------------- */ static const SecretSchema schema = { - "org.git.Password", + .name = "org.git.Password", /* Ignore schema name during search for backwards compatibility */ - SECRET_SCHEMA_DONT_MATCH_NAME, - { + .flags = SECRET_SCHEMA_DONT_MATCH_NAME, + .attributes = { /* * libsecret assumes attribute values are non-confidential and * unchanging, so we can't include oauth_refresh_token or @@ -168,7 +168,7 @@ static int keyring_get(struct credential *c) g_free(c->password); c->password = g_strdup(""); } - for (int i = 1; i < g_strv_length(parts); i++) { + for (guint i = 1; i < g_strv_length(parts); i++) { if (g_str_has_prefix(parts[i], "password_expiry_utc=")) { g_free(c->password_expiry_utc); c->password_expiry_utc = g_strdup(&parts[i][20]); @@ -424,7 +424,7 @@ int main(int argc, char *argv[]) struct credential_operation const *try_op = credential_helper_ops; struct credential cred = CREDENTIAL_INIT; - if (!argv[1]) { + if (argc < 2 || !*argv[1]) { usage(argv[0]); exit(EXIT_FAILURE); } From patchwork Tue Feb 18 07:45:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979157 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E4BDD1DF26E for ; Tue, 18 Feb 2025 07:46:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864772; cv=none; b=C4FjSnwQkcFxOBcdAnF0mGfuMBKo7KcD+FDUuAi2yJQG9VEHX8AdgjC7pWEVlbtgl5D++uW9oNlvyouIJ0USFzR2lTtf2Klr+zParqgQdCfoy01FnPUr/dxOFUjfc20jv8mEuGJp8/8QtL8C+DLKmaIgmwg768KKTXfLO6+Feu0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864772; c=relaxed/simple; bh=mY4lzOivTptFMKbuCLdMMve6j/1W5yee0LWySaRZWxA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hVcfcdAn500lUseUZeIPVCd9VXFDmBxk+/Bb0zCnYnNZOZzLcFul0v90+1qXBDJWH7Q5z4BkNzLpO991rIRyhsvadg2gaJUeHVvBeQLdJ308oml5Q+/CqHYvgXs+wJ1Bae5Y42/UPYFZ7DEeljCMiSE0sAsVu42gCGRuQpuSX4o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=l7OHxX6Z; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=NDEvqxwV; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="l7OHxX6Z"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="NDEvqxwV" Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.phl.internal (Postfix) with ESMTP id E9C3311401F6; Tue, 18 Feb 2025 02:46:09 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-07.internal (MEProxy); Tue, 18 Feb 2025 02:46:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864769; x=1739951169; bh=coYQ0IU816FHyvUOYVSuNNf+UUjRIMrOXaV9KEb76Rg=; b= l7OHxX6ZfpxU9x+ocQccIvPIL1/TryWU/+rBRevxw0j72LtjxtCv9ag2ng9itIqf giq3l1Esr2qjqnjn2Tklt6ihoC41nosNXfpr8xQkc/pxnA3vmXluQo8rcW74x0je jDFE45KlJH+uM+bC1Hk2MyeRiXiz3vHzkhHqeFm2KbcT7gX8V/Myo2oYYfs1FZfv 6Axy4MEUqJnERJgDkTmC21QwmdFgqXykjgSYS2AyeSptMRcXBSKjBFLydUxQdSKS GvoQhp0+E855Y26zIVZfrs2bTPCJoFHj1fi8BFcH0F8E5znJzJLWrG5VWLKLl6Of UId8gLPmlBQvsa3dxeA8Kw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864769; x= 1739951169; bh=coYQ0IU816FHyvUOYVSuNNf+UUjRIMrOXaV9KEb76Rg=; b=N DEvqxwV7CusXOH6gvKvNfi6FLYNB0WZSrb4QR7cXcAhs314kAejvt25VjF2TB6P+ YSptx+ouqR7m/pX1cyyznN3osquTmEuO6F4XJgMmWgynMadbc3kuMEm9PwUfcM81 aRyxgDouBkOi/2zm/yeNISpNAkgd5yfeHy8D67plmhuzrh44+cypQiNFFyiTpl2d K2HmMpHl3rbA2Ttm4S3a12XVAETfnunuUgKL1Zh4SyV33rCoWfXFvo9T3B9pRrHE zvPVMJFuM1BB7PSWbCcOSD+HE4czSMLAnf7XWOATUBnQuX3j5U9Siy0oc6kvtfn2 7FEU83/61G2wZ+igAbz5Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh dprhgtphhtthhopehmihhrthhhrdhhihgtkhhfohhrugesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:09 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id a9ce3810 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:08 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:53 +0100 Subject: [PATCH 05/12] contrib/credential: fix compilation of "osxkeychain" helper Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-5-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 The "osxkeychain" helper does not compile due to a warning generated by the unused `argc` parameter. Fix the warning by checking for the minimum number of required arguments explicitly in the least restrictive way possible. Signed-off-by: Patrick Steinhardt --- contrib/credential/osxkeychain/git-credential-osxkeychain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/credential/osxkeychain/git-credential-osxkeychain.c b/contrib/credential/osxkeychain/git-credential-osxkeychain.c index 1c8310d7fef..611c9798b3a 100644 --- a/contrib/credential/osxkeychain/git-credential-osxkeychain.c +++ b/contrib/credential/osxkeychain/git-credential-osxkeychain.c @@ -422,7 +422,7 @@ int main(int argc, const char **argv) const char *usage = "usage: git credential-osxkeychain "; - if (!argv[1]) + if (argc < 2 || !*argv[1]) die("%s", usage); if (open(argv[0], O_RDONLY | O_EXLOCK) == -1) From patchwork Tue Feb 18 07:45:54 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979160 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 05CDE1D63EF for ; Tue, 18 Feb 2025 07:46:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864774; cv=none; b=KOMZeYU3wcw73ijAeR3UnCuH1sUPhgGZqsbDdJv3BFzBnCDAoOLAGm157D/L+ZX12+NrChUH3CRZqtNUYomWNDEaq2oQ3DT31IBQ9aeW1HMPDlBM75CzBwa5/HCN/OQalt48LJ2zVqRVKKXkGsK69B30pJVGt8sv1mGtZk7RxYA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864774; c=relaxed/simple; bh=eRwHtFAyoQgcj+0HFEz9Z5Ie6fOL57CVzPz79mUMfQQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SIVBOW6hk7USx/xVFGywkUQm4YocQFNwTRIYCIevbRxccaZXtKx0uzhw3d+vW7WV9eit/PVMjULuYa3RDMk/hMr+KV2WSVfdWueEO3zaDIxs5JteHY7iVUP8YTSDTwpn6Q80scIQFjMyJKl01zeeS5bHd1/E+uasrAyapAZOhk0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=dFwZ1DU4; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=eX8/jBP9; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="dFwZ1DU4"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="eX8/jBP9" Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfhigh.phl.internal (Postfix) with ESMTP id E0FFA11401C3; Tue, 18 Feb 2025 02:46:10 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Tue, 18 Feb 2025 02:46:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864770; x=1739951170; bh=O5Ndf9GhTLLO3WnTfVuD9GBrmIfK/TNghTycdhpEPLk=; b= dFwZ1DU4N4zNQw3wBbzaDzJe2NJ6XsztBU9FiqeM0ipkck7kluuCx6LO4Rbmy/sL W2OWuIUfAYumxkyt0/+OLSsZdDhAdxSo8JNAMn6+WCLHO2nZYjxWVJPhxrO/Nu2p XTqimsN7JrfRREjCNESqgepWzbthwnPawN2wa9bRTBzW/Fk4PISk5e/2GymAooDn ftSLsJ5DS+wpg4aYFVoLpFI5WGH8GOysejf87V0mbiTvnKD54mUfKojklFjCd0M7 dkOFp6naXnIWtd5eQOeqczfJc1b2v3JZAu6VVjXmmS5DTbMMAnByh8hBAqo2I+UW Kfk1bLT2ONx7WD91/JUNZg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864770; x= 1739951170; bh=O5Ndf9GhTLLO3WnTfVuD9GBrmIfK/TNghTycdhpEPLk=; b=e X8/jBP99Scc/A5t2NMtK9b7AyfpMFjY1LEU1pdDzKHQY8oqPwx0KHuotWCMcAgfl 6UTvCvKwPWcVb+ktNrjuIVh6GIA+DfpamvdQQg+AVRMQx1X1hr/dLGnnJqWz4TAH h9Y5BWqqBL6vpv+pIPwjfezUNc21P/bHZ4xlpwmsubhSu+ESsZMimBQmQWwsy8xd KYj4rsxSBwMnnENqtvw+NvVOHryG+Y4jA8gRWc2kVp1iIpVg60cWqjoTyH0OwJ58 grnkincjMRUmV1mIjHU5j2Te9M3HIsN7ryuFO0H8touQM18lzb5e22newYiYziwA qiSE6uqEGed2GL4nuc4Bg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh dprhgtphhtthhopehmihhrthhhrdhhihgtkhhfohhrugesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:10 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 538f93bc (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:09 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:54 +0100 Subject: [PATCH 06/12] meson: wire up credential helpers Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-6-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 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 --- 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', From patchwork Tue Feb 18 07:45:55 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979161 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 27D301DF965 for ; Tue, 18 Feb 2025 07:46:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864774; cv=none; b=lg7J3h9md3yKqDW67ic/pGqd4jjqFSS7Q4L2/jpdvY3EmaokBfr78SnzPOnDmjOIWEOgQR0p3OcchBe2EO9ng0YmMUvlU8s9qXLrdjxt+3t+uqWPfpZoztR89rAZm6RBnD91/3E1gLoBLszCFQsfOGPC/NoOQpxwpyCD/woX91E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864774; c=relaxed/simple; bh=QbjRK/1DOwLrFeiYGDm537TH+qhiEYijV4+Zzwd3G3A=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=P6Q+OlqMPx0ALHIFzU2r2Jk1mzXz4KxYZRpNZt+YUsyuRomeici+/nb0gHGO+llu2xUW4ebclcXZtTstT0r390E5QBeMKEnpo2HhnR9XZCfq5WYh6asuZ3nQyPi3TdQVqXXxorDwsL+AFvsZRAmYs2Sf8d2rxSdriKytK27gcjU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=bh5nhrhb; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=WO9j68KC; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="bh5nhrhb"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="WO9j68KC" Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 00F5B1380A39; Tue, 18 Feb 2025 02:46:12 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Tue, 18 Feb 2025 02:46:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864771; x=1739951171; bh=Jad/tC30baZfBxEqEbC4wLccM0Z8jZoIj0/JK63ZspE=; b= bh5nhrhbXRrTTnit47s+f/yVT0GjHe6bZnMaIg5EWICjw+5yF9zJl0bL2zG/v6ep z6JsEl/b3aT7oVuYie8HTe+laj7ZqoY5/SW9rYZyB3HupbGdGtivBQ3XzMV+Gze+ MWLMvE29oOOpUEfi+81yF0kfeeU2gyUOzvRO5vU2jRi0d70ni5W6I5MaS5J318MM lPzuzb+o0CJGajTPzRQQ20ca1mss0kXicZRJxDiEquGiXQ055mS4GS0GlVh3WcBU v5rd3dNQ7AvLTXCxMcc2uVUiwYDeRLKSGWopMSaiTmmJR1tEt9vSo6kQ4vcOByZb hhozeUeydErQ2PQHtdxHgQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864771; x= 1739951171; bh=Jad/tC30baZfBxEqEbC4wLccM0Z8jZoIj0/JK63ZspE=; b=W O9j68KC3mIL2gTvmoI3Q75KQNAZE2xsh/S4AKB3u2MMYp/8IkGV3iekSXuuavSyM 4X567e8BwxvzBfMYweEfL5vyAnz/s4DCr2xYyPoZpqRHuz9w3NmTA/0dWfRBW8sP P7uuR4e+Q/bwnkdL4rjOGDvAsrmpzbuZLvXra7ibUu6WY7UaoBtOXDdYzsKtQwCH JAvqeFBarBW7DFz8+c93GCKFHhKfw1SKf/iUlJn9HumK9eOHkT06NHULDDK3+ojS OjCG/1LNb5BCzzHrlLPhn2w7IY6vATtfKvYf1xHooIvC4wPaDigVB7bd40riXbp/ 1dJKMgJ6md/3ebJtzO8sQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrih hlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:11 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 0c52ca59 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:10 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:55 +0100 Subject: [PATCH 07/12] meson: wire up git-contacts(1) Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-7-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 Wire up the build for git-contacts(1) in Meson. Signed-off-by: Patrick Steinhardt --- contrib/contacts/meson.build | 55 ++++++++++++++++++++++++++++++++++++++++++++ meson_options.txt | 2 +- 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/contrib/contacts/meson.build b/contrib/contacts/meson.build new file mode 100644 index 00000000000..6ec92f47c43 --- /dev/null +++ b/contrib/contacts/meson.build @@ -0,0 +1,55 @@ +custom_target( + input: 'git-contacts', + output: 'git-contacts', + command: generate_perl_command, + depends: [git_version_file], + install: true, + install_dir: get_option('libexecdir') / 'git-core', +) + +if get_option('docs').contains('man') + contacts_xml = custom_target( + command: asciidoc_common_options + [ + '--backend=' + asciidoc_docbook, + '--doctype=manpage', + '--out-file=@OUTPUT@', + '@INPUT@', + ], + depends: documentation_deps, + input: 'git-contacts.txt', + output: 'git-contacts.xml', + ) + + custom_target( + command: [ + xmlto, + '-m', '@INPUT@', + 'man', + contacts_xml, + '-o', + meson.current_build_dir(), + ] + xmlto_extra, + input: [ + '../../Documentation/manpage-normal.xsl', + ], + output: 'git-contacts.1', + install: true, + install_dir: get_option('mandir') / 'man1', + ) +endif + +if get_option('docs').contains('html') + custom_target( + command: asciidoc_common_options + [ + '--backend=' + asciidoc_html, + '--doctype=manpage', + '--out-file=@OUTPUT@', + '@INPUT@', + ], + depends: documentation_deps, + input: 'git-contacts.txt', + output: 'git-contacts.html', + install: true, + install_dir: get_option('datadir') / 'doc/git-doc', + ) +endif diff --git a/meson_options.txt b/meson_options.txt index 0b0708dd0ed..c51ba88d853 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -27,7 +27,7 @@ option('version', type: 'string', value: '', description: 'Version string reported by git-version(1) and other tools.') # Features supported by Git. -option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'subtree' ], +option('contrib', type: 'array', value: [ 'completion' ], choices: [ 'completion', 'contacts', 'subtree' ], description: 'Contributed features to include.') option('credential_helpers', type: 'array', value: [ ], choices: [ 'libsecret', 'netrc', 'osxkeychain', 'wincred' ], description: 'Contributed features to include.') From patchwork Tue Feb 18 07:45:56 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979162 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF68F1DFE05 for ; Tue, 18 Feb 2025 07:46:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864776; cv=none; b=HUuJxz0e8hqXbgwQ5blBg6TXD8JMygjhvl4tiGCgzbrGMifJPJjS1Nn6LOBHgo+giF98dr06Kqu//CG9OdwV6PQ97VkcxWEYXUD736lqMI4nEmfw+vL6H4Q6VvlXmlaTFFJObHV+QpCDrhWJTO7bDMqf/TvLHFHUXLEOg0K3Fq0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864776; c=relaxed/simple; bh=qzdMW9gLlKaqx1xxvrWg1RkxK5ZHtE/bxz5+sc8QZaI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WNpcJaXC5Y/jycQ33AGnEZyXYDXEar1cZq2Z/hXhinDXDL26hRJRXaMshqq0x9tNDkI4kaxNh/SLO3Hy87UMedMb4V0p112pifs+HeJ8piKLC9PjsOio7zG6jDtt4x1IBgR+4M/bH1dgkKsquLr/GxqP/RaYb4CWW6sKQ4DKeMc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=ou+Q737M; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=XFEVv2Li; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="ou+Q737M"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="XFEVv2Li" Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 073BE1380A33; Tue, 18 Feb 2025 02:46:13 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Tue, 18 Feb 2025 02:46:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864773; x=1739951173; bh=T9IDSvj5n+6tVrr9QXGJWliWfYWCq2leEg7Ebkv5F20=; b= ou+Q737MnZKUEhfwIJqGIP5sKaLy8t3Umq8wR0qpf76KLpnT4E5WzTQTWJ6iv3zq ZluYxEYwpjiJN/AyrnkuOwM8hemJmVLcMw6rMoeSdSzjFLJ4OpwcA6m1jw3iFZaJ xAgJubRxpKXzAqNmhfnv7GuHNxZvfi/gs3LHEF5p+6WxzDTHIXRtlVl+1OgX+08X i1mN+gfPZGFC4r4Y60YdqT5iaWQlodQzXAHT+SWR9vX8TQzmKiOj2BTPFqi0awvM vzRF5MKX5tPQTgFtZZjL6P55Hn36imujDO0McVXz5UdF9Ewp2XfJebkVd84ri+Sx Fp9+VQMOUY0vYS5LYZ60MA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864773; x= 1739951173; bh=T9IDSvj5n+6tVrr9QXGJWliWfYWCq2leEg7Ebkv5F20=; b=X FEVv2Li4gotdcxBqcLbzfKL06YaxMQIq5EFTuU9h6vAApMjB5vNhCl1iJHrHkqsO H8gq08Xun8veBxEfc77PpfGOrP6BoyXzFkhFlreJHL6K2BSpVSBSWv/YlcmZsLzq k/QXlKGlCosR5nMHymTQJqLtU6rwYbGzckZDVKeDOVbv6Gy6nShpBgXxmvEkIIJE YwYxWEwvzz1N6b9wDUbCtuP9ZYrjclXGHSB6Q8tvKcocqWyxeKwdU70q05drqEEf R/sWUV7gxT5dPA6i6H+RDDY0Ms+NtdoTleaa5fVCY8AvvNBeUTrlKd0gCD3U6pWn BU81fGyVisg5C8NnsbD/Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh dprhgtphhtthhopehmihhrthhhrdhhihgtkhhfohhrugesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:12 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 8639e6ed (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:11 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:56 +0100 Subject: [PATCH 08/12] meson: wire up static analysis via Coccinelle Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-8-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 Wire up static analysis via Coccinelle via a new test target "coccicheck". This target can be executed via `meson compile coccicheck` and generates the semantic patch for us. Note that we don't hardcode the list of source and header files that shall be analyzed, and instead use git-ls-files(1) to find them for us. This is because we also want to analyze files that may not get built on the current platform, so finding all sources at configure time is easier than introducing a new variable that tracks all sources, including those which aren't being built. Signed-off-by: Patrick Steinhardt --- contrib/coccinelle/meson.build | 89 ++++++++++++++++++++++++++++++++++++++++++ contrib/meson.build | 1 + meson_options.txt | 2 + 3 files changed, 92 insertions(+) diff --git a/contrib/coccinelle/meson.build b/contrib/coccinelle/meson.build new file mode 100644 index 00000000000..5d76a7fee6f --- /dev/null +++ b/contrib/coccinelle/meson.build @@ -0,0 +1,89 @@ +spatch = find_program('spatch', required: get_option('coccinelle')) +if not spatch.found() + subdir_done() +endif + +third_party_sources = [ + ':!contrib', + ':!compat/inet_ntop.c', + ':!compat/inet_pton.c', + ':!compat/nedmalloc', + ':!compat/obstack.*', + ':!compat/poll', + ':!compat/regex', + ':!sha1collisiondetection', + ':!sha1dc', + ':!t/unit-tests/clar', + ':!t/unit-tests/clar', + ':!t/t[0-9][0-9][0-9][0-9]*', +] + +rules = [ + 'array.cocci', + 'commit.cocci', + 'config_fn_ctx.pending.cocci', + 'equals-null.cocci', + 'flex_alloc.cocci', + 'free.cocci', + 'git_config_number.cocci', + 'hashmap.cocci', + 'index-compatibility.cocci', + 'object_id.cocci', + 'preincr.cocci', + 'qsort.cocci', + 'refs.cocci', + 'strbuf.cocci', + 'swap.cocci', + 'the_repository.cocci', + 'xcalloc.cocci', + 'xopen.cocci', + 'xstrdup_or_null.cocci', + 'xstrncmpz.cocci', +] + +concatenated_rules = custom_target( + command: [ + 'cat', '@INPUT@', + ], + input: rules, + output: 'rules.cocci', + capture: true, +) + +sources = [ ] +foreach source : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.c', third_party_sources, check: true).stdout().split() + sources += source +endforeach + +headers = [ ] +foreach header : run_command(git, '-C', meson.project_source_root(), 'ls-files', '--deduplicate', '*.h', third_party_sources, check: true).stdout().split() + headers += meson.project_source_root() / header +endforeach + +patches = [ ] +foreach source : sources + patches += custom_target( + command: [ + spatch, + '--all-includes', + '--sp-file', concatenated_rules, + '--patch', meson.project_source_root(), + '@INPUT@', + ], + input: meson.project_source_root() / source, + output: source.underscorify() + '.patch', + capture: true, + depend_files: headers, + ) +endforeach + +concatenated_patch = custom_target( + command: [ + 'cat', '@INPUT@', + ], + input: patches, + output: 'cocci.patch', + capture: true, +) + +alias_target('coccicheck', concatenated_patch) diff --git a/contrib/meson.build b/contrib/meson.build index 569c23ee768..a88c5dfe09e 100644 --- a/contrib/meson.build +++ b/contrib/meson.build @@ -2,4 +2,5 @@ foreach feature : get_option('contrib') subdir(feature) endforeach +subdir('coccinelle') subdir('credential') diff --git a/meson_options.txt b/meson_options.txt index c51ba88d853..afa908d6c53 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -101,6 +101,8 @@ option('docs_backend', type: 'combo', choices: ['asciidoc', 'asciidoctor', 'auto description: 'Which backend to use to generate documentation.') # Testing. +option('coccinelle', type: 'feature', value: 'auto', + description: 'Provide a coccicheck target that generates a Coccinelle patch.') option('tests', type: 'boolean', value: true, description: 'Enable building tests. This requires Perl, but is separate from the "perl" option such that you can build tests without Perl features enabled.') option('test_output_directory', type: 'string', From patchwork Tue Feb 18 07:45:57 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979163 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 01C651E0086 for ; Tue, 18 Feb 2025 07:46:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864779; cv=none; b=Sg/1X9p4MluLyLhfeiyCtTCh8TnKk+R813JujcqH43qsv/BnuGG/lu2O7e3fAyERVYb9+u55nBiOwgG/MDUUVlSSKzy60EXFg3AMX5pUpt6gf8cyfYE5XP084lS9W+MsMoaNmAaKgtzGICMiljRgOkAAjNBjtAPIlMYV/9yXASw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864779; c=relaxed/simple; bh=F8bI4+RJ28DC1d5SKLWRKKTsGcQML15d0zFOD4FFi/s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=T7m4PHSiyAxQI7Hq4RNguL9l8/mqE60u7HhHSypQnrZHUl1V7mXsZe2/8uaOrsuETE6FM13mJImF2y0xJY4gfzjmkk/A3t3qJohLlMc4FJ0/E5hA/2St2u6dtyygUUnvd7PPKTOOwmDHmutryqsaGrMUooza5/d5Gxo2QqYvWzY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=TFsSMPCj; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=zB4EuzSw; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="TFsSMPCj"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="zB4EuzSw" Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 052D61140195; Tue, 18 Feb 2025 02:46:14 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Tue, 18 Feb 2025 02:46:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864774; x=1739951174; bh=kffhPVLZqZ2K2dG8bURuhhVJD3XSlGoJGWNURBQ9RY0=; b= TFsSMPCj+eILx6hD13PXzaS4lMwzDYwobJwE77WOGJ8dOhNQnPbN4KtE6ipEyG3K ipROgynPSkRQGz3wWDhdIrFVXGrLnIlsoIXlcdzpP3N6GdPIdnorMSpsA5dJfZpR mtsWOu9UE+zPfaFcjptOZHlT7oZDuLObLOA9Jv8YO3eIWoHpRSDRRTfKeBJae3e0 JLPAuB3xXs7RcyeDu3Pu8eRMXM6/LMlCUEGbvXmwEfWA4S0rnOdXi5taZrin8siM cuKIr7JlcbT/ovurgVYAoQyAPlzHVYyaRmfi84tUVin6DLaDcSUXi2U4qRZXoMKn K9KWM1pBtA+Nn6wj/06Tug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864774; x= 1739951174; bh=kffhPVLZqZ2K2dG8bURuhhVJD3XSlGoJGWNURBQ9RY0=; b=z B4EuzSwDzJS/XTlAMKzu/Wz+pWeimalmy11QlO2GFWVVJqvqKJyW1hJtTfefTu55 rx8G4Jkkvybwx7MiV0FTeTQNvnfRtHfxG9Y1Kq7NkHFnjYp8ak8BhH2ctOBErNKV S2FqEgN4rzWTIjUuM/JwtxMwPRGXzJm12Hi+hX4owdVOCbkOlT4/xNe92FnPm1HH AlTlA/o+/EkSbQUiYN++luSfOFMj7fRquP8yIyAwd5CJMVPyRKZ/mkrauCYmVfWx QK+WgGXUaTdRyWhRx+YJcbdsHZOrhF2TmuovFOVKoDDJZ4Lf26+LnZgiTetb5eLQ AI02k6pINeAi8PooytRSw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrih hlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:13 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 5b1d529b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:12 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:57 +0100 Subject: [PATCH 09/12] gitk: extract script to build Gitk Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-9-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 Extract the script that "builds" Gitk from our Makefile so that we can reuse it in Meson. Signed-off-by: Patrick Steinhardt --- gitk-git/Makefile | 7 +++---- gitk-git/generate-tcl.sh | 11 +++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gitk-git/Makefile b/gitk-git/Makefile index e1f0aff4a19..a396eef581e 100644 --- a/gitk-git/Makefile +++ b/gitk-git/Makefile @@ -8,6 +8,7 @@ gitk_libdir ?= $(sharedir)/gitk/lib msgsdir ?= $(gitk_libdir)/msgs msgsdir_SQ = $(subst ','\'',$(msgsdir)) +SHELL_PATH ?= /bin/sh TCL_PATH ?= tclsh TCLTK_PATH ?= wish INSTALL ?= install @@ -63,10 +64,8 @@ clean:: $(RM) gitk-wish po/*.msg GIT-TCLTK-VARS gitk-wish: gitk GIT-TCLTK-VARS - $(QUIET_GEN)$(RM) $@ $@+ && \ - sed -e '1,3s|^exec .* "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' $@+ && \ - chmod +x $@+ && \ - mv -f $@+ $@ + $(QUIET_GEN)$(RM) $@ $@+ + $(QUIET_GEN)$(SHELL_PATH) ./generate-tcl.sh "$(TCLTK_PATH_SQ)" "$<" "$@" $(PO_TEMPLATE): gitk $(XGETTEXT) -kmc -LTcl -o $@ gitk diff --git a/gitk-git/generate-tcl.sh b/gitk-git/generate-tcl.sh new file mode 100755 index 00000000000..46bba6d2464 --- /dev/null +++ b/gitk-git/generate-tcl.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +WISH=$(echo "$1" | sed 's/|/\\|/g') +INPUT="$2" +OUTPUT="$3" + +sed -e "1,3s|^exec .* \"\$0\"|exec $WISH \"\$0\"|" "$INPUT" >"$OUTPUT"+ +chmod a+x "$OUTPUT"+ +mv "$OUTPUT"+ "$OUTPUT" From patchwork Tue Feb 18 07:45:58 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979165 Received: from fhigh-a3-smtp.messagingengine.com (fhigh-a3-smtp.messagingengine.com [103.168.172.154]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04FC61D63CE for ; Tue, 18 Feb 2025 07:46:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864780; cv=none; b=AdeeMVCHZVgFNWR1kzwdAeZl7S/Wam2+qylrHgDx9eCbvnStiBfwtEtav4Ua1owCyyS9A5b4Q6wMTouqKQV8N5pfRwvtBzwv2XB59uPx2CI/+Svap7hfHpTCDEfpmh6rwveeh8cbmnld2nK2o06ccdZd0SRBXFZE+5I5GTrAqUw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864780; c=relaxed/simple; bh=cXrRoGNuIHrGG39QH+1YHhc4gAZhe2/r7WqBr7IooOk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qUqzJ/plRqrye219MKPQc+gmEXPY5uXnc0/M5HpVOyJJoeKEAGCSLqVL66C+lVL9GH2eYeUhX8EbR0Qi7Jx+YcGRzI+zVY9+AAr4waq2chEb+n0ylo/utOGtRNhWLQOqefhehCcagZhs7H/xYI8FC4j8VmkC9JgtWR2PjYPM0Ew= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=GC7PDBWO; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=zHOS9/VE; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="GC7PDBWO"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="zHOS9/VE" Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 122B311401C3; Tue, 18 Feb 2025 02:46:15 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-11.internal (MEProxy); Tue, 18 Feb 2025 02:46:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864775; x=1739951175; bh=/vAeO7JMaYsRftCPG+zvnzAFBLAT9TDrAXSMA9BFc3U=; b= GC7PDBWOtu54cDs0hdiiCli1oQA0+FSo/xFN8s4PHmVCpyhnBj4SK6nloJvxutT8 Vfn5RurH0Ujz3kj8k2lg0HeB2QSKof+XgDRK45LR/HAyhPgJSk/cz2hANkmlSQZ8 +SZMyTggbxWlX0lPLplbYeU0HX4AkOFZJPurW1clrphQP4ssqfMly1qTcAQeyGw2 Bl/6TkCw0knoEcs1q3YIBQcL3dEQi9HlZumcXexrPxoAWd/INxot1Yi/Ji/EoZnf erTzO8eHBzutyfCVllejyDIvx+FmnDkJXG8AmsGuo94a52DKSxIoltEpf62wWE7H ndm/NuaZHHhLfXCCdkRg9Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864775; x= 1739951175; bh=/vAeO7JMaYsRftCPG+zvnzAFBLAT9TDrAXSMA9BFc3U=; b=z HOS9/VE4kqJihTQsIe+Khxy3S7kaXxR5FhGyeIVTcF8TzYnIvjAMIZV+hub3Y7sY gmpWTFSwY3vv9bDGVLIX71Nc76YsTHUugbVlgaJ4NgK0QKSQSxjcmrsLsVXdttJ6 RduuposvGkttXJshNW7ajSdLj4A36btaofFB6L6vgfuhsi6rXSoISixldfYGVNKm 6zJB+b0+nq4df+kudTDNSq1M6v/bqbTTBhWzUEY66LWXOH8IbSdg7qAB5j71aUrg jKB85d4YaNE8cCZQSYoJRAs0ZFe2TtRRvdWxDBoJ+utb2/7JNpFIun5iCDWtOMmD Bte63d80ayuMYLqfKtsug== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrih hlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:14 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 943d17e6 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:13 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:58 +0100 Subject: [PATCH 10/12] meson: wire up Gitk Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-10-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 Wire up the Gitk graphical repository browser in Meson. Signed-off-by: Patrick Steinhardt --- gitk-git/meson.build | 28 ++++++++++++++++++++++++++++ gitk-git/po/meson.build | 19 +++++++++++++++++++ meson.build | 2 ++ meson_options.txt | 2 ++ 4 files changed, 51 insertions(+) diff --git a/gitk-git/meson.build b/gitk-git/meson.build new file mode 100644 index 00000000000..7b16cd3c4d3 --- /dev/null +++ b/gitk-git/meson.build @@ -0,0 +1,28 @@ +wish = find_program('wish', required: get_option('gitk')) +gitk_enabled = wish.found() + +if not gitk_enabled + subdir_done() +endif + +custom_target( + command: [ + shell, + meson.current_source_dir() / 'generate-tcl.sh', + wish.full_path(), + '@INPUT@', + '@OUTPUT@', + ], + input: 'gitk', + output: 'gitk', + depend_files: [ + 'generate-tcl.sh', + ], + env: script_environment, + install: true, + install_dir: get_option('bindir'), +) + +if intl.found() + subdir('po') +endif diff --git a/gitk-git/po/meson.build b/gitk-git/po/meson.build new file mode 100644 index 00000000000..b1ed0198285 --- /dev/null +++ b/gitk-git/po/meson.build @@ -0,0 +1,19 @@ +import('i18n').gettext('gitk', + languages: [ + 'bg', + 'ca', + 'de', + 'es', + 'fr', + 'hu', + 'it', + 'ja', + 'pt_br', + 'pt_pt', + 'ru', + 'sv', + 'vi', + 'zh_cn', + ], + install: true, +) diff --git a/meson.build b/meson.build index 20159cef83d..5f2db6b0419 100644 --- a/meson.build +++ b/meson.build @@ -1957,6 +1957,7 @@ if get_option('docs') != [] endif subdir('contrib') +subdir('gitk-git') foreach key, value : { 'DIFF': diff.full_path(), @@ -2010,6 +2011,7 @@ summary({ 'curl': curl.found(), 'expat': expat.found(), 'gettext': intl.found(), + 'gitk': gitk_enabled, 'gitweb': gitweb_option.allowed(), 'https': https_backend, 'iconv': iconv.found(), diff --git a/meson_options.txt b/meson_options.txt index afa908d6c53..4cce8a81154 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -41,6 +41,8 @@ option('gitweb', type: 'feature', value: 'auto', description: 'Build Git web interface. Requires Perl.') option('iconv', type: 'feature', value: 'auto', description: 'Support reencoding strings with different encodings.') +option('gitk', type: 'feature', value: 'auto', + description: 'Build and install gitk(1), which requires Tcl.') option('pcre2', type: 'feature', value: 'enabled', description: 'Support Perl-compatible regular expressions in e.g. git-grep(1).') option('perl', type: 'feature', value: 'auto', From patchwork Tue Feb 18 07:45:59 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979166 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 327C61E00BF for ; Tue, 18 Feb 2025 07:46:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864780; cv=none; b=T8zHd5HSNJugxnXIQPIxCRctE3+bFse1RhkD1Gxup2eoBvGbWyBkulVvJClW9eWvzHCTfv8Pj6Z2p744cA8BVeu1+SLmClIG7TfdRmNmG1PDd5S5v62FQXzX+xr29q/x/Oyc/bVPFJai6UbdqoWqGMGUqTRza2Nhi8H5BsK13gw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864780; c=relaxed/simple; bh=gTMLGybaWvWQ3pjOoPFj17/B1oRBi0cH6+jroQcy/MQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=bVjh5uzclXp9A3DtAIIDUO29I0V796Pq+xt3nJK8ZDCl6W3J0MMuBVaARGi0/9E06/etkulI+eS+hwKkNcRH4dVbOe6svEUKQN6g8He8CDov8klTsHY9UQTqFYvZQFAv41cugER50GpqRfTV8oslm/IbTidsPqWKEXT2dyAu6vw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=lk84aT4Q; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=reJ2IAMQ; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="lk84aT4Q"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="reJ2IAMQ" Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 164BD1380A36; Tue, 18 Feb 2025 02:46:16 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 18 Feb 2025 02:46:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864776; x=1739951176; bh=6XDfuQyq6DMaf4dtdjQtc0eJ6cYncOUgpzOlNcQDWXg=; b= lk84aT4Q7bMJzgLqqtbhovz6K1xe9L6g4JVcLuv7pxuD5WMEjmCadF6VG+oTDCKJ l62vDGcx12CA9U+oiRWY+VLT41T/2dM7Dr1mM4uVJCpOtjoDJUm0oYO96zvvqJBK nk2u6AoCrd2FfaWW7ogLgkzR/+QPhiKzRmXbdv1qhprvyffMGyS8sYNxdSF7wRUp zQLpBD7f/fpdD0nFs4XobETntBh8WZYYtGuprU36XzmPSnco9IkSIBnHZ6wEf0av kVqz3nsepcSNIPnt9/DY4kXLOCNJYio+G+J5p8nW3c4OObu/mI/25q9JnyjDh20R 0MLJzaakMwmbGfcEpvtxxA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864776; x= 1739951176; bh=6XDfuQyq6DMaf4dtdjQtc0eJ6cYncOUgpzOlNcQDWXg=; b=r eJ2IAMQJdmoADNZbLouV174sB8y7dN3FkLKVfy8+2was5bm0LarVrmIOqU7wjqsY hkqUFfwr9kZWag/ii5JmvCPq2z2dLLo+Pf1lNRBWuSjls1VSvYSCliqSnVzMUA7i fj01xNHTsiLcsjGvDcBJg2QbyzAI2Gkp4x0SlLhREoaNt6ej4lgsTqzRpynj/dXD HziS/2vU1SnREhsK0RJ9EWqoWfsy8rxqzymS0sFGA/BUISOcSE+19tuXNzxPAF3h xDE+pu7Pgs6aLj5zU2+DjbEe3tM6JKJ+rL9l3Tjy0cGwcW3np0nbp6ACxQZp6z85 zCjuGJUIylzeAMdPRybxA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh dprhgtphhtthhopehmihhrthhhrdhhihgtkhhfohhrugesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:15 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id ef7e8f2e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:14 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:45:59 +0100 Subject: [PATCH 11/12] ci: fix propagating UTF-8 test locale in musl-based Meson job Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-11-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 The musl-based Meson job is supposed to explicitly specify the UTF-8 locale used for testing, which has been introduced with 84bb5eeace7 (ci: switch linux-musl to use Meson, 2025-01-28). That commit had two issues though: - We continue to refer to "linux-musl", even though the job has been renamed in the same commit to "linux-musl-meson". - We use the wrong option name to specify the locale. This was not noticed though due to the first issue. Fix both of these issues by fixing both the job and option naems. Signed-off-by: Patrick Steinhardt --- ci/lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci/lib.sh b/ci/lib.sh index 028fea0e7b5..84d11452650 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -348,8 +348,8 @@ case "$jobname" in linux32) CC=gcc ;; -linux-musl) - MESONFLAGS="$MESONFLAGS -DGIT_TEST_UTF8_LOCALE=C.UTF-8" +linux-musl-meson) + MESONFLAGS="$MESONFLAGS -Dtest_utf8_locale=C.UTF-8" ;; linux-leaks|linux-reftable-leaks) export SANITIZE=leak From patchwork Tue Feb 18 07:46:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13979164 Received: from fout-a8-smtp.messagingengine.com (fout-a8-smtp.messagingengine.com [103.168.172.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE6291D79A9 for ; Tue, 18 Feb 2025 07:46:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.151 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864779; cv=none; b=fNJxsjACqKCpvYejqdK30AK8tFWM+fya+4huE+LZ7z8fW5d7AowDkYlsLVlY/WfaNRoR+eXGhhjHPVoxj9u/DCTH1m8cMgO28mL8LZXke4H6yvYEeWdmHjIJD4A2e9XqN9LyF6PDziErIjPOCJQDXWionbK5gUAgVLVAEq5L0RU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739864779; c=relaxed/simple; bh=UCyGOLWcxEZz3FREqBU/HY4EuaOY6eUVKanqJx4P3LM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UG/lCkPLdnfp2CdwuQAi6NN1IBs/NwY78MRqAkXc/EJQuMNDG5SVFOXGVVwO4Uxdhbf/HBpIjUODHLef8ReBDDi+oTIWu/3E0vo6Oa+WeL17wOkrPmJ3ynJN5wkXHza3GPi9ScArcxR0NC8ws89WDK2HOll7jpMljpYfpFGwmeE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=e5KBSX7T; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=QH1XPFVx; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="e5KBSX7T"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="QH1XPFVx" Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id 3F9C11380A33; Tue, 18 Feb 2025 02:46:17 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Tue, 18 Feb 2025 02:46:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1739864777; x=1739951177; bh=8qJVE1wuayywVks7MM9lL5vUp8HvipH4/qUnDTa5Js0=; b= e5KBSX7TKfDmCxpucjRCNKuneZONEUlb80IJKQauFWUx8AgJk1eowSuLlkEKDls+ bHKizyiUv1//96qeJpNrNKvl9OrAVdu7V94eK6yieaC9f4X4c3tcybbIItwL+me7 yilpK9IW5NdfcZlFWvYGH4KwFebp1l+nVWQq3oEJoBpMIBN7P+HpXOct7ltDsbCY PXtU0JsolhiucWsLstacdzs97vZ1S+7o1ilbQ9PBXlokY4WMJEXSCPJhtYO0060+ STylF1LeQyJsLfjnm/E6ZqcqON88eCkjIAvBYIfgreCzNT45BaZ2oZUkAmIcKPqN R8uenbIY+LuWXoTe87HhrA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1739864777; x= 1739951177; bh=8qJVE1wuayywVks7MM9lL5vUp8HvipH4/qUnDTa5Js0=; b=Q H1XPFVxO6K1lsQMCjZ/v27AcmHSMdJJhtfoHNmiOhKBlMz+YUG866E0GmK8C5kc/ uM9HEblZN4KxkfUXWNr2dycIDOc9RHaFBhYkIN1dNCtRX3ge1gysjKeGan65SG1T /JctLFbzmcOssCBwagivMvFj8a5PWnV2OI47BR6qgNHZ9U5aISM6as6gof5urraa CvxcJYZyYL9fCHTkIWX/kyg6k9dJ/0lJfIlaOxKrWEpq2eXTKT2pKjHX43/ONfEZ C1IDJkTmdknwCrcdFc+dkmp6GuUl1vnEbzLVymwG46afCOl9BVwm5hnZGfOIrE2o LG0ICkGZYGoEF9BrW+0dQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeitdejvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepvddpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh dprhgtphhtthhopehmihhrthhhrdhhihgtkhhfohhrugesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 18 Feb 2025 02:46:16 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 9800e0c9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Tue, 18 Feb 2025 07:46:15 +0000 (UTC) From: Patrick Steinhardt Date: Tue, 18 Feb 2025 08:46:00 +0100 Subject: [PATCH 12/12] ci: exercise credential helpers Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250218-b4-pks-meson-contrib-v1-12-c3edd292beb8@pks.im> References: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> In-Reply-To: <20250218-b4-pks-meson-contrib-v1-0-c3edd292beb8@pks.im> To: git@vger.kernel.org Cc: M Hickford X-Mailer: b4 0.14.2 Wire up credential helpers in our CI runs so that we can rest assured that they compile and (if tests are available) function correctly. Signed-off-by: Patrick Steinhardt --- .github/workflows/main.yml | 2 +- .gitlab-ci.yml | 2 +- ci/install-dependencies.sh | 2 +- ci/lib.sh | 6 ++++++ 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5f756dfc2e2..9959b61ece2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -265,7 +265,7 @@ jobs: run: pip install meson ninja - name: Setup shell: pwsh - run: meson setup build -Dperl=disabled + run: meson setup build -Dperl=disabled -Dcredential_helpers=wincred - name: Compile shell: pwsh run: meson compile -C build diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f29181708f..bb7d0c9ef1c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -164,7 +164,7 @@ build:msvc-meson: extends: .msvc-meson stage: build script: - - meson setup build -Dperl=disabled + - meson setup build -Dperl=disabled -Dcredential_helpers=wincred - meson compile -C build artifacts: paths: diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 332ba960039..0df74610d06 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -58,7 +58,7 @@ ubuntu-*|i386/ubuntu-*|debian-*) make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo default-jre \ tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \ libemail-valid-perl libio-pty-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \ - libpcre2-dev meson ninja-build pkg-config \ + libsecret-1-dev libpcre2-dev meson ninja-build pkg-config \ ${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE case "$distro" in diff --git a/ci/lib.sh b/ci/lib.sh index 84d11452650..f561884d401 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -348,6 +348,9 @@ case "$jobname" in linux32) CC=gcc ;; +linux-meson) + MESONFLAGS="$MESONFLAGS -Dcredential_helpers=libsecret,netrc" + ;; linux-musl-meson) MESONFLAGS="$MESONFLAGS -Dtest_utf8_locale=C.UTF-8" ;; @@ -359,6 +362,9 @@ linux-asan-ubsan) export NO_SVN_TESTS=LetsSaveSomeTime MAKEFLAGS="$MAKEFLAGS NO_PYTHON=YepBecauseP4FlakesTooOften" ;; +osx-meson) + MESONFLAGS="$MESONFLAGS -Dcredential_helpers=osxkeychain" + ;; esac MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"