1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-09 18:21:05 +03:00

Adjust kerberos and ldap tests for Homebrew on ARM

The Homebrew package manager changed its default installation prefix
for the new architecture, so a couple of tests need tweaks to find
binaries.

This is a partial backpatch of dc513bc654.
This commit is contained in:
Peter Eisentraut 2023-07-04 11:14:53 +02:00
parent b7ec66731d
commit 070bf5cda5
2 changed files with 16 additions and 3 deletions

View File

@ -32,8 +32,15 @@ else
my ($krb5_bin_dir, $krb5_sbin_dir); my ($krb5_bin_dir, $krb5_sbin_dir);
if ($^O eq 'darwin') if ($^O eq 'darwin' && -d "/opt/homebrew" )
{ {
# typical paths for Homebrew on ARM
$krb5_bin_dir = '/opt/homebrew/opt/krb5/bin';
$krb5_sbin_dir = '/opt/homebrew/opt/krb5/sbin';
}
elsif ($^O eq 'darwin')
{
# typical paths for Homebrew on Intel
$krb5_bin_dir = '/usr/local/opt/krb5/bin'; $krb5_bin_dir = '/usr/local/opt/krb5/bin';
$krb5_sbin_dir = '/usr/local/opt/krb5/sbin'; $krb5_sbin_dir = '/usr/local/opt/krb5/sbin';
} }

View File

@ -20,9 +20,15 @@ my ($slapd, $ldap_bin_dir, $ldap_schema_dir);
$ldap_bin_dir = undef; # usually in PATH $ldap_bin_dir = undef; # usually in PATH
if ($^O eq 'darwin' && -d '/usr/local/opt/openldap') if ($^O eq 'darwin' && -d '/opt/homebrew/opt/openldap')
{ {
# typical paths for Homebrew # typical paths for Homebrew on ARM
$slapd = '/opt/homebrew/opt/openldap/libexec/slapd';
$ldap_schema_dir = '/opt/homebrew/etc/openldap/schema';
}
elsif ($^O eq 'darwin' && -d '/usr/local/opt/openldap')
{
# typical paths for Homebrew on Intel
$slapd = '/usr/local/opt/openldap/libexec/slapd'; $slapd = '/usr/local/opt/openldap/libexec/slapd';
$ldap_schema_dir = '/usr/local/etc/openldap/schema'; $ldap_schema_dir = '/usr/local/etc/openldap/schema';
} }