Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 160979 - net-misc/dhcp - support for openldap (request)
Summary: net-misc/dhcp - support for openldap (request)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-08 20:01 UTC by Nico
Modified: 2011-03-05 23:51 UTC (History)
9 users (show)

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


Attachments
modified ebuild (dhcp-3.0.5.ebuild) (dhcp-3.0.5.ebuild,7.39 KB, text/plain)
2007-01-08 20:02 UTC, Nico
Details
dhcp-3.0.5-ldap.patch (dhcp-3.0.5-ldap.patch,173.48 KB, patch)
2007-01-08 20:03 UTC, Nico
Details | Diff
Updated 2/23/2007 from http://www.newwave.net/~masneyb/ (dhcp-3.0.5-ldap.patch,187.80 KB, patch)
2008-12-16 07:21 UTC, Alex Kocherov
Details | Diff
diff for net-misc/dhcp-3.0.7 (dhcp-3.0.7.ebuild.diff,2.44 KB, patch)
2009-05-21 07:25 UTC, Dmitri Bogomolov
Details | Diff
an ebuild for net-misc/dhcp-3.0.7 (dhcp-3.0.7.ebuild,7.67 KB, text/plain)
2009-05-21 07:27 UTC, Dmitri Bogomolov
Details
net-misc/dhcp-4.0.1.ebuild (dhcp-4.0.1.ebuild,7.35 KB, text/plain)
2009-07-07 09:57 UTC, Mario Fetka (geos_one)
Details
diff to ebuild (dhcp-4.0.1.ebuild.patch,2.55 KB, patch)
2009-07-07 12:54 UTC, Mario Fetka (geos_one)
Details | Diff
3.1.2 ldap diff (dhcp-3.1.2.ebuild.patch,3.09 KB, patch)
2009-07-07 20:13 UTC, Mario Fetka (geos_one)
Details | Diff
4.0.1 ldap diff (dhcp-4.0.1.ebuild.patch,2.55 KB, text/plain)
2009-07-07 20:15 UTC, Mario Fetka (geos_one)
Details
Patches the ldap enabling patch in dhcp-4.0.1 (dhcp-4.0.1-ldap.patch-config.patch,1.45 KB, patch)
2009-07-08 16:26 UTC, Tomasz Bielaszewski
Details | Diff
ldap offset (ldap-for-dhcp-3.1.2-1-ldap-offset-1.patch,1.75 KB, patch)
2009-07-08 16:59 UTC, Mario Fetka (geos_one)
Details | Diff
new ebuild patch (dhcp-4.0.1.ebuild.patch,2.53 KB, patch)
2009-07-08 17:24 UTC, Mario Fetka (geos_one)
Details | Diff
dhcp-3.1.2.ebuild ldap patch (dhcp-3.1.2.ebuild.patch,3.04 KB, patch)
2009-07-08 17:26 UTC, Mario Fetka (geos_one)
Details | Diff
net-misc/dhcp-4.1.1_p1.ebuild (dhcp-4.1.1_p1.ebuild,6.81 KB, text/plain)
2010-07-01 05:21 UTC, Mario Fetka (geos_one)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nico 2007-01-08 20:01:47 UTC
There is a patch at http://www.newwave.net/~masneyb/ adding (open)ldap support for dhcpd (3.0.5). Would  be great if this patch could make it into the main ebuild (optional via ldap useflag).

Little fixing is required to make the code compile (adding the LIBS statement). 



TIA :)

Nico

--- /usr/portage/net-misc/dhcp/dhcp-3.0.5.ebuild        2006-12-20 12:36:07.000000000 +0000
+++ dhcp-3.0.5.ebuild   2007-01-08 19:46:36.000000000 +0000
@@ -27,6 +27,9 @@
        unpack ${A}
        cd "${S}"
 
+       #Enable LDAP-Support
+       epatch "${FILESDIR}/${PN}"-3.0.5-ldap.patch
+       
        # Gentoo patches - these will probably never be accepted upstream
        # Enable chroot support
        epatch "${FILESDIR}/${PN}"-3.0-paranoia.patch
@@ -119,6 +122,7 @@
        #define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
        #define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid"
        #define DHCPD_LOG_FACILITY LOG_LOCAL1
+       #define USE_SSL
        END
 
        cat <<-END > site.conf
@@ -138,6 +142,7 @@
        USRMANDIR = /usr/share/man/man1
        USRMANEXT = .1
        MANCAT = man
+       LIBS=-lssl -lcrypto -lldap -llber
        END
 
        ./configure --copts "-DPARANOIA -DEARLY_CHROOT -DEXTENDED_NEW_OPTION_INFO \


Reproducible: Always

Steps to Reproduce:




tested a few times and no problems with patch :)
Comment 1 Nico 2007-01-08 20:02:44 UTC
Created attachment 106097 [details]
modified ebuild (dhcp-3.0.5.ebuild)
Comment 2 Nico 2007-01-08 20:03:31 UTC
Created attachment 106099 [details, diff]
dhcp-3.0.5-ldap.patch

from http://www.newwave.net/~masneyb/
Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-02-09 10:21:13 UTC
I'm not willing to integrate LDAP into dhcpd at this time. Upstream did indicate that they would at some point though.
Comment 4 Roy Marples (RETIRED) gentoo-dev 2007-07-07 23:44:24 UTC
Upstream are now releasing new 4.0.0 alpha's - it's a good time to pester them about this if ldap support isn't already there.
Comment 5 Robert Buchholz (RETIRED) gentoo-dev 2008-11-17 17:12:42 UTC
I'll just reopen this bug as DCHP 4 has been released without LDAP support. I understand a lot of other distributions ship this patch, and we're losing interoperability just because of upstream blocking inclusion.
Comment 6 Alex Kocherov 2008-12-16 07:21:19 UTC
Created attachment 175402 [details, diff]
Updated 2/23/2007 from http://www.newwave.net/~masneyb/

newest patch from http://www.newwave.net/~masneyb/ at 2/23/2007 are availble and with this patch dhcp work with "ldap-method dynamic;"  previos patch work only "ldap-method static;".
Comment 7 Dmitri Bogomolov 2009-05-21 07:25:47 UTC
Created attachment 192008 [details, diff]
diff for net-misc/dhcp-3.0.7

BTW: ISC writes that 3.0.7 has EOL status and all versions before is just deprecated.
Comment 8 Dmitri Bogomolov 2009-05-21 07:27:59 UTC
Created attachment 192009 [details]
an ebuild for net-misc/dhcp-3.0.7

It's important for me to install schema and README.ldap
Comment 9 Mario Fetka (geos_one) 2009-07-07 09:57:32 UTC
Created attachment 197029 [details]
net-misc/dhcp-4.0.1.ebuild

this is the patched ebuild for dhcp ldap support

the patch for 3.1.2 is on the way

my overlay for ldap patched dhcp ebuilds can be found in #196358
Comment 10 Mario Fetka (geos_one) 2009-07-07 12:54:58 UTC
Created attachment 197054 [details, diff]
diff to ebuild
Comment 11 Mario Fetka (geos_one) 2009-07-07 20:13:36 UTC
Created attachment 197113 [details, diff]
3.1.2 ldap diff
Comment 12 Mario Fetka (geos_one) 2009-07-07 20:15:43 UTC
Created attachment 197114 [details]
4.0.1 ldap diff

new version correct dependencies on ldap? ( ssl? ( .. ) )
Comment 13 Tomasz Bielaszewski 2009-07-08 16:26:19 UTC
Created attachment 197204 [details, diff]
Patches the ldap enabling patch in dhcp-4.0.1

Ldap patch in dhcp-4.0.1 is messed up and makes dhcpd read ldap-password as ldap-server, etc.
All those 
# define SV_LDAP_SERVER           60
# define SV_LDAP_PORT         61
# define SV_LDAP_USERNAME     62
# define SV_LDAP_PASSWORD     63
# define SV_LDAP_BASE_DN      64
ldap related entries are off by 3 when compared with stables.c in the same ldap patch, so i'm correcting that.
Put that patch in net-misc/dhcp/files and apply the following patch on Mario Fetka's ebuild. So far it works for me.

--- dhcp-4.0.1.ebuild   2009-07-08 17:52:58.000000000 +0200
+++ dhcp-4.0.1.ebuild-with_ldap_config_patch    2009-07-08 17:52:51.000000000 +0200
@@ -73,6 +73,7 @@
    epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch

    # Ldap patch for dhcp
+   epatch "${FILESDIR}/dhcp-${MY_LDAP_PV}"-ldap.patch-config.patch
    epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch

    # Brand the version with Gentoo
Comment 14 Mario Fetka (geos_one) 2009-07-08 16:59:50 UTC
Created attachment 197213 [details, diff]
ldap offset

such a patch is also needed for 3.1.2
Comment 15 Mario Fetka (geos_one) 2009-07-08 17:00:32 UTC
(In reply to comment #13)
> Created an attachment (id=197204) [edit]
> Patches the ldap enabling patch in dhcp-4.0.1
> 
> Ldap patch in dhcp-4.0.1 is messed up and makes dhcpd read ldap-password as
> ldap-server, etc.

thx alredy told upstrem about this error
Comment 16 Mario Fetka (geos_one) 2009-07-08 17:24:12 UTC
Created attachment 197217 [details, diff]
new ebuild patch

corrected some small bugs like don't download ldap patch when whrn no ldap use flag .... and many more
Comment 17 Mario Fetka (geos_one) 2009-07-08 17:26:16 UTC
Created attachment 197219 [details, diff]
dhcp-3.1.2.ebuild ldap patch

correct some small bugs (same as with 4.0.1 patch)
Comment 18 Mario Fetka (geos_one) 2009-07-08 19:15:35 UTC
my overlay holds all dhcp/ldap updates (even dhcp-4.1.0) and bug corrections

layman file:

http://ftp.mars.arge.at/pub/overlay/geos_one-overlay.xml

overly named mds

next on my todo list is mozldap support (fedora directory server)

Comment 19 zym 2009-07-29 01:36:25 UTC
just tested dhcp-4.1.0 from overlay mds, on amd64 & i686, both work as expected.

thanks.
Comment 20 Mario Fetka (geos_one) 2009-07-29 08:30:22 UTC
(In reply to comment #19)
> just tested dhcp-4.1.0 from overlay mds, on amd64 & i686, both work as
> expected.
> 
> thanks.
> 
great thanks for feedback
Comment 21 Mario Fetka (geos_one) 2010-07-01 05:21:44 UTC
Created attachment 237107 [details]
net-misc/dhcp-4.1.1_p1.ebuild

Updated ebuild (patch now mandatory)
Comment 22 blub bla 2010-08-09 23:19:42 UTC
(In reply to comment #18)
> my overlay holds all dhcp/ldap updates (even dhcp-4.1.0) and bug corrections
> layman file:
> http://ftp.mars.arge.at/pub/overlay/geos_one-overlay.xml
> overly named mds
> next on my todo list is mozldap support (fedora directory server)


too bad it is 404 and too bad this happens....: http://bugs.gentoo.org/show_bug.cgi?id=331915

Comment 23 Mario Fetka (geos_one) 2010-08-10 04:13:24 UTC
(In reply to comment #22)
> (In reply to comment #18)
> > my overlay holds all dhcp/ldap updates (even dhcp-4.1.0) and bug corrections
> > layman file:
> > http://ftp.mars.arge.at/pub/overlay/geos_one-overlay.xml
> > overly named mds
> > next on my todo list is mozldap support (fedora directory server)
> 
> 
> too bad it is 404 and too bad this happens....:
> http://bugs.gentoo.org/show_bug.cgi?id=331915
> 

the location of my overlay list has changed
the company i am working for didn't want to be related to my projects

the new location is 
http://ftp.disconnected-by-peer.at/pub/overlay/geos_one-overlay.xml

thx
Mario
Comment 24 blub bla 2010-08-10 06:42:21 UTC
> the location of my overlay list has changed
> the company i am working for didn't want to be related to my projects
> 
> the new location is 
> http://ftp.disconnected-by-peer.at/pub/overlay/geos_one-overlay.xml
> 
> thx
> Mario

thank you :)
Comment 25 Mario Fetka (geos_one) 2010-08-24 18:32:38 UTC
Good news for us 
ISC included the ldap patch into the 2.4.0 release

so this ebuild mods can then be added to the 4.2.0 ebuild when it arrives
(will do it in a view days when noone beats me first)

and add it to my mds overlay
Comment 26 Mario Fetka (geos_one) 2010-08-25 12:06:30 UTC
update to 4.2.0 is finisched 
all still required patches updated

now in mds overlay
Comment 27 SpanKY gentoo-dev 2011-03-05 23:51:43 UTC
dhcp-4.2.1 now respects USE=ldap and USE=ssl for the ldap/ldapcrypto flags