Skip to content

Commit aa1419e

Browse files
committed
Add MacPorts support to src/test/ldap tests.
Previously the test knew how to find an OpenLDAP installation at the paths used by Homebrew. Add the MacPorts paths too. Author: Thomas Munro Reviewed-by: Tom Lane Discussion: https://postgr.es/m/CA%2BhUKGKrjGS7sO4jc53gp3qipCtEvThtdP_%3DzoixgX5ZBq4Nbw%40mail.gmail.com
1 parent f7111f7 commit aa1419e

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/test/ldap/README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ and net/openldap24-server.)
4949
macOS: We do not recommend trying to use the Apple-provided version of
5050
OpenLDAP; it's very old, plus Apple seem to have changed the launching
5151
conventions for slapd. The paths in the test file are set on the
52-
assumption that you installed OpenLDAP using Homebrew.
52+
assumption that you installed OpenLDAP using Homebrew or MacPorts.

src/test/ldap/t/001_auth.pl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,18 @@
1717

1818
$ldap_bin_dir = undef; # usually in PATH
1919

20-
if ($^O eq 'darwin')
20+
if ($^O eq 'darwin' && -d '/usr/local/opt/openldap')
2121
{
22+
# typical paths for Homebrew
2223
$slapd = '/usr/local/opt/openldap/libexec/slapd';
2324
$ldap_schema_dir = '/usr/local/etc/openldap/schema';
2425
}
26+
elsif ($^O eq 'darwin' && -d '/opt/local/etc/openldap')
27+
{
28+
# typical paths for MacPorts
29+
$slapd = '/opt/local/libexec/slapd';
30+
$ldap_schema_dir = '/opt/local/etc/openldap/schema';
31+
}
2532
elsif ($^O eq 'linux')
2633
{
2734
$slapd = '/usr/sbin/slapd';

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy