From patchwork Wed Feb 19 13:13:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13982177 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 CC9BF1E0DE6 for ; Wed, 19 Feb 2025 13:14:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970847; cv=none; b=FGTAfq4XIL7Xqec7iVdIrGkoAlo0jjfporvdJZ0LiPhSJdGG7cHqRoV6g4anleqhlEtR8AZOjz14D6wsImVtAMuaWDhLN0cMxmY9heV06wONJzU+AhZo0moGX5+JLZ+sKt++LE2OHwax89O5kf11BIEN1LmQNHnwPK0nBobByMs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970847; c=relaxed/simple; bh=Rd9wQ5zgXkkM3T2Gu64uxETczmCGqKhp0H3DqVxDsas=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Az6Dtzo3IRpb6gGHwV/1X1gS5wbKakHZi8Y5ehww+o9I5T0Um5y7hnd69fU7FNdBTkobQ1lRaqlKAO5t3XCK7a9ozB3zYekueTD/3e9WSQVkAKHKTz6rlOAEDp/k4+Se4Peod7q556LxZzYSu4bnAKsWOcoafRyvd+7qYc6xzlI= 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=HTe7F3d6; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=S6WBOXvP; arc=none smtp.client-ip=202.12.124.148 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="HTe7F3d6"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="S6WBOXvP" Received: from phl-compute-06.internal (phl-compute-06.phl.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id BE6E21140090; Wed, 19 Feb 2025 08:14:01 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Wed, 19 Feb 2025 08:14:01 -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=1739970841; x=1740057241; bh=SyHglFKHmLfI+/6kFH4OxJTSPVCdEVLD9u+PUcUmZMM=; b= HTe7F3d6t6qJpbBxm7AQXt9g1ujHnvrc1RV2k6Qiq47f+ycmc4cp25n0021W4DTE YqBg08dI90ah7Gqu2VRKlEpoNY9K5wkvcVA/jd28zFUPyS+9TEVqyzcjO8RvEWg7 E7G8GSbOxgaXZzVdyumEC22tFDWlCu33vGlZGbYZIxTQ7AOSAZPmVimfJDltOaZa dcdd/sj5vHyNwVMaFJANwgdRTd/olZzmgjam23Qit1i+BzUxeaATbZADwORvgqtD cpmx/XmAiWvHAKwgs79GO/zjDU0P2upemphZfgekEZtO3ViDEtajgSFIa1wgvIfI MYeY5pFiKaoiZsY5LNxFBg== 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=1739970841; x= 1740057241; bh=SyHglFKHmLfI+/6kFH4OxJTSPVCdEVLD9u+PUcUmZMM=; b=S 6WBOXvPHkQJOxj0iD9T091AwI+lpKSqFLTAXlY0/bMrvK14kaA5v+dyjxjEwTJ2o wqj7K4rsorMDpqXUAW9cLs+hwU6Lt5yd+ekim8VZDx75Wy66uskdsjFBckBrP9om h4mNi6E/IVhM7E5reM+GrHDb1ZeXk+j68QjvXR9gH7Hw9hib8C1jT250TnBjVfJ/ fGlcczMRF0uTaxXHHNS5Ugz10Yhugm22eAmVmArzZwPryTwXEeexJCvTjTgI4X6L G5apICkO1V/ogvYUxZIBgmXPoLIzSnmQjGzF/ruoSrFKaTI10UFzcLFYiiPSlNfU ZMZeB+X705ncGfwLWyC5Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeigeeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepgedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithhsthgvrhesphhosghogidrtghomhdprh gtphhtthhopehmihhrthhhrdhhihgtkhhfohhrugesghhmrghilhdrtghomhdprhgtphht thhopehjiehtsehkuggsghdrohhrghdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrh hnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 08:14:00 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id c41598a9 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Feb 2025 13:13:58 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 19 Feb 2025 14:13:41 +0100 Subject: [PATCH v2 01/10] 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: <20250219-b4-pks-meson-contrib-v2-1-1ba5d7fde0b9@pks.im> References: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> To: git@vger.kernel.org Cc: M Hickford , Junio C Hamano , Johannes Sixt 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 Wed Feb 19 13:13:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13982174 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 B6A491D8DFE for ; Wed, 19 Feb 2025 13:14:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970845; cv=none; b=W4qdtkdTrTFRLGySjlGuD/1vqBHz5TDz/470A01R1dU+kly0eBjC85IC1gPRYYtOo5q+/IwTfp2pt6mGawNjCZ4zoAVyo6b4sHl8EzukKpKT85MLkFf4xzX8vQnTCuh7wGeiRufwpi1uOagEl49bb50UZNxUMAvoQ7yru9ZBRro= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970845; c=relaxed/simple; bh=HFQWyZjRhwHglC3UhVOgAr7YOWEKQdQgU17NhNA0iyM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=owJGxdLsB+AtTioMCd1M2Z4VaoVEdqHNVfL53ofMkU4EqLfwKlcDQJmypYF0qsVPRqHuCu/JBIK77l66hwRxbAf2skQ18xXgi6seBXB/uNkrfKKGw//XMZCR3juQKNWnso17ht9kNofkYx+7vu4VPb5Swnh1LX4JVpz7GMlF9Fg= 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=V4+A0its; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Dm5iDcOZ; arc=none smtp.client-ip=202.12.124.148 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="V4+A0its"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Dm5iDcOZ" Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id B1F9C1140095; Wed, 19 Feb 2025 08:14:02 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Wed, 19 Feb 2025 08:14:02 -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=1739970842; x=1740057242; bh=vgt4wMFS1iiz6IOHy6D6csP0Vz64K+GXFckqy38ABfE=; b= V4+A0itskzka8v8rzUR+SN1eEhR1DVzz0wVcHd8oSbBEE4EGZXol5hiedrJMyn1S 4peBErvTvfETnnRl4/mRhJap7f+Wa1RxLhOTZCg2OZyehaKpE9zzE+28/Glw/kpf orycz0EPUXyIcx8l+WbahVo+GmXS+xPaXggRIEcCDSDGtjuq2jN45lquuLro8LsL g3tdSDq9UCHBZPBFFk8nJIhsELaRNt6cZURl1PWhhfgAwFFVlLhnHODGoHm6aVov mX9Bf6522tqSv3x2Ftb57QlYA0SOcL7hDfyFH+SD3jADU06P0dnbJCqvYP5B5wO7 1MWm4Radrl8rc/sIPOa+kA== 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=1739970842; x= 1740057242; bh=vgt4wMFS1iiz6IOHy6D6csP0Vz64K+GXFckqy38ABfE=; b=D m5iDcOZb/Us0mPKSNmALjBNpGCJiQ4+UU4oyOe8nRk7xFW78POiRdCBKgNGM9qsv HpEpLhKgdlcjC1pIMc1kcwnbb/WjpPqsP65kxsDVN1Ft2J55OHqPlkKboPhgwSZC 7EStpVdyhsLBhiveA9Rqrba6avWXNtv7871esAvDVMzQE8sZ4k74SxlxmFf+qc1B xfIQDJsjvr9Ny/T/s63BTh9bzw9lxHuzimK6NXaviKnOPCbeRorH0ryvBBF4dLbs uOnZ3ThHJBVj5CSKZKBkpTQUaCAeCq6TIZT9bCDrNWc2kYc6Jb1wj3pEQWTTEUWI Lb22O3+qFeJ4xX8OUDYZw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeigeeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepgedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrih hlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgt phhtthhopehgihhtshhtvghrsehpohgsohigrdgtohhmpdhrtghpthhtohepjheitheskh gusghgrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 08:14:01 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 0d2ce53b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Feb 2025 13:13:59 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 19 Feb 2025 14:13:42 +0100 Subject: [PATCH v2 02/10] 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: <20250219-b4-pks-meson-contrib-v2-2-1ba5d7fde0b9@pks.im> References: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> To: git@vger.kernel.org Cc: M Hickford , Junio C Hamano , Johannes Sixt 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 Wed Feb 19 13:13:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13982175 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 4C5FE1E25EF for ; Wed, 19 Feb 2025 13:14:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970846; cv=none; b=ZH3d09mP+VOP6ajUO2k53/vySC7TJK/U3Qhoe2ekDwodAhtIXXkVxJZQO9EB28ioXmyzYPrVlCfnDBiHLEzHNH2Zfg6ewAHOwi+C5d4l3p2vAP4XIcVLJSfIB3Ooz2nVImW8r/5xoD7GwYxW3UMSH9uq8XasZ+rrKD2A8sg4f7I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970846; c=relaxed/simple; bh=P7belojgmpWqg6uu+gumhfaimrGgyr69IOfM6F5m33M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nV4SrvSNgZMwz/ngoJYGQqasZP6V1pqCMST3uTKgT1iT8yuYClUWKMrDOcviF1vuhjWe5C8GEz5lNYyrdld9sXOgcplAckg8zW/XcwijS5VpAMyKx7t5nNH98aVKB1ljUoCWVNIDq4GhNvs47w4VnyFYXUa0lmclU1qILQ/djp8= 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=LxHBQ8Dc; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=DEjkpXdi; arc=none smtp.client-ip=202.12.124.148 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="LxHBQ8Dc"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="DEjkpXdi" Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfout.stl.internal (Postfix) with ESMTP id 57CD0114015E; Wed, 19 Feb 2025 08:14:03 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Wed, 19 Feb 2025 08:14:03 -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=1739970843; x=1740057243; bh=SyCuoN07KpprDPsZYdCQnC/i7dD0nywt1RH8i+RgF20=; b= LxHBQ8DcyK+bLFZg5HBdSiYRqz2Av2afWO3442FHskyiWdxEhp2MX2qET0i2OZOM d/eHh4h4WLcLobahm1T+T9QmvKRqBDjNQIE2Ey60TI1mD/oh+Dr8xMxq3I53ZJnL G6J1PAfsoDIRBRHnpLTeZ3ZNibCOdzm/YH7L1kxKKUmzBVfv6/kaOhu0RnFUYJ/8 tZle6WaF0EPqGBDNwue2bFOtjLMb2nTHRPHVIVEvMhvt/Cf5w2twPXVhl7CRWTfX tJuN+M2TBBntpU2RxCtih5jxHmG7MFfZSYj+JqppAL40D6Y1L4+G5FeNy72rHbsH 2BGDgcLL9kftqT0z8/szrA== 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=1739970843; x= 1740057243; bh=SyCuoN07KpprDPsZYdCQnC/i7dD0nywt1RH8i+RgF20=; b=D EjkpXditDsy9AvaSuzjQvh4NADjUpKSdwZcE9yj+o5LiOZTOu9OeZSrx1+Uobqyx 198yhLnhjK585czpYw4b3EP+JmzMm0OKBkqwn67cAD6l7/3d0KhmYdCHEhLPFtys G4xsvVHR9p9n9js6/iHSOoB9ue8OYLn5bqzz6bylFmcAN2gwwRQhZoE9okKmaPZi S3PDjGdZNgHjtX8ct2OnZWtgZnhjGyzSaOdE7RBlCgd+PFgLaD2CB9P48UnHnG5J E3FmuAGEfmOZ0iLBO0iDtW5pzR5Ud5Ul6kU2wswEj7ZYdh918IKZaMU5o2Fmkklu dwOpH8URQG6cjzW0MUmwQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeigeefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepgedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrih hlrdgtohhmpdhrtghpthhtohepghhithhsthgvrhesphhosghogidrtghomhdprhgtphht thhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepjheitheskh gusghgrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 08:14:02 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 3f1b2b33 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Feb 2025 13:14:00 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 19 Feb 2025 14:13:43 +0100 Subject: [PATCH v2 03/10] 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: <20250219-b4-pks-meson-contrib-v2-3-1ba5d7fde0b9@pks.im> References: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> To: git@vger.kernel.org Cc: M Hickford , Junio C Hamano , Johannes Sixt 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 Wed Feb 19 13:13:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13982178 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 DC3B91DED6C for ; Wed, 19 Feb 2025 13:14:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970848; cv=none; b=ts65YzCJuj6Be7U4MoCQnf6Gp7mpoqwnyPqjPwXD1GwX+q+TEEwiU3KCSGWVN4blupcQWxvUFAahBWtMHaoT5KbKZOfrpzyZ3GnD7qV3R1/nQXt66X3OxGlyLdszgW0uNRCUvGvYbgEEZ2dL/qO0wVZqKCOnEPpwL9QOLRYMdu4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970848; c=relaxed/simple; bh=ev25QBCFxCsMROqadZNqNUC0fFcjryvDj+jK0eMMpkQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oEY/pVq2s7wBhGakpb76J11kgSnqFoo5pLeghdQncNXhhZG66Q0kdlyqCeiQ0APcEaW2mt9s3ybV8TXbcwPL+FnzewXMW6DsdPW5apf6rvMQ2a+lqcPDAkdEzFjM+zAFCefgkAg9no78pJq0eqiBNiT/VVSy32Cu4cMVSYHTxCU= 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=briaG+Uj; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ocpCAKDp; arc=none smtp.client-ip=202.12.124.156 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="briaG+Uj"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ocpCAKDp" Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.stl.internal (Postfix) with ESMTP id 613742540113; Wed, 19 Feb 2025 08:14:04 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-08.internal (MEProxy); Wed, 19 Feb 2025 08:14:04 -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=1739970844; x=1740057244; bh=6YteMnT3qiXJXMXtro8FgypLgbVaKSqZCam4z/x8vTM=; b= briaG+UjzZ3SKtd+QjCTJto5d4dqoW9vbHdzYcVgkJlaIdMpNKc4kmtHxQEYXIJN AS7P+DHDgqNDoVGBHTjlzRRLeNRmI25ziTyAFAcCrDaCjDJh5g/26peB12yMQ3MA 8FnwUPSGeMwxmjIkw8eHyFCO3fzTqfDPUUtkj0tv+jbqmo88x5ZaN0hbm60WvYbi K5Dmp9BLs8wc9cjWUcYY84vsudZDdt9g3DPpEfgWm+LEZylVqDOkM/ZcNR0bCPIg sFlsuTXhL8y1C87fJycoX5q8Xw1SRyJFbddx6r+Ke/+PGN5RCjWwd08aCAoOb92C DqQmfO9u4A+AsXij/iJzAw== 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=1739970844; x= 1740057244; bh=6YteMnT3qiXJXMXtro8FgypLgbVaKSqZCam4z/x8vTM=; b=o cpCAKDp+WCq+WlVQlh1Mdpr5jKeJxUCQDxMi7THtv7asxGAs1jGpE6wCyNfzwkK0 jaio+bIxHTc2QNSpKLZ8YdA1rk0HITso7q7kMV5LVThBZHcixjFVflqiUjtpLb3P Jr1x1qhYL1vCcgzkhOfgoSmyt/8n9O6V0UCO6HpqoYpuemIasGuVOdGvQdO54G51 ISL6dWdJGi6ZSiV0swZzEIGLx/+8f5Un09/scx7DqeLhxKYyrMYhUkLGOKo6gT5P idFHQj0A0NBXe9BoEw0rF88bu/lH+UClXpNlWuMMv7i908NQSmKlr69+tc4TqPC2 R6mz0Ic19ihPvyGU72BxQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeigeefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthekredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepteeffefffefhtdevudehtdfgfeefhedvleefveeh veehveeiteduteejgfffueeinecuffhomhgrihhnpehprghsshifohhrugdrnhgrmhgvne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehp khhsrdhimhdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphhouhhtpdhrtghpth htohepghhithhsthgvrhesphhosghogidrtghomhdprhgtphhtthhopehgihhtsehvghgv rhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepjheitheskhgusghgrdhorhhgpdhrtg hpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrihhlrdgtohhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 08:14:03 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id ec538918 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Feb 2025 13:14:01 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 19 Feb 2025 14:13:44 +0100 Subject: [PATCH v2 04/10] 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: <20250219-b4-pks-meson-contrib-v2-4-1ba5d7fde0b9@pks.im> References: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> To: git@vger.kernel.org Cc: M Hickford , Junio C Hamano , Johannes Sixt 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 Wed Feb 19 13:13:45 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13982176 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 DC4321E102E for ; Wed, 19 Feb 2025 13:14:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970847; cv=none; b=Aq8YlQAB0oxgut+YTGX38fCqPdvK5vTkk1sJ8QAXE7Q2l4NEsnm1Nnid/NtmvjJ7jLVB1cCUjwd+8WeYTWIeuJCGVn4G0D2hT7abN3u25ZdQMfgvto7C17uM0LtUeqhbpQmjd0Mt/weHmU8vd1lpo6y7YI7BUT7Hhv8LIwZVVG4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970847; c=relaxed/simple; bh=mY4lzOivTptFMKbuCLdMMve6j/1W5yee0LWySaRZWxA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Qi2Uhj05S1U37xwa/tdrLx6sCZQmjRigi9HqwOegsyjQo3hjzsqhFblEBfr/ODCV7udq+P4kTJFczdirtBk4g5u5bgB6MjSOC2SEOCG1MNqCQ3L4YwFUjd5qTG91OfAqxDjn3hNf3DJRSdr9bOS+LIutdc7UIKwzzCJB0MmeLgg= 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=E39s3H2z; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ioo/qrCp; arc=none smtp.client-ip=202.12.124.156 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="E39s3H2z"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ioo/qrCp" Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id E76482540149; Wed, 19 Feb 2025 08:14:04 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Wed, 19 Feb 2025 08:14:05 -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=1739970844; x=1740057244; bh=coYQ0IU816FHyvUOYVSuNNf+UUjRIMrOXaV9KEb76Rg=; b= E39s3H2zz1NhiFRQBEAEgz/bSvirU2LIr6gzYlV98YUqOqPhD+mJevQ+k4iPRFPR TAWOWI4ilqrmMTzZA3OB3tPmWb/61K4qOI1bUAIpYCvrJ5DTEBKHrZbw7/bEhiWK U3dN2OBhGqmMAcx/Oz0ByTZufuUQ5YAG7RYQe8QnWzWwCyEetefAtzSP6bnawi7+ 1MVAPc1EUbnyZsgh6PEW5szuvzlMJtJSYeLQ6hEzRs88ab52pxLdwfuoA/Bc/x3g 9on87lFkMa3LuRab+nBLo4Ja7yYlMuB8VQ4HXukHDYQyoH3wsMBksc+n66cE7oUm Dfhqkq7fonau/lR73ISlMw== 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=1739970844; x= 1740057244; bh=coYQ0IU816FHyvUOYVSuNNf+UUjRIMrOXaV9KEb76Rg=; b=i oo/qrCp3GLN38On1XMdSCYxr1znTvEjJTDSn/T5CMnT7r50exbsUCRT3b8UjBaPm 4l+oxXaZeC/AQQKeBgejHCN3EUtFFEN/adZjmx4jm7j//rz+bvOY31P1kVv7Fo6C y4NqJ9zkESJGnojPyNYsZkIDPvN9pCVNRnTjjLe04TdMCRMPvCjyBTMyi0PEvtUX oAQRtZhcj0D0TjpvFNcPIVu8fsSozYc3TQS4WijrJbGofypzu54VT6gvmfTHtbTZ hbm2xuBjb2jDeK1Fmg6mB8sqIVGVtsmxxvJe9c/7DfzAhVNnUT1LTrfNVq3GHwUT VoaAnr/35T/bVbz8jh7Gg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeigeefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepgedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrih hlrdgtohhmpdhrtghpthhtohepjheitheskhgusghgrdhorhhgpdhrtghpthhtohepghhi thesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehgihhtshhtvghrsehpoh gsohigrdgtohhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 08:14:03 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id a24d8f26 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Feb 2025 13:14:02 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 19 Feb 2025 14:13:45 +0100 Subject: [PATCH v2 05/10] 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: <20250219-b4-pks-meson-contrib-v2-5-1ba5d7fde0b9@pks.im> References: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> To: git@vger.kernel.org Cc: M Hickford , Junio C Hamano , Johannes Sixt 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 Wed Feb 19 13:13:46 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13982179 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 2F2A81E5B65 for ; Wed, 19 Feb 2025 13:14:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970848; cv=none; b=cV29dD7tKbIoFq1QuOzIF/rgUrm5ZMXI8shmxRK09Euu+ylJa7fEPeqQaH0lBieNAN4F/H6nhYjzRZlDZLI08EMOO4BarmvBqzct2F/b5uu8qNmAEEMfuDBK7yqrTE5DwHuzQWKGjiqoPPRDk+vfFYPsaNngIKiY5IQTu0iKi2Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970848; c=relaxed/simple; bh=eRwHtFAyoQgcj+0HFEz9Z5Ie6fOL57CVzPz79mUMfQQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=hJYHI37b0BHXJ5yvIgViBD1HHD3Na/merw/kDO3Nv+oQyAx+0xMS0CxTJTbpArgJAOSSZ4zzCUW6NlTN14KZyZGnUNEANhcUkq4rF76ApqFTEeMor+hq6FCvJaZV9MALywr7Kf8ayk+dahqL6OfR3SbFh5PDiOgDYsLTYTsQASk= 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=D1BGrpIy; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=wEU35cep; arc=none smtp.client-ip=202.12.124.156 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="D1BGrpIy"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="wEU35cep" Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id 3FB9A25401FD; Wed, 19 Feb 2025 08:14:06 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-01.internal (MEProxy); Wed, 19 Feb 2025 08:14:06 -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=1739970846; x=1740057246; bh=O5Ndf9GhTLLO3WnTfVuD9GBrmIfK/TNghTycdhpEPLk=; b= D1BGrpIyx0AD0XwdBPrZW+FxZI1kzI0+aHHFnnHBPVjoSMIlJ4i5kTTv6EELikEN Xhtc/B2KK5/QIGHjhxqhLymuOQUqLAY8WGlNjCvLVH4VsSM8p9H/SkIirlgkQlgQ G8Ynq8CV7+lGSCJ5Hno+eINIW5BQJf08Twc2caAHR1E74XRQxXxLcN3EkUllYNj0 YyTIDZXtvGNwe9qZ/oy3D1hrlLTkjg3heIR7qeu2oS8l2aGIubvLw0PvpcFxrQHa ffWrZT2O/sI/VkNGozBjNiAUJJuCHrnLGIMPuJeSvscb8zxF+y9Gi0y1JOrYM27I 1UUr13UtoqT/bnNouqXT1w== 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=1739970846; x= 1740057246; bh=O5Ndf9GhTLLO3WnTfVuD9GBrmIfK/TNghTycdhpEPLk=; b=w EU35ceplAXK4wYIcU7uemvcQ/TUw/neyE54kVR/7It3Kkx3SgtJbc9gFRjVJuMRL nOANYOdsUTm4bMnka/eeHLsS1QlncwfbZXY8uhEk+5cm+9taFbbByHSrxEYAfgOy //Q1+h6Znrh7IcR3aAmqv/z0oBND/pPcgUr80yMI7g5iNwNYrgpNBDvEUiYaRPiy VxLFXwyg6iebqnbKxDeeGCw2C548dqwr9vo9pfetfL3QambnEhQWlgzg2s0va27e nw1M4I68DmA9asQ0EzlUy/cJUdrWfqTPbFHQqqnyIdvnH6662weoQkMUrrqmob7r Q2E5YU6115Kx+CyTdcq4g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeigeeffecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepgedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrgh dprhgtphhtthhopehjiehtsehkuggsghdrohhrghdprhgtphhtthhopehmihhrthhhrdhh ihgtkhhfohhrugesghhmrghilhdrtghomhdprhgtphhtthhopehgihhtshhtvghrsehpoh gsohigrdgtohhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 08:14:04 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 9ff3b217 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Feb 2025 13:14:03 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 19 Feb 2025 14:13:46 +0100 Subject: [PATCH v2 06/10] 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: <20250219-b4-pks-meson-contrib-v2-6-1ba5d7fde0b9@pks.im> References: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> To: git@vger.kernel.org Cc: M Hickford , Junio C Hamano , Johannes Sixt 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 Wed Feb 19 13:13:47 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13982180 Received: from fout-b5-smtp.messagingengine.com (fout-b5-smtp.messagingengine.com [202.12.124.148]) (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 728B41D8DFE for ; Wed, 19 Feb 2025 13:14:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.148 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970849; cv=none; b=s+nOXGj7vVp/a0jCsBd7oJKGmiix9kMKeD1qR0pLrZLbSq+vpufRwQ24Og4F7W09FWPyuRB9WIbL/6phs6QUSQLE3KNtz3LZJunWZ5FNS852D/2tx09pMZx/rj2TaQ9ZxTiMkyc+iiViJcxs5YMWEJHipKIy7UjR+ve4Q0cOdcg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970849; 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=CNNoFC/ONd417DVJkjlY1RlPua3UuqTV8jwzC6wJQbJa3/kYLyqtYtn3jE7rGb48A/pvPMkZqQ8STWUHEC19dap9JakXNMa21W2/HJaw6iDWCh/oDX4EdBvc25bjkgP97aIRnz4S0Xfcz/7hyISxYdEdmn/WvDtNVqHeZLMLUTU= 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=RhcMtunx; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=pI9LDlVq; arc=none smtp.client-ip=202.12.124.148 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="RhcMtunx"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="pI9LDlVq" Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfout.stl.internal (Postfix) with ESMTP id 7F8A7114012B; Wed, 19 Feb 2025 08:14:06 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Wed, 19 Feb 2025 08:14:06 -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=1739970846; x=1740057246; bh=Jad/tC30baZfBxEqEbC4wLccM0Z8jZoIj0/JK63ZspE=; b= RhcMtunxXBLlnES3fjyuyu8IjAC+cYv9L6DQGc/4QjMa+pB5TsgokMZm9idLvRiq 4oY6BC04bzuPUmI+5vqAOJU6H3+jbc/SJVsJF5m6r1PFPIK4QJAtaS2x0R2jQJzT fZMQR7w7evMC39HfKJDh5kDycBOD58CctNjjOBPDiHMa3fn/6MYJ+Qvuut55UuZT uFurFyxax9c2GVQXFrIWfrNAoG9PR10yGv2u87jt/fZ4A6mOOABVtF0NAT7gNKNa Pl2TbKBP7yDhGSU2VyrXFMux+SXXnrBGaPhGgkNxRQfHo3/UVocwQl7SXdw4p4Ip vRT92H8FKJcs/QoubAWhDw== 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=1739970846; x= 1740057246; bh=Jad/tC30baZfBxEqEbC4wLccM0Z8jZoIj0/JK63ZspE=; b=p I9LDlVqkfJ/jMQYGvKkkJzfEXknrZdZLgCWE5FXzNLVgsFZ5riSTxGrmLZJD2J0k dJZnT3a6ba3fxdt3Rq/lkjb+MzMANjJfWbxIvAA+2u7fsfulGAtzuCbfU//tNGFE ugC0+/TX0YYuc6F1xRasF8SKlkWo2Ye5G44KD2K/CshaBGfe3Xm3IAT/GGoPsrpv IeHCie0VOhY8E6c8RC3ScuEwemYFfpMhR3a2vGowX9aEBIv2eg4WGpJnRRq+4/lw YBDr9pxcBL9RNgTlBMCbuON9AEhVuInsacNoF2vD8UU/whiWfaONaARoVfF4/yRq mcbx1V/DI4ZLDSwScZP0g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeigeefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepgedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmhgrih hlrdgtohhmpdhrtghpthhtohepghhithesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgt phhtthhopehgihhtshhtvghrsehpohgsohigrdgtohhmpdhrtghpthhtohepjheitheskh gusghgrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 08:14:05 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 3c2e9ae8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Feb 2025 13:14:04 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 19 Feb 2025 14:13:47 +0100 Subject: [PATCH v2 07/10] 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: <20250219-b4-pks-meson-contrib-v2-7-1ba5d7fde0b9@pks.im> References: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> To: git@vger.kernel.org Cc: M Hickford , Junio C Hamano , Johannes Sixt 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 Wed Feb 19 13:13:48 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13982181 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 D1FD11E8350 for ; Wed, 19 Feb 2025 13:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970850; cv=none; b=gZw0vSTkyOU661KbejFXxUhTeWb0YXyxKZezFNJiO/Z1OEZeRVlKdtFz8XhjsjqZibE+F9Lf6Sn10ARKc087CxQMSa2BJHbJE8yCaQNXDtK+r+vSTigqK4JZGq73oRFj/wyqn9h4u17zUfHb7FV+/928sTz4eRd0dZ//d8Vn/ok= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970850; c=relaxed/simple; bh=qzdMW9gLlKaqx1xxvrWg1RkxK5ZHtE/bxz5+sc8QZaI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QFT+nOw5fVuxrNbckoNJlFRKAmEWCxMiPw57zasGb+6RoNlJxdAEx1f849Eco3YaUSJii+Lrs+gvFrJljSaC/0nl0t0cvOhTgGXAQ3NzF2/Qy+giKkfTAwpESjPZ1deoQMBFW1z6uzzQa5oaJY/ueoS0qLVByN39oTjM90INVaY= 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=qWe2OiHY; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=jTh5NIJ3; arc=none smtp.client-ip=202.12.124.156 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="qWe2OiHY"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="jTh5NIJ3" Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id E6E2425401CD; Wed, 19 Feb 2025 08:14:07 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Wed, 19 Feb 2025 08:14: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=1739970847; x=1740057247; bh=T9IDSvj5n+6tVrr9QXGJWliWfYWCq2leEg7Ebkv5F20=; b= qWe2OiHYKMG7HhWU0iPQZf26UAwBozIKDn2X008FXZNT2t8dvfDE/gZmf0SSu1gj oae7iARWiAUJjqSPYpMron43IzLSsJCrKqJLmzF7xw1uil3GRVJSNh4kyvCerY55 HrpHJL7r4TXvG94ldTwjA+Kd3cESX/8FGYvrd/R+Jn3LfKei1BzAkZcJSdYEBbUr F8bopcD8ieffv55OWNCfTHOHfg0L98deZqzTlFp+2JcQboLZZTdViTu2x97KMaCZ 4XUsCj09LjMURTkQ2caK7vi9DZkyI6/peeUlvETXtf2Hz9ot3SzXF+CZioNhg/yn ClbFUhHZSj2KomVzAD+dUA== 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=1739970847; x= 1740057247; bh=T9IDSvj5n+6tVrr9QXGJWliWfYWCq2leEg7Ebkv5F20=; b=j Th5NIJ3Kh/I4cmCmPCRWMKSdWPxdh1qTCT+uS99aV8G83tDbuy+WssF/RUi2BZo0 SdItA/JBsyCloeBQTWZS4SBAv8B2/hThP1ZylRv8CAlEbTVS1lbBSBpQIC619pGE UEVaAH6duNW8KScF8oEE6NGxX5vUE5oQlChaa/Q/ATFCIwzL9VGuIhqoCCCBep9F L5AJh5jpHDFnDM2Dx8JkZ7gzeCgxNBgC+cxAk0i30cfCOxtQfaXgnIvSBgNukTzz 5v2DdujT9GzlwoA/OqtxsykwZX9zZpkSOLCl6AvqYpD/dRiinqhyXfrHTIcZT2eT u/09zFRGYaWpBKIHSCNfw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeigeefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepgedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithhsthgvrhesphhosghogidrtghomhdprh gtphhtthhopehmihhrthhhrdhhihgtkhhfohhrugesghhmrghilhdrtghomhdprhgtphht thhopehgihhtsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtohepjheitheskh gusghgrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 08:14:06 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 97c11290 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Feb 2025 13:14:04 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 19 Feb 2025 14:13:48 +0100 Subject: [PATCH v2 08/10] 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: <20250219-b4-pks-meson-contrib-v2-8-1ba5d7fde0b9@pks.im> References: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> To: git@vger.kernel.org Cc: M Hickford , Junio C Hamano , Johannes Sixt 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 Wed Feb 19 13:13: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: 13982183 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 164971EA7C2 for ; Wed, 19 Feb 2025 13:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970854; cv=none; b=hfkrvwIaJ3uzMXQZPIfKtIf8OXJQ7d3hImd6uhyutl0ZTecToSBVZyHfPwg+JQkXMK+lj3eu/QeoEonFiRfnM4ZQTHCfHjQqiZrkQk+jtxrIAXyx51KPoGlOQvtiWuQC9S1RaXFG1SWujL2D97InlNF3R0fT02TPJrmeR8JD5Tc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970854; 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=hAar5KYM7MJMDf5N+BtWXEDbX+s2K6sKoWOI9Gvlqg0uvlT+vd3g3h1+mCBvHEg7YqFc4NEYazt1qwm4oaqB1u6B9rKkmIVW8cuSbEkknO7RjDg1sovRg+vOUQR9MBdeVj2yUYyjXrXMgHlTL35rsUw5dPuFHG+VpY77DkQX4kI= 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=iM1/d1xR; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=r+LYx6Ex; arc=none smtp.client-ip=202.12.124.156 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="iM1/d1xR"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="r+LYx6Ex" Received: from phl-compute-02.internal (phl-compute-02.phl.internal [10.202.2.42]) by mailfhigh.stl.internal (Postfix) with ESMTP id 160DF2540202; Wed, 19 Feb 2025 08:14:08 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-02.internal (MEProxy); Wed, 19 Feb 2025 08:14: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=1739970847; x=1740057247; bh=6XDfuQyq6DMaf4dtdjQtc0eJ6cYncOUgpzOlNcQDWXg=; b= iM1/d1xRMdp/gCirYQpmwaOVUhd1+gqHvPoIS0kLQJPBOSEIU2Zb2HIaHjxq5Xy3 pssevzeHvs+Y5LxVL2dY1frlBozxDIzDocO/2CeXaWgMgoRjtJVlE3P/SfGOID2Z 3ed/EkSMgP6j1usyyQy5GAHd+juDwqKC/LOfRIv/GV5g/AZ7fVfjSRIEZoe3zfap yQ3v9kz+NCouDwgVktU4rTBgCzZNLgRKJMb46YmR2H5OnYB1iN0TJVVK7YDawlAP Rh4UJOMHDpyfu4qbKUVx+zKM/mtg9CNRh4tIOumsdqatj7eLLSoy4TWpLYCHqXtS ymxxA3ezKIZKnUStFf/HEQ== 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=1739970847; x= 1740057247; bh=6XDfuQyq6DMaf4dtdjQtc0eJ6cYncOUgpzOlNcQDWXg=; b=r +LYx6ExzrQO+cbc2+ydRATSf8b6W2ehJma//CFGdmm1GlHZEOyZyo9wZzpVFBKzH c4ILPhjmtTFyrWKAzr9jxouIO0944iSfOo4Bq5vBfPuiNFZ4ePun7xaaAjEV4/zW FTWnzGR5alCRe4nB0nLbN/eCoh1yak4goeSggoM2STTfecZB5MO0spmyaoS0cywe fbNxw20zf7/egq8gNgVKPNtNx4p31ZB03nKui3UawdRfMijJniPqZnZXCyZBOIv1 GTJfQegV13Z50D03YtHgmjpBUMjqquJaebnMYgsijVj2+tVRFZmwJvpaCgrDcSZw 28hP4AY3/lPDn4E+NGt0g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeigeefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepgedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithhsthgvrhesphhosghogidrtghomhdprh gtphhtthhopehjiehtsehkuggsghdrohhrghdprhgtphhtthhopehmihhrthhhrdhhihgt khhfohhrugesghhmrghilhdrtghomhdprhgtphhtthhopehgihhtsehvghgvrhdrkhgvrh hnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 08:14:06 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id a9b33e74 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Feb 2025 13:14:05 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 19 Feb 2025 14:13:49 +0100 Subject: [PATCH v2 09/10] 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: <20250219-b4-pks-meson-contrib-v2-9-1ba5d7fde0b9@pks.im> References: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> To: git@vger.kernel.org Cc: M Hickford , Junio C Hamano , Johannes Sixt 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 Wed Feb 19 13:13: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: 13982182 Received: from fhigh-b5-smtp.messagingengine.com (fhigh-b5-smtp.messagingengine.com [202.12.124.156]) (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 316121EB198 for ; Wed, 19 Feb 2025 13:14:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.156 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970851; cv=none; b=g1/nVaIUAOi3YaK2pdxoQCzNXEJF4l73lJxo0zCYnENNUtvmegxWvLzRDFYb1xE5NpD3TyrVq9Tu1tnB+rTB3+GIx0HqyUD6zbA1Ae3aYsg6Tw2fMpKieMAjhCLa3OqBvfFoTEL3C2+GpgZgLBZQ+QsvNUJupV6lV+bx6QmxGSY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739970851; c=relaxed/simple; bh=UCyGOLWcxEZz3FREqBU/HY4EuaOY6eUVKanqJx4P3LM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YMGCB3MgTJ3Pk7YisEt9Ww1d/bXkK5CLNLoJzvhGff/HLg/iRL10QB+RKGiML55eU59kcym/gJQeDZlpU0wrG376mIb8Ez9I9/4YCjzoDN1DqWNdzTaZPQgdU/exSNG+q1mEtzvPGvwpIXfWOQQEypAy87PucRlgFyqwwWLoZfE= 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=LpJgxW5K; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=KPj79u4q; arc=none smtp.client-ip=202.12.124.156 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="LpJgxW5K"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="KPj79u4q" Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfhigh.stl.internal (Postfix) with ESMTP id 831F42540113; Wed, 19 Feb 2025 08:14:09 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-09.internal (MEProxy); Wed, 19 Feb 2025 08:14: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=1739970849; x=1740057249; bh=8qJVE1wuayywVks7MM9lL5vUp8HvipH4/qUnDTa5Js0=; b= LpJgxW5KRZQvYs1lliRck9eaexRITrSVz0UGTQNDyIplhFQF8fgFoyb6dmn4lezF UkYqW38XEQCdmXLtb66CeCIRI/3hsAdC4rmjg72OLT1i4oQB3KPr5Ueicp2iaG8s ChC1ppDsc3alVNPa2Ct3xANVWrxiEJKfVjKrGWE6g44aGeD5pl6KhtmXBNdrfmmw 3Cno69iIaXtGAXu9DwCKdNTO4ImlabQn7zfrMry3Pd5/fTaQILP0ZKUaERVvDK7v zafDIM6NMG9KG1My9ClUyC9UdjOQcpqVCU49biDz1Ti0xPQnY5O8ilMWSweJWyca 91Z+/LUmJsNqCVzq4fCBIw== 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=1739970849; x= 1740057249; bh=8qJVE1wuayywVks7MM9lL5vUp8HvipH4/qUnDTa5Js0=; b=K Pj79u4qMAW2EgxjGBQBMmmM41ECufVG/l9totFRkBjGHryK5mw4/TpaEEGeJ0i0v UwqSxTnGeiEmhV1vYbvh34CEKfJuVNia5V9LiT++UGZ8nuz0NLqjOPj9kSMZXgbO jOAhZm2jgOh00njG70hbPReR0RMYZAHnRbWJpIXizJURurhQ9st6E8q8hpbp0OKA ovk2rirbwUgACUgdG4n1UMt+e0+4vtbgLLRaTsoZDlrJHNiyR+1ZTI6CNQjZ8OYf n4rrwxMl99fSHZpk8lIh7d9lgPrv0/yRJpBV3g2RIWMfYmllUxPlkj/Q5zZ5VYbn kC8qUVcU7sgTJcRHFZBDg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeigeefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredt jeenucfhrhhomheprfgrthhrihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrd himheqnecuggftrfgrthhtvghrnhepffeuiedujedvkeehuedvkeefffeivdeuleetkedu heejteekgedvudfgtdfgieelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepphhssehpkhhsrdhimhdpnhgspghrtghpthhtohepgedpmhhouggv pehsmhhtphhouhhtpdhrtghpthhtohepghhithhsthgvrhesphhosghogidrtghomhdprh gtphhtthhopehjiehtsehkuggsghdrohhrghdprhgtphhtthhopehgihhtsehvghgvrhdr khgvrhhnvghlrdhorhhgpdhrtghpthhtohepmhhirhhthhdrhhhitghkfhhorhgusehgmh grihhlrdgtohhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 Feb 2025 08:14:08 -0500 (EST) Received: by vm-mail (OpenSMTPD) with ESMTPSA id d36ea361 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Wed, 19 Feb 2025 13:14:06 +0000 (UTC) From: Patrick Steinhardt Date: Wed, 19 Feb 2025 14:13:50 +0100 Subject: [PATCH v2 10/10] 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: <20250219-b4-pks-meson-contrib-v2-10-1ba5d7fde0b9@pks.im> References: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> In-Reply-To: <20250219-b4-pks-meson-contrib-v2-0-1ba5d7fde0b9@pks.im> To: git@vger.kernel.org Cc: M Hickford , Junio C Hamano , Johannes Sixt 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}"