Thread: Add necessary package list to ldap TAP's README

Add necessary package list to ldap TAP's README

From
Michael Paquier
Date:
Hi all,

The kerberos test suite mentions the package list to use on a set of
distributions, which is very useful.  However we don't do the same for
ldap.  Something like the attached would be adapted then to help setting
up a test environment?

I have at hand only a Debian installation, and I have just guessed the
RHEL and FreeBSD dependencies.

Thanks,
--
Michael

Attachment

Re: Add necessary package list to ldap TAP's README

From
Bruce Momjian
Date:
On Mon, May 21, 2018 at 10:34:25AM +0900, Michael Paquier wrote:
> Hi all,
> 
> The kerberos test suite mentions the package list to use on a set of
> distributions, which is very useful.  However we don't do the same for
> ldap.  Something like the attached would be adapted then to help setting
> up a test environment?
> 
> I have at hand only a Debian installation, and I have just guessed the
> RHEL and FreeBSD dependencies.

Patch applied to head, thanks.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


Re: Add necessary package list to ldap TAP's README

From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.us> writes:
> On Mon, May 21, 2018 at 10:34:25AM +0900, Michael Paquier wrote:
>> The kerberos test suite mentions the package list to use on a set of
>> distributions, which is very useful.  However we don't do the same for
>> ldap.  Something like the attached would be adapted then to help setting
>> up a test environment?
>> 
>> I have at hand only a Debian installation, and I have just guessed the
>> RHEL and FreeBSD dependencies.

> Patch applied to head, thanks.

I was a bit disturbed that you'd push information that was "just guessed",
so I went and tried to run the ldap tests on a couple different platforms.

Fedora 28: you need openldap and openldap-devel to build with --with-ldap
at all.  Then in addition openldap-clients and openldap-servers to run
this test.  The path selections in the script work.

FreeBSD 12: you need openldap-client (NOT openldap24-client) to build
with --with-ldap at all.  Then also openldap-server to run this test.

I'm not sure whether it's worth making a clear distinction between
build-time and test-time dependencies, but if we're going to list
build-time dependencies here at all, we probably ought to be complete
about it.  (It's been well established that not everybody who builds
PG knows about the need to install -devel/-dev subpackages.)

On a somewhat related subject ... I notice that the paths for darwin in
the test script seem to presume that the LDAP support has been installed
from MacPorts or some such, but this isn't documented anywhere (least of
all in this README file).  I tried to get it to work with the
Apple-provided LDAP server and libraries, but no go --- Apple's apparently
done something weird to their copy of slapd, such that it doesn't work
when launched manually like this.  So the expectation of non-default LDAP
support is probably reasonable, but I'm disturbed by the lack of docs.

            regards, tom lane


Re: Add necessary package list to ldap TAP's README

From
Bruce Momjian
Date:
On Tue, Jun 19, 2018 at 06:45:54PM -0400, Tom Lane wrote:
> I was a bit disturbed that you'd push information that was "just guessed",
> so I went and tried to run the ldap tests on a couple different platforms.

I assumed they were guessed at and at least the URLs checked out. 
Should we remove the patch?

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


Re: Add necessary package list to ldap TAP's README

From
Tom Lane
Date:
Bruce Momjian <bruce@momjian.us> writes:
> On Tue, Jun 19, 2018 at 06:45:54PM -0400, Tom Lane wrote:
>> I was a bit disturbed that you'd push information that was "just guessed",
>> so I went and tried to run the ldap tests on a couple different platforms.

> I assumed they were guessed at and at least the URLs checked out. 
> Should we remove the patch?

No, but it needs some adjustments.  I'll go fix what I checked.

Do you have an opinion on what to say about build-time vs test-time
requirements?

            regards, tom lane


Re: Add necessary package list to ldap TAP's README

From
Thomas Munro
Date:
On Wed, Jun 20, 2018 at 10:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> FreeBSD 12: you need openldap-client (NOT openldap24-client) to build
> with --with-ldap at all.  Then also openldap-server to run this test.

Well, it's "pkg install openldap-client" but it's
"net/openldap24-client" if you're building ports from source.  That is
confusing.

> On a somewhat related subject ... I notice that the paths for darwin in
> the test script seem to presume that the LDAP support has been installed
> from MacPorts or some such, but this isn't documented anywhere (least of
> all in this README file).  I tried to get it to work with the
> Apple-provided LDAP server and libraries, but no go --- Apple's apparently
> done something weird to their copy of slapd, such that it doesn't work
> when launched manually like this.  So the expectation of non-default LDAP
> support is probably reasonable, but I'm disturbed by the lack of docs.

I think he used Brew paths?

https://www.postgresql.org/message-id/0a7646b1-f6f6-1364-f0e3-814aed302db4%402ndquadrant.com

-- 
Thomas Munro
http://www.enterprisedb.com


Re: Add necessary package list to ldap TAP's README

From
Michael Paquier
Date:
On Tue, Jun 19, 2018 at 06:59:36PM -0400, Tom Lane wrote:
> Bruce Momjian <bruce@momjian.us> writes:
>> On Tue, Jun 19, 2018 at 06:45:54PM -0400, Tom Lane wrote:
>>> I was a bit disturbed that you'd push information that was "just guessed",
>>> so I went and tried to run the ldap tests on a couple different platforms.
>
>> I assumed they were guessed at and at least the URLs checked out.
>> Should we remove the patch?

Yes, I was a bit surprised to see this patch pushed without checks about
what I guessed.  I am not a user of those other platforms.

> No, but it needs some adjustments.  I'll go fix what I checked.

c992dca2 did not change anything about ldap packages.  Are the ones
listed for RHEL and FreeBSD correct?

> Do you have an opinion on what to say about build-time vs test-time
> requirements?

It could be an idea to mention that for those test suites Postgres needs
to be built with the appropriate --enable-XXX switches or they are just
skipped silently.  Something in each README files across the lines is an
idea:
"This test suite requires PostgreSQL to be built with the configure
argument --enable-XXX or they are entirely skipped".
--
Michael

Attachment

Re: Add necessary package list to ldap TAP's README

From
Michael Paquier
Date:
On Wed, Jun 20, 2018 at 11:06:52AM +1200, Thomas Munro wrote:
> I think he used Brew paths?
>
> https://www.postgresql.org/message-id/0a7646b1-f6f6-1364-f0e3-814aed302db4%402ndquadrant.com

Yes, stuff in /usr/local/ involves homebrew.
--
Michael

Attachment

Re: Add necessary package list to ldap TAP's README

From
Bruce Momjian
Date:
On Wed, Jun 20, 2018 at 12:59:04PM +0900, Michael Paquier wrote:
> On Tue, Jun 19, 2018 at 06:59:36PM -0400, Tom Lane wrote:
> > Bruce Momjian <bruce@momjian.us> writes:
> >> On Tue, Jun 19, 2018 at 06:45:54PM -0400, Tom Lane wrote:
> >>> I was a bit disturbed that you'd push information that was "just guessed",
> >>> so I went and tried to run the ldap tests on a couple different platforms.
> > 
> >> I assumed they were guessed at and at least the URLs checked out. 
> >> Should we remove the patch?
> 
> Yes, I was a bit surprised to see this patch pushed without checks about
> what I guessed.  I am not a user of those other platforms.

It was in README that only developer read, so I thought even a guess
would better than nothing.  Maybe I was wrong.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


Re: Add necessary package list to ldap TAP's README

From
Tom Lane
Date:
Michael Paquier <michael@paquier.xyz> writes:
> On Tue, Jun 19, 2018 at 06:59:36PM -0400, Tom Lane wrote:
>> No, but it needs some adjustments.  I'll go fix what I checked.

> c992dca2 did not change anything about ldap packages.  Are the ones
> listed for RHEL and FreeBSD correct?

No, that patch was more-or-less-unrelated cleanup.  The question is still
open about what we want to list as required packages here.  It seems
somewhat reasonable to assume that people have already managed to build
with the option of interest (eg --with-ldap) before they come to these
test suites ... or am I wrong about that?

            regards, tom lane