summaryrefslogtreecommitdiff
path: root/sys-auth/nss-pam-ldapd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-auth/nss-pam-ldapd
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-auth/nss-pam-ldapd')
-rw-r--r--sys-auth/nss-pam-ldapd/Manifest18
-rw-r--r--sys-auth/nss-pam-ldapd/files/nslcd-init-r136
-rw-r--r--sys-auth/nss-pam-ldapd/files/nslcd-init-r228
-rw-r--r--sys-auth/nss-pam-ldapd/files/nslcd-run-s63
-rw-r--r--sys-auth/nss-pam-ldapd/files/nslcd-tmpfiles.conf1
-rw-r--r--sys-auth/nss-pam-ldapd/files/nslcd.service14
-rw-r--r--sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.4-disable-py3-only-linters.patch13
-rw-r--r--sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.8-pynslcd-module-paths.patch25
-rw-r--r--sys-auth/nss-pam-ldapd/files/pynslcd.initd28
-rw-r--r--sys-auth/nss-pam-ldapd/metadata.xml27
-rw-r--r--sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.8.14-r2.ebuild86
-rw-r--r--sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.7.ebuild127
-rw-r--r--sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8-r2.ebuild163
-rw-r--r--sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8.ebuild128
14 files changed, 697 insertions, 0 deletions
diff --git a/sys-auth/nss-pam-ldapd/Manifest b/sys-auth/nss-pam-ldapd/Manifest
new file mode 100644
index 000000000000..378f21e3c9ab
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/Manifest
@@ -0,0 +1,18 @@
+AUX nslcd-init-r1 742 SHA256 0899c987c05df413c0a7b1c4a20503f39b9b703b176482c29a967cda7b64df6d SHA512 3a3af1ab32d3af9de0fa8275c76a46c854ce1fad071aaba93b2f4d4c3de67feb7a6479546a510300696eecdb83fd6519c4eff02c6890f7614cd18b3aababc50f WHIRLPOOL 8c2cc307cb4507611edfa0074c71418621bfd1a4d2a322e1ec95af37759f5beb3a82db5219ca24cdcfb2879e666dfcb11a62014b4c843beedddf2a105a1db96c
+AUX nslcd-init-r2 520 SHA256 b87b0d010e52bdbe95f551fd9458b65a2588b74eb78c9a2af0bdfe4514e665d0 SHA512 be04068d174747a808eceb194cea7b805cefb04809000cc022ef7a63e3d628cecd427c2f2c61ad4c8f71313db8faa8b3b13f78aef80c4bfa32e35e5e166b6f01 WHIRLPOOL 0254a4be1b1d15ac5b9281e7d6304fcdacea843888c334b7977d5ee5c3f84b2b45bd90041a4a15575fec9ea103c97b9b3b743092619d0c98ab0bedf4d2a0e529
+AUX nslcd-run-s6 44 SHA256 3be41774e701ee9c041b3ad296fb06c649ad0f855b0fb7e47624b2f942da0c82 SHA512 190cd1440ab30dc32d09d7de9dee783d5d149547e491930d5f514b4bd53197e45a307906762d0e650ef802aa18ba266b40f61483569208c57709b2cbd74d3ae9 WHIRLPOOL 55c0806aca13eaf43a7a128dfca3b572b627caca82d7e7f669553d9fab30cd7b3967b085070f8e41a9081746e76d0d03495960204e0ed73b1cba561ed302e158
+AUX nslcd-tmpfiles.conf 32 SHA256 670cad7afe9938464a1e2edd6bbb588e138318795ed6895493c64fa7e666164a SHA512 ccffd327cfa015ec746f4e1506c02beb514763625b0e5818455491b911d9328b19f17620926c15aaf18f5cd9268ea71f5ef35ce7a427aefab950579d5629ee5d WHIRLPOOL fdae80405339264b9c9a491b80d5e68990f2a8c5a42ab2b8b2fc60ea00ee4a5a47ca1b74a256caacb376292302b6e44a888e2d201d9ad2b698e65974ec52aba5
+AUX nslcd.service 324 SHA256 9a194c0cc0f43fac5de3ac974cf8efef1911e233c05d7cdef22a9922161d940a SHA512 8055407704c445b4b90046cc4f6b68544d8955bf65fc6b4a2fdf986548a353c2292de70edcf7cb2356619cb122cd3341a82156b6f71eec914471406447cb26a7 WHIRLPOOL bfe549b354ebe56aeb8442a081fdecd7326391d789bb733933606dac8a118a66f169561ea07e389206f971dc93b6d665ae9f8d374a6e36160db218c1b5c0f973
+AUX nss-pam-ldapd-0.9.4-disable-py3-only-linters.patch 403 SHA256 d47afa040e8c282bf7f294583ae2c11a66c12cc702082c138eebaf972afcfa68 SHA512 c8cccb044a641f673f12db9717bda4c0c4d91bd1933342595d8f3f540449459c5cf14263133487195b223670d450873f608e3ce5b6f1ca775ca7fe0180a9f962 WHIRLPOOL 916c2b506e9133864c4063bc6ab420b6c6a7759b8b7adc6f6964b9b33bbcd5966b89135bf37eb3a511646806a11073210a68be9ea379fb214539f4a41934cc22
+AUX nss-pam-ldapd-0.9.8-pynslcd-module-paths.patch 589 SHA256 f8d4d7b90ba1e971aa401382dc903ceee17f7ec66aea77567aa91b89f0f1deb0 SHA512 1bec5eb2376a85b0885b47e9ae560e9fcacb67b2d7a7170777f9e74c4cc8f9e1d57267cc122312f7df8cad05568f6dfcccd1cc6a62478c4d5c90459846e07706 WHIRLPOOL 3120821469e15e30e2fa1cb463549a49e60bebe4d438bd91e2f879f10f00591faa5e1900f14e78d4b3d389ead286d62afdf3d1f23c8197d317e37f20b970d15c
+AUX pynslcd.initd 522 SHA256 d78b8822c09b035854282f3f7aa0c6cbbcee196b1987abf014d371d7c60bcb4c SHA512 2b737990a54b55c04de76fb295c466afbd029e44252372b0ca7a03407d059dfb200c63bfcbf55b1183d8c4f9f90a4f1130d8f5332f4fbde783d92c9ac0ce29b0 WHIRLPOOL 2660c2ebc0b645667f51706bdaa1f755303ffecb5407721039159b1e5ab2c9355cf8bd6606e69852b8ccf874ed98800c282c073841658770fbdb607b419bdda9
+DIST nss-pam-ldapd-0.8.14.tar.gz 508949 SHA256 a29ceb9b7eda386ca38f16115ffec61425462cca6b5e560c44c3d51edc03a63f SHA512 70abb1836b5b3304e583fd3b71f11fee7586e181b26f4630779ec1d90b856da6e4fcc76327c51b20a158aa36708dd12ceb5f543a33c826881f2ad3e092f542c9 WHIRLPOOL 5d30088d73e464bf380dd5e7d34f8c5200680712693c97ee1f1df1880b4680236d9168ac7ec08b161ae463236c0feddc2171442a956c872113caa6e2b07a6bb8
+DIST nss-pam-ldapd-0.9.7.tar.gz 762743 SHA256 0db88d6518bf7ffb01b44f8f8841ece5162906982ce2c9e45e6afff90d3783eb SHA512 2117262f41c4fc54987f9f663ed71126100420ecff391cc280e98d7864094db201a81a4ebf7e5634436982092be3c751971d8aee53e39c42a8572ab57b561284 WHIRLPOOL be1a3a1a5a2eec6fe1e75f5fd40e741fd5dd013534c05898c0498090983632a17931bcf6d3f9e53f583a584d7e02b74c6844343e05617c61e03c0c92b792e044
+DIST nss-pam-ldapd-0.9.8.tar.gz 771247 SHA256 ef7362e7f2003da8c7beb7bcc03c30494acf712625aaac8badc6e7eb16f3453f SHA512 f0d24afd4cb5cea8155aa719b598448d3d81a896f7bc431f7d73e0617a7b2aa7e0ceb6de0b50163848c5554d96a3c415226e32a92e64ed91772fec4c64ad135b WHIRLPOOL 59452c03795d334210fda4b5fbdc23f02e2dfa39e464b6507a8d5f1b8a9caf4033117446d1416de436445f8dc0272252220b1d3cd6f132cbdbba4e3950727fe1
+EBUILD nss-pam-ldapd-0.8.14-r2.ebuild 1997 SHA256 46b100890c73c72747041018a72767f3c1e55948f05d5367544cedeab9a86dea SHA512 c9991819449891bc75b941388345871bc047f3f2202569265d9075ba6bd6bc095aca494f22f3411c59197f9401d0d0b109929ad2d0e287d2094c736aa2bcd8d4 WHIRLPOOL 98c2127c76c3e3d68fb82c90c6224a41515262b95c5f7cdcc8cd703f6dd5e7ab651b9d4c4db45c4d8acbec8e578a831531e6be35a96f32a7ef748ecc83a4dace
+EBUILD nss-pam-ldapd-0.9.7.ebuild 3293 SHA256 fe0acee4cbe18dbdbf6265d7a0c7a08b7138a83b779105b72d691ce75ce0ac73 SHA512 7d2fd134c80785da1c05b0a544f2e87291fa64ca797326410eeb628dd6c11422819f46d922ba0ea2eaf2cc5a3d487f902858f0498de0ced4898b77f491b6e2fb WHIRLPOOL 75973066efc4680873a491c3200c36d0434cabbdf104b0d6bfb78f434badbda4b836f7f54e2e9cc1aefdc39e72c3b7e960812f0a32640fd1ac21842d2ff10508
+EBUILD nss-pam-ldapd-0.9.8-r2.ebuild 4177 SHA256 30a419be4047d65ac22fdb69edf9db5a0b1f4d80e707fb74a5aa12a31fdd96bf SHA512 49c3933587dfa82f93502985dca355f3d311df3b887aac26fee83060d7b68cb317874b378aff13ea7b22782d34a45bab3d98915fa03c43af258bbbcf879ac7c4 WHIRLPOOL 58a377f49962ac038ddedf7505599fc3340cabdd48dace5b3b2aee84af5d95d08219bdb6d1acfe1cfc649a559b11c4e13d23e88ddf427d24bc76462a160d9862
+EBUILD nss-pam-ldapd-0.9.8.ebuild 3335 SHA256 f3386bbb5fbfe936d179201a5ff69f7facf8877882981dba52b6e858304740d5 SHA512 e7d4c7a05f10d4fb3d3f7ec5a570a63eec8b7adeda6e3474f5a54112d3112495a837c19f78f03db410c79978002e91cb76bd254abd99edcf8d17c5af9f1d5833 WHIRLPOOL cec8c2dfa92d7e83cc10fa70129f5f6df4622ce62c005f69145f2f497efcbc866bf27cc58903a88b87717955553df664880c725d7f986aed6016fcfaacc36892
+MISC ChangeLog 3365 SHA256 7418c42c675e5947478ad25e4b74ca559d811dd5d9788d4120ee8c7bd7d18d19 SHA512 454dae4a7873ee257153491cbc0c68b1e4432aaef98f208295cc4f914dca61ef5fcbc1be085ab8b2c1e837d1fab3c14da7b7856d50ca57e7bda69c35a4926329 WHIRLPOOL a931235565ae9db3cf8be76db6137dfb137743fa60449e5f80a92aeebeb3d37f850babd29c118d7942117e2adef6accc9967c8ea93398ebab01f1fedac22613d
+MISC ChangeLog-2015 6693 SHA256 ff494096a5f8ec4b52add7754685dc5a3fb41e1c710565a754a42a5603dccd3e SHA512 42871289ce3643b6c08c96f9a032f79ff386b6a50fcf90bea2e715caa04d3141d81c33309bf5cfece26af1ccc1002da21a000830dd80c543e8e7a60173425362 WHIRLPOOL 010434df9374d3e51d7c534a9210fcfe3c63b53553228f2a50f9f3e4800c51ab9b1f0c51caeefad4962dc979d440ba0f45bfd946b2a8ed9e22fcf3977f131304
+MISC metadata.xml 1169 SHA256 30cefa0ba2355a59d3b96d5e63515136028e13c80cd14cab1b7885643ecf0551 SHA512 ab658f7d791db370920a4eb57da8ead2713b1cabda6f2dccd24478855043802e7c70a07c3aeaa33829b19dc94a4317d8b5ebec07d1caebe07b4fb3bc59b27b4c WHIRLPOOL 7887c4f170072b3bdb8a8dae8fdd65ee19fa8216b6bebe82066181bcf3f181063177183a2f20d16564ae157419b235540458a355bf99a0913f229becca71f416
diff --git a/sys-auth/nss-pam-ldapd/files/nslcd-init-r1 b/sys-auth/nss-pam-ldapd/files/nslcd-init-r1
new file mode 100644
index 000000000000..776a7b3009e0
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/files/nslcd-init-r1
@@ -0,0 +1,36 @@
+#!/sbin/openrc-run
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+cfg="/etc/nslcd.conf"
+
+depend() {
+ need net
+ use dns logger
+}
+
+checkconfig() {
+ if [ ! -f "$cfg" ] ; then
+ eerror "Please create $cfg"
+ eerror "Example config: /usr/share/nss-ldapd/nslcd.conf"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkpath -q -d /run/nslcd -o nslcd:nslcd
+ checkconfig || return $?
+
+ ebegin "Starting nslcd"
+ start-stop-daemon --start --pidfile /var/run/nslcd/nslcd.pid \
+ --exec /usr/sbin/nslcd
+ eend $? "Failed to start nslcd"
+}
+
+stop() {
+ ebegin "Stopping nslcd"
+ start-stop-daemon --stop --pidfile /var/run/nslcd/nslcd.pid
+ eend $? "Failed to stop nslcd"
+}
diff --git a/sys-auth/nss-pam-ldapd/files/nslcd-init-r2 b/sys-auth/nss-pam-ldapd/files/nslcd-init-r2
new file mode 100644
index 000000000000..55ef9a53774f
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/files/nslcd-init-r2
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/sbin/nslcd
+pidfile=/var/run/nslcd/nslcd.pid
+extra_commands="checkconfig"
+cfg="/etc/nslcd.conf"
+
+depend() {
+ need net
+ use dns logger
+}
+
+checkconfig() {
+ if [ ! -f "$cfg" ] ; then
+ eerror "Please create $cfg"
+ eerror "Example config: /usr/share/nss-ldapd/nslcd.conf"
+ return 1
+ fi
+ return 0
+}
+
+start_pre() {
+ checkpath -q -d /run/nslcd -o nslcd:nslcd
+ checkconfig
+ return $?
+}
diff --git a/sys-auth/nss-pam-ldapd/files/nslcd-run-s6 b/sys-auth/nss-pam-ldapd/files/nslcd-run-s6
new file mode 100644
index 000000000000..264da009ba11
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/files/nslcd-run-s6
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec /usr/sbin/nslcd -n
diff --git a/sys-auth/nss-pam-ldapd/files/nslcd-tmpfiles.conf b/sys-auth/nss-pam-ldapd/files/nslcd-tmpfiles.conf
new file mode 100644
index 000000000000..ac4ee0ad8649
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/files/nslcd-tmpfiles.conf
@@ -0,0 +1 @@
+d /run/nslcd 0755 nslcd nslcd -
diff --git a/sys-auth/nss-pam-ldapd/files/nslcd.service b/sys-auth/nss-pam-ldapd/files/nslcd.service
new file mode 100644
index 000000000000..030cc2c90eb1
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/files/nslcd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=NSS and PAM LDAP client daemon
+After=network-online.target
+Wants=network-online.target nss-lookup.target syslog.service
+Before=nss-user-lookup.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/nslcd/nslcd.pid
+ExecStart=/usr/sbin/nslcd
+
+[Install]
+WantedBy=multi-user.target
+RequiredBy=nss-user-lookup.target
diff --git a/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.4-disable-py3-only-linters.patch b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.4-disable-py3-only-linters.patch
new file mode 100644
index 000000000000..06dcc2513a39
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.4-disable-py3-only-linters.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/pylint.rc b/tests/pylint.rc
+index 7f0bc13..b66d018 100644
+--- a/tests/pylint.rc
++++ b/tests/pylint.rc
+@@ -19,7 +19,7 @@ enable=
+ # can either give multiple identifier separated by comma (,) or put this option
+ # multiple time (only on the command line, not in the configuration file where
+ # it should appear only once).
+-disable=E1101
++disable=E1101,E1608,E1606,E1601
+
+
+ [REPORTS]
diff --git a/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.8-pynslcd-module-paths.patch b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.8-pynslcd-module-paths.patch
new file mode 100644
index 000000000000..11c86eff2e24
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/files/nss-pam-ldapd-0.9.8-pynslcd-module-paths.patch
@@ -0,0 +1,25 @@
+diff --git a/pynslcd/pynslcd.py b/pynslcd/pynslcd.py
+index d367a8c..9a52120 100755
+--- a/pynslcd.py
++++ b/pynslcd.py
+@@ -30,13 +30,13 @@ import threading
+ import daemon
+ import ldap
+
+-from tio import TIOStream
+-import cfg
+-import common
+-import constants
+-import invalidator
+-import mypidfile
+-import search
++from pynslcd.tio import TIOStream
++import pynslcd.cfg as cfg
++import pynslcd.common as common
++import pynslcd.constants as constants
++import pynslcd.invalidator as invalidator
++import pynslcd.mypidfile as mypidfile
++import pynslcd.search as search
+
+
+ # the name of the program
diff --git a/sys-auth/nss-pam-ldapd/files/pynslcd.initd b/sys-auth/nss-pam-ldapd/files/pynslcd.initd
new file mode 100644
index 000000000000..7b6540810aed
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/files/pynslcd.initd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command=/usr/sbin/pynslcd
+pidfile=/var/run/nslcd/nslcd.pid
+extra_commands="checkconfig"
+cfg="/etc/nslcd.conf"
+
+depend() {
+ need net
+ use dns logger
+}
+
+checkconfig() {
+ if [ ! -f "$cfg" ] ; then
+ eerror "Please create $cfg"
+ eerror "Example config: /usr/share/nss-ldapd/nslcd.conf"
+ return 1
+ fi
+ return 0
+}
+
+start_pre() {
+ checkpath -q -d /run/nslcd -o nslcd:nslcd
+ checkconfig
+ return $?
+}
diff --git a/sys-auth/nss-pam-ldapd/metadata.xml b/sys-auth/nss-pam-ldapd/metadata.xml
new file mode 100644
index 000000000000..ad8b010a0a01
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/metadata.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>prometheanfire@gentoo.org</email>
+ <name>Matthew Thode</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>chutzpah@gentoo.org</email>
+ <name>Patrick McLean</name>
+ </maintainer>
+ <use>
+ <flag name="utils">Install the command-line utilities</flag>
+ <flag name="pynslcd">Install the python implementation along with the standard implementation</flag>
+ </use>
+ <longdescription lang="en">
+ Provides a Name Service Switch (NSS) module that allows your LDAP
+ server to provide user account, group, host name, alias, netgroup, and
+ basically any other information that you would normally get from /etc
+ flat files or NIS. It also provides a Pluggable Authentication Module
+ (PAM) to do authentication to an LDAP server.
+
+ This is implemented using thin NSS and PAM modules which delegate to a
+ dedicated service (nslcd) that queries the LDAP server with persistent
+ connections, authentication, attribute translation, etc.
+ </longdescription>
+</pkgmetadata>
diff --git a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.8.14-r2.ebuild b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.8.14-r2.ebuild
new file mode 100644
index 000000000000..e25cca2ef612
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.8.14-r2.ebuild
@@ -0,0 +1,86 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit multilib-minimal user
+
+DESCRIPTION="NSS module for name lookups using LDAP"
+HOMEPAGE="http://arthurdejong.org/nss-pam-ldapd/"
+SRC_URI="http://arthurdejong.org/nss-pam-ldapd/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug kerberos sasl +pam"
+
+DEPEND="
+ net-nds/openldap
+ sasl? ( dev-libs/cyrus-sasl )
+ kerberos? ( virtual/krb5 )
+ virtual/pam
+ !sys-auth/nss_ldap
+ !sys-auth/pam_ldap"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ enewgroup nslcd
+ enewuser nslcd -1 -1 -1 nslcd
+}
+
+multilib_src_configure() {
+ # nss libraries always go in /lib on Gentoo
+ myconf="
+ --enable-warnings
+ --with-ldap-lib=openldap
+ --with-ldap-conf-file=/etc/nslcd.conf
+ --with-nslcd-pidfile=/run/nslcd/nslcd.pid
+ --with-nslcd-socket=/run/nslcd/socket
+ --with-pam-seclib-dir=/$(get_libdir)/security
+ --libdir=/$(get_libdir)
+ $(use_enable debug)
+ $(use_enable kerberos)
+ $(use_enable pam)
+ $(use_enable sasl)"
+
+ if use x86-fbsd; then
+ myconf+=" --with-nss-flavour=freebsd"
+ else
+ myconf+=" --with-nss-flavour=glibc"
+ fi
+
+ ECONF_SOURCE="${S}" econf ${myconf}
+}
+
+multilib_src_install() {
+ default
+
+ # for socket and pid file (not needed bug 452992)
+ #keepdir /run/nslcd
+
+ # init script
+ newinitd "${FILESDIR}"/nslcd-init-r1 nslcd
+
+ # make an example copy
+ insinto /usr/share/nss-pam-ldapd
+ doins "${WORKDIR}/${P}/nslcd.conf"
+
+ fperms o-r /etc/nslcd.conf
+}
+
+pkg_postinst() {
+ echo
+ elog "For this to work you must configure /etc/nslcd.conf"
+ elog "This configuration is similar to pam_ldap's /etc/ldap.conf"
+ echo
+ elog "In order to use nss-pam-ldapd, nslcd needs to be running. You can"
+ elog "start it like this:"
+ elog " # /etc/init.d/nslcd start"
+ echo
+ elog "You can add it to the default runlevel like so:"
+ elog " # rc-update add nslcd default"
+ elog
+ elog "If you are upgrading, keep in mind that /etc/nss-ldapd.conf"
+ elog " is now named /etc/nslcd.conf"
+ echo
+}
diff --git a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.7.ebuild b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.7.ebuild
new file mode 100644
index 000000000000..22abd70bba2b
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.7.ebuild
@@ -0,0 +1,127 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=(python2_7)
+inherit eutils prefix user python-r1 multilib multilib-minimal systemd s6
+
+DESCRIPTION="NSS module for name lookups using LDAP"
+HOMEPAGE="http://arthurdejong.org/nss-pam-ldapd/"
+SRC_URI="http://arthurdejong.org/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug kerberos +pam sasl test +utils"
+
+COMMON_DEP="
+ net-nds/openldap[${MULTILIB_USEDEP}]
+ sasl? ( dev-libs/cyrus-sasl[${MULTILIB_USEDEP}] )
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ virtual/pam[${MULTILIB_USEDEP}]
+ utils? ( ${PYTHON_DEPS} )
+ !sys-auth/nss_ldap
+ !sys-auth/pam_ldap"
+RDEPEND="${COMMON_DEP}"
+DEPEND="${COMMON_DEP}
+ test? (
+ ${PYTHON_DEPS}
+ dev-python/pylint[${PYTHON_USEDEP}]
+ )
+ sys-devel/automake"
+
+REQUIRED_USE="
+ utils? ( ${PYTHON_REQUIRED_USE} )
+ test? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ enewgroup nslcd
+ enewuser nslcd -1 -1 -1 nslcd
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.4-disable-py3-only-linters.patch
+ epatch_user
+ use utils && python_setup
+}
+
+multilib_src_configure() {
+ local -a myconf
+
+ myconf=(
+ --disable-utils
+ --enable-warnings
+ --with-ldap-lib=openldap
+ --with-ldap-conf-file=/etc/nslcd.conf
+ --with-nslcd-pidfile=/run/nslcd/nslcd.pid
+ --with-nslcd-socket=/run/nslcd/socket
+ $(usex x86-fbsd '--with-nss-flavour=' '--with-nss-flavour=' 'freebsd' 'glibc')
+ $(use_enable debug)
+ $(use_enable kerberos)
+ $(use_enable pam)
+ $(use_enable sasl)
+ )
+
+ # nss libraries always go in /lib on Gentoo
+ if multilib_is_native_abi ; then
+ myconf+=("--with-pam-seclib-dir=${EPREFIX}/$(get_libdir)/security")
+ myconf+=("--libdir=${EPREFIX}/$(get_libdir)")
+ else
+ myconf+=("--with-pam-seclib-dir=/$(get_libdir)/security")
+ myconf+=("--libdir=/$(get_libdir)")
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_install_all() {
+ local script
+
+ newinitd "${FILESDIR}"/nslcd-init-r1 nslcd
+ newinitd "${FILESDIR}"/nslcd-init-r2 nslcd
+ s6_install_service nslcd "${FILESDIR}"/nslcd-run-s6
+
+ insinto /usr/share/nss-pam-ldapd
+ doins "${WORKDIR}/${P}/nslcd.conf"
+
+ fperms o-r /etc/nslcd.conf
+
+ if use utils; then
+ python_moduleinto nslcd
+ python_foreach_impl && python_domodule utils/*.py
+
+ for script in chsh getent; do
+ python_foreach_impl python_newscript utils/${script}.py ${script}.ldap
+ done
+ fi
+
+ systemd_newtmpfilesd "${FILESDIR}"/nslcd-tmpfiles.conf nslcd.conf
+ systemd_dounit "${FILESDIR}"/nslcd.service
+}
+
+multilib_src_test() {
+ python_foreach_impl emake check
+}
+
+pkg_postinst() {
+ echo
+ elog "For this to work you must configure /etc/nslcd.conf"
+ elog "This configuration is similar to pam_ldap's /etc/ldap.conf"
+ echo
+ elog "In order to use nss-pam-ldapd, nslcd needs to be running. You can"
+ elog "start it like this:"
+ elog " # /etc/init.d/nslcd start"
+ echo
+ elog "You can add it to the default runlevel like so:"
+ elog " # rc-update add nslcd default"
+ elog
+ elog "If you have >=sys-apps/openrc-0.16.3, you can also use s6"
+ elog "to supervise this service."
+ elog "To do this, emerge sys-apps/s6 then add nslcd-s6"
+ elog "default runlevel instead of nslcd."
+ elog
+ elog "If you are upgrading, keep in mind that /etc/nss-ldapd.conf"
+ elog " is now named /etc/nslcd.conf"
+ echo
+}
diff --git a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8-r2.ebuild b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8-r2.ebuild
new file mode 100644
index 000000000000..d286f5f9a46c
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8-r2.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=(python2_7)
+inherit eutils prefix user python-r1 multilib multilib-minimal systemd s6
+
+DESCRIPTION="NSS module for name lookups using LDAP"
+HOMEPAGE="http://arthurdejong.org/nss-pam-ldapd/"
+SRC_URI="http://arthurdejong.org/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug kerberos +pam pynslcd sasl test +utils"
+
+COMMON_DEP="
+ net-nds/openldap[${MULTILIB_USEDEP}]
+ sasl? ( dev-libs/cyrus-sasl[${MULTILIB_USEDEP}] )
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ virtual/pam[${MULTILIB_USEDEP}]
+ utils? ( ${PYTHON_DEPS} )
+ pynslcd? (
+ dev-python/python-ldap[${PYTHON_USEDEP}]
+ dev-python/python-daemon[${PYTHON_USEDEP}]
+ )
+ !sys-auth/nss_ldap
+ !sys-auth/pam_ldap"
+RDEPEND="${COMMON_DEP}"
+DEPEND="${COMMON_DEP}
+ test? (
+ ${PYTHON_DEPS}
+ dev-python/pylint[${PYTHON_USEDEP}]
+ )
+ sys-devel/automake"
+
+REQUIRED_USE="
+ utils? ( ${PYTHON_REQUIRED_USE} )
+ test? ( ${PYTHON_REQUIRED_USE} pynslcd )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.9.4-disable-py3-only-linters.patch
+ "${FILESDIR}"/${PN}-0.9.8-pynslcd-module-paths.patch
+)
+
+pkg_setup() {
+ enewgroup nslcd
+ enewuser nslcd -1 -1 -1 nslcd
+}
+
+src_prepare() {
+ cp pynslcd/pynslcd.py "${S}" || die "Copying pynslcd failed"
+
+ default
+ use utils && python_setup
+ touch pynslcd/__init__.py || die "Could not create __init__.py for pynslcd"
+}
+
+multilib_src_configure() {
+ local -a myconf
+
+ myconf=(
+ --disable-utils
+ --enable-warnings
+ --with-ldap-lib=openldap
+ --with-ldap-conf-file=/etc/nslcd.conf
+ --with-nslcd-pidfile=/run/nslcd/nslcd.pid
+ --with-nslcd-socket=/run/nslcd/socket
+ $(usex x86-fbsd '--with-nss-flavour=' '--with-nss-flavour=' 'freebsd' 'glibc')
+ $(use_enable pynslcd)
+ $(use_enable debug)
+ $(use_enable kerberos)
+ $(use_enable pam)
+ $(use_enable sasl)
+ )
+
+ # nss libraries always go in /lib on Gentoo
+ if multilib_is_native_abi ; then
+ myconf+=("--with-pam-seclib-dir=${EPREFIX}/$(get_libdir)/security")
+ myconf+=("--libdir=${EPREFIX}/$(get_libdir)")
+ else
+ myconf+=("--with-pam-seclib-dir=/$(get_libdir)/security")
+ myconf+=("--libdir=/$(get_libdir)")
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_install_all() {
+ local script
+
+ newinitd "${FILESDIR}"/nslcd-init-r1 nslcd
+ newinitd "${FILESDIR}"/nslcd-init-r2 nslcd
+ s6_install_service nslcd "${FILESDIR}"/nslcd-run-s6
+
+ insinto /usr/share/nss-pam-ldapd
+ doins "${WORKDIR}/${P}/nslcd.conf"
+
+ fperms o-r /etc/nslcd.conf
+
+ if use utils; then
+ python_moduleinto nslcd
+ python_foreach_impl python_domodule utils/*.py
+
+ for script in chsh getent; do
+ python_foreach_impl python_newscript utils/${script}.py ${script}.ldap
+ done
+ fi
+ if use pynslcd; then
+ rm -rf "${D}"/usr/share/pynslcd
+ python_moduleinto pynslcd
+ python_foreach_impl python_domodule pynslcd/*.py
+ python_scriptinto /usr/sbin
+ python_newscript pynslcd.py pynslcd
+ newinitd "${FILESDIR}"/pynslcd.initd pynslcd
+ fi
+
+ systemd_newtmpfilesd "${FILESDIR}"/nslcd-tmpfiles.conf nslcd.conf
+ systemd_dounit "${FILESDIR}"/nslcd.service
+}
+
+multilib_src_install() {
+ emake DESTDIR="${D}" install
+
+ if use pynslcd; then
+ python_moduleinto pynslcd
+ python_foreach_impl python_domodule pynslcd/*.py
+ fi
+}
+
+python_test() {
+ PYTHONPATH="${S}" emake check
+}
+
+multilib_src_test() {
+ pushd "${BUILD_DIR}"
+ ln -s ../pynslcd/constants.py utils/constants.py
+ python_foreach_impl python_test
+ popd
+}
+
+pkg_postinst() {
+ echo
+ elog "For this to work you must configure /etc/nslcd.conf"
+ elog "This configuration is similar to pam_ldap's /etc/ldap.conf"
+ echo
+ elog "In order to use nss-pam-ldapd, nslcd needs to be running. You can"
+ elog "start it like this:"
+ elog " # /etc/init.d/nslcd start"
+ echo
+ elog "You can add it to the default runlevel like so:"
+ elog " # rc-update add nslcd default"
+ elog
+ elog "If you have >=sys-apps/openrc-0.16.3, you can also use s6"
+ elog "to supervise this service."
+ elog "To do this, emerge sys-apps/s6 then add nslcd-s6"
+ elog "default runlevel instead of nslcd."
+ elog
+ elog "If you are upgrading, keep in mind that /etc/nss-ldapd.conf"
+ elog " is now named /etc/nslcd.conf"
+ echo
+}
diff --git a/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8.ebuild b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8.ebuild
new file mode 100644
index 000000000000..edce37919103
--- /dev/null
+++ b/sys-auth/nss-pam-ldapd/nss-pam-ldapd-0.9.8.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+PYTHON_COMPAT=(python2_7)
+inherit eutils prefix user python-r1 multilib multilib-minimal systemd s6
+
+DESCRIPTION="NSS module for name lookups using LDAP"
+HOMEPAGE="http://arthurdejong.org/nss-pam-ldapd/"
+SRC_URI="http://arthurdejong.org/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="debug kerberos +pam sasl test +utils"
+
+COMMON_DEP="
+ net-nds/openldap[${MULTILIB_USEDEP}]
+ dev-python/python-ldap[${PYTHON_USEDEP}]
+ sasl? ( dev-libs/cyrus-sasl[${MULTILIB_USEDEP}] )
+ kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
+ virtual/pam[${MULTILIB_USEDEP}]
+ utils? ( ${PYTHON_DEPS} )
+ !sys-auth/nss_ldap
+ !sys-auth/pam_ldap"
+RDEPEND="${COMMON_DEP}"
+DEPEND="${COMMON_DEP}
+ test? (
+ ${PYTHON_DEPS}
+ dev-python/pylint[${PYTHON_USEDEP}]
+ )
+ sys-devel/automake"
+
+REQUIRED_USE="
+ utils? ( ${PYTHON_REQUIRED_USE} )
+ test? ( ${PYTHON_REQUIRED_USE} )"
+
+pkg_setup() {
+ enewgroup nslcd
+ enewuser nslcd -1 -1 -1 nslcd
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-0.9.4-disable-py3-only-linters.patch
+ epatch_user
+ use utils && python_setup
+}
+
+multilib_src_configure() {
+ local -a myconf
+
+ myconf=(
+ --disable-utils
+ --enable-warnings
+ --with-ldap-lib=openldap
+ --with-ldap-conf-file=/etc/nslcd.conf
+ --with-nslcd-pidfile=/run/nslcd/nslcd.pid
+ --with-nslcd-socket=/run/nslcd/socket
+ $(usex x86-fbsd '--with-nss-flavour=' '--with-nss-flavour=' 'freebsd' 'glibc')
+ $(use_enable debug)
+ $(use_enable kerberos)
+ $(use_enable pam)
+ $(use_enable sasl)
+ )
+
+ # nss libraries always go in /lib on Gentoo
+ if multilib_is_native_abi ; then
+ myconf+=("--with-pam-seclib-dir=${EPREFIX}/$(get_libdir)/security")
+ myconf+=("--libdir=${EPREFIX}/$(get_libdir)")
+ else
+ myconf+=("--with-pam-seclib-dir=/$(get_libdir)/security")
+ myconf+=("--libdir=/$(get_libdir)")
+ fi
+
+ ECONF_SOURCE="${S}" econf "${myconf[@]}"
+}
+
+multilib_src_install_all() {
+ local script
+
+ newinitd "${FILESDIR}"/nslcd-init-r1 nslcd
+ newinitd "${FILESDIR}"/nslcd-init-r2 nslcd
+ s6_install_service nslcd "${FILESDIR}"/nslcd-run-s6
+
+ insinto /usr/share/nss-pam-ldapd
+ doins "${WORKDIR}/${P}/nslcd.conf"
+
+ fperms o-r /etc/nslcd.conf
+
+ if use utils; then
+ python_moduleinto nslcd
+ python_foreach_impl && python_domodule utils/*.py
+
+ for script in chsh getent; do
+ python_foreach_impl python_newscript utils/${script}.py ${script}.ldap
+ done
+ fi
+
+ systemd_newtmpfilesd "${FILESDIR}"/nslcd-tmpfiles.conf nslcd.conf
+ systemd_dounit "${FILESDIR}"/nslcd.service
+}
+
+multilib_src_test() {
+ python_foreach_impl emake check
+}
+
+pkg_postinst() {
+ echo
+ elog "For this to work you must configure /etc/nslcd.conf"
+ elog "This configuration is similar to pam_ldap's /etc/ldap.conf"
+ echo
+ elog "In order to use nss-pam-ldapd, nslcd needs to be running. You can"
+ elog "start it like this:"
+ elog " # /etc/init.d/nslcd start"
+ echo
+ elog "You can add it to the default runlevel like so:"
+ elog " # rc-update add nslcd default"
+ elog
+ elog "If you have >=sys-apps/openrc-0.16.3, you can also use s6"
+ elog "to supervise this service."
+ elog "To do this, emerge sys-apps/s6 then add nslcd-s6"
+ elog "default runlevel instead of nslcd."
+ elog
+ elog "If you are upgrading, keep in mind that /etc/nss-ldapd.conf"
+ elog " is now named /etc/nslcd.conf"
+ echo
+}