Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 506448 - sys-libs/ldb: Make dependency on net-nds/openldap default, but optional
Summary: sys-libs/ldb: Make dependency on net-nds/openldap default, but optional
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement with 1 vote (vote)
Assignee: Andreis Vinogradovs ( slepnoga )
URL:
Whiteboard:
Keywords:
: 579544 (view as bug list)
Depends on:
Blocks: 579088
  Show dependency tree
 
Reported: 2014-04-01 11:29 UTC by Alexey Sychev
Modified: 2016-09-06 09:28 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Make ldap optional via USE="ldap" for ldb-1.1.27 (ldb-1.1.27-optional-ldap.diff,772 bytes, patch)
2016-08-29 16:14 UTC, Joshua Kinard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Sychev 2014-04-01 11:29:34 UTC
Maybe I don't understand something, but I think that dependency on net-nds/openldap is wrong.

Reproducible: Always
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2014-04-01 23:44:22 UTC
Yes, it definitely does want to link the ldap module against liblber and libldap.
Comment 2 Joshua Kinard gentoo-dev 2016-08-29 16:14:28 UTC
Created attachment 444390 [details, diff]
Make ldap optional via USE="ldap" for ldb-1.1.27

It looks like the dependency on openldap can be made optional now.  I tested the latest ldb version out (1.1.27), and the configure script seems to handle not finding the LDAP libs/headers just fine.  Built and installed, then compiled and installed samba-4.2.14, and that runs just fine, even reading my old samba3 user database.  Also tested an update to samba-4.4.5.  Granted, this is a home server, so not the most comprehensive testcase.  But it indicates that for anyone wanting to retain their existing Samba3 setup w/o LDAP can just migrate forward without issue.

I've attached a patch to 1.1.27.  It makes ldap the default, but now a user can override this if they don't want to have openldap installed.  I'd suggest making the change with this version only, and let it progress through the stable process as usual.
Comment 3 Joshua Kinard gentoo-dev 2016-08-29 16:21:03 UTC
*** Bug 579544 has been marked as a duplicate of this bug. ***
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2016-09-06 09:28:00 UTC
(In reply to Joshua Kinard from comment #2)
> Created attachment 444390 [details, diff] [details, diff]
> Make ldap optional via USE="ldap" for ldb-1.1.27
> 
> It looks like the dependency on openldap can be made optional now.  I tested
> the latest ldb version out (1.1.27), and the configure script seems to
> handle not finding the LDAP libs/headers just fine.  Built and installed,
> then compiled and installed samba-4.2.14, and that runs just fine, even
> reading my old samba3 user database.  Also tested an update to samba-4.4.5. 
> Granted, this is a home server, so not the most comprehensive testcase.  But
> it indicates that for anyone wanting to retain their existing Samba3 setup
> w/o LDAP can just migrate forward without issue.
> 
> I've attached a patch to 1.1.27.  It makes ldap the default, but now a user
> can override this if they don't want to have openldap installed.  I'd
> suggest making the change with this version only, and let it progress
> through the stable process as usual.

Sorry, but this is not sufficient as your patch would turn ldap into an automagic dependency (stupid wscript crap). If openldap is installed, the package would still link to it.

I've added a patched =sys-libs/ldb-1.1.27-r1 to the tree which whould make ldap support optional:

commit 896306c12642c3343ef6f3f1375c15858246f2e9
Author: Lars Wendler <polynomial-c@gentoo.org>
Date:   Tue Sep 6 11:23:17 2016

    sys-libs/ldb: Revbump to make ldap support optional (bug #506448).
    
    Package-Manager: portage-2.3.0
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>