diff options
-rw-r--r-- | sys-auth/nss-ldapd/ChangeLog | 9 | ||||
-rw-r--r-- | sys-auth/nss-ldapd/Manifest | 6 | ||||
-rwxr-xr-x | sys-auth/nss-ldapd/files/nslcd.rc | 35 | ||||
-rw-r--r-- | sys-auth/nss-ldapd/files/nss-ldapd-0.6.4-configure-fixes.patch | 115 | ||||
-rw-r--r-- | sys-auth/nss-ldapd/metadata.xml | 9 | ||||
-rw-r--r-- | sys-auth/nss-ldapd/nss-ldapd-0.6.4.ebuild | 64 |
6 files changed, 238 insertions, 0 deletions
diff --git a/sys-auth/nss-ldapd/ChangeLog b/sys-auth/nss-ldapd/ChangeLog new file mode 100644 index 000000000..594e446d0 --- /dev/null +++ b/sys-auth/nss-ldapd/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for sys-auth/nss-ldapd +# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 +# $Header: $ + + 12 Aug 2008; Heath Caldwell (hncaldwell) <hncaldwell@csupomona.edu> + +nss-ldapd-0.6.4.ebuild, +files/nss-ldapd-0.6.4-configure-fixes.patch, + +files/nslcd.rc, +metadata.xml: + New ebuild for sys-auth/nss-ldapd, bug 234555. + diff --git a/sys-auth/nss-ldapd/Manifest b/sys-auth/nss-ldapd/Manifest new file mode 100644 index 000000000..62463613d --- /dev/null +++ b/sys-auth/nss-ldapd/Manifest @@ -0,0 +1,6 @@ +AUX nslcd.rc 718 RMD160 673dc927f013f49236c09c6250bfe9a631d2730a SHA1 235df092009bf9fab4ee879c3afe3c0ca31158b9 SHA256 fb59c44d03aea2ef3561f7e1101f4c122afb97c3f41580b2067359b128187ae2 +AUX nss-ldapd-0.6.4-configure-fixes.patch 4001 RMD160 bf6e83a28e77733c3026994e29a7ac558cf4e3db SHA1 5d3bba4372311566a7d2e741ee7da5e0ffd741c2 SHA256 e1a6656ed6a57dc039bb111fa26ff27674fcbf9fefd160ced140c5d27a9c8036 +DIST nss-ldapd-0.6.4.tar.gz 373022 RMD160 785e10864b77d65038de7cc21b564a0abe6c1572 SHA1 ef503f88db21390276391a44c44ce066964e03b1 SHA256 e045cf9073cc04198965cbd760401b137594d54435f90850238659f5367ef4e6 +EBUILD nss-ldapd-0.6.4.ebuild 1443 RMD160 65d772686e7762183ff3c4131f756546c43a4fa2 SHA1 f5aa989c1b6e1ba0762f615c83be031ffb847909 SHA256 87eb6321dd7762a218b7ab6a355e3b5990722486c2a561ad35d60de7563c89e9 +MISC ChangeLog 346 RMD160 b70e53f41572b46e7d060b8785cac2ee00a2709b SHA1 4c0ca4c375363680f1a5465bbb944636d4ab4fff SHA256 f44de2bd27dd4b93b8ac34a0240a22e9558c5e1d57e82ec8fc518f57dd9ecf9e +MISC metadata.xml 262 RMD160 815dd5d90e8d75f89699fd9f8287bf1d232d759a SHA1 2e1cf3706969b33d98ee1f8e8a261e8efec8d750 SHA256 7760bbabbc7e9f7256183e22dd79827dbc6d141084860280002d720a588dd8c9 diff --git a/sys-auth/nss-ldapd/files/nslcd.rc b/sys-auth/nss-ldapd/files/nslcd.rc new file mode 100755 index 000000000..45895fe61 --- /dev/null +++ b/sys-auth/nss-ldapd/files/nslcd.rc @@ -0,0 +1,35 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + need net + use dns logger +} + +checkconfig() { + if [ ! -f /etc/nss-ldapd.conf ] ; then + eerror "Please create /etc/nss-ldapd.conf" + eerror "Example config: /usr/share/nss-ldapd/nss-ldapd.conf" + return 1 + fi + return 0 +} + +start() { + checkconfig || return $? + + ebegin "Starting nslcd" + start-stop-daemon --start --exec /usr/sbin/nslcd \ + --pidfile /var/run/nslcd/nslcd.pid + eend $? "Failed to start nslcd" +} + +stop() { + ebegin "Stopping nslcd" + start-stop-daemon --stop \ + --pidfile /var/run/nslcd/nslcd.pid \ + --exec /usr/sbin/nslcd + eend $? "Failed to stop nslcd" +} diff --git a/sys-auth/nss-ldapd/files/nss-ldapd-0.6.4-configure-fixes.patch b/sys-auth/nss-ldapd/files/nss-ldapd-0.6.4-configure-fixes.patch new file mode 100644 index 000000000..617ef76ee --- /dev/null +++ b/sys-auth/nss-ldapd/files/nss-ldapd-0.6.4-configure-fixes.patch @@ -0,0 +1,115 @@ +--- nss-ldapd-0.6.4/configure.ac 2008-07-20 02:43:29.000000000 -0700 ++++ nss-ldapd-0.6.4.new/configure.ac 2008-08-11 12:25:54.000000000 -0700 +@@ -105,6 +105,22 @@ + fi + done + ++AC_MSG_CHECKING(--enable-sasl argument) ++AC_ARG_ENABLE(sasl, ++ AS_HELP_STRING([--enable-sasl], ++ [enable sasl support]), ++ [enable_sasl=$enableval], ++ [enable_sasl="no"]) ++AC_MSG_RESULT($enable_sasl) ++ ++AC_MSG_CHECKING(--enable-kerberos argument) ++AC_ARG_ENABLE(kerberos, ++ AS_HELP_STRING([--enable-kerberos], ++ [enable kerberos support]), ++ [enable_kerberos=$enableval], ++ [enable_kerberos="no"]) ++AC_MSG_RESULT($enable_kerberos) ++ + AC_ARG_WITH(ldap-lib, + AS_HELP_STRING([--with-ldap-lib=TYPE], + [select ldap library (auto|netscape5|netscape4|netscape3|umich|openldap) @<:@auto@:>@])) +@@ -153,11 +169,19 @@ + AC_CHECK_HEADERS(ctype.h) + AC_CHECK_HEADERS(getopt.h) + AC_CHECK_HEADERS(sys/un.h) +-AC_CHECK_HEADERS(sasl.h sasl/sasl.h) ++ ++if test "$enable_sasl" = "yes"; then ++ AC_CHECK_HEADERS(sasl.h sasl/sasl.h) ++ AC_CHECK_HEADERS(gsssasl.h) ++fi ++ + AC_CHECK_HEADERS(strings.h) + AC_CHECK_HEADERS(gssldap.h) +-AC_CHECK_HEADERS(gsssasl.h) +-AC_CHECK_HEADERS(gssapi/gssapi_krb5.h gssapi.h) ++ ++if test "$enable_kerberos" = "yes"; then ++ AC_CHECK_HEADERS(gssapi/gssapi_krb5.h gssapi.h) ++fi ++ + AC_CHECK_HEADERS(grp.h) + AC_CHECK_HEADERS(sys/socket.h) + AC_CHECK_HEADERS(sys/ucred.h) +@@ -249,13 +273,15 @@ + #include <sys/un.h> + #include <sys/types.h>]) + +-AC_CHECK_TYPE(sasl_interact_t, +- AC_DEFINE(HAVE_SASL_INTERACT_T,1,[Define to 1 if you have a `sasl_interact_t' definition.]),,[ +- #ifdef HAVE_SASL_SASL_H +- #include <sasl/sasl.h> +- #elif defined(HAVE_SASL_H) +- #include <sasl.h> +- #endif]) ++if test "$enable_sasl" = "yes"; then ++ AC_CHECK_TYPE(sasl_interact_t, ++ AC_DEFINE(HAVE_SASL_INTERACT_T,1,[Define to 1 if you have a `sasl_interact_t' definition.]),,[ ++ #ifdef HAVE_SASL_SASL_H ++ #include <sasl/sasl.h> ++ #elif defined(HAVE_SASL_H) ++ #include <sasl.h> ++ #endif]) ++fi + + # checks for LDAP library + save_LIBS="$LIBS" +@@ -269,10 +295,13 @@ + LIBS="$PTHREAD_LIBS $LIBS" + CFLAGS="$CFLAGS $PTHREAD_CFLAGS" + +-AC_CHECK_LIB(gssapi, gss_krb5_ccache_name,[LIBS="-lgssapi $LIBS" found_gssapi_lib=yes],,$LIBS) +-if test -z "$found_gssapi_lib" +-then +- AC_CHECK_LIB(gssapi_krb5, gss_krb5_ccache_name,[LIBS="-lgssapi_krb5 $LIBS"],,$LIBS) ++if test "$enable_kerberos" = "yes"; then ++ AC_CHECK_LIB(gssapi, gss_krb5_ccache_name,[LIBS="-lgssapi $LIBS" found_gssapi_lib=yes],,$LIBS) ++ ++ if test -z "$found_gssapi_lib" ++ then ++ AC_CHECK_LIB(gssapi_krb5, gss_krb5_ccache_name,[LIBS="-lgssapi_krb5 $LIBS"],,$LIBS) ++ fi + fi + + if test -z "$found_ldap_lib" -a \( $with_ldap_lib = auto -o $with_ldap_lib = umich -o $with_ldap_lib = openldap \) +@@ -312,14 +341,21 @@ + AC_CHECK_LIB(pthread, main) + fi + AC_CHECK_LIB(gssldap, ldap_gss_bind,[LIBS="-lgssldap $LIBS"],,$LIBS) +-AC_CHECK_LIB(sasl2, sasl_client_init) + +-AC_CHECK_FUNCS(sasl_auxprop_request) +-AC_CHECK_FUNCS(gss_krb5_ccache_name) ++if test "$enable_sasl" = "yes"; then ++ AC_CHECK_LIB(sasl2, sasl_client_init) ++ AC_CHECK_FUNCS(sasl_auxprop_request) ++ AC_CHECK_FUNCS(ldap_sasl_interactive_bind_s) ++fi ++ ++if test "$enable_kerberos" = "yes"; then ++ AC_CHECK_FUNCS(gss_krb5_ccache_name) ++fi ++ + AC_CHECK_FUNCS(ldap_parse_result ldap_memfree ldap_controls_free ldap_control_free) + AC_CHECK_FUNCS(ldap_explode_dn ldap_explode_rdn ldap_set_option ldap_get_option) + AC_CHECK_FUNCS(ldap_abandon ldap_simple_bind_s ldap_unbind ldap_set_rebind_proc) +-AC_CHECK_FUNCS(ldap_sasl_interactive_bind_s ldap_initialize ldap_search_ext) ++AC_CHECK_FUNCS(ldap_initialize ldap_search_ext) + AC_CHECK_FUNCS(ldap_create_control) + AC_CHECK_FUNCS(ldap_domain2hostlist ldap_domain2dn) + AC_CHECK_FUNCS(ldap_get_values ldap_value_free ldap_get_dn) diff --git a/sys-auth/nss-ldapd/metadata.xml b/sys-auth/nss-ldapd/metadata.xml new file mode 100644 index 000000000..26ebeca80 --- /dev/null +++ b/sys-auth/nss-ldapd/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>hncaldwell@csupomona.edu</email> + <name>Heath Caldwell</name> + </maintainer> + <herd>no-herd</herd> +</pkgmetadata> diff --git a/sys-auth/nss-ldapd/nss-ldapd-0.6.4.ebuild b/sys-auth/nss-ldapd/nss-ldapd-0.6.4.ebuild new file mode 100644 index 000000000..b874887bc --- /dev/null +++ b/sys-auth/nss-ldapd/nss-ldapd-0.6.4.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils multilib autotools + +DESCRIPTION="NSS module for name lookups using LDAP" +HOMEPAGE="http://ch.tudelft.nl/~arthur/nss-ldapd/" +SRC_URI="http://ch.tudelft.nl/~arthur/nss-ldapd/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="sasl kerberos" + +DEPEND="net-nds/openldap + sasl? ( dev-libs/cyrus-sasl ) + kerberos? ( virtual/krb5 )" + +src_unpack() { + unpack ${A} + cd "${S}" + + # Fix configure.ac to make sasl and kerberos support configurable + epatch "${FILESDIR}/${PN}-0.6.4-configure-fixes.patch" + eautoreconf +} + +src_compile() { + econf \ + $(use_enable sasl) \ + $(use_enable kerberos) \ + --libdir=/$(get_libdir) || die "configure failed" + + emake || die "make failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + + insinto /etc + doins nss-ldapd.conf + + insinto /usr/share/nss-ldapd + doins nss-ldapd.conf + + newinitd "${FILESDIR}"/nslcd.rc nslcd + + dodoc NEWS ChangeLog AUTHORS README || die "error installing documentation" + + # Make directory for pid file and socket file + keepdir /var/run/nslcd +} + +pkg_postinst() { + echo + elog "In order to use nss-ldapd, nslcd needs to be running. You can start" + elog "it like this:" + elog " # /etc/init.d/nslcd start" + elog + elog "You can add it to the default runlevel like so:" + elog " # rc-update add nslcd default" + echo +} |