Bug 259050

Summary: net/py-ldap0: Update to 1.4.0
Product: Ports & Packages Reporter: Xin LI <delphij>
Component: Individual Port(s)Assignee: Palle Girgensohn <girgen>
Status: Closed FIXED    
Severity: Affects Only Me CC: girgen
Priority: --- Flags: bugzilla: maintainer-feedback? (girgen)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 258297    
Attachments:
Description Flags
Proposed patch
none
Patch to update port to 1.4.0 and drop local patch
none
Proposed patch none

Description Xin LI freebsd_committer freebsd_triage 2021-10-10 17:38:38 UTC
Created attachment 228569 [details]
Proposed patch

This updates net/py-ldap0 to 1.3.1 and fixes build with OpenLDAP 2.5.
Comment 1 Palle Girgensohn freebsd_committer freebsd_triage 2021-10-11 14:40:45 UTC
I'll commit this now, because it builds and works, but can you just briefly argument for why we should not link with the reentrant libldap_r.so.

Thanks,
Palle
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-10-11 14:43:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c5420e877724ce867a6f8bcd98c613bb9af9e6e4

commit c5420e877724ce867a6f8bcd98c613bb9af9e6e4
Author:     Palle Girgensohn <girgen@FreeBSD.org>
AuthorDate: 2021-10-11 14:41:16 +0000
Commit:     Palle Girgensohn <girgen@FreeBSD.org>
CommitDate: 2021-10-11 14:42:38 +0000

    net/py-ldap0: update to 1.3.1

    PR:     259050

 net/py-ldap0/Makefile              |  5 ++---
 net/py-ldap0/distinfo              |  6 +++---
 net/py-ldap0/files/patch-setup.cfg | 17 ++++++++++++-----
 3 files changed, 17 insertions(+), 11 deletions(-)
Comment 3 Xin LI freebsd_committer freebsd_triage 2021-10-24 08:02:46 UTC
Created attachment 228975 [details]
Patch to update port to 1.4.0 and drop local patch

Could you please consider this patch?
Comment 4 Xin LI freebsd_committer freebsd_triage 2021-10-24 08:11:32 UTC
Created attachment 228976 [details]
Proposed patch
Comment 5 Palle Girgensohn freebsd_committer freebsd_triage 2021-10-24 16:29:46 UTC
(In reply to Xin LI from comment #3)

Committed.

Se my comment above, though. Can you just briefly argument for why we should not link with the reentrant libldap_r.so
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-10-24 16:32:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=cd38103b664700a22a0290c16cd017a4bfd750ac

commit cd38103b664700a22a0290c16cd017a4bfd750ac
Author:     Palle Girgensohn <girgen@FreeBSD.org>
AuthorDate: 2021-10-24 16:27:25 +0000
Commit:     Palle Girgensohn <girgen@FreeBSD.org>
CommitDate: 2021-10-24 16:27:25 +0000

    net/py-ldap0: update to 1.4.0

    PR:             259050
    Submitted by:   Xin LI

 net/py-ldap0/Makefile              |  4 ++--
 net/py-ldap0/distinfo              |  6 +++---
 net/py-ldap0/files/patch-setup.cfg | 11 +++++------
 3 files changed, 10 insertions(+), 11 deletions(-)
Comment 7 Xin LI freebsd_committer freebsd_triage 2021-10-25 06:56:01 UTC
(In reply to Palle Girgensohn from comment #5)
Thank you!

To answer the question regarding libldap_r -- actually you did made a good point that the libldap is not thread-safe in OpenLDAP 2.4 (the library is removed in OpenLDAP 2.5 by making libldap libldap_r).

For FreeBSD, all supported releases are shipping with modern OpenSSL version so they now all depend on threading library, and shipping a non-threaded library is no longer a sensible practice, and the only concern is if the two libraries are ABI compatible.

Fortunately, OpenLDAP used opaque type pointers for the library's internal data structures that are different between libldap and libldap_r, and the ABI is compatible according to abi-compliance-checker.

So I've just committed a change to make libldap symbolic links to its libldap_r counterpart for OpenLDAP 2.4 series (this is also done in many Linux distributions and Solaris quite a while ago, so we are not alone).