🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
7 messages
7 total messages Started by "Harald Nordgren via GitGitGadge... Mon, 26 Oct 2026 09:54
[PATCH v3 0/2] ci: fail the build if perforce, git-lfs or JGit fail to install
#1492
Author: "Harald Nordgren via GitGitGadge...
Date: Mon, 26 Oct 2026 09:54
102 lines
14931 bytes
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 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 | 50 ++++++++++++--------------------------
 1 file changed, 15 insertions(+), 35 deletions(-)


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

Range-diff vs v2:

 -:  ---------- > 1:  e85ce85d92 ci: drop quarantine removal for macos perforce binaries
 1:  dde1b38567 ! 2:  a57cfbb2a5 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" &&
     - 		chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" || {
     +-		chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" || {
      -			rm -f "$CUSTOM_PATH/p4"
      -			rm -f "$CUSTOM_PATH/p4d"
     -+			echo >&2 "error: could not install perforce"
     -+			exit 1
     - 		}
     +-		}
     ++		chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
      +		echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
      +		p4d -V
      +		echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
     @@ ci/install-dependencies.sh: ubuntu-*|i386/ubuntu-*|debian-*)
       			"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"
     -+		rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" || {
     -+			echo >&2 "error: could not install git-lfs"
     -+			exit 1
     -+		}
     ++		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"
     -+		chmod a+x "$CUSTOM_PATH/jgit" || {
     -+			echo >&2 "error: could not install JGit"
     -+			exit 1
     -+		}
     ++		chmod a+x "$CUSTOM_PATH/jgit"
      +		echo "$(tput setaf 6)JGit Version$(tput sgr0)"
      +		jgit version
       		;;
       	esac
       	;;
      @@ ci/install-dependencies.sh: macos-*)
     - 
     - 	mkdir -p "$CUSTOM_PATH"
       	wget -q "$P4WHENCE/bin.macosx12arm64/helix-core-server.tgz" &&
     --	tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d &&
     -+	tar -xf helix-core-server.tgz -C "$CUSTOM_PATH" p4 p4d || {
     -+		echo >&2 "error: could not install perforce"
     -+		exit 1
     -+	}
     - 	sudo xattr -d com.apple.quarantine "$CUSTOM_PATH/p4" "$CUSTOM_PATH/p4d" 2>/dev/null || true
     + 	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
[PATCH v3 1/2] ci: drop quarantine removal for macos perforce binaries
#1494
Author: "Harald Nordgren via GitGitGadge...
Date: Mon, 26 Oct 2026 09:54
36 lines
12101 bytes
From: Harald Nordgren <haraldnordgren@gmail.com>

A file downloaded with wget never gets com.apple.quarantine set,
only Safari, Finder, and AirDrop apply that attribute through the
LaunchServices quarantine API.

5ed9fc3fc8 (ci: prevent `perforce` from being quarantined,
2020-02-27) added this 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.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
 ci/install-dependencies.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index d57dce5663..203e8401cf 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -122,7 +122,6 @@ macos-*)
 	mkdir -p "$CUSTOM_PATH"
 	wget -q "$P4WHENCE/bin.macosx12arm64/helix-core-server.tgz" &&
 	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
 
 	case "$jobname" in
-- 
gitgitgadget
[PATCH v3 2/2] ci: fail the build if perforce, git-lfs, or JGit fail to install
#1493
Author: "Harald Nordgren via GitGitGadge...
Date: Mon, 26 Oct 2026 09:54
99 lines
13981 bytes
From: Harald Nordgren <haraldnordgren@gmail.com>

A failed install of perforce, git-lfs, or JGit was silently
tolerated. The corresponding tests would just skip and the build
stayed green, so a broken download could go unnoticed indefinitely.

Fail the build immediately instead on the platforms that install
these tools. The presence checks and warnings at the end of the
script are gone too, since we already know by then that everything
installed or the build wouldn't have gotten this far.

Signed-off-by: Harald Nordgren <haraldnordgren@gmail.com>
---
 ci/install-dependencies.sh | 49 ++++++++++++--------------------------
 1 file changed, 15 insertions(+), 34 deletions(-)

diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 203e8401cf..7c3c6ad434 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -94,22 +94,25 @@ ubuntu-*|i386/ubuntu-*|debian-*)
 		wget --quiet --directory-prefix="$CUSTOM_PATH" \
 			"$P4WHENCE/bin.linux26x86_64/p4d" \
 			"$P4WHENCE/bin.linux26x86_64/p4" &&
-		chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" || {
-			rm -f "$CUSTOM_PATH/p4"
-			rm -f "$CUSTOM_PATH/p4d"
-		}
+		chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
+		echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
+		p4d -V
+		echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
+		p4 -V
 
 		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" ||
-		rm -f "$CUSTOM_PATH/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"
+		chmod a+x "$CUSTOM_PATH/jgit"
+		echo "$(tput setaf 6)JGit Version$(tput sgr0)"
+		jgit version
 		;;
 	esac
 	;;
@@ -123,6 +126,10 @@ macos-*)
 	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
+	echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
+	p4 -V
 
 	case "$jobname" in
 	osx-meson)
@@ -170,30 +177,4 @@ Documentation)
 	;;
 esac
 
-if type p4d >/dev/null 2>&1 && type p4 >/dev/null 2>&1
-then
-	echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
-	p4d -V
-	echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
-	p4 -V
-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)"
-	git-lfs version
-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"
-- 
gitgitgadget
Re: [PATCH v3 2/2] ci: fail the build if perforce, git-lfs, or JGit fail to install
#1509
Author: Harald Nordgren
Date: Mon, 26 Oct 2026 12:17
33 lines
13376 bytes
On Mon, Oct 26, 2026 at 1:08 PM Patrick Steinhardt <ps@pks.im> wrote:
>
> On Mon, Oct 26, 2026 at 09:54:25AM +0000, Harald Nordgren via GitGitGadget wrote:
> > diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
> > index 203e8401cf..7c3c6ad434 100755
> > --- a/ci/install-dependencies.sh
> > +++ b/ci/install-dependencies.sh
> > @@ -94,22 +94,25 @@ ubuntu-*|i386/ubuntu-*|debian-*)
> >               wget --quiet --directory-prefix="$CUSTOM_PATH" \
> >                       "$P4WHENCE/bin.linux26x86_64/p4d" \
> >                       "$P4WHENCE/bin.linux26x86_64/p4" &&
> > -             chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4" || {
> > -                     rm -f "$CUSTOM_PATH/p4"
> > -                     rm -f "$CUSTOM_PATH/p4d"
> > -             }
> > +             chmod a+x "$CUSTOM_PATH/p4d" "$CUSTOM_PATH/p4"
> > +             echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)"
> > +             p4d -V
> > +             echo "$(tput setaf 6)Perforce Client Version$(tput sgr0)"
> > +             p4 -V
>
> Isn't the && chain completely useless now, both here and in the other
> cases? We let `set -e` do its thing, but we don't have any error
> handling for the whole block anymore after we dropped the error message.

That's true! It would open up a lot of simplifications on the regular
git tests if we could drop '&&' there too :)


Harald
Re: [PATCH v3 1/2] ci: drop quarantine removal for macos perforce binaries
#1510
Author: Harald Nordgren
Date: Mon, 26 Oct 2026 12:18
12 lines
11983 bytes
> So the question is what this does on GitLab CI. [1] will answer that
> question once the pipeline has succeeded.
>
> Patrick
>
> [1]: https://gitlab.com/gitlab-org/git/-/merge_requests/714

Seems GitLab CI passed.


Harald
Re: [PATCH v3 1/2] ci: drop quarantine removal for macos perforce binaries
#1515
Author: Harald Nordgren
Date: Mon, 26 Oct 2026 12:49
19 lines
12312 bytes
> > A file downloaded with wget never gets com.apple.quarantine set,
> > only Safari, Finder, and AirDrop apply that attribute through the
> > LaunchServices quarantine API.
>
> This is the explanation why we can remove the flag, but we haven't even
> talked about the observation or what we want to do.

I'll take a look at that.

> > 5ed9fc3fc8 (ci: prevent `perforce` from being quarantined,
> > 2020-02-27) added this to stop p4d -V from hanging on a GUI
>
> Nit: you start talking about "this" without even saying what "this" is.

Ok.


Harald
Re: [PATCH v3 1/2] ci: drop quarantine removal for macos perforce binaries
#1543
Author: Junio C Hamano
Date: Mon, 26 Oct 2026 16:54
22 lines
13560 bytes
Harald Nordgren <haraldnordgren@gmail.com> writes:

>> > A file downloaded with wget never gets com.apple.quarantine set,
>> > only Safari, Finder, and AirDrop apply that attribute through the
>> > LaunchServices quarantine API.
>>
>> This is the explanation why we can remove the flag, but we haven't even
>> talked about the observation or what we want to do.
>
> I'll take a look at that.
>
>> > 5ed9fc3fc8 (ci: prevent `perforce` from being quarantined,
>> > 2020-02-27) added this to stop p4d -V from hanging on a GUI
>>
>> Nit: you start talking about "this" without even saying what "this" is.
>
> Ok.

Will look forward to seeing this step updated.  Nevertheless, thanks
for finding why we can remove this line and making it into a
separate commit.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads