All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Patrick Steinhardt <ps@pks.im>,
	Harald Nordgren <haraldnordgren@gmail.com>
Subject: [PATCH v4 0/2] ci: fail the build if perforce, git-lfs or JGit fail to install
Date: Tue, 27 Oct 2026 08:32:14 +0000	[thread overview]
Message-ID: <pull.2403.v4.git.git.1793089936.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.2403.git.git.1789223882471.gitgitgadget@gmail.com>

Fail the build when perforce, git-lfs, or JGit fail to install, and drop the
warnings that used to fire on every platform regardless of whether it even
attempted the install.

Changes in v4:

 * Drops the && chaining between the wget/tar/chmod install steps for
   perforce, git-lfs, and JGit, since under set -e a failing command inside
   an && chain is exempt from aborting the script unless it's the last one
   in the chain, so the chain was silently letting an earlier failure fall
   through instead of stopping the build.
 * Reworded the quarantine-removal commit to lead with the observation (the
   call does nothing and can go) before the history, fixed a dangling "this"
   reference, and added that the same holds on GitLab CI's macOS runners,
   not just GitHub Actions.

Changes in v3:

 * New prep commit drops the xattr -d com.apple.quarantine call for the
   macOS perforce binaries, it's been a silent no-op since perforce's
   install moved off Homebrew in 2022, confirmed wget downloads never carry
   that attribute.
 * Drops the explicit echo "error: ..." / exit 1 blocks for perforce,
   git-lfs, and JGit, relying on set -e (already active via ci/lib.sh) to
   abort on the first failed install, matching how every other install step
   in this file already works.

Changes in v2:

 * Perforce, git-lfs, and JGit install failures now fail the build instead
   of being silently swallowed. Removed the presence checks and warnings at
   the end of the script, dead code once install failure is fatal.
 * Version output (p4d -V, git-lfs version, jgit version) moved inline right
   after each successful install.

Harald Nordgren (2):
  ci: drop quarantine removal for macos perforce binaries
  ci: fail the build if perforce, git-lfs, or JGit fail to install

 ci/install-dependencies.sh | 64 +++++++++++++-------------------------
 1 file changed, 22 insertions(+), 42 deletions(-)


base-commit: 7e34d8174dcda3435d1404c9a30bef46afe6c13e
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-2403%2FHaraldNordgren%2Fci-scope-optional-tool-warnings-v4
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-2403/HaraldNordgren/ci-scope-optional-tool-warnings-v4
Pull-Request: https://github.com/git/git/pull/2403

Range-diff vs v3:

 1:  e85ce85d92 ! 1:  c1ee3fcb7d ci: drop quarantine removal for macos perforce binaries
     @@ Metadata
       ## Commit message ##
          ci: drop quarantine removal for macos perforce binaries
      
     -    A file downloaded with wget never gets com.apple.quarantine set,
     -    only Safari, Finder, and AirDrop apply that attribute through the
     -    LaunchServices quarantine API.
     +    The xattr -d call that strips com.apple.quarantine from the macOS
     +    perforce binaries has been doing nothing for years, and can simply
     +    go.
      
          5ed9fc3fc8 (ci: prevent `perforce` from being quarantined,
     -    2020-02-27) added this to stop p4d -V from hanging on a GUI
     +    2020-02-27) added that call to stop p4d -V from hanging on a GUI
          confirmation dialog that never comes on a CI box, back when perforce
          was installed via Homebrew's --no-quarantine cask flag. When
          49af448197 (ci: reintroduce prevention from perforce being
     -    quarantined in macOS, 2022-05-12) replaced that with a plain wget and
     -    tar download, it kept an xattr -d call as a precaution while noting
     -    that call already does nothing on GitHub Actions. It has been a
     -    silent no-op ever since.
     +    quarantined in macOS, 2022-05-12) replaced that with a plain wget
     +    and tar download, it kept the xattr -d call as a precaution, while
     +    noting that it already does nothing on GitHub Actions.
     +
     +    A file downloaded with wget never gets com.apple.quarantine set in
     +    the first place, only Safari, Finder, and AirDrop apply that
     +    attribute through the LaunchServices quarantine API. The same holds
     +    on GitLab CI's macOS runners, so the call has been a silent no-op
     +    everywhere since 2022.
      
          Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
      
 2:  a57cfbb2a5 ! 2:  c6dda879aa ci: fail the build if perforce, git-lfs, or JGit fail to install
     @@ Commit message
      
       ## ci/install-dependencies.sh ##
      @@ ci/install-dependencies.sh: ubuntu-*|i386/ubuntu-*|debian-*)
     + 
       		wget --quiet --directory-prefix="$CUSTOM_PATH" \
       			"$P4WHENCE/bin.linux26x86_64/p4d" \
     - 			"$P4WHENCE/bin.linux26x86_64/p4" &&
     +-			"$P4WHENCE/bin.linux26x86_64/p4" &&
      -		chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" || {
      -			rm -f "$CUSTOM_PATH/p4"
      -			rm -f "$CUSTOM_PATH/p4d"
      -		}
     ++			"$P4WHENCE/bin.linux26x86_64/p4"
      +		chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
      +		echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
      +		p4d -V
     @@ ci/install-dependencies.sh: ubuntu-*|i386/ubuntu-*|debian-*)
      +		p4 -V
       
       		wget --quiet \
     - 		     "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" &&
     +-		     "$LFSWHENCE/git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" &&
     ++		     "$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" &&
     +-			"git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs" &&
      -		rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" ||
      -		rm -f "$CUSTOM_PATH/git-lfs"
     +-
     +-		wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit" &&
     +-		chmod a+x "$CUSTOM_PATH/jgit" ||
     +-		rm -f "$CUSTOM_PATH/jgit"
     ++			"git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"
      +		rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
      +		echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
      +		git-lfs version
     - 
     - 		wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit" &&
     --		chmod a+x "$CUSTOM_PATH/jgit" ||
     --		rm -f "$CUSTOM_PATH/jgit"
     ++
     ++		wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit"
      +		chmod a+x "$CUSTOM_PATH/jgit"
      +		echo "$(tput setaf 6)JGit Version$(tput sgr0)"
      +		jgit version
     @@ ci/install-dependencies.sh: ubuntu-*|i386/ubuntu-*|debian-*)
       	esac
       	;;
      @@ ci/install-dependencies.sh: macos-*)
     - 	wget -q "$P4WHENCE/bin.macosx12arm64/helix-core-server.tgz" &&
     - 	tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d &&
     + 	brew link --force gettext
     + 
     + 	mkdir -p "$CUSTOM_PATH"
     +-	wget -q "$P4WHENCE/bin.macosx12arm64/helix-core-server.tgz" &&
     +-	tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d &&
     ++	wget -q "$P4WHENCE/bin.macosx12arm64/helix-core-server.tgz"
     ++	tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d
       	rm helix-core-server.tgz
      +	echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
      +	p4d -V

-- 
gitgitgadget

  parent reply	other threads:[~2026-10-27  8:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12 14:38 [PATCH] ci: only warn about perforce/git-lfs/JGit on platforms that need them Harald Nordgren via GitGitGadget
2026-09-25 19:02 ` Junio C Hamano
2026-09-28 12:31 ` Patrick Steinhardt
2026-09-28 16:13   ` Harald Nordgren
2026-10-23 16:50 ` [PATCH v2] ci: fail the build if perforce, git-lfs, or JGit fail to install Harald Nordgren via GitGitGadget
2026-10-23 21:48   ` Junio C Hamano
2026-10-23 22:59     ` Harald Nordgren
2026-10-23 23:06       ` Junio C Hamano
2026-10-26  7:13   ` Patrick Steinhardt
2026-10-26  7:38     ` Harald Nordgren
2026-10-26  7:41       ` Harald Nordgren
2026-10-26  8:07         ` Patrick Steinhardt
2026-10-26  8:08           ` Harald Nordgren
2026-10-26  8:06       ` Patrick Steinhardt
2026-10-26  8:13         ` Harald Nordgren
2026-10-26  8:58           ` Patrick Steinhardt
2026-10-26  9:54 ` [PATCH v3 0/2] ci: fail the build if perforce, git-lfs " Harald Nordgren via GitGitGadget
2026-10-26  9:54   ` [PATCH v3 1/2] ci: drop quarantine removal for macos perforce binaries Harald Nordgren via GitGitGadget
2026-10-26 11:08     ` Patrick Steinhardt
2026-10-26 12:18       ` Harald Nordgren
2026-10-26 12:49       ` Harald Nordgren
2026-10-26 16:54         ` Junio C Hamano
2026-10-26  9:54   ` [PATCH v3 2/2] ci: fail the build if perforce, git-lfs, or JGit fail to install Harald Nordgren via GitGitGadget
2026-10-26 11:08     ` Patrick Steinhardt
2026-10-26 12:17       ` Harald Nordgren
2026-10-27  8:32 ` Harald Nordgren via GitGitGadget [this message]
2026-10-27  8:32   ` [PATCH v4 1/2] ci: drop quarantine removal for macos perforce binaries Harald Nordgren via GitGitGadget
2026-10-27  8:32   ` [PATCH v4 2/2] ci: fail the build if perforce, git-lfs, or JGit fail to install Harald Nordgren via GitGitGadget
2026-10-27 10:45   ` [PATCH v4 0/2] ci: fail the build if perforce, git-lfs " Patrick Steinhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.2403.v4.git.git.1793089936.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=haraldnordgren@gmail.com \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.