From f731053c6c5b0c1ba7971a64b5c62408ea1a8d7e Mon Sep 17 00:00:00 2001 From: Michael Scheidell Date: Wed, 30 May 2012 15:33:09 +0000 Subject: [PATCH] - Update to 0.8.9 - Make it a master port to support net/nss-pam-ldap-sasl PR: ports/168338 Submitted by: Mel FLynn (maintainer) --- UPDATING | 12 ++++ net/nss-pam-ldapd/Makefile | 67 +++++++++++++-------- net/nss-pam-ldapd/distinfo | 4 +- net/nss-pam-ldapd/files/patch-Makefile.in | 19 ------ net/nss-pam-ldapd/files/patch-nss__shadow.c | 17 ------ net/nss-pam-ldapd/files/patch-r1626 | 50 --------------- net/nss-pam-ldapd/files/patch-r1631 | 21 ------- net/nss-pam-ldapd/files/pkg-message.in | 12 ++++ 8 files changed, 67 insertions(+), 135 deletions(-) delete mode 100644 net/nss-pam-ldapd/files/patch-Makefile.in delete mode 100644 net/nss-pam-ldapd/files/patch-nss__shadow.c delete mode 100644 net/nss-pam-ldapd/files/patch-r1626 delete mode 100644 net/nss-pam-ldapd/files/patch-r1631 create mode 100644 net/nss-pam-ldapd/files/pkg-message.in diff --git a/UPDATING b/UPDATING index bdb45ed18866..c2de183bccc6 100644 --- a/UPDATING +++ b/UPDATING @@ -5,6 +5,18 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20120530: + AFFECTS: users of net/nss-pam-ldap + AUTHOR: scheidell@FreeBSD.org + + The net/nss-pam-ldapd port no longer provides an option for SASL. This has + been sourced out to the new net/nss-pam-ldapd-sasl port, to accomodate + users using packages (see ports/162240). Users with openldap-sasl-client + installed are encouraged to change the port's origin to: + net/nss-pam-ldapd-sasl using their favorite ports management tool. + Example for portmaster: + portmaster -o net/nss-pam-ldapd-sasl nss-pam-ldapd + 20120527: AFFECTS: users of x11-toolkits/qt4-gui AUTHOR: kde@FreeBSD.org diff --git a/net/nss-pam-ldapd/Makefile b/net/nss-pam-ldapd/Makefile index 5c043166c329..31c5a95c3be1 100644 --- a/net/nss-pam-ldapd/Makefile +++ b/net/nss-pam-ldapd/Makefile @@ -4,31 +4,44 @@ # # $FreeBSD$ # +# vim: ft=pmake tw=78 fo=cq +# PORTNAME= nss-pam-ldapd -PORTVERSION= 0.8.6 +PORTVERSION= 0.8.9 CATEGORIES= net -MASTER_SITES= http://arthurdejong.org/nss-pam-ldapd/ \ - http://static.ipfw.ru/files/ +MASTER_SITES= http://arthurdejong.org/nss-pam-ldapd/ -MAINTAINER= rflynn@acsalaska.net -COMMENT= Advanced fork of nss_ldap +MAINTAINER?= rflynn@acsalaska.net +COMMENT?= Advanced fork of nss_ldap LICENSE= LGPL21 LGPL3 LICENSE_COMB= dual GNU_CONFIGURE= yes -USE_GMAKE= yes +# Gmake seems to be not really needed anymore. +# Gmake specific constructs are limited to maintainer targets +# USE_GMAKE= yes USE_OPENLDAP= yes USE_RC_SUBR= nslcd PAM_LDAP_SHMAJOR= 1 NSS_LDAP_SHMAJOR= 1 +PKGMESSAGE= ${WRKDIR}/pkg-message +SUB_FILES+= pkg-message NSLCD_PIDFILE?= /var/run/nslcd.pid NSLCD_SOCKET?= /var/run/nslcd.ctl -OPTIONS= SASL "Enable SASL" off \ +.if defined(SLAVE_PORT) +OPTIONS= PAM "Build pam_ldap" on \ + NSS "Build nss support" on +WITH_SASL=yes +CONFLICTS+= nss-pam-ldapd-[0-9]* +.else +OPTIONS= NSS "Build nss support" on \ PAM "Build pam_ldap" on +CONFLICTS+= nss-pam-ldapd-sasl-[0-9]* +.endif USERS= nslcd GROUPS= nslcd @@ -45,7 +58,8 @@ CONFIGURE_ARGS+= --with-nslcd-pidfile=${NSLCD_PIDFILE} \ CONFIG_FILE= "nslcd.conf" CONFIGURE_ARGS+= --with-ldap-conf-file=${PREFIX}/etc/${CONFIG_FILE} -PLIST_SUB+= CONFIG=${CONFIG_FILE} +PLIST_SUB+= CONFIG="${CONFIG_FILE}" +SUB_LIST+= CONFIG_FILE="${PREFIX}/etc/${CONFIG_FILE}" .if defined(WITH_SASL) WANT_OPENLDAP_SASL= yes @@ -69,12 +83,17 @@ PLIST_SUB+= PAM="@comment " .if defined(WITHOUT_NSS) CONFIGURE_ARGS+= --disable-nss PLIST_SUB+= NSS="@comment " +SUB_LIST+= NSS_MESSAGE="" .else CONFIGURE_ARGS+= --enable-nss CONFLICTS+= nss_ldap-1.* PLIST_SUB+= NSS="" +SUB_LIST+= NSS_MESSAGE="WARNING: Be sure to set uid and gid configuration parameters to make nslcd run under unprivileged user." .endif +# Won't hook this in to OPTIONS until PADL ports are at least DEPRECATED. +# It doesn't do the software any good to run as replacement for the PADL ports +# without running the daemon. .if defined(WITHOUT_NSLCD) CONFIGURE_ARGS+= --disable-nslcd PLIST_SUB+= NSLCD="@comment " @@ -85,33 +104,29 @@ MAN5+= nslcd.conf.5 MAN8+= nslcd.8 .endif +.if defined(WITHOUT_NSS) && defined(WITHOUT_PAM) +BROKEN= Software is useless if both NSS and PAM are disabled.\ + Rerun 'make config' or 'portmaster --force-config'. +.endif + post-extract: @${REINPLACE_CMD} -e 's/\(INSTALL_\)\(.*\)) -D /\1\2) /' ${WRKSRC}/Makefile.in ${WRKSRC}/nss/Makefile.in post-configure: ${REINPLACE_CMD} -e 's/^\(CFLAGS.*\) \-O2 \(.*\)$$/\1 -O0 \2/' ${WRKSRC}/nss/Makefile -post-install: +show-pkgmessage:: + @${ECHO_CMD}; ${CAT} ${PKGMESSAGE} | ${FMT} 75 79; ${ECHO_CMD} + +# We take care of the sample file, upstream install target installs the actual +# file if it does not exist yet. +post-install: show-pkgmessage + @${INSTALL_DATA} ${WRKSRC}/nslcd.conf ${PREFIX}/etc/nslcd.conf.sample .if !defined(WITHOUT_NSS) - @cd ${PREFIX}/lib && ${LN} -fs nss_ldap.so.${NSS_LDAP_SHMAJOR} \ - nss_ldap.so + @${LN} -fs nss_ldap.so.${NSS_LDAP_SHMAJOR} ${PREFIX}/lib/nss_ldap.so .endif .if !defined(WITHOUT_PAM) - @cd ${PREFIX}/lib && ${LN} -fs pam_ldap.so.${PAM_LDAP_SHMAJOR} \ - pam_ldap.so + @${LN} -fs pam_ldap.so.${PAM_LDAP_SHMAJOR} ${PREFIX}/lib/pam_ldap.so .endif - @${ECHO_MSG} - @${ECHO_MSG} ===================================================================== - @${ECHO_MSG} - @${ECHO_MSG} " LDAP configuration: ${PREFIX}/etc/${CONFIG_FILE}" - @${ECHO_MSG} " Sample configuration: ${PREFIX}/etc/${CONFIG_FILE}.sample" - @${ECHO_MSG} -.if !defined(WITHOUT_NSS) - @${ECHO_MSG} " WARNING: Be sure to set uid and gid configuration parameters" - @${ECHO_MSG} " WARNING: to make nslcd run under unprivileged user" -.endif - @${ECHO_MSG} - @${ECHO_MSG} ===================================================================== - @${ECHO_MSG} .include diff --git a/net/nss-pam-ldapd/distinfo b/net/nss-pam-ldapd/distinfo index 807723896258..30c169359648 100644 --- a/net/nss-pam-ldapd/distinfo +++ b/net/nss-pam-ldapd/distinfo @@ -1,2 +1,2 @@ -SHA256 (nss-pam-ldapd-0.8.6.tar.gz) = 549f58c83c18ce8017f546138414e831b255a6edc5dfd8ff141aef52d94f25df -SIZE (nss-pam-ldapd-0.8.6.tar.gz) = 466292 +SHA256 (nss-pam-ldapd-0.8.9.tar.gz) = 722a010718c0a5073207d05f1f091e679aa32f2643a3c173dc6f916c2bfcc0d2 +SIZE (nss-pam-ldapd-0.8.9.tar.gz) = 475138 diff --git a/net/nss-pam-ldapd/files/patch-Makefile.in b/net/nss-pam-ldapd/files/patch-Makefile.in deleted file mode 100644 index dfe7831c293f..000000000000 --- a/net/nss-pam-ldapd/files/patch-Makefile.in +++ /dev/null @@ -1,19 +0,0 @@ ---- Makefile.in.orig 2012-03-02 12:50:47.000000000 -0900 -+++ Makefile.in 2012-03-02 13:01:13.000000000 -0900 -@@ -774,6 +774,7 @@ - - # install a default configuration file if it is not already there - install-nslcd_conf: -+ $(INSTALL_DATA) $(srcdir)/nslcd.conf $(DESTDIR)/$(NSLCD_CONF_PATH).sample - @if [ -f $(DESTDIR)$(NSLCD_CONF_PATH) ]; then \ - echo "$(DESTDIR)$(NSLCD_CONF_PATH) already exists, install will not overwrite"; \ - else \ -@@ -781,7 +782,7 @@ - $(INSTALL_DATA) $(srcdir)/nslcd.conf $(DESTDIR)$(NSLCD_CONF_PATH); \ - fi - uninstall-nslcd_conf: -- -rm -f $(DESTDIR)$(NSLCD_CONF_PATH) -+ -rm -f $(DESTDIR)$(NSLCD_CONF_PATH).sample - - # fix permissions before distributing - dist-hook: diff --git a/net/nss-pam-ldapd/files/patch-nss__shadow.c b/net/nss-pam-ldapd/files/patch-nss__shadow.c deleted file mode 100644 index 7ffbc189957d..000000000000 --- a/net/nss-pam-ldapd/files/patch-nss__shadow.c +++ /dev/null @@ -1,17 +0,0 @@ ---- nss/shadow.c.orig 2009-05-29 21:23:03.000000000 +0000 -+++ nss/shadow.c 2009-08-02 22:32:27.000000000 +0000 -@@ -22,6 +22,7 @@ - - #include "config.h" - -+#ifdef HAVE_SHADOW_H - #include - #include - #include -@@ -73,3 +74,6 @@ - { - NSS_ENDENT(spentfp); - } -+ -+#endif -+ diff --git a/net/nss-pam-ldapd/files/patch-r1626 b/net/nss-pam-ldapd/files/patch-r1626 deleted file mode 100644 index 5fb07bf9ae40..000000000000 --- a/net/nss-pam-ldapd/files/patch-r1626 +++ /dev/null @@ -1,50 +0,0 @@ -Modified: compat/ldap_compat.h -============================================================================== ---- compat/ldap_compat.h Wed Feb 29 22:44:31 2012 (r1625) -+++ compat/ldap_compat.h Mon Mar 5 22:53:54 2012 (r1626) -@@ -62,4 +62,12 @@ - #define LDAP_SASL_QUIET 2U - #endif /* not LDAP_SASL_QUIET */ - -+/* on some systems LDAP_OPT_DIAGNOSTIC_MESSAGE isn't there but -+ LDAP_OPT_ERROR_STRING is */ -+#ifndef LDAP_OPT_DIAGNOSTIC_MESSAGE -+#ifdef LDAP_OPT_ERROR_STRING -+#define LDAP_OPT_DIAGNOSTIC_MESSAGE LDAP_OPT_ERROR_STRING -+#endif /* LDAP_OPT_ERROR_STRING */ -+#endif /* not LDAP_OPT_DIAGNOSTIC_MESSAGE */ -+ - #endif /* COMPAT__LDAP_COMPAT_H */ - -Modified: nslcd/myldap.c -============================================================================== ---- nslcd/myldap.c Wed Feb 29 22:44:31 2012 (r1625) -+++ nslcd/myldap.c Mon Mar 5 22:53:54 2012 (r1626) -@@ -378,6 +378,7 @@ - static int do_bind(LDAP *ld,const char *binddn,const char *bindpw,const char *uri) - { - int rc; -+ char *msg=NULL; - #ifdef HAVE_LDAP_SASL_INTERACTIVE_BIND_S - #ifndef HAVE_SASL_INTERACT_T - struct berval cred; -@@ -392,9 +393,16 @@ - rc=ldap_start_tls_s(ld,NULL,NULL); - if (rc!=LDAP_SUCCESS) - { -- log_log(LOG_WARNING,"ldap_start_tls_s() failed: %s%s%s (uri=\"%s\")", -- ldap_err2string(rc),(errno==0)?"":": ", -- (errno==0)?"":strerror(errno),uri); -+#ifdef LDAP_OPT_DIAGNOSTIC_MESSAGE -+ ldap_get_option(ld,LDAP_OPT_DIAGNOSTIC_MESSAGE,&msg); -+#endif /* LDAP_OPT_DIAGNOSTIC_MESSAGE */ -+ log_log(LOG_WARNING,"ldap_start_tls_s() failed: %s%s%s%s%s (uri=\"%s\")", -+ ldap_err2string(rc), -+ (msg==NULL)?"":": ",(msg==NULL)?"":msg, -+ (errno==0)?"":": ",(errno==0)?"":strerror(errno), -+ uri); -+ if (msg) -+ ldap_memfree(msg); - return rc; - } - } diff --git a/net/nss-pam-ldapd/files/patch-r1631 b/net/nss-pam-ldapd/files/patch-r1631 deleted file mode 100644 index c2013feabae9..000000000000 --- a/net/nss-pam-ldapd/files/patch-r1631 +++ /dev/null @@ -1,21 +0,0 @@ -Modified: nslcd/common.h -============================================================================== ---- nslcd/common.h Sat Mar 10 21:31:58 2012 (r1630) -+++ nslcd/common.h Sat Mar 10 21:41:37 2012 (r1631) -@@ -3,7 +3,7 @@ - This file is part of the nss-pam-ldapd library. - - Copyright (C) 2006 West Consulting -- Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Arthur de Jong -+ Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Arthur de Jong - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public -@@ -25,6 +25,7 @@ - #define NSLCD__COMMON_H 1 - - #include -+#include - - #include "nslcd.h" - #include "common/nslcd-prot.h" diff --git a/net/nss-pam-ldapd/files/pkg-message.in b/net/nss-pam-ldapd/files/pkg-message.in new file mode 100644 index 000000000000..6b5d5e7ea81e --- /dev/null +++ b/net/nss-pam-ldapd/files/pkg-message.in @@ -0,0 +1,12 @@ +===================================================================== + +LDAP and nslcd daemon parameters should be set in %%CONFIG_FILE%%. When upgrading review %%CONFIG_FILE%%.sample for additional or changed parameters. + +%%NSS_MESSAGE%% + +To start nslcd add nslcd_enable="YES" to /etc/rc.conf and run: + + # service nslcd start + +See the comments in %%PREFIX%%/etc/rc.d/nslcd for additional tunables. +===================================================================== \ No newline at end of file