From patchwork Thu Apr 4 13:25:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617835 Received: from fout8-smtp.messagingengine.com (fout8-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 EAD9E5FB82 for ; Thu, 4 Apr 2024 13:25: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=1712237111; cv=none; b=BU3Dacmdl3KOKzweA8d0enFfx+s2uo8Sbwy/1Sh87JhelWYHafR256c6SfUtVc8v27PEHA7Ce76SY5wBigzxWH5K3yyNIcLLYc64qiqA6JHMOzqguSNaQfHz9j7e36G7s6H5b50ERsL9vUFq8o+bMOh2/iBrtpP3B9CutpXM85s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237111; c=relaxed/simple; bh=MJ83/98hfc6bYKYJ7wvjqVBYNLcMQuUmMYs2BIKv03s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=P8NTOg3CViPuFyvIuhDiMoqKZJ+aQ9lRAEQ1aFj2x1xLfkkc7DdF0IMgYJjpfSvApJ+5AuOkYRT6xEy6fMcL5AnlR/gBsUGxvW5olCIh2PCChMkTue7+pUQNYg8sLFxQeJ8EPqlmxwpdrTnwJngss6HaUhUoDdRvC7e3RhcU/Hg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=CcDNksed; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=FSlSGgw1; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="CcDNksed"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="FSlSGgw1" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 045911380177; Thu, 4 Apr 2024 09:25:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 04 Apr 2024 09:25:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237107; x=1712323507; bh=Ra+gPwCkG/ 2WDZFmd4OxcWI7ckjLSsfVRW0TLkD3OsY=; b=CcDNksedtkacJxBF7Xhm8vvUCJ /92Jjy/gg1+hL1yEq4NVJaDARgzawelWur0LmRzkDzUtcrlTkejJfr5+BppFG2g0 frj49nnF7Gxq03S8qoICrjPk2QzFZaylF8Cj4xO+5Vk7Y4GvNVW4RIWWs4nUmY/X MvemsHfpfviePL8c+yPjvADoUFftZ9c3cltXPIr6oKvDRAEmmZIys7BFYZ+qNTEq VYfrJPgdlpbNE3OqaSyRk7KWzZIkyyXqtd9FAiC863wexJCoaxHIsSbKPvhywFQf 2VVUYfRT3XRnRWffoQi1TijawWjbc3gzfc6biyp/qkfxAjly/XnJopuK/LYg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237107; x=1712323507; bh=Ra+gPwCkG/2WDZFmd4OxcWI7ckjL SsfVRW0TLkD3OsY=; b=FSlSGgw1vg1Da/84HiMgNWRqf3i2kUK17jGZsOlFOEb5 R7WKVCZBrTNZnjdxFCTJbLxmRcmL0BW3cbaAT1uP8qBvPU0cI5LiEywtPL/V41M4 4LmkYH36YmNha9EQWDuxGeOncnrxyiHJrs9Vz/8SOpJsJHUedm182PJak6NnBSPi reb1kzmRr84EprGKp95Q6bL5gI8mUOuxYYYMWetoOdFB27DhrbshXjI3+VkEmhrI Sx497eFjvcZ2oNOL6xlqb71HeMGg2NM9t/JYSnRYnQ4P6j8dTx1TX7NITOzvm8kU rpwV7SYahc3jRbfhhve19QAf1M7mhezJea+BZ5J7vA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepieefvdehgfekieejueektdelhfeiheeltddtleekieevieehleektdfgveetkeet necuffhomhgrihhnpehvvggtthhorhdrtggtnecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:06 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 8b9f99e1 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:03 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:04 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 01/12] ci: rename "runs_on_pool" to "distro" Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: The "runs_on_pool" environment variable is used by our CI scripts to distinguish the different kinds of operating systems. It is quite specific to GitHub Actions though and not really a descriptive name. Rename the variable to "distro" to clarify its intent. Signed-off-by: Patrick Steinhardt --- .github/workflows/main.yml | 2 +- ci/install-dependencies.sh | 2 +- ci/lib.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3428773b09..684ef5c00d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -303,7 +303,7 @@ jobs: CC: ${{matrix.vector.cc}} CC_PACKAGE: ${{matrix.vector.cc_package}} jobname: ${{matrix.vector.jobname}} - runs_on_pool: ${{matrix.vector.pool}} + distro: ${{matrix.vector.pool}} runs-on: ${{matrix.vector.pool}} steps: - uses: actions/checkout@v4 diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index b4e22de3cb..7d247b5ef4 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -11,7 +11,7 @@ UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl" -case "$runs_on_pool" in +case "$distro" in ubuntu-*) sudo apt-get -q update sudo apt-get -q -y install language-pack-is libsvn-perl apache2 \ diff --git a/ci/lib.sh b/ci/lib.sh index 0a73fc7bd1..d882250db5 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -279,7 +279,7 @@ then cache_dir="$HOME/none" - runs_on_pool=$(echo "$CI_JOB_IMAGE" | tr : -) + distro=$(echo "$CI_JOB_IMAGE" | tr : -) JOBS=$(nproc) else echo "Could not identify CI type" >&2 @@ -318,7 +318,7 @@ export DEFAULT_TEST_TARGET=prove export GIT_TEST_CLONE_2GB=true export SKIP_DASHED_BUILT_INS=YesPlease -case "$runs_on_pool" in +case "$distro" in ubuntu-*) if test "$jobname" = "linux-gcc-default" then From patchwork Thu Apr 4 13:25:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617836 Received: from fout8-smtp.messagingengine.com (fout8-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 8658A1272D3 for ; Thu, 4 Apr 2024 13:25: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=1712237115; cv=none; b=l3rr4pr7PKY8nJ3SomnFWz64S/BOcoqHQKp7dDaAtBG0DD+eJVUQdMlb5uqpMSJ5tPO+Odsl3CfKsOY0Qs0vghY17oSobAguCRP4vilkeKe536WW93kcYydTPSqtgSTaZy7MmYovVj10nqQpesf6SJCKUxKMyg/gdI+NYzV4pc0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237115; c=relaxed/simple; bh=Z03zjwgAe0mBxcmxNvS0uXQkQrVUufW07lCgGzi+k1M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nJJbf7mHXQ4A8kFJFHkh9Dt1oEtzcJKHXF7SxceEB+r4YBiiGDj6ujVJP2hX4e5gC2NH01tHcgnoHDcQfsaSV0PSaRrYFnTS6bUK35sVKteGGUK65ELs5X+aNWt9rwu+VCufSt0eCNRY7A6G/Of1XPH7kFS09i4R7tgxkrR25ww= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=JoU3JTYk; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=pi2RggEK; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="JoU3JTYk"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="pi2RggEK" Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id 85E27138017B; Thu, 4 Apr 2024 09:25:12 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 04 Apr 2024 09:25:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237112; x=1712323512; bh=lLEpdJNBxS lxfK3eYG0nbGCPZQPFeqaQtplwuG/fJ04=; b=JoU3JTYkpearn+8+xG725/S1z5 Hv1YcFYrv3hHTimyyIUHBdc85vqQTGQDOQRySEBbZXlbvYN6LpNI5nPim5VkWVI5 Fwld5li89DMlRaK5Nl4UqZ8YsS189UnEd1TsMXJaxNDYATAM6TGSxwiqv326FRaM q1/iAlSWzhq/A49q08jBUEXWyEenzfp2g5NM8ud2g0iNQZokdByAz9UWczT/LCcr vhpSkXts2cflh4irAs05nQMTxgEQkvaEsak95BaUZf5fUkJbUX1hzaW60AQsSTrU 0S3wqYyPAAOgjfi1jrDOQP4zUm6jojhURwGvpo6Vpkre+fX0atqdM192kqdw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237112; x=1712323512; bh=lLEpdJNBxSlxfK3eYG0nbGCPZQPF eqaQtplwuG/fJ04=; b=pi2RggEK67U0wYIg0QWdFTik2vNpyti1qBK5Y1Xoyilf NnoULztCuCfqmup8adsTPS0RUi7Kh7kQefcUyrBYb3D4NXlDnbq+dOvy5A70Gra3 tO2a4R+SWv+S2uqb7at0LXFUOaNfXwHOYBDZ8gix6YywgL/HLFm3HUqlPTxlZOAf WGj4qKC12tSYrdmnw3K5JS7qdkGcC5KV+OMOiPvYUY6B7zr1CZFO6aQuYii3YXjF q0zA2B1YGdvE4nVMQEZXKWf+rlzDn11hdUYzOOVML7wC62V9H+auGwRYDuYsUUJl +0ebifSmFEY/DmZkGe4iBs1EXCGtwR+Gm2s5YMXT5g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepueektdevtdffveeljeetgfehheeigeekleduvdeffeeghefgledttdehjeelffet necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhsse hpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:11 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 36d68ca8 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:07 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:09 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 02/12] ci: expose distro name in dockerized GitHub jobs Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Expose a distro name in dockerized jobs. This will be used in a subsequent commit where we merge the installation scripts for dockerized and non-dockerized jobs. Signed-off-by: Patrick Steinhardt --- .github/workflows/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 684ef5c00d..71cd4e5486 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -342,12 +342,16 @@ jobs: vector: - jobname: linux-musl image: alpine + distro: alpine-latest - jobname: linux32 image: daald/ubuntu32:xenial + distro: ubuntu32-16.04 - jobname: pedantic image: fedora + distro: fedora-latest env: jobname: ${{matrix.vector.jobname}} + distro: ${{matrix.vector.distro}} runs-on: ubuntu-latest container: ${{matrix.vector.image}} steps: From patchwork Thu Apr 4 13:25:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617837 Received: from fout8-smtp.messagingengine.com (fout8-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 112F91272D3 for ; Thu, 4 Apr 2024 13:25: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=1712237119; cv=none; b=KPvWYxSUzKTGY4iL4SKVfgVHaskn3CbcBBAIVCBWuVWlCgdTHPnGZcXGTKhZmDaiKXnE8JX1srvwG/F6P+MDyJHNEA9bwKIA1HRo+ykCryG8AyNKtZv0cc3yzJ+uwsrUfWTx+iH/A6DMrGQmMdm2hRCKdpj7HE7hBuEXnEw9ziQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237119; c=relaxed/simple; bh=wY0wEaidWt6fGJTDLxoP/FSxa3ZtUO62/DMyk+BZpxw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UcHSqlQHMer+z+pbBe8iY8vrJmSEC5e5SawalPg5er8lstUrqFMgaYsgUSAjUDHIbst9ou9yynN9XzmfKbi1tSgP8j81IgjL7cOeE8uwMTHw1eWqWcx1KxualneFs7xj9yPYXiWuNjtL9N5Ny4VUKEbRaLCK39ZfBogr7e66+jY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=E1aFGmwl; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=GTSmaJ2v; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="E1aFGmwl"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="GTSmaJ2v" Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfout.nyi.internal (Postfix) with ESMTP id 108CB138017F; Thu, 4 Apr 2024 09:25:17 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Thu, 04 Apr 2024 09:25:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237117; x=1712323517; bh=WbHvK1rlo7 7/jU6u9707Vad8oHhxYU7E0dCko28HaTU=; b=E1aFGmwl7Eoq4cc6ZK0dMkmX9R +3WwdbXesYixLWaBuy2FISu26x1Pl4eslQ/5Elb9u59JCnB05H/Si8j+/69N0ULF 9pw52Pm873m1KTOerbmMg7VBU0Aqbn0KDZEFg5ofosftQzpefuqoorJD7rPbmuBq YhAf8KxraX/iB19Wh8jS+e4x7J7R/8V0aA7F5rTW+gOa8Cx0J7rooeRQgao2IgJe Nv99zHRHWui+m8FtUugkqVCve16Nd39TcYeFPscqrW2n/3ktaxpkxT6WtpHrozZM tJA5YXAR5wNhcTky6k6gYywMwaJ17qSV09cgF1XfaSL1LDTADdrjecDBX/QA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237117; x=1712323517; bh=WbHvK1rlo77/jU6u9707Vad8oHhx YU7E0dCko28HaTU=; b=GTSmaJ2vm1ybzb4++YkWLwWfIBjjrIkRi+4eycHKaEDX yGGEoCBZOvjBnJeCKkP3hYSHU6TYObZlvNi+gWG4Hb9LZuiYbtrWORhsOIEfDJG/ r2C8eMz0b/slbi8jBSxKLNXxAUmUrARQKYg8hFm8mXJ/VNjHjCFixQIA9Ct6qh4f xsjVAmVoxCT8KCt5BrI2GnsN0LbV4RA5pKsTdadXHUfGyc4/Auu9YjsdAbWdMw8V ICtyWClwSWQwAUIAsj8/30j5/si2uAh6A1TrcctjVsLT8U2FQyuRpVcz+LnTscBh g2dRePJEZpUJH1jUsXDeuQmDD/7qs4kU1DPk7WPZ+Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepueektdevtdffveeljeetgfehheeigeekleduvdeffeeghefgledttdehjeelffet necuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepphhsse hpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:15 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 5f946cf0 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:12 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:13 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 03/12] ci: allow skipping sudo on dockerized jobs Message-ID: <8abc9ad6a70a09aae0a350499ee1f3a79796fe8d.1712235356.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Our "install-dependencies.sh" script is executed by non-dockerized jobs to install dependencies. These jobs don't run with "root" permissions, but with a separate user. Consequently, we need to use sudo(8) there to elevate permissions when installing packages. We're about to merge "install-docker-dependencies.sh" into that script though, and our Docker containers do run as "root". Using sudo(8) is thus unnecessary there, even though it would be harmless. On some images like Alpine Linux though there is no sudo(8) available by default, which would consequently break the build. Adapt the script to make "sudo" a no-op when running as "root" user. This allows us to easily reuse the script for our dockerized jobs. Signed-off-by: Patrick Steinhardt --- ci/install-dependencies.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 7d247b5ef4..7dfd3e50ed 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -11,6 +11,17 @@ UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl" +# Make sudo a no-op and execute the command directly when running as root. +# While using sudo would be fine on most platforms when we are root already, +# some platforms like e.g. Alpine Linux do not have sudo available by default +# and would thus break. +if test "$(id -u)" -eq 0 +then + sudo () { + "$@" + } +fi + case "$distro" in ubuntu-*) sudo apt-get -q update From patchwork Thu Apr 4 13:25:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617838 Received: from fout8-smtp.messagingengine.com (fout8-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 A82101272D3 for ; Thu, 4 Apr 2024 13:25:21 +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=1712237123; cv=none; b=CXAGZmpn+e5yeln7/lH2xs3/NUkLQj1tala8ImD0mO28febOmgYyevilgEhd6fvfiImquSOc1k0kMC/GmpXOr0zkxKcua12W13Lw29s/BDvgy6nZeTS7hyNlpY3B0hKwBtniidVDNn2Bb0vXbRNuTgBUN0Xdy9QRwlLylgtPo8c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237123; c=relaxed/simple; bh=Kg5+Axdhzr93z20NUB7lvUIUGQGi2cQDtiCe3JE8UOg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UXEpqc3yDisD/H+eEH0me1ivDjCJXR2jo2piE4WH1Bo8uMm61EP4sLX7EQgPakM4uWmGe/UxbtYqejG3ZqrXjGM715TpeDo80t7Nc5DS16PPL3EckoM0a72Brz05p14DoX4CHNdzaxPn5P7iEKLKTPH8ejYrSSbQJjHwfLBf28A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=XZKrTz2K; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=uiB1kTFA; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="XZKrTz2K"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="uiB1kTFA" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id BE37C1380148; Thu, 4 Apr 2024 09:25:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 04 Apr 2024 09:25:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237120; x=1712323520; bh=LpXPoOqbqJ BpkGRfVJ4i5Ua2ymUF8aErm1nVYP6wL2s=; b=XZKrTz2KsozPZ8n9ntDbgp+AkN zhMtUZl1RdiIY+GDcoR6b8BKO58Phb6SzMowIwOsxpzS5HWdUTUBHyTfCtDqYr5A KJA5fYNVPvYlk6vPaoctyzkAsPiolOjqo9swOYX7UbN4118dsuCxBxbLtyd1W85/ Qf8PohMr6eH2Fr4l4zQjj2jz9SqRm5Xmo5HvFkjctVPaoSDpDy46cPJ0i2ww7Nju ZPljeB277NaxH+mCg1Sq6Z4hsG1kUjhF3tvjrO4yF3NZGaNG5XQrnGM7HcqM+GLz 4Gg9bxOJkVNBRQIjS8VcxS4iFOa+yPsdCcidicAnt4XyTALw5iLOpSIeLsFQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237120; x=1712323520; bh=LpXPoOqbqJBpkGRfVJ4i5Ua2ymUF 8aErm1nVYP6wL2s=; b=uiB1kTFAOoanz6x6boMPKpMFshrbwvtRim0UOSya0B+o HvP2RBGH6nVuLlz/GwG7BRGXCynYb2XMIQcLyICweOpUSJGLU2NMt6uvd/EU5Qjt EK+uTIq9jfe58RHRbVMMTRojPT2RZx+mMwuFk3EXBOW+b3TewL+FJAht9CjIBoUd jXZhX792F0yUZ2MWLfUyEUDnPxqNZsubMtPYUMW5pkXOlWl5PD786fvVgsYEOi7J 9YUjhd3CoZsWdI7qX3N0O9bDAXlMrw/kHhkVfCmW/ZFj4n2LNaLby86E9uEFCRjw TEk84wZr0isGcPg2VwJ4txelA0azquJEFqIppXoyoQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepjefffedvgfelhfejkeefteffhfejudfhhfdvtdevjedvhefgvdduhfdugeegkefg necuffhomhgrihhnpehpvghrfhhorhgtvgdrtghomhdpghhithhhuhgsrdgtohhmnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhs rdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:19 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id a3e2a529 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:16 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:17 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 04/12] ci: drop duplicate package installation for "linux-gcc-default" Message-ID: <7cf253862540bdcbcf6928a9ad64dadddbc943ca.1712235356.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: The "linux-gcc-default" job installs common Ubuntu packages. This is already done in the distro-specific switch, so we basically duplicate the effort here. Drop the duplicate package installations and inline the variable that contains those common packages. Signed-off-by: Patrick Steinhardt --- ci/install-dependencies.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 7dfd3e50ed..fad53aac96 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -7,9 +7,6 @@ P4WHENCE=https://cdist2.perforce.com/perforce/r21.2 LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION -UBUNTU_COMMON_PKGS="make libssl-dev libcurl4-openssl-dev libexpat-dev - tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl - libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl" # Make sudo a no-op and execute the command directly when running as root. # While using sudo would be fine on most platforms when we are root already, @@ -25,8 +22,13 @@ fi case "$distro" in ubuntu-*) sudo apt-get -q update - sudo apt-get -q -y install language-pack-is libsvn-perl apache2 \ - $UBUNTU_COMMON_PKGS $CC_PACKAGE $PYTHON_PACKAGE + sudo apt-get -q -y install \ + language-pack-is libsvn-perl apache2 \ + make libssl-dev libcurl4-openssl-dev libexpat-dev \ + tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \ + libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl \ + $CC_PACKAGE $PYTHON_PACKAGE + mkdir --parents "$P4_PATH" pushd "$P4_PATH" wget --quiet "$P4WHENCE/bin.linux26x86_64/p4d" @@ -34,6 +36,7 @@ ubuntu-*) chmod u+x p4d chmod u+x p4 popd + mkdir --parents "$GIT_LFS_PATH" pushd "$GIT_LFS_PATH" wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" @@ -83,10 +86,6 @@ Documentation) test -n "$ALREADY_HAVE_ASCIIDOCTOR" || sudo gem install --version 1.5.8 asciidoctor ;; -linux-gcc-default) - sudo apt-get -q update - sudo apt-get -q -y install $UBUNTU_COMMON_PKGS - ;; esac if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1 From patchwork Thu Apr 4 13:25:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617839 Received: from fhigh3-smtp.messagingengine.com (fhigh3-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 3B71F76023 for ; Thu, 4 Apr 2024 13:25:26 +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=1712237129; cv=none; b=EthoBVePhb9utMZ5wKWypNd5jeaXVh8BkGR56q2FdvHZbhOwJqohe9+4fZZ1LcbmPVQp+9JkkJ8mxQNEbfS/rPLhYut1yp+JzCG+4J4VxA6zZpniCqQ7WBrGKhfqrLbuVkC8AcF84AnLeem/PFpOjJfWReAfT5idZTrYLo1HCts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237129; c=relaxed/simple; bh=flqSBn6e1ww9DNYCcaXHtPDFTalpBc0qU5fPZLEIWVc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Vi9wCwf/p+e86uTOPlqlEvJBiutorX7oP+mzYV2UrCWg9mxrsoZtbLxR+YWm3Nt+uz+qQmBLs8WwjhvicVUxAcnnlVhSt23X8zGBCcp6d5gkf+T944mSCAzPJw9EVTaOTN3maqr2YQ6mL90t20lO4gYunhQkb/CvsgZty16SROQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=IseYMUK/; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=LtQrmZo5; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="IseYMUK/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="LtQrmZo5" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 47B03114012F; Thu, 4 Apr 2024 09:25:26 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 04 Apr 2024 09:25:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237126; x=1712323526; bh=aLmerbpV+v Vg008I3XD2KVw1Aft+SvKDiVCO+GY+FF0=; b=IseYMUK/4mI8FmYc6o/hHRsIJA RZJnwb8WHkVha5hfGXLwqYkM9GUJjYAgS+DvRyM+z7d8M8rDcHtuE6MvTxY8YdI6 CxJHB2xxfo+SJukx+T9iYsnShW+35dfiHhOASgGVnFkURHT4YIWk2FdPWMJ6gndh XVntziQes/CgespoVfDjenKSzHxVs8h9iB4nNsTlpAlauVB7jFUGptlC+kZYAYrL atFdYWOhHlOwbPr/MtCiRoi0N8px3uxly1KlWhlorG4xCqSf81jdriemETsK44Y+ h+a05P1E6bzg6dlATu5MseqchZV5VEqRYvxVRXkH5PfGkjyQrZA3wYrGf3yQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237126; x=1712323526; bh=aLmerbpV+vVg008I3XD2KVw1Aft+ SvKDiVCO+GY+FF0=; b=LtQrmZo5EZzpWyWdj+HvK4IB2t2kVVTRc0pkWmX+3N35 UVwc+Rzk1iJIVPIzGvGA+0J2GQYJPbiofpQFYp8Es5f2RZVfVjYjzVHl16u5luSR L8CljnzsWcM+OANrefZUf4cHLRFpYEZlfX57P4X1BqLJagZUZpB9g9eP0NQ3VXUX fPX0J7lo6AEuQEQQV2s9iReS7UcA7opJlhw0bagvTqm00ghIMqkUHHGAI/0phcHj d88Xd1tDndIh3xtJhZfx5l4CvIr7rDgICqwBUrx1V3KbfrVvqUHBk5eBEpbt7Sdt 60qGvdDEh9d0U+BP5StBGKO9aFGiuEiOil/7BvIrOg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepueektdevtdffveeljeetgfehheeigeekleduvdeffeeghefgledttdehjeelffet necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhsse hpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:24 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id f6dce664 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:21 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:22 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 05/12] ci: convert "install-dependencies.sh" to use "/bin/sh" Message-ID: <38e64224e2f0aa4d777308050ed8d513ae162607.1712235356.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: We're about to merge the "install-docker-dependencies.sh" script into "install-dependencies.sh". This will also move our Alpine-based jobs over to use the latter script. This script uses the Bash shell though, which is not available by default on Alpine Linux. Refactor "install-dependencies.sh" to use "/bin/sh" instead of Bash. This requires us to get rid of the pushd/popd invocations, which are replaced by some more elaborate commands that download or extract executables right to where they are needed. Signed-off-by: Patrick Steinhardt --- ci/install-dependencies.sh | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index fad53aac96..7bcccc96fd 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/sh # # Install dependencies required to build and test Git on Linux and macOS # @@ -30,19 +30,14 @@ ubuntu-*) $CC_PACKAGE $PYTHON_PACKAGE mkdir --parents "$P4_PATH" - pushd "$P4_PATH" - wget --quiet "$P4WHENCE/bin.linux26x86_64/p4d" - wget --quiet "$P4WHENCE/bin.linux26x86_64/p4" - chmod u+x p4d - chmod u+x p4 - popd + wget --quiet --directory-prefix="$P4_PATH" \ + "$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4" + chmod u+x "$P4_PATH/p4d" "$P4_PATH/p4" mkdir --parents "$GIT_LFS_PATH" - pushd "$GIT_LFS_PATH" - wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" - tar --extract --gunzip --file "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" - cp git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs . - popd + wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" + tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$GIT_LFS_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" + rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" ;; macos-*) export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 @@ -53,11 +48,10 @@ macos-*) brew link --force gettext mkdir -p "$P4_PATH" - pushd "$P4_PATH" - wget -q "$P4WHENCE/bin.macosx1015x86_64/helix-core-server.tgz" && - tar -xf helix-core-server.tgz && - sudo xattr -d com.apple.quarantine p4 p4d 2>/dev/null || true - popd + wget -q "$P4WHENCE/bin.macosx1015x86_64/helix-core-server.tgz" && + tar -xf helix-core-server.tgz -C "$P4_PATH" p4 p4d && + sudo xattr -d com.apple.quarantine "$P4_PATH/p4" "$P4_PATH/p4d" 2>/dev/null || true + rm helix-core-server.tgz if test -n "$CC_PACKAGE" then From patchwork Thu Apr 4 13:25:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617840 Received: from fhigh3-smtp.messagingengine.com (fhigh3-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 BAB0076023 for ; Thu, 4 Apr 2024 13:25:31 +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=1712237133; cv=none; b=RiduLjsUa9WvnFlirqhK+4paIWMw8SFWTCp9tScRcz39xs0IhmQ/DlmrmJd31QC3MlEKyK4xpAiwnCWPiL0XZdHUSB9KvFqldkUWUi7ncjm59gxU/II/JPxC7NwN3j+Xj/QSMUZ7h2eXhotD8n4ZPjNptoo+54YamnZsgdcduJ4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237133; c=relaxed/simple; bh=hRQHKud4/2C1rGQ/ZITVN5Pbq2KE1272nf1vDQ+3Hdk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UYVKpdG7hL9FLwrqnlhGBm0DjxRXP4Qmg2YGugIjzulsY5iO863OQrhIpDp/GzhVf38FJNLx7ev9jPZaB66he8T/0WJRWxBlIoSQ7u3xcd0cNIC8pkKThtr4Z3T3fTjjnyiZY+HYsecGF8Acfzul00Fd4e1/jaW4cNz37wM2cpc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=GDJicIh6; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=sH/mFJv5; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="GDJicIh6"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="sH/mFJv5" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id CEFB61140122; Thu, 4 Apr 2024 09:25:30 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 04 Apr 2024 09:25:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237130; x=1712323530; bh=9Y1dwQj/4c 50txMEhhYJlrw/r2NTXMpi0vHr7qjXHmY=; b=GDJicIh6RCWBhllOeusSmq+Yhl 5oJIOrsQMgp1usU5FFGAa3VI8ENTaEqgekdGwQpGnBQSHxp4I7f0acu+F3a5eEZR 0XGE6snKnQQEXOTrtvN79WYf/dHur66w00LnAkliLtXHz4RLQp5XomhSm2l1E1SX 42MFsETbZT2J72Gt3lydYKmi+SDAG6eoQ4/sBB0aNwE8sxj2nHgs20N5Bhpzfs82 zROIB8fLsMdUl/V/I0yu34T84C7/+OWwSPdmeAEVO9OfM52fOnGZNOUnxMTYtJnc eEcv0AOyx71uyEd93i5NMgLoObodW+ZW//WRTQ4+CIMNgIUWuN6yZcWugIoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237130; x=1712323530; bh=9Y1dwQj/4c50txMEhhYJlrw/r2NT XMpi0vHr7qjXHmY=; b=sH/mFJv5ZVLGWF/OjIrnO58VVZ3kjRWH+oNybAlumAba fZBXtAYrdk2NWhDLmLKCQqETUxXshZNwUMch7YQuhiHyZGn8dRJ2gB0eMJpdVPYh c0bvHwwfsTKcjJIeW0BOXKOY9AeoBnVdRmmEuClWpcYW6daM4KhaOHryZAVSj5Ou HovwzjI0Tr22Y5XLIE0OLOrph3A/KXSZ5MoGBOjFmgaVHhYLqnXseymszIWm5pxn iMxybf+ZJttmQyl+aIRfs7XIsRwh9Z4zQNVO9MlbfOntf+FFJXCC53/Xho4QfoU+ se3nlXpqmfrmLaEa3h/mmdtM8VjSe0eUWU1n7Bx3Uw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepueektdevtdffveeljeetgfehheeigeekleduvdeffeeghefgledttdehjeelffet necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhsse hpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:29 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 12269a99 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:26 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:27 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 06/12] ci: merge custom PATH directories Message-ID: <196dab460a3be1e028924a88dfa794547c082bb1.1712235356.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: We're downloading various executables required by our tests. Each of these executables goes into its own directory, which is then appended to the PATH variable. Consequently, whenever we add a new dependency and thus a new directory, we would have to adapt to this change in several places. Refactor this to instead put all binaries into a single directory. Signed-off-by: Patrick Steinhardt --- ci/install-dependencies.sh | 15 +++++++-------- ci/lib.sh | 10 +++------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 7bcccc96fd..46b9efb2d5 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -29,14 +29,13 @@ ubuntu-*) libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl \ $CC_PACKAGE $PYTHON_PACKAGE - mkdir --parents "$P4_PATH" - wget --quiet --directory-prefix="$P4_PATH" \ + mkdir --parents "$CUSTOM_PATH" + wget --quiet --directory-prefix="$CUSTOM_PATH" \ "$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4" - chmod u+x "$P4_PATH/p4d" "$P4_PATH/p4" + chmod u+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" - mkdir --parents "$GIT_LFS_PATH" wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" - tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$GIT_LFS_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" + tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" ;; macos-*) @@ -47,10 +46,10 @@ macos-*) brew install $BREW_INSTALL_PACKAGES brew link --force gettext - mkdir -p "$P4_PATH" + mkdir -p "$CUSTOM_PATH" wget -q "$P4WHENCE/bin.macosx1015x86_64/helix-core-server.tgz" && - tar -xf helix-core-server.tgz -C "$P4_PATH" p4 p4d && - sudo xattr -d com.apple.quarantine "$P4_PATH/p4" "$P4_PATH/p4d" 2>/dev/null || true + tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d && + sudo xattr -d com.apple.quarantine "$CUSTOM_PATH/p4" "$CUSTOM_PATH/p4d" 2>/dev/null || true rm helix-core-server.tgz if test -n "$CC_PACKAGE" diff --git a/ci/lib.sh b/ci/lib.sh index d882250db5..4cce854bad 100755 --- a/ci/lib.sh +++ b/ci/lib.sh @@ -340,10 +340,6 @@ ubuntu-*) # image. # Keep that in mind when you encounter a broken OS X build! export LINUX_GIT_LFS_VERSION="1.5.2" - - P4_PATH="$HOME/custom/p4" - GIT_LFS_PATH="$HOME/custom/git-lfs" - export PATH="$GIT_LFS_PATH:$P4_PATH:$PATH" ;; macos-*) MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=$(which python3)" @@ -351,12 +347,12 @@ macos-*) then MAKEFLAGS="$MAKEFLAGS APPLE_COMMON_CRYPTO_SHA1=Yes" fi - - P4_PATH="$HOME/custom/p4" - export PATH="$P4_PATH:$PATH" ;; esac +CUSTOM_PATH="$HOME/path" +export PATH="$CUSTOM_PATH:$PATH" + case "$jobname" in linux32) CC=gcc From patchwork Thu Apr 4 13:25:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617841 Received: from fhigh3-smtp.messagingengine.com (fhigh3-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 428E776023 for ; Thu, 4 Apr 2024 13:25:35 +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=1712237137; cv=none; b=FcKAJJuaDPFGdKj+g0qwLBRLezkLMjetKEjRE1+WGc4wlOLW8AZS/cJaqpREVy40zN7FTZ8Uv/qQSvV1yz9DkX9XI3naCi64Losy304zJjPrSBXMPMMe5Q2DoztVH/8ZCSkJQd5IwJi8u7UrVkHMqK1uvfqjALLq3xNzSzSjIss= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237137; c=relaxed/simple; bh=KrOsr+lGWpYIhQH/Z5QT3C14C5MLKQ2TV4QHT3mFDmY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D8yViK4b/8At40ie54qv8Km1WlRjDforBMXfPd3mvsAaes/lOUigA8plvtdt2j5EZiXJjPxE8+gFNgkZ4LjwTgJDwDNpvILgdxo2K8e8qgyCqSb+R2dx3dRGYXpOz60p6b+l+Hn0XrsFSNP/pzueYCCicDviD4BMjCjAnAFrRS4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=nGlKru0L; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=wxbJ4lWX; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="nGlKru0L"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="wxbJ4lWX" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 6A35A1140130; Thu, 4 Apr 2024 09:25:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 04 Apr 2024 09:25:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237134; x=1712323534; bh=pR0cpUk4i3 j7zMXGcKYbTtm8CGubZV5HR6ddgNdJoO0=; b=nGlKru0Ltw09I/QSXw9PVkPgl2 2MIdSkCk6jpOsz6E0FtNQN8xFCSfF+LnudV7y8HIeAAMO2aU1qTs9qrd87Cbvuq9 BW2ch2fkXMVt9NwbtMRUqp4oHuaa72VydOe9lJRWKFugySA8SWJfPVHtbytzA0hE Vu+G032/CtJqY4Fhmpn87kdtpbLe5ioG8x9P2ndJPiGe+4vA6WZlrNMl2jirT4qg t3gMqh1YfO49YbPxX+j97qb+bAiTo/3rQYMRa2diqcMOIwbCJGp2oeggQ2oCzsbE LNJ8xy3kLq67B4M8m1Pgp3PA2rmU8J26ODAzTdDUqGidRcek0D33iqeBUkgA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237134; x=1712323534; bh=pR0cpUk4i3j7zMXGcKYbTtm8CGub ZV5HR6ddgNdJoO0=; b=wxbJ4lWXB8GFV5eaNUoPpOH6gMdkv0leWyx1SHH8mFi6 xoRICa6YPMaMM0qQwPeETA5pO3wgJapynjCC6xPUWMRrM/N67SbKarRFzKHxNFHZ SSE/JLWm4IyhN9xrgjiyuMu/9XHYIjE7Ba/ivUwOqgIQHk5NLN4B1svOVLs7yIPO gI4v0LKY6jk5yPZXTyt0sB6RR+30xuM5fBAkLB8mNscCPSjLQOo94Rh7yH75e9Fs tPvHGQMDB7DgS/C2c2zuqCifBvbbRu7ZtSX1s0HpoWrTvZTujb9Jkt+0nlip3PyJ nQx+sC/ftkPZwI6ZWgNI/4EtHwTw9ih0aOz4ZnvAyw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepveeuvdeujeehueeutdetkefffedtueetudefieeiieekudevudffffekheejfeeu necuffhomhgrihhnpehshhdqrdgtihdpihhnshhtrghllhdquggvphgvnhguvghntghivg hsrdhshhdpphgvrhhfohhrtggvrdgtohhmpdhgihhthhhusgdrtghomhenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:32 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 10098f88 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:30 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:31 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 07/12] ci: merge scripts which install dependencies Message-ID: <668553e18f59dea04b734f931e5b48d5d35c247d.1712235356.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: We have two different scripts which install dependencies, one for dockerized jobs and one for non-dockerized ones. Naturally, these scripts have quite some duplication. Furthermore, either of these scripts is missing some test dependencies that the respective other script has, thus reducing test coverage. Merge those two scripts such that there is a single source of truth for test dependencies, only. Signed-off-by: Patrick Steinhardt --- .github/workflows/main.yml | 2 +- .gitlab-ci.yml | 4 +-- ci/install-dependencies.sh | 32 ++++++++++++++++++--- ci/install-docker-dependencies.sh | 46 ------------------------------- 4 files changed, 31 insertions(+), 53 deletions(-) delete mode 100755 ci/install-docker-dependencies.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 71cd4e5486..5838986895 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -359,7 +359,7 @@ jobs: if: matrix.vector.jobname != 'linux32' - uses: actions/checkout@v1 # cannot be upgraded because Node.js Actions aren't supported in this container if: matrix.vector.jobname == 'linux32' - - run: ci/install-docker-dependencies.sh + - run: ci/install-dependencies.sh - run: ci/run-build-and-tests.sh - name: print test failures if: failure() && env.FAILED_TEST_ARTIFACTS != '' diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c0fa2fe90b..8ce0e1b4bd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -10,7 +10,7 @@ workflow: test:linux: image: $image before_script: - - ./ci/install-docker-dependencies.sh + - ./ci/install-dependencies.sh script: - useradd builder --create-home - chown -R builder "${CI_PROJECT_DIR}" @@ -98,7 +98,7 @@ static-analysis: variables: jobname: StaticAnalysis before_script: - - ./ci/install-docker-dependencies.sh + - ./ci/install-dependencies.sh script: - ./ci/run-static-analysis.sh - ./ci/check-directional-formatting.bash diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 46b9efb2d5..f4eb125fd2 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -5,6 +5,8 @@ . ${0%/*}/lib.sh +begin_group "Install dependencies" + P4WHENCE=https://cdist2.perforce.com/perforce/r21.2 LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION @@ -20,14 +22,27 @@ then fi case "$distro" in +alpine-*) + apk add --update shadow sudo build-base curl-dev openssl-dev expat-dev gettext \ + pcre2-dev python3 musl-libintl perl-utils ncurses \ + apache2 apache2-http2 apache2-proxy apache2-ssl apache2-webdav apr-util-dbd_sqlite3 \ + bash cvs gnupg perl-cgi perl-dbd-sqlite >/dev/null + ;; +fedora-*) + dnf -yq update >/dev/null && + dnf -yq install make gcc findutils diffutils perl python3 gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null + ;; ubuntu-*) + # Required so that apt doesn't wait for user input on certain packages. + export DEBIAN_FRONTEND=noninteractive + sudo apt-get -q update sudo apt-get -q -y install \ - language-pack-is libsvn-perl apache2 \ - make libssl-dev libcurl4-openssl-dev libexpat-dev \ + language-pack-is libsvn-perl apache2 cvs cvsps git gnupg subversion \ + make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo \ tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \ - libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl \ - $CC_PACKAGE $PYTHON_PACKAGE + libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \ + ${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE mkdir --parents "$CUSTOM_PATH" wget --quiet --directory-prefix="$CUSTOM_PATH" \ @@ -38,6 +53,13 @@ ubuntu-*) tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" ;; +ubuntu32-*) + sudo linux32 --32bit i386 sh -c ' + apt update >/dev/null && + apt install -y build-essential libcurl4-openssl-dev \ + libssl-dev libexpat-dev gettext python >/dev/null + ' + ;; macos-*) export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 # Uncomment this if you want to run perf tests: @@ -97,3 +119,5 @@ then else echo >&2 "WARNING: git-lfs wasn't installed, see above for clues why" fi + +end_group "Install dependencies" diff --git a/ci/install-docker-dependencies.sh b/ci/install-docker-dependencies.sh deleted file mode 100755 index eb2c9e1eca..0000000000 --- a/ci/install-docker-dependencies.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# Install dependencies required to build and test Git inside container -# - -. ${0%/*}/lib.sh - -begin_group "Install dependencies" - -case "$jobname" in -linux32) - linux32 --32bit i386 sh -c ' - apt update >/dev/null && - apt install -y build-essential libcurl4-openssl-dev \ - libssl-dev libexpat-dev gettext python >/dev/null - ' - ;; -linux-musl) - apk add --update shadow sudo build-base curl-dev openssl-dev expat-dev gettext \ - pcre2-dev python3 musl-libintl perl-utils ncurses \ - apache2 apache2-http2 apache2-proxy apache2-ssl apache2-webdav apr-util-dbd_sqlite3 \ - bash cvs gnupg perl-cgi perl-dbd-sqlite >/dev/null - ;; -linux-*|StaticAnalysis) - # Required so that apt doesn't wait for user input on certain packages. - export DEBIAN_FRONTEND=noninteractive - - apt update -q && - apt install -q -y sudo git make language-pack-is libsvn-perl apache2 libssl-dev \ - libcurl4-openssl-dev libexpat-dev tcl tk gettext zlib1g-dev \ - perl-modules liberror-perl libauthen-sasl-perl libemail-valid-perl \ - libdbd-sqlite3-perl libio-socket-ssl-perl libnet-smtp-ssl-perl ${CC_PACKAGE:-${CC:-gcc}} \ - apache2 cvs cvsps gnupg libcgi-pm-perl subversion - - if test "$jobname" = StaticAnalysis - then - apt install -q -y coccinelle - fi - ;; -pedantic) - dnf -yq update >/dev/null && - dnf -yq install make gcc findutils diffutils perl python3 gettext zlib-devel expat-devel openssl-devel curl-devel pcre2-devel >/dev/null - ;; -esac - -end_group "Install dependencies" From patchwork Thu Apr 4 13:25:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617842 Received: from fhigh3-smtp.messagingengine.com (fhigh3-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 E79F476023 for ; Thu, 4 Apr 2024 13:25:39 +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=1712237141; cv=none; b=HF1PKMqZQv0OQeuaof81Pm0U1oqeaWfPUsjwD/mT7L2XUrdhPRDHi+fFzoBgVHAuHBwNyENwSgbW7f936IOHW880aB8u9x3MuQCJ5lZ96siRiqp8pRK1fE2i0jAIKo+Y79A4zcG5l9iNBFCp7taQaCy7DQxITIWu2n9vBtIvJjo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237141; c=relaxed/simple; bh=JU8U6sFqKR7fduZ234TTX/9aVsyR2nLIJROH95Jed3E=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ow2tt8FtxiwB1bnjkoRjCi5vounipjzbVQ4z/qbLhHS6+NztrWPrC9Sf16RSCeMcOw+yHOlasfnYFJ0lBxponpOb51Lj/VNklxDRXocIbskYzLKbOTe32RfJNJOQeEa1jxKLlKBbVUwDa6UiJWemUpaMIdac5KTTEQ5iIE8eWcE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=VnKLikxA; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=WfO4HKyn; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="VnKLikxA"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="WfO4HKyn" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 06B33114013A; Thu, 4 Apr 2024 09:25:39 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 04 Apr 2024 09:25:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237139; x=1712323539; bh=wHNTpD+yq7 kH1api0ikjRYYy53ZE1voW5xQDJIkzB/Q=; b=VnKLikxAIM+74/qONLj+v9UA/v wHXvp22k5cZGQOu11wgtk3OtCtLsZsRIYJ5WJDiQlFyONo+PGFAZ3hpPOwl6YYab I10rClHyKfmoonw41Pgjk7sJNPs2BHbh0+InAjbt3XefphGD785HVcfxsOjBzcVz 7eTQvcjRe7F1IRS34KB8U8j2juHRcSoLMsDfPxCUaL1I9nISEur/nt95ir0JgbXZ CFjPDrjiFGjAKlC0Z9hK34lXNzkyT//BP3hSObSc1Fte18+LRYcEp+bOES1AbKgu cR5hDpdkRefLKDb6oUHAxa6qO2lEIEVQ9GpOip2hBnjKoHUCdXtR86zTd8+Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237139; x=1712323539; bh=wHNTpD+yq7kH1api0ikjRYYy53ZE 1voW5xQDJIkzB/Q=; b=WfO4HKyn6k353tdnWJUCTYp2KyFqMiH612iogqsogBkX zKnVbjqpigTMUFNRnQFHrPal8Xsw8/pOfT/Cqvr9mxLU6KEGNM9YKphUeSTpQAxT X034ud+sCS4ZJn2cqJGH6+7k2duShmngyd21JIZiwhBt2sW3D7k9mWzXHXYfE4Rg GSoPz3J5tVD3Oi8G1IHevZlDjAIvE6v+FBCMtWpS6jYq9cUe/ogtRNyaRd9xyY/K 3GIc0HczKXCr7f4xNYZEfd1Eo1jrVwq01mzKk+4BpOl5czg0tvgLnUFmEVBf9TMN KLjBbq0yOi6KkQ1nnRepPG0hrrIjQlzZh0sH8Lj6Yg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepueektdevtdffveeljeetgfehheeigeekleduvdeffeeghefgledttdehjeelffet necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhsse hpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:37 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id a51412ab (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:34 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:35 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 08/12] ci: make Perforce binaries executable for all users Message-ID: <22f86f8ccb9f3fb7f98ff57ddd09724fc9e44628.1712235356.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: The Perforce binaries are only made executable for the current user. On GitLab CI though we execute tests as a different user than "root", and thus these binaries may not be executable by that test user. Fix the setup so that we set the executable bits for all users. Signed-off-by: Patrick Steinhardt --- ci/install-dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index f4eb125fd2..068c478025 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -47,7 +47,7 @@ ubuntu-*) mkdir --parents "$CUSTOM_PATH" wget --quiet --directory-prefix="$CUSTOM_PATH" \ "$P4WHENCE/bin.linux26x86_64/p4d" "$P4WHENCE/bin.linux26x86_64/p4" - chmod u+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" + chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" From patchwork Thu Apr 4 13:25:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617843 Received: from fhigh3-smtp.messagingengine.com (fhigh3-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 524411272D3 for ; Thu, 4 Apr 2024 13:25:44 +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=1712237145; cv=none; b=Y7rxvkfCv05qOB1Q5lozYlGuIippOSwhUUixh4M9ZyRhAYFYRb9ng+cIE3b9LChCQd6cPlEa11PK7+2r0s/+eBnF2f4cAoNBSdiTwG9+/L7G2eJreQuF+kfILxcnWtlaMuPjLlXsV0DNoJ1HoNK+lhi/LMnM8Os+hCfJXYDnt9g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237145; c=relaxed/simple; bh=9Qq4YFDE5S0UalniQB/cI7C8kpCWiLqi3MOsE2ClFjk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VzrxTfYa308iSBdyggVnEtL4synlNUpDUt5367uqOAwc0MsV6YnfapvYYmUAtk9ugFiAfENTK7LKxttqoJNBjQTPBRnRfzRuAWoK6S7+QISCSvhjV+6a9w9V6WVAfXYqF1kqyXXcR/a1jzW/BhXiKKzh4cCJTrjf1Z1AXUBI+mo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=KdeC2k4d; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=I+QCnqYZ; arc=none smtp.client-ip=103.168.172.154 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="KdeC2k4d"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="I+QCnqYZ" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 81D1C1140127; Thu, 4 Apr 2024 09:25:43 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Thu, 04 Apr 2024 09:25:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237143; x=1712323543; bh=kQzd4l67RE S9bBBtaKYQiJmUw3wcCTLjmrVOGVA9hbw=; b=KdeC2k4djDjfUZDoax31cbAz/P p4Wa3WT4qHFQ/r5Yv4g3MlvyEJcVUOmgYHmzjuJb5k/w1m8Ffs16429N5n1hsimD IbBXTExFHhX1qe85kob+Lsl0GfZiBB6DcxDtH8nOgZRxY2u5NC3kuDf/fvyamAd3 0Bcqk3v+s4G4oa+7aiwOdoGFPP0iCsnKaJ+Wl5gvBBdorOzxde3K3j7q+Ioeyhac fkKu/ubwVFAwbu6ISmwK5IzNf5nu9shjL8wmESsSd1T1jLJDjXzEmVFNtTSpp9Jt j+5hj3sXInKGVPdUwZvcwI/aTqH5jxH252A5//FRrdAPzSDtciqu0tBD3Jow== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237143; x=1712323543; bh=kQzd4l67RES9bBBtaKYQiJmUw3wc CTLjmrVOGVA9hbw=; b=I+QCnqYZlq6LRIt+uAb05nwoeJGvcA5gH2kZ8b8wgEGF /wzduOhZM+5CsecomlHQZjeiR4QdjzvYIeFK8YtLnHBe1BdWwkWwnX4s6G8cebe5 NEAI2ZhGPTsyM55/D6VDE79eog+w4DRBN3QcX2H4C03QUeGcPz69pj9mKSX6kIOA 3DdCBdub1KmSjJ+M7qgG0Vgfk4TG5cvTU/zImulIZXMf/QY2BJ/2hcvASvctQIba meqd8lmYV7dDAOznc5WOHrGavNLSDrkLsheLn3CvZqMCIDWzoI38vftS7dFFdtPE 5nIKSojZ8+0Hs8dxkXTFP+3QJ5qTBuVAeDxo2eZzsg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhephefgvdeuhfduudffuedufffgffehgedugeeivddvjeeugfejudeikedvgffgteei necuffhomhgrihhnpehpvghrfhhorhgtvgdrtghomhdpghhithhhuhgsrdgtohhmpdgvtg hlihhpshgvrdhorhhgpddvtddvfeduuddvledugeehtddqrhdrshhhnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:42 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 22e63603 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:38 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:39 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 09/12] ci: install JGit dependency Message-ID: <1deded615eb7a26c3a4a47707dca6942a8a1732b.1712235356.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: We have some tests in t5310 that use JGit to verify that bitmaps can be read both by Git and by JGit. We do not execute these tests in our CI jobs though because we don't make JGit available there. Consequently, the tests basically bitrot because almost nobody is ever going to have JGit in their path. Install JGit to plug this test gap. Signed-off-by: Patrick Steinhardt --- ci/install-dependencies.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh index 068c478025..3fefe134ea 100755 --- a/ci/install-dependencies.sh +++ b/ci/install-dependencies.sh @@ -9,6 +9,7 @@ begin_group "Install dependencies" P4WHENCE=https://cdist2.perforce.com/perforce/r21.2 LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION +JGITWHENCE=https://repo.eclipse.org/content/groups/releases//org/eclipse/jgit/org.eclipse.jgit.pgm/6.8.0.202311291450-r/org.eclipse.jgit.pgm-6.8.0.202311291450-r.sh # Make sudo a no-op and execute the command directly when running as root. # While using sudo would be fine on most platforms when we are root already, @@ -39,7 +40,7 @@ ubuntu-*) sudo apt-get -q update sudo apt-get -q -y install \ language-pack-is libsvn-perl apache2 cvs cvsps git gnupg subversion \ - make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo \ + 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-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \ ${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE @@ -52,6 +53,9 @@ ubuntu-*) wget --quiet "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" + + wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit" + chmod a+x "$CUSTOM_PATH/jgit" ;; ubuntu32-*) sudo linux32 --32bit i386 sh -c ' @@ -112,6 +116,7 @@ then else echo >&2 "WARNING: perforce wasn't installed, see above for clues why" fi + if type git-lfs >/dev/null 2>&1 then echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)" @@ -120,4 +125,12 @@ else echo >&2 "WARNING: git-lfs wasn't installed, see above for clues why" fi +if type jgit >/dev/null 2>&1 +then + echo "$(tput setaf 6)JGit Version$(tput sgr0)" + jgit version +else + echo >&2 "WARNING: JGit wasn't installed, see above for clues why" +fi + end_group "Install dependencies" From patchwork Thu Apr 4 13:25:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617844 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 1C2B112837B for ; Thu, 4 Apr 2024 13:25:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=66.111.4.26 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237149; cv=none; b=UstwAk+9OfjRJ9wtaCH65uRhMpJwjDfKriqGesy46MG4d9AZl39ubUdfDS6WDNbIXN7ztPJ8O+dfnQ42JijYpckcYhgIaVQgzI11wN2pxVy3a11KVnLMYvFF7kyZ0RQ1OjJ9Ak2NZgIefsKkA9Nd6S+++i6meaE9oIiBRHnVJfc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237149; c=relaxed/simple; bh=Wz2RU0run5NsYkma2zxfGdwlb9IAdwQxV+4g/8k41c8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ChgAp81Vxiu0X9ucTuG9TkXWyZX8qouiItMKhJthKloiE8tC1CuhFWuYOJyCCglEg8m9O6JNMUPh/bL5DyjGmGeKh5wSbYDoxiVyovy0y9Nw3D+PDvlmE7K9tbwxm2nG7hcxIsggeqgNUpnr5mMSblRDHar+UhuY3OGdBJaraLU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=S/sS6gal; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=KVWkzWiF; arc=none smtp.client-ip=66.111.4.26 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="S/sS6gal"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="KVWkzWiF" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 0AC3E5C0091; Thu, 4 Apr 2024 09:25:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 04 Apr 2024 09:25:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237147; x=1712323547; bh=pHHWX2NBDU ASfCMZ+iS1GzPCF4tZK2Rd55QVsdoQD0E=; b=S/sS6gal1ehUhqs7LbGlZEtLi7 ymGrxlHDenUrONdkH/keFyu+XO1HF34uH1tRqVn/SKQ3P1chf9fukiDrNZ1512Ny ePSJPzH9wF0CVtxqCysAKhNqsHlP1DpNmHiPUFqNTEgd9LzjSpgl1UICQNZO5Csx Cl2DaGeI6YPct9/3SmlipAUcTHGkSCL1aeHgQKyMInVcUOO6DD+XXOgFsMysl5i8 Gsw47SeRUTIPaClLNe76qGAi+am/qTOPoC1rbPzYqMbAc2uPwRV+Snt72en/69ER zYXwgrKVJkeomxs/Zw6qcQcQoqZerMR6cMtOfyNW0xyL++UZpmRFPE+Xnhvw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237147; x=1712323547; bh=pHHWX2NBDUASfCMZ+iS1GzPCF4tZ K2Rd55QVsdoQD0E=; b=KVWkzWiFF1le+vo3xSCMOZfmRte8pdP2Wj0FmQ0zDS58 9eFQtCUDqM9JpDiZqF+4zFytG7kOtM9vbZc2sRxjB1mIQfU8NFVAT0UOhGanEYKF OyqKNqQ09hkknjWocHEDPmj+CiZpZRrijZuFO/Svt/+g84HzGdxKTLF09mbXoByY RCOXsxkVuYdM248kf+WB8mu28tMOlzPwyU0sSVrVpYhJX9lDv+HNJpygp3yMpfyf C1dIlcWu6MkLu/6HziTfUmZ1jlH2iuSot0Xpwcy6f0pTx0IhDU45laWCVeTTutGc c/JdWu3KelnpEVPbedlKFrExrSZv6jkXz3FAU3STOQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepueektdevtdffveeljeetgfehheeigeekleduvdeffeeghefgledttdehjeelffet necuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepphhsse hpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:45 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 6b2db93a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:42 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:43 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 10/12] t06xx: always execute backend-specific tests Message-ID: <51c45c879f6c683ab1bbf813ac26e1885e800d93.1712235356.git.ps@pks.im> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: The tests in t06xx exercise specific ref formats. Next to probing some basic functionality, these tests also exercise other low-level details specific to the format. Those tests are only executed though in case `GIT_TEST_DEFAULT_REF_FORMAT` is set to the ref format of the respective backend-under-test. Ideally, we would run the full test matrix for ref formats such that our complete test suite is executed with every supported format on every supported platform. This is quite an expensive undertaking though, and thus we only execute e.g. the "reftable" tests on macOS and Linux. As a result, we basically have no test coverage for the "reftable" format at all on other platforms like Windows. Adapt these tests so that they override `GIT_TEST_DEFAULT_REF_FORMAT`, which means that they'll always execute. This increases test coverage on platforms that don't run the full test matrix, which at least gives us some basic test coverage on those platforms for the "reftable" format. This of course comes at the cost of running those tests multiple times on platforms where we do run the full test matrix. But arguably, this is a good thing because it will also cause us to e.g. run those tests with the address sanitizer and other non-standard parameters. Signed-off-by: Patrick Steinhardt --- t/t0600-reffiles-backend.sh | 8 ++------ t/t0601-reffiles-pack-refs.sh | 9 +++------ t/t0610-reftable-basics.sh | 9 +++------ 3 files changed, 8 insertions(+), 18 deletions(-) diff --git a/t/t0600-reffiles-backend.sh b/t/t0600-reffiles-backend.sh index 64214340e7..a390cffc80 100755 --- a/t/t0600-reffiles-backend.sh +++ b/t/t0600-reffiles-backend.sh @@ -4,16 +4,12 @@ test_description='Test reffiles backend' GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +GIT_TEST_DEFAULT_REF_FORMAT=files +export GIT_TEST_DEFAULT_REF_FORMAT TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh -if ! test_have_prereq REFFILES -then - skip_all='skipping reffiles specific tests' - test_done -fi - test_expect_success 'setup' ' git commit --allow-empty -m Initial && C=$(git rev-parse HEAD) && diff --git a/t/t0601-reffiles-pack-refs.sh b/t/t0601-reffiles-pack-refs.sh index c309d2bae8..157f79fe52 100755 --- a/t/t0601-reffiles-pack-refs.sh +++ b/t/t0601-reffiles-pack-refs.sh @@ -9,18 +9,15 @@ test_description='git pack-refs should not change the branch semantic This test runs git pack-refs and git show-ref and checks that the branch semantic is still the same. ' + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +GIT_TEST_DEFAULT_REF_FORMAT=files +export GIT_TEST_DEFAULT_REF_FORMAT TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh -if ! test_have_prereq REFFILES -then - skip_all='skipping reffiles specific tests' - test_done -fi - test_expect_success 'enable reflogs' ' git config core.logallrefupdates true ' diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh index 686781192e..aa9282007c 100755 --- a/t/t0610-reftable-basics.sh +++ b/t/t0610-reftable-basics.sh @@ -4,17 +4,14 @@ # test_description='reftable basics' + GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +GIT_TEST_DEFAULT_REF_FORMAT=reftable +export GIT_TEST_DEFAULT_REF_FORMAT . ./test-lib.sh -if ! test_have_prereq REFTABLE -then - skip_all='skipping reftable tests; set GIT_TEST_DEFAULT_REF_FORMAT=reftable' - test_done -fi - INVALID_OID=$(test_oid 001) test_expect_success 'init: creates basic reftable structures' ' From patchwork Thu Apr 4 13:25:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617845 Received: from fout8-smtp.messagingengine.com (fout8-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 6DB1586ADC for ; Thu, 4 Apr 2024 13:25:52 +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=1712237153; cv=none; b=ZbuZHE4PIaNCS1/GB+T39ExTZJnlJpHqOwaYvemvShflQz/E1jSRbkiQFVTIFwNH/JTWA9aUwRmadiCJN7wp/ZOTlE4udfBO8c3NQO+Zp6RNN4mYWs+/j1NLz48tSKVwgcPClr1wyUwca2l68A/sbiTojKaBSEvSriw+Wm6hp/0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237153; c=relaxed/simple; bh=bVgrNXKDRsYSg3TbOpib5PsPjn9oPGFbqM2qXSUYxPw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Tlia0pjwR5pqnWX4MktA+l7ZP6mrduSM0LxKVoZ5ButCpnmtBvid9VQS1361apt++D/0oowrq+qv/HZY6ICKLhiIKv+9yhoKuGOl0tWkgIujjdCwpI0Ddawyv9fSBiDyLqcT32cC3mx4TFmR6CtVq67LI50n6obcOlKXp9WNeC8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=alIDsxsf; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=t98lxuXv; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="alIDsxsf"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="t98lxuXv" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 8F0BA13800F9; Thu, 4 Apr 2024 09:25:51 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 04 Apr 2024 09:25:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237151; x=1712323551; bh=kfdMJfpvnR ftA9IvEQ9vBe2vVgc8viYGYq1iqknUEXU=; b=alIDsxsfMrGHsqVODekS4dlk6Z n5HbXQcfZ0Vdrw6H35os/HQPymoo1jMs7bo8UwtpB084ptUz4RgUgToj6oa0wpAI yDl39v8MMarSQkEUg8wJbf4VZIDqd6oGg47F3hJSRdI3WnmuMVki0iHL8+7ww/ib Tht3ONdGOjKuLDyIJMJXQ2HltrYHfe7p1Ygn1mNHoFybr4gOdQtG8fT1+xJT1PiC ZdK+cn3uL9OlWZyLvI/02ExWjcuuu/pwrDF5oBWSv51srpdRamuzSgdJhA8JC4P+ t0KqFBq6CxtrOlkUtRKvZsbk/kGZVtRbbxshbtG2nFA/bAJcjnwx0jSZ+SDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237151; x=1712323551; bh=kfdMJfpvnRftA9IvEQ9vBe2vVgc8 viYGYq1iqknUEXU=; b=t98lxuXvZWkL03LjAAMDrGq1LPfcIJt6niW4P9uRvdAT RXz16ElzQcypSKpvTtXexkzYdgwN80nNntdefOhyuErtcD3NqN3caT9GjMcnuEM+ tlFGeVo0Dm3YiHwlAfidwkm7YSAuNO4vmGImXEXK/xFTXdRKKXXV7juhhxOTs1jm be7WIITwhoKz3hvo9E5RK8KGmMocqtnDUWbNXaGZqaSc5h3oyultOVycEbq5oqYq pmoHdpaWeIPPgdmtk7Oc029+Pp+yaEsiMjTfjA1xoL3pFrnQtzZw0Jz1lXaNBAzC HYvJkVkgJXYqAqe2YqQSx8KCYtnj4Eqasx7j9/tuUw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepueektdevtdffveeljeetgfehheeigeekleduvdeffeeghefgledttdehjeelffet necuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomhepphhsse hpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:50 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 3f645332 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:46 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:48 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 11/12] t0610: fix non-portable variable assignment Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: In `test_expect_perms()` we assign the output of a command to a variable declared via `local`. To assert that the command is actually successful we also chain it with `&&`. This construct is seemingly not portable and may fail with "local: 1: bad variable name". Split up the variable declaration and assignment to fix this. Signed-off-by: Patrick Steinhardt --- t/t0610-reftable-basics.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh index aa9282007c..3b1aa99e7c 100755 --- a/t/t0610-reftable-basics.sh +++ b/t/t0610-reftable-basics.sh @@ -80,8 +80,9 @@ test_expect_success 'init: reinitializing reftable with files backend fails' ' test_expect_perms () { local perms="$1" local file="$2" - local actual=$(ls -l "$file") && + local actual + actual=$(ls -l "$file") && case "$actual" in $perms*) : happy From patchwork Thu Apr 4 13:25:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13617846 Received: from fout8-smtp.messagingengine.com (fout8-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 F14AE86ADC for ; Thu, 4 Apr 2024 13:25:55 +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=1712237157; cv=none; b=Y+73qXoLXVOQ+gCiDu7kpOMExBUiQ9ax65Y/Gr675y0PA8ueDfG4Q65DqYy2rR7xEkvT/JW1VHA7s/X7ZtB2eo2tzgQ8Qarw+b1Uri2OBleSAkWqQSMmJeIXfak4F3tb3aZQF2dKLOe1iWqFLl7eYflcDyiqz+8YIMX6KgxE0Eg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712237157; c=relaxed/simple; bh=fDH8UT0DRuLK2G5FGB8JAfWiC0Apij3O534qrY2nC7k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UMpGFZ8R9ME4UApnFV7F0VZwkAHG6kWLBk9/3tL6rI0Ko+NoQO1sTjdk/NqaNF+yfqe0h6a/vEBzv3Rk+W18vaxc/0eFgIK3UU58S7F9EOjdg2O4buU+P4Do5S2ctKzDYWN+mLLPw4GDESd7cW/3LDijpIS0nRSNdtWP9X6VgwM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none 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=ArUokfWu; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=p8pXpkoJ; arc=none smtp.client-ip=103.168.172.151 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none 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="ArUokfWu"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="p8pXpkoJ" Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 2B8C0138017A; Thu, 4 Apr 2024 09:25:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 04 Apr 2024 09:25:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc:cc :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=fm2; t=1712237155; x=1712323555; bh=g8Uq2iySiT ayAJDrN02XmrhmyXS+1Zyhhw8WH3N2K+4=; b=ArUokfWuFBSGLDM/UiAIHz4RVR cHnlfq38g677osuLqW1e5oip16PrnnUtK22J3QBq6O0FCE0JBof6ElHLpaval2xi 5MEiY7DPdutdCi7Lh43dJayRx/7A4+qEPz2xejaLKlbSlR0mmurOvMIbRCAwfJ2n wmEgGepVRJ51T38rQMtVlCWBz5+QHwbEooznVZzR2gY4apF3ePPt9EO0tlAp+ITA vDNor4lD5ge9nL1mDGF+MTjlTZqLUIyZi4vPkJgSYwZ864T2e1dPnVfkyvdQPoS3 wvuM3Wv7kh7vRHGrsTYWRIR3KDs/8oIP4JzD8p/ZLMwXBTY8C7R6xGqEgqYg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1712237155; x=1712323555; bh=g8Uq2iySiTayAJDrN02XmrhmyXS+ 1Zyhhw8WH3N2K+4=; b=p8pXpkoJuDP15DeABnJsXRkpzO4bXTh+xAWnU4S2lypl XYguTbKxl7VGuU8YYIn5+S7CwE1NyvAqRhKvTIJUwY6URZnnd1X0jLzo6WFt2DOE YzoVMThH2L/QdeojlzA06RRDX6shLFrBfb7Ub96BGLKZS9/Lk5lQlrpUAWqNsCt1 tDZFTcdMTPmUcOAcbl9Yh2XROeQbrW9GB7sloxnzTfzNrXfRBEDcirw9NkXq/paJ GN7k8XJYK7GzKZ548jTXn0SwM95WmOfXtiaI3Rf4jGV87s09/ezu4XG8na1i1BIi qwGwBrJIE5YoiLqH3cs04XDk2w+rTXPS9MgBakcfgA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudefkedgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesghdtreertddtvdenucfhrhhomheprfgrthhr ihgtkhcuufhtvghinhhhrghrughtuceophhssehpkhhsrdhimheqnecuggftrfgrthhtvg hrnhepueektdevtdffveeljeetgfehheeigeekleduvdeffeeghefgledttdehjeelffet necuvehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomhepphhsse hpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 4 Apr 2024 09:25:53 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 8ba7a779 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Thu, 4 Apr 2024 13:25:50 +0000 (UTC) Date: Thu, 4 Apr 2024 15:25:52 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , JGit Developers list Subject: [PATCH 12/12] t0612: add tests to exercise Git/JGit reftable compatibility Message-ID: References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: While the reftable format is a recent introduction in Git, JGit already knows to read and write reftables since 2017. Given the complexity of the format there is a very real risk of incompatibilities between those two implementations, which is something that we really want to avoid. Add some basic tests that verify that reftables written by Git and JGit can be read by the respective other implementation. For now this test suite is rather small, only covering basic functionality. But it serves as a good starting point and can be extended over time. Signed-off-by: Patrick Steinhardt --- t/t0612-reftable-jgit-compatibility.sh | 115 +++++++++++++++++++++++++ 1 file changed, 115 insertions(+) create mode 100755 t/t0612-reftable-jgit-compatibility.sh diff --git a/t/t0612-reftable-jgit-compatibility.sh b/t/t0612-reftable-jgit-compatibility.sh new file mode 100755 index 0000000000..f25ea880a0 --- /dev/null +++ b/t/t0612-reftable-jgit-compatibility.sh @@ -0,0 +1,115 @@ +#!/bin/sh + +test_description='reftables are compatible with JGit' + +GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main +export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME +GIT_TEST_DEFAULT_REF_FORMAT=reftable +export GIT_TEST_DEFAULT_REF_FORMAT + +# JGit does not support the 'link' DIRC extension. +GIT_TEST_SPLIT_INDEX=0 +export GIT_TEST_SPLIT_INDEX + +. ./test-lib.sh + +if ! test_have_prereq JGIT +then + skip_all='skipping reftable JGit tests' + test_done +fi + +if ! test_have_prereq SHA1 +then + skip_all='skipping reftable JGit tests; JGit does not support SHA256 reftables' + test_done +fi + +test_commit_jgit () { + touch "$1" && + jgit add "$1" && + jgit commit -m "$1" +} + +test_same_refs () { + git show-ref --head >cgit.actual && + jgit show-ref >jgit-tabs.actual && + tr "\t" " " jgit.actual && + test_cmp cgit.actual jgit.actual +} + +test_same_reflog () { + git reflog "$*" >cgit.actual && + jgit reflog "$*" >jgit-newline.actual && + sed '/^$/d' jgit.actual && + test_cmp cgit.actual jgit.actual +} + +test_expect_success 'CGit repository can be read by JGit' ' + test_when_finished "rm -rf repo" && + git init repo && + ( + cd repo && + test_commit A && + test_same_refs && + test_same_reflog HEAD + ) +' + +test_expect_success 'JGit repository can be read by CGit' ' + test_when_finished "rm -rf repo" && + # JGit does not provide a way to create a reftable-enabled repository. + git init repo && + ( + cd repo && + touch file && + jgit add file && + jgit commit -m "initial commit" && + + test_same_refs && + # Interestingly, JGit cannot read its own reflog here. CGit can + # though. + printf "%s HEAD@{0}: commit (initial): initial commit" "$(git rev-parse --short HEAD)" >expect && + git reflog HEAD >actual && + test_cmp expect actual + ) +' + +test_expect_success 'mixed writes from JGit and CGit' ' + test_when_finished "rm -rf repo" && + git init repo && + ( + cd repo && + + test_commit A && + test_commit_jgit B && + test_commit C && + test_commit_jgit D && + + test_same_refs && + test_same_reflog HEAD + ) +' + +test_expect_success 'JGit can read multi-level index' ' + test_when_finished "rm -rf repo" && + git init repo && + ( + cd repo && + + test_commit A && + awk " + BEGIN { + print \"start\"; + for (i = 0; i < 10000; i++) + printf \"create refs/heads/branch-%d HEAD\n\", i; + print \"commit\"; + } + " >input && + git update-ref --stdin