Subject: Re: [PATCH v2 1/1] ci(osx): use new location of the `perforce` cask

From: SZEDER Gábor <[email-masked]>
Date: Wed, 23 Oct 2019 02:26:24 +0200

On Wed, Oct 23, 2019 at 01:23:25AM +0200, Johannes Schindelin wrote:
> On Fri, 18 Oct 2019, SZEDER Gábor wrote:
> 
> > On Thu, Oct 17, 2019 at 12:47:33PM +0000, Johannes Schindelin via GitGitGadget wrote:
> > > From: Johannes Schindelin <[email-masked]>
> > >
> > > The CI builds are failing for Mac OS X due to a change in the
> >
> > s/CI/Azure Pipelines/
> >
> > Our Travis CI builds are fine.
> 
> For the moment ;-)

Touché.
Believe it or not, I did wrote "at least for now" at the end of that
sentence, but then deleted it.  Serves me right, now there is some new
breakage with gcc@8... :)

> If you don't mind, I am going to copy/edit these three paragraphs into
> the commit message,

Sure, go ahead.

> > In our CI builds we don't at all care what the checksums of the
> > Perforce binaries are, so I would really like to tell 'brew' to ignore
> > any checksum mismatch when installing 'perforce'.  Alas, it appears
> > that 'brew' has no public options to turn of or to ignore checksum
> > verification.
> 
> Sad, yet true, that we indeed have no command-line option to say "you
> know what, your checksum possibly mismatches, but we really don't care".

Actually, 'brew' does have some undocumented options, but I didn't
even bothered to check, because it's not really sensible to rely on an
undocumented option (especially when even the documented options break
every once in a while...).

> > Now, let's take a step back.
> >
> > All 'brew cask install perforce' really does is run 'curl' to download
> > a tar.gz from the Perforce servers, verify its checksum, unpack it,
> > and put the executables somewhere on $PATH.  That's not rocket
> > science, we could easily do that ourselves; we don't even have to deal
> > with a tar.gz, the 'p4' and 'p4d' binaries for mac are readily
> > available for download at:
> >
> >   http://filehost.perforce.com/perforce/r19.1/bin.macosx1010x86_64/
> >
> > And, in fact, that's what we have been doing in some of our Linux jobs
> > since the very beginning, so basically only the download URL has to be
> > adjusted.
> 
> I'd rather not.
> 
> Just because there is no better way on Linux, and just because the
> current `perforce` cask recipe happens to just download and unpack that
> file does not mean that this won't change.

Yeah, I'm fairly sure that the way Homebrew installs Perforce will
change, but if we download Perforce ourselves, then it won't matter at
all.

Downloading the Perforce binaries with 'wget' worked fairly well for
almost four years, except from that server glitch a couple of weeks
ago; I think downloading the macOS binaries from the same server would
work just as well.  OTOH, this is the fourth time that we have to
tweak how we install Perforce via Homebrew.

FWIW, it looks like this:

https://github.com/szeder/git/blob/ci-osx-wget-perforce/ci/install-dependencies.sh#L11