Re: kerberos/001_auth test fails on arm CPU darwin - Mailing list pgsql-hackers

From Andres Freund
Subject Re: kerberos/001_auth test fails on arm CPU darwin
Date
Msg-id 20220927013714.w2x7f5vfdspo3mxs@awork3.anarazel.de
Whole thread Raw
In response to Re: kerberos/001_auth test fails on arm CPU darwin  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Hi,

On 2022-09-27 10:25:07 +0900, Michael Paquier wrote:
> On Mon, Sep 26, 2022 at 04:39:36PM +0200, Peter Eisentraut wrote:
> > On 26.09.22 13:14, Tom Lane wrote:
> >> Bilal Yavuz<byavuz81@gmail.com>  writes:
> >> > It seems that kerberos is installed at the '/opt/homebrew/opt/krb5' path on
> >> > ARM CPU darwin instances instead of the '/usr/local/opt/krb5' path.
> >> I think this also needs to account for MacPorts, which would likely
> >> put it under /opt/local/sbin.  (I wonder where /usr/local/opt/krb5
> >> came from at all -- that sounds like somebody's manual installation
> >> rather than a packaged one.)
> > 
> > /usr/local/opt/ is used by Homebrew on Intel macOS.
> 
> Hmm.  Is that the case with new setups under x86_64?  I have a M1
> where everything goes through /opt/homebrew/, though it has been set
> very recently.

Yes, it's hardware dependent:

https://docs.brew.sh/Installation
"This script installs Homebrew to its preferred prefix (/usr/local for macOS
Intel, /opt/homebrew for Apple Silicon and /home/linuxbrew/.linuxbrew for
Linux"


Maybe we should rely on PATH, rather than hardcoding OS dependent locations?
Or at least fall back to seach binaries in PATH? Seems pretty odd to hardcode
all these locations without a way to influence it from outside the test.

There has to be something similar to python's shutil.which() in perl.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: kerberos/001_auth test fails on arm CPU darwin
Next
From: "kuroda.hayato@fujitsu.com"
Date:
Subject: RE: [small patch] Change datatype of ParallelMessagePending from "volatile bool" to "volatile sig_atomic_t"