From patchwork Mon Apr 8 06:47:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13620618 Received: from fout7-smtp.messagingengine.com (fout7-smtp.messagingengine.com [103.168.172.150]) (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 2381229CEF for ; Mon, 8 Apr 2024 06:47:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558851; cv=none; b=XMrEa1fCBM/xveQe09pWtFU3VVSPjqan5sDwQsEnIaZn5uKA0nceUICejLVDF/MFcYdXcXGnJC6AsBygsGbch4v0936lhawq3oaCF3cTkJW8f3ywYSGGNNWzcyhAeYcQEJzx7JfdhV8ZVbLtxWsCJ5GxrcVJ4TjEYNQvCVp1bQs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558851; c=relaxed/simple; bh=U02SfRmvCfVDnmlWylHQc/xMGoa2JabEE1fDJlpHPhs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=X9hiH3f4r8VKEDgS5uGmn+Vst1U433Z7LHRiW2101az4RjWDaJl4S//ShOFbrhBl/wx0hjQ0u14H/7Txdszso7IzSd7LtiSO6iFFis0V0IZkMN7l3oQAntUydZlwMACv6U7GZYSiQqVNrQDPk0pzIq+nFNw67j8YWuCRWFuO0hU= 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=ZjxKsl+V; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ADyLqw2L; arc=none smtp.client-ip=103.168.172.150 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="ZjxKsl+V"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ADyLqw2L" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 4D65E1380059; Mon, 8 Apr 2024 02:47:29 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 08 Apr 2024 02:47:29 -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=1712558849; x=1712645249; bh=rIJosIOkGl ZlhM+8CMjeq7n1/4+LXL20PvyO3aTVYxE=; b=ZjxKsl+VhPIpfEwDB5GxhyCMHc iJBQMr975vJWLQHU+ANj2HEIHge0uGsQqVHYZq66xgX6nhZbjabke6epgKp8aoX+ ojr76DSn9Y8z1LouQ7ToqbGYiT4nHaTTMyK7vh92DdsV4aB+Gq847cizZP+dbJD/ 9BsfT8HKLAR4guWhDOFCTKMsVJ24tBCRMs/z7BaHfgqXNbPkNfoSkJRdsI71Q69/ ckDRyAp0rsL4RqDmLPAhb2LA79SXm2G/Q3r1FtJNEV63s9RnrOX2xajwyoj9dVw0 JIGyHdGv3eNCtC/WZLT87xb5Qh6NNZRDAw82Rp0oLnRdgB5IPwB09ww0rE2w== 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=1712558849; x=1712645249; bh=rIJosIOkGlZlhM+8CMjeq7n1/4+L XL20PvyO3aTVYxE=; b=ADyLqw2L5AKnbPuxyqGb/hy520KlkETaQOb/S8dD/xLg XzNb66Tb2INakJc5uFDaXGFoRyDwAIuE0Luz48ksIsDdjhgXHqXZCK+KlYBUO6qC Xdk1SjWGhL//Zo1M2HRoJ/jlDX3NZ4rykZ5hVfv6bR52KiK9EUZWrTlUBjliyUlp KgpgAE03yxeTJqsEIYLszAAf2ZKiJAdM8zbsfLGz5uiR4/K9uk1AYgEbmJAat35T dHVU+N8EMfAupVnf1GvYH+HpsQed4lMe8+1C2vYWiy71OPOt6ZOji+Txdh+69KO4 JIsqShh3oyWYQcalBxC28IOWmo3lmbUFG6rUF98onA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeifedvhefgkeeijeeukedtlefhieehledttdelkeeiveeiheelkedtgfevteek teenucffohhmrghinhepvhgvtghtohhrrdgttgenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:47:28 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 19208f45 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:47:21 +0000 (UTC) Date: Mon, 8 Apr 2024 08:47:25 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 01/12] ci: rename "runs_on_pool" to "distro" Message-ID: <89723b68124fa6c91653e93a23cf15e475592fc7.1712555682.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 "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 Mon Apr 8 06:46: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: 13620601 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 10A1A1802E for ; Mon, 8 Apr 2024 06:46:22 +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=1712558784; cv=none; b=GzH0bGC3lqz/UtHCaECx3IkDq2NA3tYA66DKJyIHUzeAvFCQwx+sDvm33G9l9BJbMN1yvXA7h8YDP8XwjVkQgETji+xwCWkMt/yynpWi3eyfdAMeKrxoyrSe+UycoDU4ZkDr6X8QAt+/O4OqDGW9/b3mqhBfpQtmEqGJwoiod5k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558784; c=relaxed/simple; bh=V8ydzhaFIEaEeygCK/BqhMy+hHDRv/Hw9+uNBWqgeV8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=fFDsbivgogDZG3YCHofrKafthgOWL0E9R4MDUneNyfzJuKtVDyvRoKjoUdIXVb33xFGqbcRxpJSBIGEHYTQHeCv4Sk9BCJ8+D84zWvTbZMiUBqELEHwiks18HqRKq+FqoF8Qw3bUI/hZvOJZYEvsLkhjq4Tfbr3VvC308z1c7/8= 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=qN7s/I4Z; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=bg5+Q1ve; 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="qN7s/I4Z"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="bg5+Q1ve" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 2F542114008D; Mon, 8 Apr 2024 02:46:22 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 08 Apr 2024 02:46:22 -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=1712558782; x=1712645182; bh=bfW94oVWwn X3K9tZMAG6dlEbKNApRIhQOYP3oR+UhaQ=; b=qN7s/I4ZI7oJUlZLfM1O2zMHkH 1SE0GMHtgayUOxn3KqK2YRKt46+07RGjSgZ2bUdAfiEgF5nWlFenBZ++GaiyYFQb F2kAB1vA3fWxtgYImvypXR477u6XfVTrB2u+y3DArf5pVld6PrqHFvWe10iXAEVt fbwuJykpvDwv/HzemniTHY13Vdkg5mHvog+o8MtFFgVAQVmkcHHjGBUOyR0FRyn9 WHryrN6z8OJnRWz3O5GX1JHMX1+pgX3U8jiODiY06y8SL+jIEtw8y4Bs/WCYRcBE OUMIW+L2YQiwMELrtU55CV/G6q5B2CdZYsgl7eT9XJWMRO7hGMulLMMh1+1A== 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=1712558782; x=1712645182; bh=bfW94oVWwnX3K9tZMAG6dlEbKNAp RIhQOYP3oR+UhaQ=; b=bg5+Q1ve0LqkPr7Ty8mBdHDTmdjmYvk8vG65s4b6N4BL dAYwE58n+oJlcLlCKqJnCmlDitoCpcX4UcuP7Xd3C9pQksQ1tW5IrmVyT2J4JNgX G3NwHpZZ3kc+xJBVlvzVpfFdblZxdpG89lJB6n8cmhm1Gx4bRyivOUKQjpU47PNq kF3VhYh72aPhKiFWsO3GPsDYSZC4vmUl7y9sCSkAeLa5UpN9O53Dm/9meZ1ZMKRw WWa+w/rO+TQxXkdf4F7ItReY4+EvwG1dUX076g/A0Jeo9XwD+6f5rajr3AoROBZx 8tkz/Qqfdk3kGEBh9ZItn/sod3sm+GZY3KFdFfhCsw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:46:20 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id f401fedd (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:14 +0000 (UTC) Date: Mon, 8 Apr 2024 08:46:17 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 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 Mon Apr 8 06:46: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: 13620602 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 7B3E12561D for ; Mon, 8 Apr 2024 06:46: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=1712558788; cv=none; b=dN4wJGV2fYOkKYw0rDE50ZDr3snBUoEhWkETBPqPpc3d1exBqBmo/EQuD8lpmem0+sCnp3E20BbWeVJJBF6sPWzbAf+THF2SyayHEqwDSVtkY6i5CTv/e+FcVVChdZ73rzvii608N5VvkVz3jz2Xg29cBTK/XmnTZTKafYz9Gq4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558788; c=relaxed/simple; bh=igWirBzFcwBSTwliqDgQxcguwUhaUNbRxT9KRcH5P6A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=b038HsVCefxJfy4u7FMzObDUB8L7hLCkf96Ky9g2puhKE+aLn7ooEG9p4BIyr4h0IWmAzoMPxiGVDP6JwoulzTQdjmAUvrpBgJvlFqeGO/MwojP2Swvv7pmoTn8cWTUnwQ5Fz2dmu9pj85yGuwHf2IxxSOpZOWcvDQdNiVgu2V0= 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=asAYqRb6; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=q5yQ0++I; 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="asAYqRb6"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="q5yQ0++I" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 95A1F114008D; Mon, 8 Apr 2024 02:46:25 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 08 Apr 2024 02:46:25 -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=1712558785; x=1712645185; bh=ST5T+9nWFO rPiCE8WSgoQVV/VVDx1TQUMyxABDwm99A=; b=asAYqRb6yrE+FaOYXppxwphzzJ 3DadPaUr0GCVLPYw15cixhbjiBajAdbhqg28huJa9YT7cynzARpivgpa5IyJZJdk f6dod95KkqRH3FHNT4UIMZvZaVWUQ0WF3YK5G9oFtUXIHc+sU19sQytpRW/zbWxD Cg/3g8VFe8Eg5SoF/pBu9gfh66RIY/a3+xvRanhM+czI1dVpUzaMwbTmxn84wVQ+ +bXBMWMMniuE+li2cFG5bdbKvA6jprey9rOE9pwxc68uHhOaUGuP1FGsYJ/akHDR u+s1oQFBH+SqWUsEj5xBqxxJTVH26UNyKsTM/y+N6UunGHzXrR8yhSDueUnw== 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=1712558785; x=1712645185; bh=ST5T+9nWFOrPiCE8WSgoQVV/VVDx 1TQUMyxABDwm99A=; b=q5yQ0++IJGC0r4dBpOl8Rx04OVep3ZfoV8FwNHAU8GkP jot8/xzwxNBxexGW88kVv4ujfZSSJCuJfxzumnM8o41UimE8GAub/f3gC/RWvcUQ LqvpD4Yu0gM88zYnZfWyzC9gWaT8f5a/3e7uV2szgaXtZJ8oF0DqDdMOmtnKCGCo VeRmZewp7aIQ5YWuz6a6osk0ot41oPqpq3f8m3QFe6Cx/yX5eNuLbLIZ4iv9mWC/ 0kHsBDSoet9WsSg3fM6SnnN0aQfi/GI3juXk/uC3As/UnbJZsimokyAcFMqPtSAI ykEn9ZBB6OcgZiaYRA1rYkSXIuvOAK5boQrXp7z1bg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:46:24 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id cf2efd25 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:18 +0000 (UTC) Date: Mon, 8 Apr 2024 08:46:22 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 03/12] ci: allow skipping sudo on dockerized jobs Message-ID: <16603d40fdf96948580c04a7c2b791a97ec64fe7.1712555682.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 Mon Apr 8 06:46: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: 13620603 Received: from fout7-smtp.messagingengine.com (fout7-smtp.messagingengine.com [103.168.172.150]) (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 69E4023770 for ; Mon, 8 Apr 2024 06:46:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558794; cv=none; b=WXu24cd91vZGqget0VddFqsYKZ/wB4XMJK0fe4GtqbfFsqVuMh8UOzL1MkfbU7xNByHonmDQ18JUFdVFIAs8WGNRD2wvh5B5WlD/VwvSrDsoT2WgIFBw4nG55WkpaZHfAAXbQYAbkSksYcuWiSL3w9vh8m2PB6DH0Ro20+dfuuk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558794; c=relaxed/simple; bh=iwIQnd+ZQeYpyYhaGJrAx3jqwhl7nBK3ghUiYt5trbE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CvrdLwZDfMCzKbDMMJy+xUpiS/zrmY2YQbrquVdItrr12t6VYxkmzl+fJhKtDUVm8kfsKAwIZa3rHmAvTjay60TlKOjHumtsX8WYSZlKwCTQaF2LmfKQf99yEy5+iJU8o0qJmCZ2KwNPyh+spveJwaGQIR5Hl87MX/JqNu7PQ08= 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=itjj/Cr5; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=BIBJmhiT; arc=none smtp.client-ip=103.168.172.150 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="itjj/Cr5"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="BIBJmhiT" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id ED9F913800C0; Mon, 8 Apr 2024 02:46:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 08 Apr 2024 02:46: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=1712558790; x=1712645190; bh=SVhOfi8sQu TFXlecowHMEVCQ1okrByEhItVZ25Hs5Vg=; b=itjj/Cr5s6r8+xKH12oTHgd24K SQvSR0JZq+wGXvLx98oyL18MSUKpFsSWYHqMLpJpRnGpYdf10hRZCTqS7dbw6Q4T XNBx7616Gl7RzGv1zXHb9P9g5+FhY9SPQLOJAmRcUVY/CLa7M5yxOgsgd5MZCU79 LkEqOgiYqwCfavpixQ2bfwDgK5o5U3AQKBFPfaPejJzlNZWbvOlXBy72YEDBE6pj +MSBsDqJjETheggsc4adsfazHkubcnVPFbsSQbyEad+3BZITe7fl+Qr1vIWfrqaD JqBulxxvABVAEHTeANPPj0kgP7EjS4Pkrm8H+0qEUM3SwnJhKLJl2AzXlsVw== 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=1712558790; x=1712645190; bh=SVhOfi8sQuTFXlecowHMEVCQ1okr ByEhItVZ25Hs5Vg=; b=BIBJmhiTTGFhzbL+NQhN0VdKo08pVrppmOGWF7y1vG+k FfFfbbxSYCqEI0YtboTVkPWXHLOhsUpaRudt+wBAo+T52ZdsSY8vAOjvSsbf4wwh 7ahg6w7iNmweQTwO547W4JYTqHgwU396H37kOyzjBijizDQd3xe5BxlgFhZUUzWG rZWvsPiB0hM+cRWpF76+wXYMz80zNPvBLxmF6TE/Fk1nUaYAsX7P+w8Yp3YRLvFX SeK7kMN5hDG/u6hhOXqFBLQniJU+GEQHrfFLlNRgLMM+6dNnFB48Q7GCMKKkB4a8 aeiLXyO5V/YEOp12vLzd5ZaV+LFND99QTcE5+eBcLw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeejffefvdfglefhjeekfeetfffhjeduhffhvddtveejvdehgfdvudfhudeggeek gfenucffohhmrghinhepphgvrhhfohhrtggvrdgtohhmpdhgihhthhhusgdrtghomhenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhk shdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:46:29 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id ad1b1dda (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:23 +0000 (UTC) Date: Mon, 8 Apr 2024 08:46:27 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 04/12] ci: drop duplicate package installation for "linux-gcc-default" 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 "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 Mon Apr 8 06:46: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: 13620604 Received: from fout7-smtp.messagingengine.com (fout7-smtp.messagingengine.com [103.168.172.150]) (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 413F21773A for ; Mon, 8 Apr 2024 06:46:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558797; cv=none; b=YlWhCCw0/Z7JzDzy8qtdBsC3yU1FV0+5zT6xHXQxjX2R8uAuB6ecklEGk8ovygAzf3VndipMl3owjKYXenCJS3IVuvkyXPkV/kwVowF/oRoHFPwYqQY+v68vbZkLPaAYaYnomEo4RovyRH/eqU+rLtqhaeJ+y6tvMiOhZ0+TlV4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558797; c=relaxed/simple; bh=i6Fptd2okvUmdXYWADhIoDu+gLEimpu3r4x5uZC7K8s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=hFa+zoNLjR2UIzxY7tMG+28YPSecQkoHEGwPJsu+VPyZQoRgKZmDUPEOmQpGeJzZUk3FAUIyWLPl9axfFJlexE6OA1feBSnmrW9KfOb7apzadqICHbjSpfvp/VIUyhWFTcmvV1uhY0XpmCWdX1eWG68unwGT7Ma+I0AJ06nBgE8= 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=H/QRfxUH; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=TuvyywYV; arc=none smtp.client-ip=103.168.172.150 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="H/QRfxUH"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="TuvyywYV" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.nyi.internal (Postfix) with ESMTP id 568021380059; Mon, 8 Apr 2024 02:46:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 08 Apr 2024 02:46:35 -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=1712558795; x=1712645195; bh=S2GikXBjJ0 6VrzQwCNzilQ8rcbZnqL8jFqOtoFBoB6Q=; b=H/QRfxUH/vZMumB1QGLzCG8Zug +qB0GDXYcJIRu7cOpoAi/XLycYaasakokVyKjeaSuUlpTEvJLS3EyVZgj3oO3j6i zhQiLNyYCehbaK5pMIXtGWYOwxqgack/CGxEVVn07/pDVaFLZb3t7ITPj3g+r1QY IQu1AAo/edjmurKXBKgNlwqlt33LXexCScK64scrAwT3gNQfkquJ2pNMq0RTOBbM cjwJiSEoQH7q0ou3busY+zO8VS6p8YIteldF4UWi7CVtUbj7ABzj7ZHVROi/OndS ITRssdCHfk8HJj+Fe9A5nFQ1+iipn3S6PfCCUIesKmaKSI3tpJ2iCrisNpLw== 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=1712558795; x=1712645195; bh=S2GikXBjJ06VrzQwCNzilQ8rcbZn qL8jFqOtoFBoB6Q=; b=TuvyywYVnmLgEUndTMvMZBI/4IpM3Og1sN0lV7dQRcsu zU0iMy0draI/pIhIpzl2oaFefp1UT/b/0HPtE7MHGfHO9/zRwehetmcQpUzEyPST nghNbawZjjG8MKajS9F0uf5uvP/I8//olHOWtlpE0TXc6+cuB6zTsn2KPRdbWTde veYFDKTr56ozukwZBKXwYbU2rv3ihxc/5m0SRD5nqPQzEDn+aFKHI67bPTkNA/ip dO2Fgsu5x4owhSOepzDZ+0IvQTOSaaIWDRE6+6nVP2rVpErfCjm+gqEIjN43iCpS EQg1+KHWrxMGpME0SnqAlz/PaxtkS61KSw7Bpb/88w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:46:34 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id ef9896ab (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:28 +0000 (UTC) Date: Mon, 8 Apr 2024 08:46:31 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 05/12] ci: convert "install-dependencies.sh" to use "/bin/sh" Message-ID: <6abc53bf5173e7de3fa271d175145c1672f17a88.1712555682.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 Mon Apr 8 06:46:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13620605 Received: from fout7-smtp.messagingengine.com (fout7-smtp.messagingengine.com [103.168.172.150]) (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 8760328DD5 for ; Mon, 8 Apr 2024 06:46:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558802; cv=none; b=AgqdV5464AoOYE5YcR2rcRI9CCvOdCxNlGajXUvr7CVnnmeTHJGjavQXSqA0gval0C7ntgdJznSRAAyzcSezCwB839fZ4FRGo05+/8UIzl0zMWJTk6bT3323O8O2A62MJyxHYtNN7qE7tz4ZmW5T6qUXLJJ11zDZjVhuW8eRVDw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558802; c=relaxed/simple; bh=fM8Uktwcdv82QiLc5fngDGdwSfnwi+pN+zAooCRn1n4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=IdKs8rfyYNVdI+ivDexPq8yvLelB6nITldsDTExiu1tEBLNiG++aEkpWhCF+2gddDEmBWYKRU/4he6dZu6bef2DqnRlE/PNSmi6YtpJrmj1kPgQcaU9f5vtRxLWGUl5u39QtO94bPERolE5UD6Y5qHngSct6JUABmbwhU6RRtzU= 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=IGP7Rges; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=D+FdeeRM; arc=none smtp.client-ip=103.168.172.150 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="IGP7Rges"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="D+FdeeRM" Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailfout.nyi.internal (Postfix) with ESMTP id AD6F81380059; Mon, 8 Apr 2024 02:46:39 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Mon, 08 Apr 2024 02:46: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=1712558799; x=1712645199; bh=chTZxDSNeW nYeefDlJMPh+RGS1KmX9It8WS/bbf3UdE=; b=IGP7RgesMXSV5bHskcDqJXydor vzvJmMSbgIkBm3U03qOhiDnBeLvV7kJRRoYnd/b/9E3rQjPYd6ariP6xbEcaWMlf CB44U7HU23sagpCMCHfynbArM4ZRCAxvEGm8p8e9Hrl/WNsXNrQdbcrzWoZ44NOL ZmPtm4EGd4HRVkflDtQv13epeQsroILvQ6vUeq+ncbBT7arvdUPF6cSIvPFuMI32 Ru0eGSNwYfEHQZ196ZscUV10OdVManBJgaC0t0VJR7iiHvg7AErnDNGe5txtmcFU lOLN3l2pXCJ8b7PPSwg2t2XCReI6NErrkSr/cIyZ7Mck/8wUpwvUoWMv8z1g== 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=1712558799; x=1712645199; bh=chTZxDSNeWnYeefDlJMPh+RGS1Km X9It8WS/bbf3UdE=; b=D+FdeeRMOzlUpqu1WhkX/5hy76dpflUJX+izOjuia8tm mAsT6+CGl3J2mku2E2Hq12olumTNUg6sBoocCq9nWslhi/4/BotSs5UlzD3kcDpF g/OEybbLe/rygWKyP7hX87kXjBL/HuV3/5TRKtVRXB72gIUKr72jVtc2/9VtHy5Y WEAej03mnLkYvqZLLlwN5dSBP1ooDBJ+/p0yuZl4HgMFGpI1GOYUP+RqFksWpLaI LkpEjbrc52N6jXCb5w587LDxLqdedhqqz1TbMHgNBImZ/T4DNiFi4bPqXpKmwsvU Wrvptd9Q4EGiu51YRgDgM7pn2Q2AwzxD7PMUQYjggQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:46:38 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 59dddd31 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:33 +0000 (UTC) Date: Mon, 8 Apr 2024 08:46:36 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 06/12] ci: merge custom PATH directories 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: 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 Mon Apr 8 06:46:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13620606 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 EDE102BAE1 for ; Mon, 8 Apr 2024 06:46:45 +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=1712558807; cv=none; b=PwM192COrix09eCuOhd5NWMRE4K2MLw3+O087ifvbhJ1lfRKi1f5HDMsGIKBehKhEBVxU00W+ksaZbYTU1O/oXr8/QPwbT4Tf0O2GmHTk8BbtM1jaetu/UTPmZPQxUdlu8jIHuJEB3BpKAB29uBDYXZsRNBzSKkatUBdXS0GSuo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558807; c=relaxed/simple; bh=ys/Dzq9cdwdsRy64f+2Ocu161rwyowM/yTnYp8DYTyQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dIK/t4R/afPBFM/43iLi7oklwTVVXcNgJ8gxDD89A+N4v+iNxPbCkIn27PgunPx8RfM2JQyG15kezxq/7d3sHe8VnfNZR/gkV1CamcvmrQ2efL4+MckaxgsW24RzVxO8f4zRwdIKlvsE86rk11+fsD/KddG9SGM+YCeXw6iwLCo= 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=Cl8UAhiv; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=EzEi/i5J; 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="Cl8UAhiv"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="EzEi/i5J" Received: from compute7.internal (compute7.nyi.internal [10.202.2.48]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 13D9611400CD; Mon, 8 Apr 2024 02:46:45 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Mon, 08 Apr 2024 02:46:45 -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=1712558805; x=1712645205; bh=3dfRJXK48z 79mbOfImFYAPZmX00osM8gmkmHoWdEINg=; b=Cl8UAhivttwPyOuO160QUToL3P M3QWJxZ2yFibmAW7mlrHf1fxX/+Hl8zi30hfL24JlGioRT/1wA8czWkOC2lMT8lF s24IcceRYi9VgdTRJGkeFwA3n7vMD/1gpO3ZMacy2AlZGFxwknwn26gcc15cNSof +m5hCs9VO0D4GNJEojsO/VmX7sTYnERsuDQtEP97/Jc63CKF8H/hwiS2ebEvgBn5 qr7RgaX5JIqN73HxLYFR6X024xQERGAGk6CII4O5iWZOwrXZbRnPr4JVlqRfk0aE 4NDRxVPVFzsm+NzJjFlcy3IDzvkAFdIjvI+D9UuEdNbrFskkgVozl+8i+DUQ== 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=1712558805; x=1712645205; bh=3dfRJXK48z79mbOfImFYAPZmX00o sM8gmkmHoWdEINg=; b=EzEi/i5JbQ8Xj7Jo2kqFlcBEsM/3mZmhE04TCe311eZt vg5GohGwg21EMirv3lVrPsHA/nuL15whpXTG4P2xKvDhq4zd+7o8ZixAaXNhp+ah jCgaz0esCbOx2oKHbUIuQi7XpPEG+BdP2J512ccN7rTbFrHy+9pYYQHkC0Ai9DTm fIlKQIRLCbvyPQqZ6yNm2mI9/Tv/7mDXbaRcFcUGU74XmJo7HR6+V+xFspzex1lw 1h2tapNG4D1XHKraA4bG8gyUJm8jw7wVgeISYexwaSkR/DXL3Y9Y3NaHgwtk9SeQ tDay4vYhTClgtSzaSvzorm08bclGlef8yR8qVFrGBQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeevuedvueejheeuuedtteekffeftdeutedufeeiieeikeduveduffffkeehjeef ueenucffohhmrghinhepshhhqddrtghipdhinhhsthgrlhhlqdguvghpvghnuggvnhgtih gvshdrshhhpdhpvghrfhhorhgtvgdrtghomhdpghhithhhuhgsrdgtohhmnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepphhssehpkhhsrdhimh X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:46:43 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id df05c5c7 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:38 +0000 (UTC) Date: Mon, 8 Apr 2024 08:46:41 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 07/12] ci: merge scripts which install dependencies Message-ID: <4a90c003d1cdbf1e38efe5f7b78badf96a61b8d7.1712555682.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 Mon Apr 8 06:46:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13620607 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 712B12C85F for ; Mon, 8 Apr 2024 06:46:50 +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=1712558811; cv=none; b=uqHvbWe6+t1AfcfAYeYU+HmSwAuimdUoc7Z21ewrOHcUJd0R/c4WfcDtSV0MQbrAI/8lhWrFfek4B0t+1WTzh5qsshwCWK4TFZE/Qi8fy7+jj4/otiTnksJPsZ8fY07XlsftwsVoA2Tm2kiHz8fyOtXjuKmz366J8BEKueKOWSU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558811; c=relaxed/simple; bh=Yk1Jbuj2wauZGkBDoO2CcMrPAJumAk3xNmRqdYcaejQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PzhOql1BsMevM4+PmGmHipoNckVzVx4CBT9pRLecOaPtQo2AYEWDhoR6BFuoOUBz+qCc4cnuq7yCCsdMPSp/CkEFh6eT79cFbUyGNaMYD6/WB1nKYF424pRGCA4+XP1foVpZ5YUxuNHw8D9i1sQpZ8I1flgtpt+1zJ2EuSdvYqk= 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=O1jfcjmD; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=wsc5DkCg; 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="O1jfcjmD"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="wsc5DkCg" Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 7D54611400CE; Mon, 8 Apr 2024 02:46:49 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Mon, 08 Apr 2024 02:46:49 -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=1712558809; x=1712645209; bh=j53eWXgYvR UQ6aa3gp7gJdU8Sm0tjaI/Mxcz6ZG1Z4E=; b=O1jfcjmD4TTt9WImzVEbwbHi9Z x7od0TrJSKnS9cKKDK14OfOpBrD9tXPu+gzWRVA7lX8vnJH2VsLucasHmdd09v8k a6hQNl47ES9CYR9U1udYRBB/DcFBTRG08VHGgM0aKgA5f8yf7lKn1QqJq9BDCthj 17byfgXe9FRO4aeRaLXWhs/uugqngEzA/ag4nkuHAmJOF9Nj42xpi2jVdFUsi5H5 pf2pKhti+/bkq912QcmAxMEHW9cTq5SKXLeNep+hc2GLsOouXASsI6kH/iqxeo2d kvWn1qRH0PGVe0JccEtqlerptHgLvyrUO38cQ09qWXp9zyx7JwnJ2cO5vRjA== 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=1712558809; x=1712645209; bh=j53eWXgYvRUQ6aa3gp7gJdU8Sm0t jaI/Mxcz6ZG1Z4E=; b=wsc5DkCgTOph2G76mkLoeJ3PfSlAyekbKzNYhe2wDSo5 FgdfpywuyJ1peT53nPnbf4GxSuriwFW/dUo5zsb/abRtTPdO/GxH0zcu0ar86YwA +F0ScipsX2krRkTVM+B225wjK/J+1Jqpilpms4PUSI/GMsEWJWrdoX5+i/h5fxil 3Of7baaR49AOg2k6sLEnllUUfjp+atdkGqfUcLiderQl5pdPRqskyAf2rBHHjcmg 67MaLLGiavZLwWzLYsGWs1Uv4mcJCwOZ2J5ccLIZjBTAeUFwZ7dZpnM+oIQPR6ZT JBkkmnY0WNpoW7s9foaElbQrttW2UiUIfdj470Nnww== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:46:48 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id a57d301e (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:42 +0000 (UTC) Date: Mon, 8 Apr 2024 08:46:46 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 08/12] ci: make Perforce binaries executable for all users Message-ID: <5240046a0fe604efa8840d023df4833c12bad952.1712555682.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 at all. This has gone unnoticed so far because those binaries are optional -- in case they don't exist we simply skip over tests requiring them. 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 Mon Apr 8 06:46:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13620608 Received: from fout7-smtp.messagingengine.com (fout7-smtp.messagingengine.com [103.168.172.150]) (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 E569925777 for ; Mon, 8 Apr 2024 06:46:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558817; cv=none; b=tu4Ifk6daV5ScAlfCmmkrbzgFPxtngEC+bOnFdmaP0wTsjIf5jMpw1fvKhFvvetF0HzkoYa5FrTfqEWMuEAlJDwrqwvqpIE+F6j+V9psX5KWvAmxckukEJIqIFTQsMRlWBchMAhM/oQ6914QFbzI9ZGn2GVR4WzwHhxi12BFvTc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558817; c=relaxed/simple; bh=86WuSIssM6M5d3MGB2m6CxP6jowRS2rFzt+yXGL6sCk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Z2tIDVSj3RHdFNc5HtorXVKl9gT31K0/AXbNd/2V4/DsFtYU/INrDsrEnJyDby3TEjoJL+h4OkEGkNrjR50xNhBBbCopk1Do7jukZg/kn5aABp6p9BqeWZCPa0+rwR2JAlkjKDE0gfw3hApA6Kycmj96SBsNmkC+hry+W5KGmfA= 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=X3LijpiU; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=XHU4+GKn; arc=none smtp.client-ip=103.168.172.150 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="X3LijpiU"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="XHU4+GKn" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfout.nyi.internal (Postfix) with ESMTP id D876713800A2; Mon, 8 Apr 2024 02:46:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 08 Apr 2024 02:46:54 -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=1712558814; x=1712645214; bh=PlZ5HVSDv1 dOlxpDgeGaLBp1pAFdUJQSDS0aA058yaw=; b=X3LijpiU+p9plTxjNfH0dYwXr9 63Mra40Jpt4OfLecT/HwmAEcYGjiRc8AX6si76L1HDPr37vELTA2AFkIWhW+2sKs myH1umC+H6GF0RP4k4PKXxbPWpctXaoGgAcFT4dKikrLKr93Nm8PED6tSm2ngpj3 9b45i6sGnyXP/H8gcHHRd7A2v9GtjVUkK903sNA5W5wgOOFT91tT29SJy/yvguNb sb8ETFQL4R5E446FnvjKFESMQJMplhDRP/VjHKEXH+/56CfdxS/2HeFXXaCnIupb pvEvPbKFoNstAGUvCgCwc306udqu0Late0OzJlWKt7nPHc1+zkrYRjRVTwZg== 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=1712558814; x=1712645214; bh=PlZ5HVSDv1dOlxpDgeGaLBp1pAFd UJQSDS0aA058yaw=; b=XHU4+GKnf0s/KaFIkIO5Y/zL8XtANbanXX8tHF8BqdD5 wutPWPVnG0qz5Jd4kZrRzo7FMj/9LAnyOesrNLtjCbztUD3IMoav03oTGZBMzecq HKsc+ZQ9IweaZ5Vnc5BUUgqN1H8/GNlRPkKvSl9hlUVk2yrvTVnbQYyQseAr/gIr oPLnY8Vyu3C4113llZ0lfVgfZ7+GFsmIRowkgWlYXZfbudjmk0b1SatPq1SYFQov ErkQoVFgVccqPNyU90S26gcJEYhNtYg8MOsdIwoL75b5+JRXmuTK0qVtwoVb6hCE 22xD3x0Dp3UoymhESYzmW9MwChE1n8kd3gVZqLDM4g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeehgfdvuefhudduffeuudffgfffheegudegiedvvdejuefgjeduieekvdfggfet ieenucffohhmrghinhepphgvrhhfohhrtggvrdgtohhmpdhgihhthhhusgdrtghomhdpvg gtlhhiphhsvgdrohhrghdpvddtvdefudduvdeludeghedtqdhrrdhshhenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:46:53 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id e1c30530 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:47 +0000 (UTC) Date: Mon, 8 Apr 2024 08:46:50 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 09/12] ci: install JGit dependency Message-ID: <29ceb623b9ec6a1d5b289c5d777f1e81adb4d0ad.1712555682.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 Mon Apr 8 06:46:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13620609 Received: from fout7-smtp.messagingengine.com (fout7-smtp.messagingengine.com [103.168.172.150]) (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 EA1822C85F for ; Mon, 8 Apr 2024 06:46:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558821; cv=none; b=lk+mdCkZpFSkmbJ3I1DGI9tQKRHbWq+zXmYGuOGCXCzZfQfpS+lg2WLHWZg6SOl/9Qie+zUaII/HlRhwOT1GB/ySavneh8Hxb2HfwwCuELcLT+fJElNcoSMAmTgGlPyTccSzxMMKkba2OTjVJ0mHDqjy2MLOQyLQ/b0CJEND9nk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558821; c=relaxed/simple; bh=tKvSZ9cxWofjNdXYfT1eI64E+Wvk1W/X3j1wIr8ANwM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=rV9fLHCdMZyTaGmbWp8UzeYavNAyaAHv/sVbx0gSCcojZL1yqVqL8wf8kXA9RYWXjmA7XJiBQJMBXHlQ5vYi+fsCdo5j2CkCIVLxFEjyyQuacjUoqpeE7ggbN9pjJVrKo89GElK3iMvuL9Phxt71E5jNEL7hp4WzHf4rWNBfiek= 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=Sm7Z46H/; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=Y6buKYvU; arc=none smtp.client-ip=103.168.172.150 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="Sm7Z46H/"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="Y6buKYvU" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 3EC381380059; Mon, 8 Apr 2024 02:46:59 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 08 Apr 2024 02:46:59 -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=1712558819; x=1712645219; bh=GBKjNuA4SZ B2uZhqDHra+VqG8DOSEpQEFmfu2LkRQ8Q=; b=Sm7Z46H/Vkz4Jm5RjS5Kzg01GL Za7kNbZFwtt3KbXm95wXoW6K8E9SjyFXv/jzLnAjiZKlS9ksftMqJ4fzi6JmHi2G SdgMSE3mtMY4JjC5bSbCH1RWsnXQWYKzrCeAP5HSHoS2dsml4fFEGfQis9H61Yra PCjujuecybtU1Og64Je7xocPyq8w4hnFaG72366EwgwACEUjNNdcw8kgpIC57+FA mVoRgEnlsSaYH61waMmW0OWySVZJkF3PThYWcSPznDbBVcOQ0su5Yk4PsfswJ5XN 1WSDvaBwbwHtCv1yIOfzUKH4Lstl3t4iGhRckKT18QffYf2PBgRyKLsN/smw== 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=1712558819; x=1712645219; bh=GBKjNuA4SZB2uZhqDHra+VqG8DOS EpQEFmfu2LkRQ8Q=; b=Y6buKYvUXU+RGwm5hmRZbpDIgjUAfX8U+UPXs9DM+nuv DKT5UBqg/L16GoIBD0RGOc6UAAoxMn5e2Lqy4PopcGw8BL44AfbdxBrTnkZtlGhJ 2k/6/CVwWUNEt043Gu0zxYwJm5e+0+sDRYqvKB0QQRHatgF4i/FSS97vH6BbI64d B3GGOiUYhjhdxLO67MtOvgRpAJjy1SPMyaQNRVtvh5+qdv+NndSPB7wFcHwC1eky P6+mllLYfBWsnoFmDo/polOcLMeJncNRVrF/tdy96ieu3h3bhiZrTAnGBPc8lprl XpMyFBl/an4wUetgJEIT7HCyIGFTf5pXu17ZGEVzIQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:46:58 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 3ea203de (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:52 +0000 (UTC) Date: Mon, 8 Apr 2024 08:46:55 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 10/12] t06xx: always execute backend-specific tests 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 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 Mon Apr 8 06:47:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13620610 Received: from fout7-smtp.messagingengine.com (fout7-smtp.messagingengine.com [103.168.172.150]) (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 548D018C19 for ; Mon, 8 Apr 2024 06:47:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.150 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558826; cv=none; b=RwxGojrhJbvRAPIJGxMZUvhjQPHoFRnNYZ8FF/6VAWJ72G1tQwxVejSm04PuGPmVBZIAm1BiqNL3ObMatVUTlxbs0lMskfq0iENdJUt4bDXqMhR+2Jlqjrk7c5smc6La4cfYzOB3z08b713uBEoMaGLmX/noa3fJPwMFBmRDO4Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558826; c=relaxed/simple; bh=JFV/MKjdnLvBPCp1XO5nX2oRi78aS25wdfRaG+ECzgQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=vBMIn18/Hqe5qwAY733Xn1r1QWzTCcbXIbR7qDaqa06gc/6NaOVjFexRXjhMkjzUniD/wqeRP4+q/zz0lVCrIUaA8FYYQflq768/bPKWk4W7xhZYzhBZ/aW29iuEbSNeyLnmv0Aob5mry7om0+Bkv/ZAzqswjhGWj+RbnvAdShs= 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=c4VCPaP7; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=hvcOguXw; arc=none smtp.client-ip=103.168.172.150 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="c4VCPaP7"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="hvcOguXw" Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfout.nyi.internal (Postfix) with ESMTP id 9EFEC13800C6; Mon, 8 Apr 2024 02:47:04 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 08 Apr 2024 02:47:04 -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=1712558824; x=1712645224; bh=izJ7JLWhJ+ n9h+Qs5qguxPuKcao5C+fV8wsoVSY4xrY=; b=c4VCPaP7JlronPHNRXMOujQrWm v9tmX3ZK+CYt5BYHHIERESXCxeWHOUkvm5npLyhIxXmh/J22r8wOfK3Sxo5xKfKS JfkrcD1RsaR3CP/Ft1d5ZSWrQxX7rlSWmJR8gv1UmBN8Z1+40HW4xhf5dpwzJnRp 95eIRNQE4eCa3RAht2jseRqlviWp/q8nVRF0arUZ5+YFsaCBnBL2p6MYyHavirLV faLJt+kostgkzpNENTcBtXXujlbjILKEx5rfNdeXYONDbF3vj8STY5Yb9XJgBdnL mNEeDvCgljZwYJogHlQd871xzuly+SbB3pzWDzcjfUH4S8cGjF6PG58Haq1w== 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=1712558824; x=1712645224; bh=izJ7JLWhJ+n9h+Qs5qguxPuKcao5 C+fV8wsoVSY4xrY=; b=hvcOguXwgnM/pUVZlX5BEuV9m0Bq2Bo2iQEMMu/BLYKP snHtRuFN63rc60u6MVaxiZMNo+MUHZf3Q2MEf4P4r87qSQ9IAbgKYSWDF6UG9rzA 4rY+PhEzB8UqVkCqkMiDpfrmZjsBA3wPyKnzGUGQQgFzpJIU+OdrB8UQ6CffY526 otvynbf1U27U8Kslxt1NRnNe4n+B7QWJ6wxRLTh8dGmDsnz3R/IqDNdUCwbCuLPh 3R/BIl9TiEVOY/V9fXd1gOm8VvjlNyaVvcn3lg4I6M+L7kgLVfEk4PnYWn4E3Ppw iAq2hVn2hALsd20+R40MEVZA/mzhNNJl1YrOo37LYQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddtlecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:47:03 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id 70dd9b4a (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:46:57 +0000 (UTC) Date: Mon, 8 Apr 2024 08:47:00 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 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: Older versions of the Dash shell fail to parse `local var=val` assignments in some cases when `val` is unquoted. Such failures can be observed e.g. with Ubuntu 20.04 and older, which has a Dash version that still has this bug. Such an assignment has been introduced in t0610. The issue wasn't detected for a while because this test used to only run when the GIT_TEST_DEFAULT_REF_FORMAT environment variable was set to "refatble". We have dropped that requirement now though, meaning that it runs unconditionally, inclluding on jobs which use such older versions of Ubuntu. We have worked around such issues in the past, e.g. in ebee5580ca (parallel-checkout: avoid dash local bug in tests, 2021-06-06), by quoting the `val` side. Apply the same fix to t0610. Signed-off-by: Patrick Steinhardt --- t/t0610-reftable-basics.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/t/t0610-reftable-basics.sh b/t/t0610-reftable-basics.sh index aa9282007c..dfa7e274ea 100755 --- a/t/t0610-reftable-basics.sh +++ b/t/t0610-reftable-basics.sh @@ -78,9 +78,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 perms="$1" && + local file="$2" && + local actual="$(ls -l "$file")" && case "$actual" in $perms*) From patchwork Mon Apr 8 06:47:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 13620611 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 F150E2555B for ; Mon, 8 Apr 2024 06:47:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=103.168.172.154 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558831; cv=none; b=U9cdLZhhMcoMq+v3FupfT2dt2e5yydoCYOwrcyu7YB+1BmaT/xuRQc9vxnBlGbgyI9jMXGauyaYl8JWCrIo3U/HY8jj3YohCN7b0uYOI3RbKq5PMlJY/Zjh52Sqd00miV4Nbah/uNbKoTIZZ1N/TEXLWSqKGTG/GAA93hGwWuoU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712558831; c=relaxed/simple; bh=j3RT6X7wqpcSfzUooWb+J15O7+q+WlgU9bYTnq3qI+o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qPU6Qt+ya4ME4mhMzb9e6aZcrm31MFcKV3Fq6OpcdJWMrAAGDy69ymaoO6mVXbA2+gAEnz9H1A4ohk5zMNirqueyIpMibXbxFy9yIHi3URYG2ft6XkleOq7U1JcGQAaOgLIctWXxSOmnrlYLmt5tL0SLgt3+nOegmh7bJus3+u8= 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=JJh3m5Io; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=nUrTPJCL; 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="JJh3m5Io"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="nUrTPJCL" Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 0BE2C114008D; Mon, 8 Apr 2024 02:47:09 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 08 Apr 2024 02:47:09 -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=1712558829; x=1712645229; bh=cCJgX/2PTr sENvU1E5Ppq3bOkhjGaOOPTRV9dXyMUTA=; b=JJh3m5IosqkEC1O0vGNaUZ1uFR JTCR2jq/1Xo4lN1tKQDaxGD2k4VomZpAfFSvDUg5eVryB9G4ND5zoiN0W3PS8ZZN /W068XWWb0hzECqskzph6Pa1XovTICKVTpX5BXDfqCpnv38p5JVvVpk/dvfAIAH3 PT12Xegte9UzOWwfFryKB87T2q1aYE1/Nl4xXGrj0jhL62yMe4dFyLUH4J8OzpXt VXOqd+ngoeFbYsp4VoybBFKIs+IT+s6tTkwc6jwxCPIP8va+BZD3DIkYgTi6lANZ Tlt+ITyuDw6QRxZnGkR5MVFLsHw56GCJN2ucTYzIOfHoVyDwWPtpPkjkFweA== 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=1712558829; x=1712645229; bh=cCJgX/2PTrsENvU1E5Ppq3bOkhjG aOOPTRV9dXyMUTA=; b=nUrTPJCL/T7QQ/oJLEJlHG39vDzkbP/wDZ8VXYthe3ox ckJBET4KC5z/Cm4EKssO4HAiuabDRj7kc2OVtNgK60fD9BqQn+Fm54w76+57KTju 9CnHtFA9oYt1zE4jvv4XqheT00xySntNiCJpIULhDI4EltPo4MkYyagTQJAP0+HX +mXrr1z9Cx0HjitA7bjcc0rNPYvDuNWwKm1/K3TKv9MKKVhwLa88EP5puisxA6v6 OAn6OzZIXKP0uZwwhYhwIpeM/FKUSP/mRN1oSHSB2Y/B4P3eUxx9+kdY2nt8/eYT TJmoxzOLJuPdBexg07KRxda0PA3jeecSp/uV884lPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudeghedguddutdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefrrght rhhitghkucfuthgvihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtth gvrhhnpeeukedtvedtffevleejtefgheehieegkeeluddvfeefgeehgfeltddtheejleff teenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpsh esphhkshdrihhm X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 8 Apr 2024 02:47:07 -0400 (EDT) Received: by localhost (OpenSMTPD) with ESMTPSA id c6147270 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Mon, 8 Apr 2024 06:47:01 +0000 (UTC) Date: Mon, 8 Apr 2024 08:47:05 +0200 From: Patrick Steinhardt To: git@vger.kernel.org Cc: Han-Wen Nienhuys , Josh Steadmon , Luca Milanesio , Eric Sunshine Subject: [PATCH v2 12/12] t0612: add tests to exercise Git/JGit reftable compatibility Message-ID: <160b026e69547739a526fb6276a895904a4d33a8.1712555682.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: 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 | 132 +++++++++++++++++++++++++ 1 file changed, 132 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..222464e360 --- /dev/null +++ b/t/t0612-reftable-jgit-compatibility.sh @@ -0,0 +1,132 @@ +#!/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_ref () { + git rev-parse "$1" >cgit.actual && + jgit rev-parse "$1" >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_ref HEAD && + test_same_reflog HEAD + ) +' + +test_expect_success 'JGit repository can be read by CGit' ' + test_when_finished "rm -rf repo" && + jgit init repo && + ( + cd repo && + + touch file && + jgit add file && + jgit commit -m "initial commit" && + + # Note that we must convert the ref storage after we have + # written the default branch. Otherwise JGit will end up with + # no HEAD at all. + jgit convert-ref-storage --format=reftable && + + test_same_refs && + test_same_ref HEAD && + # 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_ref HEAD && + 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