summaryrefslogtreecommitdiff
path: root/net-nds
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 /net-nds
reinit the tree, so we can have metadata
Diffstat (limited to 'net-nds')
-rw-r--r--net-nds/389-ds-base/389-ds-base-1.3.4.14.ebuild138
-rw-r--r--net-nds/389-ds-base/389-ds-base-1.3.5.17.ebuild124
-rw-r--r--net-nds/389-ds-base/389-ds-base-9999.ebuild132
-rw-r--r--net-nds/389-ds-base/Manifest11
-rw-r--r--net-nds/389-ds-base/files/389-ds-base-1.3.4-no-instance-script.patch396
-rw-r--r--net-nds/389-ds-base/files/389-ds-snmp.initd44
-rw-r--r--net-nds/389-ds-base/files/389-ds.initd-r190
-rw-r--r--net-nds/389-ds-base/metadata.xml32
-rw-r--r--net-nds/adtool/Manifest6
-rw-r--r--net-nds/adtool/adtool-1.3.3.ebuild33
-rw-r--r--net-nds/adtool/files/adtool-1.3.3-bfr-overflow.patch18
-rw-r--r--net-nds/adtool/metadata.xml8
-rw-r--r--net-nds/gosa-core/Manifest6
-rw-r--r--net-nds/gosa-core/files/gosa.include36
-rw-r--r--net-nds/gosa-core/gosa-core-2.6.12.ebuild107
-rw-r--r--net-nds/gosa-core/metadata.xml15
-rw-r--r--net-nds/gosa-plugin-mail/Manifest6
-rw-r--r--net-nds/gosa-plugin-mail/gosa-plugin-mail-2.6.12-r1.ebuild51
-rw-r--r--net-nds/gosa-plugin-mail/gosa-plugin-mail-2.6.12.ebuild52
-rw-r--r--net-nds/gosa-plugin-mail/metadata.xml11
-rw-r--r--net-nds/gosa-plugin-samba/Manifest6
-rw-r--r--net-nds/gosa-plugin-samba/gosa-plugin-samba-2.6.12-r1.ebuild47
-rw-r--r--net-nds/gosa-plugin-samba/gosa-plugin-samba-2.6.12.ebuild47
-rw-r--r--net-nds/gosa-plugin-samba/metadata.xml11
-rw-r--r--net-nds/gosa-plugin-systems/Manifest6
-rw-r--r--net-nds/gosa-plugin-systems/gosa-plugin-systems-2.6.12-r1.ebuild44
-rw-r--r--net-nds/gosa-plugin-systems/gosa-plugin-systems-2.6.12.ebuild44
-rw-r--r--net-nds/gosa-plugin-systems/metadata.xml11
-rw-r--r--net-nds/gss-proxy/Manifest9
-rwxr-xr-xnet-nds/gss-proxy/files/gssproxy15
-rw-r--r--net-nds/gss-proxy/gss-proxy-0.5.1.ebuild54
-rw-r--r--net-nds/gss-proxy/gss-proxy-0.6.2.ebuild54
-rw-r--r--net-nds/gss-proxy/gss-proxy-0.7.0.ebuild87
-rw-r--r--net-nds/gss-proxy/metadata.xml7
-rw-r--r--net-nds/jxplorer/Manifest12
-rw-r--r--net-nds/jxplorer/files/3.3-disable-jxworkbench.patch12
-rw-r--r--net-nds/jxplorer/files/build.xml70
-rw-r--r--net-nds/jxplorer/files/jxplorer-3-pre26
-rw-r--r--net-nds/jxplorer/jxplorer-3.3.1.1.ebuild68
-rw-r--r--net-nds/jxplorer/jxplorer-3.3.1.2.ebuild75
-rw-r--r--net-nds/jxplorer/jxplorer-3.3.1.ebuild68
-rw-r--r--net-nds/jxplorer/metadata.xml11
-rw-r--r--net-nds/ldapvi/Manifest9
-rw-r--r--net-nds/ldapvi/files/ldapvi-1.7+glibc-2.10.patch39
-rw-r--r--net-nds/ldapvi/files/ldapvi-1.7-vim-encoding.patch13
-rw-r--r--net-nds/ldapvi/ldapvi-1.7-r1.ebuild39
-rw-r--r--net-nds/ldapvi/ldapvi-1.7_p20101214.ebuild46
-rw-r--r--net-nds/ldapvi/metadata.xml15
-rw-r--r--net-nds/led/Manifest5
-rw-r--r--net-nds/led/led-1.111.ebuild29
-rw-r--r--net-nds/led/metadata.xml11
-rw-r--r--net-nds/metadata.xml36
-rw-r--r--net-nds/nsscache/Manifest12
-rw-r--r--net-nds/nsscache/metadata.xml14
-rw-r--r--net-nds/nsscache/nsscache-0.30-r2.ebuild47
-rw-r--r--net-nds/nsscache/nsscache-0.30.ebuild43
-rw-r--r--net-nds/nsscache/nsscache-0.31.ebuild48
-rw-r--r--net-nds/nsscache/nsscache-0.32.ebuild48
-rw-r--r--net-nds/openldap/Manifest40
-rw-r--r--net-nds/openldap/files/DB_CONFIG.fast.example25
-rw-r--r--net-nds/openldap/files/openldap-2.2.14-perlthreadsfix.patch12
-rw-r--r--net-nds/openldap/files/openldap-2.2.6-ntlm.patch199
-rw-r--r--net-nds/openldap/files/openldap-2.3.21-ppolicy.patch13
-rw-r--r--net-nds/openldap/files/openldap-2.3.24-contrib-smbk5pwd.patch53
-rw-r--r--net-nds/openldap/files/openldap-2.3.34-slapd-conf64
-rw-r--r--net-nds/openldap/files/openldap-2.3.37-libldap_r.patch21
-rw-r--r--net-nds/openldap/files/openldap-2.3.43-fix-hang.patch19
-rw-r--r--net-nds/openldap/files/openldap-2.3.XY-gcc44.patch30
-rw-r--r--net-nds/openldap/files/openldap-2.4.11-libldap_r.patch11
-rw-r--r--net-nds/openldap/files/openldap-2.4.15-ppolicy.patch12
-rw-r--r--net-nds/openldap/files/openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch109
-rw-r--r--net-nds/openldap/files/openldap-2.4.17-gcc44.patch11
-rw-r--r--net-nds/openldap/files/openldap-2.4.28-fix-dash.patch26
-rw-r--r--net-nds/openldap/files/openldap-2.4.28-gnutls-gcrypt.patch11
-rw-r--r--net-nds/openldap/files/openldap-2.4.31-gcc47.patch16
-rw-r--r--net-nds/openldap/files/openldap-2.4.35-contrib-samba4.patch38
-rw-r--r--net-nds/openldap/files/openldap-2.4.35-contrib-smbk5pwd.patch48
-rw-r--r--net-nds/openldap/files/openldap-2.4.40-slapd-conf64
-rw-r--r--net-nds/openldap/files/openldap-2.4.42-mdb-unbundle.patch136
-rw-r--r--net-nds/openldap/files/openldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch109
-rw-r--r--net-nds/openldap/files/openldap-2.4.45-libressl.patch65
-rw-r--r--net-nds/openldap/files/openldap-2.4.6-evolution-ntlm.patch192
-rw-r--r--net-nds/openldap/files/slapd-confd14
-rw-r--r--net-nds/openldap/files/slapd-confd-2.4.28-r126
-rw-r--r--net-nds/openldap/files/slapd-initd29
-rw-r--r--net-nds/openldap/files/slapd-initd-2.4.40-r264
-rw-r--r--net-nds/openldap/files/slapd.service12
-rw-r--r--net-nds/openldap/files/slapd.service.conf12
-rw-r--r--net-nds/openldap/files/slapd.tmpfilesd2
-rw-r--r--net-nds/openldap/files/slurpd-initd21
-rw-r--r--net-nds/openldap/metadata.xml21
-rw-r--r--net-nds/openldap/openldap-2.4.44-r1.ebuild851
-rw-r--r--net-nds/openldap/openldap-2.4.44.ebuild828
-rw-r--r--net-nds/openldap/openldap-2.4.45.ebuild883
-rw-r--r--net-nds/phpldapadmin/Manifest9
-rw-r--r--net-nds/phpldapadmin/files/phpldapadmin-1.2.1.1-fix-magic-quotes.patch23
-rw-r--r--net-nds/phpldapadmin/files/phpldapadmin-fix-php5.5-support.patch152
-rw-r--r--net-nds/phpldapadmin/files/postinstall2-en.txt4
-rw-r--r--net-nds/phpldapadmin/metadata.xml18
-rw-r--r--net-nds/phpldapadmin/phpldapadmin-1.2.3-r1.ebuild48
-rw-r--r--net-nds/phpldapadmin/phpldapadmin-1.2.3.ebuild44
-rw-r--r--net-nds/portmap/Manifest9
-rw-r--r--net-nds/portmap/files/portmap-6.0-tcpd.patch18
-rw-r--r--net-nds/portmap/files/portmap.confd5
-rw-r--r--net-nds/portmap/files/portmap.rc658
-rw-r--r--net-nds/portmap/metadata.xml8
-rw-r--r--net-nds/portmap/portmap-6.0.ebuild55
-rw-r--r--net-nds/portmap/portmap-9999.ebuild47
-rw-r--r--net-nds/rpcbind/Manifest17
-rw-r--r--net-nds/rpcbind/files/rpcbind-0.2.3-libtirpc.patch42
-rw-r--r--net-nds/rpcbind/files/rpcbind-0.2.3-mem-corrupt.patch86
-rw-r--r--net-nds/rpcbind/files/rpcbind-0.2.3-remove-P-macro.patch246
-rw-r--r--net-nds/rpcbind/files/rpcbind-0.2.4-CVE-2017-8779.patch21
-rw-r--r--net-nds/rpcbind/files/rpcbind.confd4
-rw-r--r--net-nds/rpcbind/files/rpcbind.initd21
-rw-r--r--net-nds/rpcbind/files/rpcbind.service13
-rw-r--r--net-nds/rpcbind/metadata.xml13
-rw-r--r--net-nds/rpcbind/rpcbind-0.2.3-r1.ebuild56
-rw-r--r--net-nds/rpcbind/rpcbind-0.2.3-r2.ebuild57
-rw-r--r--net-nds/rpcbind/rpcbind-0.2.4-r1.ebuild59
-rw-r--r--net-nds/rpcbind/rpcbind-0.2.4.ebuild54
-rw-r--r--net-nds/rpcbind/rpcbind-9999.ebuild54
-rw-r--r--net-nds/shelldap/Manifest7
-rw-r--r--net-nds/shelldap/metadata.xml25
-rw-r--r--net-nds/shelldap/shelldap-1.3.2.ebuild43
-rw-r--r--net-nds/shelldap/shelldap-1.4.0.ebuild43
-rw-r--r--net-nds/smbldap-tools/Manifest11
-rw-r--r--net-nds/smbldap-tools/files/smbldap-tools-0.9.10-smbldap-config-pod.patch37
-rw-r--r--net-nds/smbldap-tools/metadata.xml12
-rw-r--r--net-nds/smbldap-tools/smbldap-tools-0.9.10-r1.ebuild56
-rw-r--r--net-nds/smbldap-tools/smbldap-tools-0.9.10.ebuild52
-rw-r--r--net-nds/smbldap-tools/smbldap-tools-0.9.8.ebuild52
-rw-r--r--net-nds/smbldap-tools/smbldap-tools-0.9.9.ebuild52
-rw-r--r--net-nds/tac_plus/Manifest18
-rw-r--r--net-nds/tac_plus/files/tac_plus-4.0.4.19-deansification.patch11
-rw-r--r--net-nds/tac_plus/files/tac_plus-4.0.4.19-parallelmake.patch13
-rw-r--r--net-nds/tac_plus/files/tac_plus-4.0.4.27a-deansification.patch11
-rw-r--r--net-nds/tac_plus/files/tac_plus-4.0.4.27a-parallelmake.patch12
-rw-r--r--net-nds/tac_plus/files/tac_plus.conf12
-rw-r--r--net-nds/tac_plus/files/tac_plus.conf241
-rw-r--r--net-nds/tac_plus/files/tac_plus.confd7
-rw-r--r--net-nds/tac_plus/files/tac_plus.confd26
-rw-r--r--net-nds/tac_plus/files/tac_plus.init22
-rw-r--r--net-nds/tac_plus/files/tac_plus.init220
-rw-r--r--net-nds/tac_plus/metadata.xml13
-rw-r--r--net-nds/tac_plus/tac_plus-4.0.4.19-r3.ebuild55
-rw-r--r--net-nds/tac_plus/tac_plus-4.0.4.19-r4.ebuild58
-rw-r--r--net-nds/tac_plus/tac_plus-4.0.4.27a.ebuild59
-rw-r--r--net-nds/yp-tools/Manifest9
-rw-r--r--net-nds/yp-tools/files/domainname.service10
-rw-r--r--net-nds/yp-tools/files/domainname.service.conf3
-rw-r--r--net-nds/yp-tools/metadata.xml5
-rw-r--r--net-nds/yp-tools/yp-tools-2.12-r1.ebuild41
-rw-r--r--net-nds/yp-tools/yp-tools-4.2.2.ebuild31
-rw-r--r--net-nds/ypbind/Manifest8
-rw-r--r--net-nds/ypbind/files/ypbind.confd-r14
-rw-r--r--net-nds/ypbind/files/ypbind.initd40
-rw-r--r--net-nds/ypbind/files/ypbind.service11
-rw-r--r--net-nds/ypbind/metadata.xml5
-rw-r--r--net-nds/ypbind/ypbind-1.37.2-r1.ebuild64
-rw-r--r--net-nds/ypserv/Manifest11
-rw-r--r--net-nds/ypserv/files/rpc.yppasswdd-r121
-rw-r--r--net-nds/ypserv/files/rpc.yppasswdd.confd7
-rw-r--r--net-nds/ypserv/files/rpc.ypxfrd-2.2321
-rw-r--r--net-nds/ypserv/files/rpc.ypxfrd.confd3
-rw-r--r--net-nds/ypserv/files/ypserv22
-rw-r--r--net-nds/ypserv/files/ypserv.confd4
-rw-r--r--net-nds/ypserv/metadata.xml5
-rw-r--r--net-nds/ypserv/ypserv-2.26-r1.ebuild78
169 files changed, 9033 insertions, 0 deletions
diff --git a/net-nds/389-ds-base/389-ds-base-1.3.4.14.ebuild b/net-nds/389-ds-base/389-ds-base-1.3.4.14.ebuild
new file mode 100644
index 000000000000..affe994770bc
--- /dev/null
+++ b/net-nds/389-ds-base/389-ds-base-1.3.4.14.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+WANT_AUTOMAKE="1.9"
+
+inherit user eutils multilib flag-o-matic autotools
+
+DESCRIPTION="389 Directory Server (core librares and daemons )"
+HOMEPAGE="http://port389.org/"
+SRC_URI="http://www.port389.org/sources/${P}.tar.bz2"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="autobind auto-dn-suffix debug doc +pam-passthru +dna +ldapi +bitwise +presence kerberos selinux"
+
+# Pinned to db:4.8 as it is the current stable, can change to a later db version < 6 when they stabilize.
+# The --with-db-inc line in econf will need to be updated as well when changing db version.
+COMMON_DEPEND="
+ sys-libs/db:4.8
+ >=dev-libs/cyrus-sasl-2.1.19
+ >=net-analyzer/net-snmp-5.1.2
+ >=dev-libs/icu-3.4:=
+ dev-libs/nss[utils]
+ dev-libs/nspr
+ dev-libs/svrcore
+ dev-libs/openssl:0=
+ dev-libs/libpcre:3
+ >=dev-perl/perl-mozldap-1.5.3
+ dev-perl/NetAddr-IP
+ net-nds/openldap
+ sys-libs/pam
+ sys-libs/zlib
+ kerberos? ( >=app-crypt/mit-krb5-1.7-r100[openldap] )"
+
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+RDEPEND="${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-dirsrv )
+ virtual/perl-Time-Local
+ virtual/perl-MIME-Base64"
+
+pkg_setup() {
+ enewgroup dirsrv
+ enewuser dirsrv -1 -1 -1 dirsrv
+}
+
+src_prepare() {
+ #0001-Ticket-47840-add-configure-option-to-disable-instanc.patch
+ epatch "${FILESDIR}/389-ds-base-1.3.4-no-instance-script.patch"
+
+ # as per 389 documentation, when 64bit, export USE_64
+ use amd64 && export USE_64=1
+
+ # This will be changed in 1.3.5.X
+ sed -i -e 's/nobody/dirsrv/g' configure.ac || die "sed failed on configure.ac"
+ eautoreconf
+
+ append-lfs-flags
+}
+
+src_configure() {
+ # for 1.3.5.X, will add --enable-gcc-security.
+ # auto-dn-suffix currently throws warning in configure script,
+ # see https://fedorahosted.org/389/ticket/48710
+ econf \
+ $(use_enable debug) \
+ $(use_enable pam-passthru) \
+ $(use_enable ldapi) \
+ $(use_enable autobind) \
+ $(use_enable dna) \
+ $(use_enable bitwise) \
+ $(use_enable presence) \
+ $(use_with kerberos) \
+ $(use_enable auto-dn-suffix) \
+ --enable-maintainer-mode \
+ --with-fhs \
+ --with-openldap \
+ --sbindir=/usr/sbin \
+ --bindir=/usr/bin \
+ --with-db-inc=/usr/include/db4.8
+
+}
+
+src_compile() {
+ default
+ if use doc; then
+ doxygen slapi.doxy || die "cannot run doxygen"
+ fi
+}
+
+src_install () {
+ emake DESTDIR="${D}" install
+
+ # remove redhat style init script
+ rm -rf "${D}"/etc/rc.d || die
+ # Needs a config option to remove this.
+ rm -rf "${D}"/etc/default || die
+
+ # and install gentoo style init script
+ # Get these merged upstream
+ newinitd "${FILESDIR}"/389-ds.initd-r1 389-ds
+ newinitd "${FILESDIR}"/389-ds-snmp.initd 389-ds-snmp
+
+ # cope with libraries being in /usr/lib/dirsrv
+ dodir /etc/env.d
+ echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv
+
+ if use doc; then
+ cd "${S}" || die
+ docinto html/
+ dodoc -r docs/html/.
+ fi
+}
+
+pkg_postinst() {
+ echo
+ elog "If you are planning to use 389-ds-snmp (ldap-agent),"
+ elog "make sure to properly configure: /etc/dirsrv/config/ldap-agent.conf"
+ elog "adding proper 'server' entries, and adding the lines below to"
+ elog " => /etc/snmp/snmpd.conf"
+ elog
+ elog "master agentx"
+ elog "agentXSocket /var/agentx/master"
+ elog
+ elog "To start 389 Directory Server (LDAP service) at boot:"
+ elog
+ elog " rc-update add 389-ds default"
+ elog
+ elog "If you are upgrading from previous 1.2.6 release candidates"
+ elog "please see:"
+ elog "http://directory.fedoraproject.org/wiki/Subtree_Rename#warning:_upgrade_from_389_v1.2.6_.28a.3F.2C_rc1_.7E_rc6.29_to_v1.2.6_rc6_or_newer"
+ echo
+}
diff --git a/net-nds/389-ds-base/389-ds-base-1.3.5.17.ebuild b/net-nds/389-ds-base/389-ds-base-1.3.5.17.ebuild
new file mode 100644
index 000000000000..6fddd0315a5b
--- /dev/null
+++ b/net-nds/389-ds-base/389-ds-base-1.3.5.17.ebuild
@@ -0,0 +1,124 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+WANT_AUTOMAKE="1.13"
+
+inherit user eutils multilib flag-o-matic autotools
+
+DESCRIPTION="389 Directory Server (core librares and daemons )"
+HOMEPAGE="http://www.port389.org/"
+SRC_URI="http://www.port389.org/sources/${P}.tar.bz2"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="autobind auto-dn-suffix debug doc +pam-passthru +dna +ldapi +bitwise presence kerberos selinux"
+
+# Pinned to db:4.8 as it is the current stable, can change to a later db version < 6 when they stabilize.
+# The --with-db-inc line in econf will need to be updated as well when changing db version.
+COMMON_DEPEND="
+ sys-libs/db:4.8
+ >=dev-libs/cyrus-sasl-2.1.19
+ >=net-analyzer/net-snmp-5.1.2
+ >=dev-libs/icu-3.4:=
+ >=dev-libs/nss-3.22[utils]
+ dev-libs/nspr
+ >=dev-libs/svrcore-4.1.2
+ dev-libs/openssl:0=
+ dev-libs/libpcre:3
+ >=dev-perl/perl-mozldap-1.5.3
+ dev-perl/NetAddr-IP
+ net-nds/openldap
+ sys-libs/pam
+ sys-libs/zlib
+ kerberos? ( >=app-crypt/mit-krb5-1.7-r100[openldap] )"
+
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+RDEPEND="${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-dirsrv )
+ virtual/perl-Time-Local
+ virtual/perl-MIME-Base64"
+
+pkg_setup() {
+ enewgroup dirsrv
+ enewuser dirsrv -1 -1 -1 dirsrv
+}
+
+src_prepare() {
+ # as per 389 documentation, when 64bit, export USE_64
+ use amd64 && export USE_64=1
+
+ eautoreconf
+
+ append-lfs-flags
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable pam-passthru) \
+ $(use_enable ldapi) \
+ $(use_enable autobind) \
+ $(use_enable dna) \
+ $(use_enable bitwise) \
+ $(use_enable presence) \
+ $(use_with kerberos) \
+ $(use_enable auto-dn-suffix) \
+ --with-initddir=no \
+ --enable-maintainer-mode \
+ --with-fhs \
+ --with-openldap \
+ --sbindir=/usr/sbin \
+ --bindir=/usr/bin \
+ --with-db-inc=/usr/include/db4.8
+
+}
+
+src_compile() {
+ default
+ if use doc; then
+ doxygen slapi.doxy || die "cannot run doxygen"
+ fi
+}
+
+src_install () {
+ # -j1 is a temporary workaround for bug #605432
+ emake -j1 DESTDIR="${D}" install
+
+ # Install gentoo style init script
+ # Get these merged upstream
+ newinitd "${FILESDIR}"/389-ds.initd-r1 389-ds
+ newinitd "${FILESDIR}"/389-ds-snmp.initd 389-ds-snmp
+
+ # cope with libraries being in /usr/lib/dirsrv
+ dodir /etc/env.d
+ echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv
+
+ if use doc; then
+ cd "${S}" || die
+ docinto html/
+ dodoc -r docs/html/.
+ fi
+}
+
+pkg_postinst() {
+ echo
+ elog "If you are planning to use 389-ds-snmp (ldap-agent),"
+ elog "make sure to properly configure: /etc/dirsrv/config/ldap-agent.conf"
+ elog "adding proper 'server' entries, and adding the lines below to"
+ elog " => /etc/snmp/snmpd.conf"
+ elog
+ elog "master agentx"
+ elog "agentXSocket /var/agentx/master"
+ elog
+ elog "To start 389 Directory Server (LDAP service) at boot:"
+ elog
+ elog " rc-update add 389-ds default"
+ elog
+ echo
+}
diff --git a/net-nds/389-ds-base/389-ds-base-9999.ebuild b/net-nds/389-ds-base/389-ds-base-9999.ebuild
new file mode 100644
index 000000000000..2379554aaebe
--- /dev/null
+++ b/net-nds/389-ds-base/389-ds-base-9999.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+WANT_AUTOMAKE="1.13"
+
+inherit user eutils multilib flag-o-matic autotools git-r3
+
+DESCRIPTION="389 Directory Server (core librares and daemons )"
+HOMEPAGE="http://port389.org/"
+SRC_URI=""
+EGIT_REPO_URI="https://pagure.io/389-ds-base.git"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS=""
+IUSE="autobind auto-dn-suffix debug doc +pam-passthru +dna +ldapi +bitwise kerberos selinux test"
+
+# Pinned to db:4.8 as it is the current stable, can change to a later db version < 6 when they stabilize.
+# The --with-db-inc line in econf will need to be updated as well when changing db version.
+COMMON_DEPEND="
+ sys-libs/db:4.8
+ >=dev-libs/cyrus-sasl-2.1.19
+ >=net-analyzer/net-snmp-5.1.2
+ >=dev-libs/icu-3.4:=
+ dev-libs/nss[utils]
+ dev-libs/nspr
+ >=dev-libs/svrcore-4.1.2
+ dev-libs/openssl:0=
+ dev-libs/libpcre:3
+ >=dev-perl/perl-mozldap-1.5.3
+ dev-perl/NetAddr-IP
+ net-nds/openldap
+ sys-libs/pam
+ sys-libs/zlib
+ dev-libs/libevent
+ dev-util/cmocka
+ kerberos? ( >=app-crypt/mit-krb5-1.7-r100[openldap] )"
+
+DEPEND="${COMMON_DEPEND}
+ virtual/pkgconfig
+ doc? ( app-doc/doxygen )"
+
+RDEPEND="${COMMON_DEPEND}
+ selinux? ( sec-policy/selinux-dirsrv )
+ virtual/perl-Time-Local
+ virtual/perl-MIME-Base64"
+
+pkg_setup() {
+ enewgroup dirsrv
+ enewuser dirsrv -1 -1 -1 dirsrv
+}
+
+src_prepare() {
+ # as per 389 documentation, when 64bit, export USE_64
+ use amd64 && export USE_64=1
+
+ eautoreconf
+
+ append-lfs-flags
+}
+
+src_configure() {
+ econf \
+ $(use_enable debug) \
+ $(use_enable pam-passthru) \
+ $(use_enable ldapi) \
+ $(use_enable autobind) \
+ $(use_enable dna) \
+ $(use_enable bitwise) \
+ $(use_with kerberos) \
+ $(use_enable auto-dn-suffix) \
+ $(use_enable test cmocka) \
+ --with-initddir=no \
+ --enable-maintainer-mode \
+ --with-fhs \
+ --with-openldap \
+ --sbindir=/usr/sbin \
+ --bindir=/usr/bin \
+ --with-db-inc=/usr/include/db4.8
+
+}
+
+src_compile() {
+ default
+ if use doc; then
+ doxygen docs/slapi.doxy || die "cannot run doxygen"
+ fi
+}
+
+src_test () {
+ # -j1 is a temporary workaround for bug #605432
+ emake -j1 check
+}
+
+src_install () {
+ # -j1 is a temporary workaround for bug #605432
+ emake -j1 DESTDIR="${D}" install
+
+ # Install gentoo style init script
+ # Get these merged upstream
+ newinitd "${FILESDIR}"/389-ds.initd-r1 389-ds
+ newinitd "${FILESDIR}"/389-ds-snmp.initd 389-ds-snmp
+
+ # cope with libraries being in /usr/lib/dirsrv
+ dodir /etc/env.d
+ echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv
+
+ if use doc; then
+ cd "${S}" || die
+ docinto html/
+ dodoc -r docs/html/.
+ fi
+}
+
+pkg_postinst() {
+ echo
+ elog "If you are planning to use 389-ds-snmp (ldap-agent),"
+ elog "make sure to properly configure: /etc/dirsrv/config/ldap-agent.conf"
+ elog "adding proper 'server' entries, and adding the lines below to"
+ elog " => /etc/snmp/snmpd.conf"
+ elog
+ elog "master agentx"
+ elog "agentXSocket /var/agentx/master"
+ elog
+ elog "To start 389 Directory Server (LDAP service) at boot:"
+ elog
+ elog " rc-update add 389-ds default"
+ elog
+ echo
+}
diff --git a/net-nds/389-ds-base/Manifest b/net-nds/389-ds-base/Manifest
new file mode 100644
index 000000000000..b1a88df8f35b
--- /dev/null
+++ b/net-nds/389-ds-base/Manifest
@@ -0,0 +1,11 @@
+AUX 389-ds-base-1.3.4-no-instance-script.patch 17750 SHA256 696ab70daa41af1eb6d979b39a0166445edc5f1cdf0755ce8e1459e54b38967e SHA512 649245bbd56cd5445470f102500eb5ea5aeb99a395cc6a49fc0f6331c2a77005aef3e01a49344f04bb018b6679ddd43e77f542a88e4bec46b30da4e6d7fa312a WHIRLPOOL a7cc074891fd6b98630aa3ab1bbed2e722cf3472dd73877b38616e5861f07b1784dc98055f1f686e5af48e21bd96776f0e202945dd4d5426a6d59f5fc010bd22
+AUX 389-ds-snmp.initd 960 SHA256 201a8e8ff30195927cb0c3819ac811034f20c811c0ad572e6be0c178954e7b16 SHA512 bb76a068aa5422664c3fc87d5c28124b26d6dbc88cd88856826ae905a4149a6a1d03ec562dcace1cebc6caaa0ca3c6e9346c1af5703d89e1da600df8ca4a4ba8 WHIRLPOOL 1b312091e6591040237eba7c0709b41ea3450360e46c02089173ed62f202e02344a88a6660c39225406987ff60b71fd90b7cf0c46fbaf5a9be589defd85db8bd
+AUX 389-ds.initd-r1 2366 SHA256 51c91af63c089b4b742867554841019201c4e458450ce18125c2035e51f6e11f SHA512 530316eccf25196453a51398b810dc6ca14a9bf6f8e4487cfd42d00df190653a197b1effae357c6d9e5d00cd51e8e7d47092d0ecddf2d71d6fa100b58d19b6d7 WHIRLPOOL 453f9ed6ce784d5818acad0433b3afca649d1e321c42730a0ef365b2dfefbef8ec859c22c6fa84073e0acc1dbe92ed66a6106841b0a4ffbd006f5e393a27f94c
+DIST 389-ds-base-1.3.4.14.tar.bz2 3433905 SHA256 4408e61c52dc56d8e0ffee530dde70c2af00aa86b385cc40b389ef8bcce55aaa SHA512 1043b3e3437d1d24d1eec54c5c5ca39692151d05b8eb035224db78e68a1f4011bd2e0916f54609387903e2bbe9345f954be5c0a578f90a107958f74604908d6c WHIRLPOOL f2bf87c450c870ad1b886000f49f5d1b6def760c9b1634cffe4871da755932d43cb9253bebe12092032359097a7786e9d29fc64d4326fb3a079a79163a2ccc01
+DIST 389-ds-base-1.3.5.17.tar.bz2 3587553 SHA256 522420b6decc162ed5d57ca913753b48e4bd7137fa0eb1bbc3e21e45923b1819 SHA512 5b96b19cea7dc80c64eaade31127d04c228f7e4dc1999ec19b341cf080ee4570757c84e8dae151c2cb3bcebe1398d50238d74ca362ce07fceafcb66fba590833 WHIRLPOOL 87728a559a7d71fd025af4ec8cb25bc10384acf1b515184f33f76ddc7cd0eb29562c4c3dbb70652f44f42734578acb1f7fc2deadc0947f4fe8f57a24bcbff39c
+EBUILD 389-ds-base-1.3.4.14.ebuild 3649 SHA256 5bdc3a41e576c51363346993bf060305c9f9933baaf3e2c5d567ed1c6e09a0d5 SHA512 d881ac6bd193424708ac00fa7dbad40bec8c27857af89e857a43f102576015199fd4da480719d19a29baa8df3971a9620f1ebcc8454a1d0221ff990af97b42b4 WHIRLPOOL 18f22bf6a56ee2ed4c2f3c7f76f208f136ba821edaa9dcf7c60711526530bc174a31da902c6cd54209146f9dcf8b200f5911b8dfa49270daf7efb7d70964ae47
+EBUILD 389-ds-base-1.3.5.17.ebuild 2957 SHA256 728a91a63f86cf281e2baa02f9a83ac9eec1bc0c713d937ac7c9341159b38dce SHA512 f9dce9c354af006f613df1db6316c67c1ac2d3d8bd6835f28bdee440e8bf40bfdb1611c810c0d4e040a6aec5e82fe26d43e979dc5f8ddd68e80fcfb2f47710b7 WHIRLPOOL 7acd3598ee1b2412d3dd32248741e601d7be8b85ff4f292a0a77238fb055f41ee8c511aa05b87f20924d3c13de31942181044e5f32c3de0645406dce3286b581
+EBUILD 389-ds-base-9999.ebuild 3072 SHA256 cc2e401f3007465797ecd0cd953fc6b92de6c1565ce10f8133d3e4f97dd69d44 SHA512 4b21aef6336e3adf5a8bf6324c84066483311447ef92bc564b128958940233aec8fc15f7f2e30d485e92418e8311359b8df3b51438aaf0b9b588738c1306222f WHIRLPOOL e35c4c1bd5a6783f931493cc4070893d0d5ee736f549cb68ea141464092c0b11b193c3335f7ad9639ff53556c5d1ce46450eaa04706e270eb2948a1eb58f2f07
+MISC ChangeLog 8369 SHA256 202e35ddc1f756cd7c1cc579d0d90c0c7662d2771e9e6cec0377e8b4b28c6552 SHA512 16e628a85ee4786b3f404760f52e0106736bb7fff78fd494fe47e46f4249a557f01ace3fc715164ccbe11b9ed004434d7f1cf0a48125b69dc45713d238ec4f47 WHIRLPOOL f05a03d60740cfa8f4e07f8eb11cd92ea9178764f0087a2ad733c85132e588cb8ee483ee81462ea7a94808d3a0c8cfd6f432e3006aca0e8e0584b0115c7aa0b9
+MISC ChangeLog-2015 5873 SHA256 6d19b6275315bd4ec653fb780b8f4042a6f03ae616b54fe5036052080e38fb2e SHA512 44838bf74cab477bed20306ebc5b676bcf3be78885b9b1ce2752dd93ec92274949dd2a0f095d6823dd033094f3caf3342aa4dde908a4fae55ab36a7dee1e505b WHIRLPOOL 313ca7b73de31ad9a2be8782e6a6d9337f0f52cac6d16930460710477a9c6b529654f48623b8981fd3b3d07dc6bf9e6b038066960cf0999b596ea17d513c47c3
+MISC metadata.xml 1366 SHA256 42968f035557d5bb89e6e5e1cf041a696b472eb8e495ee25e54364b6e1e1cfd7 SHA512 02834f37e40d6aac18027e2589b27b0b6649cbafd7f13f0775eaed8ffeb8e8bc1facbc1693e31c12b9f6e302e05b69617ac697edb047bcaf3942d2de72df2013 WHIRLPOOL 8aaf442b711cae3e43a9a9fb08e551a49ec570ce3ebde3996f51fa130e23f747029f2fcc5bf0437c4e589c67ae2c2aadc89668c913195cfce0657771d8a47f21
diff --git a/net-nds/389-ds-base/files/389-ds-base-1.3.4-no-instance-script.patch b/net-nds/389-ds-base/files/389-ds-base-1.3.4-no-instance-script.patch
new file mode 100644
index 000000000000..8af7ad2be452
--- /dev/null
+++ b/net-nds/389-ds-base/files/389-ds-base-1.3.4-no-instance-script.patch
@@ -0,0 +1,396 @@
+From 7b75e7a4c60637a86acf6c757f207550294279ef Mon Sep 17 00:00:00 2001
+From: William Brown <wibrown@redhat.com>
+Date: Wed, 28 Oct 2015 14:25:26 +1000
+Subject: [PATCH] Ticket 47840 - add configure option to disable instance
+ specific scripts https://fedorahosted.org/389/ticket/47840
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Bug Description: Now that ​https://fedorahosted.org/389/ticket/528 is
+fixed, the next step is to allow building the server with the instance specific
+scripts disabled.
+
+Fix Description: Instead of defining a configure option, we provide a new
+option in setup-ds.pl, slapd.InstScriptsEnabled, which defaults to false. All
+new installs of 389 will NOT install with a inst_dir nor the scripts that are in
+that directory.
+
+Additionally, this change fixes setup-ds.pl to correctly use the sbindir scripts
+to start/stop the server instance during installation.
+
+Finally, we add support for setup-ds.pl so that in --update if the inst_dir
+exists, scripts will be updated, but if it does not exist, no action is taken.
+
+In time, we will alter --update to *remove* the scripts within inst_dir during
+the update (We have no way of knowing if a customer has put custom scripts in
+inst_dir)
+
+Example:
+/opt/dirsrv/sbin/setup-ds.pl slapd.InstScriptsEnabled=false
+
+Author: wibrown
+
+Review by: nhosoi (Thanks!)
+---
+ ldap/admin/src/scripts/DSCreate.pm.in | 204 +++++++++++++++++++--------------
+ ldap/admin/src/scripts/DSUpdate.pm.in | 12 +-
+ ldap/admin/src/scripts/setup-ds.res.in | 1 +
+ 3 files changed, 124 insertions(+), 93 deletions(-)
+
+diff --git a/ldap/admin/src/scripts/DSCreate.pm.in b/ldap/admin/src/scripts/DSCreate.pm.in
+index 3ce5a73..6425be4 100644
+--- a/ldap/admin/src/scripts/DSCreate.pm.in
++++ b/ldap/admin/src/scripts/DSCreate.pm.in
+@@ -130,6 +130,15 @@ sub sanityCheckParams {
+ return @errs;
+ }
+
++ # We need to make sure this value is lowercase
++ $inf->{slapd}->{InstScriptsEnabled} = lc $inf->{slapd}->{InstScriptsEnabled};
++
++ if ("true" ne $inf->{slapd}->{InstScriptsEnabled} && "false" ne $inf->{slapd}->{InstScriptsEnabled}) {
++ debug(1, "InstScriptsEnabled is not a valid boolean");
++ return ('error_invalid_boolean', $inf->{slapd}->{InstScriptsEnabled});
++ }
++
++
+ return ();
+ }
+
+@@ -204,13 +213,17 @@ sub makeDSDirs {
+ my $mode = getMode($inf, 7);
+ my @errs;
+
++ my @dsdirs = qw(config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir);
++ if ($inf->{slapd}->{InstScriptsEnabled} eq "true") {
++ @dsdirs = qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir);
++ }
++
+ # These paths are owned by the SuiteSpotGroup
+ # This allows the admin server to run as a different,
+ # more privileged user than the directory server, but
+ # still allows the admin server to manage directory
+ # server files/dirs without being root
+- for my $kw (qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir
+- cert_dir db_dir ldif_dir bak_dir)) {
++ for my $kw (@dsdirs) {
+ my $dir = $inf->{slapd}->{$kw};
+ @errs = makePaths($dir, $mode, $inf->{General}->{SuiteSpotUserID},
+ $inf->{General}->{SuiteSpotGroup});
+@@ -262,56 +275,66 @@ sub createInstanceScripts {
+ my $myperl = "!$perlexec";
+ my $mydevnull = (-f "/dev/null" ? " /dev/null " : " NUL ");
+
+- # determine initconfig_dir
+- my $initconfig_dir = $inf->{slapd}->{initconfig_dir} || get_initconfigdir($inf->{General}->{prefix});
+-
+- my %maptable = (
+- "DS-ROOT" => $inf->{General}->{prefix},
+- "SEP" => "/", # works on all platforms
+- "SERVER-NAME" => $inf->{General}->{FullMachineName},
+- "SERVER-PORT" => $inf->{slapd}->{ServerPort},
+- "PERL-EXEC" => $myperl,
+- "DEV-NULL" => $mydevnull,
+- "ROOT-DN" => $inf->{slapd}->{RootDN},
+- "LDIF-DIR" => $inf->{slapd}->{ldif_dir},
+- "SERV-ID" => $inf->{slapd}->{ServerIdentifier},
+- "BAK-DIR" => $inf->{slapd}->{bak_dir},
+- "SERVER-DIR" => $inf->{General}->{ServerRoot},
+- "CONFIG-DIR" => $inf->{slapd}->{config_dir},
+- "INITCONFIG-DIR" => $initconfig_dir,
+- "INST-DIR" => $inf->{slapd}->{inst_dir},
+- "RUN-DIR" => $inf->{slapd}->{run_dir},
+- "PRODUCT-NAME" => "slapd",
+- "SERVERBIN-DIR" => $inf->{slapd}->{sbindir},
+- "DB-DIR" => $inf->{slapd}->{db_dir}
+- );
+-
+- my $dir = "$inf->{General}->{prefix}@taskdir@";
+- for my $file (glob("$dir/template-*")) {
+- my $basename = $file;
+- $basename =~ s/^.*template-//;
+- my $destfile = "$inf->{slapd}->{inst_dir}/$basename";
+-
+- next if ($skip and -f $destfile); # in skip mode, skip files that already exist
+-
+- if (!open(SRC, "< $file")) {
+- return ("error_opening_scripttmpl", $file, $!);
+- }
+- if (!open(DEST, "> $destfile")) {
+- return ("error_opening_scripttmpl", $destfile, $!);
+- }
+- my $contents; # slurp entire file into memory
+- read SRC, $contents, int(-s $file);
+- close(SRC);
+- while (my ($key, $val) = each %maptable) {
+- $contents =~ s/\{\{$key\}\}/$val/g;
+- }
+- print DEST $contents;
+- close(DEST);
+- my @errs = changeOwnerMode($inf, 5, $destfile);
+- if (@errs) {
+- return @errs;
++ # If we have InstScriptsEnabled, we likely have setup.inf or the argument.
++ # However, during an upgrade, we need to know if we should upgrade the template files or not.
++ # For now, the easiest way is to check to if the directory exists, and if is does, we assume we want to upgrade / create the updated scripts.
++ if ($inf->{slapd}->{InstScriptsEnabled} eq "true" || -d $inf->{slapd}->{inst_dir} ) {
++ debug(1, "Creating or updating instance directory scripts\n");
++ # determine initconfig_dir
++ my $initconfig_dir = $inf->{slapd}->{initconfig_dir} || get_initconfigdir($inf->{General}->{prefix});
++
++ my %maptable = (
++ "DS-ROOT" => $inf->{General}->{prefix},
++ "SEP" => "/", # works on all platforms
++ "SERVER-NAME" => $inf->{General}->{FullMachineName},
++ "SERVER-PORT" => $inf->{slapd}->{ServerPort},
++ "PERL-EXEC" => $myperl,
++ "DEV-NULL" => $mydevnull,
++ "ROOT-DN" => $inf->{slapd}->{RootDN},
++ "LDIF-DIR" => $inf->{slapd}->{ldif_dir},
++ "SERV-ID" => $inf->{slapd}->{ServerIdentifier},
++ "BAK-DIR" => $inf->{slapd}->{bak_dir},
++ "SERVER-DIR" => $inf->{General}->{ServerRoot},
++ "CONFIG-DIR" => $inf->{slapd}->{config_dir},
++ "INITCONFIG-DIR" => $initconfig_dir,
++ "INST-DIR" => $inf->{slapd}->{inst_dir},
++ "RUN-DIR" => $inf->{slapd}->{run_dir},
++ "PRODUCT-NAME" => "slapd",
++ "SERVERBIN-DIR" => $inf->{slapd}->{sbindir},
++ "DB-DIR" => $inf->{slapd}->{db_dir}
++ );
++
++
++ my $dir = "$inf->{General}->{prefix}@taskdir@";
++ for my $file (glob("$dir/template-*")) {
++ my $basename = $file;
++ $basename =~ s/^.*template-//;
++ my $destfile = "$inf->{slapd}->{inst_dir}/$basename";
++ debug(1, "$destfile\n");
++
++ next if ($skip and -f $destfile); # in skip mode, skip files that already exist
++
++ if (!open(SRC, "< $file")) {
++ return ("error_opening_scripttmpl", $file, $!);
++ }
++ if (!open(DEST, "> $destfile")) {
++ return ("error_opening_scripttmpl", $destfile, $!);
++ }
++ my $contents; # slurp entire file into memory
++ read SRC, $contents, int(-s $file);
++ close(SRC);
++ while (my ($key, $val) = each %maptable) {
++ $contents =~ s/\{\{$key\}\}/$val/g;
++ }
++ print DEST $contents;
++ close(DEST);
++ my @errs = changeOwnerMode($inf, 5, $destfile);
++ if (@errs) {
++ return @errs;
++ }
+ }
++ } else {
++ debug(1, "No instance directory scripts will be updated or created\n");
+ }
+
+ return ();
+@@ -639,7 +662,7 @@ sub initDatabase {
+ return ();
+ }
+
+- my $cmd = "$inf->{slapd}->{inst_dir}/ldif2db -n $inf->{slapd}->{ds_bename} -i \'$ldiffile\'";
++ my $cmd = "$inf->{slapd}->{sbindir}/ldif2db -Z $inf->{slapd}->{ServerIdentifier} -n $inf->{slapd}->{ds_bename} -i \'$ldiffile\'";
+ $? = 0; # clear error condition
+ my $output = `$cmd 2>&1`;
+ my $result = $?;
+@@ -662,7 +685,7 @@ sub startServer {
+ my @errs;
+ # get error log
+ my $errLog = "$inf->{slapd}->{log_dir}/errors";
+- my $startcmd = "$inf->{slapd}->{inst_dir}/start-slapd";
++ my $startcmd = "$inf->{slapd}->{sbindir}/start-dirsrv $inf->{slapd}->{ServerIdentifier}";
+ if ("@systemdsystemunitdir@" and (getLogin() eq 'root')) {
+ $startcmd = "/bin/systemctl start @package_name@\@$inf->{slapd}->{ServerIdentifier}.service";
+ }
+@@ -875,6 +898,10 @@ sub setDefaults {
+ "@datadir@",
+ $inf->{General}->{prefix});
+
++ if (!defined($inf->{slapd}->{InstScriptsEnabled})) {
++ $inf->{slapd}->{InstScriptsEnabled} = "false";
++ }
++
+ if (!defined($inf->{slapd}->{inst_dir})) {
+ $inf->{slapd}->{inst_dir} = "$inf->{General}->{ServerRoot}/slapd-$servid";
+ }
+@@ -975,9 +1002,12 @@ sub updateSelinuxPolicy {
+ system("restorecon -R $localstatedir/lib/@PACKAGE_NAME@");
+ }
+
++ my @inst_dirs = qw(config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir);
++ if ($inf->{slapd}->{InstScriptsEnabled} eq "true") {
++ @inst_dirs = qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir cert_dir db_dir ldif_dir bak_dir);
++ }
+ # run restorecon on all instance directories we created
+- for my $kw (qw(inst_dir config_dir schema_dir log_dir lock_dir run_dir tmp_dir
+- cert_dir db_dir ldif_dir bak_dir)) {
++ for my $kw (@inst_dirs) {
+ my $dir = $inf->{slapd}->{$kw};
+ system("restorecon -R $dir");
+ }
+@@ -1231,14 +1261,14 @@ sub createDSInstance {
+ }
+
+ sub stopServer {
+- my $instancedir = shift;
+- my $prog = $instancedir . "/stop-slapd";
++ my $instance = shift;
++ my $prog = "@sbindir@/stop-dirsrv";
+ if (-x $prog) {
+ $? = 0;
+ # run the stop command
+- my $output = `$prog 2>&1`;
++ my $output = `$prog $instance 2>&1`;
+ my $status = $?;
+- debug(3, "stopping server $instancedir returns status $status: output $output\n");
++ debug(3, "stopping server $instance returns status $status: output $output\n");
+ if ($status) {
+ debug(1,"Warning: Could not stop directory server: status $status: output $output\n");
+ # if the server is not running, that's ok
+@@ -1254,7 +1284,7 @@ sub stopServer {
+ return;
+ }
+
+- debug(1, "Successfully stopped server $instancedir\n");
++ debug(1, "Successfully stopped server $instance\n");
+ return 1;
+ }
+
+@@ -1331,23 +1361,16 @@ sub removeDSInstance {
+ $conn->close();
+
+ # stop the server
+- my $instdir = "";
+- if ($entry) {
+- foreach my $path ( @{$entry->{"nsslapd-instancedir"}} )
+- {
+- if (!stopServer($path)) {
+- if ($force) {
+- debug(1, "Warning: Could not stop directory server - Error: $! - forcing continue\n");
+- } elsif ($! == ENOENT) { # stop script not found or server not running
+- debug(1, "Warning: Could not stop directory server: already removed or not running\n");
+- push @errs, [ 'error_stopping_server', $path, $! ];
+- } else { # real error
+- debug(1, "Error: Could not stop directory server - aborting - use -f flag to force removal\n");
+- push @errs, [ 'error_stopping_server', $path, $! ];
+- return @errs;
+- }
+- }
+- $instdir = $path;
++ if (!stopServer($inst)) {
++ if ($force) {
++ debug(1, "Warning: Could not stop directory server - Error: $! - forcing continue\n");
++ } elsif ($! == ENOENT) { # stop script not found or server not running
++ debug(1, "Warning: Could not stop directory server: already removed or not running\n");
++ push @errs, [ 'error_stopping_server', $inst, $! ];
++ } else { # real error
++ debug(1, "Error: Could not stop directory server - aborting - use -f flag to force removal\n");
++ push @errs, [ 'error_stopping_server', $inst, $! ];
++ return @errs;
+ }
+ }
+
+@@ -1363,18 +1386,25 @@ sub removeDSInstance {
+ push @errs, remove_tree($entry, "nsslapd-errorlog", $instname, 1);
+ }
+
+- # instance dir
+- if ( -d $instdir && $instdir =~ /$instname/ )
+- {
+- # clean up pid files (if any)
+- remove_pidfile("STARTPIDFILE", $inst, $instdir, $instname, $rundir, $product_name);
+- remove_pidfile("PIDFILE", $inst, $instdir, $instname, $rundir, $product_name);
+
+- my $rc = rmtree($instdir);
+- if ( 0 == $rc )
++ # instance dir
++ my $instdir = "";
++ if ($entry) {
++ foreach my $instdir ( @{$entry->{"nsslapd-instancedir"}} )
+ {
+- push @errs, [ 'error_removing_path', $instdir, $! ];
+- debug(1, "Warning: $instdir was not removed. Error: $!\n");
++ if ( -d $instdir && $instdir =~ /$instname/ )
++ {
++ # clean up pid files (if any)
++ remove_pidfile("STARTPIDFILE", $inst, $instdir, $instname, $rundir, $product_name);
++ remove_pidfile("PIDFILE", $inst, $instdir, $instname, $rundir, $product_name);
++
++ my $rc = rmtree($instdir);
++ if ( 0 == $rc )
++ {
++ push @errs, [ 'error_removing_path', $instdir, $! ];
++ debug(1, "Warning: $instdir was not removed. Error: $!\n");
++ }
++ }
+ }
+ }
+ # Finally, config dir
+diff --git a/ldap/admin/src/scripts/DSUpdate.pm.in b/ldap/admin/src/scripts/DSUpdate.pm.in
+index be1e67c..e84a9a9 100644
+--- a/ldap/admin/src/scripts/DSUpdate.pm.in
++++ b/ldap/admin/src/scripts/DSUpdate.pm.in
+@@ -226,10 +226,10 @@ sub updateDS {
+ for my $upd (@updates) {
+ my @localerrs;
+ if ($upd->{$PRE_STAGE}) {
+- debug(1, "Running stage $PRE_STAGE update ", $upd->{path}, "\n");
++ debug(1, "Running updateDS stage $PRE_STAGE update ", $upd->{path}, "\n");
+ @localerrs = &{$upd->{$PRE_STAGE}}($inf, $setup->{configdir});
+ } elsif ($upd->{file}) {
+- debug(1, "Running stage $PRE_STAGE update ", $upd->{path}, "\n");
++ debug(1, "Running updateDS stage $PRE_STAGE update ", $upd->{path}, "\n");
+ @localerrs = processUpdate($upd, $inf, $setup->{configdir}, $PRE_STAGE);
+ }
+ if (@localerrs) {
+@@ -276,10 +276,10 @@ sub updateDS {
+ for my $upd (@updates) {
+ my @localerrs;
+ if ($upd->{$POST_STAGE}) {
+- debug(1, "Running stage $POST_STAGE update ", $upd->{path}, "\n");
++ debug(1, "Running updateDS stage $POST_STAGE update ", $upd->{path}, "\n");
+ @localerrs = &{$upd->{$POST_STAGE}}($inf, $setup->{configdir});
+ } elsif ($upd->{file}) {
+- debug(1, "Running stage $POST_STAGE update ", $upd->{path}, "\n");
++ debug(1, "Running updateDS stage $POST_STAGE update ", $upd->{path}, "\n");
+ @localerrs = processUpdate($upd, $inf, $setup->{configdir}, $POST_STAGE);
+ }
+ if (@localerrs) {
+@@ -385,10 +385,10 @@ sub updateDSInstance {
+ for my $upd (@{$updates}) {
+ my @localerrs;
+ if ($upd->{$stage}) {
+- debug(1, "Running stage $stage update ", $upd->{path}, "\n");
++ debug(1, "Running updateDSInstance stage $stage update ", $upd->{path}, "\n");
+ @localerrs = &{$upd->{$stage}}($inf, $inst, $dseldif, $conn);
+ } elsif ($upd->{file}) {
+- debug(1, "Running stage $stage update ", $upd->{path}, "\n");
++ debug(1, "Running updateDSInstance stage $stage update ", $upd->{path}, "\n");
+ @localerrs = processUpdate($upd, $inf, $configdir, $stage,
+ $inst, $dseldif, $conn);
+ }
+diff --git a/ldap/admin/src/scripts/setup-ds.res.in b/ldap/admin/src/scripts/setup-ds.res.in
+index 7134e25..fa37567 100644
+--- a/ldap/admin/src/scripts/setup-ds.res.in
++++ b/ldap/admin/src/scripts/setup-ds.res.in
+@@ -116,6 +116,7 @@ error_creating_file = Could not create file '%s'. Error: %s\n
+ error_copying_file = Could not copy file '%s' to '%s'. Error: %s\n
+ error_enabling_feature = Could not enable the directory server feature '%s'. Error: %s\n
+ error_importing_ldif = Could not import LDIF file '%s'. Error: %s. Output: %s\n
++error_invalid_boolean = Could not convert value '%s' to boolean. Valid values are true or false.\n
+ error_starting_server = Could not start the directory server using command '%s'. The last line from the error log was '%s'. Error: %s\n
+ error_stopping_server = Could not stop the directory server '%s'. Error: %s\n
+ error_missing_userid = The SuiteSpotUserID is missing. This must be set to valid user\n
+--
+2.4.3
+
diff --git a/net-nds/389-ds-base/files/389-ds-snmp.initd b/net-nds/389-ds-base/files/389-ds-snmp.initd
new file mode 100644
index 000000000000..94df1580d76b
--- /dev/null
+++ b/net-nds/389-ds-base/files/389-ds-snmp.initd
@@ -0,0 +1,44 @@
+#!/sbin/openrc-run
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+PIDFILE="/var/run/ldap-agent.pid"
+CONFIGFILE="/etc/dirsrv/config/ldap-agent.conf"
+
+# instance support in progress
+
+depend() {
+ need net
+ use logger snmpd
+}
+
+start() {
+ ebegin "Starting 389 Directory Server ldap-snmp agent"
+ start-stop-daemon --start --quiet -b \
+ --pidfile ${PIDFILE} --exec /usr/sbin/ldap-agent -- ${CONFIGFILE}
+ eend ${?}
+ if [ "${?}" != "0" ]; then
+ local entries=/etc/dirsrv/slapd-*
+ if [ -n "${entries}" ]; then
+ ewarn "Please make sure that ${CONFIGFILE} contains at least"
+ ewarn "one of the following entries:"
+ for entry in ${entries}; do
+ entry=$(basename ${entry})
+ ewarn "server ${entry}"
+ done
+ fi
+ fi
+}
+
+stop() {
+ ebegin "Stopping 389 Directory Server ldap-snmp agent"
+ start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
+ eend ${?}
+
+}
+
+restart() {
+ svc_stop
+ sleep 2
+ svc_start
+}
diff --git a/net-nds/389-ds-base/files/389-ds.initd-r1 b/net-nds/389-ds-base/files/389-ds.initd-r1
new file mode 100644
index 000000000000..bc9e6e1bb3a7
--- /dev/null
+++ b/net-nds/389-ds-base/files/389-ds.initd-r1
@@ -0,0 +1,90 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+DIRSRV_EXEC="/usr/sbin/ns-slapd"
+PID_DIRECTORY="/var/run/dirsrv"
+LOCK_DIRECTORY="/var/lock/dirsrv"
+DIRSRV_CONF_DIR="/etc/dirsrv"
+DS_INSTANCES=${DIRSRV_CONF_DIR}/slapd-*
+F389DS_INSTANCES=""
+
+depend() {
+ need net logger
+ use dns
+ provide dirsvr ldap
+}
+
+checkconfig() {
+ if [ -z "${DS_INSTANCES}" ]; then
+ eerror "389 Directory Server has not been configured."
+ eend 1
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ for instance in ${DS_INSTANCES}; do
+ instance=$(basename ${instance})
+ # skip .removed instances, bug #338133
+ if [ "${instance%%.removed}" != "${instance}" ]; then
+ continue
+ fi
+ # Create the required directories in case they got nuked
+ mkdir -p ${PID_DIRECTORY}
+ mkdir -p ${LOCK_DIRECTORY}/${instance}
+ # This will probably break one day, we should be pulling out the suitespotuser from dse.ldif
+ chown dirsrv: ${PID_DIRECTORY}
+ chown dirsrv: ${LOCK_DIRECTORY}/${instance}
+ ebegin "Starting 389 Directory Server: instance ${instance}"
+ start-stop-daemon --start --quiet -m \
+ --pidfile ${PID_DIRECTORY}/${instance}.startpid \
+ --exec ${DIRSRV_EXEC} -- -D ${DIRSRV_CONF_DIR}/${instance} \
+ -i ${PID_DIRECTORY}/${instance}.pid \
+ -w ${PID_DIRECTORY}/${instance}.startpid
+ sts=${?}
+ eend ${sts}
+ if [ "${sts}" != "0" ]; then
+ return 1
+ fi
+ done
+}
+
+
+
+stop() {
+ checkconfig || return 1
+
+ for instance in ${DS_INSTANCES}; do
+ instance=$(basename ${instance})
+ if [ "${instance%%.removed}" != "${instance}" ]; then
+ continue
+ fi
+ ebegin "Stopping 389 Directory Server: instance ${instance}"
+ start-stop-daemon --stop --quiet \
+ --pidfile ${PID_DIRECTORY}/${instance}.pid \
+ --exec ${DIRSRV_EXEC}
+ eend ${?}
+ done
+}
+
+status() {
+ for instance in ${DS_INSTANCES}; do
+ instance=$(basename ${instance})
+ if [ "${instance%%.removed}" != "${instance}" ]; then
+ continue
+ fi
+ if [ -e ${PID_DIRECTORY}/${instance}.pid ]; then
+ pid=$(cat ${PID_DIRECTORY}/${instance}.pid)
+ if [ $(echo "$pid" | grep -c $pid) -ge 1 ]; then
+ einfo "389 Directory Server: instance ${instance} (pid $pid) running."
+ else
+ ewarn "389 Directory Server: instance ${instance} (pid $pid) NOT running."
+ fi
+ else
+ eerror "389 Directory Server: instance ${instance} is NOT running."
+ fi
+ done
+}
diff --git a/net-nds/389-ds-base/metadata.xml b/net-nds/389-ds-base/metadata.xml
new file mode 100644
index 000000000000..fc1547d4a917
--- /dev/null
+++ b/net-nds/389-ds-base/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>wibrown@redhat.com</email>
+ <name>William Brown</name>
+ <description>Part of the 389-ds core team</description>
+ </maintainer>
+ <maintainer type="person">
+ <email>wes@sol1.com.au</email>
+ <name>Wes</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+<longdescription>The enterprise-class Open Source LDAP server for Linux</longdescription>
+<use>
+ <flag name="pam-passthru">Enable pam-passthru plugin - for simple and fast system services used in ldap</flag>
+ <flag name="dna">Enable dna (distributed numeric assignment ) plugin - to
+ automatically assign unique uid numbers to new user entries as they are created.</flag>
+ <flag name="presence">Enable presence plugin - non-standard syntax
+ validation</flag>
+ <flag name="bitwise">Enable bitwise plugin - supported data in raw/bitwise
+ format</flag>
+ <flag name="autobind">Enable auto bind over unix domain socket (LDAPI)
+ support</flag>
+ <flag name="auto-dn-suffix">Enable auto bind with auto dn suffix over unix
+ domain socket (LDAPI) support</flag>
+ <flag name="ldapi">Enable LDAP over unix domain socket (LDAPI) support</flag>
+</use>
+</pkgmetadata>
diff --git a/net-nds/adtool/Manifest b/net-nds/adtool/Manifest
new file mode 100644
index 000000000000..91d185afbb1c
--- /dev/null
+++ b/net-nds/adtool/Manifest
@@ -0,0 +1,6 @@
+AUX adtool-1.3.3-bfr-overflow.patch 587 SHA256 1032fd84b90c8cf7e8a5de4e684e22c7e50015eb21576d2fc528c8601bd9c3e0 SHA512 4ac3772f261f5a6e57a982d3985830083b227b87246bdc0909e5c75d47eee3cf62572b1de67b296368124e5007181988466832ff2333dcf74dcfae54e2db0ad4 WHIRLPOOL d9eb000e4e3fa7dc880e8e01e6cbb912b130c6569adb3059a7f33ab3b2c24dcf7fed522e1fcafa2f96355e8aff2486785339ef7713d57f8985bd63b4ac99c0c0
+DIST adtool-1.3.3.tar.gz 334767 SHA256 9658ed2a4869304a094b0dc73d994940271f7ff64e481093893bf25c95bc95ab SHA512 800a9fd19481b2c986991c27674e24b40bd6f4d58d7cbcf94532acb88f6c36de1f18d4165d6a2dcffd7d5baeac86aaf6f0ff1ef1b46d93ffc28b826b3d857251 WHIRLPOOL f5d36bf4cd62abfe2488b27b9cc08d439d199d3b9e81693c517334ef9937de362f235c9d0c1604bbcc08c54d223de24282ef508d7e615f47be3f3508e1ae1e59
+EBUILD adtool-1.3.3.ebuild 696 SHA256 1898b9f24a22e5ea29aa81378bd008aae2ad7b6b07278a53cd2acf04c52357fb SHA512 c15688f889335192328cabd2b3c384601ad90abb6951879abfd363d6d9f4e9b8728b852fe24ec46e265ab810d25ac362fa10be3ee5f6394b21fc9f39892b338f WHIRLPOOL 4a036b6b1c413277a366f81aba9ce1010c0122197bf494375608780018bcdfbb439b6ae68db91a98223dbda0f165ef16c17af725a591c6471feddbdfdea3aed0
+MISC ChangeLog 2558 SHA256 bb5091626c3b50f2106142b727bb3d4f7cd005ffe2b553423fb865d78466b1de SHA512 f391fb2311e1c996ab96c3060df7b4b67f05bd3b0f58c21399342eab0b12e4398e67f7a554bb3162d033cb70c648aaa7b9ccc754d6aff5f42b58ac2fe0c8fead WHIRLPOOL da75a4a84f82367a8e7ab997ffa0d2e0d95e0e33aa4aa3c1da645ba7de9a979b715ef194889715e333660118b389211aeb17ae03f298bb6349b5f83e5e6ec1d9
+MISC ChangeLog-2015 2732 SHA256 f838867da26de2cac3f2994f11e045912f8365bc0e74fcb455d87b1f2b5e46a1 SHA512 41e51ad0af8004d4c42a361a9bd47d768b01705863c783546a2d6e59d498a9c70d70a176b659e2c996933509c38350bfb20cd9adcf67ff89625336e93ada7b2e WHIRLPOOL 8d2044a213eb66a2efaba840ca2901575914b174b539f18cfffb2785fa804ad3a84d5be44964dea6061a4eee88d04b76a2854bdb85b122dbc8dce14d0deeaa85
+MISC metadata.xml 316 SHA256 e5ed1d0193c1b95816faf6d25dba98b7e1d45800a45ebf1c9249d10822f36e1a SHA512 f4998caf1492df78f9bc82c7fcf2661046f8d61dfc70bbaa36652accfe367b3af13ff10922841beb6e6dbd69018ae3be82a4f3346e77ed4070ff40d2137c07a6 WHIRLPOOL 6718881987e00e5eb9b550932fb9b5e33b77aa456599d7eced3bc8f1b08a920285c495f54529f6ed6a8d08a03d0a462e9744edc8acdf6e2103ab7b75005dfac3
diff --git a/net-nds/adtool/adtool-1.3.3.ebuild b/net-nds/adtool/adtool-1.3.3.ebuild
new file mode 100644
index 000000000000..851fdd24deb0
--- /dev/null
+++ b/net-nds/adtool/adtool-1.3.3.ebuild
@@ -0,0 +1,33 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+DESCRIPTION="Utility for Active Directory administration"
+HOMEPAGE="http://gp2x.org/adtool/"
+SRC_URI="http://gp2x.org/adtool/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="ssl"
+
+DEPEND="
+ net-nds/openldap
+ ssl? ( dev-libs/openssl )"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}"/${P}-bfr-overflow.patch )
+
+src_prepare() {
+ # automake-1.13
+ mv configure.{in,ac} || die
+ sed \
+ -e '/libactive_directory.a/s:@top_srcdir@:@top_builddir@:' \
+ -i src/tools/Makefile.am || die
+ autotools-utils_src_prepare
+}
diff --git a/net-nds/adtool/files/adtool-1.3.3-bfr-overflow.patch b/net-nds/adtool/files/adtool-1.3.3-bfr-overflow.patch
new file mode 100644
index 000000000000..f4e7ef0be88b
--- /dev/null
+++ b/net-nds/adtool/files/adtool-1.3.3-bfr-overflow.patch
@@ -0,0 +1,18 @@
+ src/lib/active_directory.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/active_directory.c b/src/lib/active_directory.c
+index 1eacf5f..d4e1ca6 100644
+--- a/src/lib/active_directory.c
++++ b/src/lib/active_directory.c
+@@ -172,8 +172,8 @@ char *dn2domain(char *dn) {
+ exp_dn=ldap_explode_dn(dn, 0);
+ for(i=0; exp_dn[i]!=NULL; i++) {
+ if(!strncasecmp("dc=", exp_dn[i], 3)) {
+- strncat(dc, exp_dn[i]+3, 1024);
+- strncat(dc, ".", 1024);
++ strncat(dc, exp_dn[i]+3, 1024 - 1);
++ strncat(dc, ".", 1024 - 1);
+ }
+ }
+ ldap_value_free(exp_dn);
diff --git a/net-nds/adtool/metadata.xml b/net-nds/adtool/metadata.xml
new file mode 100644
index 000000000000..61c9370d8e01
--- /dev/null
+++ b/net-nds/adtool/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <longdescription>
+adtool is a unix command line utility for Active Directory administration, through ldap repository management.
+</longdescription>
+</pkgmetadata>
diff --git a/net-nds/gosa-core/Manifest b/net-nds/gosa-core/Manifest
new file mode 100644
index 000000000000..682dba2ffa32
--- /dev/null
+++ b/net-nds/gosa-core/Manifest
@@ -0,0 +1,6 @@
+AUX gosa.include 927 SHA256 ff10d8dc524db5ff033b96d73d82ae721a272ecb506b9bd706e64b42c063359f SHA512 69443e74cfb5762bd814b3f0bf8e99d619a023942a97f6616e274bbcb78caf90eb7e56e5a95ad138eebb0c8f8d1eae779af3388f2a8e68d767b8951ee97dade6 WHIRLPOOL f91b9363c16aa5de14bd0f1cfff22517df9eadb1475160c0ed8db17f942c36e2220f1e9cff5a12e0c2345709442c6829a1882aa842b8cb791418b94753b53116
+DIST gosa-core-2.6.12.tar.bz2 2541062 SHA256 dd6cf2bdb32196e6ad68efa4d2400bf6a95b4a7fddf7c11888c60ea8888b8dc0 SHA512 541a7ec780e41cfe025303cb627281e857227aa64cdb831732f527a6221d107cd77f3e55bec7641911fff03836bb9d49ceac45bcacd662020b19497b6aa2ab3d WHIRLPOOL fbaf112d0da47bce1a8fc62d8863e719ece80e8a10e0e1ead3fcce6ac2c8b4c3a0e0fb7b91fd7486e48ee49bad9ba42bd493cd5460a99b520631549239b29476
+EBUILD gosa-core-2.6.12.ebuild 2726 SHA256 1a8eaad88979cd492b4feeb7795f262d6fdeafdb393f4d6641c2ca19f547865a SHA512 9c77c9867924b51e32a581b178a0b9e18113c2f49a0d409fa4dbd7945a596733bff442217ae9eb49a8565637f6b7bc807bb5d03fe563182f4012917e67d0248a WHIRLPOOL 3bf9ad6ef17bcda7b93289e42dd292d97ac220245ab9cdbc97db8fe70af02e1f472493d94a225b3967985afb2bf6a40061835fac8e4ae7f83188af381a1e8a63
+MISC ChangeLog 2715 SHA256 7ec6b2fc37ae5e24d2ec44e0168ddcefc0bfa06fd3325fa2971fad2bd84988a7 SHA512 f4b83fa3c425b318f60a66495a9a269ca10547e05ced7b06260aadff44faa1f98cef4d245f3bc5fbea489172427755a85f6a9624596f6a8e1709016ad8da6121 WHIRLPOOL acb0fb824eb03f5ee0e901bc4ae2c67f13cb51597e389076c092864e9b12fc843c646c9eb432255846b49259569de17a13e485142b1b51e9bcae25726b6f14f3
+MISC ChangeLog-2015 995 SHA256 2dbd3fc50de8f55328dff28356bdfd03c9acb7c07787d3d353b44e5ea957f09f SHA512 5cd710a9043980fb9835191104e0dd67bae33d8340806fc5d9f9c8a7760c3466866d12d366c3bea452e424fb2784ae4ad845295ed2a872ba12b59c5efa99bdd7 WHIRLPOOL 67e012f3c3bbe6aa8e50f274d1a69ea75d5881d55d53ebc666d265479b6541f7fda4ca5ec3da1e28bb90aedc834dff1977b9aa21097ef373334123a2ca73560d
+MISC metadata.xml 488 SHA256 3138161c6f465fc82102ff5df0ad2ae92eaf88b7ad9812ca0674af5ef2c28971 SHA512 04b0efd2cd5fed2c3a7df524176505a2338833ae29fb84e4baae915befa01964bf7fe89f56b80beeb5d540037746e180de034b5191fcc652e702232563f38873 WHIRLPOOL 146882b7258c5e76d111fe702885ca5c17846f8afdd76d702690644d09971cdb5408c84e37f3c0363cfe3da10c3366515a6fdc5452a964927cf1b727fb018def
diff --git a/net-nds/gosa-core/files/gosa.include b/net-nds/gosa-core/files/gosa.include
new file mode 100644
index 000000000000..dcd3434964a4
--- /dev/null
+++ b/net-nds/gosa-core/files/gosa.include
@@ -0,0 +1,36 @@
+Alias /gosa /usr/share/gosa/html
+
+<Directory /usr/share/gosa/html>
+ Options None
+ AllowOverride None
+ Order deny,allow
+ Allow from all
+</Directory>
+
+<IfModule mod_php5.c>
+<Location /gosa>
+ php_admin_flag engine on
+ php_admin_flag register_globals off
+ php_admin_flag allow_call_time_pass_reference off
+ php_admin_flag expose_php off
+ php_admin_flag zend.ze1_compatibility_mode off
+ php_admin_flag register_long_arrays off
+ php_admin_flag magic_quotes_gpc on
+ php_admin_value upload_tmp_dir /var/spool/gosa/
+ php_admin_value session.cookie_lifetime 0
+ include /etc/gosa/gosa.secrets
+</Location>
+</IfModule>
+
+<IfModule mod_fcgid.c>
+ PHP_Fix_Pathinfo_Enable 1
+ <Location /gosa>
+ Options +ExecCGI
+ AddHandler fcgid-script .php
+ FCGIWrapper /var/www/php-fcgi/php-fcgi-starter .php
+ include /etc/gosa/gosa.secrets
+ </Location>
+</IfModule>
+
+
+# vim: ts=4 filetype=apache
diff --git a/net-nds/gosa-core/gosa-core-2.6.12.ebuild b/net-nds/gosa-core/gosa-core-2.6.12.ebuild
new file mode 100644
index 000000000000..20773e8aee57
--- /dev/null
+++ b/net-nds/gosa-core/gosa-core-2.6.12.ebuild
@@ -0,0 +1,107 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="LDAP administration frontend for user administration"
+HOMEPAGE="https://oss.gonicus.de/labs/gosa/wiki/WikiStart."
+SRC_URI="ftp://oss.gonicus.de/pub/gosa/${P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/${P}.tar.bz2
+ ftp://oss.gonicus.de/pub/gosa/archive/${P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/archive/${P}.tar.bz2 "
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="mail samba"
+
+DEPEND="dev-lang/php[iconv,imap,ldap,mysql,session,zip]
+ sys-devel/gettext"
+RDEPEND="${DEPEND}
+ virtual/httpd-php
+ dev-perl/Crypt-SmbHash
+ media-gfx/imagemagick"
+PDEPEND="mail? ( ~net-nds/gosa-plugin-mail-${PV} )
+ samba? ( ~net-nds/gosa-plugin-samba-${PV} )"
+
+src_prepare() {
+ epatch \
+ "${S}/redhat/02_fix_class_mapping.patch" \
+ "${S}/redhat/03_fix_locale_location.patch" \
+ "${S}/redhat/04_fix_online_help_location.patch"
+ sed -i \
+ -e 's|../contrib|/usr/share/gosa/template|' \
+ include/functions.inc || die "sed failed"
+}
+
+src_install() {
+ insinto /usr/share/gosa
+ doins -r doc html ihtml include locale plugins setup
+
+ insinto /usr/share/gosa/template
+ doins contrib/gosa.conf
+
+ dosbin \
+ update-gosa \
+ bin/gosa-encrypt-passwords
+
+ dobin \
+ update-locale \
+ update-online-help \
+ update-pdf-help \
+ dh-make-gosa \
+ contrib/gosa
+
+ insinto /etc/gosa
+ doins \
+ contrib/shells \
+ contrib/encodings \
+ contrib/desktoprc
+ touch "${D}/etc/gosa/gosa.secrets"
+
+ doicon debian/*.xpm
+ domenu debian/gosa-desktop.desktop
+
+ doman *.1 contrib/*.1 contrib/*.5
+
+ dodoc contrib/openldap/slapd.conf
+ insinto /etc/openldap/schema/gosa
+ doins contrib/openldap/*.schema
+
+ insinto /etc/apache2/vhosts.d
+ doins "${FILESDIR}/gosa.include"
+
+ dodoc AUTHORS Changelog FAQ README README.safemode
+
+ keepdir /etc/gosa
+ keepdir /var/spool/gosa
+ keepdir /var/cache/gosa
+}
+
+pkg_prerm() {
+ ebegin "Flushing the class and locale cache"
+ rm -r "${EROOT}"var/cache/gosa/*
+ eend $?
+ ebegin "Clearing the spool directory"
+ rm -r "${EROOT}"var/spool/gosa/*
+ eend $?
+}
+
+pkg_postinst() {
+ ebegin "Generating class cache and locales"
+ "${EROOT}"usr/sbin/update-gosa
+ eend $?
+
+ elog "Please make sure that the web server you are going to use has"
+ elog "read-write access to ${EROOT}var/spool/gosa"
+
+ elog "For Apache there is the gosa.include file in ${EROOT}etc/apache/vhosts.d."
+ elog "You can either use it as a template for your configuration or directly"
+ elog "include it in your apache configuration."
+
+ elog "GOsa requires some objectclasses and attributes to be present in the"
+ elog "directory. A sample configuration for slapd.conf can be found here:"
+ elog " ${EROOR}usr/share/doc/${PF}/slapd.conf[.gz]"
+}
diff --git a/net-nds/gosa-core/metadata.xml b/net-nds/gosa-core/metadata.xml
new file mode 100644
index 000000000000..1af2e776ba98
--- /dev/null
+++ b/net-nds/gosa-core/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+ <use>
+ <flag name="mail">Manage mail accounts and servers with gosa.</flag>
+ <flag name="samba">Manage samba accounts with gosa.</flag>
+ </use>
+ <upstream>
+ <changelog>http://oss.gonicus.de/pub/gosa/Changelog</changelog>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/gosa-plugin-mail/Manifest b/net-nds/gosa-plugin-mail/Manifest
new file mode 100644
index 000000000000..d9812befeeaa
--- /dev/null
+++ b/net-nds/gosa-plugin-mail/Manifest
@@ -0,0 +1,6 @@
+DIST gosa-plugins-mail-2.6.12.tar.bz2 169052 SHA256 526d431ed7f940c78de59e4b9b2bf2fb9e7ae9f3de585ff7f98ee5a4ce3f4a34 SHA512 270acb86cc31e45c3e58be8fc00d4ce86181e25af08a3d66bb21c5a6ae3a0ce62d0a8b18a9380f953934276114e1a7ff34c8fd0900bc6af7930bedd67d33d522 WHIRLPOOL dbe2fb078d501af8b39d91eeadbc68ad0d277b0430d4ee7cb44f9697f285f936ddef1cc22dba49a52fe3ae1c3e296a783dd23188daa0edc7e81c7f55b7b0f6e3
+EBUILD gosa-plugin-mail-2.6.12-r1.ebuild 1169 SHA256 88143b751ff7f46d07380efb73a471d6e5cd04343ef1441e280b81d34afa37a2 SHA512 8575144580bdabffeec7b8cc84cf31285b3dabaaabe5c2a9eb0972ea4ab82cc6e85272a3566b918e2a1f08abad79bbf4fba5cdd5b52ce2b85489690733c43c07 WHIRLPOOL ec60e877a01329c301e5fe9c3a1682b7fdf0a6f20bb8589b0dccc4fcc3a4100945b88990d14a27c1b02072823d05aaf98aac58995572aeb8301af7164b8a17ab
+EBUILD gosa-plugin-mail-2.6.12.ebuild 1200 SHA256 63aaf390fb295bc8c587009b15d9ed8a070ba6cb70d7ead39ccca06efddad544 SHA512 020a135cb869594269b77ec652a52ba32592c785efc517414a15f6d931e4dc813b56704d3b9a27f61567d66ee4f2783ed0578c65c0bd82a95715ab3f7cfa96c3 WHIRLPOOL 3359f343070bb5dee13cbe9773ba0ac852f1a4e07b0703d9a52f81e4f04c056b3962c0abe2a801ddbd40dfe9dc226726ce6f687e77c70089b81f2f4c5b166c4e
+MISC ChangeLog 2430 SHA256 2b22bc956def8ef1f64b5cc60f0856ab048eeb1791074e6b4d083b5f74faa306 SHA512 863552488cceb78424e707c780eb1d17de88012e9c3f8391209318265d489698fcbdf597b02423992cc30f7e8436f81f7f4145389604f8caddb42db8c79e5ea2 WHIRLPOOL 82a127e34d6372b148eaadc956863883ef39b9978ecaa791addb1a66270c9370cdd42782906d9c4b2d680c38c0dda8c95bb56bfa19209530cc2ba45652c45a9a
+MISC ChangeLog-2015 915 SHA256 4aacd72f2401a81f316b535331e2e2b155c166eb9cc09cfd2448123e1fa89f97 SHA512 11701ccbdc293b327aa87c94c3bf0a200e36e228069e32e2e1fc8525fb9c1ad53cd6f5c270db11cd7d95d2c29f7ec756d440ea5e42e974c1ec92f378b7d4ce01 WHIRLPOOL d795cc914095c93a83b6071a95e3fe849e8b82fafb05f7a411d7aa5440c225087b6a19ba7d9cc7e1ba4a09a3ea623a08ff5a14b5134a9192af582add10a947c0
+MISC metadata.xml 350 SHA256 087d745e0b4459bc388bc337850b611b1087c4609abb5f8b7bc3b4d620a47803 SHA512 945a106a79b6b55fc76e31de010a7f9aece9d2443c1fee197f9ad7e9f689a99073739dbf93fcd26689edc004c00fcfe499fb1162b823903ca583dcd97268c2fe WHIRLPOOL 4ee516cd22418eb37923fe0865ff8c62934d51ee80667b01723b66b0dffb8d95b9d5627e0ea976d47bfd446c577a5ee281cfb6a6a0509510c62f434eb9f18dba
diff --git a/net-nds/gosa-plugin-mail/gosa-plugin-mail-2.6.12-r1.ebuild b/net-nds/gosa-plugin-mail/gosa-plugin-mail-2.6.12-r1.ebuild
new file mode 100644
index 000000000000..124cd1a393d8
--- /dev/null
+++ b/net-nds/gosa-plugin-mail/gosa-plugin-mail-2.6.12-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+MY_P="${P/plugin/plugins}"
+
+DESCRIPTION="GOsa plugin for Mail integration"
+HOMEPAGE="https://oss.gonicus.de/labs/gosa/wiki/WikiStart."
+SRC_URI="ftp://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ ftp://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2 "
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="~net-nds/gosa-core-${PV}
+ ~net-nds/gosa-plugin-systems-${PV}"
+
+S="${WORKDIR}/${MY_P}"
+GOSA_COMPONENT="${PN/gosa-plugin-}"
+
+src_install() {
+ insinto /etc/gosa
+ doins -r etc/*
+
+ insinto /usr/share/gosa/html/plugins/${GOSA_COMPONENT}/
+ doins -r html/*
+
+ insinto /usr/share/gosa/locale/plugins/${GOSA_COMPONENT}/
+ doins -r locale/*
+
+ insinto /usr/share/gosa/plugins
+ doins -r addons admin personal
+
+ insinto /usr/share/gosa/doc/plugins/${GOSA_COMPONENT}/
+ doins help/guide.xml
+
+ dodoc -r contrib/*
+ insinto /usr/share/doc/${PF}
+}
+
+pkg_postinst() {
+ ebegin "Updating class cache and locales"
+ "${EROOT}"usr/sbin/update-gosa
+ eend $?
+}
diff --git a/net-nds/gosa-plugin-mail/gosa-plugin-mail-2.6.12.ebuild b/net-nds/gosa-plugin-mail/gosa-plugin-mail-2.6.12.ebuild
new file mode 100644
index 000000000000..5ec32600538d
--- /dev/null
+++ b/net-nds/gosa-plugin-mail/gosa-plugin-mail-2.6.12.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+MY_P="${P/plugin/plugins}"
+
+DESCRIPTION="GOsa plugin for Mail integration"
+HOMEPAGE="https://oss.gonicus.de/labs/gosa/wiki/WikiStart."
+SRC_URI="ftp://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ ftp://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2 "
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="~net-nds/gosa-core-${PV}
+ ~net-nds/gosa-plugin-systems-${PV}"
+
+S="${WORKDIR}/${MY_P}"
+GOSA_COMPONENT="${PN/gosa-plugins-}"
+
+src_install() {
+ insinto /etc/gosa
+ doins -r etc/*
+
+ insinto /usr/share/gosa/html/plugins/${GOSA_COMPONENT}/
+ doins -r html/*
+
+ insinto /usr/share/gosa/locale/plugins/${GOSA_COMPONENT}/
+ doins -r locale/*
+
+ insinto /usr/share/gosa/plugins
+ doins -r addons admin personal
+
+ insinto /usr/share/gosa/doc/plugins/${GOSA_COMPONENT}/
+ doins help/guide.xml
+
+ dodoc contrib/*
+ insinto /usr/share/doc/${PF}
+ doins -r contrib/sieve_vacation
+}
+
+pkg_postinst() {
+ ebegin "Updating class cache and locales"
+ "${EROOT}"usr/sbin/update-gosa
+ eend $?
+}
diff --git a/net-nds/gosa-plugin-mail/metadata.xml b/net-nds/gosa-plugin-mail/metadata.xml
new file mode 100644
index 000000000000..023ca73fdb69
--- /dev/null
+++ b/net-nds/gosa-plugin-mail/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+ <upstream>
+ <changelog>http://oss.gonicus.de/pub/gosa/Changelog</changelog>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/gosa-plugin-samba/Manifest b/net-nds/gosa-plugin-samba/Manifest
new file mode 100644
index 000000000000..1bb9f5b98abc
--- /dev/null
+++ b/net-nds/gosa-plugin-samba/Manifest
@@ -0,0 +1,6 @@
+DIST gosa-plugins-samba-2.6.12.tar.bz2 52284 SHA256 b3e01044e7a719ec6898bf29194f82373ca82d8c36602231e3e80b4b449fb034 SHA512 843ba69d27d421b3a2e3797456c3ecc7d969e42c9f45ff681f11540938b2bac6c16d15f75ade04ff03fa8aa05559f17fe0324e8c03102970c691fcb54a08804f WHIRLPOOL 96d0c1d364f2a38fb27140fbda16da79cfd393991ab38c9586c8ddadb73ec939cba5cd9c5f9f272dbca86dc78fbad008b2da0dfe76a7eb6bd81f0a8be27af9f5
+EBUILD gosa-plugin-samba-2.6.12-r1.ebuild 1089 SHA256 9d7a18ff9087a305ecba96d0ed6a021b8a44aab688e0a32f1e7b544ed46f7f37 SHA512 7af976bf4990766df47b31a7cb80fa5d538e98996bab65e3e08189c4ac8b938859131efeaaab3ffdd7ef5508ffc5648ad8dcd4485cceb33e8e5aeec07057c599 WHIRLPOOL fcc7aaf7be022708a915f08d2d899c6cabe0e41e595d02862208c39e9774f545a5f350338230d59e72d70624623d249cb5c9b8a50d13684d22e9e355b101e6cf
+EBUILD gosa-plugin-samba-2.6.12.ebuild 1090 SHA256 2d0ed28afd4d6cf391e91605e51e1c0426308914383da322c009a43b3ef5139d SHA512 1a13c0d39b079702c0fab8f465b14156d72b71a102fb3eb2ea3edc8ca00a8d6d7b1aaef81359ce362503e02f07223e5d31d3ddd5ae1f9547d095d9ff5fcb227c WHIRLPOOL e273ab9b99ca505ce12b3a7208d62e527f6fc01e7ebbb87bbfa3f2e27e37c1b497f5d5099868dc9431a87467f85bd3a0ae8858fc10b5e2913b329443e4828b59
+MISC ChangeLog 2439 SHA256 8294ddb1b15c71ca7a6b40d7b4fd0d5665509abafe0fd5fa080e917566134878 SHA512 07f4d609a57504ba7c482cf5d35513b43c886290b2aff020baa8232d518ce5d3c039d24344f62e8ee030fd2fe67d54cba5d593d4c70d72f9468b16775dbe7c03 WHIRLPOOL 9c0436dcd7ac8da57c11c84414d05cfdff11f51eed09b49d7cdd31b74d55908b6cc6cf67f87baf8c9c6a33e23a49b6f7cdfd49834aa1758f1a0be9a83d6b1e41
+MISC ChangeLog-2015 1115 SHA256 6a1b15669173e94e379312ebfaa417b768b2251838feb99588fdff413761b380 SHA512 5ae7028cb13ce2472a8b9afd115a51da97046c9f809ea2f8812e153233238c70ce90ed6327fef84082e86da89595896af8db697cf53799f545bd24b431d3b913 WHIRLPOOL d66abb5ababe7c5aef8de71ede1d2c8ebf90b5bd156012aa1dc01c278f798bce8f955d295a3d407ed9530abb70107e1439f0c05bd4957b150e14109cc926e509
+MISC metadata.xml 350 SHA256 087d745e0b4459bc388bc337850b611b1087c4609abb5f8b7bc3b4d620a47803 SHA512 945a106a79b6b55fc76e31de010a7f9aece9d2443c1fee197f9ad7e9f689a99073739dbf93fcd26689edc004c00fcfe499fb1162b823903ca583dcd97268c2fe WHIRLPOOL 4ee516cd22418eb37923fe0865ff8c62934d51ee80667b01723b66b0dffb8d95b9d5627e0ea976d47bfd446c577a5ee281cfb6a6a0509510c62f434eb9f18dba
diff --git a/net-nds/gosa-plugin-samba/gosa-plugin-samba-2.6.12-r1.ebuild b/net-nds/gosa-plugin-samba/gosa-plugin-samba-2.6.12-r1.ebuild
new file mode 100644
index 000000000000..f888dd90226d
--- /dev/null
+++ b/net-nds/gosa-plugin-samba/gosa-plugin-samba-2.6.12-r1.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+MY_P="${P/plugin/plugins}"
+
+DESCRIPTION="GOsa plugin for Samba integration"
+HOMEPAGE="https://oss.gonicus.de/labs/gosa/wiki/WikiStart."
+SRC_URI="ftp://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ ftp://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2 "
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="~net-nds/gosa-core-${PV}
+ ~net-nds/gosa-plugin-systems-${PV}"
+
+S="${WORKDIR}/${MY_P}"
+GOSA_COMPONENT="${PN/gosa-plugin-}"
+
+src_install() {
+ insinto /usr/share/gosa/html/plugins/${GOSA_COMPONENT}/
+ doins -r html/*
+
+ insinto /usr/share/gosa/locale/plugins/${GOSA_COMPONENT}/
+ doins -r locale/*
+
+ insinto /usr/share/gosa/plugins
+ doins -r admin personal
+
+ insinto /usr/share/gosa/doc/plugins/${GOSA_COMPONENT}/
+ doins -r help/*
+
+ dodoc contrib/*
+}
+
+pkg_postinst() {
+ ebegin "Updating class cache and locales"
+ "${EROOT}"usr/sbin/update-gosa
+ eend $?
+}
diff --git a/net-nds/gosa-plugin-samba/gosa-plugin-samba-2.6.12.ebuild b/net-nds/gosa-plugin-samba/gosa-plugin-samba-2.6.12.ebuild
new file mode 100644
index 000000000000..6fd68752dcaf
--- /dev/null
+++ b/net-nds/gosa-plugin-samba/gosa-plugin-samba-2.6.12.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+MY_P="${P/plugin/plugins}"
+
+DESCRIPTION="GOsa plugin for Samba integration"
+HOMEPAGE="https://oss.gonicus.de/labs/gosa/wiki/WikiStart."
+SRC_URI="ftp://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ ftp://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2 "
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="~net-nds/gosa-core-${PV}
+ ~net-nds/gosa-plugin-systems-${PV}"
+
+S="${WORKDIR}/${MY_P}"
+GOSA_COMPONENT="${PN/gosa-plugins-}"
+
+src_install() {
+ insinto /usr/share/gosa/html/plugins/${GOSA_COMPONENT}/
+ doins -r html/*
+
+ insinto /usr/share/gosa/locale/plugins/${GOSA_COMPONENT}/
+ doins -r locale/*
+
+ insinto /usr/share/gosa/plugins
+ doins -r admin personal
+
+ insinto /usr/share/gosa/doc/plugins/${GOSA_COMPONENT}/
+ doins -r help/*
+
+ dodoc contrib/*
+}
+
+pkg_postinst() {
+ ebegin "Updating class cache and locales"
+ "${EROOT}"usr/sbin/update-gosa
+ eend $?
+}
diff --git a/net-nds/gosa-plugin-samba/metadata.xml b/net-nds/gosa-plugin-samba/metadata.xml
new file mode 100644
index 000000000000..023ca73fdb69
--- /dev/null
+++ b/net-nds/gosa-plugin-samba/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+ <upstream>
+ <changelog>http://oss.gonicus.de/pub/gosa/Changelog</changelog>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/gosa-plugin-systems/Manifest b/net-nds/gosa-plugin-systems/Manifest
new file mode 100644
index 000000000000..4c2ef9cfdafe
--- /dev/null
+++ b/net-nds/gosa-plugin-systems/Manifest
@@ -0,0 +1,6 @@
+DIST gosa-plugins-systems-2.6.12.tar.bz2 160384 SHA256 20e7251fb833497c23b5f5ed6f8e66e1e71fded44c9e362d29acc60d3c5c905b SHA512 bfac3e5f7ea75c0df1f23e2a156f49184307026b2917dba34c697b02412c2a8ee1313efe4d8c224098a418be4fbf9e0e558707820fd45fb143ff3b85973f5f8e WHIRLPOOL cd6ddf5d079989e3854bb4624842621ab062c681d45de82185c2ce481adb8e821d4bf1df18b0d32f31018463276e51d85d48d2dc8e19771f5d8d257cfe12ebe8
+EBUILD gosa-plugin-systems-2.6.12-r1.ebuild 1035 SHA256 ed92f4fe9b6e6279629a83ee0e4a56da8ff9a22e22f58dcdbbbba375865012bb SHA512 4bcb682469b00d15ce2bf8e0ba1cab24eeeb0e5d42ea7fd2fa3210aeedb1079023f357a7721241a16e25376f58a8a1c6675a50932881613a8e09282415bcd8c0 WHIRLPOOL 17d82e14abf208ad0bec89600b80e8f37afb04b265f409f634a6baf51660501d2e106c1862c6fff3eec8b84528eb2cef58176d1e7b031e6bb8de16f96d6a93f9
+EBUILD gosa-plugin-systems-2.6.12.ebuild 1036 SHA256 769bf32fc25e9a01b21b5d67d544d1078428b084bb2fd2956637c2ef4e1ea83b SHA512 334ffe4d48d9546a919839d0b26f3bdf2fb1c73768a06b1d1290ea822fd8e7122ed62ed3aedfe1086e4d031e53ea685c3049c00893bbdd3ec7f3b314a91b054c WHIRLPOOL 9f5d6a9a16996aa910674e82f6dec839df94d5169f2ea02110254bd55d3eccffb4ac6537dc964eedb0a3f8a1ba4b738001fbfe96752cf17f428555a26e30acf9
+MISC ChangeLog 2457 SHA256 82811503dba2639e44c93a38aa1ee31974db8cedb00f09ebff0bc1a5303c8f98 SHA512 e9c9f8168e9335354ff025fc423e8e4353e2899f3d28406827ad836d757c94094e026397951fccf50f2b79f505d91ffe14084dbb958d506a6a541e15f0408b27 WHIRLPOOL 24759dd877af021cd27691c881c305861209e3266015b1ad15c3fb5fb5f350991fcb995f0627ec1562486774a7c75e9630cff81006610c8603b4f26d121329c0
+MISC ChangeLog-2015 956 SHA256 56e2fa902ef4584503a399753c8e8a7c7811c0ab30a2912dd3567f25cc6fa731 SHA512 60d946767dd4747b78703cf3a9df4f659c13a84f43ee0113a5e274ceefda6fc4af1dfbec7cd9e304f2d714ae21d789decb3a49261180395242e0ad1fe0595e07 WHIRLPOOL 2ec087997c80c59d17d0b18731c2d4adee9723716f8cbae8a90e293400c6622beff9b96f5dc04b4044a534b4f195e9923ee4038b5b0ca64b97f5b139f1b90566
+MISC metadata.xml 350 SHA256 087d745e0b4459bc388bc337850b611b1087c4609abb5f8b7bc3b4d620a47803 SHA512 945a106a79b6b55fc76e31de010a7f9aece9d2443c1fee197f9ad7e9f689a99073739dbf93fcd26689edc004c00fcfe499fb1162b823903ca583dcd97268c2fe WHIRLPOOL 4ee516cd22418eb37923fe0865ff8c62934d51ee80667b01723b66b0dffb8d95b9d5627e0ea976d47bfd446c577a5ee281cfb6a6a0509510c62f434eb9f18dba
diff --git a/net-nds/gosa-plugin-systems/gosa-plugin-systems-2.6.12-r1.ebuild b/net-nds/gosa-plugin-systems/gosa-plugin-systems-2.6.12-r1.ebuild
new file mode 100644
index 000000000000..bab9961b16de
--- /dev/null
+++ b/net-nds/gosa-plugin-systems/gosa-plugin-systems-2.6.12-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+MY_P="${P/plugin/plugins}"
+
+DESCRIPTION="GOsa plugin for common systems integration"
+HOMEPAGE="https://oss.gonicus.de/labs/gosa/wiki/WikiStart."
+SRC_URI="ftp://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ ftp://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2 "
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="~net-nds/gosa-core-${PV}"
+
+S="${WORKDIR}/${MY_P}"
+GOSA_COMPONENT="${PN/gosa-plugin-}"
+
+src_install() {
+ insinto /usr/share/gosa/html/plugins/${GOSA_COMPONENT}/
+ doins -r html/*
+
+ insinto /usr/share/gosa/locale/plugins/${GOSA_COMPONENT}/
+ doins -r locale/*
+
+ insinto /usr/share/gosa/plugins
+ doins -r admin
+
+ insinto /usr/share/gosa/doc/plugins/${GOSA_COMPONENT}/
+ doins -r help/*
+}
+
+pkg_postinst() {
+ ebegin "Updating class cache and locales"
+ "${EROOT}"usr/sbin/update-gosa
+ eend $?
+}
diff --git a/net-nds/gosa-plugin-systems/gosa-plugin-systems-2.6.12.ebuild b/net-nds/gosa-plugin-systems/gosa-plugin-systems-2.6.12.ebuild
new file mode 100644
index 000000000000..60d670d1bf86
--- /dev/null
+++ b/net-nds/gosa-plugin-systems/gosa-plugin-systems-2.6.12.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+MY_P="${P/plugin/plugins}"
+
+DESCRIPTION="GOsa plugin for common systems integration"
+HOMEPAGE="https://oss.gonicus.de/labs/gosa/wiki/WikiStart."
+SRC_URI="ftp://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/${MY_P}.tar.bz2
+ ftp://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2
+ http://oss.gonicus.de/pub/gosa/archive/${MY_P}.tar.bz2 "
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND="~net-nds/gosa-core-${PV}"
+
+S="${WORKDIR}/${MY_P}"
+GOSA_COMPONENT="${PN/gosa-plugins-}"
+
+src_install() {
+ insinto /usr/share/gosa/html/plugins/${GOSA_COMPONENT}/
+ doins -r html/*
+
+ insinto /usr/share/gosa/locale/plugins/${GOSA_COMPONENT}/
+ doins -r locale/*
+
+ insinto /usr/share/gosa/plugins
+ doins -r admin
+
+ insinto /usr/share/gosa/doc/plugins/${GOSA_COMPONENT}/
+ doins -r help/*
+}
+
+pkg_postinst() {
+ ebegin "Updating class cache and locales"
+ "${EROOT}"usr/sbin/update-gosa
+ eend $?
+}
diff --git a/net-nds/gosa-plugin-systems/metadata.xml b/net-nds/gosa-plugin-systems/metadata.xml
new file mode 100644
index 000000000000..023ca73fdb69
--- /dev/null
+++ b/net-nds/gosa-plugin-systems/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+ </maintainer>
+ <upstream>
+ <changelog>http://oss.gonicus.de/pub/gosa/Changelog</changelog>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/gss-proxy/Manifest b/net-nds/gss-proxy/Manifest
new file mode 100644
index 000000000000..c2f7a8f9f47b
--- /dev/null
+++ b/net-nds/gss-proxy/Manifest
@@ -0,0 +1,9 @@
+AUX gssproxy 279 SHA256 1e0f61503d13e065b71bc53d9fa122c55de8e9018687586cb50fc2981c324cca SHA512 c36d646ee1b7c2e172192782c8d54e51ffb13d75c7afbcd7c67872cfa2baf994a2582bb2b423b27e591051ca2e5b3969dc1f26e7f7a277999537d85e624bcab4 WHIRLPOOL faa77ffee80ecbb22e86cf8195d0256a8f4fee0353b1a6d850ada1ca1a8b5e89e7aa2bdb15137a99f985cfe80065a7b4a575a57f8bfb0ab082855d084dd8ea7d
+DIST gssproxy-0.5.1.tar.gz 532525 SHA256 b7ac0b75dcd62264f9ffef4ab0aa14534b850873ada08209ba467e5914643fbd SHA512 72cb987413feba341b57caa27d5efadb8ed63af3751fda7013fe68768457a88011ac3bcf6e90b3d1d5ecf8894708daa0f20e57fe191d8ba3ce9b6492b57708f7 WHIRLPOOL 514e58fab7ad18707d4edd66aafd8aa1ee4f74e045ac5aa47bef50f55c3a2f7dd297ff4504be3ff1f7709abf9b3fd734d023781c25f76fb6e55e950e85acae4c
+DIST gssproxy-0.6.2.tar.gz 547428 SHA256 ff6e741e6c89436c5de9a06f9a1b7b8223ba72b80d6486f5153f5bf8d093c9d3 SHA512 3c19fbd6e6c8aa2946512f947e016642672a98559b0c47dfb2a4abe2c9dbf06f1bd4f028199cd4828edf00eb0f5d3eac55bda73dcfeb27095e8e9ab14fc88bcd WHIRLPOOL 33396acaee52a025be210f9329e2d4404fb18eada19d46b9a50fe9d6a592384ed9b5539874aad5f55f46d2e8b72439d32bab47d77ee05851aebad0d6003f9c79
+DIST gssproxy-0.7.0.tar.gz 552041 SHA256 c5aeb1c21859752cac1dfd1a1ca4f69fa4c63f2256582a4b10bb72edb6e58f62 SHA512 00cd1d05e12f93f81c11062ccf4950e521960f752a6121f2055e47294a51894eda2415c558d3bc0d4c496146ab8f82a1162328acfb5eb3405c7b116774fa9f89 WHIRLPOOL 048e064423ea07f4bd8ed2798a80656ce0252ca838439ed93668bf7a5b21cab28370a7116e25b4b0a0d2ef8eff0119880db3d430f367ed60f18e4a55066e9764
+EBUILD gss-proxy-0.5.1.ebuild 1498 SHA256 a09af52947694cd05c236a944c47f4b2660fd5dfaac4869ae6f350d64aaeac1d SHA512 d0ee07f70a615b02add596215cc69352d8feb8e36f6237ea15845900fbb13bcbb4df8f53c8cd0fe86f50ef8bef4e30fd7de81b9503c69097b17caf41d8f3da1f WHIRLPOOL 244b0778aa8c3d698782994d8e92b200ea9967ca49c6babb3eef0f5a90c0fd057087f07c25df1f5381c54d5694c208bf9fd2a541beadb4cdc18d0d4969bf7952
+EBUILD gss-proxy-0.6.2.ebuild 1481 SHA256 30b8622406b22ecb5ce791e688c2383d059eaf378b4c08a178198001f6179840 SHA512 ef465a9745413945bcc9947c1e9fe9f760c32603b16f9b34317836b90ec33462202d240fdd3e042066b2245206f6d8dcdd80ffb44f7d4916bdcb83992d269203 WHIRLPOOL 7cb14744b19b87d0fde1ad42cea9f809cafb11e2e960dbd1eb3c65586172f5953dcc6bd83331ad58db4df76ad73e4879938b2375d4c799d71458debfaf1b919a
+EBUILD gss-proxy-0.7.0.ebuild 2745 SHA256 dcb7e39ce232b83b03892601fb421e21ec98d2deffdec2c10dc04af685b4a6a2 SHA512 b511947c47973449e55bdb5d93ebff360f9b0e5c32cbfbf34aa3bcee46807c75700a9e6267f9021607604c3036a62189b4b5441b3b1a013d5a9be8b963b0ffcd WHIRLPOOL 726d8684ffa67afdb96b72fe2a836f36937508aa17f6f06ec5dbd6cf156c612d59c8a179d2c6515b10512e760872a5af0273bbde8564b11257ff0478d31b49bb
+MISC ChangeLog 711 SHA256 b861b2242c92c33433f78033ecb74c4b59fa1f12c7fcc913276bc69167d7a835 SHA512 641b2af9c0d33711c9f41b1aacc8a8b97f8957ab7a4ee315c16c6057e3c4b2661d049ada29bfa73a438b14d6aa6e668fe2bbb1768499fadd5f078b2a8fb305ae WHIRLPOOL 3e53212b10db61aab028ddb58d42ac520c96c449d936cf69b3f877663459d418e610e92ed2c5473606566a5095ad282d3d710ad31701f935f084227339395177
+MISC metadata.xml 220 SHA256 8b7fa3a17e0058bf9e5c6ac8bf9329bfe9a2b0e5718d65b09711f8d421248504 SHA512 c262561324e85dc1fe18ceede654af3ae9f494b36233a807944dbbc7ac9764c93654d1faf958ef4c98c1fb370c71f5073443294289f43ddee0c76e606a703d32 WHIRLPOOL b4814ccae6bee1cea3e03b0df3e4a9e695289cc803bf0ed40166f3ba707ba2fa3a9b7fae0c621ba77c60bc1d729bdf002033072d86af66335b6e9cfef0bd3311
diff --git a/net-nds/gss-proxy/files/gssproxy b/net-nds/gss-proxy/files/gssproxy
new file mode 100755
index 000000000000..8c29f899f2ca
--- /dev/null
+++ b/net-nds/gss-proxy/files/gssproxy
@@ -0,0 +1,15 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+command="gssproxy"
+command_args="-D"
+pidfile="/var/run/gssproxy.pid"
+
+depend() {
+ use logger
+}
+
+start_pre() {
+ checkpath -d -m 0755 /var/lib/gssproxy
+}
diff --git a/net-nds/gss-proxy/gss-proxy-0.5.1.ebuild b/net-nds/gss-proxy/gss-proxy-0.5.1.ebuild
new file mode 100644
index 000000000000..7abf2d67a635
--- /dev/null
+++ b/net-nds/gss-proxy/gss-proxy-0.5.1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_P="${PN/-}-${PV}"
+
+DESCRIPTION="daemon to proxy GSSAPI context establishment and channel handling"
+HOMEPAGE="https://fedorahosted.org/gss-proxy/"
+SRC_URI="https://fedorahosted.org/released/gss-proxy/${MY_P}.tar.gz"
+
+LICENSE="BSD-1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="debug selinux systemd"
+
+RDEPEND=">=dev-libs/libverto-0.2.2
+ >=dev-libs/ding-libs-0.5.0
+ virtual/krb5
+ selinux? ( sys-libs/libselinux )"
+# We need xml stuff to build the man pages, and people really want/need
+# the man pages for this package :). #585200
+DEPEND="${RDEPEND}
+ app-text/docbook-xml-dtd:4.4
+ dev-libs/libxslt
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ # The build assumes localstatedir is /var and takes care of
+ # using all the right subdirs itself.
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-os=gentoo \
+ --with-initscript=$(usex systemd systemd sysv) \
+ $(use_with selinux) \
+ $(use_with debug gssidebug)
+}
+
+src_install() {
+ default
+ # This is a plugin module, so no need for la file.
+ find "${ED}"/usr -name proxymech.la -delete
+
+ doinitd "${FILESDIR}"/gssproxy
+ insinto /etc/gssproxy
+ doins examples/*.conf
+ insinto /etc/gss/mech.d
+ newins examples/mech gssproxy.conf
+
+ # The build installs a bunch of empty dirs, so prune them.
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
diff --git a/net-nds/gss-proxy/gss-proxy-0.6.2.ebuild b/net-nds/gss-proxy/gss-proxy-0.6.2.ebuild
new file mode 100644
index 000000000000..3c1721bf36c4
--- /dev/null
+++ b/net-nds/gss-proxy/gss-proxy-0.6.2.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+MY_P="${PN/-}-${PV}"
+
+DESCRIPTION="daemon to proxy GSSAPI context establishment and channel handling"
+HOMEPAGE="https://pagure.io/gssproxy"
+SRC_URI="http://releases.pagure.org/gssproxy/${MY_P}.tar.gz"
+
+LICENSE="BSD-1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="debug selinux systemd"
+
+RDEPEND=">=dev-libs/libverto-0.2.2
+ >=dev-libs/ding-libs-0.5.0
+ virtual/krb5
+ selinux? ( sys-libs/libselinux )"
+# We need xml stuff to build the man pages, and people really want/need
+# the man pages for this package :). #585200
+DEPEND="${RDEPEND}
+ app-text/docbook-xml-dtd:4.4
+ dev-libs/libxslt
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+src_configure() {
+ # The build assumes localstatedir is /var and takes care of
+ # using all the right subdirs itself.
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-os=gentoo \
+ --with-initscript=$(usex systemd systemd none) \
+ $(use_with selinux) \
+ $(use_with debug gssidebug)
+}
+
+src_install() {
+ default
+ # This is a plugin module, so no need for la file.
+ find "${ED}"/usr -name proxymech.la -delete
+
+ doinitd "${FILESDIR}"/gssproxy
+ insinto /etc/gssproxy
+ doins examples/*.conf
+ insinto /etc/gss/mech.d
+ newins examples/mech gssproxy.conf
+
+ # The build installs a bunch of empty dirs, so prune them.
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
diff --git a/net-nds/gss-proxy/gss-proxy-0.7.0.ebuild b/net-nds/gss-proxy/gss-proxy-0.7.0.ebuild
new file mode 100644
index 000000000000..b91eda6e3747
--- /dev/null
+++ b/net-nds/gss-proxy/gss-proxy-0.7.0.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+MY_P="${PN/-}-${PV}"
+
+DESCRIPTION="daemon to proxy GSSAPI context establishment and channel handling"
+HOMEPAGE="https://pagure.io/gssproxy"
+SRC_URI="http://releases.pagure.org/gssproxy/${MY_P}.tar.gz"
+
+LICENSE="BSD-1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="debug selinux systemd hardened"
+
+RDEPEND=">=dev-libs/libverto-0.2.2
+ >=dev-libs/ding-libs-0.5.0
+ virtual/krb5
+ selinux? ( sys-libs/libselinux )"
+# We need xml stuff to build the man pages, and people really want/need
+# the man pages for this package :). #585200
+DEPEND="${RDEPEND}
+ app-text/docbook-xml-dtd:4.4
+ dev-libs/libxslt
+ virtual/pkgconfig"
+
+S="${WORKDIR}/${MY_P}"
+
+# Many requirements to run tests, including running slapd as root, hence
+# unfeasible.
+RESTRICT="test"
+
+# pkg_setup() {
+# # Here instead of flag-logic in DEPEND, since virtual/krb5 does not
+# # allow to specify the openldap use flag, which heimdal doesn't
+# # support.
+# # Using mit-krb5 explicitly because heimdal doesn't install kerberos
+# # schemata required for the tests of gss-proxy.
+# if use test && ! has_version "app-crypt/mit-krb5[openldap]"; then
+# eerror "Tests of this package require the kerberos schemata installed from app-crypt/mit-krb5[openldap]."
+# die "Tests enabled but no app-crypt/mit-krb5[openldap] being installed."
+# fi
+# }
+
+# Was required in 0.7.0 to fix the schema- and slapd-path. Reason for
+# comment: see RESTRICT comment
+# src_prepare() {
+# default
+# # The tests look for kerberos schemata in the documentation
+# # directory of krb5, however these are installed in /etc/openldap
+# # and only if the openldap useflag is supplied
+# sed -i \
+# -e 's#/usr/share/doc/krb5-server-ldap*#/etc/openldap/schema#' \
+# -e "s#\(subprocess.Popen..\"\)slapd#\1/usr/$(get_libdir)/openldap/slapd#" \
+# "${S}/tests/testlib.py" || die
+# }
+
+src_configure() {
+ local myeconfargs=(
+ # The build assumes localstatedir is /var and takes care of
+ # using all the right subdirs itself.
+ "--localstatedir=${EPREFIX}/var"
+ "--with-os=gentoo"
+ "--with-initscript=$(usex systemd systemd none)"
+ "$(use_with selinux)"
+ "$(use_with debug gssidebug)"
+ "$(use_with hardened hardening)"
+ )
+
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ default
+ # This is a plugin module, so no need for la file.
+ find "${ED%/}"/usr -name proxymech.la -delete
+
+ doinitd "${FILESDIR}"/gssproxy
+ insinto /etc/gssproxy
+ doins examples/*.conf
+ insinto /etc/gss/mech.d
+ newins examples/mech gssproxy.conf
+
+ # The build installs a bunch of empty dirs, so prune them.
+ find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null
+}
diff --git a/net-nds/gss-proxy/metadata.xml b/net-nds/gss-proxy/metadata.xml
new file mode 100644
index 000000000000..aebca33be179
--- /dev/null
+++ b/net-nds/gss-proxy/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/net-nds/jxplorer/Manifest b/net-nds/jxplorer/Manifest
new file mode 100644
index 000000000000..4aaebadb7a4b
--- /dev/null
+++ b/net-nds/jxplorer/Manifest
@@ -0,0 +1,12 @@
+AUX 3.3-disable-jxworkbench.patch 507 SHA256 bdceeda0d3ae4e47fd8fef6525ebc584c796798e5e02d076336ce46a50033e49 SHA512 b89c2b1831de506e437c4094ee0312a06280e5ddf88ba4882a22f9a2e2c8422a28ab7c47ebd75b52c9c303645b46b90b69a0f0d37bd17e1994683b5fa6070a0a WHIRLPOOL a939b311580e796dc8b13a52ca681540acec1e6331707ecfecf796cc85244f6d9153bf8f60d24d4beffb54a8efbff5db7c0145a4ac2ac837f79834329d67519d
+AUX build.xml 1871 SHA256 c1203b1269f3eadbea82fb54e27d75c6a6e89db71d91529ef80b9a1e67762746 SHA512 39434bad8cb85692fe65feb927ba675135e0da5401518f22ff6a17c1edfea950342bde9f7530cd48e603f41547451020aa4e0c96dbbf664548cd812ce777fa00 WHIRLPOOL 9f69f6d2ef3418d60d450cb717eb68902f164b3ca2c7559bf62f84e15cd05d21aee23111aa2bcf113546c4edf781b71c53d271ace55aa3a19ff90f52ece0eb09
+AUX jxplorer-3-pre 663 SHA256 1325841c7b09ce3c76a6a34ed1e87b6856ea6df82db77333814a23d7b036cb34 SHA512 11acb8c28a063825678ec3fe7bafc1cd1d0f99c96d49e62500d06b0584967017efb050c561826ce8b6db8a73da66ea1742f4a361fddc4e17abddad5174106f9f WHIRLPOOL c83f20d79c452f454b768d30cff0771b6e9619627f25ef9df98442985c01d93621ca57f34030f4c8c0a1c294d82bc3d28c92e934497922174d32e7b22a422d35
+DIST jxplorer-3.3.1-project.zip 4500476 SHA256 6e2ac77722a6a03c285a96561f6557fdfb3cd21da764166d7d7aab56560be6aa SHA512 a40bfd8a4c868a1ced1e31d45298916b4371ae781521755d784e4c027781d298f066af5390918b42024022cff5d3f0ab6a79bc6b15a1ff0adcfc1e8b79a67ca9 WHIRLPOOL b55c544daad8ab58075fe0e4ec5eb32d971056e58e1b9492c13e49cee98054cc71da098c2113cd9b431a350602419e2afc58bbe0f3a9860d301e7d6c1889384b
+DIST jxplorer-3.3.1.1-project.zip 4566815 SHA256 193986f80fb475fef37e349d7a7ea792c1bab3412d0bbf222b163e2e867a082f SHA512 aa7c1c976f5987055abeb97aba865e9cdbc657d5baca199ff83c97ac5017c9d48869c8ee6346a7cf07b236b04059043256d0545c7b6cc37d97c81de2f9015d03 WHIRLPOOL c33e5ca2f639f17b91f82dd71e245f810b9c873a74595ce13af951b089815d39c9e9791d0f51a43b96c1c78ad911248fe9e943bf98bb6e5388d1e11b6b6a1b21
+DIST jxplorer-3.3.1.2-project.zip 4625538 SHA256 b4d4fd1dbad2e93f981494ef4ce151bb56723fc5acf83a4fb19173d187db6b9b SHA512 6c95de48b2abd41a4926de3bd9bd203e266676028e12d1f1c93d8ef6f10b233eefcb122c8c075d6758b43c85e30fdc4b01d55811e5fcbdcd64d353c6f0fef94a WHIRLPOOL 5385b32605588a9d3d3245884569e2c56f20c141ee2142999722886e14322ce9885ef0eb1cced2150af6a2426d08fed77e971d8292d74d4ed96d795f2652b404
+EBUILD jxplorer-3.3.1.1.ebuild 1654 SHA256 42baa3bb906b88ee0d1315e48ea417e46f78bb14c1e42b9065e1f46b51271152 SHA512 d217aa74aba29bfe1908fe06dbb1dae47bd0accee369c197646830286a90bc013bbaa93ce51421345989a0d91a1f8e4deafff0b26ddc99046f51ba4abae0d3d1 WHIRLPOOL 2b4e875ebc5945186212d9034ba0113213faa18fd73d8ff9c0d46c1f880956b2537ea9b044b829d1159e3d76631f0876c20af3c7aa915a101092d20c854f4642
+EBUILD jxplorer-3.3.1.2.ebuild 1692 SHA256 a3e6300fcd0550b0d827c864443093df74cdbaa627778c49b16650a2dbfa053e SHA512 663afe60e3fc55a05b7ada7a64916ba568fb77e7ae3f1b7d8196fec91d5dac4ddb52e5205da565cef2f4027a97642a59a4e873e73b06ce2060df7ebe681ab252 WHIRLPOOL e99d277bdba177528e5a0d4fdd0efd633195435e6dd49f2beeb95c23dd3739de30056ca164bc0c5beedec03dc28c918a57a9069eae971a338dbaad03739972b0
+EBUILD jxplorer-3.3.1.ebuild 1652 SHA256 02ccdd3be80794eab03d0df9f99e60af8c2718e45fe0f4ed707e7e351d558b02 SHA512 2d582080b749f8c67b9d3eee3d57716bb4a8d680f38ecaa91f945b344c82acef3a93e9c7476aa7d3f84a32d50eba48b542188f75f1b8d578f87b582ac8442dd0 WHIRLPOOL 0fd381f5a9c73ef4467259daef9d66dae092bbb94ac4bdf9f3eeeb7c715dccef4edf61ad7a1c2ef5f2838bfc2ba6d6d8e3cef0241d723d6bcb7c02b718ec781a
+MISC ChangeLog 3275 SHA256 7177f986e67ea6ea4a1f8ba923f568c8ada4e6ba561cb13495754c3ab4f4650e SHA512 ef666a17920ef3526c56f8d433a58909774f597ddd090afd92cfb39e4d0addc238350ea2621f944e51df9110cbafd0f0906ff87199bd6db596ca4d27ca924551 WHIRLPOOL 2a8d3b08cac933b1ed49850466afe44650d664a2c2aa159b7ff09278da35461e5f951e011036edd672f7bd170cc7b03fcfdaa1bba7b3288652b19c81e5ad5bcb
+MISC ChangeLog-2015 6487 SHA256 c60b65d2240523ee5d482a0d6eb878e2624d97a9224916506049762120e3d991 SHA512 6424abe2d4e480b03ccaf7f10f13adc9d59e7f0acd0eb5eb81f52a87939f34283d04a6976cce46d45197c335555f07c4969ef2913eb6b3029b7c0723926bf294 WHIRLPOOL da60e52b84b47b6e7827060a22db76229f7e861774039127c14958bdd71f545711488cd55850786fcd03f02042d37cb252ee8b3e9f17b8ccc1f695fd57add473
+MISC metadata.xml 314 SHA256 9f67d17e5f10ce60fca01f5ef6c0be2d9a2515fd00363063c656df2fe532efcb SHA512 28b10ef2e247491aac4d9868d8c42ccef74abdc9806820b84a29d479e8f53218e1aab497c3f450c289cacf40ea8fbd193a508203ffc915ad2fb7582258bc7d96 WHIRLPOOL 480241acf5dd46cf13ef1fb42113a7babe1bd750b508c224dbff77f8b681ebc0a70df444485c48748d3e0796511289f9747057401ce57635113e639ac9148cbe
diff --git a/net-nds/jxplorer/files/3.3-disable-jxworkbench.patch b/net-nds/jxplorer/files/3.3-disable-jxworkbench.patch
new file mode 100644
index 000000000000..302b37c0061f
--- /dev/null
+++ b/net-nds/jxplorer/files/3.3-disable-jxworkbench.patch
@@ -0,0 +1,12 @@
+diff -Nru /tmp/jxplorer.orig/src/com/ca/directory/jxplorer/JXplorer.java src/com/ca/directory/jxplorer/JXplorer.java
+--- /tmp/jxplorer.orig/src/com/ca/directory/jxplorer/JXplorer.java 2012-07-31 14:53:59.869914047 +0300
++++ src/com/ca/directory/jxplorer/JXplorer.java 2012-07-31 14:54:47.836311029 +0300
+@@ -502,7 +502,7 @@
+
+ // look for JXWorkBenchBrowser 'add on' module...
+
+- boolean usingJXW = true;
++ boolean usingJXW = false;
+ if (usingJXW)
+ {
+ try
diff --git a/net-nds/jxplorer/files/build.xml b/net-nds/jxplorer/files/build.xml
new file mode 100644
index 000000000000..819f7ed311a0
--- /dev/null
+++ b/net-nds/jxplorer/files/build.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0"?>
+
+<project name="jxplorer" default="jar">
+ <!-- some properties -->
+ <property name="src.dir" value="src" />
+ <property name="build.dir" value="build" />
+ <property name="docs.dir" value="docs" />
+ <property name="lib.dir" value="lib" />
+ <property name="dist.dir" value="dist" />
+ <property name="jarfile" value="${dist.dir}/jxplorer.jar" />
+ <property name="target.jdk" value="1.4" />
+
+ <path id="jxplorer.classpath">
+ <fileset dir="${lib.dir}">
+ <include name="**/*.jar" />
+ </fileset>
+ </path>
+
+ <!-- init -->
+ <target name="init">
+ <mkdir dir="${dist.dir}" />
+ <mkdir dir="${build.dir}" />
+ <mkdir dir="${docs.dir}" />
+ </target>
+
+ <!-- compile everything -->
+ <target name="compile" depends="init">
+ <mkdir dir="${build.dir}" />
+ <javac srcdir="${src.dir}"
+ destdir="${build.dir}"
+ source="${target.jdk}"
+ target="${target.jdk}"
+ classpathref="jxplorer.classpath"/>
+ </target>
+
+ <!-- build the jar file -->
+ <target name="jar" depends="compile">
+ <jar jarfile="${jarfile}" basedir="${build.dir}">
+ <manifest>
+ <attribute name="Main-Class" value="com.ca.directory.jxplorer.JXplorer" />
+ </manifest>
+ </jar>
+ </target>
+
+ <!-- generate javadocs -->
+ <target name="docs" depends="init">
+ <javadoc sourcepath="${src.dir}"
+ packagenames="com.*"
+ destdir="${docs.dir}"
+ author="true"
+ version="true"
+ use="true"
+ windowtitle="${ant.project.name} API" />
+ </target>
+
+ <!-- clean up -->
+ <target name="clean">
+ <delete dir="${build.dir}" />
+ <delete dir="${docs.dir}" />
+ <delete dir="${dist.dir}" />
+ </target>
+
+ <!-- zip the sources -->
+ <target name="sourcezip">
+ <zip destfile="$dist}/${ant.project.name}-src.zip">
+ <zipfileset dir="${src.dir}" />
+ </zip>
+ </target>
+
+</project>
diff --git a/net-nds/jxplorer/files/jxplorer-3-pre b/net-nds/jxplorer/files/jxplorer-3-pre
new file mode 100644
index 000000000000..5fe640c7328a
--- /dev/null
+++ b/net-nds/jxplorer/files/jxplorer-3-pre
@@ -0,0 +1,26 @@
+jxplorer_home=@GENTOO_PORTAGE_EPREFIX@/usr/share/jxplorer/
+
+home="${HOME}/.jxplorer"
+
+if [ ! -d "${home}" ]; then
+ mkdir -v "${home}"
+fi
+
+try_create() {
+ [[ ! -f "${1}" ]] && touch "${1}"
+}
+
+if [ -d ${HOME}/.jxplorer ]; then
+ for file in search_filters.txt bookmarks.txt quicksearch.txt ; do
+ try_create "${home}/${file}"
+ done
+ for file in security.default csvconfig.txt.default ; do
+ [[ ! -e "${home}/${file}" ]] && \
+ ln -vs "${jxplorer_home}/${file}" "${home}/${subdir}"
+ done
+ for subdir in htmldocs icons images templates plugins language ; do
+ [[ ! -e "${home}/${subdir}" ]] && \
+ ln -vs "${jxplorer_home}/${subdir}" "${home}/${subdir}"
+ done
+fi
+
diff --git a/net-nds/jxplorer/jxplorer-3.3.1.1.ebuild b/net-nds/jxplorer/jxplorer-3.3.1.1.ebuild
new file mode 100644
index 000000000000..bbbcea98f709
--- /dev/null
+++ b/net-nds/jxplorer/jxplorer-3.3.1.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit java-pkg-2 java-ant-2 prefix virtualx
+
+DESCRIPTION="A fully functional ldap browser written in java"
+HOMEPAGE="http://jxplorer.org/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${PV}-project.zip"
+LICENSE="CAOSL"
+
+IUSE=""
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+RDEPEND=">=virtual/jre-1.5
+ >=dev-java/javahelp-2.0.02_p46:0"
+DEPEND=">=virtual/jdk-1.5
+ test? ( dev-java/junit:0 )
+ ${RDEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_GENTOO_CLASSPATH="javahelp"
+EANT_TEST_ANT_TASKS="ant-junit"
+
+src_prepare() {
+ rm -v jars/*.jar || die
+ sed -i -e 's/<fileset dir="${jasper}.*//g' "${S}/build.xml" || die
+
+ epatch "${FILESDIR}"/3.3-disable-jxworkbench.patch
+
+ if use test ; then
+ EANT_GENTOO_CLASSPATH_EXTRA=$(java-pkg_getjars --build-only junit)
+ else
+ find . -iname '*Test*.java' -delete || die
+ fi
+}
+
+src_test(){
+ VIRTUALX_COMMAND="java-pkg-2_src_test" virtualmake
+}
+
+src_install() {
+ java-pkg_dojar jars/${PN}.jar
+
+ insinto /usr/share/${PN}
+ doins -r icons images htmldocs language templates plugins security.default csvconfig.txt.default
+
+ dodoc README*.TXT || die
+
+ # By default the config dir is ${HOME}/jxplorer
+ java-pkg_dolauncher ${PN} \
+ --main com.ca.directory.jxplorer.JXplorer \
+ --pwd '"${HOME}/.jxplorer"' \
+ -pre "${FILESDIR}/${PN}-3-pre"
+
+ eprefixify "${ED}/usr/bin/${PN}"
+
+ use source && java-pkg_dosrc src/com
+ use doc && java-pkg_dojavadoc docs/api
+
+ make_desktop_entry ${PN} JXplorer /usr/share/jxplorer/images/logo_32_trans.gif System
+}
diff --git a/net-nds/jxplorer/jxplorer-3.3.1.2.ebuild b/net-nds/jxplorer/jxplorer-3.3.1.2.ebuild
new file mode 100644
index 000000000000..24b83acf99b6
--- /dev/null
+++ b/net-nds/jxplorer/jxplorer-3.3.1.2.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit java-pkg-2 java-ant-2 prefix virtualx
+
+DESCRIPTION="A fully functional ldap browser written in Java"
+HOMEPAGE="http://jxplorer.org/"
+SRC_URI="mirror://sourceforge/${PN}/${P}-project.zip"
+LICENSE="CAOSL"
+
+IUSE=""
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+RESTRICT="test"
+
+CDEPEND="
+ >=dev-java/javahelp-2.0.02_p46:0"
+
+RDEPEND="
+ ${CDEPEND}
+ >=virtual/jre-1.5"
+
+DEPEND="
+ ${CDEPEND}
+ >=virtual/jdk-1.5
+ test? ( dev-java/junit:0 )"
+
+S="${WORKDIR}/${PN}"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_GENTOO_CLASSPATH="javahelp"
+EANT_TEST_ANT_TASKS="ant-junit"
+
+src_prepare() {
+ epatch "${FILESDIR}"/3.3-disable-jxworkbench.patch
+
+ rm -v jars/*.jar || die
+ sed -i -e 's/<fileset dir="${jasper}.*//g' "${S}/build.xml" || die
+
+ if use test; then
+ EANT_GENTOO_CLASSPATH_EXTRA=$(java-pkg_getjars --build-only junit)
+ else
+ find . -iname '*Test*.java' -delete || die
+ fi
+}
+
+src_test() {
+ VIRTUALX_COMMAND="java-pkg-2_src_test" virtualmake
+}
+
+src_install() {
+ java-pkg_dojar jars/${PN}.jar
+
+ insinto /usr/share/${PN}
+ doins -r icons images htmldocs language templates plugins security.default csvconfig.txt.default
+
+ dodoc README*.TXT || die
+
+ # By default the config dir is ${HOME}/jxplorer
+ java-pkg_dolauncher ${PN} \
+ --main com.ca.directory.jxplorer.JXplorer \
+ --pwd '"${HOME}/.jxplorer"' \
+ -pre "${FILESDIR}/${PN}-3-pre"
+
+ eprefixify "${ED}/usr/bin/${PN}"
+
+ use source && java-pkg_dosrc src/com
+ use doc && java-pkg_dojavadoc docs/api
+
+ make_desktop_entry ${PN} JXplorer /usr/share/jxplorer/images/logo_32_trans.gif System
+}
diff --git a/net-nds/jxplorer/jxplorer-3.3.1.ebuild b/net-nds/jxplorer/jxplorer-3.3.1.ebuild
new file mode 100644
index 000000000000..4ad7b4dfb867
--- /dev/null
+++ b/net-nds/jxplorer/jxplorer-3.3.1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+JAVA_PKG_IUSE="doc source test"
+
+inherit java-pkg-2 java-ant-2 prefix virtualx
+
+DESCRIPTION="A fully functional ldap browser written in java"
+HOMEPAGE="http://jxplorer.org/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}-${PV}-project.zip"
+LICENSE="CAOSL"
+
+IUSE=""
+SLOT="0"
+KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux"
+
+RDEPEND=">=virtual/jre-1.5
+ >=dev-java/javahelp-2.0.02_p46:0"
+DEPEND=">=virtual/jdk-1.5
+ test? ( dev-java/junit:0 )
+ ${RDEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+JAVA_ANT_REWRITE_CLASSPATH="yes"
+EANT_GENTOO_CLASSPATH="javahelp"
+EANT_TEST_ANT_TASKS="ant-junit"
+
+src_prepare() {
+ rm -v jars/*.jar || die
+ sed -i -e 's/<fileset dir="${jasper}.*//g' "${S}/build.xml" || die
+
+ epatch "${FILESDIR}"/3.3-disable-jxworkbench.patch
+
+ if use test ; then
+ EANT_GENTOO_CLASSPATH_EXTRA=$(java-pkg_getjars --build-only junit)
+ else
+ find . -iname '*Test*.java' -delete || die
+ fi
+}
+
+src_test(){
+ VIRTUALX_COMMAND="java-pkg-2_src_test" virtualmake
+}
+
+src_install() {
+ java-pkg_dojar jars/${PN}.jar
+
+ insinto /usr/share/${PN}
+ doins -r icons images htmldocs language templates plugins security.default csvconfig.txt.default
+
+ dodoc README*.TXT || die
+
+ # By default the config dir is ${HOME}/jxplorer
+ java-pkg_dolauncher ${PN} \
+ --main com.ca.directory.jxplorer.JXplorer \
+ --pwd '"${HOME}/.jxplorer"' \
+ -pre "${FILESDIR}/${PN}-3-pre"
+
+ eprefixify "${ED}/usr/bin/${PN}"
+
+ use source && java-pkg_dosrc src/com
+ use doc && java-pkg_dojavadoc docs/api
+
+ make_desktop_entry ${PN} JXplorer /usr/share/jxplorer/images/logo_32_trans.gif System
+}
diff --git a/net-nds/jxplorer/metadata.xml b/net-nds/jxplorer/metadata.xml
new file mode 100644
index 000000000000..47977bec6070
--- /dev/null
+++ b/net-nds/jxplorer/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">jxplorer</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/ldapvi/Manifest b/net-nds/ldapvi/Manifest
new file mode 100644
index 000000000000..d5003cd2a79c
--- /dev/null
+++ b/net-nds/ldapvi/Manifest
@@ -0,0 +1,9 @@
+AUX ldapvi-1.7+glibc-2.10.patch 1251 SHA256 512395cea5828a2532c7db4bc369354640482e9cb8fb8b6edec39c2e8b2673f6 SHA512 f69acbdccff7804d1c7ec216bf9f37b09b0077005aea8f8b1e36c1bfd3b29833fd2bb85f83d55fd8031d37d7dd52f373f1e351dd7ea68338ca5cee9f2f419e45 WHIRLPOOL ee55a7f34bcd9b768098c3c2cb960980b3533e99ca7e7bfbd0f190724d6b14d66eb824c3444348bc8531238287fe7fa9b7f556322c82de8e0fe94674374f3be7
+AUX ldapvi-1.7-vim-encoding.patch 396 SHA256 0a08d97ec43b85dab7c0076807880aeeaf74d6fce17b2c060148c409c3a48ee0 SHA512 30c5e36a747f9dfb2b6ccf73a9094f6485c6507436906a5b52b2b685f0ae9e72d16e351e4466cd5f445bb308627bd3255f7b0c29b6daa0bc4bb545091b345a12 WHIRLPOOL 84b2c24574c5c5d4ef610fb9fabef57e8d5103cd454decff667a8e3fc8cddb27eaa21ef47f2ae4a30f3dc367a06515f8a1874c9f54ed0ebc33edffaabf0679fc
+DIST ldapvi-1.7.tar.gz 119503 SHA256 6f62e92d20ff2ac0d06125024a914b8622e5b8a0a0c2d390bf3e7990cbd2e153 SHA512 4b38cee0763aa33703afbd5e358a458b1468abf58e43ea885879b2117bc1c0bbc375d91c6a43467ec08035b8b3b7dd4b024f2937c37741c7a5513ea9192aed36 WHIRLPOOL 136b7c21e2438b294d9d7504827f76a18138caa1c71dad6858cf59c2399243da57886792934ebb3e559697490228e89da5a769aa84cd054b95abafbd179527b9
+DIST ldapvi-1.7_p20101214.tar.bz2 1490491 SHA256 a8b805bf29753dd7f758b8f564a40584e930a63549bc0e466db13c828f6be91b SHA512 2d2a744a36364793f406f37ecf6e546914d697457dec37b81544f4979f4c692756b2a1c3ea6fcbaba5e3238b2bf758ab3e0bd9a9a0794c4da734d65286bd5925 WHIRLPOOL 5cd89780b11306f7822f49357e799df8940a1e3417dd0252697dd1be87ce3e2956c344fd5a76169966e4ba35b11981c7c17c503201182c3ef08db84dddde7029
+EBUILD ldapvi-1.7-r1.ebuild 834 SHA256 28e510a503e3ad597c3cb54f8fa1d27195a469424a14ae74ec0ced36e2aedc7f SHA512 106641b5cdb1fa7b274010322b3a1c0941153b9fe9cb828bc9bd4ca233cb80871c7b5f6de6cb1733fe45c85df77850735b469cd5ddf563408549afb86630d6ad WHIRLPOOL ca8719cfbd28f663654f01f585bf01353ac104f1b68e9cf832b56c937e736d10e2f3ea44c9d5679faa27221e2e7c8adcaa4b56777f0d9c740ba198a828f40e27
+EBUILD ldapvi-1.7_p20101214.ebuild 934 SHA256 2590025deb154142dc3354bcc59806cd6a0c3ef36723c7cb112798b50b6b9fb3 SHA512 189c8473cc573b92df128afc3a1dea8fa08841a93a1e9a0635e7db14d46eb023b1c987e6604896cc4ce213d38a76b33fcb822f829f91b31c5202711ca6617076 WHIRLPOOL 02281e87f2d2733be6d9165d3b8877643aee2630673c887b8ffc862bec4915bd7812060eb7e12a4330a0d28d8d266cec8c6407c79a160b3c84056f1a571c4de5
+MISC ChangeLog 2590 SHA256 6011c324533412357fc00226e66b81ebc617b1fc1673a262c520affe6b2e6199 SHA512 45707e8b062a5ed92a47e007fad85537438785005c85774a2e4e05dfbeb23807e7874c035137c367e38a6d88abcdff04f7101ef18e0eeef390b05ab22d98338f WHIRLPOOL 198f7bad0066d93c8e07bb8d1d12a49c0b281f485905a76d404898dc11462d322d4aa142c1c79e53f1933249b7389665d4ef6103f8966aee767696081c432750
+MISC ChangeLog-2015 415 SHA256 a77fac9b2e812e37cff5e1ba11112809e1c0f39d60c9c82db2d53d24cd7435b1 SHA512 46a39d7eb7b39b70fd623d5ed054c056b5d2b35f21dcb6a37e00a88bcb1ff6508775c0c99e6e27ab10d3824434c78ab2332216f49897e2c20d4e4c1ae8b8096f WHIRLPOOL 2906c5bf692491d3070a6f9971b628cd5b5441cc227dbf37fac6eb272bf7fb5d7a87e259bfe5a9eaa2e995a66f7b4332eb5ab8bc9d9216ce182d4f086c9a1e05
+MISC metadata.xml 474 SHA256 123c1f1d3d2964eeec28b8e6afd92fca152d6d5653ac541fd93508b4edc94526 SHA512 840afe9dd11eeda2b3d29387b2043c6973deaad32ffd8f70ccde46eae0dbd1d09a179a6e29cb61e60a0c9ae0bfb13b96298be4cac02a97f444550fadcc34ea9c WHIRLPOOL 98d212e00dd24be97904e222db0662cf04215a76222e4c55bfd5dfa836491cb64d0dfd7dd7da8f3daf440c9d937aa6d02dd27d0f21be812b4ce6ad2f9cd44292
diff --git a/net-nds/ldapvi/files/ldapvi-1.7+glibc-2.10.patch b/net-nds/ldapvi/files/ldapvi-1.7+glibc-2.10.patch
new file mode 100644
index 000000000000..df2a20c71245
--- /dev/null
+++ b/net-nds/ldapvi/files/ldapvi-1.7+glibc-2.10.patch
@@ -0,0 +1,39 @@
+Index: ldapvi-1.7/common.h
+===================================================================
+--- ldapvi-1.7.orig/common.h
++++ ldapvi-1.7/common.h
+@@ -273,7 +273,7 @@ void pipeview_wait(int pid);
+ char *home_filename(char *name);
+ void read_ldapvi_history(void);
+ void write_ldapvi_history(void);
+-char *getline(char *prompt, char *value);
++char *ldapvi_getline(char *prompt, char *value);
+ char *get_password();
+ char *append(char *a, char *b);
+ void *xalloc(size_t size);
+Index: ldapvi-1.7/ldapvi.c
+===================================================================
+--- ldapvi-1.7.orig/ldapvi.c
++++ ldapvi-1.7/ldapvi.c
+@@ -470,7 +470,7 @@ change_mechanism(bind_options *bo)
+ bo->authmethod = LDAP_AUTH_SASL;
+ puts("Switching to SASL authentication.");
+ }
+- bo->sasl_mech = getline("SASL mechanism", bo->sasl_mech);
++ bo->sasl_mech = ldapvi_getline("SASL mechanism", bo->sasl_mech);
+ }
+
+ static int
+Index: ldapvi-1.7/misc.c
+===================================================================
+--- ldapvi-1.7.orig/misc.c
++++ ldapvi-1.7/misc.c
+@@ -315,7 +315,7 @@ write_ldapvi_history()
+ }
+
+ char *
+-getline(char *prompt, char *value)
++ldapvi_getline(char *prompt, char *value)
+ {
+ tdialog d;
+ init_dialog(&d, DIALOG_DEFAULT, prompt, value);
diff --git a/net-nds/ldapvi/files/ldapvi-1.7-vim-encoding.patch b/net-nds/ldapvi/files/ldapvi-1.7-vim-encoding.patch
new file mode 100644
index 000000000000..d9431bed2de1
--- /dev/null
+++ b/net-nds/ldapvi/files/ldapvi-1.7-vim-encoding.patch
@@ -0,0 +1,13 @@
+From https://bugzilla.redhat.com/show_bug.cgi?id=691958
+
+--- ldapvi-1.7/ldapvi.c
++++ ldapvi-1.7/ldapvi.c
+@@ -1414,7 +1414,7 @@ write_file_header(FILE *s, cmdline *cmdline)
+ int nlines = 0;
+
+ if (print_binary_mode == PRINT_UTF8 && !cmdline->ldif) {
+- fputs("# -*- coding: utf-8 -*- vim:encoding=utf-8:\n", s);
++ fputs("# -*- coding: utf-8 -*- \n", s);
+ nlines++;
+ }
+ if (cmdline->ldif) {
diff --git a/net-nds/ldapvi/ldapvi-1.7-r1.ebuild b/net-nds/ldapvi/ldapvi-1.7-r1.ebuild
new file mode 100644
index 000000000000..0aebcb276659
--- /dev/null
+++ b/net-nds/ldapvi/ldapvi-1.7-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=2
+
+inherit eutils
+
+DESCRIPTION="Manage LDAP entries with a text editor"
+HOMEPAGE="http://www.lichteblau.com/ldapvi/"
+SRC_URI="http://www.lichteblau.com/download/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 hppa ppc ~sparc x86"
+IUSE="ssl"
+
+RDEPEND="sys-libs/ncurses
+ >=net-nds/openldap-2.2
+ dev-libs/popt
+ >=dev-libs/glib-2
+ sys-libs/readline
+ ssl? ( dev-libs/openssl )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}+glibc-2.10.patch"
+ epatch "${FILESDIR}/${P}-vim-encoding.patch"
+}
+
+src_configure() {
+ econf $(use_with ssl libcrypto openssl) || die
+}
+
+src_install() {
+ dobin ldapvi || die
+ doman ldapvi.1 || die
+ dodoc NEWS manual/{bg.png,html.xsl,manual.{css,xml}} || die
+}
diff --git a/net-nds/ldapvi/ldapvi-1.7_p20101214.ebuild b/net-nds/ldapvi/ldapvi-1.7_p20101214.ebuild
new file mode 100644
index 000000000000..35fd350137db
--- /dev/null
+++ b/net-nds/ldapvi/ldapvi-1.7_p20101214.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools
+
+DESCRIPTION="Manage LDAP entries with a text editor"
+HOMEPAGE="http://www.lichteblau.com/ldapvi/"
+SRC_URI="mirror://gentoo/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE="gnutls sasl"
+
+RDEPEND="
+ sys-libs/ncurses:0
+ net-nds/openldap
+ dev-libs/popt
+ dev-libs/glib:2
+ sys-libs/readline
+ gnutls? ( net-libs/gnutls )
+ !gnutls? ( dev-libs/openssl:0 )
+ sasl? ( dev-libs/cyrus-sasl:2 )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${P}/${PN}
+
+src_prepare() {
+ #bug 459478
+ sed -e '/^AC_SEARCH_LIBS/s:curses ncurses:curses ncurses tinfo:' \
+ -i configure.in || die
+ eautoreconf
+}
+
+src_configure() {
+ econf --with-libcrypto=$(usex gnutls gnutls openssl)
+}
+
+src_install() {
+ dobin ldapvi
+ doman ldapvi.1
+ dodoc NEWS manual/{bg.png,html.xsl,manual.{css,xml}}
+}
diff --git a/net-nds/ldapvi/metadata.xml b/net-nds/ldapvi/metadata.xml
new file mode 100644
index 000000000000..9a74198dc6b2
--- /dev/null
+++ b/net-nds/ldapvi/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>xmw@gentoo.org</email>
+ <name>Michael Weber</name>
+ </maintainer>
+ <longdescription lang="en">
+ Text based LDAP client which uses your standard editor for viewing and
+ changing entries.
+ </longdescription>
+<use>
+ <flag name="gnutls">Use net-libs/gnutls instead of dev-libs/openssl</flag>
+</use>
+</pkgmetadata>
diff --git a/net-nds/led/Manifest b/net-nds/led/Manifest
new file mode 100644
index 000000000000..d32f9aeebd8d
--- /dev/null
+++ b/net-nds/led/Manifest
@@ -0,0 +1,5 @@
+DIST led-1.111.tar.gz 30636 SHA256 95a8fabd2e77a047304a6a854723016ccdb34e677a9f6859b937533d6f158109 SHA512 e5078cbed72e406846f50be13fa2e475549b5e0f22eee8da19fca1bb097bc155ee38d289f3f1f89e47d4efae6d9d67eda8bec8a2dd9b90f52020dcd6ea2945e5 WHIRLPOOL b2398a7f72657c21bef65ef14a52e0469dfe7d4c5337c400346e16f853bb0e256ad540f3a8ad2b09e22c6be7e79f741ee106fc65396b2f24e5427d27ddf2e3fc
+EBUILD led-1.111.ebuild 668 SHA256 0e174d564712ae6deeab577b18e3f1996360197b627530b1ef190f0efc3854a2 SHA512 983a8c04ea718744dc8b934888909898be6a6a6aa39ea22b2cf3628d8a3cbe89fbb1915f3d94291738105af18d391db2b10a621cbc1e5b049f9ec6829517c641 WHIRLPOOL eb811362d720804d2a4abab2abffcb442d0803217660e6984bfd00d5f959763c750c207bef998577355b9ab5a77ea775ace69866e1e97813fc97117d9c0de2ff
+MISC ChangeLog 2163 SHA256 1c76d633834d70068350803e010e0b03caacb176f82059d988b8e03543a374d2 SHA512 9b0acc89d50cd6ccecb45a6146fc7f7bdfd1f420ee002924d397ea41f5d89a45a873baf280c6674e21c7d654bc11a795bff091d6d27ae7c4dc4c3539ea967f11 WHIRLPOOL 97aa99fb7c8a7a020ce822ef1b7ce854dce234acc35c145cadfd0b7f0bca016c4dfdb863bfb9ea2b62c11266ec3cfe52c0c7d3b838f6bcd1c0795167df2c2b19
+MISC ChangeLog-2015 1141 SHA256 64a35c36e92f469e826141deb170f874eed5d673db72220668583962156920bb SHA512 f703822bb18405fdb354c60f210070a6692ec902b4a68ee0fc42140c7ea4f06cd44652d7c3a16410aad9d31a2f5d0faeb273a3f24768853a05c8f8fbb1e6a389 WHIRLPOOL 3a07401639b1fac5ae104231b2dc171aa49a6190a06e5007314d40b0dcb02d9fdf70751a450bc9cc53a90a16a43f80f7fac4bf98f3571294a6ff591c501a2231
+MISC metadata.xml 333 SHA256 1945f93a1282a6f291693dc316adbab7630c7b9e01f888a770388c0b79a07c76 SHA512 455aeeda0952f143bd2ec87c4c7d47096a0d95e9587994d1fc9a89aaba738f814384006b4c6c1dda3ef37800cf32f9e658a1037b3f269a3590f461c77ec43ccf WHIRLPOOL 75af33c6ebe55ae951e973eb123f32514a2cc72e8e86b9d89eaebcdc10f5a595a934ba7a27dc82b63218b60e08027a23696af3122ea21ef77cbd73a05eaf8be8
diff --git a/net-nds/led/led-1.111.ebuild b/net-nds/led/led-1.111.ebuild
new file mode 100644
index 000000000000..441ca73fd79e
--- /dev/null
+++ b/net-nds/led/led-1.111.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils
+DESCRIPTION="led is a general purpose LDAP editor"
+HOMEPAGE="http://led.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86 ~amd64 ~ppc"
+IUSE=""
+
+DEPEND=">=dev-lang/perl-5.6.1
+ dev-perl/perl-ldap
+ dev-perl/URI
+ virtual/perl-Digest-MD5
+ dev-perl/Authen-SASL"
+
+src_compile() {
+ # non-standard configure system!
+ perl Configure --prefix=/usr --generic --rfc2307 --shadow --iplanet
+ # parallel make bad
+ emake -j1
+}
+
+src_install() {
+ dobin ldapcat led
+ dodoc INSTALL README README.ldapcat TODO
+}
diff --git a/net-nds/led/metadata.xml b/net-nds/led/metadata.xml
new file mode 100644
index 000000000000..0582001aca48
--- /dev/null
+++ b/net-nds/led/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">led</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/metadata.xml b/net-nds/metadata.xml
new file mode 100644
index 000000000000..e5113d1ba1ac
--- /dev/null
+++ b/net-nds/metadata.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<catmetadata>
+ <longdescription lang="en">
+ The net-nds category contains NDS (NetWare Directory Services) software.
+ </longdescription>
+ <longdescription lang="de">
+ Die Kategorie net-nds enthält Software für die NetWare Directory Services (NDS).
+ </longdescription>
+ <longdescription lang="es">
+ La categoría net-nds contiene programas NDS (NetWare Directory
+ Services).
+ </longdescription>
+ <longdescription lang="ja">
+ net-ndsカテゴリーにはNetWare・ディレクトリ・サービスの
+ ソフトウェアが含まれています。
+ </longdescription>
+ <longdescription lang="nl">
+ De net-nds categorie bevat applicaties voor NDS (NetWare Directory Service).
+ </longdescription>
+ <longdescription lang="vi">
+ Nhóm net-nds chứa phần mềm NDS (NetWare Directory Services).
+ </longdescription>
+ <longdescription lang="it">
+ La categoria net-nds contiene programmi NDS (NetWare Directory
+ Services).
+ </longdescription>
+ <longdescription lang="pt">
+ A categoria net-nds contém programas de NDS (NetWare Directory
+ Services).
+ </longdescription>
+ <longdescription lang="pl">
+ Kategoria net-nds zawiera oprogramowanie NDS (NetWare Directory Services).
+ </longdescription>
+</catmetadata>
+
diff --git a/net-nds/nsscache/Manifest b/net-nds/nsscache/Manifest
new file mode 100644
index 000000000000..d56b23a85079
--- /dev/null
+++ b/net-nds/nsscache/Manifest
@@ -0,0 +1,12 @@
+DIST nsscache-0.30-gentoo-authorized-keys-command.py 8004 SHA256 956323bc311381da23c788e143706e732eef86ad37cf570209b28206ecea6a1f SHA512 58d3053aa140cbec214033ea3c524e7e7b670aa94a6ff306b9d816ffd4c23b8c781b1178ef7ce14009f8b45afaf05f75e9248e8c1eebef790b838baef5f50c26 WHIRLPOOL 5612cce26ab4172fcf019de702b5d26d830850cff3002dd23a2061b25ebb98d4c4a5436c17a6bcacc952ecdeb2027b677893552fce0520089a0d1f793cac7b75
+DIST nsscache-0.30-r3-gentoo-authorized-keys-command.py 11974 SHA256 90069477763e1f81d5febe8d3d6d50c663da10cf8087512bb45c52bf0b109a05 SHA512 b660a6ae19e6e42efbb07d0a368704706b0a0bd1bf0b2c84855f0d1c00d4cda80872432f5a25384d0c27e99bf60072beb12975bcfa0201b52fa040d0e6bc2da2 WHIRLPOOL 91c94a867960ec0527af15be69107fb05d080f64e2a91bcbfa5f686cb98c34cb31551be47a76cc3616094bb5a36f31db07d3e6a5f5d14e85e2891781d3899d1c
+DIST nsscache-0.30.tar.gz 109615 SHA256 9cbae8768b6671ec7d8a94d76c62be69cd4c704ea792b50b6dbfa2786cfe19e4 SHA512 22c58904eadd2e69405c42263c1c85c7b612151466386870fbea7685ab32835250a84f1acd83fca6f3289582c74df5371cbfb4f354679a302f240fd0ff334712 WHIRLPOOL b9b9384f8c238a49f44ab9037d598f7a4795a52ae6e62de352127a7a53546bb84861b943282c58680fb2c088a5b9a1a4a0c3bb921eecec2e26a2f92b83137718
+DIST nsscache-0.31.tar.gz 108073 SHA256 ce70d854062bea68e6af37b0889ec9fc00371eb361cd205e8137604ccb90f646 SHA512 1be90b0217605f86d2effc6063a805fb604f535386cc9f2eb8b0244ab1293521fd1342f52e3fad98c7d95cf66db3dabf93747bf40ce5ed2bf70c8c07382001a4 WHIRLPOOL 327806f957492273ca4d3b3c3d62987a335f222448fa8f8545ff217108e5ad630c08676adab7c0425c1f4efbcb5064903de1964e1ef8cbc34f9c876cfbc6f508
+DIST nsscache-0.32.tar.gz 112333 SHA256 b6cd574f38230ce509064010fcf646429eb4dfb98eb2a00ed0c9ae21a6f4f279 SHA512 c35f539ea017a328c1630031b7934c231b256d3f2198c6764954c42f36ed281432ff97667e5754692971b4f24be38887406f98718d5f49d364e1e3eebb32185f WHIRLPOOL 3e04b0c22e2d4ca676cb5d7ffae8c735db10179c0b2dd55b947d237b25b280d28126632ebbef85918ca76a2bc9d8a9b9a626a0a216ef937059fdde22896c1fa5
+EBUILD nsscache-0.30-r2.ebuild 1293 SHA256 7ee16fbb40543fafb69dc52fb26ac03eded3fcd14f703f1a261872e295d85fed SHA512 918d608614d6a8860216edebc331b5510b38a52b67f972e8328ae18d054e42fcf4bbb6951c772a9b86a38db7e2b1ed332ec9a2eafa044931e381691de05ce1dc WHIRLPOOL 9e652f574929b7be77246e50f8accf43c7c950eceeb647f5b50eecb26ece9e47a55c2e2767cb4d5bc5d5eaa101fb2b5eb3b26a8d929c50c29737000f9f3a4283
+EBUILD nsscache-0.30.ebuild 1068 SHA256 6e3bb7ea18eefc2411642a860f578e93301572724d687c1e19b1301eaf983bbf SHA512 b5f7fdb4918671307863914ee2f7fca13bbbd1a76f3c821a412875b8944ba4fc40f9baa1949f76f688e56ce07f034257b518fba91378d69c5ae3d8bf22320ff4 WHIRLPOOL 061dfc2e5b9144a74c1502c0b0dff2c82000a019d3b00bbe1cf928dcb2326078e307130d659f64844d561892a18fdde0a171489d2fc08edd11a30cdeeaded47c
+EBUILD nsscache-0.31.ebuild 1285 SHA256 a36bae579c499d2b71a0b69d754d2112c97362afb8dcf5f03ae5076d81c7469d SHA512 b9ffe94822a25d39afc5e4e00c2dd1069507cffd93bfd14966284efa57b41ae3cc3eb3df9afb4d56023b096b2d7151601b17870aeb4c7235b00e6fbf5f08ce6d WHIRLPOOL f77ef903e2af4e2e8218ac6e7502eca61eb563a8f835cf2b424f8b894075c2e678eb588f131678fce561a385eba447c756fc79c93de3ea749b304df94ac3868b
+EBUILD nsscache-0.32.ebuild 1285 SHA256 a36bae579c499d2b71a0b69d754d2112c97362afb8dcf5f03ae5076d81c7469d SHA512 b9ffe94822a25d39afc5e4e00c2dd1069507cffd93bfd14966284efa57b41ae3cc3eb3df9afb4d56023b096b2d7151601b17870aeb4c7235b00e6fbf5f08ce6d WHIRLPOOL f77ef903e2af4e2e8218ac6e7502eca61eb563a8f835cf2b424f8b894075c2e678eb588f131678fce561a385eba447c756fc79c93de3ea749b304df94ac3868b
+MISC ChangeLog 5393 SHA256 f398f9267df210944c7b8d203d25b5b88b83f6b21e09c07b5a83be6386bdecf7 SHA512 545627b776c6ba4e69a728d321c014077d9287dca0de3d532db513676d0ac422e512627f68d8d20158520ef99445ca91cf452e6bffafe8f8e70abceda4880126 WHIRLPOOL 7a269a05c3917a800ece31d1d70b2b7f86f547ef2a46742fa586d7d9c9423cbcfe35db54a2683682ad2e8f38098951ef70e99343d940b892ca4c28b1cd2b152a
+MISC ChangeLog-2015 2316 SHA256 a2ecad6b22dbfc84e77c472aa67fd29047a8933c37c6ed24515a6743eee4ef47 SHA512 07ec19b07a06d9cd06441a12ad65e76432b653c0ee902464d66829e2cd11fe4cebefeb26ca8ecf4cbe92b51f81b7b1fa1b1d1eab5d10a0004562055ac2afb739 WHIRLPOOL 85aabcf5a9640233b88c3b57b3e2cda768203edd1eb38719154c2821efb07759c5237fd98fae81094b14743cb38f9a7d48ae9721076a2ec6ad0279c019aeadba
+MISC metadata.xml 475 SHA256 605f67e6e2ae83b6d287d1b8aa52f30b1d29e33fbddb16f6cc64a516e630f573 SHA512 f4f569f764667a087ddad7c638eea619050ea4e40d5c5c60cef63bd02c85dd2095950295aa0b7a643f3694fa4b1bf5fdd351e8819a1d60b234c4bbfb447a192c WHIRLPOOL 8fd3d73b712bf52b1b2457cc31f378c1f0b3b854f633e7d2c18fbcd755de9d23bcc694cfbeab8a0ce80e2258561d9bd9f7566b9280ef80f709d5a773c9f2468f
diff --git a/net-nds/nsscache/metadata.xml b/net-nds/nsscache/metadata.xml
new file mode 100644
index 000000000000..90ba820d293c
--- /dev/null
+++ b/net-nds/nsscache/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="nssdb">Depend on sys-libs/libnss_db to handle dbm files.</flag>
+ <flag name="nsscache">Depend on sys-auth/libnss-cache to handle flat files</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">google/nsscache</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/nsscache/nsscache-0.30-r2.ebuild b/net-nds/nsscache/nsscache-0.30-r2.ebuild
new file mode 100644
index 000000000000..cdcb4c2d78e9
--- /dev/null
+++ b/net-nds/nsscache/nsscache-0.30-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils distutils-r1
+
+DESCRIPTION="commandline tool to sync directory services to local cache"
+HOMEPAGE="https://github.com/google/nsscache"
+SRC_URI="
+ https://github.com/google/nsscache/archive/version/${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~robbat2/nsscache-0.30-gentoo-authorized-keys-command.py"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+IUSE="nssdb nsscache"
+
+DEPEND="${PYTHON_DEPS}
+ dev-python/python-ldap[${PYTHON_USEDEP}]
+ dev-python/pycurl[${PYTHON_USEDEP}]
+ dev-python/bsddb3[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ nssdb? ( sys-libs/nss-db )
+ nsscache? ( >=sys-auth/libnss-cache-0.10 )"
+RESTRICT="test"
+S="${WORKDIR}/${PN}-version-${PV}"
+
+src_prepare() {
+ find "${S}" -name '*.py' -exec \
+ sed -i '/^import bsddb$/s,bsddb,bsddb3 as bsddb,g' \
+ {} \+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ doman nsscache.1 nsscache.conf.5
+ dodoc THANKS nsscache.cron CONTRIBUTING.md README.md
+ exeinto /usr/libexec/nsscache
+ newexe "${DISTDIR}"/nsscache-0.30-gentoo-authorized-keys-command.py authorized-keys-command.py
+
+ keepdir /var/lib/nsscache
+}
diff --git a/net-nds/nsscache/nsscache-0.30.ebuild b/net-nds/nsscache/nsscache-0.30.ebuild
new file mode 100644
index 000000000000..f8d2a3f20ccd
--- /dev/null
+++ b/net-nds/nsscache/nsscache-0.30.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils distutils-r1
+
+DESCRIPTION="commandline tool to sync directory services to local cache"
+HOMEPAGE="https://github.com/google/nsscache"
+SRC_URI="https://github.com/google/nsscache/archive/version/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+IUSE="nssdb nsscache"
+
+DEPEND="${PYTHON_DEPS}
+ dev-python/python-ldap[${PYTHON_USEDEP}]
+ dev-python/pycurl[${PYTHON_USEDEP}]
+ nssdb? ( dev-python/bsddb3[${PYTHON_USEDEP}] )"
+RDEPEND="${DEPEND}
+ nssdb? ( sys-libs/nss-db )
+ nsscache? ( >=sys-auth/libnss-cache-0.10 )"
+RESTRICT="test"
+S="${WORKDIR}/${PN}-version-${PV}"
+
+src_prepare() {
+ find "${S}" -name '*.py' -exec \
+ sed -i '/^import bsddb$/s,bsddb,bsddb3 as bsddb,g' \
+ {} \+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ doman nsscache.1 nsscache.conf.5
+ dodoc THANKS nsscache.cron
+
+ keepdir /var/lib/nsscache
+}
diff --git a/net-nds/nsscache/nsscache-0.31.ebuild b/net-nds/nsscache/nsscache-0.31.ebuild
new file mode 100644
index 000000000000..b16d07c4ca6c
--- /dev/null
+++ b/net-nds/nsscache/nsscache-0.31.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils distutils-r1
+
+DESCRIPTION="commandline tool to sync directory services to local cache"
+HOMEPAGE="https://github.com/google/nsscache"
+SCRIPT_A='nsscache-0.30-r3-gentoo-authorized-keys-command.py'
+SRC_URI="
+ https://github.com/google/nsscache/archive/version/${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~robbat2/${SCRIPT_A}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+IUSE="nssdb nsscache"
+
+DEPEND="${PYTHON_DEPS}
+ dev-python/python-ldap[${PYTHON_USEDEP}]
+ dev-python/pycurl[${PYTHON_USEDEP}]
+ dev-python/bsddb3[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ nssdb? ( sys-libs/nss-db )
+ nsscache? ( >=sys-auth/libnss-cache-0.10 )"
+RESTRICT="test"
+S="${WORKDIR}/${PN}-version-${PV}"
+
+src_prepare() {
+ find "${S}" -name '*.py' -exec \
+ sed -i '/^import bsddb$/s,bsddb,bsddb3 as bsddb,g' \
+ {} \+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ doman nsscache.1 nsscache.conf.5
+ dodoc THANKS nsscache.cron CONTRIBUTING.md README.md
+ exeinto /usr/libexec/nsscache
+ newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py
+
+ keepdir /var/lib/nsscache
+}
diff --git a/net-nds/nsscache/nsscache-0.32.ebuild b/net-nds/nsscache/nsscache-0.32.ebuild
new file mode 100644
index 000000000000..b16d07c4ca6c
--- /dev/null
+++ b/net-nds/nsscache/nsscache-0.32.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils distutils-r1
+
+DESCRIPTION="commandline tool to sync directory services to local cache"
+HOMEPAGE="https://github.com/google/nsscache"
+SCRIPT_A='nsscache-0.30-r3-gentoo-authorized-keys-command.py'
+SRC_URI="
+ https://github.com/google/nsscache/archive/version/${PV}.tar.gz -> ${P}.tar.gz
+ https://dev.gentoo.org/~robbat2/${SCRIPT_A}"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+IUSE="nssdb nsscache"
+
+DEPEND="${PYTHON_DEPS}
+ dev-python/python-ldap[${PYTHON_USEDEP}]
+ dev-python/pycurl[${PYTHON_USEDEP}]
+ dev-python/bsddb3[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}
+ nssdb? ( sys-libs/nss-db )
+ nsscache? ( >=sys-auth/libnss-cache-0.10 )"
+RESTRICT="test"
+S="${WORKDIR}/${PN}-version-${PV}"
+
+src_prepare() {
+ find "${S}" -name '*.py' -exec \
+ sed -i '/^import bsddb$/s,bsddb,bsddb3 as bsddb,g' \
+ {} \+
+ distutils-r1_src_prepare
+}
+
+src_install() {
+ distutils-r1_src_install
+
+ doman nsscache.1 nsscache.conf.5
+ dodoc THANKS nsscache.cron CONTRIBUTING.md README.md
+ exeinto /usr/libexec/nsscache
+ newexe "${DISTDIR}"/"${SCRIPT_A}" authorized-keys-command.py
+
+ keepdir /var/lib/nsscache
+}
diff --git a/net-nds/openldap/Manifest b/net-nds/openldap/Manifest
new file mode 100644
index 000000000000..44c4f8fead29
--- /dev/null
+++ b/net-nds/openldap/Manifest
@@ -0,0 +1,40 @@
+AUX DB_CONFIG.fast.example 746 SHA256 69fc9aa6e4f0b888bc02d3f75642fe1ebf9345c685257a5c1236b2e79ed56e0b SHA512 07199416b7c91864a1dd5ad45642367c4f79ee8b694214305289c47afb5b53420f0fb81cf7c8b117400c903535e88a2dd47bda28d57e969aeeec669debf6dc9e WHIRLPOOL 1d6a2adcdbbac2698d8d5ab1867ecfafee23c8561c34addaea30f59bde8b4bfad88c576ffd7df102aa428c2588ed3b9376de49606eb6608c8e873f8119326c5a
+AUX openldap-2.2.14-perlthreadsfix.patch 614 SHA256 bb719cc1fed47ff0f111c960f3295781ae6f0d9e98b4266a87751044b4bb3175 SHA512 e2579de72194c63e445108a39a85635622c1a629cec9d276df84ce9d770dbe7e2df2057663bac192558af3dee60fa2f0ae92f4cc34145c300fe141ae7f3f13b3 WHIRLPOOL 24cab36ff0368f81f555ba0fa0ea0f78d245d1863bf4c6c6d291536b16bdbe628a9a204ffccce12a6014b71717f3dd722c9f95061c1a519e273c0535316ad97d
+AUX openldap-2.2.6-ntlm.patch 5011 SHA256 1f7e766bcafb412ec336aad7e07295d6d62d2e2a62b6804b07b06a5056102243 SHA512 8140dba85c56f269c953b0b23b2ca7eecb42f8e5167f4d0f08511dc8c06c30bcb42c3e38ed3b77d5622780a94c0aa9eb65bb8e45af50075acab97e7f466a1a9d WHIRLPOOL 75c2394c46242f738b5ee0db8473b05b5e7e75821e89dcea3ca7a139e34cc61f5848d0601dc66499dad35beefdd02aed5486ed138cfd8e216041aa5ceb85c920
+AUX openldap-2.3.21-ppolicy.patch 402 SHA256 97feaaff03e839aaad402024082ba62fb2cbe0c721664a85af8674ebb28d7dbd SHA512 19d2fb2755f62d3b77851983645f6656f10078e983ac09c8de7b50ba2ce52f2c8e5379f066cf1b6e91921b8ca5c54852bacd1563f20e5004babe94db66e7d88e WHIRLPOOL 32a93bc7daa952313643a56533719963766f944f25abedb29568b4e32fe1f42ffd7631b922dd2395d42d81ca2addcce8ddd5fd11432a4217c5f76f5b1ff8ef66
+AUX openldap-2.3.24-contrib-smbk5pwd.patch 1631 SHA256 277990c6bc9e00c29bc5123d5074e1a741a224e884f92651b301375b02edc70e SHA512 7aaab44cdf84233bfd78555db3af7c5a435cb3f37cb8f243b57b32391381835ce1efff7604f80cdf58fee429f6ecedc486f88addec15b6d32ef78f526c6c8826 WHIRLPOOL fbb14366c31ff97b9a706b9ceb0073e45affcf513a1c58966548537dfa3d3185ce5d8f0b38b627a5a729a3084b38f5681565bea2c46d369179879223e66adc37
+AUX openldap-2.3.34-slapd-conf 2067 SHA256 f7611233b83fa70dac313b4e734041dfe1ddac07c804bdb12a775d7cf88c36a1 SHA512 fa1c6051c8285cd8f91dd236289a7492efd30fe172d269b35a4941945623f87fd4ff0c8b47dae36e55e395e4d931cf680ab15c5f44fd7279be686678661971aa WHIRLPOOL 55384866d25d016a6135b443e9b25a8a321118a4e33214950f7f3ea51c357ba5a4b335d2f77aa941c04ebfd6131fcf48c87f29df8dc4fe685bad9f3aae61642a
+AUX openldap-2.3.37-libldap_r.patch 862 SHA256 82471cc13806a9260e441aea90c8dfe9ce21b6d3edabb71766a2afcff6f80dfb SHA512 b49260b4a1583e1084f695e55e80aa90b301c9d56cd9cc04f0a78c0beb2e7d645e4b2163cae2be940f3918802b5d766e30f8550fd7fe723f365829c415fe364c WHIRLPOOL b22350b4ee9a3505b7b78ae915e82d3c84b19e7140047733cecd37818c57606097bd5d199d670ecf0d3bc350c08703bcaa126ed359b7930ab0a9b58e66f4aa50
+AUX openldap-2.3.43-fix-hang.patch 645 SHA256 48d1f63a303142e535413b3a42e1fdfea89abaf3265de801c147ef3bdcf3c27e SHA512 3cc7f46bd69634844c5fdf893120928e2d8b6c93011aebfb01786608bbb40351fab3f5e346857ab95724d5199b4b0270d56d56c7f1a43be07951f26fb82b018e WHIRLPOOL ddb6314f72a70a92d2cdc96548a8d0f783e97b91c9d71971566d3028d8ef1527b6897e5cdd6557fcd223f317b510dfbd12666c5bce0e8c9f06451e077a766bd5
+AUX openldap-2.3.XY-gcc44.patch 1169 SHA256 c799ad2adde0e0801bfd641c1a43860180121a04897b8e2a01ad000ea31e2a8d SHA512 9e7b726b384390dbf85c50cd344b6a614d09823293f1af2642cfb50c25f4f39254ae0b19cd0da0b30e6fbd270f61646487e1643406438bd2ec6b37883b03f9f2 WHIRLPOOL c5881dac9b095c28f3dd75fd71dfada84705bd42d643172389854f0c65e548a0f8721abef50568f63ebd85ac7bfeff68c64703dfdec0f7b42a57b92cf2f95097
+AUX openldap-2.4.11-libldap_r.patch 515 SHA256 3310a89d38bc39e6eb4333799d475411b274482b8bccab212b3edfd4385db70e SHA512 44d97efb25d4f39ab10cd5571db43f3bfa7c617a5bb087085ae16c0298aca899b55c8742a502121ba743a73e6d77cd2056bc96cee63d6d0862dabc8fb5574357 WHIRLPOOL f0c115c60a1405bb6d34090d878ba82b454cced4a7718e1132bc8d118032ae656dcd0207640142740ea4f547403edf2b95c97ae2c7f67a2b656b83cb3a508e45
+AUX openldap-2.4.15-ppolicy.patch 418 SHA256 98269fa1e8a1a0e62dad9acd36fd9a33614fca9a5830d6e7e606db8eb7f85de5 SHA512 59db36c9b4d16e7ccf4b318af2a8d0c6e29cda7e567641b3bcc6069bb7d610a8ac8b56e16ca72165b3e50841abb1ef693b9e2958f16997ac637554f3a67b7146 WHIRLPOOL ae52ce30b17e0413ee87db55070d64e06e4ab5e14adf96f808a0cfba39c3f946fc5b4e4431d8fc6123c025261acd6a16e2245a1b46e1eb7a131444e5ffc7825f
+AUX openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch 3542 SHA256 31e816eb9f3b52f5f9d183f82adebff75892e45e764187e579a92204c90889cb SHA512 6e4d3d04344433967ae099471e2af9d706e77206fc5e8d84d63681c5b975110f9abbee5d29be0a51e4cf8bc8ee157d8f386d99ffcebd059ef1be660530aaa096 WHIRLPOOL 38d4e60faff9d3a5f21e0783e688b4716d8d04976f549958798becad3e03b06eec2eeeac1b7491fe361e077b4aca5b75506bd45d65668746ab67db3a20d86a28
+AUX openldap-2.4.17-gcc44.patch 509 SHA256 33345882f601050ecaa6bb3dd7458e6b5f8e3684345847f7a53d4a1b0f514bda SHA512 ea2c862c7a7b8bc17c31ece694c010dd648840cb4facd48d5640767d859bf3c9108d547007984cb759f4a8810ff99ab8295c82dc2ad069f568d037d8448e6ff4 WHIRLPOOL 5f597463b6e92b43e0d6beabf426f5d6000fb204dfe8080ebcf57ec71391712fb24f728f6e61d205dd3ef9e78c7eb8a443994c68469f80b2536cfea3cd75eed4
+AUX openldap-2.4.28-fix-dash.patch 1101 SHA256 fddaad5f49cce39bf5492bb1dda10f2ce83419c48f128fe536661dde703b5d1b SHA512 f9b3a50eb972f746878afe4a8cda8d7e2a2807932ad2faf602f43e5a1b81166bea4fde764b4e1ae4be0000cc0713ee90a4620afab5809b8460f60ae39a716e9e WHIRLPOOL ba3856cd1008431025811aaa21d0a0ce94896590a16eee8cd27bdc84fd89884b0d27e8dce31bc79e4b4a91884bc90624f1a6afb38efb847839a036b4a2196af5
+AUX openldap-2.4.28-gnutls-gcrypt.patch 340 SHA256 26dc29a502e45f6b1003674c1ef5bc6c79b71d00fc9b2fc7a145291a314370c0 SHA512 53441707e9b24e774c0541ad8b63295eea6dc0352ae2ef3bf389f381da18f1df05fb2f7b41c816e1f697d8f1b208643d05891c03d8fba42d85e3b7689e5ee94f WHIRLPOOL 6be9eda56fd68c9e0818443ca70ee6c1e904aa6126576477d402c9abd2ee44952a0a313efc89f603b02cac35cbfea3c987de5b6ec3625a92bc691386edd85aa5
+AUX openldap-2.4.31-gcc47.patch 480 SHA256 6a0bef52a8681e30c4be7c11df88f5c73d2ab90f0bbbb79c550b6174d3978060 SHA512 a35113fe3f5e9ae5b9631976415df41d53a99ae1ca4c4dcdcfd89e6ccc6ba906cf5cfe2ee4901033dba29d62b6607d4a93ca74645eb6ceba38e67c5d8521816a WHIRLPOOL bf1315bebf8b16a625d55ac1d040a1ab831c25c87fe6f9bb9ff4b1b54f621a36e75e6055955e60617823fbf78244cd4aec7f702ea0d7a8d85a164f550d2675e7
+AUX openldap-2.4.35-contrib-samba4.patch 1400 SHA256 64ca91d3edae25d392f39a7f538e269b26de4e09923f872014e84ec388bda911 SHA512 332c4b2daa3eba165cfdcd479b1012e139d60095aaa628f8f5750fffb722d39395935bd7d7e56272e98fd234ab0be1c6568a71feeda5d88ba24b91b385defdad WHIRLPOOL c472dc75bbc1261b84ce0bfe8dd0a749200d7540647733ca13c0b1ccd8330739278f83eea3c91b3b29e5982eb6c9f9fb920ffdd9a6faaf4c0e66a97a1d16db55
+AUX openldap-2.4.35-contrib-smbk5pwd.patch 1626 SHA256 377b9204f51bb751d7311de3ee789386496372db2964ed2a929733099c23688a SHA512 c045c7605d25bab9eef8c12752f4952e3e6358124764ded91f5f98210686bc371f32ac20c56a63de80410f882f20e0889eec95474f1ee9d4c5bb4ed303ec8da0 WHIRLPOOL 64feead042fe22ec8bd36a23a11ea1af513702de2ab063324f0e49802635ca53b9f2f662159c8784877f6342d0a15cb231710be2ea69031c3df7459cd150cc47
+AUX openldap-2.4.40-slapd-conf 2059 SHA256 306602d38cbbdc2203e9f838348cbe9b264738cf86bbebc60272658b92a1eff9 SHA512 7ce8a8262db74d86449a3d31b96b2efa9e8dae2f9992a1c3a6d6899fb65531eaf917f410d8728852cb74338d7ba3c8c3b52d2f6cdcbba4cb3b97f6c733099fa2 WHIRLPOOL 979a2802501ec22dd93032eb3bc1a3df322558013cd8038736bac436b33fdb666df5d93fbfcc4d99762c10aa9e1a1edef496fa364d2b4f0019b5dd702174b6f4
+AUX openldap-2.4.42-mdb-unbundle.patch 3589 SHA256 43be88ef0810608232b2490e7f06f66272d17059c581f76d4de79c415365dd97 SHA512 ec123ff8cef6c32b1f29c2d0643433dd88dfa8ab62b4d7536de829475ff8b45b5c7376f3e17f3424aab326a573aa36a593630feecbd40c3e574c6c24f5dd83ec WHIRLPOOL 0eadd603e016506d3365f81c802561a0201122b989033935a5a6b4737db75ff6c1517bcca1c7c127b54bfd7c1ea2db0c11f65228ea6c4cbacf2f783af98dfddb
+AUX openldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch 3542 SHA256 026f2865c907c23249648cba03ea8e1ca5de0c48306865c17512378d40df63bf SHA512 326e73df430eb152fa5c53deb12071795f5958e6c48167021ebab83c6b1c4320ed56b0dfe5dd3475de463ff24e43cc8fe2c7cbf905e11cc1d48a70e350cb0ebc WHIRLPOOL bdc0808fd27c0b00c151ee3ee76a43fdea6e274abdae7d0278b69ec3455c4bb19ec917c489e2632b30736508f838b5f3a47bc697e8c6235d3e2aa5e96d9d9be9
+AUX openldap-2.4.45-libressl.patch 2276 SHA256 762f03261558cad884c25d166a9a4ae7bc3463e12798c7c90505cc6b5f68a206 SHA512 72d5177f67ce62053a66c241bedcc3a301544726c6ebf7055482c58337cf2a9fdab89336f910e039f90ef7f23fade4fdc167b8caab91acfb5ca5754780c962ab WHIRLPOOL 2be8ca186c538ffb9c773ebfeb1004c934f70860e257e6bcacb71755bc109fefe5080c5501ae54b9e7e799a91089aa97ad63905f419d6ceffc5b4b765ab15be6
+AUX openldap-2.4.6-evolution-ntlm.patch 5161 SHA256 3b79d9afaa7c76ca20c5e7aa856dea49931741a1022ae6c3bb264c38f4c22edb SHA512 a553231ad3e2d2ca3a3a195b20da6163c135a723e0a3ed39afcad5601ed4ef01e692533df3f8f96d5ec8cc74ca27cbd16508818007dc1343899a42b5595b980b WHIRLPOOL 624f11c996825bb248dd7c33f64afd3a4e8b9edbbe79c6fdffc7f2d8e57c5d8ac4c651eae7763dbc0a06144b916131b70e599771034bcb6bd8c586a9bf6a8209
+AUX slapd-confd 614 SHA256 901044908fbbbbf333f7f0f1efccd1f0e213aa1a9156b3e659eaf0a0c7fdfc89 SHA512 e4ae52d10294da787016cf39adfd68c6ad812ac1758b00845810ee7936d21734d2ef3793252b878d88f21788414071adffb5f484381d4dc6a29f71a8729486b7 WHIRLPOOL d45df7487a952f899e9098779edda82afd9fb5ca66e42bbaf4a94f9ebdda9be58a026c0358a521a2feb4cc04c1f8477fb034896054ca4575d717bec367e1e2e8
+AUX slapd-confd-2.4.28-r1 1072 SHA256 5bca003ec3b67c7c78519aede1d82002579006ccfecce8f87b559df719f82e92 SHA512 7426c04ee689bcfb29a9a3956367c571eac6bc9620efda938591d09382a05527454458f7a25bdc2fa2ac920f93bae516121e085408ffefbe8ace0c7d8c5da315 WHIRLPOOL b9cb4e249f224ce2435184922df8d053d4c6d058a6408b72ac3c393563bdc0d413f7310e74ef7dcdab6dedc3d25a77d5af0581334356a9b55be5c516d6ee71d4
+AUX slapd-initd 1168 SHA256 6b2039adf33b9dbfcce644631f4e8d1c0517327123ad875e102bcafe6c30b364 SHA512 52dec305f990de797cfe12a9b0d5b306f4b5baedec1597879151a492a1743ea46d83bf659f7695e07b8652fddb8a5a2ea11339991432075907fc088edd9a8bd5 WHIRLPOOL b2b29b8571976fafdf3c801b744b86ce9f2bb460bedf736ea912e6c97739c3cc57a64dee45b4fbc15382d26571cd1540b9ac3e609e25ce97973e80fd8bb77ff3
+AUX slapd-initd-2.4.40-r2 1726 SHA256 bcd84fca8efc1eec3aea489f238b51ce7226ffcdb1562044e48106897bc5a6fc SHA512 3945dc4cff9b20bddd2ac4f38d045f8caabb59368ab0b5e952d4194d06a1bdd9871546b84e9a54b692d2e3ca699aa065e5fa909a29ae80e102ed9635c94bcfd5 WHIRLPOOL 1be86d1dcd863077fa77a98e56b5dded097d34afabaebb29d3d37f39c818cca246067fdab4aaffddc64c02fbe01e7000ece6da6e7b9015dcf3248b5325d7ed84
+AUX slapd.service 284 SHA256 106563991611b44717cf93c10473edef39b4f0b4b391e29b9d5bdd3059c7a64a SHA512 450c93b320101e1c28681cad6694c24332fbe424ac98283b621a2f6e1eb01e9e2dbd80a4142e6e8d01d95c55018b44e847d4f4c55f11d7e0e0a11ae1827daa82 WHIRLPOOL d1ff7b8c672d9b38116cc8984567179a743b140211ae99bebd00729d8dc3cfcd4ed7c0833a18b071c9fa20eeb2cce4e053e7b6805474fc3ca8442167254c1e35
+AUX slapd.service.conf 443 SHA256 462adb8f6fc1a9f742c792b4392346d30949eed523453dd19b64afc9dc448145 SHA512 be9cf4bf19111bd77c0ce481428e6f3cc183a6939775ed1a2d7606a5162da34178cb139d666288f6a35b8413bd4dc5f8f1bd60b39f3cca8f749557674b93910b WHIRLPOOL 8697c1c1c82c5c3fbb5d3fffc43e56f1a05a8bf23443270f2a051fde7d6ca0d1c5102611ac62d244b2c190c6bd1fb675cc46a5978a715d2df4e72f13c58db3c8
+AUX slapd.tmpfilesd 90 SHA256 8039a0190bd5b701f29661c63e03e4fb439a8eb50fdd7be5ce96a7f7f3aaeb1b SHA512 c462c92911635a2a6a30eb7239e74b529062224f9798351f53dca9a2e25cbc7f9fbb3743f98a015b7ccac0823ab85adb42d91d980f053bc3f12fdce760ce4bec WHIRLPOOL 2fb28068fa2b8113041544bd88a58060aa309b012b58bd903b58e2ff853fec0882de2f2b0fa28da76eaa5550dcccbe7ed6e8b792df7f788b6bf0d324a0dc0e52
+AUX slurpd-initd 386 SHA256 f63742fd5f4192e8c676d3634b3947f48dffc2d37ebc82d50a3eec19178c51f0 SHA512 f6f5ede73eb1290673f1d4c9605d8806c759d68568610660eaa1cdcacf2926c728387b5e70885acdec0eea0e15a734c730af49550c4ffc8f121fffc3d9b7ed8c WHIRLPOOL 8f6fe3bb1e2221438e546b766368f76cb6dec18aa3b3b997cf3867b058f0d0d0ca1690a0fb10ae2aac28917d0803c4d2d6663e7993e3eeac3589b4f407befc0f
+DIST openldap-2.4.44.tgz 5658830 SHA256 d7de6bf3c67009c95525dde3a0212cc110d0a70b92af2af8e3ee800e81b88400 SHA512 132eb81798f59a364c9246d08697e1c7ebb6c2c3b983f786b14ec0233df09696cbad33a1f35f3076348b5efb77665a076ab854a24122c31e8b58310b7c7fd136 WHIRLPOOL 37399793d681a6489c369d663772970c62a4e1e370d4dc306bcb6fa3b9cb680139c9d940d9218aaac4618f50a63bc391b10f2aec0a134f84094ce4f7378c88ff
+DIST openldap-2.4.45.tgz 5672845 SHA256 cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824 SHA512 1c9fc84efed8998f107ce6e1c6be3f5466388241afdca0cb3847720c9def0bc263a2dbc15bf0f9112d1b4c391fd01e8531a4fb08c5532c30fb86924c08daedab WHIRLPOOL b5855bfe2b2c3856a98fb8b07ab94e51ef995ff80d4f39f0e7edae64f9774f0af9987db3673e25f98df8a5856a3f8839f28f1aa9184c92862a4df22540b3ab49
+DIST rfc2307bis.schema-20140524 12262 SHA256 6cd8154ad86be1d6bb88a79c303dc10a49bce4ce7d21bb417a951d6496df30b1 SHA512 83b89a1deeefc8566b97e7e865b9b6d04541099cbdf719e24538a7d27d61b6209e87ab9003a9f140bd9afd018ec569e71721e3a24090e1902c8b6659d2ba103e WHIRLPOOL 40cef24529fb4bfc1661d03088eccdb17d9056d696b2bf0e698fa248d03f508ba776784bf8abbaffb5f4c2c59b59b29525b4be2babc978fed681e5e3c88073de
+EBUILD openldap-2.4.44-r1.ebuild 27259 SHA256 a7f12b250076f6bab4dbdad4c73f2d283adbab9620a2221234645dfce94d6894 SHA512 c63699f455d26a1c0845eb5529ef0d2fd272621e4fba52810838795025129e20a1e1d98277430be31cd82a24f72ebd07c36f0ab77ea4a6a07d97e2f05c6531d4 WHIRLPOOL acf2d55ed8793c7c8ac062811b14030e880f3065acfb6c0d028733f30119d88aa3943b1a08ba411adebf3a88240ba3958a35454fc95f1843ebca8db16cbe036f
+EBUILD openldap-2.4.44.ebuild 26590 SHA256 23aa7efd290c1a6bb580835378de582ac334d17a5839038a9831267aca70f4e7 SHA512 d53b72491b7d32986da5a62888bc4c5a5b642fc45376679e8538dee2c5dcae80c298697e285bf9d8ffd92ca046a1ceb8e173bfa6b49f53d738d78dbc08ada85c WHIRLPOOL 87ae87e4a46a8e728eae90c6377f72803a17019835cc217efb4e17c6b19787b871f3023a654c90f8ba425bc57411c2526f838d29d04d99c863c39de4ab0738e5
+EBUILD openldap-2.4.45.ebuild 28136 SHA256 82d39dacdb5993f24087404a44c4e7d1a58402064c30358f3b0a7597c4c23b2e SHA512 df7534b9fa4982e9bfe99cf62ad24117952ff1540c135c6adb7ed7dc40b279c411fc876dd2ac8e9540c81e05128b5247a7a3e9b011581ef5c59ddb738817fc88 WHIRLPOOL 3b2b8d89fe00050154fe5c7ebe00c9874119e4b1da961b2c79eb7ea6f3b02ed0bb4400594a45424b2276a6bfaa178104ea0a023786f8ee4ae39b501792eadb0a
+MISC ChangeLog 8175 SHA256 3e40d412ae900631f1ff6666ca53a00c645d846d17e85dda64f2307af9a8b51b SHA512 5758f053e916ff51f0af336a4c1ab5068827334b441b5904be35968bb6be7efd078682360e41f7ba2bbbdf0302e0cf0e9b3e51bf466efd8a4a5ef61ff890258e WHIRLPOOL 0d7b6d7f534bdeca1aa97339e69a2705ab96abf678d910e6cdf994956553dc9ad25b935903e938991bf79b4986692912e846989e7a1f9d4fa96c8a82c331d432
+MISC ChangeLog-2015 87821 SHA256 29dc9d2d86f5c0de89ee44162332ee4390220ea9e546895100bd413bc60a0a30 SHA512 7c98e1dfe9ea30d7a31a7187cd913e6997bd8f8d5d74747c85f989a61b702272ce120588874257f2653343c2134c94dc405710f82957169a6f7bac01854d3611 WHIRLPOOL 2b657cb4f1f302e90eea233e401c6ca379b605c697443b36280153eb7419695ed2040ada6505b2c38c86832bda3efa74a4bfeda267d644639148ca6954cd10e9
+MISC metadata.xml 939 SHA256 dbed34e13c441b16f14e2ddb4a415b343e7148c9ebbd294b8d825f5abad9b350 SHA512 2cb744d3e29b0a3e8418b47df6c4d64a606d9a5e021e64104b8644da4977b0ad030b7d2e6c74259799c5ee1aa64984b779fa7966f6a77402574150f6756df1c1 WHIRLPOOL 2febb19b808bb5eea0040655b745c44cddd89f25f8c74091fb63371bec1e4b99d41fce6e5a1e1b699706e1a14634ccc7b49f8d022d3b4cc3a544680e728773fa
diff --git a/net-nds/openldap/files/DB_CONFIG.fast.example b/net-nds/openldap/files/DB_CONFIG.fast.example
new file mode 100644
index 000000000000..8b52062c9c22
--- /dev/null
+++ b/net-nds/openldap/files/DB_CONFIG.fast.example
@@ -0,0 +1,25 @@
+# $OpenLDAP: pkg/ldap/servers/slapd/DB_CONFIG,v 1.1 2004/06/18 02:49:08 kurt Exp $
+# Example DB_CONFIG file for use with slapd(8) BDB/HDB databases.
+#
+# See Sleepycat Berkeley DB documentation
+# <http://www.sleepycat.com/docs/ref/env/db_config.html>
+# for detail description of DB_CONFIG syntax and semantics.
+#
+# Hints can also be found in the OpenLDAP Software FAQ
+# <http://www.openldap.org/faq/index.cgi?file=2>
+
+# one 0.25 GB cache
+set_cachesize 0 16777216 0
+
+# Data Directory
+#set_data_dir db
+
+# Transaction Log settings
+set_lg_regionmax 262144
+set_lg_bsize 524288
+#set_lg_dir logs
+
+# When using (and only when using) slapadd(8) or slapindex(8),
+# the following flags may be useful:
+#set_flags DB_TXN_NOSYNC
+#set_flags DB_TXN_NOT_DURABLE
diff --git a/net-nds/openldap/files/openldap-2.2.14-perlthreadsfix.patch b/net-nds/openldap/files/openldap-2.2.14-perlthreadsfix.patch
new file mode 100644
index 000000000000..ddb6672a5fa7
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.2.14-perlthreadsfix.patch
@@ -0,0 +1,12 @@
+diff -ur openldap-2.2.14.orig/servers/slapd/back-perl/Makefile.in openldap-2.2.14/servers/slapd/back-perl/Makefile.in
+--- openldap-2.2.14.orig/servers/slapd/back-perl/Makefile.in 2004-04-12 11:20:14.000000000 -0700
++++ openldap-2.2.14/servers/slapd/back-perl/Makefile.in 2004-06-20 18:43:41.000000000 -0700
+@@ -31,7 +31,7 @@
+
+ shared_LDAP_LIBS = $(LDAP_LIBLDAP_R_LA) $(LDAP_LIBLBER_LA)
+ NT_LINK_LIBS = -L.. -lslapd $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
+-UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS)
++UNIX_LINK_LIBS = $(@BUILD_LIBS_DYNAMIC@_LDAP_LIBS) `perl -MExtUtils::Embed -e ldopts`
+
+ LIBBASE = back_perl
+
diff --git a/net-nds/openldap/files/openldap-2.2.6-ntlm.patch b/net-nds/openldap/files/openldap-2.2.6-ntlm.patch
new file mode 100644
index 000000000000..1e52f99f1988
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.2.6-ntlm.patch
@@ -0,0 +1,199 @@
+(Note that this patch is not useful on its own... it just adds some
+hooks to work with the LDAP authentication process at a lower level
+than the API otherwise allows. The code that calls these hooks and
+actually drives the NTLM authentication process is in
+lib/e2k-global-catalog.c, and the code that actually implements the
+NTLM algorithms is in xntlm/.)
+
+This is a patch against OpenLDAP 2.2.6. Apply with -p0
+
+
+--- include/ldap.h.orig 2004-01-01 13:16:28.000000000 -0500
++++ include/ldap.h 2004-07-14 11:58:49.000000000 -0400
+@@ -1753,5 +1753,26 @@
+ LDAPControl **cctrls ));
+
+
++/*
++ * hacks for NTLM
++ */
++#define LDAP_AUTH_NTLM_REQUEST ((ber_tag_t) 0x8aU)
++#define LDAP_AUTH_NTLM_RESPONSE ((ber_tag_t) 0x8bU)
++LDAP_F( int )
++ldap_ntlm_bind LDAP_P((
++ LDAP *ld,
++ LDAP_CONST char *dn,
++ ber_tag_t tag,
++ struct berval *cred,
++ LDAPControl **sctrls,
++ LDAPControl **cctrls,
++ int *msgidp ));
++LDAP_F( int )
++ldap_parse_ntlm_bind_result LDAP_P((
++ LDAP *ld,
++ LDAPMessage *res,
++ struct berval *challenge));
++
++
+ LDAP_END_DECL
+ #endif /* _LDAP_H */
+--- libraries/libldap/Makefile.in.orig 2004-01-01 13:16:29.000000000 -0500
++++ libraries/libldap/Makefile.in 2004-07-14 13:37:23.000000000 -0400
+@@ -20,7 +20,7 @@
+ SRCS = bind.c open.c result.c error.c compare.c search.c \
+ controls.c messages.c references.c extended.c cyrus.c \
+ modify.c add.c modrdn.c delete.c abandon.c \
+- sasl.c sbind.c kbind.c unbind.c cancel.c \
++ sasl.c ntlm.c sbind.c kbind.c unbind.c cancel.c \
+ filter.c free.c sort.c passwd.c whoami.c \
+ getdn.c getentry.c getattr.c getvalues.c addentry.c \
+ request.c os-ip.c url.c sortctrl.c vlvctrl.c \
+@@ -29,7 +29,7 @@
+ OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
+ controls.lo messages.lo references.lo extended.lo cyrus.lo \
+ modify.lo add.lo modrdn.lo delete.lo abandon.lo \
+- sasl.lo sbind.lo kbind.lo unbind.lo cancel.lo \
++ sasl.lo ntlm.lo sbind.lo kbind.lo unbind.lo cancel.lo \
+ filter.lo free.lo sort.lo passwd.lo whoami.lo \
+ getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \
+ request.lo os-ip.lo url.lo sortctrl.lo vlvctrl.lo \
+--- /dev/null 2004-06-30 15:04:37.000000000 -0400
++++ libraries/libldap/ntlm.c 2004-07-14 13:44:18.000000000 -0400
+@@ -0,0 +1,137 @@
++/* $OpenLDAP: pkg/ldap/libraries/libldap/ntlm.c,v 1.1.4.10 2002/01/04 20:38:21 kurt Exp $ */
++/*
++ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
++ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
++ */
++
++/* Mostly copied from sasl.c */
++
++#include "portable.h"
++
++#include <stdlib.h>
++#include <stdio.h>
++
++#include <ac/socket.h>
++#include <ac/string.h>
++#include <ac/time.h>
++#include <ac/errno.h>
++
++#include "ldap-int.h"
++
++int
++ldap_ntlm_bind(
++ LDAP *ld,
++ LDAP_CONST char *dn,
++ ber_tag_t tag,
++ struct berval *cred,
++ LDAPControl **sctrls,
++ LDAPControl **cctrls,
++ int *msgidp )
++{
++ BerElement *ber;
++ int rc;
++ ber_int_t id;
++
++ Debug( LDAP_DEBUG_TRACE, "ldap_ntlm_bind\n", 0, 0, 0 );
++
++ assert( ld != NULL );
++ assert( LDAP_VALID( ld ) );
++ assert( msgidp != NULL );
++
++ if( msgidp == NULL ) {
++ ld->ld_errno = LDAP_PARAM_ERROR;
++ return ld->ld_errno;
++ }
++
++ /* create a message to send */
++ if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
++ ld->ld_errno = LDAP_NO_MEMORY;
++ return ld->ld_errno;
++ }
++
++ assert( LBER_VALID( ber ) );
++
++ LDAP_NEXT_MSGID( ld, id );
++ rc = ber_printf( ber, "{it{istON}" /*}*/,
++ id, LDAP_REQ_BIND,
++ ld->ld_version, dn, tag,
++ cred );
++
++ /* Put Server Controls */
++ if( ldap_int_put_controls( ld, sctrls, ber ) != LDAP_SUCCESS ) {
++ ber_free( ber, 1 );
++ return ld->ld_errno;
++ }
++
++ if ( ber_printf( ber, /*{*/ "N}" ) == -1 ) {
++ ld->ld_errno = LDAP_ENCODING_ERROR;
++ ber_free( ber, 1 );
++ return ld->ld_errno;
++ }
++
++ /* send the message */
++ *msgidp = ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber, id );
++
++ if(*msgidp < 0)
++ return ld->ld_errno;
++
++ return LDAP_SUCCESS;
++}
++
++int
++ldap_parse_ntlm_bind_result(
++ LDAP *ld,
++ LDAPMessage *res,
++ struct berval *challenge)
++{
++ ber_int_t errcode;
++ ber_tag_t tag;
++ BerElement *ber;
++ ber_len_t len;
++
++ Debug( LDAP_DEBUG_TRACE, "ldap_parse_ntlm_bind_result\n", 0, 0, 0 );
++
++ assert( ld != NULL );
++ assert( LDAP_VALID( ld ) );
++ assert( res != NULL );
++
++ if ( ld == NULL || res == NULL ) {
++ return LDAP_PARAM_ERROR;
++ }
++
++ if( res->lm_msgtype != LDAP_RES_BIND ) {
++ ld->ld_errno = LDAP_PARAM_ERROR;
++ return ld->ld_errno;
++ }
++
++ if ( ld->ld_error ) {
++ LDAP_FREE( ld->ld_error );
++ ld->ld_error = NULL;
++ }
++ if ( ld->ld_matched ) {
++ LDAP_FREE( ld->ld_matched );
++ ld->ld_matched = NULL;
++ }
++
++ /* parse results */
++
++ ber = ber_dup( res->lm_ber );
++
++ if( ber == NULL ) {
++ ld->ld_errno = LDAP_NO_MEMORY;
++ return ld->ld_errno;
++ }
++
++ tag = ber_scanf( ber, "{ioa" /*}*/,
++ &errcode, challenge, &ld->ld_error );
++ ber_free( ber, 0 );
++
++ if( tag == LBER_ERROR ) {
++ ld->ld_errno = LDAP_DECODING_ERROR;
++ return ld->ld_errno;
++ }
++
++ ld->ld_errno = errcode;
++
++ return( ld->ld_errno );
++}
diff --git a/net-nds/openldap/files/openldap-2.3.21-ppolicy.patch b/net-nds/openldap/files/openldap-2.3.21-ppolicy.patch
new file mode 100644
index 000000000000..06bbee86f1c9
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.3.21-ppolicy.patch
@@ -0,0 +1,13 @@
+--- clients.orig/tools/common.c 2006-05-05 00:24:01.000000000 -0700
++++ clients/tools/common.c 2006-05-05 00:24:13.000000000 -0700
+@@ -904,8 +904,8 @@
+ tool_bind( LDAP *ld )
+ {
+ #ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
+- if ( ppolicy ) {
+ LDAPControl *ctrls[2], c;
++ if ( ppolicy ) {
+ c.ldctl_oid = LDAP_CONTROL_PASSWORDPOLICYREQUEST;
+ c.ldctl_value.bv_val = NULL;
+ c.ldctl_value.bv_len = 0;
+
diff --git a/net-nds/openldap/files/openldap-2.3.24-contrib-smbk5pwd.patch b/net-nds/openldap/files/openldap-2.3.24-contrib-smbk5pwd.patch
new file mode 100644
index 000000000000..091ff26a17b0
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.3.24-contrib-smbk5pwd.patch
@@ -0,0 +1,53 @@
+--- contrib/slapd-modules/smbk5pwd/Makefile.ORIG 2006-05-17 13:11:57.194660019 +0300
++++ contrib/slapd-modules/smbk5pwd/Makefile 2006-05-17 13:11:14.503082288 +0300
+@@ -9,29 +9,39 @@
+ # top-level directory of the distribution or, alternatively, at
+ # <http://www.OpenLDAP.org/license.html>.
+
++#libexecdir=/usr/lib/openldap
++moduledir=$(libexecdir)/openldap
+ LIBTOOL=../../../libtool
+-OPT=-g -O2
++#OPT=
+ CC=gcc
+
+ # Omit DO_KRB5 or DO_SAMBA if you don't want to support it.
+-DEFS=-DDO_KRB5 -DDO_SAMBA
++#DEFS=
+
+-HEIMDAL_INC=-I/usr/heimdal/include
++#KRB5_INC=
+ SSL_INC=
+ LDAP_INC=-I../../../include -I../../../servers/slapd
+-INCS=$(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC)
++INCS=$(LDAP_INC) $(SSL_INC) $(KRB5_INC)
+
+-HEIMDAL_LIB=-L/usr/heimdal/lib -lkrb5 -lkadm5srv
++KRB5_LIB=-lkrb5 -lkadm5srv
+ SSL_LIB=-lcrypto
+-LDAP_LIB=-lldap_r -llber
+-LIBS=$(LDAP_LIB) $(HEIMDAL_LIB) $(SSL_LIB)
+-
++LDAP_LIB=-L../../../libraries/libldap_r -lldap_r -llber
++ifneq (DDO_KRB5,$(findstring DDO_KRB5,$(DEFS)))
++ LIBS=$(LDAP_LIB) $(SSL_LIB)
++else
++ LIBS=$(LDAP_LIB) $(KRB5_LIB) $(SSL_LIB)
++endif
++
+ all: smbk5pwd.la
+
+
+ smbk5pwd.lo: smbk5pwd.c
+- $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $?
++ $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(DEFS) $(INCS) -c $?
+
+ smbk5pwd.la: smbk5pwd.lo
+- $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info 0:0:0 \
+- -rpath /usr/local/libexec/openldap -module -o $@ $? $(LIBS)
++ $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -version-info 0:0:0 \
++ -rpath $(moduledir) -module -o $@ $? $(LIBS)
++
++install-mod:
++ $(LIBTOOL) --mode=install ../../../build/shtool install -c \
++ -m 755 smbk5pwd.la $(DESTDIR)$(moduledir)
diff --git a/net-nds/openldap/files/openldap-2.3.34-slapd-conf b/net-nds/openldap/files/openldap-2.3.34-slapd-conf
new file mode 100644
index 000000000000..ad767cfdeb7c
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.3.34-slapd-conf
@@ -0,0 +1,64 @@
+#
+# See slapd.conf(5) for details on configuration options.
+# This file should NOT be world readable.
+#
+include /etc/openldap/schema/core.schema
+
+# Define global ACLs to disable default read access.
+
+# Do not enable referrals until AFTER you have a working directory
+# service AND an understanding of referrals.
+#referral ldap://root.openldap.org
+
+pidfile /var/run/openldap/slapd.pid
+argsfile /var/run/openldap/slapd.args
+
+# Load dynamic backend modules:
+###INSERTDYNAMICMODULESHERE###
+
+# Sample security restrictions
+# Require integrity protection (prevent hijacking)
+# Require 112-bit (3DES or better) encryption for updates
+# Require 63-bit encryption for simple bind
+# security ssf=1 update_ssf=112 simple_bind=64
+
+# Sample access control policy:
+# Root DSE: allow anyone to read it
+# Subschema (sub)entry DSE: allow anyone to read it
+# Other DSEs:
+# Allow self write access
+# Allow authenticated users read access
+# Allow anonymous users to authenticate
+# Directives needed to implement policy:
+# access to dn.base="" by * read
+# access to dn.base="cn=Subschema" by * read
+# access to *
+# by self write
+# by users read
+# by anonymous auth
+#
+# if no access controls are present, the default policy
+# allows anyone and everyone to read anything but restricts
+# updates to rootdn. (e.g., "access to * by * read")
+#
+# rootdn can always read and write EVERYTHING!
+
+#######################################################################
+# BDB database definitions
+#######################################################################
+
+database hdb
+suffix "dc=my-domain,dc=com"
+# <kbyte> <min>
+checkpoint 32 30
+rootdn "cn=Manager,dc=my-domain,dc=com"
+# Cleartext passwords, especially for the rootdn, should
+# be avoid. See slappasswd(8) and slapd.conf(5) for details.
+# Use of strong authentication encouraged.
+rootpw secret
+# The database directory MUST exist prior to running slapd AND
+# should only be accessible by the slapd and slap tools.
+# Mode 700 recommended.
+directory /var/lib/openldap-data
+# Indices to maintain
+index objectClass eq
diff --git a/net-nds/openldap/files/openldap-2.3.37-libldap_r.patch b/net-nds/openldap/files/openldap-2.3.37-libldap_r.patch
new file mode 100644
index 000000000000..d015bda2abbe
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.3.37-libldap_r.patch
@@ -0,0 +1,21 @@
+--- libraries/libldap_r/Makefile.in.old 2007-01-02 22:43:50.000000000 +0100
++++ libraries/libldap_r/Makefile.in 2007-08-22 13:32:20.000000000 +0200
+@@ -56,7 +56,7 @@
+ XXLIBS = $(SECURITY_LIBS) $(LUTIL_LIBS)
+ XXXLIBS = $(LTHREAD_LIBS)
+ NT_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
+-UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS)
++UNIX_LINK_LIBS = $(LDAP_LIBLBER_LA) $(AC_LIBS) $(SECURITY_LIBS) $(LTHREAD_LIBS)
+
+ .links : Makefile
+ @for i in $(XXSRCS); do \
+--- servers/slapd/slapi/Makefile.in.old 2007-01-02 22:44:10.000000000 +0100
++++ servers/slapd/slapi/Makefile.in 2007-08-22 14:58:51.000000000 +0200
+@@ -37,6 +37,7 @@
+ XLIBS = $(LIBRARY)
+ XXLIBS =
+ NT_LINK_LIBS = $(AC_LIBS)
++UNIX_LINK_LIBS = ../../../libraries/libldap_r/libldap_r.la $(LTHREAD_LIBS)
+
+ XINCPATH = -I$(srcdir)/.. -I$(srcdir)
+ XDEFS = $(MODULES_CPPFLAGS)
diff --git a/net-nds/openldap/files/openldap-2.3.43-fix-hang.patch b/net-nds/openldap/files/openldap-2.3.43-fix-hang.patch
new file mode 100644
index 000000000000..7e1f4457bd94
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.3.43-fix-hang.patch
@@ -0,0 +1,19 @@
+commit a3f40e5601c0c522f2bda418374fb415bdcbd75c
+Author: Quanah Gibson-Mount <quanah@openldap.org>
+Date: Thu Mar 24 02:25:49 2011 +0000
+
+ sl_busy is used as a boolean so just set it, don't increment it
+
+diff --git a/servers/slapd/daemon.c b/servers/slapd/daemon.c
+index 2a7a48e..df6d096 100644
+--- a/servers/slapd/daemon.c
++++ b/servers/slapd/daemon.c
+@@ -2098,7 +2098,7 @@ slap_listener_activate(
+ Debug( LDAP_DEBUG_TRACE, "slap_listener_activate(%d): %s\n",
+ sl->sl_sd, sl->sl_busy ? "busy" : "", 0 );
+
+- sl->sl_busy++;
++ sl->sl_busy = 1;
+
+ rc = ldap_pvt_thread_pool_submit( &connection_pool,
+ slap_listener_thread, (void *) sl );
diff --git a/net-nds/openldap/files/openldap-2.3.XY-gcc44.patch b/net-nds/openldap/files/openldap-2.3.XY-gcc44.patch
new file mode 100644
index 000000000000..0213d81dc85c
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.3.XY-gcc44.patch
@@ -0,0 +1,30 @@
+--- include/ldap_pvt_thread.h 2009-04-03 08:51:30.000000000 -0400
++++ include/ldap_pvt_thread.h 2009-04-03 08:56:36.000000000 -0400
+@@ -57,12 +57,12 @@
+
+ #ifndef LDAP_PVT_THREAD_H_DONE
+ #define LDAP_PVT_THREAD_SET_STACK_SIZE
+-#ifndef LDAP_PVT_THREAD_STACK_SIZE
+- /* LARGE stack. Will be twice as large on 64 bit machine. */
+-#define LDAP_PVT_THREAD_STACK_SIZE ( 1 * 1024 * 1024 * sizeof(void *) )
+ /* May be explicitly defined to zero to disable it */
+-#elif LDAP_PVT_THREAD_STACK_SIZE == 0
++#if defined( LDAP_PVT_THREAD_STACK_SIZE ) && LDAP_PVT_THREAD_STACK_SIZE == 0
+ #undef LDAP_PVT_THREAD_SET_STACK_SIZE
++#elif !defined(LDAP_PVT_THREAD_STACK_SIZE)
++ /* LARGE stack. Will be twice as large on 64 bit machine. */
++#define LDAP_PVT_THREAD_STACK_SIZE ( 1 * 1024 * 1024 * sizeof(void *) )
+ #endif
+ #endif /* !LDAP_PVT_THREAD_H_DONE */
+
+--- libraries/libldap/os-ip.c 2009-04-03 08:51:30.000000000 -0400
++++ libraries/libldap/os-ip.c 2009-04-03 08:54:47.000000000 -0400
+@@ -652,7 +652,7 @@
+ char *herr;
+ #ifdef NI_MAXHOST
+ char hbuf[NI_MAXHOST];
+-#elif defined( MAXHOSTNAMELEN
++#elif defined( MAXHOSTNAMELEN )
+ char hbuf[MAXHOSTNAMELEN];
+ #else
+ char hbuf[256];
diff --git a/net-nds/openldap/files/openldap-2.4.11-libldap_r.patch b/net-nds/openldap/files/openldap-2.4.11-libldap_r.patch
new file mode 100644
index 000000000000..448249a3b583
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.11-libldap_r.patch
@@ -0,0 +1,11 @@
+diff -Nuar openldap-2.4.11.orig/servers/slapd/slapi/Makefile.in openldap-2.4.11/servers/slapd/slapi/Makefile.in
+--- openldap-2.4.11.orig/servers/slapd/slapi/Makefile.in 2008-02-11 15:26:49.000000000 -0800
++++ openldap-2.4.11/servers/slapd/slapi/Makefile.in 2008-10-14 02:10:18.402799262 -0700
+@@ -37,6 +37,7 @@
+ XLIBS = $(LIBRARY)
+ XXLIBS =
+ NT_LINK_LIBS = $(AC_LIBS)
++UNIX_LINK_LIBS = ../../../libraries/libldap_r/libldap_r.la $(LTHREAD_LIBS)
+
+ XINCPATH = -I$(srcdir)/.. -I$(srcdir)
+ XDEFS = $(MODULES_CPPFLAGS)
diff --git a/net-nds/openldap/files/openldap-2.4.15-ppolicy.patch b/net-nds/openldap/files/openldap-2.4.15-ppolicy.patch
new file mode 100644
index 000000000000..3195ee550f68
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.15-ppolicy.patch
@@ -0,0 +1,12 @@
+--- openldap-2.4.15/clients/tools/common.c.orig 2009-02-05 15:05:03.000000000 -0800
++++ openldap-2.4.15/clients/tools/common.c 2009-03-21 01:45:14.000000000 -0700
+@@ -1315,8 +1315,8 @@
+ int nsctrls = 0;
+
+ #ifdef LDAP_CONTROL_PASSWORDPOLICYREQUEST
++ LDAPControl c;
+ if ( ppolicy ) {
+- LDAPControl c;
+ c.ldctl_oid = LDAP_CONTROL_PASSWORDPOLICYREQUEST;
+ c.ldctl_value.bv_val = NULL;
+ c.ldctl_value.bv_len = 0;
diff --git a/net-nds/openldap/files/openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch b/net-nds/openldap/files/openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch
new file mode 100644
index 000000000000..e5117468f809
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.17-fix-lmpasswd-gnutls-symbols.patch
@@ -0,0 +1,109 @@
+If GnuTLS is used, the lmpasswd module for USE=samba does not compile.
+Forward-port an old Debian patch that upstream never applied.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+Signed-off-by: Steffen Hau <steffen@hauihau.de>
+X-Gentoo-Bug: http://bugs.gentoo.org/show_bug.cgi?id=233633
+X-Upstream-Bug: http://www.openldap.org/its/index.cgi/Software%20Enhancements?id=4997
+X-Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=245341
+
+--- openldap-2.4.17.orig/libraries/liblutil/passwd.c 2009-07-27 18:59:19.635995474 -0700
++++ openldap-2.4.17/libraries/liblutil/passwd.c 2009-07-27 19:01:13.588069010 -0700
+@@ -51,6 +51,26 @@ typedef unsigned char des_data_block[8];
+ typedef PK11Context *des_context[1];
+ #define DES_ENCRYPT CKA_ENCRYPT
+
++#elif defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
++# include <gcrypt.h>
++static int gcrypt_init = 0;
++
++typedef const void* des_key;
++typedef unsigned char des_cblock[8];
++typedef des_cblock des_data_block;
++typedef int des_key_schedule; /* unused */
++typedef des_key_schedule des_context; /* unused */
++#define des_failed(encrypted) 0
++#define des_finish(key, schedule)
++
++#define des_set_key_unchecked( key, key_sched ) \
++ gcry_cipher_setkey( hd, key, 8 )
++
++#define des_ecb_encrypt( input, output, key_sched, enc ) \
++ gcry_cipher_encrypt( hd, *output, 8, *input, 8 )
++
++#define des_set_odd_parity( key ) do {} while(0)
++
+ #endif
+
+ #endif /* SLAPD_LMHASH */
+@@ -651,7 +671,7 @@ static int chk_md5(
+
+ #ifdef SLAPD_LMHASH
+
+-#if defined(HAVE_OPENSSL)
++#if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS_GNUTLS_H)
+
+ /*
+ * abstract away setting the parity.
+@@ -841,6 +861,19 @@ static int chk_lanman(
+ des_data_block StdText = "KGS!@#$%";
+ des_data_block PasswordHash1, PasswordHash2;
+ char PasswordHash[33], storedPasswordHash[33];
++
++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
++ gcry_cipher_hd_t hd;
++
++ if ( !gcrypt_init ) {
++ gcry_check_version( GCRYPT_VERSION );
++ gcrypt_init = 1;
++ }
++
++ schedule = schedule; /* unused - avoid warning */
++
++ gcry_cipher_open( &hd, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0 );
++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */
+
+ for( i=0; i<cred->bv_len; i++) {
+ if(cred->bv_val[i] == '\0') {
+@@ -883,6 +916,10 @@ static int chk_lanman(
+ strncpy( storedPasswordHash, passwd->bv_val, 32 );
+ storedPasswordHash[32] = '\0';
+ ldap_pvt_str2lower( storedPasswordHash );
++
++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
++ gcry_cipher_close( hd );
++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */
+
+ return memcmp( PasswordHash, storedPasswordHash, 32) ? LUTIL_PASSWD_ERR : LUTIL_PASSWD_OK;
+ }
+@@ -1138,6 +1175,19 @@ static int hash_lanman(
+ des_data_block PasswordHash1, PasswordHash2;
+ char PasswordHash[33];
+
++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
++ gcry_cipher_hd_t hd;
++
++ if ( !gcrypt_init ) {
++ gcry_check_version( GCRYPT_VERSION );
++ gcrypt_init = 1;
++ }
++
++ schedule = schedule; /* unused - avoid warning */
++
++ gcry_cipher_open( &hd, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0 );
++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */
++
+ for( i=0; i<passwd->bv_len; i++) {
+ if(passwd->bv_val[i] == '\0') {
+ return LUTIL_PASSWD_ERR; /* NUL character in password */
+@@ -1168,6 +1218,10 @@ static int hash_lanman(
+
+ hash->bv_val = PasswordHash;
+ hash->bv_len = 32;
++
++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
++ gcry_cipher_close( hd );
++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */
+
+ return pw_string( scheme, hash );
+ }
diff --git a/net-nds/openldap/files/openldap-2.4.17-gcc44.patch b/net-nds/openldap/files/openldap-2.4.17-gcc44.patch
new file mode 100644
index 000000000000..aa7fe7ac35f6
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.17-gcc44.patch
@@ -0,0 +1,11 @@
+diff -ur openldap-2.4.17.orig/contrib/ldapc++/src/SaslInteractionHandler.cpp openldap-2.4.17/contrib/ldapc++/src/SaslInteractionHandler.cpp
+--- openldap-2.4.17.orig/contrib/ldapc++/src/SaslInteractionHandler.cpp 2008-04-15 02:09:26.000000000 +0300
++++ openldap-2.4.17/contrib/ldapc++/src/SaslInteractionHandler.cpp 2009-08-10 13:21:24.000000000 +0300
+@@ -13,6 +13,7 @@
+ #include <termios.h>
+ #endif
+
++#include <stdio.h>
+ #include <string.h>
+ #include "SaslInteractionHandler.h"
+ #include "SaslInteraction.h"
diff --git a/net-nds/openldap/files/openldap-2.4.28-fix-dash.patch b/net-nds/openldap/files/openldap-2.4.28-fix-dash.patch
new file mode 100644
index 000000000000..d15c3d2231f4
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.28-fix-dash.patch
@@ -0,0 +1,26 @@
+Our libtool needs bash to work properly.
+Patch unbreaks build when /bin/sh points to dash:
+
+ Entering subdirectory liblber
+ /bin/sh ../../libtool --mode=compile x86_64-pc-linux-gnu-gcc -O0 -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.8 -DLDAP_CONNECTIONLESS -DLBER_LIBRARY -c assert.c
+ ../../build/mkversion -v "2.4.28" liblber.la > version.c
+ /bin/sh ../../libtool --mode=compile x86_64-pc-linux-gnu-gcc -O0 -D_GNU_SOURCE -I../../include -I../../include -I/usr/include/db4.8 -DLDAP_CONNECTIONLESS -DLBER_LIBRARY -c decode.c
+ eval: 1: base_compile+= x86_64-pc-linux-gnu-gcc: not found
+ eval: 1: base_compile+= -O0: not found
+ eval: 1: base_compile+= -D_GNU_SOURCE: not found
+ eval: 1: base_compile+= x86_64-pc-linux-gnu-gcc: not found
+ ...
+ make[2]: *** [decode.lo] Error 1
+diff --git a/build/top.mk b/build/top.mk
+index 6fea488..ea324e3 100644
+--- a/build/top.mk
++++ b/build/top.mk
+@@ -20,7 +20,7 @@ VERSION= @VERSION@
+ RELEASEDATE= @OPENLDAP_RELEASE_DATE@
+
+ @SET_MAKE@
+-SHELL = /bin/sh
++SHELL = @SHELL@
+
+ top_builddir = @top_builddir@
+
diff --git a/net-nds/openldap/files/openldap-2.4.28-gnutls-gcrypt.patch b/net-nds/openldap/files/openldap-2.4.28-gnutls-gcrypt.patch
new file mode 100644
index 000000000000..aeecb0f40132
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.28-gnutls-gcrypt.patch
@@ -0,0 +1,11 @@
+--- openldap-2.4.28/configure.in.orig 2012-02-11 22:40:36.004360795 +0000
++++ openldap-2.4.28/configure.in 2012-02-11 22:40:13.410986851 +0000
+@@ -1214,7 +1214,7 @@
+ ol_with_tls=gnutls
+ ol_link_tls=yes
+
+- TLS_LIBS="-lgnutls"
++ TLS_LIBS="-lgnutls -lgcrypt"
+
+ AC_DEFINE(HAVE_GNUTLS, 1,
+ [define if you have GNUtls])
diff --git a/net-nds/openldap/files/openldap-2.4.31-gcc47.patch b/net-nds/openldap/files/openldap-2.4.31-gcc47.patch
new file mode 100644
index 000000000000..5b6af4b29564
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.31-gcc47.patch
@@ -0,0 +1,16 @@
+Fix building with gcc-4.7
+
+https://bugs.gentoo.org/show_bug.cgi?id=420959
+http://www.openldap.org/its/index.cgi/Incoming?id=7304;page=16 #ITS 7304
+
+Patch written by Kacper Kowalik <xarthisius@gentoo.org>
+--- a/contrib/ldapc++/src/SaslInteractionHandler.cpp
++++ b/contrib/ldapc++/src/SaslInteractionHandler.cpp
+@@ -16,6 +16,7 @@
+
+ #include <stdio.h>
+ #include <string.h>
++#include <unistd.h>
+ #include "SaslInteractionHandler.h"
+ #include "SaslInteraction.h"
+ #include "debug.h"
diff --git a/net-nds/openldap/files/openldap-2.4.35-contrib-samba4.patch b/net-nds/openldap/files/openldap-2.4.35-contrib-samba4.patch
new file mode 100644
index 000000000000..4312dc7c55ea
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.35-contrib-samba4.patch
@@ -0,0 +1,38 @@
+diff -Nuar openldap-2.4.35.orig/contrib/slapd-modules/samba4/Makefile openldap-2.4.35/contrib/slapd-modules/samba4/Makefile
+--- openldap-2.4.35.orig/contrib/slapd-modules/samba4/Makefile 2013-03-28 15:41:51.000000000 +0000
++++ openldap-2.4.35/contrib/slapd-modules/samba4/Makefile 2013-04-16 02:16:40.651868432 +0000
+@@ -20,7 +20,8 @@
+
+ LIBTOOL = $(LDAP_BUILD)/libtool
+ CC = gcc
+-OPT = -g -O2 -Wall
++#OPT = -g -O2 -Wall
++OPT = -Wall
+ DEFS = -DSLAPD_OVER_RDNVAL=SLAPD_MOD_DYNAMIC \
+ -DSLAPD_OVER_PGUID=SLAPD_MOD_DYNAMIC \
+ -DSLAPD_OVER_VERNUM=SLAPD_MOD_DYNAMIC
+@@ -41,20 +42,20 @@
+ .SUFFIXES: .c .o .lo
+
+ .c.lo:
+- $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
++ $(LIBTOOL) --mode=compile $(CC) $(OPT) $(CFLAGS) $(DEFS) $(INCS) -c $<
+
+ all: $(PROGRAMS)
+
+ pguid.la: pguid.lo
+- $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
++ $(LIBTOOL) --mode=link $(CC) $(OPT) $(CFLAGS) -version-info $(LTVER) \
+ -rpath $(moduledir) -module -o $@ $? $(LIBS)
+
+ rdnval.la: rdnval.lo
+- $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
++ $(LIBTOOL) --mode=link $(CC) $(OPT) $(CFLAGS) -version-info $(LTVER) \
+ -rpath $(moduledir) -module -o $@ $? $(LIBS)
+
+ vernum.la: vernum.lo
+- $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
++ $(LIBTOOL) --mode=link $(CC) $(OPT) $(CFLAGS) -version-info $(LTVER) \
+ -rpath $(moduledir) -module -o $@ $? $(LIBS)
+
+ clean:
diff --git a/net-nds/openldap/files/openldap-2.4.35-contrib-smbk5pwd.patch b/net-nds/openldap/files/openldap-2.4.35-contrib-smbk5pwd.patch
new file mode 100644
index 000000000000..4383802a0ead
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.35-contrib-smbk5pwd.patch
@@ -0,0 +1,48 @@
+diff -Nuar openldap-2.4.35.orig/contrib/slapd-modules/smbk5pwd/Makefile openldap-2.4.35/contrib/slapd-modules/smbk5pwd/Makefile
+--- openldap-2.4.35.orig/contrib/slapd-modules/smbk5pwd/Makefile 2013-03-28 15:41:51.000000000 +0000
++++ openldap-2.4.35/contrib/slapd-modules/smbk5pwd/Makefile 2013-04-16 02:13:38.939913119 +0000
+@@ -21,16 +21,23 @@
+ SSL_INC =
+ SSL_LIB = -lcrypto
+
+-HEIMDAL_INC = -I/usr/heimdal/include
+-HEIMDAL_LIB = -L/usr/heimdal/lib -lkrb5 -lkadm5srv
++#HEIMDAL_INC = -I/usr/heimdal/include
++#HEIMDAL_LIB = -L/usr/heimdal/lib -lkrb5 -lkadm5srv
++KRB5_INC = $(HEIMDAL_INC)
++KRB5_LIB = $(HEIMDAL_LIB) -lkrb5 -lkadm5srv
+
+ LIBTOOL = $(LDAP_BUILD)/libtool
+ CC = gcc
+-OPT = -g -O2 -Wall
++#OPT = -g -O2 -Wall
++OPT = -Wall
+ # Omit DO_KRB5, DO_SAMBA or DO_SHADOW if you don't want to support it.
+-DEFS = -DDO_KRB5 -DDO_SAMBA -DDO_SHADOW
+-INCS = $(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC)
+-LIBS = $(LDAP_LIB) $(HEIMDAL_LIB) $(SSL_LIB)
++#DEFS = -DDO_KRB5 -DDO_SAMBA -DDO_SHADOW
++INCS = $(LDAP_INC) $(KRB5_INC) $(SSL_INC)
++ifneq (DDO_KRB5,$(findstring DDO_KRB5,$(DEFS)))
++ LIBS=$(LDAP_LIB) $(SSL_LIB)
++else
++ LIBS=$(LDAP_LIB) $(KRB5_LIB) $(SSL_LIB)
++endif
+
+ PROGRAMS = smbk5pwd.la
+ LTVER = 0:0:0
+@@ -46,12 +53,12 @@
+ .SUFFIXES: .c .o .lo
+
+ .c.lo:
+- $(LIBTOOL) --mode=compile $(CC) $(OPT) $(DEFS) $(INCS) -c $<
++ $(LIBTOOL) --mode=compile $(CC) $(OPT) $(CFLAGS) $(DEFS) $(INCS) -c $<
+
+ all: $(PROGRAMS)
+
+ smbk5pwd.la: smbk5pwd.lo
+- $(LIBTOOL) --mode=link $(CC) $(OPT) -version-info $(LTVER) \
++ $(LIBTOOL) --mode=link $(CC) $(OPT) $(CFLAGS) -version-info $(LTVER) \
+ -rpath $(moduledir) -module -o $@ $? $(LIBS)
+
+ clean:
diff --git a/net-nds/openldap/files/openldap-2.4.40-slapd-conf b/net-nds/openldap/files/openldap-2.4.40-slapd-conf
new file mode 100644
index 000000000000..8ecc732b9672
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.40-slapd-conf
@@ -0,0 +1,64 @@
+#
+# See slapd.conf(5) for details on configuration options.
+# This file should NOT be world readable.
+#
+include /etc/openldap/schema/core.schema
+
+# Define global ACLs to disable default read access.
+
+# Do not enable referrals until AFTER you have a working directory
+# service AND an understanding of referrals.
+#referral ldap://root.openldap.org
+
+pidfile /run/openldap/slapd.pid
+argsfile /run/openldap/slapd.args
+
+# Load dynamic backend modules:
+###INSERTDYNAMICMODULESHERE###
+
+# Sample security restrictions
+# Require integrity protection (prevent hijacking)
+# Require 112-bit (3DES or better) encryption for updates
+# Require 63-bit encryption for simple bind
+# security ssf=1 update_ssf=112 simple_bind=64
+
+# Sample access control policy:
+# Root DSE: allow anyone to read it
+# Subschema (sub)entry DSE: allow anyone to read it
+# Other DSEs:
+# Allow self write access
+# Allow authenticated users read access
+# Allow anonymous users to authenticate
+# Directives needed to implement policy:
+# access to dn.base="" by * read
+# access to dn.base="cn=Subschema" by * read
+# access to *
+# by self write
+# by users read
+# by anonymous auth
+#
+# if no access controls are present, the default policy
+# allows anyone and everyone to read anything but restricts
+# updates to rootdn. (e.g., "access to * by * read")
+#
+# rootdn can always read and write EVERYTHING!
+
+#######################################################################
+# BDB database definitions
+#######################################################################
+
+database hdb
+suffix "dc=my-domain,dc=com"
+# <kbyte> <min>
+checkpoint 32 30
+rootdn "cn=Manager,dc=my-domain,dc=com"
+# Cleartext passwords, especially for the rootdn, should
+# be avoid. See slappasswd(8) and slapd.conf(5) for details.
+# Use of strong authentication encouraged.
+rootpw secret
+# The database directory MUST exist prior to running slapd AND
+# should only be accessible by the slapd and slap tools.
+# Mode 700 recommended.
+directory /var/lib/openldap-data
+# Indices to maintain
+index objectClass eq
diff --git a/net-nds/openldap/files/openldap-2.4.42-mdb-unbundle.patch b/net-nds/openldap/files/openldap-2.4.42-mdb-unbundle.patch
new file mode 100644
index 000000000000..9265a01701ab
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.42-mdb-unbundle.patch
@@ -0,0 +1,136 @@
+--- ./build/top.mk.orig 2014-10-24 14:34:59.260827298 +0200
++++ ./build/top.mk 2014-10-24 14:35:25.281168893 +0200
+@@ -160,6 +160,7 @@
+ LTHREAD_LIBS = @LTHREAD_LIBS@
+
+ BDB_LIBS = @BDB_LIBS@
++MDB_LIBS = @MDB_LIBS@
+ SLAPD_NDB_LIBS = @SLAPD_NDB_LIBS@
+
+ LDAP_LIBLBER_LA = $(LDAP_LIBDIR)/liblber/liblber.la
+--- ./build/openldap.m4.orig 2014-10-24 10:52:02.837221734 +0200
++++ ./build/openldap.m4 2014-10-24 11:31:02.748087966 +0200
+@@ -563,6 +563,38 @@
+ ], [ol_cv_bdb_compat=yes], [ol_cv_bdb_compat=no])])
+ ])
+
++dnl --------------------------------------------------------------------
++dnl Check for version compatility with back-mdb
++AC_DEFUN([OL_MDB_COMPAT],
++[AC_CACHE_CHECK([if LMDB version supported by MDB backends], [ol_cv_mdb_compat],[
++ AC_EGREP_CPP(__mdb_version_compat,[
++#include <lmdb.h>
++
++/* require 0.9.14 or later */
++#if MDB_VERSION_FULL >= 0x00000009000E
++ __mdb_version_compat
++#endif
++ ], [ol_cv_mdb_compat=yes], [ol_cv_mdb_compat=no])])
++])
++
++dnl
++dnl --------------------------------------------------------------------
++dnl Find any MDB
++AC_DEFUN([OL_MDB],
++[ol_cv_mdb=no
++AC_CHECK_HEADERS(lmdb.h)
++if test $ac_cv_header_lmdb_h = yes; then
++ OL_MDB_COMPAT
++
++ if test $ol_cv_mdb_compat != yes ; then
++ AC_MSG_ERROR([LMDB version incompatible with MDB backends])
++ fi
++
++ ol_cv_lib_mdb=-llmdb
++ ol_cv_mdb=yes
++fi
++])
++
+ dnl
+ dnl ====================================================================
+ dnl Check POSIX Thread version
+--- ./servers/slapd/back-mdb/Makefile.in.orig 2014-10-24 10:31:30.860931076 +0200
++++ ./servers/slapd/back-mdb/Makefile.in 2014-10-24 14:33:33.803705424 +0200
+@@ -25,11 +25,10 @@
+ extended.lo operational.lo \
+ attr.lo index.lo key.lo filterindex.lo \
+ dn2entry.lo dn2id.lo id2entry.lo idl.lo \
+- nextid.lo monitor.lo mdb.lo midl.lo
++ nextid.lo monitor.lo
+
+ LDAP_INCDIR= ../../../include
+ LDAP_LIBDIR= ../../../libraries
+-MDB_SUBDIR = $(srcdir)/$(LDAP_LIBDIR)/liblmdb
+
+ BUILD_OPT = "--enable-mdb"
+ BUILD_MOD = @BUILD_MDB@
+@@ -44,7 +43,7 @@
+
+ LIBBASE = back_mdb
+
+-XINCPATH = -I.. -I$(srcdir)/.. -I$(MDB_SUBDIR)
++XINCPATH = -I.. -I$(srcdir)/..
+ XDEFS = $(MODULES_CPPFLAGS)
+
+ all-local-lib: ../.backend
+@@ -52,11 +51,5 @@
+ ../.backend: lib$(LIBBASE).a
+ @touch $@
+
+-mdb.lo: $(MDB_SUBDIR)/mdb.c
+- $(LTCOMPILE_MOD) $(MDB_SUBDIR)/mdb.c
+-
+-midl.lo: $(MDB_SUBDIR)/midl.c
+- $(LTCOMPILE_MOD) $(MDB_SUBDIR)/midl.c
+-
+ veryclean-local-lib: FORCE
+ $(RM) $(XXHEADERS) $(XXSRCS) .links
+--- ./configure.in.orig 2014-10-24 10:46:53.289139847 +0200
++++ ./configure.in 2014-10-24 10:51:34.372846374 +0200
+@@ -519,6 +519,7 @@
+ dnl Initialize vars
+ LDAP_LIBS=
+ BDB_LIBS=
++MDB_LIBS=
+ SLAPD_NDB_LIBS=
+ SLAPD_NDB_INCS=
+ LTHREAD_LIBS=
+@@ -1905,6 +1906,30 @@
+ fi
+
+ dnl ----------------------------------------------------------------
++ol_link_mdb=no
++
++if test $ol_enable_mdb != no; then
++ OL_MDB
++
++ if test $ol_cv_mdb = no ; then
++ AC_MSG_ERROR(MDB: LMDB not available)
++ fi
++
++ AC_DEFINE(HAVE_MDB,1,
++ [define this if LMDB is available])
++
++ dnl $ol_cv_lib_mdb should be yes or -llmdb
++ dnl (it could be no, but that would be an error
++ if test $ol_cv_lib_mdb != yes ; then
++ MDB_LIBS="$MDB_LIBS $ol_cv_lib_mdb"
++ fi
++
++ SLAPD_LIBS="$SLAPD_LIBS \$(MDB_LIBS)"
++
++ ol_link_mdb=yes
++fi
++
++dnl ----------------------------------------------------------------
+
+ if test $ol_enable_dynamic = yes && test $enable_shared = yes ; then
+ BUILD_LIBS_DYNAMIC=shared
+@@ -3133,6 +3158,7 @@
+ AC_SUBST(LDAP_LIBS)
+ AC_SUBST(SLAPD_LIBS)
+ AC_SUBST(BDB_LIBS)
++AC_SUBST(MDB_LIBS)
+ AC_SUBST(SLAPD_NDB_LIBS)
+ AC_SUBST(SLAPD_NDB_INCS)
+ AC_SUBST(LTHREAD_LIBS)
diff --git a/net-nds/openldap/files/openldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch b/net-nds/openldap/files/openldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch
new file mode 100644
index 000000000000..29688fcb14c8
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch
@@ -0,0 +1,109 @@
+If GnuTLS is used, the lmpasswd module for USE=samba does not compile.
+Forward-port an old Debian patch that upstream never applied.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+Signed-off-by: Steffen Hau <steffen@hauihau.de>
+X-Gentoo-Bug: http://bugs.gentoo.org/show_bug.cgi?id=233633
+X-Upstream-Bug: http://www.openldap.org/its/index.cgi/Software%20Enhancements?id=4997
+X-Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=245341
+
+--- openldap-2.4.17.orig/libraries/liblutil/passwd.c 2009-07-27 18:59:19.635995474 -0700
++++ openldap-2.4.17/libraries/liblutil/passwd.c 2009-07-27 19:01:13.588069010 -0700
+@@ -51,6 +51,26 @@ typedef unsigned char des_data_block[8];
+ typedef PK11Context *des_context[1];
+ #define DES_ENCRYPT CKA_ENCRYPT
+
++#elif defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
++# include <gcrypt.h>
++static int gcrypt_init = 0;
++
++typedef const void* des_key;
++typedef unsigned char DES_cblock[8];
++typedef DES_cblock des_data_block;
++typedef int DES_key_schedule; /* unused */
++typedef DES_key_schedule des_context; /* unused */
++#define des_failed(encrypted) 0
++#define des_finish(key, schedule)
++
++#define DES_set_key_unchecked( key, key_sched ) \
++ gcry_cipher_setkey( hd, key, 8 )
++
++#define DES_ecb_encrypt( input, output, key_sched, enc ) \
++ gcry_cipher_encrypt( hd, *output, 8, *input, 8 )
++
++#define DES_set_odd_parity( key ) do {} while(0)
++
+ #endif
+
+ #endif /* SLAPD_LMHASH */
+@@ -651,7 +671,7 @@ static int chk_md5(
+
+ #ifdef SLAPD_LMHASH
+
+-#if defined(HAVE_OPENSSL)
++#if defined(HAVE_OPENSSL) || defined(HAVE_GNUTLS_GNUTLS_H)
+
+ /*
+ * abstract away setting the parity.
+@@ -841,6 +861,19 @@ static int chk_lanman(
+ des_data_block StdText = "KGS!@#$%";
+ des_data_block PasswordHash1, PasswordHash2;
+ char PasswordHash[33], storedPasswordHash[33];
++
++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
++ gcry_cipher_hd_t hd;
++
++ if ( !gcrypt_init ) {
++ gcry_check_version( GCRYPT_VERSION );
++ gcrypt_init = 1;
++ }
++
++ schedule = schedule; /* unused - avoid warning */
++
++ gcry_cipher_open( &hd, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0 );
++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */
+
+ for( i=0; i<cred->bv_len; i++) {
+ if(cred->bv_val[i] == '\0') {
+@@ -883,6 +916,10 @@ static int chk_lanman(
+ strncpy( storedPasswordHash, passwd->bv_val, 32 );
+ storedPasswordHash[32] = '\0';
+ ldap_pvt_str2lower( storedPasswordHash );
++
++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
++ gcry_cipher_close( hd );
++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */
+
+ return memcmp( PasswordHash, storedPasswordHash, 32) ? LUTIL_PASSWD_ERR : LUTIL_PASSWD_OK;
+ }
+@@ -1138,6 +1175,19 @@ static int hash_lanman(
+ des_data_block PasswordHash1, PasswordHash2;
+ char PasswordHash[33];
+
++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
++ gcry_cipher_hd_t hd;
++
++ if ( !gcrypt_init ) {
++ gcry_check_version( GCRYPT_VERSION );
++ gcrypt_init = 1;
++ }
++
++ schedule = schedule; /* unused - avoid warning */
++
++ gcry_cipher_open( &hd, GCRY_CIPHER_DES, GCRY_CIPHER_MODE_ECB, 0 );
++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */
++
+ for( i=0; i<passwd->bv_len; i++) {
+ if(passwd->bv_val[i] == '\0') {
+ return LUTIL_PASSWD_ERR; /* NUL character in password */
+@@ -1168,6 +1218,10 @@ static int hash_lanman(
+
+ hash->bv_val = PasswordHash;
+ hash->bv_len = 32;
++
++#if defined(HAVE_GNUTLS_GNUTLS_H) && !defined(DES_ENCRYPT)
++ gcry_cipher_close( hd );
++#endif /* HAVE_GNUTLS_GNUTLS_H && !DES_ENCRYPT */
+
+ return pw_string( scheme, hash );
+ }
diff --git a/net-nds/openldap/files/openldap-2.4.45-libressl.patch b/net-nds/openldap/files/openldap-2.4.45-libressl.patch
new file mode 100644
index 000000000000..20a65a4e0fd1
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.45-libressl.patch
@@ -0,0 +1,65 @@
+--- libraries/libldap/tls_o.c.orig 2017-06-04 16:31:28 UTC
++++ libraries/libldap/tls_o.c
+@@ -47,7 +47,7 @@
+ #include <ssl.h>
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000
++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
+ #define ASN1_STRING_data(x) ASN1_STRING_get0_data(x)
+ #endif
+
+@@ -157,7 +157,7 @@ tlso_init( void )
+ (void) tlso_seed_PRNG( lo->ldo_tls_randfile );
+ #endif
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+ SSL_load_error_strings();
+ SSL_library_init();
+ OpenSSL_add_all_digests();
+@@ -205,7 +205,7 @@ static void
+ tlso_ctx_ref( tls_ctx *ctx )
+ {
+ tlso_ctx *c = (tlso_ctx *)ctx;
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+ #define SSL_CTX_up_ref(ctx) CRYPTO_add( &(ctx->references), 1, CRYPTO_LOCK_SSL_CTX )
+ #endif
+ SSL_CTX_up_ref( c );
+@@ -464,7 +464,7 @@ tlso_session_my_dn( tls_session *sess, struct berval *
+ if (!x) return LDAP_INVALID_CREDENTIALS;
+
+ xn = X509_get_subject_name(x);
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+ der_dn->bv_len = i2d_X509_NAME( xn, NULL );
+ der_dn->bv_val = xn->bytes->data;
+ #else
+@@ -500,7 +500,7 @@ tlso_session_peer_dn( tls_session *sess, struct berval
+ return LDAP_INVALID_CREDENTIALS;
+
+ xn = X509_get_subject_name(x);
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+ der_dn->bv_len = i2d_X509_NAME( xn, NULL );
+ der_dn->bv_val = xn->bytes->data;
+ #else
+@@ -721,7 +721,7 @@ struct tls_data {
+ Sockbuf_IO_Desc *sbiod;
+ };
+
+-#if OPENSSL_VERSION_NUMBER < 0x10100000
++#if OPENSSL_VERSION_NUMBER < 0x10100000 || defined(LIBRESSL_VERSION_NUMBER)
+ #define BIO_set_init(b, x) b->init = x
+ #define BIO_set_data(b, x) b->ptr = x
+ #define BIO_clear_flags(b, x) b->flags &= ~(x)
+@@ -822,7 +822,7 @@ tlso_bio_puts( BIO *b, const char *str )
+ return tlso_bio_write( b, str, strlen( str ) );
+ }
+
+-#if OPENSSL_VERSION_NUMBER >= 0x10100000
++#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
+ struct bio_method_st {
+ int type;
+ const char *name;
diff --git a/net-nds/openldap/files/openldap-2.4.6-evolution-ntlm.patch b/net-nds/openldap/files/openldap-2.4.6-evolution-ntlm.patch
new file mode 100644
index 000000000000..33ff29e0aed2
--- /dev/null
+++ b/net-nds/openldap/files/openldap-2.4.6-evolution-ntlm.patch
@@ -0,0 +1,192 @@
+diff -up evo-openldap-2.4.14/include/ldap.h.evolution-ntlm evo-openldap-2.4.14/include/ldap.h
+--- evo-openldap-2.4.14/include/ldap.h.evolution-ntlm 2009-01-27 00:29:53.000000000 +0100
++++ evo-openldap-2.4.14/include/ldap.h 2009-02-17 10:10:00.000000000 +0100
+@@ -2461,5 +2461,26 @@ ldap_parse_deref_control LDAP_P((
+ LDAPControl **ctrls,
+ LDAPDerefRes **drp ));
+
++/*
++ * hacks for NTLM
++ */
++#define LDAP_AUTH_NTLM_REQUEST ((ber_tag_t) 0x8aU)
++#define LDAP_AUTH_NTLM_RESPONSE ((ber_tag_t) 0x8bU)
++LDAP_F( int )
++ldap_ntlm_bind LDAP_P((
++ LDAP *ld,
++ LDAP_CONST char *dn,
++ ber_tag_t tag,
++ struct berval *cred,
++ LDAPControl **sctrls,
++ LDAPControl **cctrls,
++ int *msgidp ));
++LDAP_F( int )
++ldap_parse_ntlm_bind_result LDAP_P((
++ LDAP *ld,
++ LDAPMessage *res,
++ struct berval *challenge));
++
++
+ LDAP_END_DECL
+ #endif /* _LDAP_H */
+diff -up evo-openldap-2.4.14/libraries/libldap/Makefile.in.evolution-ntlm evo-openldap-2.4.14/libraries/libldap/Makefile.in
+--- evo-openldap-2.4.14/libraries/libldap/Makefile.in.evolution-ntlm 2009-01-27 00:29:53.000000000 +0100
++++ evo-openldap-2.4.14/libraries/libldap/Makefile.in 2009-02-17 10:10:00.000000000 +0100
+@@ -20,7 +20,7 @@ PROGRAMS = apitest dntest ftest ltest ur
+ SRCS = bind.c open.c result.c error.c compare.c search.c \
+ controls.c messages.c references.c extended.c cyrus.c \
+ modify.c add.c modrdn.c delete.c abandon.c \
+- sasl.c gssapi.c sbind.c unbind.c cancel.c \
++ sasl.c ntlm.c gssapi.c sbind.c unbind.c cancel.c \
+ filter.c free.c sort.c passwd.c whoami.c \
+ getdn.c getentry.c getattr.c getvalues.c addentry.c \
+ request.c os-ip.c url.c pagectrl.c sortctrl.c vlvctrl.c \
+@@ -33,7 +33,7 @@ SRCS = bind.c open.c result.c error.c co
+ OBJS = bind.lo open.lo result.lo error.lo compare.lo search.lo \
+ controls.lo messages.lo references.lo extended.lo cyrus.lo \
+ modify.lo add.lo modrdn.lo delete.lo abandon.lo \
+- sasl.lo gssapi.lo sbind.lo unbind.lo cancel.lo \
++ sasl.lo ntlm.lo gssapi.lo sbind.lo unbind.lo cancel.lo \
+ filter.lo free.lo sort.lo passwd.lo whoami.lo \
+ getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \
+ request.lo os-ip.lo url.lo pagectrl.lo sortctrl.lo vlvctrl.lo \
+diff -up /dev/null evo-openldap-2.4.14/libraries/libldap/ntlm.c
+--- /dev/null 2009-02-17 09:19:52.829004420 +0100
++++ evo-openldap-2.4.14/libraries/libldap/ntlm.c 2009-02-17 10:10:00.000000000 +0100
+@@ -0,0 +1,137 @@
++/* $OpenLDAP: pkg/ldap/libraries/libldap/ntlm.c,v 1.1.4.10 2002/01/04 20:38:21 kurt Exp $ */
++/*
++ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
++ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
++ */
++
++/* Mostly copied from sasl.c */
++
++#include "portable.h"
++
++#include <stdlib.h>
++#include <stdio.h>
++
++#include <ac/socket.h>
++#include <ac/string.h>
++#include <ac/time.h>
++#include <ac/errno.h>
++
++#include "ldap-int.h"
++
++int
++ldap_ntlm_bind(
++ LDAP *ld,
++ LDAP_CONST char *dn,
++ ber_tag_t tag,
++ struct berval *cred,
++ LDAPControl **sctrls,
++ LDAPControl **cctrls,
++ int *msgidp )
++{
++ BerElement *ber;
++ int rc;
++ ber_int_t id;
++
++ Debug( LDAP_DEBUG_TRACE, "ldap_ntlm_bind\n", 0, 0, 0 );
++
++ assert( ld != NULL );
++ assert( LDAP_VALID( ld ) );
++ assert( msgidp != NULL );
++
++ if( msgidp == NULL ) {
++ ld->ld_errno = LDAP_PARAM_ERROR;
++ return ld->ld_errno;
++ }
++
++ /* create a message to send */
++ if ( (ber = ldap_alloc_ber_with_options( ld )) == NULL ) {
++ ld->ld_errno = LDAP_NO_MEMORY;
++ return ld->ld_errno;
++ }
++
++ assert( LBER_VALID( ber ) );
++
++ LDAP_NEXT_MSGID( ld, id );
++ rc = ber_printf( ber, "{it{istON}" /*}*/,
++ id, LDAP_REQ_BIND,
++ ld->ld_version, dn, tag,
++ cred );
++
++ /* Put Server Controls */
++ if( ldap_int_put_controls( ld, sctrls, ber ) != LDAP_SUCCESS ) {
++ ber_free( ber, 1 );
++ return ld->ld_errno;
++ }
++
++ if ( ber_printf( ber, /*{*/ "N}" ) == -1 ) {
++ ld->ld_errno = LDAP_ENCODING_ERROR;
++ ber_free( ber, 1 );
++ return ld->ld_errno;
++ }
++
++ /* send the message */
++ *msgidp = ldap_send_initial_request( ld, LDAP_REQ_BIND, dn, ber, id );
++
++ if(*msgidp < 0)
++ return ld->ld_errno;
++
++ return LDAP_SUCCESS;
++}
++
++int
++ldap_parse_ntlm_bind_result(
++ LDAP *ld,
++ LDAPMessage *res,
++ struct berval *challenge)
++{
++ ber_int_t errcode;
++ ber_tag_t tag;
++ BerElement *ber;
++ ber_len_t len;
++
++ Debug( LDAP_DEBUG_TRACE, "ldap_parse_ntlm_bind_result\n", 0, 0, 0 );
++
++ assert( ld != NULL );
++ assert( LDAP_VALID( ld ) );
++ assert( res != NULL );
++
++ if ( ld == NULL || res == NULL ) {
++ return LDAP_PARAM_ERROR;
++ }
++
++ if( res->lm_msgtype != LDAP_RES_BIND ) {
++ ld->ld_errno = LDAP_PARAM_ERROR;
++ return ld->ld_errno;
++ }
++
++ if ( ld->ld_error ) {
++ LDAP_FREE( ld->ld_error );
++ ld->ld_error = NULL;
++ }
++ if ( ld->ld_matched ) {
++ LDAP_FREE( ld->ld_matched );
++ ld->ld_matched = NULL;
++ }
++
++ /* parse results */
++
++ ber = ber_dup( res->lm_ber );
++
++ if( ber == NULL ) {
++ ld->ld_errno = LDAP_NO_MEMORY;
++ return ld->ld_errno;
++ }
++
++ tag = ber_scanf( ber, "{ioa" /*}*/,
++ &errcode, challenge, &ld->ld_error );
++ ber_free( ber, 0 );
++
++ if( tag == LBER_ERROR ) {
++ ld->ld_errno = LDAP_DECODING_ERROR;
++ return ld->ld_errno;
++ }
++
++ ld->ld_errno = errcode;
++
++ return( ld->ld_errno );
++}
diff --git a/net-nds/openldap/files/slapd-confd b/net-nds/openldap/files/slapd-confd
new file mode 100644
index 000000000000..28e9d23520b7
--- /dev/null
+++ b/net-nds/openldap/files/slapd-confd
@@ -0,0 +1,14 @@
+# conf.d file for openldap
+#
+# To enable both the standard unciphered server and the ssl encrypted
+# one uncomment this line or set any other server starting options
+# you may desire.
+#
+# OPTS="-h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
+# Uncomment the below to use the new slapd configuration for openldap 2.3
+#OPTS="-F /etc/openldap/slapd.d -h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
+#
+# If you change the above listen statement to bind on a specific IP for
+# listening, you should ensure that interface is up here (change eth0 as
+# needed).
+#rc_need="net.eth0"
diff --git a/net-nds/openldap/files/slapd-confd-2.4.28-r1 b/net-nds/openldap/files/slapd-confd-2.4.28-r1
new file mode 100644
index 000000000000..ef19899a3796
--- /dev/null
+++ b/net-nds/openldap/files/slapd-confd-2.4.28-r1
@@ -0,0 +1,26 @@
+# conf.d file for openldap
+#
+# To enable both the standard unciphered server and the ssl encrypted
+# one uncomment this line or set any other server starting options
+# you may desire.
+
+# If you have multiple slapd instances per #376699, this will provide a default config
+INSTANCE="openldap${SVCNAME#slapd}"
+
+# If you use the classical configuration file:
+OPTS_CONF="-f /etc/${INSTANCE}/slapd.conf"
+# Uncomment this instead to use the new slapd.d configuration directory for openldap 2.3
+#OPTS_CONF="-F /etc/${INSTANCE}/slapd.d"
+# (the OPTS_CONF variable is also passed to slaptest during startup)
+
+OPTS="${OPTS_CONF} -h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock'"
+# Optional connectionless LDAP:
+#OPTS="${OPTS_CONF} -h 'ldaps:// ldap:// ldapi://%2fvar%2frun%2fopenldap%2fslapd.sock cldap://'"
+
+# If you change the above listen statement to bind on a specific IP for
+# listening, you should ensure that interface is up here (change eth0 as
+# needed).
+#rc_need="net.eth0"
+
+# Specify the kerberos keytab file
+#KRB5_KTNAME=/etc/openldap/krb5-ldap.keytab
diff --git a/net-nds/openldap/files/slapd-initd b/net-nds/openldap/files/slapd-initd
new file mode 100644
index 000000000000..ecd8f650a217
--- /dev/null
+++ b/net-nds/openldap/files/slapd-initd
@@ -0,0 +1,29 @@
+#!/sbin/openrc-run
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net.lo
+ before hald avahi-daemon
+}
+
+start() {
+ checkpath -q -d /var/run/openldap/ -o ldap:ldap
+ if ! checkconfig ; then
+ eerror "There is a problem with your slapd.conf!"
+ return 1
+ fi
+ ebegin "Starting ldap-server"
+ eval start-stop-daemon --start --pidfile /var/run/openldap/slapd.pid --exec /usr/lib/openldap/slapd -- -u ldap -g ldap "${OPTS}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ldap-server"
+ start-stop-daemon --stop --signal 2 --quiet --pidfile /var/run/openldap/slapd.pid
+ eend $?
+}
+
+checkconfig() {
+ /usr/sbin/slaptest -u "$@" ${OPTS_CONF}
+}
diff --git a/net-nds/openldap/files/slapd-initd-2.4.40-r2 b/net-nds/openldap/files/slapd-initd-2.4.40-r2
new file mode 100644
index 000000000000..722b6c20de79
--- /dev/null
+++ b/net-nds/openldap/files/slapd-initd-2.4.40-r2
@@ -0,0 +1,64 @@
+#!/sbin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+extra_commands="checkconfig"
+
+[ -z "$INSTANCE" ] && INSTANCE="openldap${SVCNAME#slapd}"
+PIDDIR=/run/openldap
+PIDFILE=$PIDDIR/$SVCNAME.pid
+
+depend() {
+ need net
+ before dbus hald avahi-daemon
+ provide ldap
+}
+
+start() {
+ checkpath -q -d ${PIDDIR} -o ldap:ldap
+ if ! checkconfig -Q ; then
+ eerror "There is a problem with your slapd.conf!"
+ return 1
+ fi
+ ebegin "Starting ldap-server"
+ [ -n "$KRB5_KTNAME" ] && export KRB5_KTNAME
+ eval start-stop-daemon --start --pidfile ${PIDFILE} --exec /usr/lib/openldap/slapd -- -u ldap -g ldap "${OPTS}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ldap-server"
+ start-stop-daemon --stop --signal 2 --quiet --pidfile ${PIDFILE}
+ eend $?
+}
+
+checkconfig() {
+ # checks requested by bug #502948
+ # Step 1: extract the last valid config file or config dir
+ set -- $OPTS
+ while [ -n "$*" ]; do
+ opt=$1 ; shift
+ if [ "$opt" = "-f" -o "$opt" = "-F" ] ; then
+ CONF=$1
+ shift
+ fi
+ done
+ set --
+ # Fallback
+ CONF=${CONF-/etc/openldap/slapd.conf}
+ [ -d $CONF ] && CONF=${CONF}/*
+ DBDIRS=`eval awk '"/^(directory|olcDbDirectory:)/{print \\$2}"' $CONF`
+ for d in $DBDIRS; do
+ if [ ! -d $d ]; then
+ eerror "Directory $d in config does not exist!"
+ return 1
+ fi
+ /usr/bin/find $d ! -name DB_CONFIG ! -user ldap -o ! -group ldap |grep -sq .
+ if [ $? -ne 0 ]; then
+ ewarn "You have files in $d not owned by the ldap user, you must ensure they are accessible to the slapd instance!"
+ fi
+ [ ! -e $d/DB_CONFIG ] && ewarn "$d/DB_CONFIG does not exist, slapd performance may be sub-optimal"
+ done
+ # now test the config fully
+ /usr/sbin/slaptest -u "$@" ${OPTS_CONF}
+}
diff --git a/net-nds/openldap/files/slapd.service b/net-nds/openldap/files/slapd.service
new file mode 100644
index 000000000000..3427b87e936e
--- /dev/null
+++ b/net-nds/openldap/files/slapd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenLDAP Server Daemon
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/openldap/slapd.pid
+ExecStartPre=/usr/sbin/slaptest -Q -u $SLAPD_OPTIONS
+ExecStart=/usr/lib/openldap/slapd -u ldap -h ${SLAPD_URLS} $SLAPD_OPTIONS
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-nds/openldap/files/slapd.service.conf b/net-nds/openldap/files/slapd.service.conf
new file mode 100644
index 000000000000..812ea68ed475
--- /dev/null
+++ b/net-nds/openldap/files/slapd.service.conf
@@ -0,0 +1,12 @@
+[Service]
+# Use the classical configuration file:
+#Environment="SLAPD_OPTIONS=-f /etc/openldap/slapd.conf"
+# Use the slapd configuration directory:
+#Environment="SLAPD_OPTIONS=-F /etc/openldap/slapd.d"
+
+Environment="SLAPD_URLS=ldaps:/// ldap:/// ldapi:///"
+# Other examples:
+#Environment="SLAPD_URLS=ldap://127.0.0.1/ ldap://10.0.0.1:1389/ cldap:///"
+
+# Specify the kerberos keytab file
+#Environment=KRB5_KTNAME=/etc/openldap/krb5-ldap.keytab
diff --git a/net-nds/openldap/files/slapd.tmpfilesd b/net-nds/openldap/files/slapd.tmpfilesd
new file mode 100644
index 000000000000..634cea1642a9
--- /dev/null
+++ b/net-nds/openldap/files/slapd.tmpfilesd
@@ -0,0 +1,2 @@
+# openldap runtime directory for slapd.arg and slapd.pid
+d /run/openldap 0755 ldap ldap -
diff --git a/net-nds/openldap/files/slurpd-initd b/net-nds/openldap/files/slurpd-initd
new file mode 100644
index 000000000000..bb1b50dbb122
--- /dev/null
+++ b/net-nds/openldap/files/slurpd-initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting slurpd"
+ start-stop-daemon --start --quiet \
+ --exec /usr/lib/openldap/slurpd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping slurpd"
+ start-stop-daemon --stop --quiet \
+ --exec /usr/lib/openldap/slurpd
+ eend $?
+}
diff --git a/net-nds/openldap/metadata.xml b/net-nds/openldap/metadata.xml
new file mode 100644
index 000000000000..4e5e2c49039f
--- /dev/null
+++ b/net-nds/openldap/metadata.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>ldap-bugs@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="experimental">Enable experimental backend options</flag>
+ <flag name="kinit">Enable support for kerberos init</flag>
+ <flag name="odbc">Enable ODBC and SQL backend options</flag>
+ <flag name="overlays">Enable contributed OpenLDAP overlays</flag>
+ <flag name="smbkrb5passwd">Enable overlay for syncing ldap, unix and
+ lanman passwords</flag>
+ <flag name="minimal">Build libraries &amp; userspace tools only. Does not install any server code.</flag>
+ <flag name="pbkdf2">Enable support for pbkdf2 passwords</flag>
+ <flag name="sha2">Enable support for pw-sha2 password hashes.</flag>
+ </use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:openldap:openldap</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/openldap/openldap-2.4.44-r1.ebuild b/net-nds/openldap/openldap-2.4.44-r1.ebuild
new file mode 100644
index 000000000000..b25baead93f8
--- /dev/null
+++ b/net-nds/openldap/openldap-2.4.44-r1.ebuild
@@ -0,0 +1,851 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit db-use eutils flag-o-matic multilib multilib-minimal ssl-cert versionator toolchain-funcs autotools user systemd
+
+BIS_PN=rfc2307bis.schema
+BIS_PV=20140524
+BIS_P="${BIS_PN}-${BIS_PV}"
+
+DESCRIPTION="LDAP suite of application and development tools"
+HOMEPAGE="http://www.OpenLDAP.org/"
+
+# mirrors are mostly not working, using canonical URI
+SRC_URI="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz
+ mirror://gentoo/${BIS_P}"
+
+LICENSE="OPENLDAP GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+
+IUSE_DAEMON="crypt samba slp tcpd experimental minimal"
+IUSE_BACKEND="+berkdb"
+IUSE_OVERLAY="overlays perl"
+IUSE_OPTIONAL="gnutls iodbc sasl ssl odbc debug ipv6 libressl +syslog selinux static-libs"
+IUSE_CONTRIB="smbkrb5passwd kerberos kinit pbkdf2"
+IUSE_CONTRIB="${IUSE_CONTRIB} -cxx"
+IUSE="${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}"
+
+REQUIRED_USE="cxx? ( sasl )
+ ?? ( gnutls libressl )
+ pbkdf2? ( ssl )"
+
+# always list newer first
+# Do not add any AGPL-3 BDB here!
+# See bug 525110, comment 15.
+# Advanced usage: OPENLDAP_BDB_SLOTS in the environment can be used to force a slot during build.
+BDB_SLOTS="${OPENLDAP_BDB_SLOTS:=5.3 5.1 4.8 4.7 4.6 4.5 4.4}"
+BDB_PKGS=''
+for _slot in $BDB_SLOTS; do BDB_PKGS="${BDB_PKGS} sys-libs/db:${_slot}" ; done
+
+# openssl is needed to generate lanman-passwords required by samba
+CDEPEND="
+ ssl? (
+ !gnutls? (
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ )
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}]
+ libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
+ >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) )
+ sasl? ( dev-libs/cyrus-sasl:= )
+ !minimal? (
+ sys-devel/libtool
+ sys-libs/e2fsprogs-libs
+ >=dev-db/lmdb-0.9.18:=
+ tcpd? ( sys-apps/tcp-wrappers )
+ odbc? ( !iodbc? ( dev-db/unixODBC )
+ iodbc? ( dev-db/libiodbc ) )
+ slp? ( net-libs/openslp )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ samba? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ berkdb? (
+ <sys-libs/db-6.0:=
+ || ( ${BDB_PKGS} )
+ )
+ smbkrb5passwd? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ kerberos? ( app-crypt/heimdal )
+ )
+ kerberos? (
+ virtual/krb5
+ kinit? ( !app-crypt/heimdal )
+ )
+ cxx? ( dev-libs/cyrus-sasl:= )
+ )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r3
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${CDEPEND}
+ sys-apps/groff"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ldap )
+"
+# for tracking versions
+OPENLDAP_VERSIONTAG=".version-tag"
+OPENLDAP_DEFAULTDIR_VERSIONTAG="/var/lib/openldap-data"
+
+MULTILIB_WRAPPED_HEADERS=(
+ # USE=cxx
+ /usr/include/LDAPAsynConnection.h
+ /usr/include/LDAPAttrType.h
+ /usr/include/LDAPAttribute.h
+ /usr/include/LDAPAttributeList.h
+ /usr/include/LDAPConnection.h
+ /usr/include/LDAPConstraints.h
+ /usr/include/LDAPControl.h
+ /usr/include/LDAPControlSet.h
+ /usr/include/LDAPEntry.h
+ /usr/include/LDAPEntryList.h
+ /usr/include/LDAPException.h
+ /usr/include/LDAPExtResult.h
+ /usr/include/LDAPMessage.h
+ /usr/include/LDAPMessageQueue.h
+ /usr/include/LDAPModList.h
+ /usr/include/LDAPModification.h
+ /usr/include/LDAPObjClass.h
+ /usr/include/LDAPRebind.h
+ /usr/include/LDAPRebindAuth.h
+ /usr/include/LDAPReferenceList.h
+ /usr/include/LDAPResult.h
+ /usr/include/LDAPSaslBindResult.h
+ /usr/include/LDAPSchema.h
+ /usr/include/LDAPSearchReference.h
+ /usr/include/LDAPSearchResult.h
+ /usr/include/LDAPSearchResults.h
+ /usr/include/LDAPUrl.h
+ /usr/include/LDAPUrlList.h
+ /usr/include/LdifReader.h
+ /usr/include/LdifWriter.h
+ /usr/include/SaslInteraction.h
+ /usr/include/SaslInteractionHandler.h
+ /usr/include/StringList.h
+ /usr/include/TlsOptions.h
+)
+
+openldap_filecount() {
+ local dir="$1"
+ find "${dir}" -type f ! -name '.*' ! -name 'DB_CONFIG*' | wc -l
+}
+
+openldap_find_versiontags() {
+ # scan for all datadirs
+ openldap_datadirs=""
+ if [ -f "${EROOT}"/etc/openldap/slapd.conf ]; then
+ openldap_datadirs="$(awk '{if($1 == "directory") print $2 }' ${EROOT}/etc/openldap/slapd.conf)"
+ fi
+ openldap_datadirs="${openldap_datadirs} ${OPENLDAP_DEFAULTDIR_VERSIONTAG}"
+
+ einfo
+ einfo "Scanning datadir(s) from slapd.conf and"
+ einfo "the default installdir for Versiontags"
+ einfo "(${OPENLDAP_DEFAULTDIR_VERSIONTAG} may appear twice)"
+ einfo
+
+ # scan datadirs if we have a version tag
+ openldap_found_tag=0
+ have_files=0
+ for each in ${openldap_datadirs}; do
+ CURRENT_TAGDIR=${ROOT}`echo ${each} | sed "s:\/::"`
+ CURRENT_TAG=${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG}
+ if [ -d ${CURRENT_TAGDIR} ] && [ ${openldap_found_tag} == 0 ] ; then
+ einfo "- Checking ${each}..."
+ if [ -r ${CURRENT_TAG} ] ; then
+ # yey, we have one :)
+ einfo " Found Versiontag in ${each}"
+ source ${CURRENT_TAG}
+ if [ "${OLDPF}" == "" ] ; then
+ eerror "Invalid Versiontag found in ${CURRENT_TAGDIR}"
+ eerror "Please delete it"
+ eerror
+ die "Please kill the invalid versiontag in ${CURRENT_TAGDIR}"
+ fi
+
+ OLD_MAJOR=`get_version_component_range 2-3 ${OLDPF}`
+
+ [ $(openldap_filecount ${CURRENT_TAGDIR}) -gt 0 ] && have_files=1
+
+ # are we on the same branch?
+ if [ "${OLD_MAJOR}" != "${PV:0:3}" ] ; then
+ ewarn " Versiontag doesn't match current major release!"
+ if [[ "${have_files}" == "1" ]] ; then
+ eerror " Versiontag says other major and you (probably) have datafiles!"
+ echo
+ openldap_upgrade_howto
+ else
+ einfo " No real problem, seems there's no database."
+ fi
+ else
+ einfo " Versiontag is fine here :)"
+ fi
+ else
+ einfo " Non-tagged dir ${each}"
+ [ $(openldap_filecount ${each}) -gt 0 ] && have_files=1
+ if [[ "${have_files}" == "1" ]] ; then
+ einfo " EEK! Non-empty non-tagged datadir, counting `ls -a ${each} | wc -l` files"
+ echo
+
+ eerror
+ eerror "Your OpenLDAP Installation has a non tagged datadir that"
+ eerror "possibly contains a database at ${CURRENT_TAGDIR}"
+ eerror
+ eerror "Please export data if any entered and empty or remove"
+ eerror "the directory, installation has been stopped so you"
+ eerror "can take required action"
+ eerror
+ eerror "For a HOWTO on exporting the data, see instructions in the ebuild"
+ eerror
+ openldap_upgrade_howto
+ die "Please move the datadir ${CURRENT_TAGDIR} away"
+ fi
+ fi
+ einfo
+ fi
+ done
+ [ "${have_files}" == "1" ] && einfo "DB files present" || einfo "No DB files present"
+
+ # Now we must check for the major version of sys-libs/db linked against.
+ SLAPD_PATH=${EROOT}/usr/$(get_libdir)/openldap/slapd
+ if [ "${have_files}" == "1" -a -f "${SLAPD_PATH}" ]; then
+ OLDVER="$(/usr/bin/ldd ${SLAPD_PATH} \
+ | awk '/libdb-/{gsub("^libdb-","",$1);gsub(".so$","",$1);print $1}')"
+ if use berkdb; then
+ # find which one would be used
+ for bdb_slot in $BDB_SLOTS ; do
+ NEWVER="$(db_findver "=sys-libs/db-${bdb_slot}*")"
+ [[ -n "$NEWVER" ]] && break
+ done
+ fi
+ local fail=0
+ if [ -z "${OLDVER}" -a -z "${NEWVER}" ]; then
+ :
+ # Nothing wrong here.
+ elif [ -z "${OLDVER}" -a -n "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was not built against"
+ eerror " any version of sys-libs/db, but the new one will build"
+ eerror " against ${NEWVER} and your database may be inaccessible."
+ echo
+ fail=1
+ elif [ -n "${OLDVER}" -a -z "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was built against"
+ eerror " sys-libs/db:${OLDVER}, but the new one will not be"
+ eerror " built against any version and your database may be"
+ eerror " inaccessible."
+ echo
+ fail=1
+ elif [ "${OLDVER}" != "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was built against"
+ eerror " sys-libs/db:${OLDVER}, but the new one will build against"
+ eerror " ${NEWVER} and your database would be inaccessible."
+ echo
+ fail=1
+ fi
+ [ "${fail}" == "1" ] && openldap_upgrade_howto
+ fi
+
+ echo
+ einfo
+ einfo "All datadirs are fine, proceeding with merge now..."
+ einfo
+}
+
+openldap_upgrade_howto() {
+ eerror
+ eerror "A (possible old) installation of OpenLDAP was detected,"
+ eerror "installation will not proceed for now."
+ eerror
+ eerror "As major version upgrades can corrupt your database,"
+ eerror "you need to dump your database and re-create it afterwards."
+ eerror
+ eerror "Additionally, rebuilding against different major versions of the"
+ eerror "sys-libs/db libraries will cause your database to be inaccessible."
+ eerror ""
+ d="$(date -u +%s)"
+ l="/root/ldapdump.${d}"
+ i="${l}.raw"
+ eerror " 1. /etc/init.d/slurpd stop ; /etc/init.d/slapd stop"
+ eerror " 2. slapcat -l ${i}"
+ eerror " 3. egrep -v '^(entry|context)CSN:' <${i} >${l}"
+ eerror " 4. mv /var/lib/openldap-data/ /var/lib/openldap-data-backup/"
+ eerror " 5. emerge --update \=net-nds/${PF}"
+ eerror " 6. etc-update, and ensure that you apply the changes"
+ eerror " 7. slapadd -l ${l}"
+ eerror " 8. chown ldap:ldap /var/lib/openldap-data/*"
+ eerror " 9. /etc/init.d/slapd start"
+ eerror "10. check that your data is intact."
+ eerror "11. set up the new replication system."
+ eerror
+ if [ "${FORCE_UPGRADE}" != "1" ]; then
+ die "You need to upgrade your database first"
+ else
+ eerror "You have the magical FORCE_UPGRADE=1 in place."
+ eerror "Don't say you weren't warned about data loss."
+ fi
+}
+
+pkg_setup() {
+ if ! use sasl && use cxx ; then
+ die "To build the ldapc++ library you must emerge openldap with sasl support"
+ fi
+ # Bug #322787
+ if use minimal && ! has_version "net-nds/openldap" ; then
+ einfo "No datadir scan needed, openldap not installed"
+ elif use minimal && has_version 'net-nds/openldap[minimal]' ; then
+ einfo "Skipping scan for previous datadirs as requested by minimal useflag"
+ else
+ openldap_find_versiontags
+ fi
+
+ # The user/group are only used for running daemons which are
+ # disabled in minimal builds, so elide the accounts too.
+ if ! use minimal ; then
+ enewgroup ldap 439
+ enewuser ldap 439 -1 /usr/$(get_libdir)/openldap ldap
+ fi
+}
+
+src_prepare() {
+ # ensure correct SLAPI path by default
+ sed -i -e 's,\(#define LDAPI_SOCK\).*,\1 "'"${EPREFIX}"'/var/run/openldap/slapd.sock",' \
+ "${S}"/include/ldap_defaults.h
+
+ epatch "${FILESDIR}"/${PN}-2.4.17-gcc44.patch
+
+ epatch \
+ "${FILESDIR}"/${PN}-2.2.14-perlthreadsfix.patch \
+ "${FILESDIR}"/${PN}-2.4.15-ppolicy.patch
+
+ # bug #116045 - still present in 2.4.28
+ epatch "${FILESDIR}"/${PN}-2.4.35-contrib-smbk5pwd.patch
+ # bug #408077 - samba4
+ epatch "${FILESDIR}"/${PN}-2.4.35-contrib-samba4.patch
+
+ # bug #189817
+ epatch "${FILESDIR}"/${PN}-2.4.11-libldap_r.patch
+
+ # bug #233633
+ epatch "${FILESDIR}"/${PN}-2.4.17-fix-lmpasswd-gnutls-symbols.patch
+
+ # bug #281495
+ epatch "${FILESDIR}"/${PN}-2.4.28-gnutls-gcrypt.patch
+
+ # bug #294350
+ epatch "${FILESDIR}"/${PN}-2.4.6-evolution-ntlm.patch
+
+ # unbreak /bin/sh -> dash
+ epatch "${FILESDIR}"/${PN}-2.4.28-fix-dash.patch
+
+ # bug #420959
+ epatch "${FILESDIR}"/${PN}-2.4.31-gcc47.patch
+
+ # unbundle lmdb
+ epatch "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch
+ rm -rf "${S}"/libraries/liblmdb
+
+ cd "${S}"/build || die
+ einfo "Making sure upstream build strip does not do stripping too early"
+ sed -i.orig \
+ -e '/^STRIP/s,-s,,g' \
+ top.mk || die "Failed to block stripping"
+
+ # wrong assumption that /bin/sh is /bin/bash
+ sed -i \
+ -e 's|/bin/sh|/bin/bash|g' \
+ "${S}"/tests/scripts/* || die "sed failed"
+
+ cd "${S}" || die
+
+ AT_NOEAUTOMAKE=yes eautoreconf
+}
+
+build_contrib_module() {
+ # <dir> <sources> <outputname>
+ cd "${S}/contrib/slapd-modules/$1" || die
+ einfo "Compiling contrib-module: $3"
+ # Make sure it's uppercase
+ local define_name="$(echo "SLAPD_OVER_${1}" | LC_ALL=C tr '[:lower:]' '[:upper:]')"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -D${define_name}=SLAPD_MOD_DYNAMIC \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include -I../../../servers/slapd ${CFLAGS} \
+ -o ${2%.c}.lo -c $2 || die "compiling $3 failed"
+ einfo "Linking contrib-module: $3"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o $3.la ${2%.c}.lo || die "linking $3 failed"
+}
+
+src_configure() {
+ # Bug 408001
+ use elibc_FreeBSD && append-cppflags -DMDB_DSYNC=O_SYNC -DMDB_FDATASYNC=fsync
+
+ # connectionless ldap per bug #342439
+ append-cppflags -DLDAP_CONNECTIONLESS
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ use debug && myconf+=( $(use_enable debug) )
+
+ # ICU exists only in the configure, nowhere in the codebase, bug #510858
+ export ac_cv_header_unicode_utypes_h=no ol_cv_lib_icu=no
+
+ if ! use minimal && multilib_is_native_abi; then
+ local CPPFLAGS=${CPPFLAGS}
+
+ # re-enable serverside overlay chains per bug #296567
+ # see ldap docs chaper 12.3.1 for details
+ myconf+=( --enable-ldap )
+
+ # backends
+ myconf+=( --enable-slapd )
+ if use berkdb ; then
+ einfo "Using Berkeley DB for local backend"
+ myconf+=( --enable-bdb --enable-hdb )
+ DBINCLUDE=$(db_includedir $BDB_SLOTS)
+ einfo "Using $DBINCLUDE for sys-libs/db version"
+ # We need to include the slotted db.h dir for FreeBSD
+ append-cppflags -I${DBINCLUDE}
+ else
+ myconf+=( --disable-bdb --disable-hdb )
+ fi
+ for backend in dnssrv ldap mdb meta monitor null passwd relay shell sock; do
+ myconf+=( --enable-${backend}=mod )
+ done
+
+ myconf+=( $(use_enable perl perl mod) )
+
+ myconf+=( $(use_enable odbc sql mod) )
+ if use odbc ; then
+ local odbc_lib="unixodbc"
+ if use iodbc ; then
+ odbc_lib="iodbc"
+ append-cppflags -I"${EPREFIX}"/usr/include/iodbc
+ fi
+ myconf+=( --with-odbc=${odbc_lib} )
+ fi
+
+ # slapd options
+ myconf+=(
+ $(use_enable crypt)
+ $(use_enable slp)
+ $(use_enable samba lmpasswd)
+ $(use_enable syslog)
+ )
+ if use experimental ; then
+ myconf+=(
+ --enable-dynacl
+ --enable-aci=mod
+ )
+ fi
+ for option in aci cleartext modules rewrite rlookups slapi; do
+ myconf+=( --enable-${option} )
+ done
+
+ # slapd overlay options
+ # Compile-in the syncprov, the others as module
+ myconf+=( --enable-syncprov=yes )
+ use overlays && myconf+=( --enable-overlays=mod )
+
+ else
+ myconf+=(
+ --disable-backends
+ --disable-slapd
+ --disable-bdb
+ --disable-hdb
+ --disable-mdb
+ --disable-overlays
+ --disable-syslog
+ )
+ fi
+
+ # basic functionality stuff
+ myconf+=(
+ $(use_enable ipv6)
+ $(multilib_native_use_with sasl cyrus-sasl)
+ $(multilib_native_use_enable sasl spasswd)
+ $(use_enable tcpd wrappers)
+ )
+
+ # Some cross-compiling tests don't pan out well.
+ tc-is-cross-compiler && myconf+=(
+ --with-yielding-select=yes
+ )
+
+ local ssl_lib="no"
+ if use ssl || ( ! use minimal && use samba ) ; then
+ ssl_lib="openssl"
+ use gnutls && ssl_lib="gnutls"
+ fi
+
+ myconf+=( --with-tls=${ssl_lib} )
+
+ for basicflag in dynamic local proctitle shared; do
+ myconf+=( --enable-${basicflag} )
+ done
+
+ tc-export AR CC CXX
+ ECONF_SOURCE=${S} \
+ STRIP=/bin/true \
+ econf \
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/openldap \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ emake depend
+}
+
+src_configure_cxx() {
+ # This needs the libraries built by the first build run.
+ # So we have to run it AFTER the main build, not just after the main
+ # configure.
+ local myconf_ldapcpp=(
+ --with-ldap-includes="${S}"/include
+ )
+
+ mkdir -p "${BUILD_DIR}"/contrib/ldapc++ || die
+ cd "${BUILD_DIR}/contrib/ldapc++" || die
+
+ local LDFLAGS=${LDFLAGS} CPPFLAGS=${CPPFLAGS}
+ append-ldflags -L"${BUILD_DIR}"/libraries/liblber/.libs \
+ -L"${BUILD_DIR}"/libraries/libldap/.libs
+ append-cppflags -I"${BUILD_DIR}"/include
+ ECONF_SOURCE=${S}/contrib/ldapc++ \
+ econf "${myconf_ldapcpp[@]}" \
+ CC="${CC}" \
+ CXX="${CXX}"
+}
+
+multilib_src_compile() {
+ tc-export AR CC CXX
+ emake CC="${CC}" AR="${AR}" SHELL="${EPREFIX}"/bin/bash
+ local lt="${BUILD_DIR}/libtool"
+ export echo="echo"
+
+ if ! use minimal && multilib_is_native_abi ; then
+ if use cxx ; then
+ einfo "Building contrib library: ldapc++"
+ src_configure_cxx
+ cd "${BUILD_DIR}/contrib/ldapc++" || die
+ emake \
+ CC="${CC}" CXX="${CXX}"
+ fi
+
+ if use smbkrb5passwd ; then
+ einfo "Building contrib-module: smbk5pwd"
+ cd "${S}/contrib/slapd-modules/smbk5pwd" || die
+
+ MY_DEFS="-DDO_SHADOW"
+ if use samba ; then
+ MY_DEFS="${MY_DEFS} -DDO_SAMBA"
+ MY_KRB5_INC=""
+ fi
+ if use kerberos ; then
+ MY_DEFS="${MY_DEFS} -DDO_KRB5"
+ MY_KRB5_INC="$(krb5-config --cflags)"
+ fi
+
+ emake \
+ DEFS="${MY_DEFS}" \
+ KRB5_INC="${MY_KRB5_INC}" \
+ LDAP_BUILD="${BUILD_DIR}" \
+ CC="${CC}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap"
+ fi
+
+ if use overlays ; then
+ einfo "Building contrib-module: samba4"
+ cd "${S}/contrib/slapd-modules/samba4" || die
+
+ emake \
+ LDAP_BUILD="${BUILD_DIR}" \
+ CC="${CC}" libexecdir="/usr/$(get_libdir)/openldap"
+ fi
+
+ if use kerberos ; then
+ if use kinit ; then
+ build_contrib_module "kinit" "kinit.c" "kinit"
+ fi
+ cd "${S}/contrib/slapd-modules/passwd" || die
+ einfo "Compiling contrib-module: pw-kerberos"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include \
+ ${CFLAGS} \
+ $(krb5-config --cflags) \
+ -DHAVE_KRB5 \
+ -o kerberos.lo \
+ -c kerberos.c || die "compiling pw-kerberos failed"
+ einfo "Linking contrib-module: pw-kerberos"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o pw-kerberos.la \
+ kerberos.lo || die "linking pw-kerberos failed"
+ fi
+
+ if use pbkdf2; then
+ cd "${S}/contrib/slapd-modules/passwd/pbkdf2" || die
+ einfo "Compiling contrib-module: pw-pbkdf2"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -I"${BUILD_DIR}"/include \
+ -I../../../../include \
+ ${CFLAGS} \
+ -o pbkdf2.lo \
+ -c pw-pbkdf2.c || die "compiling pw-pbkdf2 failed"
+ einfo "Linking contrib-module: pw-pbkdf2"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o pw-pbkdf2.la \
+ pbkdf2.lo || die "linking pw-pbkdf2 failed"
+ fi
+
+ # We could build pw-radius if GNURadius would install radlib.h
+ cd "${S}/contrib/slapd-modules/passwd" || die
+ einfo "Compiling contrib-module: pw-netscape"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include \
+ ${CFLAGS} \
+ -o netscape.lo \
+ -c netscape.c || die "compiling pw-netscape failed"
+ einfo "Linking contrib-module: pw-netscape"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o pw-netscape.la \
+ netscape.lo || die "linking pw-netscape failed"
+
+ #build_contrib_module "acl" "posixgroup.c" "posixGroup" # example code only
+ #build_contrib_module "acl" "gssacl.c" "gss" # example code only, also needs kerberos
+ build_contrib_module "addpartial" "addpartial-overlay.c" "addpartial-overlay"
+ build_contrib_module "allop" "allop.c" "overlay-allop"
+ build_contrib_module "allowed" "allowed.c" "allowed"
+ build_contrib_module "autogroup" "autogroup.c" "autogroup"
+ build_contrib_module "cloak" "cloak.c" "cloak"
+ # build_contrib_module "comp_match" "comp_match.c" "comp_match" # really complex, adds new external deps, questionable demand
+ build_contrib_module "denyop" "denyop.c" "denyop-overlay"
+ build_contrib_module "dsaschema" "dsaschema.c" "dsaschema-plugin"
+ build_contrib_module "dupent" "dupent.c" "dupent"
+ build_contrib_module "lastbind" "lastbind.c" "lastbind"
+ # lastmod may not play well with other overlays
+ build_contrib_module "lastmod" "lastmod.c" "lastmod"
+ build_contrib_module "noopsrch" "noopsrch.c" "noopsrch"
+ build_contrib_module "nops" "nops.c" "nops-overlay"
+ #build_contrib_module "nssov" "nssov.c" "nssov-overlay" RESO:LATER
+ build_contrib_module "trace" "trace.c" "trace"
+ # build slapi-plugins
+ cd "${S}/contrib/slapi-plugins/addrdnvalues" || die
+ einfo "Building contrib-module: addrdnvalues plugin"
+ "${CC}" -shared \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include \
+ ${CFLAGS} \
+ -fPIC \
+ ${LDFLAGS} \
+ -o libaddrdnvalues-plugin.so \
+ addrdnvalues.c || die "Building libaddrdnvalues-plugin.so failed"
+
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi; then
+ cd tests || die
+ emake tests || die "make tests failed"
+ fi
+}
+
+multilib_src_install() {
+ local lt="${BUILD_DIR}/libtool"
+ emake DESTDIR="${D}" SHELL="${EPREFIX}"/bin/bash install
+ use static-libs || prune_libtool_files --all
+
+ if ! use minimal && multilib_is_native_abi; then
+ # openldap modules go here
+ # TODO: write some code to populate slapd.conf with moduleload statements
+ keepdir /usr/$(get_libdir)/openldap/openldap/
+
+ # initial data storage dir
+ keepdir /var/lib/openldap-data
+ use prefix || fowners ldap:ldap /var/lib/openldap-data
+ fperms 0700 /var/lib/openldap-data
+
+ echo "OLDPF='${PF}'" > "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
+ echo "# do NOT delete this. it is used" >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
+ echo "# to track versions for upgrading." >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
+
+ # use our config
+ rm "${ED}"etc/openldap/slapd.conf
+ insinto /etc/openldap
+ newins "${FILESDIR}"/${PN}-2.4.40-slapd-conf slapd.conf
+ configfile="${ED}"etc/openldap/slapd.conf
+
+ # populate with built backends
+ ebegin "populate config with built backends"
+ for x in "${ED}"usr/$(get_libdir)/openldap/openldap/back_*.so; do
+ einfo "Adding $(basename ${x})"
+ sed -e "/###INSERTDYNAMICMODULESHERE###$/a# moduleload\t$(basename ${x})" -i "${configfile}"
+ done
+ sed -e "s:###INSERTDYNAMICMODULESHERE###$:# modulepath\t${EPREFIX}/usr/$(get_libdir)/openldap/openldap:" -i "${configfile}"
+ use prefix || fowners root:ldap /etc/openldap/slapd.conf
+ fperms 0640 /etc/openldap/slapd.conf
+ cp "${configfile}" "${configfile}".default
+ eend
+
+ # install our own init scripts and systemd unit files
+ einfo "Install init scripts"
+ sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-initd-2.4.40-r2 > "${T}"/slapd || die
+ doinitd "${T}"/slapd
+ newconfd "${FILESDIR}"/slapd-confd-2.4.28-r1 slapd
+
+ einfo "Install systemd service"
+ sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd.service > "${T}"/slapd.service || die
+ systemd_dounit "${T}"/slapd.service
+ systemd_install_serviced "${FILESDIR}"/slapd.service.conf
+ systemd_newtmpfilesd "${FILESDIR}"/slapd.tmpfilesd slapd.conf
+
+ # If built without SLP, we don't need to be before avahi
+ use slp \
+ || sed -i \
+ -e '/before/{s/avahi-daemon//g}' \
+ "${ED}"etc/init.d/slapd
+
+ if use cxx ; then
+ einfo "Install the ldapc++ library"
+ cd "${BUILD_DIR}/contrib/ldapc++" || die
+ emake DESTDIR="${D}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install
+ cd "${S}"/contrib/ldapc++ || die
+ newdoc README ldapc++-README
+ fi
+
+ if use smbkrb5passwd ; then
+ einfo "Install the smbk5pwd module"
+ cd "${S}/contrib/slapd-modules/smbk5pwd" || die
+ emake DESTDIR="${D}" \
+ LDAP_BUILD="${BUILD_DIR}" \
+ libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install
+ newdoc README smbk5pwd-README
+ fi
+
+ if use overlays ; then
+ einfo "Install the samba4 module"
+ cd "${S}/contrib/slapd-modules/samba4" || die
+ emake DESTDIR="${D}" \
+ LDAP_BUILD="${BUILD_DIR}" \
+ libexecdir="/usr/$(get_libdir)/openldap" install
+ newdoc README samba4-README
+ fi
+
+ einfo "Installing contrib modules"
+ cd "${S}/contrib/slapd-modules" || die
+ for l in */*.la */*/*.la; do
+ [[ -e ${l} ]] || continue
+ "${lt}" --mode=install cp ${l} \
+ "${ED}"usr/$(get_libdir)/openldap/openldap || \
+ die "installing ${l} failed"
+ done
+
+ dodoc "${FILESDIR}"/DB_CONFIG.fast.example
+ docinto contrib
+ doman */*.5
+ #newdoc acl/README*
+ newdoc addpartial/README addpartial-README
+ newdoc allop/README allop-README
+ newdoc allowed/README allowed-README
+ newdoc autogroup/README autogroup-README
+ newdoc dsaschema/README dsaschema-README
+ newdoc passwd/README passwd-README
+ cd "${S}/contrib/slapi-plugins" || die
+ insinto /usr/$(get_libdir)/openldap/openldap
+ doins */*.so
+ docinto contrib
+ newdoc addrdnvalues/README addrdnvalues-README
+
+ insinto /etc/openldap/schema
+ newins "${DISTDIR}"/${BIS_P} ${BIS_PN}
+
+ docinto back-sock ; dodoc "${S}"/servers/slapd/back-sock/searchexample*
+ docinto back-shell ; dodoc "${S}"/servers/slapd/back-shell/searchexample*
+ docinto back-perl ; dodoc "${S}"/servers/slapd/back-perl/SampleLDAP.pm
+
+ dosbin "${S}"/contrib/slapd-tools/statslog
+ newdoc "${S}"/contrib/slapd-tools/README README.statslog
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc ANNOUNCEMENT CHANGES COPYRIGHT README
+ docinto rfc ; dodoc doc/rfc/*.txt
+}
+
+pkg_preinst() {
+ # keep old libs if any
+ preserve_old_lib /usr/$(get_libdir)/{liblber,libldap_r,liblber}-2.3$(get_libname 0)
+ # bug 440470, only display the getting started help there was no openldap before,
+ # or we are going to a non-minimal build
+ ! has_version net-nds/openldap || has_version 'net-nds/openldap[minimal]'
+ OPENLDAP_PRINT_MESSAGES=$((! $?))
+}
+
+pkg_postinst() {
+ if ! use minimal ; then
+ # You cannot build SSL certificates during src_install that will make
+ # binary packages containing your SSL key, which is both a security risk
+ # and a misconfiguration if multiple machines use the same key and cert.
+ if use ssl; then
+ install_cert /etc/openldap/ssl/ldap
+ use prefix || chown ldap:ldap "${EROOT}"etc/openldap/ssl/ldap.*
+ ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]"
+ ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]"
+ ewarn "add 'TLS_REQCERT allow' if you want to use them."
+ fi
+
+ if use prefix; then
+ # Warn about prefix issues with slapd
+ eerror "slapd might NOT be usable on Prefix systems as it requires root privileges"
+ eerror "to start up, and requires that certain files directories be owned by"
+ eerror "ldap:ldap. As Prefix does not support changing ownership of files and"
+ eerror "directories, you will have to manually fix this yourself."
+ fi
+
+ # These lines force the permissions of various content to be correct
+ use prefix || chown ldap:ldap "${EROOT}"var/run/openldap
+ chmod 0755 "${EROOT}"var/run/openldap
+ use prefix || chown root:ldap "${EROOT}"etc/openldap/slapd.conf{,.default}
+ chmod 0640 "${EROOT}"etc/openldap/slapd.conf{,.default}
+ use prefix || chown ldap:ldap "${EROOT}"var/lib/openldap-data
+ fi
+
+ if has_version 'net-nds/openldap[-minimal]' && ((${OPENLDAP_PRINT_MESSAGES})); then
+ elog "Getting started using OpenLDAP? There is some documentation available:"
+ elog "Gentoo Guide to OpenLDAP Authentication"
+ elog "(https://wiki.gentoo.org/wiki/Centralized_authentication_using_OpenLDAP)"
+ elog "---"
+ elog "An example file for tuning BDB backends with openldap is"
+ elog "DB_CONFIG.fast.example in /usr/share/doc/${PF}/"
+ fi
+
+ preserve_old_lib_notify /usr/$(get_libdir)/{liblber,libldap,libldap_r}-2.3$(get_libname 0)
+}
diff --git a/net-nds/openldap/openldap-2.4.44.ebuild b/net-nds/openldap/openldap-2.4.44.ebuild
new file mode 100644
index 000000000000..be14b0370f69
--- /dev/null
+++ b/net-nds/openldap/openldap-2.4.44.ebuild
@@ -0,0 +1,828 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit db-use eutils flag-o-matic multilib multilib-minimal ssl-cert versionator toolchain-funcs autotools user systemd
+
+BIS_PN=rfc2307bis.schema
+BIS_PV=20140524
+BIS_P="${BIS_PN}-${BIS_PV}"
+
+DESCRIPTION="LDAP suite of application and development tools"
+HOMEPAGE="http://www.OpenLDAP.org/"
+
+# mirrors are mostly not working, using canonical URI
+SRC_URI="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz
+ mirror://gentoo/${BIS_P}"
+
+LICENSE="OPENLDAP GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+
+IUSE_DAEMON="crypt samba slp tcpd experimental minimal"
+IUSE_BACKEND="+berkdb"
+IUSE_OVERLAY="overlays perl"
+IUSE_OPTIONAL="gnutls iodbc sasl ssl odbc debug ipv6 libressl +syslog selinux static-libs"
+IUSE_CONTRIB="smbkrb5passwd kerberos kinit"
+IUSE_CONTRIB="${IUSE_CONTRIB} -cxx"
+IUSE="${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}"
+
+REQUIRED_USE="cxx? ( sasl )
+ ?? ( gnutls libressl )"
+
+# always list newer first
+# Do not add any AGPL-3 BDB here!
+# See bug 525110, comment 15.
+# Advanced usage: OPENLDAP_BDB_SLOTS in the environment can be used to force a slot during build.
+BDB_SLOTS="${OPENLDAP_BDB_SLOTS:=5.3 5.1 4.8 4.7 4.6 4.5 4.4}"
+BDB_PKGS=''
+for _slot in $BDB_SLOTS; do BDB_PKGS="${BDB_PKGS} sys-libs/db:${_slot}" ; done
+
+# openssl is needed to generate lanman-passwords required by samba
+CDEPEND="
+ ssl? (
+ !gnutls? (
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ )
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}]
+ libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
+ >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) )
+ sasl? ( dev-libs/cyrus-sasl:= )
+ !minimal? (
+ sys-devel/libtool
+ sys-libs/e2fsprogs-libs
+ >=dev-db/lmdb-0.9.18:=
+ tcpd? ( sys-apps/tcp-wrappers )
+ odbc? ( !iodbc? ( dev-db/unixODBC )
+ iodbc? ( dev-db/libiodbc ) )
+ slp? ( net-libs/openslp )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ samba? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ berkdb? (
+ <sys-libs/db-6.0:=
+ || ( ${BDB_PKGS} )
+ )
+ smbkrb5passwd? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ kerberos? ( app-crypt/heimdal )
+ )
+ kerberos? (
+ virtual/krb5
+ kinit? ( !app-crypt/heimdal )
+ )
+ cxx? ( dev-libs/cyrus-sasl:= )
+ )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r3
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${CDEPEND}
+ sys-apps/groff"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ldap )
+"
+# for tracking versions
+OPENLDAP_VERSIONTAG=".version-tag"
+OPENLDAP_DEFAULTDIR_VERSIONTAG="/var/lib/openldap-data"
+
+MULTILIB_WRAPPED_HEADERS=(
+ # USE=cxx
+ /usr/include/LDAPAsynConnection.h
+ /usr/include/LDAPAttrType.h
+ /usr/include/LDAPAttribute.h
+ /usr/include/LDAPAttributeList.h
+ /usr/include/LDAPConnection.h
+ /usr/include/LDAPConstraints.h
+ /usr/include/LDAPControl.h
+ /usr/include/LDAPControlSet.h
+ /usr/include/LDAPEntry.h
+ /usr/include/LDAPEntryList.h
+ /usr/include/LDAPException.h
+ /usr/include/LDAPExtResult.h
+ /usr/include/LDAPMessage.h
+ /usr/include/LDAPMessageQueue.h
+ /usr/include/LDAPModList.h
+ /usr/include/LDAPModification.h
+ /usr/include/LDAPObjClass.h
+ /usr/include/LDAPRebind.h
+ /usr/include/LDAPRebindAuth.h
+ /usr/include/LDAPReferenceList.h
+ /usr/include/LDAPResult.h
+ /usr/include/LDAPSaslBindResult.h
+ /usr/include/LDAPSchema.h
+ /usr/include/LDAPSearchReference.h
+ /usr/include/LDAPSearchResult.h
+ /usr/include/LDAPSearchResults.h
+ /usr/include/LDAPUrl.h
+ /usr/include/LDAPUrlList.h
+ /usr/include/LdifReader.h
+ /usr/include/LdifWriter.h
+ /usr/include/SaslInteraction.h
+ /usr/include/SaslInteractionHandler.h
+ /usr/include/StringList.h
+ /usr/include/TlsOptions.h
+)
+
+openldap_filecount() {
+ local dir="$1"
+ find "${dir}" -type f ! -name '.*' ! -name 'DB_CONFIG*' | wc -l
+}
+
+openldap_find_versiontags() {
+ # scan for all datadirs
+ openldap_datadirs=""
+ if [ -f "${EROOT}"/etc/openldap/slapd.conf ]; then
+ openldap_datadirs="$(awk '{if($1 == "directory") print $2 }' ${EROOT}/etc/openldap/slapd.conf)"
+ fi
+ openldap_datadirs="${openldap_datadirs} ${OPENLDAP_DEFAULTDIR_VERSIONTAG}"
+
+ einfo
+ einfo "Scanning datadir(s) from slapd.conf and"
+ einfo "the default installdir for Versiontags"
+ einfo "(${OPENLDAP_DEFAULTDIR_VERSIONTAG} may appear twice)"
+ einfo
+
+ # scan datadirs if we have a version tag
+ openldap_found_tag=0
+ have_files=0
+ for each in ${openldap_datadirs}; do
+ CURRENT_TAGDIR=${ROOT}`echo ${each} | sed "s:\/::"`
+ CURRENT_TAG=${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG}
+ if [ -d ${CURRENT_TAGDIR} ] && [ ${openldap_found_tag} == 0 ] ; then
+ einfo "- Checking ${each}..."
+ if [ -r ${CURRENT_TAG} ] ; then
+ # yey, we have one :)
+ einfo " Found Versiontag in ${each}"
+ source ${CURRENT_TAG}
+ if [ "${OLDPF}" == "" ] ; then
+ eerror "Invalid Versiontag found in ${CURRENT_TAGDIR}"
+ eerror "Please delete it"
+ eerror
+ die "Please kill the invalid versiontag in ${CURRENT_TAGDIR}"
+ fi
+
+ OLD_MAJOR=`get_version_component_range 2-3 ${OLDPF}`
+
+ [ $(openldap_filecount ${CURRENT_TAGDIR}) -gt 0 ] && have_files=1
+
+ # are we on the same branch?
+ if [ "${OLD_MAJOR}" != "${PV:0:3}" ] ; then
+ ewarn " Versiontag doesn't match current major release!"
+ if [[ "${have_files}" == "1" ]] ; then
+ eerror " Versiontag says other major and you (probably) have datafiles!"
+ echo
+ openldap_upgrade_howto
+ else
+ einfo " No real problem, seems there's no database."
+ fi
+ else
+ einfo " Versiontag is fine here :)"
+ fi
+ else
+ einfo " Non-tagged dir ${each}"
+ [ $(openldap_filecount ${each}) -gt 0 ] && have_files=1
+ if [[ "${have_files}" == "1" ]] ; then
+ einfo " EEK! Non-empty non-tagged datadir, counting `ls -a ${each} | wc -l` files"
+ echo
+
+ eerror
+ eerror "Your OpenLDAP Installation has a non tagged datadir that"
+ eerror "possibly contains a database at ${CURRENT_TAGDIR}"
+ eerror
+ eerror "Please export data if any entered and empty or remove"
+ eerror "the directory, installation has been stopped so you"
+ eerror "can take required action"
+ eerror
+ eerror "For a HOWTO on exporting the data, see instructions in the ebuild"
+ eerror
+ openldap_upgrade_howto
+ die "Please move the datadir ${CURRENT_TAGDIR} away"
+ fi
+ fi
+ einfo
+ fi
+ done
+ [ "${have_files}" == "1" ] && einfo "DB files present" || einfo "No DB files present"
+
+ # Now we must check for the major version of sys-libs/db linked against.
+ SLAPD_PATH=${EROOT}/usr/$(get_libdir)/openldap/slapd
+ if [ "${have_files}" == "1" -a -f "${SLAPD_PATH}" ]; then
+ OLDVER="$(/usr/bin/ldd ${SLAPD_PATH} \
+ | awk '/libdb-/{gsub("^libdb-","",$1);gsub(".so$","",$1);print $1}')"
+ if use berkdb; then
+ # find which one would be used
+ for bdb_slot in $BDB_SLOTS ; do
+ NEWVER="$(db_findver "=sys-libs/db-${bdb_slot}*")"
+ [[ -n "$NEWVER" ]] && break
+ done
+ fi
+ local fail=0
+ if [ -z "${OLDVER}" -a -z "${NEWVER}" ]; then
+ :
+ # Nothing wrong here.
+ elif [ -z "${OLDVER}" -a -n "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was not built against"
+ eerror " any version of sys-libs/db, but the new one will build"
+ eerror " against ${NEWVER} and your database may be inaccessible."
+ echo
+ fail=1
+ elif [ -n "${OLDVER}" -a -z "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was built against"
+ eerror " sys-libs/db:${OLDVER}, but the new one will not be"
+ eerror " built against any version and your database may be"
+ eerror " inaccessible."
+ echo
+ fail=1
+ elif [ "${OLDVER}" != "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was built against"
+ eerror " sys-libs/db:${OLDVER}, but the new one will build against"
+ eerror " ${NEWVER} and your database would be inaccessible."
+ echo
+ fail=1
+ fi
+ [ "${fail}" == "1" ] && openldap_upgrade_howto
+ fi
+
+ echo
+ einfo
+ einfo "All datadirs are fine, proceeding with merge now..."
+ einfo
+}
+
+openldap_upgrade_howto() {
+ eerror
+ eerror "A (possible old) installation of OpenLDAP was detected,"
+ eerror "installation will not proceed for now."
+ eerror
+ eerror "As major version upgrades can corrupt your database,"
+ eerror "you need to dump your database and re-create it afterwards."
+ eerror
+ eerror "Additionally, rebuilding against different major versions of the"
+ eerror "sys-libs/db libraries will cause your database to be inaccessible."
+ eerror ""
+ d="$(date -u +%s)"
+ l="/root/ldapdump.${d}"
+ i="${l}.raw"
+ eerror " 1. /etc/init.d/slurpd stop ; /etc/init.d/slapd stop"
+ eerror " 2. slapcat -l ${i}"
+ eerror " 3. egrep -v '^(entry|context)CSN:' <${i} >${l}"
+ eerror " 4. mv /var/lib/openldap-data/ /var/lib/openldap-data-backup/"
+ eerror " 5. emerge --update \=net-nds/${PF}"
+ eerror " 6. etc-update, and ensure that you apply the changes"
+ eerror " 7. slapadd -l ${l}"
+ eerror " 8. chown ldap:ldap /var/lib/openldap-data/*"
+ eerror " 9. /etc/init.d/slapd start"
+ eerror "10. check that your data is intact."
+ eerror "11. set up the new replication system."
+ eerror
+ if [ "${FORCE_UPGRADE}" != "1" ]; then
+ die "You need to upgrade your database first"
+ else
+ eerror "You have the magical FORCE_UPGRADE=1 in place."
+ eerror "Don't say you weren't warned about data loss."
+ fi
+}
+
+pkg_setup() {
+ if ! use sasl && use cxx ; then
+ die "To build the ldapc++ library you must emerge openldap with sasl support"
+ fi
+ # Bug #322787
+ if use minimal && ! has_version "net-nds/openldap" ; then
+ einfo "No datadir scan needed, openldap not installed"
+ elif use minimal && has_version 'net-nds/openldap[minimal]' ; then
+ einfo "Skipping scan for previous datadirs as requested by minimal useflag"
+ else
+ openldap_find_versiontags
+ fi
+
+ # The user/group are only used for running daemons which are
+ # disabled in minimal builds, so elide the accounts too.
+ if ! use minimal ; then
+ enewgroup ldap 439
+ enewuser ldap 439 -1 /usr/$(get_libdir)/openldap ldap
+ fi
+}
+
+src_prepare() {
+ # ensure correct SLAPI path by default
+ sed -i -e 's,\(#define LDAPI_SOCK\).*,\1 "'"${EPREFIX}"'/var/run/openldap/slapd.sock",' \
+ "${S}"/include/ldap_defaults.h
+
+ epatch "${FILESDIR}"/${PN}-2.4.17-gcc44.patch
+
+ epatch \
+ "${FILESDIR}"/${PN}-2.2.14-perlthreadsfix.patch \
+ "${FILESDIR}"/${PN}-2.4.15-ppolicy.patch
+
+ # bug #116045 - still present in 2.4.28
+ epatch "${FILESDIR}"/${PN}-2.4.35-contrib-smbk5pwd.patch
+ # bug #408077 - samba4
+ epatch "${FILESDIR}"/${PN}-2.4.35-contrib-samba4.patch
+
+ # bug #189817
+ epatch "${FILESDIR}"/${PN}-2.4.11-libldap_r.patch
+
+ # bug #233633
+ epatch "${FILESDIR}"/${PN}-2.4.17-fix-lmpasswd-gnutls-symbols.patch
+
+ # bug #281495
+ epatch "${FILESDIR}"/${PN}-2.4.28-gnutls-gcrypt.patch
+
+ # bug #294350
+ epatch "${FILESDIR}"/${PN}-2.4.6-evolution-ntlm.patch
+
+ # unbreak /bin/sh -> dash
+ epatch "${FILESDIR}"/${PN}-2.4.28-fix-dash.patch
+
+ # bug #420959
+ epatch "${FILESDIR}"/${PN}-2.4.31-gcc47.patch
+
+ # unbundle lmdb
+ epatch "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch
+ rm -rf "${S}"/libraries/liblmdb
+
+ cd "${S}"/build || die
+ einfo "Making sure upstream build strip does not do stripping too early"
+ sed -i.orig \
+ -e '/^STRIP/s,-s,,g' \
+ top.mk || die "Failed to block stripping"
+
+ # wrong assumption that /bin/sh is /bin/bash
+ sed -i \
+ -e 's|/bin/sh|/bin/bash|g' \
+ "${S}"/tests/scripts/* || die "sed failed"
+
+ cd "${S}" || die
+
+ AT_NOEAUTOMAKE=yes eautoreconf
+}
+
+build_contrib_module() {
+ # <dir> <sources> <outputname>
+ cd "${S}/contrib/slapd-modules/$1" || die
+ einfo "Compiling contrib-module: $3"
+ # Make sure it's uppercase
+ local define_name="$(echo "SLAPD_OVER_${1}" | LC_ALL=C tr '[:lower:]' '[:upper:]')"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -D${define_name}=SLAPD_MOD_DYNAMIC \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include -I../../../servers/slapd ${CFLAGS} \
+ -o ${2%.c}.lo -c $2 || die "compiling $3 failed"
+ einfo "Linking contrib-module: $3"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o $3.la ${2%.c}.lo || die "linking $3 failed"
+}
+
+src_configure() {
+ # Bug 408001
+ use elibc_FreeBSD && append-cppflags -DMDB_DSYNC=O_SYNC -DMDB_FDATASYNC=fsync
+
+ # connectionless ldap per bug #342439
+ append-cppflags -DLDAP_CONNECTIONLESS
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ use debug && myconf+=( $(use_enable debug) )
+
+ # ICU exists only in the configure, nowhere in the codebase, bug #510858
+ export ac_cv_header_unicode_utypes_h=no ol_cv_lib_icu=no
+
+ if ! use minimal && multilib_is_native_abi; then
+ local CPPFLAGS=${CPPFLAGS}
+
+ # re-enable serverside overlay chains per bug #296567
+ # see ldap docs chaper 12.3.1 for details
+ myconf+=( --enable-ldap )
+
+ # backends
+ myconf+=( --enable-slapd )
+ if use berkdb ; then
+ einfo "Using Berkeley DB for local backend"
+ myconf+=( --enable-bdb --enable-hdb )
+ DBINCLUDE=$(db_includedir $BDB_SLOTS)
+ einfo "Using $DBINCLUDE for sys-libs/db version"
+ # We need to include the slotted db.h dir for FreeBSD
+ append-cppflags -I${DBINCLUDE}
+ else
+ myconf+=( --disable-bdb --disable-hdb )
+ fi
+ for backend in dnssrv ldap mdb meta monitor null passwd relay shell sock; do
+ myconf+=( --enable-${backend}=mod )
+ done
+
+ myconf+=( $(use_enable perl perl mod) )
+
+ myconf+=( $(use_enable odbc sql mod) )
+ if use odbc ; then
+ local odbc_lib="unixodbc"
+ if use iodbc ; then
+ odbc_lib="iodbc"
+ append-cppflags -I"${EPREFIX}"/usr/include/iodbc
+ fi
+ myconf+=( --with-odbc=${odbc_lib} )
+ fi
+
+ # slapd options
+ myconf+=(
+ $(use_enable crypt)
+ $(use_enable slp)
+ $(use_enable samba lmpasswd)
+ $(use_enable syslog)
+ )
+ if use experimental ; then
+ myconf+=(
+ --enable-dynacl
+ --enable-aci=mod
+ )
+ fi
+ for option in aci cleartext modules rewrite rlookups slapi; do
+ myconf+=( --enable-${option} )
+ done
+
+ # slapd overlay options
+ # Compile-in the syncprov, the others as module
+ myconf+=( --enable-syncprov=yes )
+ use overlays && myconf+=( --enable-overlays=mod )
+
+ else
+ myconf+=(
+ --disable-backends
+ --disable-slapd
+ --disable-bdb
+ --disable-hdb
+ --disable-mdb
+ --disable-overlays
+ --disable-syslog
+ )
+ fi
+
+ # basic functionality stuff
+ myconf+=(
+ $(use_enable ipv6)
+ $(multilib_native_use_with sasl cyrus-sasl)
+ $(multilib_native_use_enable sasl spasswd)
+ $(use_enable tcpd wrappers)
+ )
+
+ # Some cross-compiling tests don't pan out well.
+ tc-is-cross-compiler && myconf+=(
+ --with-yielding-select=yes
+ )
+
+ local ssl_lib="no"
+ if use ssl || ( ! use minimal && use samba ) ; then
+ ssl_lib="openssl"
+ use gnutls && ssl_lib="gnutls"
+ fi
+
+ myconf+=( --with-tls=${ssl_lib} )
+
+ for basicflag in dynamic local proctitle shared; do
+ myconf+=( --enable-${basicflag} )
+ done
+
+ tc-export AR CC CXX
+ ECONF_SOURCE=${S} \
+ STRIP=/bin/true \
+ econf \
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/openldap \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ emake depend
+}
+
+src_configure_cxx() {
+ # This needs the libraries built by the first build run.
+ # So we have to run it AFTER the main build, not just after the main
+ # configure.
+ local myconf_ldapcpp=(
+ --with-ldap-includes="${S}"/include
+ )
+
+ mkdir -p "${BUILD_DIR}"/contrib/ldapc++ || die
+ cd "${BUILD_DIR}/contrib/ldapc++" || die
+
+ local LDFLAGS=${LDFLAGS} CPPFLAGS=${CPPFLAGS}
+ append-ldflags -L"${BUILD_DIR}"/libraries/liblber/.libs \
+ -L"${BUILD_DIR}"/libraries/libldap/.libs
+ append-cppflags -I"${BUILD_DIR}"/include
+ ECONF_SOURCE=${S}/contrib/ldapc++ \
+ econf "${myconf_ldapcpp[@]}" \
+ CC="${CC}" \
+ CXX="${CXX}"
+}
+
+multilib_src_compile() {
+ tc-export AR CC CXX
+ emake CC="${CC}" AR="${AR}" SHELL="${EPREFIX}"/bin/bash
+ local lt="${BUILD_DIR}/libtool"
+ export echo="echo"
+
+ if ! use minimal && multilib_is_native_abi ; then
+ if use cxx ; then
+ einfo "Building contrib library: ldapc++"
+ src_configure_cxx
+ cd "${BUILD_DIR}/contrib/ldapc++" || die
+ emake \
+ CC="${CC}" CXX="${CXX}"
+ fi
+
+ if use smbkrb5passwd ; then
+ einfo "Building contrib-module: smbk5pwd"
+ cd "${S}/contrib/slapd-modules/smbk5pwd" || die
+
+ MY_DEFS="-DDO_SHADOW"
+ if use samba ; then
+ MY_DEFS="${MY_DEFS} -DDO_SAMBA"
+ MY_KRB5_INC=""
+ fi
+ if use kerberos ; then
+ MY_DEFS="${MY_DEFS} -DDO_KRB5"
+ MY_KRB5_INC="$(krb5-config --cflags)"
+ fi
+
+ emake \
+ DEFS="${MY_DEFS}" \
+ KRB5_INC="${MY_KRB5_INC}" \
+ LDAP_BUILD="${BUILD_DIR}" \
+ CC="${CC}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap"
+ fi
+
+ if use overlays ; then
+ einfo "Building contrib-module: samba4"
+ cd "${S}/contrib/slapd-modules/samba4" || die
+
+ emake \
+ LDAP_BUILD="${BUILD_DIR}" \
+ CC="${CC}" libexecdir="/usr/$(get_libdir)/openldap"
+ fi
+
+ if use kerberos ; then
+ if use kinit ; then
+ build_contrib_module "kinit" "kinit.c" "kinit"
+ fi
+ cd "${S}/contrib/slapd-modules/passwd" || die
+ einfo "Compiling contrib-module: pw-kerberos"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include \
+ ${CFLAGS} \
+ $(krb5-config --cflags) \
+ -DHAVE_KRB5 \
+ -o kerberos.lo \
+ -c kerberos.c || die "compiling pw-kerberos failed"
+ einfo "Linking contrib-module: pw-kerberos"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o pw-kerberos.la \
+ kerberos.lo || die "linking pw-kerberos failed"
+ fi
+ # We could build pw-radius if GNURadius would install radlib.h
+ cd "${S}/contrib/slapd-modules/passwd" || die
+ einfo "Compiling contrib-module: pw-netscape"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include \
+ ${CFLAGS} \
+ -o netscape.lo \
+ -c netscape.c || die "compiling pw-netscape failed"
+ einfo "Linking contrib-module: pw-netscape"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o pw-netscape.la \
+ netscape.lo || die "linking pw-netscape failed"
+
+ #build_contrib_module "acl" "posixgroup.c" "posixGroup" # example code only
+ #build_contrib_module "acl" "gssacl.c" "gss" # example code only, also needs kerberos
+ build_contrib_module "addpartial" "addpartial-overlay.c" "addpartial-overlay"
+ build_contrib_module "allop" "allop.c" "overlay-allop"
+ build_contrib_module "allowed" "allowed.c" "allowed"
+ build_contrib_module "autogroup" "autogroup.c" "autogroup"
+ build_contrib_module "cloak" "cloak.c" "cloak"
+ # build_contrib_module "comp_match" "comp_match.c" "comp_match" # really complex, adds new external deps, questionable demand
+ build_contrib_module "denyop" "denyop.c" "denyop-overlay"
+ build_contrib_module "dsaschema" "dsaschema.c" "dsaschema-plugin"
+ build_contrib_module "dupent" "dupent.c" "dupent"
+ build_contrib_module "lastbind" "lastbind.c" "lastbind"
+ # lastmod may not play well with other overlays
+ build_contrib_module "lastmod" "lastmod.c" "lastmod"
+ build_contrib_module "noopsrch" "noopsrch.c" "noopsrch"
+ build_contrib_module "nops" "nops.c" "nops-overlay"
+ #build_contrib_module "nssov" "nssov.c" "nssov-overlay" RESO:LATER
+ build_contrib_module "trace" "trace.c" "trace"
+ # build slapi-plugins
+ cd "${S}/contrib/slapi-plugins/addrdnvalues" || die
+ einfo "Building contrib-module: addrdnvalues plugin"
+ "${CC}" -shared \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include \
+ ${CFLAGS} \
+ -fPIC \
+ ${LDFLAGS} \
+ -o libaddrdnvalues-plugin.so \
+ addrdnvalues.c || die "Building libaddrdnvalues-plugin.so failed"
+
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi; then
+ cd tests || die
+ emake tests || die "make tests failed"
+ fi
+}
+
+multilib_src_install() {
+ local lt="${BUILD_DIR}/libtool"
+ emake DESTDIR="${D}" SHELL="${EPREFIX}"/bin/bash install
+ use static-libs || prune_libtool_files --all
+
+ if ! use minimal && multilib_is_native_abi; then
+ # openldap modules go here
+ # TODO: write some code to populate slapd.conf with moduleload statements
+ keepdir /usr/$(get_libdir)/openldap/openldap/
+
+ # initial data storage dir
+ keepdir /var/lib/openldap-data
+ use prefix || fowners ldap:ldap /var/lib/openldap-data
+ fperms 0700 /var/lib/openldap-data
+
+ echo "OLDPF='${PF}'" > "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
+ echo "# do NOT delete this. it is used" >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
+ echo "# to track versions for upgrading." >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
+
+ # use our config
+ rm "${ED}"etc/openldap/slapd.conf
+ insinto /etc/openldap
+ newins "${FILESDIR}"/${PN}-2.4.40-slapd-conf slapd.conf
+ configfile="${ED}"etc/openldap/slapd.conf
+
+ # populate with built backends
+ ebegin "populate config with built backends"
+ for x in "${ED}"usr/$(get_libdir)/openldap/openldap/back_*.so; do
+ einfo "Adding $(basename ${x})"
+ sed -e "/###INSERTDYNAMICMODULESHERE###$/a# moduleload\t$(basename ${x})" -i "${configfile}"
+ done
+ sed -e "s:###INSERTDYNAMICMODULESHERE###$:# modulepath\t${EPREFIX}/usr/$(get_libdir)/openldap/openldap:" -i "${configfile}"
+ use prefix || fowners root:ldap /etc/openldap/slapd.conf
+ fperms 0640 /etc/openldap/slapd.conf
+ cp "${configfile}" "${configfile}".default
+ eend
+
+ # install our own init scripts and systemd unit files
+ einfo "Install init scripts"
+ sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-initd-2.4.40-r2 > "${T}"/slapd || die
+ doinitd "${T}"/slapd
+ newconfd "${FILESDIR}"/slapd-confd-2.4.28-r1 slapd
+
+ einfo "Install systemd service"
+ sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd.service > "${T}"/slapd.service || die
+ systemd_dounit "${T}"/slapd.service
+ systemd_install_serviced "${FILESDIR}"/slapd.service.conf
+ systemd_newtmpfilesd "${FILESDIR}"/slapd.tmpfilesd slapd.conf
+
+ # If built without SLP, we don't need to be before avahi
+ use slp \
+ || sed -i \
+ -e '/before/{s/avahi-daemon//g}' \
+ "${ED}"etc/init.d/slapd
+
+ if use cxx ; then
+ einfo "Install the ldapc++ library"
+ cd "${BUILD_DIR}/contrib/ldapc++" || die
+ emake DESTDIR="${D}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install
+ cd "${S}"/contrib/ldapc++ || die
+ newdoc README ldapc++-README
+ fi
+
+ if use smbkrb5passwd ; then
+ einfo "Install the smbk5pwd module"
+ cd "${S}/contrib/slapd-modules/smbk5pwd" || die
+ emake DESTDIR="${D}" \
+ LDAP_BUILD="${BUILD_DIR}" \
+ libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install
+ newdoc README smbk5pwd-README
+ fi
+
+ if use overlays ; then
+ einfo "Install the samba4 module"
+ cd "${S}/contrib/slapd-modules/samba4" || die
+ emake DESTDIR="${D}" \
+ LDAP_BUILD="${BUILD_DIR}" \
+ libexecdir="/usr/$(get_libdir)/openldap" install
+ newdoc README samba4-README
+ fi
+
+ einfo "Installing contrib modules"
+ cd "${S}/contrib/slapd-modules" || die
+ for l in */*.la; do
+ "${lt}" --mode=install cp ${l} \
+ "${ED}"usr/$(get_libdir)/openldap/openldap || \
+ die "installing ${l} failed"
+ done
+
+ dodoc "${FILESDIR}"/DB_CONFIG.fast.example
+ docinto contrib
+ doman */*.5
+ #newdoc acl/README*
+ newdoc addpartial/README addpartial-README
+ newdoc allop/README allop-README
+ newdoc allowed/README allowed-README
+ newdoc autogroup/README autogroup-README
+ newdoc dsaschema/README dsaschema-README
+ newdoc passwd/README passwd-README
+ cd "${S}/contrib/slapi-plugins" || die
+ insinto /usr/$(get_libdir)/openldap/openldap
+ doins */*.so
+ docinto contrib
+ newdoc addrdnvalues/README addrdnvalues-README
+
+ insinto /etc/openldap/schema
+ newins "${DISTDIR}"/${BIS_P} ${BIS_PN}
+
+ docinto back-sock ; dodoc "${S}"/servers/slapd/back-sock/searchexample*
+ docinto back-shell ; dodoc "${S}"/servers/slapd/back-shell/searchexample*
+ docinto back-perl ; dodoc "${S}"/servers/slapd/back-perl/SampleLDAP.pm
+
+ dosbin "${S}"/contrib/slapd-tools/statslog
+ newdoc "${S}"/contrib/slapd-tools/README README.statslog
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc ANNOUNCEMENT CHANGES COPYRIGHT README
+ docinto rfc ; dodoc doc/rfc/*.txt
+}
+
+pkg_preinst() {
+ # keep old libs if any
+ preserve_old_lib /usr/$(get_libdir)/{liblber,libldap_r,liblber}-2.3$(get_libname 0)
+ # bug 440470, only display the getting started help there was no openldap before,
+ # or we are going to a non-minimal build
+ ! has_version net-nds/openldap || has_version 'net-nds/openldap[minimal]'
+ OPENLDAP_PRINT_MESSAGES=$((! $?))
+}
+
+pkg_postinst() {
+ if ! use minimal ; then
+ # You cannot build SSL certificates during src_install that will make
+ # binary packages containing your SSL key, which is both a security risk
+ # and a misconfiguration if multiple machines use the same key and cert.
+ if use ssl; then
+ install_cert /etc/openldap/ssl/ldap
+ use prefix || chown ldap:ldap "${EROOT}"etc/openldap/ssl/ldap.*
+ ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]"
+ ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]"
+ ewarn "add 'TLS_REQCERT allow' if you want to use them."
+ fi
+
+ if use prefix; then
+ # Warn about prefix issues with slapd
+ eerror "slapd might NOT be usable on Prefix systems as it requires root privileges"
+ eerror "to start up, and requires that certain files directories be owned by"
+ eerror "ldap:ldap. As Prefix does not support changing ownership of files and"
+ eerror "directories, you will have to manually fix this yourself."
+ fi
+
+ # These lines force the permissions of various content to be correct
+ use prefix || chown ldap:ldap "${EROOT}"var/run/openldap
+ chmod 0755 "${EROOT}"var/run/openldap
+ use prefix || chown root:ldap "${EROOT}"etc/openldap/slapd.conf{,.default}
+ chmod 0640 "${EROOT}"etc/openldap/slapd.conf{,.default}
+ use prefix || chown ldap:ldap "${EROOT}"var/lib/openldap-data
+ fi
+
+ if has_version 'net-nds/openldap[-minimal]' && ((${OPENLDAP_PRINT_MESSAGES})); then
+ elog "Getting started using OpenLDAP? There is some documentation available:"
+ elog "Gentoo Guide to OpenLDAP Authentication"
+ elog "(https://wiki.gentoo.org/wiki/Centralized_authentication_using_OpenLDAP)"
+ elog "---"
+ elog "An example file for tuning BDB backends with openldap is"
+ elog "DB_CONFIG.fast.example in /usr/share/doc/${PF}/"
+ fi
+
+ preserve_old_lib_notify /usr/$(get_libdir)/{liblber,libldap,libldap_r}-2.3$(get_libname 0)
+}
diff --git a/net-nds/openldap/openldap-2.4.45.ebuild b/net-nds/openldap/openldap-2.4.45.ebuild
new file mode 100644
index 000000000000..de36c98cf1a0
--- /dev/null
+++ b/net-nds/openldap/openldap-2.4.45.ebuild
@@ -0,0 +1,883 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit db-use eutils flag-o-matic multilib multilib-minimal ssl-cert versionator toolchain-funcs autotools user systemd
+
+BIS_PN=rfc2307bis.schema
+BIS_PV=20140524
+BIS_P="${BIS_PN}-${BIS_PV}"
+
+DESCRIPTION="LDAP suite of application and development tools"
+HOMEPAGE="http://www.OpenLDAP.org/"
+
+# mirrors are mostly not working, using canonical URI
+SRC_URI="ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/${P}.tgz
+ mirror://gentoo/${BIS_P}"
+
+LICENSE="OPENLDAP GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
+
+IUSE_DAEMON="crypt samba slp tcpd experimental minimal"
+IUSE_BACKEND="+berkdb"
+IUSE_OVERLAY="overlays perl"
+IUSE_OPTIONAL="gnutls iodbc sasl ssl odbc debug ipv6 libressl +syslog selinux static-libs"
+IUSE_CONTRIB="smbkrb5passwd kerberos kinit pbkdf2 sha2"
+IUSE_CONTRIB="${IUSE_CONTRIB} -cxx"
+IUSE="${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}"
+
+REQUIRED_USE="cxx? ( sasl )
+ ?? ( gnutls libressl )
+ pbkdf2? ( ssl )"
+
+# always list newer first
+# Do not add any AGPL-3 BDB here!
+# See bug 525110, comment 15.
+# Advanced usage: OPENLDAP_BDB_SLOTS in the environment can be used to force a slot during build.
+BDB_SLOTS="${OPENLDAP_BDB_SLOTS:=5.3 5.1 4.8 4.7 4.6 4.5 4.4}"
+BDB_PKGS=''
+for _slot in $BDB_SLOTS; do BDB_PKGS="${BDB_PKGS} sys-libs/db:${_slot}" ; done
+
+# openssl is needed to generate lanman-passwords required by samba
+CDEPEND="
+ ssl? (
+ !gnutls? (
+ !libressl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] )
+ )
+ gnutls? ( >=net-libs/gnutls-2.12.23-r6[${MULTILIB_USEDEP}]
+ libressl? ( dev-libs/libressl[${MULTILIB_USEDEP}] )
+ >=dev-libs/libgcrypt-1.5.3:0[${MULTILIB_USEDEP}] ) )
+ sasl? ( dev-libs/cyrus-sasl:= )
+ !minimal? (
+ sys-devel/libtool
+ sys-libs/e2fsprogs-libs
+ >=dev-db/lmdb-0.9.18:=
+ tcpd? ( sys-apps/tcp-wrappers )
+ odbc? ( !iodbc? ( dev-db/unixODBC )
+ iodbc? ( dev-db/libiodbc ) )
+ slp? ( net-libs/openslp )
+ perl? ( dev-lang/perl:=[-build(-)] )
+ samba? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ )
+ berkdb? (
+ <sys-libs/db-6.0:=
+ || ( ${BDB_PKGS} )
+ )
+ smbkrb5passwd? (
+ !libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ kerberos? ( app-crypt/heimdal )
+ )
+ kerberos? (
+ virtual/krb5
+ kinit? ( !app-crypt/heimdal )
+ )
+ cxx? ( dev-libs/cyrus-sasl:= )
+ )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140508-r3
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
+ )"
+DEPEND="${CDEPEND}
+ sys-apps/groff"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-ldap )
+"
+# for tracking versions
+OPENLDAP_VERSIONTAG=".version-tag"
+OPENLDAP_DEFAULTDIR_VERSIONTAG="/var/lib/openldap-data"
+
+MULTILIB_WRAPPED_HEADERS=(
+ # USE=cxx
+ /usr/include/LDAPAsynConnection.h
+ /usr/include/LDAPAttrType.h
+ /usr/include/LDAPAttribute.h
+ /usr/include/LDAPAttributeList.h
+ /usr/include/LDAPConnection.h
+ /usr/include/LDAPConstraints.h
+ /usr/include/LDAPControl.h
+ /usr/include/LDAPControlSet.h
+ /usr/include/LDAPEntry.h
+ /usr/include/LDAPEntryList.h
+ /usr/include/LDAPException.h
+ /usr/include/LDAPExtResult.h
+ /usr/include/LDAPMessage.h
+ /usr/include/LDAPMessageQueue.h
+ /usr/include/LDAPModList.h
+ /usr/include/LDAPModification.h
+ /usr/include/LDAPObjClass.h
+ /usr/include/LDAPRebind.h
+ /usr/include/LDAPRebindAuth.h
+ /usr/include/LDAPReferenceList.h
+ /usr/include/LDAPResult.h
+ /usr/include/LDAPSaslBindResult.h
+ /usr/include/LDAPSchema.h
+ /usr/include/LDAPSearchReference.h
+ /usr/include/LDAPSearchResult.h
+ /usr/include/LDAPSearchResults.h
+ /usr/include/LDAPUrl.h
+ /usr/include/LDAPUrlList.h
+ /usr/include/LdifReader.h
+ /usr/include/LdifWriter.h
+ /usr/include/SaslInteraction.h
+ /usr/include/SaslInteractionHandler.h
+ /usr/include/StringList.h
+ /usr/include/TlsOptions.h
+)
+
+openldap_filecount() {
+ local dir="$1"
+ find "${dir}" -type f ! -name '.*' ! -name 'DB_CONFIG*' | wc -l
+}
+
+openldap_find_versiontags() {
+ # scan for all datadirs
+ openldap_datadirs=""
+ if [ -f "${EROOT}"/etc/openldap/slapd.conf ]; then
+ openldap_datadirs="$(awk '{if($1 == "directory") print $2 }' ${EROOT}/etc/openldap/slapd.conf)"
+ fi
+ openldap_datadirs="${openldap_datadirs} ${OPENLDAP_DEFAULTDIR_VERSIONTAG}"
+
+ einfo
+ einfo "Scanning datadir(s) from slapd.conf and"
+ einfo "the default installdir for Versiontags"
+ einfo "(${OPENLDAP_DEFAULTDIR_VERSIONTAG} may appear twice)"
+ einfo
+
+ # scan datadirs if we have a version tag
+ openldap_found_tag=0
+ have_files=0
+ for each in ${openldap_datadirs}; do
+ CURRENT_TAGDIR=${ROOT}`echo ${each} | sed "s:\/::"`
+ CURRENT_TAG=${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG}
+ if [ -d ${CURRENT_TAGDIR} ] && [ ${openldap_found_tag} == 0 ] ; then
+ einfo "- Checking ${each}..."
+ if [ -r ${CURRENT_TAG} ] ; then
+ # yey, we have one :)
+ einfo " Found Versiontag in ${each}"
+ source ${CURRENT_TAG}
+ if [ "${OLDPF}" == "" ] ; then
+ eerror "Invalid Versiontag found in ${CURRENT_TAGDIR}"
+ eerror "Please delete it"
+ eerror
+ die "Please kill the invalid versiontag in ${CURRENT_TAGDIR}"
+ fi
+
+ OLD_MAJOR=`get_version_component_range 2-3 ${OLDPF}`
+
+ [ $(openldap_filecount ${CURRENT_TAGDIR}) -gt 0 ] && have_files=1
+
+ # are we on the same branch?
+ if [ "${OLD_MAJOR}" != "${PV:0:3}" ] ; then
+ ewarn " Versiontag doesn't match current major release!"
+ if [[ "${have_files}" == "1" ]] ; then
+ eerror " Versiontag says other major and you (probably) have datafiles!"
+ echo
+ openldap_upgrade_howto
+ else
+ einfo " No real problem, seems there's no database."
+ fi
+ else
+ einfo " Versiontag is fine here :)"
+ fi
+ else
+ einfo " Non-tagged dir ${each}"
+ [ $(openldap_filecount ${each}) -gt 0 ] && have_files=1
+ if [[ "${have_files}" == "1" ]] ; then
+ einfo " EEK! Non-empty non-tagged datadir, counting `ls -a ${each} | wc -l` files"
+ echo
+
+ eerror
+ eerror "Your OpenLDAP Installation has a non tagged datadir that"
+ eerror "possibly contains a database at ${CURRENT_TAGDIR}"
+ eerror
+ eerror "Please export data if any entered and empty or remove"
+ eerror "the directory, installation has been stopped so you"
+ eerror "can take required action"
+ eerror
+ eerror "For a HOWTO on exporting the data, see instructions in the ebuild"
+ eerror
+ openldap_upgrade_howto
+ die "Please move the datadir ${CURRENT_TAGDIR} away"
+ fi
+ fi
+ einfo
+ fi
+ done
+ [ "${have_files}" == "1" ] && einfo "DB files present" || einfo "No DB files present"
+
+ # Now we must check for the major version of sys-libs/db linked against.
+ SLAPD_PATH=${EROOT}/usr/$(get_libdir)/openldap/slapd
+ if [ "${have_files}" == "1" -a -f "${SLAPD_PATH}" ]; then
+ OLDVER="$(/usr/bin/ldd ${SLAPD_PATH} \
+ | awk '/libdb-/{gsub("^libdb-","",$1);gsub(".so$","",$1);print $1}')"
+ if use berkdb; then
+ # find which one would be used
+ for bdb_slot in $BDB_SLOTS ; do
+ NEWVER="$(db_findver "=sys-libs/db-${bdb_slot}*")"
+ [[ -n "$NEWVER" ]] && break
+ done
+ fi
+ local fail=0
+ if [ -z "${OLDVER}" -a -z "${NEWVER}" ]; then
+ :
+ # Nothing wrong here.
+ elif [ -z "${OLDVER}" -a -n "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was not built against"
+ eerror " any version of sys-libs/db, but the new one will build"
+ eerror " against ${NEWVER} and your database may be inaccessible."
+ echo
+ fail=1
+ elif [ -n "${OLDVER}" -a -z "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was built against"
+ eerror " sys-libs/db:${OLDVER}, but the new one will not be"
+ eerror " built against any version and your database may be"
+ eerror " inaccessible."
+ echo
+ fail=1
+ elif [ "${OLDVER}" != "${NEWVER}" ]; then
+ eerror " Your existing version of OpenLDAP was built against"
+ eerror " sys-libs/db:${OLDVER}, but the new one will build against"
+ eerror " ${NEWVER} and your database would be inaccessible."
+ echo
+ fail=1
+ fi
+ [ "${fail}" == "1" ] && openldap_upgrade_howto
+ fi
+
+ echo
+ einfo
+ einfo "All datadirs are fine, proceeding with merge now..."
+ einfo
+}
+
+openldap_upgrade_howto() {
+ eerror
+ eerror "A (possible old) installation of OpenLDAP was detected,"
+ eerror "installation will not proceed for now."
+ eerror
+ eerror "As major version upgrades can corrupt your database,"
+ eerror "you need to dump your database and re-create it afterwards."
+ eerror
+ eerror "Additionally, rebuilding against different major versions of the"
+ eerror "sys-libs/db libraries will cause your database to be inaccessible."
+ eerror ""
+ d="$(date -u +%s)"
+ l="/root/ldapdump.${d}"
+ i="${l}.raw"
+ eerror " 1. /etc/init.d/slurpd stop ; /etc/init.d/slapd stop"
+ eerror " 2. slapcat -l ${i}"
+ eerror " 3. egrep -v '^(entry|context)CSN:' <${i} >${l}"
+ eerror " 4. mv /var/lib/openldap-data/ /var/lib/openldap-data-backup/"
+ eerror " 5. emerge --update \=net-nds/${PF}"
+ eerror " 6. etc-update, and ensure that you apply the changes"
+ eerror " 7. slapadd -l ${l}"
+ eerror " 8. chown ldap:ldap /var/lib/openldap-data/*"
+ eerror " 9. /etc/init.d/slapd start"
+ eerror "10. check that your data is intact."
+ eerror "11. set up the new replication system."
+ eerror
+ if [ "${FORCE_UPGRADE}" != "1" ]; then
+ die "You need to upgrade your database first"
+ else
+ eerror "You have the magical FORCE_UPGRADE=1 in place."
+ eerror "Don't say you weren't warned about data loss."
+ fi
+}
+
+pkg_setup() {
+ if ! use sasl && use cxx ; then
+ die "To build the ldapc++ library you must emerge openldap with sasl support"
+ fi
+ # Bug #322787
+ if use minimal && ! has_version "net-nds/openldap" ; then
+ einfo "No datadir scan needed, openldap not installed"
+ elif use minimal && has_version 'net-nds/openldap[minimal]' ; then
+ einfo "Skipping scan for previous datadirs as requested by minimal useflag"
+ else
+ openldap_find_versiontags
+ fi
+
+ # The user/group are only used for running daemons which are
+ # disabled in minimal builds, so elide the accounts too.
+ if ! use minimal ; then
+ enewgroup ldap 439
+ enewuser ldap 439 -1 /usr/$(get_libdir)/openldap ldap
+ fi
+}
+
+src_prepare() {
+ # ensure correct SLAPI path by default
+ sed -i -e 's,\(#define LDAPI_SOCK\).*,\1 "'"${EPREFIX}"'/var/run/openldap/slapd.sock",' \
+ "${S}"/include/ldap_defaults.h
+
+ epatch "${FILESDIR}"/${PN}-2.4.17-gcc44.patch
+
+ epatch \
+ "${FILESDIR}"/${PN}-2.2.14-perlthreadsfix.patch \
+ "${FILESDIR}"/${PN}-2.4.15-ppolicy.patch
+
+ # bug #116045 - still present in 2.4.28
+ epatch "${FILESDIR}"/${PN}-2.4.35-contrib-smbk5pwd.patch
+ # bug #408077 - samba4
+ epatch "${FILESDIR}"/${PN}-2.4.35-contrib-samba4.patch
+
+ # bug #189817
+ epatch "${FILESDIR}"/${PN}-2.4.11-libldap_r.patch
+
+ # bug #233633
+ epatch "${FILESDIR}"/${PN}-2.4.45-fix-lmpasswd-gnutls-symbols.patch
+
+ # bug #281495
+ epatch "${FILESDIR}"/${PN}-2.4.28-gnutls-gcrypt.patch
+
+ # bug #294350
+ epatch "${FILESDIR}"/${PN}-2.4.6-evolution-ntlm.patch
+
+ # unbreak /bin/sh -> dash
+ epatch "${FILESDIR}"/${PN}-2.4.28-fix-dash.patch
+
+ # bug #420959
+ epatch "${FILESDIR}"/${PN}-2.4.31-gcc47.patch
+
+ # bug #622464
+ epatch "${FILESDIR}"/${PN}-2.4.45-libressl.patch
+
+ # unbundle lmdb
+ epatch "${FILESDIR}"/${PN}-2.4.42-mdb-unbundle.patch
+ rm -rf "${S}"/libraries/liblmdb
+
+ epatch_user
+
+ cd "${S}"/build || die
+ einfo "Making sure upstream build strip does not do stripping too early"
+ sed -i.orig \
+ -e '/^STRIP/s,-s,,g' \
+ top.mk || die "Failed to block stripping"
+
+ # wrong assumption that /bin/sh is /bin/bash
+ sed -i \
+ -e 's|/bin/sh|/bin/bash|g' \
+ "${S}"/tests/scripts/* || die "sed failed"
+
+ cd "${S}" || die
+
+ AT_NOEAUTOMAKE=yes eautoreconf
+}
+
+build_contrib_module() {
+ # <dir> <sources> <outputname>
+ cd "${S}/contrib/slapd-modules/$1" || die
+ einfo "Compiling contrib-module: $3"
+ # Make sure it's uppercase
+ local define_name="$(echo "SLAPD_OVER_${1}" | LC_ALL=C tr '[:lower:]' '[:upper:]')"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -D${define_name}=SLAPD_MOD_DYNAMIC \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include -I../../../servers/slapd ${CFLAGS} \
+ -o ${2%.c}.lo -c $2 || die "compiling $3 failed"
+ einfo "Linking contrib-module: $3"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o $3.la ${2%.c}.lo || die "linking $3 failed"
+}
+
+src_configure() {
+ # Bug 408001
+ use elibc_FreeBSD && append-cppflags -DMDB_DSYNC=O_SYNC -DMDB_FDATASYNC=fsync
+
+ # connectionless ldap per bug #342439
+ append-cppflags -DLDAP_CONNECTIONLESS
+
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ local myconf=()
+
+ use debug && myconf+=( $(use_enable debug) )
+
+ # ICU exists only in the configure, nowhere in the codebase, bug #510858
+ export ac_cv_header_unicode_utypes_h=no ol_cv_lib_icu=no
+
+ if ! use minimal && multilib_is_native_abi; then
+ local CPPFLAGS=${CPPFLAGS}
+
+ # re-enable serverside overlay chains per bug #296567
+ # see ldap docs chaper 12.3.1 for details
+ myconf+=( --enable-ldap )
+
+ # backends
+ myconf+=( --enable-slapd )
+ if use berkdb ; then
+ einfo "Using Berkeley DB for local backend"
+ myconf+=( --enable-bdb --enable-hdb )
+ DBINCLUDE=$(db_includedir $BDB_SLOTS)
+ einfo "Using $DBINCLUDE for sys-libs/db version"
+ # We need to include the slotted db.h dir for FreeBSD
+ append-cppflags -I${DBINCLUDE}
+ else
+ myconf+=( --disable-bdb --disable-hdb )
+ fi
+ for backend in dnssrv ldap mdb meta monitor null passwd relay shell sock; do
+ myconf+=( --enable-${backend}=mod )
+ done
+
+ myconf+=( $(use_enable perl perl mod) )
+
+ myconf+=( $(use_enable odbc sql mod) )
+ if use odbc ; then
+ local odbc_lib="unixodbc"
+ if use iodbc ; then
+ odbc_lib="iodbc"
+ append-cppflags -I"${EPREFIX}"/usr/include/iodbc
+ fi
+ myconf+=( --with-odbc=${odbc_lib} )
+ fi
+
+ # slapd options
+ myconf+=(
+ $(use_enable crypt)
+ $(use_enable slp)
+ $(use_enable samba lmpasswd)
+ $(use_enable syslog)
+ )
+ if use experimental ; then
+ myconf+=(
+ --enable-dynacl
+ --enable-aci=mod
+ )
+ fi
+ for option in aci cleartext modules rewrite rlookups slapi; do
+ myconf+=( --enable-${option} )
+ done
+
+ # slapd overlay options
+ # Compile-in the syncprov, the others as module
+ myconf+=( --enable-syncprov=yes )
+ use overlays && myconf+=( --enable-overlays=mod )
+
+ else
+ myconf+=(
+ --disable-backends
+ --disable-slapd
+ --disable-bdb
+ --disable-hdb
+ --disable-mdb
+ --disable-overlays
+ --disable-syslog
+ )
+ fi
+
+ # basic functionality stuff
+ myconf+=(
+ $(use_enable ipv6)
+ $(multilib_native_use_with sasl cyrus-sasl)
+ $(multilib_native_use_enable sasl spasswd)
+ $(use_enable tcpd wrappers)
+ )
+
+ # Some cross-compiling tests don't pan out well.
+ tc-is-cross-compiler && myconf+=(
+ --with-yielding-select=yes
+ )
+
+ local ssl_lib="no"
+ if use ssl || ( ! use minimal && use samba ) ; then
+ ssl_lib="openssl"
+ use gnutls && ssl_lib="gnutls"
+ fi
+
+ myconf+=( --with-tls=${ssl_lib} )
+
+ for basicflag in dynamic local proctitle shared; do
+ myconf+=( --enable-${basicflag} )
+ done
+
+ tc-export AR CC CXX
+ ECONF_SOURCE=${S} \
+ STRIP=/bin/true \
+ econf \
+ --libexecdir="${EPREFIX}"/usr/$(get_libdir)/openldap \
+ $(use_enable static-libs static) \
+ "${myconf[@]}"
+ emake depend
+}
+
+src_configure_cxx() {
+ # This needs the libraries built by the first build run.
+ # So we have to run it AFTER the main build, not just after the main
+ # configure.
+ local myconf_ldapcpp=(
+ --with-ldap-includes="${S}"/include
+ )
+
+ mkdir -p "${BUILD_DIR}"/contrib/ldapc++ || die
+ cd "${BUILD_DIR}/contrib/ldapc++" || die
+
+ local LDFLAGS=${LDFLAGS} CPPFLAGS=${CPPFLAGS}
+ append-ldflags -L"${BUILD_DIR}"/libraries/liblber/.libs \
+ -L"${BUILD_DIR}"/libraries/libldap/.libs
+ append-cppflags -I"${BUILD_DIR}"/include
+ ECONF_SOURCE=${S}/contrib/ldapc++ \
+ econf "${myconf_ldapcpp[@]}" \
+ CC="${CC}" \
+ CXX="${CXX}"
+}
+
+multilib_src_compile() {
+ tc-export AR CC CXX
+ emake CC="${CC}" AR="${AR}" SHELL="${EPREFIX}"/bin/bash
+ local lt="${BUILD_DIR}/libtool"
+ export echo="echo"
+
+ if ! use minimal && multilib_is_native_abi ; then
+ if use cxx ; then
+ einfo "Building contrib library: ldapc++"
+ src_configure_cxx
+ cd "${BUILD_DIR}/contrib/ldapc++" || die
+ emake \
+ CC="${CC}" CXX="${CXX}"
+ fi
+
+ if use smbkrb5passwd ; then
+ einfo "Building contrib-module: smbk5pwd"
+ cd "${S}/contrib/slapd-modules/smbk5pwd" || die
+
+ MY_DEFS="-DDO_SHADOW"
+ if use samba ; then
+ MY_DEFS="${MY_DEFS} -DDO_SAMBA"
+ MY_KRB5_INC=""
+ fi
+ if use kerberos ; then
+ MY_DEFS="${MY_DEFS} -DDO_KRB5"
+ MY_KRB5_INC="$(krb5-config --cflags)"
+ fi
+
+ emake \
+ DEFS="${MY_DEFS}" \
+ KRB5_INC="${MY_KRB5_INC}" \
+ LDAP_BUILD="${BUILD_DIR}" \
+ CC="${CC}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap"
+ fi
+
+ if use overlays ; then
+ einfo "Building contrib-module: samba4"
+ cd "${S}/contrib/slapd-modules/samba4" || die
+
+ emake \
+ LDAP_BUILD="${BUILD_DIR}" \
+ CC="${CC}" libexecdir="/usr/$(get_libdir)/openldap"
+ fi
+
+ if use kerberos ; then
+ if use kinit ; then
+ build_contrib_module "kinit" "kinit.c" "kinit"
+ fi
+ cd "${S}/contrib/slapd-modules/passwd" || die
+ einfo "Compiling contrib-module: pw-kerberos"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include \
+ ${CFLAGS} \
+ $(krb5-config --cflags) \
+ -DHAVE_KRB5 \
+ -o kerberos.lo \
+ -c kerberos.c || die "compiling pw-kerberos failed"
+ einfo "Linking contrib-module: pw-kerberos"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o pw-kerberos.la \
+ kerberos.lo || die "linking pw-kerberos failed"
+ fi
+
+ if use pbkdf2; then
+ cd "${S}/contrib/slapd-modules/passwd/pbkdf2" || die
+ einfo "Compiling contrib-module: pw-pbkdf2"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -I"${BUILD_DIR}"/include \
+ -I../../../../include \
+ ${CFLAGS} \
+ -o pbkdf2.lo \
+ -c pw-pbkdf2.c || die "compiling pw-pbkdf2 failed"
+ einfo "Linking contrib-module: pw-pbkdf2"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o pw-pbkdf2.la \
+ pbkdf2.lo || die "linking pw-pbkdf2 failed"
+ fi
+
+ if use sha2 ; then
+ cd "${S}/contrib/slapd-modules/passwd/sha2" || die
+ einfo "Compiling contrib-module: pw-sha2"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -I"${BUILD_DIR}"/include \
+ -I../../../../include \
+ ${CFLAGS} \
+ -o sha2.lo \
+ -c sha2.c || die "compiling pw-sha2 failed"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -I"${BUILD_DIR}"/include \
+ -I../../../../include \
+ ${CFLAGS} \
+ -o slapd-sha2.lo \
+ -c slapd-sha2.c || die "compiling pw-sha2 failed"
+ einfo "Linking contrib-module: pw-sha2"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o pw-sha2.la \
+ sha2.lo slapd-sha2.lo || die "linking pw-sha2 failed"
+ fi
+
+ # We could build pw-radius if GNURadius would install radlib.h
+ cd "${S}/contrib/slapd-modules/passwd" || die
+ einfo "Compiling contrib-module: pw-netscape"
+ "${lt}" --mode=compile --tag=CC \
+ "${CC}" \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include \
+ ${CFLAGS} \
+ -o netscape.lo \
+ -c netscape.c || die "compiling pw-netscape failed"
+ einfo "Linking contrib-module: pw-netscape"
+ "${lt}" --mode=link --tag=CC \
+ "${CC}" -module \
+ ${CFLAGS} \
+ ${LDFLAGS} \
+ -rpath "${EPREFIX}"/usr/$(get_libdir)/openldap/openldap \
+ -o pw-netscape.la \
+ netscape.lo || die "linking pw-netscape failed"
+
+ #build_contrib_module "acl" "posixgroup.c" "posixGroup" # example code only
+ #build_contrib_module "acl" "gssacl.c" "gss" # example code only, also needs kerberos
+ build_contrib_module "addpartial" "addpartial-overlay.c" "addpartial-overlay"
+ build_contrib_module "allop" "allop.c" "overlay-allop"
+ build_contrib_module "allowed" "allowed.c" "allowed"
+ build_contrib_module "autogroup" "autogroup.c" "autogroup"
+ build_contrib_module "cloak" "cloak.c" "cloak"
+ # build_contrib_module "comp_match" "comp_match.c" "comp_match" # really complex, adds new external deps, questionable demand
+ build_contrib_module "denyop" "denyop.c" "denyop-overlay"
+ build_contrib_module "dsaschema" "dsaschema.c" "dsaschema-plugin"
+ build_contrib_module "dupent" "dupent.c" "dupent"
+ build_contrib_module "lastbind" "lastbind.c" "lastbind"
+ # lastmod may not play well with other overlays
+ build_contrib_module "lastmod" "lastmod.c" "lastmod"
+ build_contrib_module "noopsrch" "noopsrch.c" "noopsrch"
+ build_contrib_module "nops" "nops.c" "nops-overlay"
+ #build_contrib_module "nssov" "nssov.c" "nssov-overlay" RESO:LATER
+ build_contrib_module "trace" "trace.c" "trace"
+ # build slapi-plugins
+ cd "${S}/contrib/slapi-plugins/addrdnvalues" || die
+ einfo "Building contrib-module: addrdnvalues plugin"
+ "${CC}" -shared \
+ -I"${BUILD_DIR}"/include \
+ -I../../../include \
+ ${CFLAGS} \
+ -fPIC \
+ ${LDFLAGS} \
+ -o libaddrdnvalues-plugin.so \
+ addrdnvalues.c || die "Building libaddrdnvalues-plugin.so failed"
+
+ fi
+}
+
+multilib_src_test() {
+ if multilib_is_native_abi; then
+ cd tests || die
+ emake tests || die "make tests failed"
+ fi
+}
+
+multilib_src_install() {
+ local lt="${BUILD_DIR}/libtool"
+ emake DESTDIR="${D}" SHELL="${EPREFIX}"/bin/bash install
+ use static-libs || prune_libtool_files --all
+
+ if ! use minimal && multilib_is_native_abi; then
+ # openldap modules go here
+ # TODO: write some code to populate slapd.conf with moduleload statements
+ keepdir /usr/$(get_libdir)/openldap/openldap/
+
+ # initial data storage dir
+ keepdir /var/lib/openldap-data
+ use prefix || fowners ldap:ldap /var/lib/openldap-data
+ fperms 0700 /var/lib/openldap-data
+
+ echo "OLDPF='${PF}'" > "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
+ echo "# do NOT delete this. it is used" >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
+ echo "# to track versions for upgrading." >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}"
+
+ # use our config
+ rm "${ED}"etc/openldap/slapd.conf
+ insinto /etc/openldap
+ newins "${FILESDIR}"/${PN}-2.4.40-slapd-conf slapd.conf
+ configfile="${ED}"etc/openldap/slapd.conf
+
+ # populate with built backends
+ ebegin "populate config with built backends"
+ for x in "${ED}"usr/$(get_libdir)/openldap/openldap/back_*.so; do
+ einfo "Adding $(basename ${x})"
+ sed -e "/###INSERTDYNAMICMODULESHERE###$/a# moduleload\t$(basename ${x})" -i "${configfile}"
+ done
+ sed -e "s:###INSERTDYNAMICMODULESHERE###$:# modulepath\t${EPREFIX}/usr/$(get_libdir)/openldap/openldap:" -i "${configfile}"
+ use prefix || fowners root:ldap /etc/openldap/slapd.conf
+ fperms 0640 /etc/openldap/slapd.conf
+ cp "${configfile}" "${configfile}".default
+ eend
+
+ # install our own init scripts and systemd unit files
+ einfo "Install init scripts"
+ sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-initd-2.4.40-r2 > "${T}"/slapd || die
+ doinitd "${T}"/slapd
+ newconfd "${FILESDIR}"/slapd-confd-2.4.28-r1 slapd
+
+ einfo "Install systemd service"
+ sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd.service > "${T}"/slapd.service || die
+ systemd_dounit "${T}"/slapd.service
+ systemd_install_serviced "${FILESDIR}"/slapd.service.conf
+ systemd_newtmpfilesd "${FILESDIR}"/slapd.tmpfilesd slapd.conf
+
+ # If built without SLP, we don't need to be before avahi
+ use slp \
+ || sed -i \
+ -e '/before/{s/avahi-daemon//g}' \
+ "${ED}"etc/init.d/slapd
+
+ if use cxx ; then
+ einfo "Install the ldapc++ library"
+ cd "${BUILD_DIR}/contrib/ldapc++" || die
+ emake DESTDIR="${D}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install
+ cd "${S}"/contrib/ldapc++ || die
+ newdoc README ldapc++-README
+ fi
+
+ if use smbkrb5passwd ; then
+ einfo "Install the smbk5pwd module"
+ cd "${S}/contrib/slapd-modules/smbk5pwd" || die
+ emake DESTDIR="${D}" \
+ LDAP_BUILD="${BUILD_DIR}" \
+ libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install
+ newdoc README smbk5pwd-README
+ fi
+
+ if use overlays ; then
+ einfo "Install the samba4 module"
+ cd "${S}/contrib/slapd-modules/samba4" || die
+ emake DESTDIR="${D}" \
+ LDAP_BUILD="${BUILD_DIR}" \
+ libexecdir="/usr/$(get_libdir)/openldap" install
+ newdoc README samba4-README
+ fi
+
+ einfo "Installing contrib modules"
+ cd "${S}/contrib/slapd-modules" || die
+ for l in */*.la */*/*.la; do
+ [[ -e ${l} ]] || continue
+ "${lt}" --mode=install cp ${l} \
+ "${ED}"usr/$(get_libdir)/openldap/openldap || \
+ die "installing ${l} failed"
+ done
+
+ dodoc "${FILESDIR}"/DB_CONFIG.fast.example
+ docinto contrib
+ doman */*.5
+ #newdoc acl/README*
+ newdoc addpartial/README addpartial-README
+ newdoc allop/README allop-README
+ newdoc allowed/README allowed-README
+ newdoc autogroup/README autogroup-README
+ newdoc dsaschema/README dsaschema-README
+ newdoc passwd/README passwd-README
+ cd "${S}/contrib/slapi-plugins" || die
+ insinto /usr/$(get_libdir)/openldap/openldap
+ doins */*.so
+ docinto contrib
+ newdoc addrdnvalues/README addrdnvalues-README
+
+ insinto /etc/openldap/schema
+ newins "${DISTDIR}"/${BIS_P} ${BIS_PN}
+
+ docinto back-sock ; dodoc "${S}"/servers/slapd/back-sock/searchexample*
+ docinto back-shell ; dodoc "${S}"/servers/slapd/back-shell/searchexample*
+ docinto back-perl ; dodoc "${S}"/servers/slapd/back-perl/SampleLDAP.pm
+
+ dosbin "${S}"/contrib/slapd-tools/statslog
+ newdoc "${S}"/contrib/slapd-tools/README README.statslog
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc ANNOUNCEMENT CHANGES COPYRIGHT README
+ docinto rfc ; dodoc doc/rfc/*.txt
+}
+
+pkg_preinst() {
+ # keep old libs if any
+ preserve_old_lib /usr/$(get_libdir)/{liblber,libldap_r,liblber}-2.3$(get_libname 0)
+ # bug 440470, only display the getting started help there was no openldap before,
+ # or we are going to a non-minimal build
+ ! has_version net-nds/openldap || has_version 'net-nds/openldap[minimal]'
+ OPENLDAP_PRINT_MESSAGES=$((! $?))
+}
+
+pkg_postinst() {
+ if ! use minimal ; then
+ # You cannot build SSL certificates during src_install that will make
+ # binary packages containing your SSL key, which is both a security risk
+ # and a misconfiguration if multiple machines use the same key and cert.
+ if use ssl; then
+ install_cert /etc/openldap/ssl/ldap
+ use prefix || chown ldap:ldap "${EROOT}"etc/openldap/ssl/ldap.*
+ ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]"
+ ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]"
+ ewarn "add 'TLS_REQCERT allow' if you want to use them."
+ fi
+
+ if use prefix; then
+ # Warn about prefix issues with slapd
+ eerror "slapd might NOT be usable on Prefix systems as it requires root privileges"
+ eerror "to start up, and requires that certain files directories be owned by"
+ eerror "ldap:ldap. As Prefix does not support changing ownership of files and"
+ eerror "directories, you will have to manually fix this yourself."
+ fi
+
+ # These lines force the permissions of various content to be correct
+ use prefix || chown ldap:ldap "${EROOT}"var/run/openldap
+ chmod 0755 "${EROOT}"var/run/openldap
+ use prefix || chown root:ldap "${EROOT}"etc/openldap/slapd.conf{,.default}
+ chmod 0640 "${EROOT}"etc/openldap/slapd.conf{,.default}
+ use prefix || chown ldap:ldap "${EROOT}"var/lib/openldap-data
+ fi
+
+ if has_version 'net-nds/openldap[-minimal]' && ((${OPENLDAP_PRINT_MESSAGES})); then
+ elog "Getting started using OpenLDAP? There is some documentation available:"
+ elog "Gentoo Guide to OpenLDAP Authentication"
+ elog "(https://wiki.gentoo.org/wiki/Centralized_authentication_using_OpenLDAP)"
+ elog "---"
+ elog "An example file for tuning BDB backends with openldap is"
+ elog "DB_CONFIG.fast.example in /usr/share/doc/${PF}/"
+ fi
+
+ preserve_old_lib_notify /usr/$(get_libdir)/{liblber,libldap,libldap_r}-2.3$(get_libname 0)
+}
diff --git a/net-nds/phpldapadmin/Manifest b/net-nds/phpldapadmin/Manifest
new file mode 100644
index 000000000000..4ba2b51d7d76
--- /dev/null
+++ b/net-nds/phpldapadmin/Manifest
@@ -0,0 +1,9 @@
+AUX phpldapadmin-1.2.1.1-fix-magic-quotes.patch 829 SHA256 7cce069d30a5c4067743de8e91d0d6bd4d9faaaf169ed342a3890bf07ced8817 SHA512 64830cc864dbbe3d0aa72d0e1165b787287430f3ea7507c8e9df2115b03df73944c63a4e9c09a7f8c9a11d41f48327ee26c204ede3bae2209b0f47076d5587b3 WHIRLPOOL a539598b966e53b3df565711546adea1515621d015b3c1de4375a7d92735c56d551101d1cbfd0d216fdd843ad1311573cb4ac7867d175ecd8e8154da6fc1b794
+AUX phpldapadmin-fix-php5.5-support.patch 5157 SHA256 bc9c6ff55c4559007bfaf884ff34ce621de7ae27c4a82c89c6af36cab6b92003 SHA512 c0f990fea6e8f312d36f7eea754d3f4f1c2356a5e233c5df82fa1ce4b194d160ad40ce2ef85441f6686feecffae831770591e44cc67982bee63e870464da7f7b WHIRLPOOL 2b0a69d00246c6572e7f3f1974656bda2b91ae8bbe3c31470045943f9a65e35a5012baaf8c4dcc7668ea9401aa5ccb9ac9753a393997232916dc62b9169bba9e
+AUX postinstall2-en.txt 131 SHA256 e2dc7bea366789a303eb9a90d1bced655cea00469202859af40bf19c00505d38 SHA512 f465adc204ef40675848e39e37bab3f2eb5054549e3b787953793ece683df84a52373d23383601b3c53c6b98bf8f1de83c6d83be117be9c00da7058763709d6b WHIRLPOOL 1903859baaaf44d93eaae4605878d282c8c7020cbab9e7b670b11716433dc5a6d70074ceec2a80533727e0e72c5f6325b03b65fab1bf8692684bd57dc9223b39
+DIST phpldapadmin-1.2.3.tgz 1115707 SHA256 aecaf8c3ce77ba3899dd31ee5ee183555b2f9349eb8e196dcd33d8a3c485ed58 SHA512 58a57ca577586685ebd0d7fde7e299b8945d1693018c7803e19239b79f4b9d72a4d207d53c9f284268e32398108038efafcdb434e634619bfe87db3524d267b6 WHIRLPOOL 2d8cf7dc9e3b509ed6884efa280e554aa34703ca829f377304b99ded20ad144ff445cae3630e83dbfdcccc83799a85a3a2301903a4e298faf0884d3201ca0d21
+EBUILD phpldapadmin-1.2.3-r1.ebuild 1388 SHA256 e0db8cdefbf76370ca43eb9fc43c3e12f8a338e1b33ced51adfefb5868490839 SHA512 794749faa522e41d2b50413528a04673c8678a236e90c723c1d11c9ea51d2da2a0e493516f11a817ab09faa002b9bf78bce597984a178fa837c7bec53f69e4d9 WHIRLPOOL 479b67933d914e7a7861fe5b85abf263924c33d141d21236d8388c951e28abd72a133665d1d302696421ac48c593d2e8efea6244ff2dbac30acd5067a20c4f0d
+EBUILD phpldapadmin-1.2.3.ebuild 1145 SHA256 3e6483bf1d90be8d8de57b4ac013dd03a5d60c0f1243b7abab4e8ea93419d217 SHA512 f7a55503c5dba3e6e35b9110d4323a0d39d17920280902316742852670fbae567d8fa1a9ea8b93fc78fe62b92eb9c070b11d1d296535536b42cfea91d50cf248 WHIRLPOOL 921f9f9586c6789d4a63fd61ac3f2c174d8f1c8fbd08554da23b847eeb4602990fa8dc019e6cee0f70b88c6d6e1b4e3b1f309a15877e70b6b7fda95d02af713e
+MISC ChangeLog 3620 SHA256 cd78269b22d5d6f3b26b97a15cb21c935442e6fdd71e127f8f7149399a70840d SHA512 398cc017af2be8e954089231f5f10b9c82e8ae7c1f1eeb11c6de1cfb8e02cbbc3001a7c11f285f693fc6a915399e8dda2cce388b8f10cab8e8f3101d2bbf594d WHIRLPOOL 0c852d9d621971e2de8a00ad9c99ce713e5e41f7f53e78b014b7eae25437b130b69dcdf09e95506f7a04a1e7ded56963354a7ac1faaf7a02c173a0b22f34e40e
+MISC ChangeLog-2015 10556 SHA256 ffdfbf84549d0c895ca91f011e1400d453b1fd11248c41694176a695e08fe70d SHA512 2ec4378b55c710a183f9a11026959ffe79682e61c75b9f79960cf874a345bd3afb65997b5f439f4b9d3d27a90f11f36e7e2c0875702687d0808b6feea05f6c89 WHIRLPOOL 494fbeb8e6f34baf925e66f1725a68f5abe025ba255befac677791e4dd27ca5e346c4c528009d6bdc2a7bdf1e2a38b8996dffd62683f26774795f1cf4e549150
+MISC metadata.xml 593 SHA256 bf81811f8152e5f68740908489c6e0e48e1abade0023dfa4cb6e499debb2fa02 SHA512 76e19473a162674546562e71b893a1f4a076bae09998b7ad4136421d60c33b2c64ae32fd2d618128417b56437fc6ed1ae823f4642c8c4facd81a36e72a2451b3 WHIRLPOOL 27fd7b9a92b1c39ddbb9993230367a60209a5ada647914fb0ec8d609e8cc4403f2cb465ed53adc9de89e8b479e611e056f802eac05089264157a676ea1fcb466
diff --git a/net-nds/phpldapadmin/files/phpldapadmin-1.2.1.1-fix-magic-quotes.patch b/net-nds/phpldapadmin/files/phpldapadmin-1.2.1.1-fix-magic-quotes.patch
new file mode 100644
index 000000000000..3a2f3a48223c
--- /dev/null
+++ b/net-nds/phpldapadmin/files/phpldapadmin-1.2.1.1-fix-magic-quotes.patch
@@ -0,0 +1,23 @@
+diff -urN phpldapadmin-1.2.1.1/lib/emuhash_functions.php phpldapadmin-1.2.1.1-new/lib/emuhash_functions.php
+--- phpldapadmin-1.2.1.1/lib/emuhash_functions.php 2011-05-11 09:40:18.000000000 +0000
++++ phpldapadmin-1.2.1.1-new/lib/emuhash_functions.php 2011-10-20 15:55:05.597714125 +0000
+@@ -59,8 +59,8 @@
+ global $emuhash_emu;
+
+ if (PHP_VERSION < 6) {
+- $current_magic_quotes = @get_magic_quotes_runtime();
+- @set_magic_quotes_runtime(0);
++ $current_magic_quotes = ini_get('magic_quotes_runtime');
++ ini_set('magic_quotes_runtime', 0);;
+ }
+
+ $tmpfile = tempnam($emuhash_emu['tmpdir'],'emuhash');
+@@ -78,7 +78,7 @@
+ unlink($tmpfile);
+
+ if (PHP_VERSION < 6)
+- @set_magic_quotes_runtime($current_magic_quotes);
++ ini_set('magic_quotes_runtime', $current_magic_quotes);
+
+ return $pass;
+ }
diff --git a/net-nds/phpldapadmin/files/phpldapadmin-fix-php5.5-support.patch b/net-nds/phpldapadmin/files/phpldapadmin-fix-php5.5-support.patch
new file mode 100644
index 000000000000..df6a7c163758
--- /dev/null
+++ b/net-nds/phpldapadmin/files/phpldapadmin-fix-php5.5-support.patch
@@ -0,0 +1,152 @@
+commit 7e53dab990748c546b79f0610c3a7a58431e9ebc
+Author: Michael Laccetti <michael@laccetti.com>
+Date: Thu Aug 29 09:13:56 2013 -0400
+
+ Fixed two issues to get phpLdapAdmin to work under PHP 5.5.x
+ 1) password_hash is an actual function, so renamed instances to password_hash_custom (HT: https://sourceforge.net/mailarchive/message.php?msg_id=31302386)
+ 2) Fixed the preg_replace to preg_replace_callback to use the /e/ functionality in the officially endorsed fashion
+
+diff --git a/lib/PageRender.php b/lib/PageRender.php
+index 7d86a54..eed5d5f 100644
+--- a/lib/PageRender.php
++++ b/lib/PageRender.php
+@@ -287,7 +287,7 @@ class PageRender extends Visitor {
+ break;
+
+ default:
+- $vals[$i] = password_hash($passwordvalue,$enc);
++ $vals[$i] = password_hash_custom($passwordvalue,$enc);
+ }
+
+ $vals = array_unique($vals);
+@@ -957,7 +957,7 @@ class PageRender extends Visitor {
+ if (trim($val))
+ $enc_type = get_enc_type($val);
+ else
+- $enc_type = $server->getValue('appearance','password_hash');
++ $enc_type = $server->getValue('appearance','password_hash_custom');
+
+ $obfuscate_password = obfuscate_password_display($enc_type);
+
+@@ -982,7 +982,7 @@ class PageRender extends Visitor {
+ if (trim($val))
+ $enc_type = get_enc_type($val);
+ else
+- $enc_type = $server->getValue('appearance','password_hash');
++ $enc_type = $server->getValue('appearance','password_hash_custom');
+
+ echo '<table cellspacing="0" cellpadding="0"><tr><td valign="top">';
+
+diff --git a/lib/ds_ldap.php b/lib/ds_ldap.php
+index c346660..7532539 100644
+--- a/lib/ds_ldap.php
++++ b/lib/ds_ldap.php
+@@ -1116,13 +1116,24 @@ class ldap extends DS {
+
+ if (is_array($dn)) {
+ $a = array();
+- foreach ($dn as $key => $rdn)
+- $a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn);
++ foreach ($dn as $key => $rdn) {
++ $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',
++ function ($m) {
++ return ''.chr(hexdec('\\1')).'';
++ },
++ $rdn
++ );
++ }
+
+ return $a;
+
+ } else
+- return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn);
++ return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',
++ function ($m) {
++ return ''.chr(hexdec('\\1')).'';
++ },
++ $dn
++ );
+ }
+
+ public function getRootDSE($method=null) {
+diff --git a/lib/ds_ldap_pla.php b/lib/ds_ldap_pla.php
+index 7ece393..6b0990e 100644
+--- a/lib/ds_ldap_pla.php
++++ b/lib/ds_ldap_pla.php
+@@ -16,7 +16,7 @@ class ldap_pla extends ldap {
+ function __construct($index) {
+ parent::__construct($index);
+
+- $this->default->appearance['password_hash'] = array(
++ $this->default->appearance['password_hash_custom'] = array(
+ 'desc'=>'Default HASH to use for passwords',
+ 'default'=>'md5');
+
+diff --git a/lib/functions.php b/lib/functions.php
+index 56d8bf3..5ac3caf 100644
+--- a/lib/functions.php
++++ b/lib/functions.php
+@@ -2127,7 +2127,7 @@ function password_types() {
+ * crypt, ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, sha512, or clear.
+ * @return string The hashed password.
+ */
+-function password_hash($password_clear,$enc_type) {
++function password_hash_custom($password_clear,$enc_type) {
+ if (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))
+ debug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);
+
+@@ -2318,7 +2318,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword
+
+ # SHA crypted passwords
+ case 'sha':
+- if (strcasecmp(password_hash($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0)
++ if (strcasecmp(password_hash_custom($plainpassword,'sha'),'{SHA}'.$cryptedpassword) == 0)
+ return true;
+ else
+ return false;
+@@ -2327,7 +2327,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword
+
+ # MD5 crypted passwords
+ case 'md5':
+- if( strcasecmp(password_hash($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0)
++ if( strcasecmp(password_hash_custom($plainpassword,'md5'),'{MD5}'.$cryptedpassword) == 0)
+ return true;
+ else
+ return false;
+@@ -2392,7 +2392,7 @@ function password_check($cryptedpassword,$plainpassword,$attribute='userpassword
+
+ # SHA512 crypted passwords
+ case 'sha512':
+- if (strcasecmp(password_hash($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0)
++ if (strcasecmp(password_hash_custom($plainpassword,'sha512'),'{SHA512}'.$cryptedpassword) == 0)
+ return true;
+ else
+ return false;
+@@ -2564,13 +2564,24 @@ function dn_unescape($dn) {
+ if (is_array($dn)) {
+ $a = array();
+
+- foreach ($dn as $key => $rdn)
+- $a[$key] = preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$rdn);
++ foreach ($dn as $key => $rdn) {
++ $a[$key] = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',
++ function ($m) {
++ return ''.chr(hexdec('\\1')).'';
++ },
++ $rdn
++ );
++ }
+
+ return $a;
+
+ } else {
+- return preg_replace('/\\\([0-9A-Fa-f]{2})/e',"''.chr(hexdec('\\1')).''",$dn);
++ return preg_replace_callback('/\\\([0-9A-Fa-f]{2})/',
++ function ($m) {
++ return ''.chr(hexdec('\\1')).'';
++ },
++ $dn
++ );
+ }
+ }
+
diff --git a/net-nds/phpldapadmin/files/postinstall2-en.txt b/net-nds/phpldapadmin/files/postinstall2-en.txt
new file mode 100644
index 000000000000..005ead72e8d3
--- /dev/null
+++ b/net-nds/phpldapadmin/files/postinstall2-en.txt
@@ -0,0 +1,4 @@
+phpLDAPadmin is installed. You will need to
+configure it by creating/editing the config file:
+
+${MY_INSTALLDIR}/config/config.php
diff --git a/net-nds/phpldapadmin/metadata.xml b/net-nds/phpldapadmin/metadata.xml
new file mode 100644
index 000000000000..79c647a9654e
--- /dev/null
+++ b/net-nds/phpldapadmin/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>jmbsvicetto@gentoo.org</email>
+ <name>Jorge Manuel B. S. Vicetto</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>web-apps@gentoo.org</email>
+ <name>Gentoo Webapps</name>
+ </maintainer>
+ <longdescription>
+ phpLDAPadmin is a web-based tool for managing all aspects of your LDAP server.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">phpldapadmin</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/phpldapadmin/phpldapadmin-1.2.3-r1.ebuild b/net-nds/phpldapadmin/phpldapadmin-1.2.3-r1.ebuild
new file mode 100644
index 000000000000..075a0159c130
--- /dev/null
+++ b/net-nds/phpldapadmin/phpldapadmin-1.2.3-r1.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils webapp
+
+DESCRIPTION="phpLDAPadmin is a web-based tool for managing all aspects of your LDAP server"
+HOMEPAGE="http://phpldapadmin.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/php[hash,ldap,session,xml,nls]
+ || ( <dev-lang/php-5.3[pcre] >=dev-lang/php-5.3 )
+ virtual/httpd-php"
+
+need_httpd_cgi
+
+src_prepare() {
+ mv config/config.php.example config/config.php
+ epatch "${FILESDIR}/${PN}-1.2.1.1-fix-magic-quotes.patch"
+ # http://phpldapadmin.git.sourceforge.net/git/gitweb.cgi?p=phpldapadmin/phpldapadmin;a=commit;h=7dc8d57d6952fe681cb9e8818df7f103220457bd
+
+ epatch "${FILESDIR}/${PN}-fix-php5.5-support.patch"
+ # https://sourceforge.net/u/nihilisticz/phpldapadmin/ci/7e53dab990748c546b79f0610c3a7a58431e9ebc/
+ # This patch has been requested to be merged, but there's no recent activity by upstream
+}
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc INSTALL
+
+ # Restrict config file access - bug 280836
+ chown root:apache "config/config.php"
+ chmod 640 "config/config.php"
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r *
+
+ webapp_configfile "${MY_HTDOCSDIR}/config/config.php"
+ webapp_postinst_txt en "${FILESDIR}"/postinstall2-en.txt
+
+ webapp_src_install
+}
diff --git a/net-nds/phpldapadmin/phpldapadmin-1.2.3.ebuild b/net-nds/phpldapadmin/phpldapadmin-1.2.3.ebuild
new file mode 100644
index 000000000000..47ff7bff30dc
--- /dev/null
+++ b/net-nds/phpldapadmin/phpldapadmin-1.2.3.ebuild
@@ -0,0 +1,44 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils webapp
+
+DESCRIPTION="phpLDAPadmin is a web-based tool for managing all aspects of your LDAP server"
+HOMEPAGE="http://phpldapadmin.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~ia64 ~ppc ~sparc ~x86"
+IUSE=""
+
+RDEPEND="dev-lang/php[hash,ldap,session,xml,nls]
+ || ( <dev-lang/php-5.3[pcre] >=dev-lang/php-5.3 )
+ virtual/httpd-php"
+
+need_httpd_cgi
+
+src_prepare() {
+ mv config/config.php.example config/config.php
+ epatch "${FILESDIR}/${PN}-1.2.1.1-fix-magic-quotes.patch"
+ # http://phpldapadmin.git.sourceforge.net/git/gitweb.cgi?p=phpldapadmin/phpldapadmin;a=commit;h=7dc8d57d6952fe681cb9e8818df7f103220457bd
+}
+
+src_install() {
+ webapp_src_preinst
+
+ dodoc INSTALL
+
+ # Restrict config file access - bug 280836
+ chown root:apache "config/config.php"
+ chmod 640 "config/config.php"
+
+ insinto "${MY_HTDOCSDIR}"
+ doins -r *
+
+ webapp_configfile "${MY_HTDOCSDIR}/config/config.php"
+ webapp_postinst_txt en "${FILESDIR}"/postinstall2-en.txt
+
+ webapp_src_install
+}
diff --git a/net-nds/portmap/Manifest b/net-nds/portmap/Manifest
new file mode 100644
index 000000000000..74334186ee72
--- /dev/null
+++ b/net-nds/portmap/Manifest
@@ -0,0 +1,9 @@
+AUX portmap-6.0-tcpd.patch 341 SHA256 2534aca162edac7ab976474263bebcd7cbd36348d0c593fd822eb84b8ef8dccb SHA512 95788f1adb385d4f06681e7197b4160771c2d27afab1f031ea894ee12f655f787ed47407c5debea9c360ab2410185d75496ca0b1ad31d827f46dd82ebe832a20 WHIRLPOOL dd8ce3779990d8794ed46c2fd3e41dd34f6fa4f4b65a533111272daeef57eb2699b683c35744f7a22bcc0e942175892bc767baa1ee4cc0904f9748413f19dad8
+AUX portmap.confd 146 SHA256 f4e4bd0ce350ed236cfbe369101b8429f2108a174253daffe783353b416f0120 SHA512 2558dfc74c08f7844cb2388bd98f34afe935b3c395571f3d55838e818ff437aa936ebb42c7b4aa82f4872e0f7ef6b5d23b42439462bd769cb8eef56a2852619c WHIRLPOOL 15566030dd1c46697ebaa707c6b6004c158c6689f515df683a3483e47047a984c7dcfa889eca3d8bd8be4c65038cf6e4b3e844346d808bf0f5c4faf8d26ca137
+AUX portmap.rc6 1181 SHA256 62fdb23a5e328de7528ef853cb3a01d2a2f7ea0ad1f5ad69335bfa8cf12f5be5 SHA512 58e8a5364a134736f6d101e85313afe76abdf086838babae71999b3845365a0484ef363f8fe783833c84c6f2edf68fe89a84aab90a090fe995aa10c44bb58bb9 WHIRLPOOL 549621b56abb00041c5f20200009b1f72d07e2ebb190c2c789fa3f7631aae557079654cc90442d055d015349e9ff3d6d39733c04d5681da0fa746370553c4cba
+DIST portmap-6.0.tgz 22251 SHA256 02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de SHA512 cbcbcff34d7f8c82b8e89464467c313a170d3d1756ae47faab1e90bc01fac8c3b6ff8bc8c35bfe32d9e584aafa8248eb37841d1a54f70db6b54ab54ad7e23665 WHIRLPOOL c9fa81fb02e26fa677cab06f2eb02e365d7408e337514cac384e65f9774a37cde6fd0ef49335cb9af65f0be70a440d4bf63b650cb50f9d5064a43abffa7d517b
+EBUILD portmap-6.0.ebuild 1215 SHA256 3e3831b60b5a197776de4304efe27a772b4a4389ff90e06e98a71ea14b9c0d97 SHA512 9cf9c0882c7e78106b32a1f49042e4f208e210e80b50030c3b4cac1dd5c5cde29b0bda54584ebe7046b361de8c19d099ac0a8f89de0d50fc4020163e726fd83c WHIRLPOOL 8077368de1349a6972b884aeb9dd0667b3644f22011d28b7432714466721c526e405c8b1e5bcb060a488e1bf33cb2c0ad78db9d296c1dec3d6fa1e4c31731e4a
+EBUILD portmap-9999.ebuild 868 SHA256 0835273dc2ea431124028b9c80a29fbd08f44323ada0914129e05104cdc91d78 SHA512 b6f456348da6facffc18c0859b7acd94af18381a9b93d4bf24bf9204bbe31f3ff168616d70bf9ae946638f1c6f1f4bedf8d4000b8542bb3e47fe055d970484cb WHIRLPOOL dbae5cd79e04455587ab64d1b72ce2d335d6b95ac16b78be1d5673514bb0281971b7128c48ed44a466452ed9b8f9978818df8878e591084c596d479c1d8e88d4
+MISC ChangeLog 2794 SHA256 f754fd9679a67fa1f57c2de3aacf8da90c262fd3cf6be15129150ccada1b64f3 SHA512 07dee1a135d0e9beee67d1eabb7e0a1e48b1cba51201246d90e5dc59ff23d4ef560ca5ace3f07a9b2cd68d75878b0d8b0db383a694cf9aeeae699e1300aa20f0 WHIRLPOOL eadfcd5a7062894a952198e4deca560885aa0ac36011ce2008d1c91b49193f001864b684cb15aaab145ffbc4650e8beaba0200e9dcc21732a8c163b9668842c6
+MISC ChangeLog-2015 6870 SHA256 470b45600ade42c0c9c710ef3081dd9622c820b1f456b0c2207598fec9939b49 SHA512 81f1f71013a292c27da585374a098d8cd9426634e133d2ddfe78f3dff2cc742563227dc59ea7b73461e0115538d4cbecce267d5b21bb67a0ad804da247927510 WHIRLPOOL 4914bcd5ebd8b96695bebdcff7324bf0d85b83316417437c33d847108b5f8d0fbd0a987550d72e35f0c8c30c8c94f0e1497c27a7ac9bac344e18d248dd2cf9bb
+MISC metadata.xml 253 SHA256 d82c33ef453113a5c1ebe250dcba373c22934a69b0a86c6ab15a5ca589c25b91 SHA512 54a9069aeb4165d2dff3d473c8001bc51613aac9dff3f7f5e9971a9891a737a31511ffa11cbd523febe581ac1d9de2bdf2f40410f0c4239138f2ccca3ef15555 WHIRLPOOL e5aee23acff864609953a1e4de768f0e4aef704b44c53c021f28573e1ca5c99f1a46d92935ecec2449f7b4419a36d8373127d0ecfa8d7bae72d835e1839eb3f8
diff --git a/net-nds/portmap/files/portmap-6.0-tcpd.patch b/net-nds/portmap/files/portmap-6.0-tcpd.patch
new file mode 100644
index 000000000000..c6af8f8c80b4
--- /dev/null
+++ b/net-nds/portmap/files/portmap-6.0-tcpd.patch
@@ -0,0 +1,18 @@
+Enable compile without tcp-wrappers
+
+Patch by Timothy Redaelli <drizzt@gentoo.org>
+
+http://bugs.gentoo.org/178242
+
+--- portmap_6.0/pmap_check.c
++++ portmap_6.0/pmap_check.c
+@@ -44,7 +44,9 @@
+ #include <netinet/in.h>
+ #include <rpc/rpcent.h>
+ #endif
++#ifdef HOSTS_ACCESS
+ #include <tcpd.h>
++#endif
+ #include <arpa/inet.h>
+ #include <grp.h>
+
diff --git a/net-nds/portmap/files/portmap.confd b/net-nds/portmap/files/portmap.confd
new file mode 100644
index 000000000000..c2756c992b4a
--- /dev/null
+++ b/net-nds/portmap/files/portmap.confd
@@ -0,0 +1,5 @@
+# /etc/conf.d/portmap: config file for /etc/init.d/portmap
+
+# Options for `portmap`.
+# For a full list, just run `portmap -h`.
+#PORTMAP_OPTS="-l"
diff --git a/net-nds/portmap/files/portmap.rc6 b/net-nds/portmap/files/portmap.rc6
new file mode 100644
index 000000000000..e123f3df1e6f
--- /dev/null
+++ b/net-nds/portmap/files/portmap.rc6
@@ -0,0 +1,58 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+ before inetd
+ before xinetd
+}
+
+checkconfig() {
+ if [ -e /proc/config.gz ] ; then
+ if zcat /proc/config.gz | grep -s SUNRPC_REGISTER_V4=y ; then
+ eerror "portmap does not work with SUNRPC_REGISTER_V4=y;"
+ eerror "disable it or use the net-nds/rpcbind package."
+ return 1
+ fi
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting portmap"
+ start-stop-daemon --start --quiet --exec /sbin/portmap -- ${PORTMAP_OPTS}
+ local ret=$?
+ eend ${ret}
+ # without, if a service depending on portmap is started too fast,
+ # connecting to portmap will fail -- azarah
+ sleep 1
+ return ${ret}
+}
+
+stop() {
+ ebegin "Stopping portmap"
+ start-stop-daemon --stop --quiet --exec /sbin/portmap
+ eend $?
+}
+
+restart() {
+ # Dump the portmapper's table before stopping
+ ebegin "Saving portmap table"
+ local pmap=$(pmap_dump)
+ eend $?
+
+ # Stop and restart portmapper
+ svc_stop
+ sleep 1
+ svc_start
+
+ # Reload the portmapper's table
+ if [ -n "${pmap}" ] ; then
+ ebegin "Reloading portmap table"
+ echo "${pmap}" | pmap_set
+ eend $?
+ fi
+}
diff --git a/net-nds/portmap/metadata.xml b/net-nds/portmap/metadata.xml
new file mode 100644
index 000000000000..56c124413057
--- /dev/null
+++ b/net-nds/portmap/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+</pkgmetadata>
diff --git a/net-nds/portmap/portmap-6.0.ebuild b/net-nds/portmap/portmap-6.0.ebuild
new file mode 100644
index 000000000000..6beb27c6e571
--- /dev/null
+++ b/net-nds/portmap/portmap-6.0.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+inherit eutils toolchain-funcs user
+
+DESCRIPTION="daemon for implementing remote procedure calls between computer programs"
+HOMEPAGE="http://neil.brown.name/portmap/"
+SRC_URI="http://neil.brown.name/portmap/${P}.tgz"
+
+LICENSE="BSD GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+IUSE="selinux tcpd"
+
+DEPEND="
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6-r7 )
+"
+
+RDEPEND="
+ selinux? ( sec-policy/selinux-portmap )
+"
+
+S=${WORKDIR}/${PN}_${PV}
+
+pkg_setup() {
+ enewgroup rpc 111
+ enewuser rpc 111 -1 /dev/null rpc
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-tcpd.patch #178242
+
+ # Once HPPA gets PIE's fixed, this can go away
+ use hppa && sed -e '/LDFLAGS/s/^/#/' -i "${S}/Makefile" #190458
+}
+
+src_compile() {
+ tc-export CC
+ emake NO_TCP_WRAPPER="$(use tcpd || echo NO)" || die
+}
+
+src_install() {
+ into /
+ dosbin portmap || die "portmap"
+ into /usr
+ dosbin pmap_dump pmap_set || die "pmap"
+
+ doman *.8
+ dodoc BLURBv5 CHANGES README*
+
+ newinitd "${FILESDIR}"/portmap.rc6 portmap
+ newconfd "${FILESDIR}"/portmap.confd portmap
+}
diff --git a/net-nds/portmap/portmap-9999.ebuild b/net-nds/portmap/portmap-9999.ebuild
new file mode 100644
index 000000000000..76484e3a2d0e
--- /dev/null
+++ b/net-nds/portmap/portmap-9999.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+EGIT_REPO_URI="git://neil.brown.name/portmap"
+inherit toolchain-funcs user git-r3
+
+DESCRIPTION="Netkit - portmapper"
+HOMEPAGE="ftp://ftp.porcupine.org/pub/security/index.html"
+SRC_URI=""
+
+LICENSE="BSD GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS=""
+IUSE="selinux tcpd"
+
+DEPEND="
+ tcpd? ( >=sys-apps/tcp-wrappers-7.6-r7 )
+"
+
+RDEPEND="
+ selinux? ( sec-policy/selinux-portmap )
+"
+
+pkg_setup() {
+ enewgroup rpc 111
+ enewuser rpc 111 -1 /dev/null rpc
+}
+
+src_compile() {
+ tc-export CC
+ emake NO_TCP_WRAPPER="$(use tcpd || echo NO)"
+}
+
+src_install() {
+ into /
+ dosbin portmap
+ into /usr
+ dosbin pmap_dump pmap_set
+
+ doman *.8
+ dodoc BLURBv5 CHANGES README*
+
+ newinitd "${FILESDIR}"/portmap.rc6 portmap
+ newconfd "${FILESDIR}"/portmap.confd portmap
+}
diff --git a/net-nds/rpcbind/Manifest b/net-nds/rpcbind/Manifest
new file mode 100644
index 000000000000..10de62c5145d
--- /dev/null
+++ b/net-nds/rpcbind/Manifest
@@ -0,0 +1,17 @@
+AUX rpcbind-0.2.3-libtirpc.patch 1154 SHA256 8f4e2499eccf96b0e49b040f23fffa06ce5cf11ffad39af07fa91a577eafa32e SHA512 2172e18c02bf4111de59110b00798c423f89620b2576dd2fa2de7530ab1a091e4e7f60a9d18d610778110a965e551bc447c1c2566d131c3b18642fb408c7a4b8 WHIRLPOOL 06006bc418ac3c36b51758b4ef9d04929bec29b9ad8492c362fd0ac5f9feed71784a0edb22c292f5e66c74129705b929585f5f8c6ec67ec669127171fb2060df
+AUX rpcbind-0.2.3-mem-corrupt.patch 2831 SHA256 5960af91ee3e716326f121811f3f3372cf0956e3bb0449404de67eb15321ac03 SHA512 3423067b552e7ea76fe783eb3cd8f4299887312509a6cbdcd56fc20c5bcb28f3737f04b79d63876d1218cc1fcb9c5385806e203d937feb140d16a9c67e8fe263 WHIRLPOOL 63ce4676b2f8f4d870e803e20ca6f93f7a6a03393fde4a22e28f6c9f5d6f6301290610b0cb64921aa04eafc51d20687c830aff981c3c90b2659a7c1adf9a8a43
+AUX rpcbind-0.2.3-remove-P-macro.patch 10070 SHA256 5b8da280f43a10e8de32c3197274fb03089483342396ff91662c16775237ab3a SHA512 6f8a4b98aae39fe0ddbb0750cce98292564d9f0852513e85ff4f140b484fdf3191a6e934980d22c97f7de358f314d0c6331fe5a89b271b1ac38a1e697061219e WHIRLPOOL 66d55250fbc498533420d86b351e91d45b9e0299bdbfc099dad93c7b942ad87f32056e29c84a57b1a612781be9acc6cadb394ed047d720a161b2df1c2a9f6aa5
+AUX rpcbind-0.2.4-CVE-2017-8779.patch 646 SHA256 bfb7f022b44ca83309dec6dfcb1ff4a5e0b0a40078e3688a2c7ceaaaa19a9686 SHA512 a4be0f33b6e680ab0255191f959c911deb7e8a12bd2bb3c82b61943e100d9de64a1a8f0b2e3cd2009e2b83e3d091a6461de28cb564d90a838fe39a7098b638e2 WHIRLPOOL f94f8674889a9285f62037ee34c9ba86a44b1192ef3d3120393070c02c3c3c31bdc92e7609db75a192f398ce8cb61f3795a1fe9e9bd15287be9002d33b8d1a25
+AUX rpcbind.confd 68 SHA256 38bb95aefc38d843d0890d9c15affd28f19f2133c17f463396c62970e7e2dffc SHA512 f11f6785708bde3ace7b55c1585e283ed07078faf310077c3d26e8e584baec6152d3f86f3d99d7a34fd10f22a7de4d8d70568c9e7f914a82eeb786b08b379044 WHIRLPOOL c9ce4d7d02c7573c96ceaa1a07732e9c8966d79e9266a8767cdd7fa56725b7757d25c31c47821e1ff858983955e3d278ba09da377d40efb6499e9830aaefeb3a
+AUX rpcbind.initd 414 SHA256 da992f87b5043e22dfd340b4a5440b76dce29cc14d3ef7b0ce586726fe4b220b SHA512 43f26570fbff0970c5aa0a1ee5f4f561645d31c90e3bb997bd63e05678814f199263a5aaa5051bfe88622a156f8260825ffd905301d158cb410f25631d75cc55 WHIRLPOOL 780614e16dd92e2eb98a4d090abd86f4283079e1abe7fd907aab227f5bbb4050c2c98f4470f15ec4386bd225c3a8738e57420d6ef07ca5c5efa55e9d001eff17
+AUX rpcbind.service 193 SHA256 a7a648529f9480b50dd8e8e5906fa7d97320e7eba25875dba23189ce5e75aa67 SHA512 7ec717ebd69cdf3230d09c51c9b3f926a0860967baccbc2345bf8214a2251441b528bbceaa571c84bdcca17c272d43697567885b517501515d15d42f913f3f49 WHIRLPOOL 23f35d918152baa46278334e8a0fea6540adf96eec70dd7619dbe7a1ffb2975d1146e134ba2b6d2f4b00a9e1cd41ca7bc551ee2cde00413ae5eb07b4d50e6cd0
+DIST rpcbind-0.2.3.tar.bz2 121306 SHA256 9897823a9d820ea011d9ea02054d5ab99469b9ca5346265fee380713c8fed27b SHA512 b91cb4e0849213d344063ccf32d16c49819906b65e4d07c4aa7d3c8842bd83acb408d07aa285da902c389f3c9716f01678012b93a11863eb174a2577cd6ba1d6 WHIRLPOOL f8ff512974e6092faf786ef2f5fe23f404a48c28017809c22a3705cb3dfd22220dc3b230235de8a7b64bc46b21f38562ba18af23539bfff439f6e39d6d44cfb3
+DIST rpcbind-0.2.4.tar.bz2 122781 SHA256 074a9a530dc7c11e0d905aa59bcb0847c009313f02e98d3d798aa9568f414c66 SHA512 f3966a7284e94bdf120a9b3f0dd66efa1fe8761df2313545a031f77b7c06e27d7955d2780469943deb537d34f95c4cf3f30de523ec9fab9f571322d7224b210c WHIRLPOOL 9eec5752e3b80f0c3feccf1667e54fb9630b9fabad6613e3f7030489d7b9cfbb5585e173545274f0b3656d27085f71b7c3290da7a2ec022f1948a62a336e278e
+EBUILD rpcbind-0.2.3-r1.ebuild 1410 SHA256 5b141acec9cc4428b78c737fd74caf00f3c711a3fcfb81a6c7aa825d7b43a8aa SHA512 e9df1c9785881072b6db598a952e74dff2714272260dc721a419083bf29c861197c832e63463deb1907664d8155a7114e095def23d8460f853ad0615d9981cfb WHIRLPOOL 8c2f2a74b3140bece61be09ae2a582a38ac9a08acdd7deda5b4aa44c8a232166fb1eec8b18ad8c5cb1696cb8d0b616c9981f1d65ebb6d33435f01680b74c84fe
+EBUILD rpcbind-0.2.3-r2.ebuild 1478 SHA256 e55e86a95eb2746e00d8da272852bd759b056a5db25a7d10244ccdc8f367dea6 SHA512 c408d69cf97dace84a85069f567646fbf50baa1971fd465b56c9168978ed9a6fad319b199fe6c8b046286189de5881e406a8331c2bd0ad33f83b93a6787d0995 WHIRLPOOL 9643f529e7f4bc638a678a0872d054556c8bcc5b7c0134b2b1a163baa743d0c09d97f751be7520500af10a3a73ac1228fbdc6d70f8fc911c797831358549b6b2
+EBUILD rpcbind-0.2.4-r1.ebuild 1393 SHA256 4c9a551db3a1d25358791c84ed89e155723f220b70fafdf29bd0487e75d875d2 SHA512 998133c2c2fdb4251e3dfd47d0f3ce993b37f5d6832f520f871df6bf297ad5a24904e5f5d71b207da9b7626ef1ac914e7095264e88be57317256e552daf8c5cf WHIRLPOOL 6e2901612b359b93b1b236007218e3d4c1a5ef0090b0f2840353dd58e49becaf7f2d5dda1f3e5dca708eba6259d151e1cea92f9122d25a7bd1247afaabdc84da
+EBUILD rpcbind-0.2.4.ebuild 1316 SHA256 65bec0f36ea131c3656e6d4f119689b8b34b9dff2aba5aef4f1908021f8b4244 SHA512 1a80496539d3727c0ce19423d6e8f29f4d2e747c3864fb55d572312668b6c037b80176bb74a91f19af2edfb8503170e39aa36f28189ac97f71aefd2fbca26550 WHIRLPOOL 96092cd553ea1653ef76bd42f01ea90dd52b96251955b6e7e57ea1a65d2e3b3c46867b31100ca2ba29b89d6d5cc93dd2755edf440f74abd2b542f85ef4402475
+EBUILD rpcbind-9999.ebuild 1327 SHA256 2249fce590fc3f3747c4a595bb502cc3d0d7377346cf57beb65469f069a233ed SHA512 677c6dce60b05a5b04973968e1e1b7a9735df76cb7bb0d6fb5cc6ae713277dafa55beea7d35f70745f52997c37e6535b2b022cfdd2f813283bc96c0fded5c521 WHIRLPOOL c35619e13c63c184981648c77b057f86b9a655cf062a7e7af7b48236592834f3d1817bfdb1903fa77ec90315000e5436f2b80f6a40b1c0be55043ed746c9589f
+MISC ChangeLog 6198 SHA256 ade342025c1f6dbb4481c040578f4c28326b85750dfeb898f363967f2dac8b77 SHA512 62a7c4b76f375afaf6c3f3a977d45159175a9159feb19352f1dab692cf4d0039528d2cf1a697760c0812034808cfd1be1c387975019e90ad349de8b3caca621a WHIRLPOOL 1b3c464a5cc39294268b351a03c762e07e876450b7c453ca3c6934549fd9ca0801c43f1db0e4727bf173b8c32ef657d809fa80c4d490f63bf991000762d81e61
+MISC ChangeLog-2015 5908 SHA256 064fb710a31bc7f3ccca52d220832a71fd12e9d2bc44d924821eb59b9f802577 SHA512 380ae6c889bbabbaed12ab1a4a360c974024acdfbdbea27be8a4edb3d1824951ba17472e9f564debeb9928224d4014b01cddef6fe89e9286ffd941602c8339fa WHIRLPOOL d7e7eb9723819fd77f583f32800a532c190469e79303dfc5c2d48d32ee74c1dfff48d0f15cb08a706d6e6abfe8b1d8d5cbda7273542e68e01eaf32620cd036dc
+MISC metadata.xml 405 SHA256 f00aa4ca742840a4285cf6ee239cc319f88af5ba60d5aa1d3f0b62b2db50f99c SHA512 accad1ef4202c9ebd7292ae6e1e68a1c59ddbfb741779a635058d54aa1efbf8b70b5e045d53dc9dba61256d5981e11c57b540a1c7b8fb38207863a6f2c50a5af WHIRLPOOL 9726f030b21142d38207cfdfb784673473346c719e81cbc53a7170a3f0c4838697f7f83de9757ffbc3700477ebc5b9b9b07e8d0194ec34c26727bbdd1ec4b84a
diff --git a/net-nds/rpcbind/files/rpcbind-0.2.3-libtirpc.patch b/net-nds/rpcbind/files/rpcbind-0.2.3-libtirpc.patch
new file mode 100644
index 000000000000..92ea22f0e4ce
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind-0.2.3-libtirpc.patch
@@ -0,0 +1,42 @@
+fix from upstream for building w/newer libtirpc
+
+From 9194122389f2a56b1cd1f935e64307e2e963c2da Mon Sep 17 00:00:00 2001
+From: Steve Dickson <steved@redhat.com>
+Date: Mon, 2 Nov 2015 17:05:18 -0500
+Subject: [PATCH rpcbind] handle_reply: Don't use the xp_auth pointer directly
+
+In the latest libtirpc version to access the xp_auth
+one must use the SVC_XP_AUTH macro. To be backwards
+compatible a couple ifdefs were added to use the
+macro when it exists.
+
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/rpcb_svc_com.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 4ae93f1..22d6c84 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -1295,10 +1295,17 @@ handle_reply(int fd, SVCXPRT *xprt)
+ a.rmt_localvers = fi->versnum;
+
+ xprt_set_caller(xprt, fi);
++#if defined(SVC_XP_AUTH)
++ SVC_XP_AUTH(xprt) = svc_auth_none;
++#else
+ xprt->xp_auth = &svc_auth_none;
++#endif
+ svc_sendreply(xprt, (xdrproc_t) xdr_rmtcall_result, (char *) &a);
++#if !defined(SVC_XP_AUTH)
+ SVCAUTH_DESTROY(xprt->xp_auth);
+ xprt->xp_auth = NULL;
++#endif
++
+ done:
+ if (buffer)
+ free(buffer);
+--
+2.5.2
+
diff --git a/net-nds/rpcbind/files/rpcbind-0.2.3-mem-corrupt.patch b/net-nds/rpcbind/files/rpcbind-0.2.3-mem-corrupt.patch
new file mode 100644
index 000000000000..9c03bda80a08
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind-0.2.3-mem-corrupt.patch
@@ -0,0 +1,86 @@
+https://bugs.gentoo.org/560990
+
+fix from upstream
+
+From d5dace219953c45d26ae42db238052b68540649a Mon Sep 17 00:00:00 2001
+From: Olaf Kirch <okir@suse.de>
+Date: Fri, 30 Oct 2015 10:18:20 -0400
+Subject: [PATCH rpcbind] Fix memory corruption in PMAP_CALLIT code
+
+ - A PMAP_CALLIT call comes in on IPv4 UDP
+ - rpcbind duplicates the caller's address to a netbuf and stores it in
+ FINFO[0].caller_addr. caller_addr->buf now points to a memory region A
+ with a size of 16 bytes
+ - rpcbind forwards the call to the local service, receives a reply
+ - when processing the reply, it does this in xprt_set_caller:
+ xprt->xp_rtaddr = *FINFO[0].caller_addr
+ It sends out the reply, and then frees the netbuf caller_addr and
+ caller_addr.buf.
+ However, it does not clear xp_rtaddr, so xp_rtaddr.buf now refers
+ to memory region A, which is free.
+ - When the next call comes in on the UDP/IPv4 socket, svc_dg_recv will
+ be called, which will set xp_rtaddr to the client's address.
+ It will reuse the buffer inside xp_rtaddr, ie it will write a
+ sockaddr_in to region A
+
+Some time down the road, an incoming TCP connection is accepted,
+allocating a fresh SVCXPRT. The memory region A is inside the
+new SVCXPRT
+
+ - While processing the TCP call, another UDP call comes in, again
+ overwriting region A with the client's address
+ - TCP client closes connection. In svc_destroy, we now trip over
+ the garbage left in region A
+
+We ran into the case where a commercial scanner was triggering
+occasional rpcbind segfaults. The core file that was captured showed
+a corrupted xprt->xp_netid pointer that was really a sockaddr_in.
+
+Signed-off-by: Olaf Kirch <okir@suse.de>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+---
+ src/rpcb_svc_com.c | 23 ++++++++++++++++++++++-
+ 1 file changed, 22 insertions(+), 1 deletion(-)
+
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index ff9ce6b..4ae93f1 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -1183,12 +1183,33 @@ check_rmtcalls(struct pollfd *pfds, int nfds)
+ return (ncallbacks_found);
+ }
+
++/*
++ * This is really a helper function defined in libtirpc,
++ * but unfortunately, it hasn't been exported yet.
++ */
++static struct netbuf *
++__rpc_set_netbuf(struct netbuf *nb, const void *ptr, size_t len)
++{
++ if (nb->len != len) {
++ if (nb->len)
++ mem_free(nb->buf, nb->len);
++ nb->buf = mem_alloc(len);
++ if (nb->buf == NULL)
++ return NULL;
++
++ nb->maxlen = nb->len = len;
++ }
++ memcpy(nb->buf, ptr, len);
++ return nb;
++}
++
+ static void
+ xprt_set_caller(SVCXPRT *xprt, struct finfo *fi)
+ {
++ const struct netbuf *caller = fi->caller_addr;
+ u_int32_t *xidp;
+
+- *(svc_getrpccaller(xprt)) = *(fi->caller_addr);
++ __rpc_set_netbuf(svc_getrpccaller(xprt), caller->buf, caller->len);
+ xidp = __rpcb_get_dg_xidp(xprt);
+ *xidp = fi->caller_xid;
+ }
+--
+2.5.2
+
diff --git a/net-nds/rpcbind/files/rpcbind-0.2.3-remove-P-macro.patch b/net-nds/rpcbind/files/rpcbind-0.2.3-remove-P-macro.patch
new file mode 100644
index 000000000000..8e1b69beb180
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind-0.2.3-remove-P-macro.patch
@@ -0,0 +1,246 @@
+From 196e8f3abaa6e8899ba2655c6c2d8751e33a9795 Mon Sep 17 00:00:00 2001
+From: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Date: Wed, 17 Aug 2016 10:16:47 -0400
+Subject: [PATCH] src: remove use of the __P() macro
+
+The __P() macro is a legacy compatibility macro aimed making pre-ANSI
+(i.e. K&R) compilers that do not support function prototypes happy,
+while still allowing such prototypes for ANSI-compliant compilers.
+
+Since virtually all compilers have been ANSI-compliant for a few decades
+now, use of __P() is totally useless.
+
+Furthermore, __P() is defined in the non-standard sys/cdefs.h header.
+This header is present in glibc and uClibc, and both have it included
+from many of their headers. So, sys/cdefs.h is automagically included in
+most cases and its macros are available.
+
+However, the musl C library does not provide this sys/cdefs.h header.
+Thus, the build breaks on musl.
+
+For all the above reasons, get rid of __P() wherever it is used; just
+always declare real function prototypes.
+
+Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Signed-off-by: Steve Dickson <steved@redhat.com>
+Cc: Chuck Lever <chuck.lever@oracle.com>
+Cc: Steve Dickson <SteveD@redhat.com>
+Cc: Mike Frysinger <vapier@gentoo.org>
+---
+ src/check_bound.c | 2 +-
+ src/pmap_svc.c | 10 +++++-----
+ src/rpcb_svc.c | 10 +++++-----
+ src/rpcb_svc_4.c | 14 ++++++--------
+ src/rpcb_svc_com.c | 46 +++++++++++++++++++++++-----------------------
+ src/rpcbind.c | 12 ++++++------
+ src/util.c | 2 +-
+ src/warmstart.c | 4 ++--
+ 8 files changed, 49 insertions(+), 51 deletions(-)
+
+diff --git a/src/check_bound.c b/src/check_bound.c
+index c70b845..92bfd36 100644
+--- a/src/check_bound.c
++++ b/src/check_bound.c
+@@ -70,7 +70,7 @@ static struct fdlist *fdhead; /* Link list of the check fd's */
+ static struct fdlist *fdtail;
+ static char *nullstring = "";
+
+-static bool_t check_bound __P((struct fdlist *, char *uaddr));
++static bool_t check_bound(struct fdlist *, char *uaddr);
+
+ /*
+ * Returns 1 if the given address is bound for the given addr & transport
+diff --git a/src/pmap_svc.c b/src/pmap_svc.c
+index ad28b93..4c744fe 100644
+--- a/src/pmap_svc.c
++++ b/src/pmap_svc.c
+@@ -60,11 +60,11 @@ static char sccsid[] = "@(#)pmap_svc.c 1.23 89/04/05 Copyr 1984 Sun Micro";
+ #include "rpcbind.h"
+ #include "xlog.h"
+ #include <rpc/svc_soc.h> /* svc_getcaller routine definition */
+-static struct pmaplist *find_service_pmap __P((rpcprog_t, rpcvers_t,
+- rpcprot_t));
+-static bool_t pmapproc_change __P((struct svc_req *, SVCXPRT *, u_long));
+-static bool_t pmapproc_getport __P((struct svc_req *, SVCXPRT *));
+-static bool_t pmapproc_dump __P((struct svc_req *, SVCXPRT *));
++static struct pmaplist *find_service_pmap(rpcprog_t, rpcvers_t,
++ rpcprot_t);
++static bool_t pmapproc_change(struct svc_req *, SVCXPRT *, u_long);
++static bool_t pmapproc_getport(struct svc_req *, SVCXPRT *);
++static bool_t pmapproc_dump(struct svc_req *, SVCXPRT *);
+
+ /*
+ * Called for all the version 2 inquiries.
+diff --git a/src/rpcb_svc.c b/src/rpcb_svc.c
+index bd92201..709e3fb 100644
+--- a/src/rpcb_svc.c
++++ b/src/rpcb_svc.c
+@@ -53,10 +53,10 @@
+ #include "rpcbind.h"
+ #include "xlog.h"
+
+-static void *rpcbproc_getaddr_3_local __P((void *, struct svc_req *, SVCXPRT *,
+- rpcvers_t));
+-static void *rpcbproc_dump_3_local __P((void *, struct svc_req *, SVCXPRT *,
+- rpcvers_t));
++static void *rpcbproc_getaddr_3_local(void *, struct svc_req *, SVCXPRT *,
++ rpcvers_t);
++static void *rpcbproc_dump_3_local(void *, struct svc_req *, SVCXPRT *,
++ rpcvers_t);
+
+ /*
+ * Called by svc_getreqset. There is a separate server handle for
+@@ -75,7 +75,7 @@ rpcb_service_3(struct svc_req *rqstp, SVCXPRT *transp)
+ } argument;
+ char *result;
+ xdrproc_t xdr_argument, xdr_result;
+- void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
++ void *(*local)(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+ rpcprog_t setprog = 0;
+
+ rpcbs_procinfo(RPCBVERS_3_STAT, rqstp->rq_proc);
+diff --git a/src/rpcb_svc_4.c b/src/rpcb_svc_4.c
+index b673452..5094879 100644
+--- a/src/rpcb_svc_4.c
++++ b/src/rpcb_svc_4.c
+@@ -54,13 +54,11 @@
+ #include "rpcbind.h"
+ #include "xlog.h"
+
+-static void *rpcbproc_getaddr_4_local __P((void *, struct svc_req *, SVCXPRT *,
+- rpcvers_t));
+-static void *rpcbproc_getversaddr_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
+-static void *rpcbproc_getaddrlist_4_local
+- __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
+-static void free_rpcb_entry_list __P((rpcb_entry_list_ptr *));
+-static void *rpcbproc_dump_4_local __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
++static void *rpcbproc_getaddr_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
++static void *rpcbproc_getversaddr_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
++static void *rpcbproc_getaddrlist_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
++static void free_rpcb_entry_list(rpcb_entry_list_ptr *);
++static void *rpcbproc_dump_4_local(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+
+ /*
+ * Called by svc_getreqset. There is a separate server handle for
+@@ -78,7 +76,7 @@ rpcb_service_4(struct svc_req *rqstp, SVCXPRT *transp)
+ } argument;
+ char *result;
+ xdrproc_t xdr_argument, xdr_result;
+- void *(*local) __P((void *, struct svc_req *, SVCXPRT *, rpcvers_t));
++ void *(*local)(void *, struct svc_req *, SVCXPRT *, rpcvers_t);
+ rpcprog_t setprog = 0;
+
+ rpcbs_procinfo(RPCBVERS_4_STAT, rqstp->rq_proc);
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 148fe42..5862c26 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -100,29 +100,29 @@ struct finfo {
+ static struct finfo FINFO[NFORWARD];
+
+
+-static bool_t xdr_encap_parms __P((XDR *, struct encap_parms *));
+-static bool_t xdr_rmtcall_args __P((XDR *, struct r_rmtcall_args *));
+-static bool_t xdr_rmtcall_result __P((XDR *, struct r_rmtcall_args *));
+-static bool_t xdr_opaque_parms __P((XDR *, struct r_rmtcall_args *));
+-static int find_rmtcallfd_by_netid __P((char *));
+-static SVCXPRT *find_rmtcallxprt_by_fd __P((int));
+-static int forward_register __P((u_int32_t, struct netbuf *, int, char *,
+- rpcproc_t, rpcvers_t, u_int32_t *));
+-static struct finfo *forward_find __P((u_int32_t));
+-static int free_slot_by_xid __P((u_int32_t));
+-static int free_slot_by_index __P((int));
+-static int netbufcmp __P((struct netbuf *, struct netbuf *));
+-static struct netbuf *netbufdup __P((struct netbuf *));
+-static void netbuffree __P((struct netbuf *));
+-static int check_rmtcalls __P((struct pollfd *, int));
+-static void xprt_set_caller __P((SVCXPRT *, struct finfo *));
+-static void send_svcsyserr __P((SVCXPRT *, struct finfo *));
+-static void handle_reply __P((int, SVCXPRT *));
+-static void find_versions __P((rpcprog_t, char *, rpcvers_t *, rpcvers_t *));
+-static rpcblist_ptr find_service __P((rpcprog_t, rpcvers_t, char *));
+-static char *getowner __P((SVCXPRT *, char *, size_t));
+-static int add_pmaplist __P((RPCB *));
+-static int del_pmaplist __P((RPCB *));
++static bool_t xdr_encap_parms(XDR *, struct encap_parms *);
++static bool_t xdr_rmtcall_args(XDR *, struct r_rmtcall_args *);
++static bool_t xdr_rmtcall_result(XDR *, struct r_rmtcall_args *);
++static bool_t xdr_opaque_parms(XDR *, struct r_rmtcall_args *);
++static int find_rmtcallfd_by_netid(char *);
++static SVCXPRT *find_rmtcallxprt_by_fd(int);
++static int forward_register(u_int32_t, struct netbuf *, int, char *,
++ rpcproc_t, rpcvers_t, u_int32_t *);
++static struct finfo *forward_find(u_int32_t);
++static int free_slot_by_xid(u_int32_t);
++static int free_slot_by_index(int);
++static int netbufcmp(struct netbuf *, struct netbuf *);
++static struct netbuf *netbufdup(struct netbuf *);
++static void netbuffree(struct netbuf *);
++static int check_rmtcalls(struct pollfd *, int);
++static void xprt_set_caller(SVCXPRT *, struct finfo *);
++static void send_svcsyserr(SVCXPRT *, struct finfo *);
++static void handle_reply(int, SVCXPRT *);
++static void find_versions(rpcprog_t, char *, rpcvers_t *, rpcvers_t *);
++static rpcblist_ptr find_service(rpcprog_t, rpcvers_t, char *);
++static char *getowner(SVCXPRT *, char *, size_t);
++static int add_pmaplist(RPCB *);
++static int del_pmaplist(RPCB *);
+
+ /*
+ * Set a mapping of program, version, netid
+diff --git a/src/rpcbind.c b/src/rpcbind.c
+index c4265cd..87ccdc2 100644
+--- a/src/rpcbind.c
++++ b/src/rpcbind.c
+@@ -136,13 +136,13 @@ char *tcp_uaddr; /* Universal TCP address */
+ static char servname[] = "rpcbind";
+ static char superuser[] = "superuser";
+
+-int main __P((int, char *[]));
++int main(int, char *[]);
+
+-static int init_transport __P((struct netconfig *));
+-static void rbllist_add __P((rpcprog_t, rpcvers_t, struct netconfig *,
+- struct netbuf *));
+-static void terminate __P((int));
+-static void parseargs __P((int, char *[]));
++static int init_transport(struct netconfig *);
++static void rbllist_add(rpcprog_t, rpcvers_t, struct netconfig *,
++ struct netbuf *);
++static void terminate(int);
++static void parseargs(int, char *[]);
+
+ int
+ main(int argc, char *argv[])
+diff --git a/src/util.c b/src/util.c
+index a6c835b..74b0284 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -70,7 +70,7 @@ static struct sockaddr_in *local_in4;
+ static struct sockaddr_in6 *local_in6;
+ #endif
+
+-static int bitmaskcmp __P((void *, void *, void *, int));
++static int bitmaskcmp(void *, void *, void *, int);
+
+ /*
+ * For all bits set in "mask", compare the corresponding bits in
+diff --git a/src/warmstart.c b/src/warmstart.c
+index b6eb73e..122a058 100644
+--- a/src/warmstart.c
++++ b/src/warmstart.c
+@@ -58,8 +58,8 @@
+ #define PMAPFILE RPCBIND_STATEDIR "/portmap.xdr"
+ #endif
+
+-static bool_t write_struct __P((char *, xdrproc_t, void *));
+-static bool_t read_struct __P((char *, xdrproc_t, void *));
++static bool_t write_struct(char *, xdrproc_t, void *);
++static bool_t read_struct(char *, xdrproc_t, void *);
+
+ static bool_t
+ write_struct(char *filename, xdrproc_t structproc, void *list)
+--
+1.8.3.1
+
diff --git a/net-nds/rpcbind/files/rpcbind-0.2.4-CVE-2017-8779.patch b/net-nds/rpcbind/files/rpcbind-0.2.4-CVE-2017-8779.patch
new file mode 100644
index 000000000000..cef088badc91
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind-0.2.4-CVE-2017-8779.patch
@@ -0,0 +1,21 @@
+diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
+index 5862c26..e11f61b 100644
+--- a/src/rpcb_svc_com.c
++++ b/src/rpcb_svc_com.c
+@@ -48,6 +48,7 @@
+ #include <rpc/rpc.h>
+ #include <rpc/rpcb_prot.h>
+ #include <rpc/svc_dg.h>
++#include <rpc/rpc_com.h>
+ #include <netconfig.h>
+ #include <errno.h>
+ #include <syslog.h>
+@@ -432,7 +433,7 @@ rpcbproc_taddr2uaddr_com(void *arg, struct svc_req *rqstp /*__unused*/,
+ static bool_t
+ xdr_encap_parms(XDR *xdrs, struct encap_parms *epp)
+ {
+- return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), ~0));
++ return (xdr_bytes(xdrs, &(epp->args), (u_int *) &(epp->arglen), RPC_MAXDATASIZE));
+ }
+
+ /*
diff --git a/net-nds/rpcbind/files/rpcbind.confd b/net-nds/rpcbind/files/rpcbind.confd
new file mode 100644
index 000000000000..ddc09172d10d
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind.confd
@@ -0,0 +1,4 @@
+# /etc/conf.d/rpcbind
+
+# Options for `rpcbind`.
+#RPCBIND_OPTS="-l"
diff --git a/net-nds/rpcbind/files/rpcbind.initd b/net-nds/rpcbind/files/rpcbind.initd
new file mode 100644
index 000000000000..18329778c38c
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind.initd
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use net
+ before inetd xinetd
+ provide portmap
+}
+
+start() {
+ ebegin "Starting rpcbind"
+ start-stop-daemon --start --quiet --exec /sbin/rpcbind -- ${RPCBIND_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rpcbind"
+ start-stop-daemon --stop --quiet --exec /sbin/rpcbind
+ eend $?
+}
diff --git a/net-nds/rpcbind/files/rpcbind.service b/net-nds/rpcbind/files/rpcbind.service
new file mode 100644
index 000000000000..305ea9b10b71
--- /dev/null
+++ b/net-nds/rpcbind/files/rpcbind.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=RPC Bind
+After=network.target
+Wants=rpcbind.target
+Before=rpcbind.target
+
+[Service]
+Type=forking
+ExecStart=/sbin/rpcbind
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-nds/rpcbind/metadata.xml b/net-nds/rpcbind/metadata.xml
new file mode 100644
index 000000000000..664c6a547a01
--- /dev/null
+++ b/net-nds/rpcbind/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ </maintainer>
+ <use>
+ <flag name="warmstarts">Enables rpcbind to cache configuration for warm restarts</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">rpcbind</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/rpcbind/rpcbind-0.2.3-r1.ebuild b/net-nds/rpcbind/rpcbind-0.2.3-r1.ebuild
new file mode 100644
index 000000000000..cdbbee00c44a
--- /dev/null
+++ b/net-nds/rpcbind/rpcbind-0.2.3-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils systemd
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://linux-nfs.org/~steved/rpcbind.git"
+ inherit autotools git-r3
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86"
+fi
+
+DESCRIPTION="portmap replacement which supports RPC over various protocols"
+HOMEPAGE="https://sourceforge.net/projects/rpcbind/"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug selinux systemd tcpd warmstarts"
+
+CDEPEND=">=net-libs/libtirpc-0.2.3:=
+ systemd? ( sys-apps/systemd:= )
+ tcpd? ( sys-apps/tcp-wrappers )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpcbind )"
+
+src_prepare() {
+ [[ ${PV} == "9999" ]] && eautoreconf
+ epatch "${FILESDIR}"/${P}-libtirpc.patch
+ epatch "${FILESDIR}"/${P}-mem-corrupt.patch #560990
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ --bindir="${EPREFIX}"/sbin \
+ --with-statedir="${EPREFIX}"/run/${PN} \
+ --with-rpcuser=root \
+ --with-systemdsystemunitdir=$(usex systemd "$(systemd_get_unitdir)" "no") \
+ $(use_enable tcpd libwrap) \
+ $(use_enable debug) \
+ $(use_enable warmstarts)
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
diff --git a/net-nds/rpcbind/rpcbind-0.2.3-r2.ebuild b/net-nds/rpcbind/rpcbind-0.2.3-r2.ebuild
new file mode 100644
index 000000000000..1d4183d7905b
--- /dev/null
+++ b/net-nds/rpcbind/rpcbind-0.2.3-r2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils systemd
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://linux-nfs.org/~steved/rpcbind.git"
+ inherit autotools git-r3
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="portmap replacement which supports RPC over various protocols"
+HOMEPAGE="https://sourceforge.net/projects/rpcbind/"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug selinux systemd tcpd warmstarts"
+
+CDEPEND=">=net-libs/libtirpc-0.2.3:=
+ systemd? ( sys-apps/systemd:= )
+ tcpd? ( sys-apps/tcp-wrappers )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpcbind )"
+
+src_prepare() {
+ [[ ${PV} == "9999" ]] && eautoreconf
+ epatch "${FILESDIR}"/${P}-libtirpc.patch
+ epatch "${FILESDIR}"/${P}-mem-corrupt.patch #560990
+ epatch "${FILESDIR}"/${P}-remove-P-macro.patch #589666
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ --bindir="${EPREFIX}"/sbin \
+ --with-statedir="${EPREFIX}"/run/${PN} \
+ --with-rpcuser=root \
+ --with-systemdsystemunitdir=$(usex systemd "$(systemd_get_unitdir)" "no") \
+ $(use_enable tcpd libwrap) \
+ $(use_enable debug) \
+ $(use_enable warmstarts)
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
diff --git a/net-nds/rpcbind/rpcbind-0.2.4-r1.ebuild b/net-nds/rpcbind/rpcbind-0.2.4-r1.ebuild
new file mode 100644
index 000000000000..9afcf79d3283
--- /dev/null
+++ b/net-nds/rpcbind/rpcbind-0.2.4-r1.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils systemd
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://linux-nfs.org/~steved/rpcbind.git"
+ inherit autotools git-r3
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+fi
+
+DESCRIPTION="portmap replacement which supports RPC over various protocols"
+HOMEPAGE="https://sourceforge.net/projects/rpcbind/"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug selinux systemd tcpd warmstarts"
+
+CDEPEND=">=net-libs/libtirpc-1.0:=
+ systemd? ( sys-apps/systemd:= )
+ tcpd? ( sys-apps/tcp-wrappers )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpcbind )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-CVE-2017-8779.patch"
+)
+
+src_prepare() {
+ [[ ${PV} == "9999" ]] && eautoreconf
+ epatch "${PATCHES[@]}"
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ --bindir="${EPREFIX}"/sbin \
+ --with-statedir="${EPREFIX}"/run/${PN} \
+ --with-rpcuser=root \
+ --with-systemdsystemunitdir=$(usex systemd "$(systemd_get_unitdir)" "no") \
+ $(use_enable tcpd libwrap) \
+ $(use_enable debug) \
+ $(use_enable warmstarts)
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
diff --git a/net-nds/rpcbind/rpcbind-0.2.4.ebuild b/net-nds/rpcbind/rpcbind-0.2.4.ebuild
new file mode 100644
index 000000000000..79f8f8fe713d
--- /dev/null
+++ b/net-nds/rpcbind/rpcbind-0.2.4.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils systemd
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://linux-nfs.org/~steved/rpcbind.git"
+ inherit autotools git-r3
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+ KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86"
+fi
+
+DESCRIPTION="portmap replacement which supports RPC over various protocols"
+HOMEPAGE="https://sourceforge.net/projects/rpcbind/"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug selinux systemd tcpd warmstarts"
+
+CDEPEND=">=net-libs/libtirpc-1.0:=
+ systemd? ( sys-apps/systemd:= )
+ tcpd? ( sys-apps/tcp-wrappers )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpcbind )"
+
+src_prepare() {
+ [[ ${PV} == "9999" ]] && eautoreconf
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ --bindir="${EPREFIX}"/sbin \
+ --with-statedir="${EPREFIX}"/run/${PN} \
+ --with-rpcuser=root \
+ --with-systemdsystemunitdir=$(usex systemd "$(systemd_get_unitdir)" "no") \
+ $(use_enable tcpd libwrap) \
+ $(use_enable debug) \
+ $(use_enable warmstarts)
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
diff --git a/net-nds/rpcbind/rpcbind-9999.ebuild b/net-nds/rpcbind/rpcbind-9999.ebuild
new file mode 100644
index 000000000000..8ed5edc7bbf4
--- /dev/null
+++ b/net-nds/rpcbind/rpcbind-9999.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+inherit eutils systemd
+
+if [[ ${PV} == "9999" ]] ; then
+ EGIT_REPO_URI="git://linux-nfs.org/~steved/rpcbind.git"
+ inherit autotools git-r3
+else
+ SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+DESCRIPTION="portmap replacement which supports RPC over various protocols"
+HOMEPAGE="https://sourceforge.net/projects/rpcbind/"
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="debug selinux systemd tcpd warmstarts"
+
+CDEPEND=">=net-libs/libtirpc-0.2.3:=
+ systemd? ( sys-apps/systemd:= )
+ tcpd? ( sys-apps/tcp-wrappers )"
+DEPEND="${CDEPEND}
+ virtual/pkgconfig"
+RDEPEND="${CDEPEND}
+ selinux? ( sec-policy/selinux-rpcbind )"
+
+src_prepare() {
+ [[ ${PV} == "9999" ]] && eautoreconf
+ epatch_user
+}
+
+src_configure() {
+ econf \
+ --bindir="${EPREFIX}"/sbin \
+ --with-statedir="${EPREFIX}"/run/${PN} \
+ --with-rpcuser=root \
+ --with-systemdsystemunitdir=$(usex systemd "$(systemd_get_unitdir)" "no") \
+ $(use_enable tcpd libwrap) \
+ $(use_enable debug) \
+ $(use_enable warmstarts)
+}
+
+src_install() {
+ default
+
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+
+ systemd_dounit "${FILESDIR}"/${PN}.service
+}
diff --git a/net-nds/shelldap/Manifest b/net-nds/shelldap/Manifest
new file mode 100644
index 000000000000..0392c637a621
--- /dev/null
+++ b/net-nds/shelldap/Manifest
@@ -0,0 +1,7 @@
+DIST shelldap-1.3.2.tar.gz 18624 SHA256 b4f84cfa164e69c7bdcbbd39416900190df8acf701539fbf0f2576514961c683 SHA512 618cfbbc4e7344571d5ba1a652757aef1526fedd882444ed5df8982414df0dc11cb967443dc0e2b1f1c182bbaa1f7bfebf41906bbc53e9106cdfe7676b558703 WHIRLPOOL 5cf5f07ed8f2a36d19ccb263dcb19c054fe1b64a585166c26856421821336d0edb3f432d3777175ed969486e45536b0ca5231a326400c6319c3162481dcb9ca0
+DIST shelldap-1.4.0.tar.gz 22552 SHA256 91889c277e9c7dd470abf017ac73c02ab2a95aac355de4dd7c77f0c7fadef31d SHA512 55d987aa0fd14f55cbcd3d94345fd649bf5e42c0bf9e0b3ea385b4d42be0baa9d4419f17f113edec84c6f5da00bc918ffd2e55e094b842fcd389993d2e306b26 WHIRLPOOL dbbbc1bce82864dec101989f869303376511f7d5941073e780de676e1296a180d72c83874698d59ca2104bba404931204d506140a62a2d55ba6cabd881fb3d2f
+EBUILD shelldap-1.3.2.ebuild 978 SHA256 4b66c303b7a9ddaa1afffe189172521ddaf2042e175d74877efbf64907df50dc SHA512 12064c9a4078c18df515f3f2bc70c8dce90943dc57decfa85149cd357d7c3f3eca372655ce278e0bb17b578dba0b098ebc0846fc84fc8f723ce66110b67b44c8 WHIRLPOOL ad8802a894bd96e8342a55b333c7faa02f24886ad571805fabdfc16a94fb9f8c2a828df0c0398b873dddf184390b1087bfe13a8971019705502258aba41fe52b
+EBUILD shelldap-1.4.0.ebuild 978 SHA256 3fa14404365b033293ea42a539e9d213fe45dd461d6756d052f399953235065e SHA512 e7ae0bb56e290d12d162aee4e6a969f69154d14ea2594fb6b8cd69d3882c32ee066a5f443f7fe321ce11929cf51a3efef3b6644cf37f99a5852102e1cddb625f WHIRLPOOL 416f4d8f73940428ebf185cf5c5f53f1fd3fc4f3c18549667eded6f4026dcfcfcb4b7b3b4ffb56342ceb54cd566e35c5d52a6ef1512b95a7c19a9b84836ed211
+MISC ChangeLog 3092 SHA256 bde74f74f8b132441a3f9ba615dfb9cd25ba9bd1f67f592564d45da0b72ba5e1 SHA512 c89560c42776cb5f006996add1ac922a89d4f31e93ca082826ebbaaf151fce7b982b18dcc751cc217155c5d139c2f612bcfb5aa19c7a2309c818e9ae69595192 WHIRLPOOL 3f3dc4acb7db63ac9a34c7f7479fe47c33c38cfc5289893e3684561b34ea03daaf1742bbe937fb677545f7022a812b184c9d4a33d9c631c340aa1dcf916abd93
+MISC ChangeLog-2015 1551 SHA256 9170d675c6830f817754e4fb576d948cacc83f34ecca8ea701987280646a5e3f SHA512 52d3742d336a94bb8b2452199fb1e601489a3a637d5c6b410ac8d210c6b733f575bf49fb47087d04fbac05cb72c2f77e7d219aa1e174689b6867a91c6558a4df WHIRLPOOL 04307f38721c5c5aca41f0059d8d2bf7ae1a8f3bbd70530f766a7b48b74acc29d96a5de8849ccd096bde778eff5dad4cccd291066264c8dd56ea20bd9343d845
+MISC metadata.xml 893 SHA256 1a327527f79db074a9bf9c164de8afbc5fbf9b1a293dbf0ab5337a74e00c2f50 SHA512 2904b6e0772b31eb70117a1bcac9896f450eafc9dde83c1563c76b1c6f88394b8c2c74afbaaad05d3b775c2451bd452de0668e788055cb15a3e8b7f78010bc3b WHIRLPOOL 41699d3db4434d8e568dd3271f4562433e421ca1e098abdfde0d658a493118d2499eea5b9d64af0e7d939d9e9679b6f920f8270f35ce392685478919ee154a93
diff --git a/net-nds/shelldap/metadata.xml b/net-nds/shelldap/metadata.xml
new file mode 100644
index 000000000000..26162a20614c
--- /dev/null
+++ b/net-nds/shelldap/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>azamat.hackimov@gmail.com</email>
+ <name>Azamat Hackimov</name>
+ </maintainer>
+ <maintainer type="person">
+ <email>pinkbyte@gentoo.org</email>
+ <name>Sergey Popov</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <longdescription lang="en">
+ A handy shell-like interface for browsing LDAP servers and editing their
+ content. It keeps command history, has sane autocompletes, credential caching,
+ site-wide and individual configs, and it's fun to say.
+ </longdescription>
+ <upstream>
+ <bugs-to>https://bitbucket.org/mahlon/shelldap/issues/</bugs-to>
+ <remote-id type="bitbucket">mahlon/shelldap</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/net-nds/shelldap/shelldap-1.3.2.ebuild b/net-nds/shelldap/shelldap-1.3.2.ebuild
new file mode 100644
index 000000000000..f9bdfd90169c
--- /dev/null
+++ b/net-nds/shelldap/shelldap-1.3.2.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+GENTOO_DEPEND_ON_PERL=noslotop
+inherit eutils perl-module
+
+DESCRIPTION="A handy shell-like interface for browsing LDAP servers and editing their content"
+HOMEPAGE="https://bitbucket.org/mahlon/shelldap/"
+SRC_URI="https://bitbucket.org/mahlon/shelldap/downloads/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="+readline sasl +ssl"
+
+DEPEND=""
+RDEPEND="dev-perl/Algorithm-Diff
+ sasl? ( dev-perl/Authen-SASL )
+ dev-perl/IO-Socket-SSL
+ dev-perl/perl-ldap
+ dev-perl/TermReadKey
+ readline? ( dev-perl/Term-ReadLine-Gnu )
+ dev-perl/Term-Shell
+ dev-perl/YAML-Syck
+ virtual/perl-Data-Dumper
+ virtual/perl-File-Temp
+ virtual/perl-Getopt-Long
+ virtual/perl-Digest-MD5"
+
+src_configure() { :; }
+
+src_compile() {
+ pod2man --name "${PN}" < "${PN}" > "${PN}.1" || die 'creating manpage failed'
+}
+
+src_install() {
+ doman "${PN}.1"
+ dobin "${PN}"
+ dodoc USAGE
+}
diff --git a/net-nds/shelldap/shelldap-1.4.0.ebuild b/net-nds/shelldap/shelldap-1.4.0.ebuild
new file mode 100644
index 000000000000..904d89c8feb3
--- /dev/null
+++ b/net-nds/shelldap/shelldap-1.4.0.ebuild
@@ -0,0 +1,43 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+GENTOO_DEPEND_ON_PERL=noslotop
+inherit eutils perl-module
+
+DESCRIPTION="A handy shell-like interface for browsing LDAP servers and editing their content"
+HOMEPAGE="https://bitbucket.org/mahlon/shelldap/"
+SRC_URI="https://bitbucket.org/mahlon/shelldap/downloads/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+IUSE="+readline sasl +ssl"
+
+DEPEND=""
+RDEPEND="dev-perl/Algorithm-Diff
+ sasl? ( dev-perl/Authen-SASL )
+ dev-perl/IO-Socket-SSL
+ dev-perl/perl-ldap
+ dev-perl/TermReadKey
+ readline? ( dev-perl/Term-ReadLine-Gnu )
+ dev-perl/Term-Shell
+ dev-perl/YAML-Syck
+ virtual/perl-Data-Dumper
+ virtual/perl-File-Temp
+ virtual/perl-Getopt-Long
+ virtual/perl-Digest-MD5"
+
+src_configure() { :; }
+
+src_compile() {
+ pod2man --name "${PN}" < "${PN}" > "${PN}.1" || die 'creating manpage failed'
+}
+
+src_install() {
+ doman "${PN}.1"
+ dobin "${PN}"
+ dodoc USAGE
+}
diff --git a/net-nds/smbldap-tools/Manifest b/net-nds/smbldap-tools/Manifest
new file mode 100644
index 000000000000..d3f44d541b7f
--- /dev/null
+++ b/net-nds/smbldap-tools/Manifest
@@ -0,0 +1,11 @@
+AUX smbldap-tools-0.9.10-smbldap-config-pod.patch 974 SHA256 e8a2cc3dbbed368b932aceaebe5046d10fe573e4b71d8268e1acb7ec262a813f SHA512 c4801c4b411c95c9c6495809b045c9c1bc641f8fc4b3797f34b44d9bec67428bb0ab86a07414c935f1b882fb27091e0a6286f1559dd9554a9451ada75f804eba WHIRLPOOL 133b050358669185ddc5a117b267f69174b7513a5fee665be1f49b1578d5a9ae0d2c49df98a617b378f71d893e930f0b2836b32646c0c2e4a0314242a5b5c639
+DIST smbldap-tools-0.9.10.tar.gz 336840 SHA256 c4efc62b86f4ef8f160852d779a711bf24f69069b3610f6d9a3718eda8de1aa6 SHA512 e1aef98d91ec722427b27f3aed25d8ef4cd4a6c845f98935e2f99075dea93275fc0335760d517398be8ca7898084bfee457ada0a718b66226e6ce3f38fdf2b2e WHIRLPOOL ef07eb53137a58a5483c6dcced769790b10b6d3fda8e45c263632ea4cea30825745f2040ad92fdaca823758f3f94debb1d7094e62d132594effaa3c5d7d7ba45
+DIST smbldap-tools-0.9.8.tar.gz 335484 SHA256 9860cc5f01ba96e66d6d51763ba7894a07d280a38e76247a812b153d2a9caa26 SHA512 e78531559591022331d4d8f62017a0ce3434e0d6e5ae1e1b5ea86d486cd6aeae29a7721ae88c36b034f5907aa0eea29583f365b9f7602da73172074301628d91 WHIRLPOOL 811003cb4001c40ca43937cfbc79f3d7c088b10786c598d0098fd550c4161be6dcec915b037aa7c6485350c39b71424dbd1bc30d272c43df6b53fef91a2444b8
+DIST smbldap-tools-0.9.9.tar.gz 336212 SHA256 0c8599a851017e19733cd674a2188bfca5f2a4285cfd8ed5b04d8c682e3196b7 SHA512 c51eb2c03dc45aaadb4c3467c07ecab080891223e6e0bd5fff5c1b8ea6ca3d2839163b2014764c280e37df30b029417ecea8d93b3b6a5459f6fa068eea5d71a9 WHIRLPOOL 6a8c26fb4440d58b9099ecd9b3378976bdcd7399fb9f1797a9e38e67835e7295840bb9678960da21abfc121ef8261dd55e121e4cba585b6edba77cdef53f04a8
+EBUILD smbldap-tools-0.9.10-r1.ebuild 1603 SHA256 fdc56ad7aeb52829bd045d5c380171785cd5b43030ed97b641b175da6955e3c9 SHA512 fef03bb53139eecb86b7769c3b1a225714690c4e38e71c5a5a1d83a31ef45cd74155a2895f1edb482fbc98abb0148ebc86ae35dc3b276f9bdfaa40a2c2f5427a WHIRLPOOL 6a781063a3f56f49958b85d004c23889a9ad3f89fb34bf9ae541cba8b25f3fd0447d7304ef559f026e1e5e49a2674acf27134a8f81d3f2f44a8d9db1055af304
+EBUILD smbldap-tools-0.9.10.ebuild 1532 SHA256 7dc73e610503759d11d98b0ec7d450c5b56134837c9d6031445ecceefb2858ae SHA512 e2b27bd61120571109b9ff80e593dbd8cf41c0e91d17e178b1a6ba7517c59d041b6386d72fbb7673022fb7aa90d02ea838a4920d5ea4530c6e313bdd2df68d36 WHIRLPOOL 41da1f5973125e5a3cc76444c251297d57ac4026fde6c96c08a2d7a7e167380a59d4e4a1500f1d4777ddd2cd681f25bfabccc6d41e80232bdd2f69aefc83f629
+EBUILD smbldap-tools-0.9.8.ebuild 1523 SHA256 a53b3f3f833f89287ca63f1c9ff70124dc436847005e13d11c0ac8a2cf37801e SHA512 3ed62d90dc584a1a28e58441f3bd0e1559a6b3ed79c65388d8c775a085d08530162f3bfeb770dff74f448343815f3e3f131bc305f3268f8a6a7cc6099fde1935 WHIRLPOOL b0cc9db14e07b7582cd6489467c126281108e351076fd20500091e2cdaa9a25322ed678b588db6e3d7232d1463457f3bd7ffbe27af3f12c292b02954a789a33e
+EBUILD smbldap-tools-0.9.9.ebuild 1532 SHA256 9dea3fb9ecbfe36fcf7632866ada0361f3cfd8c47bfe029c0d146a69893b8ca3 SHA512 cb6e86d25aa9f4164bdf5c310277175179bbbfd2cdf49ddf7973580938318b02f7bbd31f2858ed0f57713d96eb4e1c64b1f586e6fca66b3cfcd36520641d6184 WHIRLPOOL 3a23b51be875e03df0c98b0a7e04fbc409d22a07aa594845a76df93a4799200cdfd7d173b79aa713e1f4eabf01f85397cb61248b7fcfd21e54fd6c3bd5536dbe
+MISC ChangeLog 2704 SHA256 91a98a4d2ad557b442a27a242acb0ba01208050916c640f2106bcb4b613c0301 SHA512 26a9412d2dec550a489761fc8743f901e3b35f9a9b62b9fafbbbb45d7c5364789ddcf6817f5e7fd7640fd32123439011fdf6150d4348e44ace7145f6bf71a131 WHIRLPOOL 8b4465511fb0d53f34dd2b5c6e3e2640c08478f4a7ce02587c9b5154b73045796dadeab0203ad6c628f8b91b7f79212735d65b5fd5a7b765a9fc4ee4ee9c7fb5
+MISC ChangeLog-2015 6543 SHA256 aa4d043a799a6d64d6cb69c4774d650230869d6b861c00d9992de428cfb49ebb SHA512 f96091aa4152b2db961ddd08b1cd08fd7e24876b9e955c2e78bfbffaed1391a2e3d0a1e6e8346b6f12023de2c540e11369bf46df07e655e70b70e1ec95fe2477 WHIRLPOOL c81623a1081bf2ff1d2888b424f00cd7621d857f93c45666c8e8852fd74f8b321fc66ca2410dbbdbd861ce2f2f9cf0e20ce7b68956d7c1ece06b94f4a41b0e14
+MISC metadata.xml 361 SHA256 3c4720e3b32027abf383bf8b09dac6d68e062a44e41cc8d1b8147d6bc1be837e SHA512 beff7aa8913655c194a41800af37f70cb5d27114b5e8655cc342abf6ae6a2ab7252b192de766eeb6107ca56190f009fa8323c9fd69de5825d5c2728150fbeb5a WHIRLPOOL fc4db9c160aaab099a3c24a775a055dbc2fb9f69f4501835530535f12caaf94fc06b94f7236da5b7af47347c66b7c57369cce75c5f5bb8dacb241fcab95adf7c
diff --git a/net-nds/smbldap-tools/files/smbldap-tools-0.9.10-smbldap-config-pod.patch b/net-nds/smbldap-tools/files/smbldap-tools-0.9.10-smbldap-config-pod.patch
new file mode 100644
index 000000000000..127bc353f47d
--- /dev/null
+++ b/net-nds/smbldap-tools/files/smbldap-tools-0.9.10-smbldap-config-pod.patch
@@ -0,0 +1,37 @@
+From 4e3337697aa91f41ca970927233f96dbfa0b2d5d Mon Sep 17 00:00:00 2001
+From: Paul Howarth <paul@city-fan.org>
+Date: Mon, 3 Aug 2015 19:18:18 +0200
+Subject: [PATCH] Support podlators >=2.5.0
+
+http://gna.org/support/?3013
+---
+ smbldap-config.pl | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/smbldap-config.pl b/smbldap-config.pl
+index ecd9369..5660170 100644
+--- a/smbldap-config.pl
++++ b/smbldap-config.pl
+@@ -557,3 +557,19 @@ print " $smbldap_bind_conf done.\n";
+ $mode=0600;
+ chmod $mode,"$smbldap_bind_conf","$smbldap_bind_conf.old";
+
++__END__
++
++=head1 NAME
++
++smbldap-config - Configure the smbldap-tools
++
++=head1 SYNOPSIS
++
++smbldap-config
++
++=head1 DESCRIPTION
++
++An interactive script to configure the smbldap-tools to work with your
++existing LDAP server(s). Before running it, you should ensure that your
++samba controller is up and running, and that the domain SID is defined
++(you can check it by running 'net getlocalsid').
+--
+2.4.6
+
diff --git a/net-nds/smbldap-tools/metadata.xml b/net-nds/smbldap-tools/metadata.xml
new file mode 100644
index 000000000000..0ed4e3703bdb
--- /dev/null
+++ b/net-nds/smbldap-tools/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>samba@gentoo.org</email>
+ <name>Samba</name>
+</maintainer>
+<longdescription>
+smbldap-tools is a Idealx contribution to samba database management through ldap
+backend.
+</longdescription>
+</pkgmetadata>
diff --git a/net-nds/smbldap-tools/smbldap-tools-0.9.10-r1.ebuild b/net-nds/smbldap-tools/smbldap-tools-0.9.10-r1.ebuild
new file mode 100644
index 000000000000..ef19e1e813cb
--- /dev/null
+++ b/net-nds/smbldap-tools/smbldap-tools-0.9.10-r1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Samba LDAP management tools"
+HOMEPAGE="https://gna.org/projects/smbldap-tools/"
+SRC_URI="http://download.gna.org/smbldap-tools/sources/${PV}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-perl/perl-ldap
+ dev-perl/Crypt-SmbHash
+ dev-perl/Digest-SHA1
+ dev-perl/Unicode-MapUTF8
+ dev-perl/IO-Socket-SSL
+ net-nds/openldap
+ net-fs/samba
+"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-smbldap-config-pod.patch
+}
+
+src_install() {
+ default
+
+ newsbin smbldap-config.cmd smbldap-config
+ dosym smbldap-passwd /usr/sbin/smbldap-passwd.cmd
+
+ dodoc CONTRIBUTORS ChangeLog FILES INFRA INSTALL README TODO doc/*conf* doc/smbldap-tools*
+ dodoc -r doc/migration_scripts
+
+ sed -i 's/.CMD//g' smbldap-[gpu]*.8 || die
+ doman smbldap-[gpu]*.8
+
+ insinto /etc/smbldap-tools
+ doins smbldap.conf smbldap_bind.conf
+
+ elog "Remember to read INSTALL when updating."
+}
+
+pkg_postinst() {
+ elog "- A good howto is found on http://download.gna.org/smbldap-tools/docs/samba-ldap-howto/"
+ elog " and http://download.gna.org/smbldap-tools/docs/smbldap-tools/"
+ elog "- The configure script is installed as smbldap-configure.pl. Please run it to configure the tools."
+ elog "- Examples configuration files for Samba and slapd have been copied to ${EPREFIX}/usr/share/doc/${PF},"
+ elog " together with the migration-scripts."
+ elog "- Also remember to read INSTALL when updating."
+}
diff --git a/net-nds/smbldap-tools/smbldap-tools-0.9.10.ebuild b/net-nds/smbldap-tools/smbldap-tools-0.9.10.ebuild
new file mode 100644
index 000000000000..cf215dbf9909
--- /dev/null
+++ b/net-nds/smbldap-tools/smbldap-tools-0.9.10.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Samba LDAP management tools"
+HOMEPAGE="https://gna.org/projects/smbldap-tools/"
+SRC_URI="http://download.gna.org/smbldap-tools/sources/${PV}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-perl/perl-ldap
+ dev-perl/Crypt-SmbHash
+ dev-perl/Digest-SHA1
+ dev-perl/Unicode-MapUTF8
+ dev-perl/IO-Socket-SSL
+ net-nds/openldap
+ net-fs/samba
+"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ default
+
+ newsbin smbldap-config.cmd smbldap-config
+ dosym smbldap-passwd /usr/sbin/smbldap-passwd.cmd
+
+ dodoc CONTRIBUTORS ChangeLog FILES INFRA INSTALL README TODO doc/*conf* doc/smbldap-tools*
+ dodoc -r doc/migration_scripts
+
+ sed -i 's/.CMD//g' smbldap-[gpu]*.8 || die
+ doman smbldap-[gpu]*.8
+
+ insinto /etc/smbldap-tools
+ doins smbldap.conf smbldap_bind.conf
+
+ elog "Remember to read INSTALL when updating."
+}
+
+pkg_postinst() {
+ elog "- A good howto is found on http://download.gna.org/smbldap-tools/docs/samba-ldap-howto/"
+ elog " and http://download.gna.org/smbldap-tools/docs/smbldap-tools/"
+ elog "- The configure script is installed as smbldap-configure.pl. Please run it to configure the tools."
+ elog "- Examples configuration files for Samba and slapd have been copied to ${EPREFIX}/usr/share/doc/${PF},"
+ elog " together with the migration-scripts."
+ elog "- Also remember to read INSTALL when updating."
+}
diff --git a/net-nds/smbldap-tools/smbldap-tools-0.9.8.ebuild b/net-nds/smbldap-tools/smbldap-tools-0.9.8.ebuild
new file mode 100644
index 000000000000..087796e4ae37
--- /dev/null
+++ b/net-nds/smbldap-tools/smbldap-tools-0.9.8.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Samba LDAP management tools"
+HOMEPAGE="https://gna.org/projects/smbldap-tools/"
+SRC_URI="http://download.gna.org/smbldap-tools/sources/${PV}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~hppa ia64 ~mips ppc ppc64 s390 sparc x86"
+IUSE=""
+
+RDEPEND="
+ dev-perl/perl-ldap
+ dev-perl/Crypt-SmbHash
+ dev-perl/Digest-SHA1
+ dev-perl/Unicode-MapUTF8
+ dev-perl/IO-Socket-SSL
+ net-nds/openldap
+ net-fs/samba
+"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ default
+
+ newsbin smbldap-config.cmd smbldap-config
+ dosym smbldap-passwd /usr/sbin/smbldap-passwd.cmd
+
+ dodoc CONTRIBUTORS ChangeLog FILES INFRA INSTALL README TODO doc/*conf* doc/smbldap-tools*
+ dodoc -r doc/migration_scripts
+
+ sed -i 's/.CMD//g' smbldap-[gpu]*.8 || die
+ doman smbldap-[gpu]*.8
+
+ insinto /etc/smbldap-tools
+ doins smbldap.conf smbldap_bind.conf
+
+ elog "Remember to read INSTALL when updating."
+}
+
+pkg_postinst() {
+ elog "- A good howto is found on http://download.gna.org/smbldap-tools/docs/samba-ldap-howto/"
+ elog " and http://download.gna.org/smbldap-tools/docs/smbldap-tools/"
+ elog "- The configure script is installed as smbldap-configure.pl. Please run it to configure the tools."
+ elog "- Examples configuration files for Samba and slapd have been copied to ${EPREFIX}/usr/share/doc/${PF},"
+ elog " together with the migration-scripts."
+ elog "- Also remember to read INSTALL when updating."
+}
diff --git a/net-nds/smbldap-tools/smbldap-tools-0.9.9.ebuild b/net-nds/smbldap-tools/smbldap-tools-0.9.9.ebuild
new file mode 100644
index 000000000000..adfeccf10e4c
--- /dev/null
+++ b/net-nds/smbldap-tools/smbldap-tools-0.9.9.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit eutils
+
+DESCRIPTION="Samba LDAP management tools"
+HOMEPAGE="https://gna.org/projects/smbldap-tools/"
+SRC_URI="http://download.gna.org/smbldap-tools/sources/${PV}/${P}.tar.gz"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="
+ dev-perl/perl-ldap
+ dev-perl/Crypt-SmbHash
+ dev-perl/Digest-SHA1
+ dev-perl/Unicode-MapUTF8
+ dev-perl/IO-Socket-SSL
+ net-nds/openldap
+ net-fs/samba
+"
+DEPEND="${RDEPEND}"
+
+src_install() {
+ default
+
+ newsbin smbldap-config.cmd smbldap-config
+ dosym smbldap-passwd /usr/sbin/smbldap-passwd.cmd
+
+ dodoc CONTRIBUTORS ChangeLog FILES INFRA INSTALL README TODO doc/*conf* doc/smbldap-tools*
+ dodoc -r doc/migration_scripts
+
+ sed -i 's/.CMD//g' smbldap-[gpu]*.8 || die
+ doman smbldap-[gpu]*.8
+
+ insinto /etc/smbldap-tools
+ doins smbldap.conf smbldap_bind.conf
+
+ elog "Remember to read INSTALL when updating."
+}
+
+pkg_postinst() {
+ elog "- A good howto is found on http://download.gna.org/smbldap-tools/docs/samba-ldap-howto/"
+ elog " and http://download.gna.org/smbldap-tools/docs/smbldap-tools/"
+ elog "- The configure script is installed as smbldap-configure.pl. Please run it to configure the tools."
+ elog "- Examples configuration files for Samba and slapd have been copied to ${EPREFIX}/usr/share/doc/${PF},"
+ elog " together with the migration-scripts."
+ elog "- Also remember to read INSTALL when updating."
+}
diff --git a/net-nds/tac_plus/Manifest b/net-nds/tac_plus/Manifest
new file mode 100644
index 000000000000..5e45a43a2593
--- /dev/null
+++ b/net-nds/tac_plus/Manifest
@@ -0,0 +1,18 @@
+AUX tac_plus-4.0.4.19-deansification.patch 335 SHA256 dd061f99ce8a18190469854432f2d2b693815a457ddb1d621113a4ee43277c0f SHA512 5b759671c14f42e7d2fbbd7806dc83c7c24edd7ed3b2af6e208a922604c99abd3304e567bcf359bae1192160b3a7738a1f34f01569ed89062fba288593bb61d7 WHIRLPOOL 19ee76e28bbf779025b0ad3acaf1923b8839ef83f6cc2248b966c4716203474411052a9db8edcdb0471680f1be417589b4c065542b7f7c5acb12d6a076e1d5df
+AUX tac_plus-4.0.4.19-parallelmake.patch 442 SHA256 2c7facd41211de06182072af0395fc73b282bb0cfe4281f75a315b1ab4aea55a SHA512 94f16af40ddfaef5e22f8bee848e4b9f2a3c0658cbe14dd31d33476d181fe8801ec23b4b4b3fa8cbd3e9f07355e696f401bbbe54c1617cdbd732828ea305a9d5 WHIRLPOOL 4aaf6ef00ce3f0a26e86ba6c25d2d67fd46a55a5fc42890c1f7561eaae32ee52cd635226a29274438efdeadd7abbf59b0b693bd82d2ee4d5a439fbd56b33f530
+AUX tac_plus-4.0.4.27a-deansification.patch 339 SHA256 4f1379bd01347af2ec849f1e277414dfb6df1f50f4786daf2638a45356008ff7 SHA512 fe8b1cb1f949de8b79ab45cea8ee42acfe848f2a74cf516d54a183c2ffdfa618debc375741d28688f799a3862649af1c9c6c06688a4d53b9a227ca8b46c44f3c WHIRLPOOL e4a5f6bb45a812dd49b4964030d1fbda147adc54066ac353add028028b0ff93566427a8c2302efabf9c12a27bb8bacd7bcc00ce3470481f958810c3ef7cb016b
+AUX tac_plus-4.0.4.27a-parallelmake.patch 497 SHA256 171dc679fbe1e463b40501fe5a44c5aa574a2f14ef39e5a60917ef4b69bcf514 SHA512 cff259983b43e2f7a3e371749533a00844bc33c4d2a4d3d076f52dd800455b559c2632d41823dba0269405efabad88074b2972cc7c4167aa5914cd06349cd4b7 WHIRLPOOL 91fb138b75c368185ab7c8db3421fcde4706bce4a95b8ea12cde7371d4c5c9c135032956ba3ed42ff3dba1a53d1f51a7429d45e557c7d2c5d2aa150869b693ce
+AUX tac_plus.conf 266 SHA256 0065b44213bca75a9ff153aefa5d58b473906b56622ac8b55a12093d64c5d63e SHA512 22562fb073920a70bae215a763af0a6cb9e92b34880f23dbb97c6476a8b0253c86e54cb0ac4f30ee8e975053a3ad620e423ed1b72ddb32fdc09c854d132ac4dd WHIRLPOOL 599f02e3cc1d177606e35f575911c62015b847e7ca1a402d82ac24c86c7cbb1dbfcf383200b6dd5cacccad81699ddd64259b686ccf2dd175b54c7d33acc299c6
+AUX tac_plus.conf2 760 SHA256 313903876692d5f79372b9ef4b98b94dbc98ff45f02264728548d177b48fb60a SHA512 3a1fcc76f912761919fb8005b57754b608cb9af8231f8ccb140f9729ce5cc13e2fbf322ccde3cd0113f6dd6725f9bc514a31fd762b372f1afecdf86a3585fdec WHIRLPOOL 3f086a0ee8ed8ad5304e69af8792da3284a50330a1d956da2700bb2afb83bc8e06c0716b2a7860501e6871e75499964abb6521301c513d232a7234cce8b6eee7
+AUX tac_plus.confd 172 SHA256 7162ddf7dc119f8601d486ef645cc49d07481085cf7ca0d6c55499bdb5585961 SHA512 3d817c617795897d1b8d4826d9b7540240e6b270ac5c6507a344ea0e2b969b045405fff9b2049ec2da021daef75fd8aeccb27034c56e8e0a9cbff890e9e7afb0 WHIRLPOOL 1c9a8e00518ef45b43ede0efe956cee57b703fe162953ca9c8b3d57a76445e50ca3be406f292077c04b3697e24345d242e11757ce6bdc0ed022ac74735841d60
+AUX tac_plus.confd2 165 SHA256 247c7862b78d02014bfc2e5d4627fbfed2cd200e75be19f6fcafada792d443cf SHA512 b601f86e46995cc7297875c3cde09fc9335f573583e031adecb9282794b4c60959121254f23603bd53323312085f9eaf82cb8ea90f4e23ec293a63338c95e87d WHIRLPOOL ee96f60f4ccc52aaa438af84755e05d30b062780fdab6ba12f2f6e61aae90532d20bd9304aa032f625c2036d2725f58e2c6e05dbe895529e4b592750ff6df757
+AUX tac_plus.init 457 SHA256 0e5c97f303265c118cefe34b3a64c148f5a02f1582246a00b1943dc02042ccc0 SHA512 0f074e699549348d40687668056ccd468dc3a3b6fb76595789f41633cfac9023a4e9acdf53879a52bb94b51fed168dc79e03d305d64d692d60661fa94ede3756 WHIRLPOOL 0c18182aa71ff7c4ff409b1d05bec9478ed32327f9f128c443d37924ce3fb3a9ecb67b23030e02445a13722c10865b5a4ae14f710ae4e2050ab58040b3d8aa34
+AUX tac_plus.init2 430 SHA256 9312681a9211a90431cfc7903ed71dd203e2789a10a527d885319ba12ac67062 SHA512 9abb9573929c88dfe084432bb7ba7b85796b3bf05663a7596644805b04175d2b7fe36c6eb60fb70579445f03dd9fc8040fc88e5160c2de20ab25b8e8b9a93f55 WHIRLPOOL 76d75381e6fc0e6422957c7eee108ba9e96ea7e0108f560b11a05bc62f3db50ed1857faecb518c549d9e0fe3bd8d77adec93c4b86a5141d1886b4e713b19fd4d
+DIST tacacs+-F4.0.4.19.tar.gz 500593 SHA256 582dcdb5723c844e50036b1ed9eaee53239e7791d0ac5e5c22fba8ac4790596b SHA512 8482b81514ba91397f613a0593be8bd3ca66d6f4d79ed67a881aa01b3da44cdcfedae59bda6fae9e99a4c006fe54cd8a6ebfd6bc37e998f6b0ae19bd0831c0da WHIRLPOOL 6b46091377de5a8c0c0df44c6403f73a8274c4e852642b2882907abf3dd0d1e644b6ba8009520c2cef1941aabbc2b23d64f7ce493af7afe7f08ad524b0f5b507
+DIST tacacs+-F4.0.4.27a.tar.gz 504395 SHA256 512e1c30389b102d4af25d7e9bc3bdcd9d39d70e5e7d8a98c8f785733df8d9a1 SHA512 2251a21f609d516b3ebc7d3d2d7d030ea1bb491e0fe5e08e7639d2d9bdb0ef9a1ab4d17f340e50e83771dc9a512c5dacc99716fd882ba3f6db2fafb0915e86bd WHIRLPOOL 482baab1e27ca040d9d417d660542ff89d3dcaa18a65822fccba790475687aee3e541f9aa7a8aefd916cb4ab086485021ef89afba556ff10da52e6286ebfac07
+EBUILD tac_plus-4.0.4.19-r3.ebuild 1325 SHA256 9ece02301983f8d5cc2fd2d99ee6851611816b7598ce5c4d674965c139763c8f SHA512 e6cc2a37b108856c0bde4f996fc3e3cf1514e7f9745f2427000dba0e68c3ec74a3cb9ff59b2090f849d2e4d82f72e7a9df4f50ae78a3b47583ed201b1ea90fb8 WHIRLPOOL 1cae6df62a902999533238dc9dcd0573b217a07b8e94cfba7ed844439c9f85243b2d97831c7d6bb3767761856535985d03d97027530d2d858387360bc7f813f2
+EBUILD tac_plus-4.0.4.19-r4.ebuild 1365 SHA256 a505098495b902364c4a6026f5435a8a14614aa3741e53bf95399c721008d417 SHA512 dc8d481e1a2b3f1fa0c6392a9a7f600c2e25b9e3303f38e113d177526aac97736118af00d1323c625b0d9fa2dab76a32a92a6d2bcade1601b59100fa0c7a6f67 WHIRLPOOL 77df4bc27bedae43c5d36d47357a23f5feca68a4c518a9778850208b6040fe8faddda82261997d6dc12cf4ff9707b3371f29bfe34fcf94c5ebdb00d835a38dc4
+EBUILD tac_plus-4.0.4.27a.ebuild 1454 SHA256 f3d25f647bfce20cd4e2e21bb3821e53611097a8ec14f7a79dc09444529e609f SHA512 723d70b113072ad40bb46cf1b49698e4d48c24c3165232d33b3a57668d173ce1387d2ecb72bbd653c202287f2cd97f9c87f51c6fa439c7b8f82c5a01b67e3574 WHIRLPOOL b0fe14f2a63efaf387637aafc1f2da2a47729d93ec98c5e6098869650a1bd9de292f2ebd393f870e81b8ea2596736b057ad414ecfaf33c24f9c80bacfe66b92b
+MISC ChangeLog 3202 SHA256 c936ad4f965ada150c65e8229315b6e79229f1e9a9e0dd3368e0967599a47b15 SHA512 65cb00a3fcc0cf8c12802c3ad455fd5036487ef33f8a00dfe04d87fd381baf30384d9d747831cf679f5adbc34b0978d5f33043bbb22de64a916e521d7b76c50d WHIRLPOOL 62dbc3a2a74b0e3498883caaeacd848c799685dbdc18a0672427e0706d3c2521fe9a9a212bb688e1a59436221f010677cd1db5c209d6965926db2b963276b3f1
+MISC ChangeLog-2015 4479 SHA256 cd8e0057c44cbae0a001db254389903d610d6d491e5de18fc24a63d13276dbad SHA512 07af61c97b796a43fcc3e134b7db2c394d6d79a0346366ad921e48e1fa96e0d2554f0950dab9c81a53954333707dd9ceeb7227a38caf7b793c16f3a0012b3848 WHIRLPOOL 8953fc2c948036f2644f8afe50d0c697794ae2626e1d85b187396b93650ad0a7f8d5f28899853629695931164b681c2bc802fcdee0094e41b2497d28d5be46cf
+MISC metadata.xml 450 SHA256 09936787a3c8f21fe590a6afc4fca21d975387e6a373709d5fdb82841ac64864 SHA512 f27eae4aacd6cca136e633878a2584fd660daa44c665590fbec7636f8f8b125198125e592b83fb9f4727ea5f9776739968174d1788077dd9c9a9946c106ba7ae WHIRLPOOL 997c5916a945b644fb537d1c0a09259197e25fc7390fc12a17db2bbbc420bc3749c29ec23164874ec214f3a1ea3dba77f785ceb9aacec0e2b7f4f1179a33bb61
diff --git a/net-nds/tac_plus/files/tac_plus-4.0.4.19-deansification.patch b/net-nds/tac_plus/files/tac_plus-4.0.4.19-deansification.patch
new file mode 100644
index 000000000000..4dbc33707263
--- /dev/null
+++ b/net-nds/tac_plus/files/tac_plus-4.0.4.19-deansification.patch
@@ -0,0 +1,11 @@
+diff -uNr tacacs+-F4.0.4.19.ORIG/configure.in tacacs+-F4.0.4.19/configure.in
+--- tacacs+-F4.0.4.19.ORIG/configure.in 2013-02-28 21:26:31.724310410 +0000
++++ tacacs+-F4.0.4.19/configure.in 2013-02-28 21:26:41.936309960 +0000
+@@ -126,7 +126,6 @@
+
+ # compiler specifics
+ AC_PROG_CC
+-AM_C_PROTOTYPES
+ AC_PROG_CPP
+ AC_C_CONST
+ AC_C_INLINE
diff --git a/net-nds/tac_plus/files/tac_plus-4.0.4.19-parallelmake.patch b/net-nds/tac_plus/files/tac_plus-4.0.4.19-parallelmake.patch
new file mode 100644
index 000000000000..556f75806fbd
--- /dev/null
+++ b/net-nds/tac_plus/files/tac_plus-4.0.4.19-parallelmake.patch
@@ -0,0 +1,13 @@
+Index: tacacs+-F4.0.4.19/Makefile.am
+===================================================================
+--- tacacs+-F4.0.4.19.orig/Makefile.am
++++ tacacs+-F4.0.4.19/Makefile.am
+@@ -16,7 +16,7 @@ if TACSKEY
+ tac_plus_SOURCES += skey_fn.c
+ endif
+ tac_plus_LDFLAGS = -L$(top_srcdir)
+-tac_plus_LDADD = $(WRAPLIBS) -ltacacs
++tac_plus_LDADD = $(WRAPLIBS) libtacacs.la
+
+ lib_LTLIBRARIES = libtacacs.la
+ libtacacs_la_SOURCES = md4.c md5.c packet.c
diff --git a/net-nds/tac_plus/files/tac_plus-4.0.4.27a-deansification.patch b/net-nds/tac_plus/files/tac_plus-4.0.4.27a-deansification.patch
new file mode 100644
index 000000000000..ee1bcb231838
--- /dev/null
+++ b/net-nds/tac_plus/files/tac_plus-4.0.4.27a-deansification.patch
@@ -0,0 +1,11 @@
+diff -uNr tacacs+-F4.0.4.27a.ORIG/configure.in tacacs+-F4.0.4.27a/configure.in
+--- tacacs+-F4.0.4.27a.ORIG/configure.in 2015-03-25 11:13:06.976024203 +0000
++++ tacacs+-F4.0.4.27a/configure.in 2015-03-25 11:13:36.816025689 +0000
+@@ -126,7 +126,6 @@
+
+ # compiler specifics
+ AC_PROG_CC
+-AM_C_PROTOTYPES
+ AC_PROG_CPP
+ AC_C_CONST
+ AC_C_INLINE
diff --git a/net-nds/tac_plus/files/tac_plus-4.0.4.27a-parallelmake.patch b/net-nds/tac_plus/files/tac_plus-4.0.4.27a-parallelmake.patch
new file mode 100644
index 000000000000..c75a05b0cd12
--- /dev/null
+++ b/net-nds/tac_plus/files/tac_plus-4.0.4.27a-parallelmake.patch
@@ -0,0 +1,12 @@
+diff -uNr tacacs+-F4.0.4.27a.ORIG/Makefile.am tacacs+-F4.0.4.27a/Makefile.am
+--- tacacs+-F4.0.4.27a.ORIG/Makefile.am 2015-03-25 11:10:26.821016226 +0000
++++ tacacs+-F4.0.4.27a/Makefile.am 2015-03-25 11:11:04.954018126 +0000
+@@ -19,7 +19,7 @@
+ tac_plus_SOURCES += aceclnt_fn.c
+ endif
+ tac_plus_LDFLAGS = -L$(top_srcdir)
+-tac_plus_LDADD = $(WRAPLIBS) -ltacacs
++tac_plus_LDADD = $(WRAPLIBS) libtacacs.la
+
+ lib_LTLIBRARIES = libtacacs.la
+ libtacacs_la_SOURCES = fdes.c maxsess.c md4.c md5.c packet.c
diff --git a/net-nds/tac_plus/files/tac_plus.conf b/net-nds/tac_plus/files/tac_plus.conf
new file mode 100644
index 000000000000..83403e0bc1cc
--- /dev/null
+++ b/net-nds/tac_plus/files/tac_plus.conf
@@ -0,0 +1,12 @@
+# You must configure tac_plus before use. At a minimum, you need a server
+# key and a user block, such as below.
+#
+# Please see tac_plus.conf(5) for more information.
+
+#key = kEy4U
+
+#user = youruser {
+# login = des ndkKAzNoc37VA
+# enable = des ndkKAzNoc37VA
+#}
+
diff --git a/net-nds/tac_plus/files/tac_plus.conf2 b/net-nds/tac_plus/files/tac_plus.conf2
new file mode 100644
index 000000000000..617e34420281
--- /dev/null
+++ b/net-nds/tac_plus/files/tac_plus.conf2
@@ -0,0 +1,41 @@
+# You must configure tac_plus before use. At a minimum, you need a server
+# key and a user block, such as below.
+#
+# Please see tac_plus.conf(5) for more information.
+
+#key = kEy4U
+
+#user = youruser {
+# login = des ndkKAzNoc37VA
+# enable = des ndkKAzNoc37VA
+#}
+
+#user = youruser {
+# default service = permit
+# login = PAM
+# member = yourgroup
+#}
+
+# Cisco admins
+#group = ciscoadmins {
+# default service = permit
+# service = exec {
+# priv-lvl = 15
+# }
+#}
+
+
+# Cisco admins using an acl to allow specific devices
+#group = ciscoadmins {
+# default service = permit
+# acl = ciscodevices
+# service = exec {
+# priv-lvl = 15
+# }
+#}
+
+# Allows devices with specified IP address to talk to this TACACS+ server
+#acl = ciscodevices {
+# permit = 1.2.3.4$
+# deny = .*
+#}
diff --git a/net-nds/tac_plus/files/tac_plus.confd b/net-nds/tac_plus/files/tac_plus.confd
new file mode 100644
index 000000000000..76f2af066703
--- /dev/null
+++ b/net-nds/tac_plus/files/tac_plus.confd
@@ -0,0 +1,7 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/tac_plus
+
+TAC_PLUS_OPTS="-d 248"
+
diff --git a/net-nds/tac_plus/files/tac_plus.confd2 b/net-nds/tac_plus/files/tac_plus.confd2
new file mode 100644
index 000000000000..6e1dd5f9a01c
--- /dev/null
+++ b/net-nds/tac_plus/files/tac_plus.confd2
@@ -0,0 +1,6 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+# Config file for /etc/init.d/tac_plus
+
+TAC_PLUS_OPTS=""
diff --git a/net-nds/tac_plus/files/tac_plus.init b/net-nds/tac_plus/files/tac_plus.init
new file mode 100644
index 000000000000..23dcbe8f11ff
--- /dev/null
+++ b/net-nds/tac_plus/files/tac_plus.init
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+opts="start stop restart"
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting tac_plus"
+ start-stop-daemon --start --quiet --exec /usr/bin/tac_plus \
+ -- -C /etc/tac_plus/tac_plus.conf ${TAC_PLUS_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tac_plus"
+ start-stop-daemon --stop --quiet --pidfile /var/run/tac_plus.pid
+ eend $?
+}
diff --git a/net-nds/tac_plus/files/tac_plus.init2 b/net-nds/tac_plus/files/tac_plus.init2
new file mode 100644
index 000000000000..8787fa26b94c
--- /dev/null
+++ b/net-nds/tac_plus/files/tac_plus.init2
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting tac_plus"
+ start-stop-daemon --start --quiet --exec /usr/bin/tac_plus \
+ -- -C /etc/tac_plus/tac_plus.conf ${TAC_PLUS_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping tac_plus"
+ start-stop-daemon --stop --quiet --pidfile /var/run/tac_plus.pid
+ eend $?
+}
diff --git a/net-nds/tac_plus/metadata.xml b/net-nds/tac_plus/metadata.xml
new file mode 100644
index 000000000000..04eed53a210d
--- /dev/null
+++ b/net-nds/tac_plus/metadata.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>chainsaw@gentoo.org</email>
+ <name>Tony Vroon</name>
+ </maintainer>
+ <use>
+ <flag name="finger">Adds support for checking user counts via fingering
+ the NAS</flag>
+ <flag name="maxsess">Enforce a limit on maximum sessions per user</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-nds/tac_plus/tac_plus-4.0.4.19-r3.ebuild b/net-nds/tac_plus/tac_plus-4.0.4.19-r3.ebuild
new file mode 100644
index 000000000000..7fe26ccea4b6
--- /dev/null
+++ b/net-nds/tac_plus/tac_plus-4.0.4.19-r3.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=4
+
+inherit autotools base libtool
+
+MY_P="tacacs+-F${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="An updated version of Cisco's TACACS+ server"
+HOMEPAGE="http://www.shrubbery.net/tac_plus/"
+SRC_URI="ftp://ftp.shrubbery.net/pub/tac_plus/${MY_P}.tar.gz"
+
+LICENSE="HPND RSA GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug finger maxsess tcpd skey static-libs"
+
+DEPEND="skey? ( >=sys-auth/skey-1.1.5-r1 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ sys-libs/pam"
+RDEPEND="${DEPEND}"
+
+PATCHES=( "${FILESDIR}/${P}-parallelmake.patch" )
+
+src_prepare() {
+ base_src_prepare
+ AT_M4DIR="." eautoreconf
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ $(use_with skey) \
+ $(use_with tcpd libwrap) \
+ $(use_enable debug) \
+ $(use_enable finger) \
+ $(use_enable maxsess) \
+ $(use_enable static-libs static) \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+
+ use static-libs || find "${D}" -name '*.la' -delete || die "Unable to remove spurious libtool archive"
+ dodoc CHANGES FAQ
+
+ newinitd "${FILESDIR}/tac_plus.init2" tac_plus
+ newconfd "${FILESDIR}/tac_plus.confd2" tac_plus
+
+ insinto /etc/tac_plus
+ newins "${FILESDIR}/tac_plus.conf2" tac_plus.conf
+}
diff --git a/net-nds/tac_plus/tac_plus-4.0.4.19-r4.ebuild b/net-nds/tac_plus/tac_plus-4.0.4.19-r4.ebuild
new file mode 100644
index 000000000000..dfb57ee97661
--- /dev/null
+++ b/net-nds/tac_plus/tac_plus-4.0.4.19-r4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools base libtool
+
+MY_P="tacacs+-F${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="An updated version of Cisco's TACACS+ server"
+HOMEPAGE="http://www.shrubbery.net/tac_plus/"
+SRC_URI="ftp://ftp.shrubbery.net/pub/tac_plus/${MY_P}.tar.gz"
+
+LICENSE="HPND RSA GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug finger maxsess tcpd skey static-libs"
+
+DEPEND="skey? ( >=sys-auth/skey-1.1.5-r1 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ sys-libs/pam"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+"${FILESDIR}/${P}-parallelmake.patch"
+"${FILESDIR}/${P}-deansification.patch"
+)
+
+src_prepare() {
+ base_src_prepare
+ AT_M4DIR="." eautoreconf
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ $(use_with skey) \
+ $(use_with tcpd libwrap) \
+ $(use_enable debug) \
+ $(use_enable finger) \
+ $(use_enable maxsess) \
+ $(use_enable static-libs static) \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+
+ use static-libs || find "${D}" -name '*.la' -delete || die "Unable to remove spurious libtool archive"
+ dodoc CHANGES FAQ
+
+ newinitd "${FILESDIR}/tac_plus.init2" tac_plus
+ newconfd "${FILESDIR}/tac_plus.confd2" tac_plus
+
+ insinto /etc/tac_plus
+ newins "${FILESDIR}/tac_plus.conf2" tac_plus.conf
+}
diff --git a/net-nds/tac_plus/tac_plus-4.0.4.27a.ebuild b/net-nds/tac_plus/tac_plus-4.0.4.27a.ebuild
new file mode 100644
index 000000000000..fc1a2ef19e67
--- /dev/null
+++ b/net-nds/tac_plus/tac_plus-4.0.4.27a.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit autotools base libtool
+
+MY_P="tacacs+-F${PV}"
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="An updated version of Cisco's TACACS+ server"
+HOMEPAGE="http://www.shrubbery.net/tac_plus/"
+SRC_URI="ftp://ftp.shrubbery.net/pub/tac_plus/${MY_P}.tar.gz"
+
+LICENSE="HPND RSA GPL-2" # GPL-2 only for init script
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug finger maxsess tcpd skey static-libs"
+
+DEPEND="skey? ( >=sys-auth/skey-1.1.5-r1 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ sys-libs/pam"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-parallelmake.patch"
+ "${FILESDIR}/${P}-deansification.patch"
+)
+
+src_prepare() {
+ base_src_prepare
+ mv configure.in configure.ac || die "Unable to quiet autoconf deprecation warning"
+ AT_M4DIR="." eautoreconf
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ $(use_with skey) \
+ $(use_with tcpd libwrap) \
+ $(use_enable debug) \
+ $(use_enable finger) \
+ $(use_enable maxsess) \
+ $(use_enable static-libs static) \
+ || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "install failed"
+
+ use static-libs || find "${D}" -name '*.la' -delete || die "Unable to remove spurious libtool archive"
+ dodoc CHANGES FAQ
+
+ newinitd "${FILESDIR}/tac_plus.init2" tac_plus
+ newconfd "${FILESDIR}/tac_plus.confd2" tac_plus
+
+ insinto /etc/tac_plus
+ newins "${FILESDIR}/tac_plus.conf2" tac_plus.conf
+}
diff --git a/net-nds/yp-tools/Manifest b/net-nds/yp-tools/Manifest
new file mode 100644
index 000000000000..d5dfb8a2eb89
--- /dev/null
+++ b/net-nds/yp-tools/Manifest
@@ -0,0 +1,9 @@
+AUX domainname.service 165 SHA256 905079200c0ec5fb4585a46ba72c432d2246b0c14cf8792b762d8a95f0ef4e0d SHA512 dc6cc79a1e6636f31706901bec45adc479231c883e149748989c038d4a9e2d3b1e15e3ba45ca7276700c68600cf6489b92bc4ada0c8ba630921a6d8cb8368de6 WHIRLPOOL 74ead6f4f5468fe2843d74f16ac5a567a9e2214348e55d3d6d847f3ae8ccbd197c24127782040348c5245c8ac9626e4ebc4bc771919a28a238aa8927025b45fc
+AUX domainname.service.conf 89 SHA256 424a1fadf7387150a30df3eaa19e057f7162aa1d2564da9fd0273e1b7dc50b76 SHA512 529f85f41e8204cc3dda72eb3c94c81443b8aa9f5af1ce4cab4510cbc42da79a4554d223893f0a968afb4476898b8a74ea061f8e9f40518b3066584ea9c7ad6c WHIRLPOOL 5a3d246b48eaa01ef2379f29c3af6724a3c657af8f14cd5aa47aab728448edb70361f1d72f944140e396f6322228fa8249a6ce3c44a6c4e7dba1950d2bf637ed
+DIST yp-tools-2.12.tar.bz2 204228 SHA256 6ae8321666eea7837da343eea90ea30273fb74943ad111d5a4befd2afb252063 SHA512 0b62f63d65c7a53e715fb5749c4a7e71cf85e4006fa5e1ec39290e740301d5a8d321007461bb7a6b3bd1aaac283d8b028fa07814e77bd75e13dfd761f74c9218 WHIRLPOOL b4b89857024cc2aa42e6e9dabea25ea81da641d00fbeb3202cd53e81065384d9b1a685e8e0eed547622f4a0649d625cf3ea35217deef7c19536e120813d5b1c4
+DIST yp-tools-4.2.2.tar.bz2 368673 SHA256 137f19a986382b275bf4a2b1a69eb26689d6f4ac056ddaa21784d6b80eb98faa SHA512 e2856465e650823de87fcf0e7f18c4875b0540f271b3e564b3afe07d0df35dded7f09ecdf2494d099b31a15e098fc5e9065339f19df45c0489ca91a736c3eac9 WHIRLPOOL 9a63839f8d4070e9d7885c3bffab9bebf3557f5d09c9ab0bc0981850239bf3a191aaf7e174a7bc33432d35c8602fffe202c61d63458f1253934f01e3225bc028
+EBUILD yp-tools-2.12-r1.ebuild 920 SHA256 93e8e134ca78e8bdf90b5646d822adca94dd9c6f05a9876f6681fcda9e9ade0a SHA512 a1e9ee126629e868a99f8a8ebd9eda75cea4469266bbcacf5646c4aae32d58d6cbff646088b33dc94236eb59d62576a609a3bf66db1a6b0ec4f0ed8d72593213 WHIRLPOOL bfa59396e08fed4ae826113b2d10eb866a3c0825b41c8b4b9a9dc3a2b5a98943a66e7107e4ee8a0a04284b2161c30f70c37083777a41021c0f268515d3ee479d
+EBUILD yp-tools-4.2.2.ebuild 674 SHA256 0891cd17462a724a7e70fc1e43c0e62d5db9741de2204b5a65ec562f293ff7b8 SHA512 ea9d95fc5d2e325d50be8a94a094fbbf9f14b89c52a525b9f3e4da43d612a710923b9fdfce5785c914deabc7d391b929e314011ac17e3e6607e2ca3272bb8684 WHIRLPOOL c8d92fc190437554766abd97d44076e0c49c4709184e0e1365899ad5686e862137a0ab132669bb0168522a014424dcf69c95c5dbd94978a15ede572821cea4b9
+MISC ChangeLog 2589 SHA256 b867cb1cc610dfba847eebfc44429696e59063e2d77ce2135ab68bb6bb8e76a1 SHA512 5f58676a2c271d5b4dbea549df389b1f087389c02190dea214468f7c7af6282e7f06232fe0ecb04eaedbebd6893f007b926e8a6d40b4c761eeaf724e1db8b757 WHIRLPOOL 8d00678265c8a980076aab20813b786f599093a65f334bffd2d709d21adbcb128074b0e952975a48753ee4f3a9b284ab2c7f354981db890a4e480de18711eab0
+MISC ChangeLog-2015 7311 SHA256 13390ce66794dced14e3e088cd1ddd7f0bf9342aa605ad6a0a1aff066c47364a SHA512 e5771cb6ab0d451132d846e9f4a982ecb59def9bf38447a6bb2a0ae240beb869a44659a67cf904c65fa6f7c8d8d3e49b5209cd783ffa89d6c7abbd1a039dd83a WHIRLPOOL c9b15474d08ccb213693c944932868d57db4443e02e6b4222e34331e79a42f4c75c4608a1c00aeaf33a236a432d0185b6db5c7b781827937c537cea06e53e376
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-nds/yp-tools/files/domainname.service b/net-nds/yp-tools/files/domainname.service
new file mode 100644
index 000000000000..8f170adf794c
--- /dev/null
+++ b/net-nds/yp-tools/files/domainname.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=NIS Domainname
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/nisdomainname $NISDOMAINNAME
+RemainAfterExit=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-nds/yp-tools/files/domainname.service.conf b/net-nds/yp-tools/files/domainname.service.conf
new file mode 100644
index 000000000000..592de3b3d88a
--- /dev/null
+++ b/net-nds/yp-tools/files/domainname.service.conf
@@ -0,0 +1,3 @@
+# NIS domain to be set by domainname.service
+[Service]
+Environment="NISDOMAINNAME=local"
diff --git a/net-nds/yp-tools/metadata.xml b/net-nds/yp-tools/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-nds/yp-tools/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-nds/yp-tools/yp-tools-2.12-r1.ebuild b/net-nds/yp-tools/yp-tools-2.12-r1.ebuild
new file mode 100644
index 000000000000..802461d811e2
--- /dev/null
+++ b/net-nds/yp-tools/yp-tools-2.12-r1.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils systemd
+
+DESCRIPTION="Network Information Service tools"
+HOMEPAGE="http://www.linux-nis.org/nis/"
+SRC_URI="ftp://ftp.kernel.org/pub/linux/utils/net/NIS/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="nls"
+
+src_configure() {
+ local myconf="--sysconfdir=/etc/yp"
+ if ! use nls
+ then
+ myconf="${myconf} --disable-nls"
+ mkdir intl
+ touch intl/libintl.h
+ export CPPFLAGS="${CPPFLAGS} -I${S}"
+
+ for i in lib/nicknames.c src/*.c
+ do
+ cp ${i} ${i}.orig
+ sed 's:<libintl.h>:<intl/libintl.h>:' \
+ ${i}.orig > ${i}
+ done
+ fi
+ econf ${myconf}
+}
+
+src_install() {
+ default
+ insinto /etc/yp ; doins etc/nicknames
+ systemd_dounit "${FILESDIR}/domainname.service"
+ systemd_install_serviced "${FILESDIR}"/domainname.service.conf
+}
diff --git a/net-nds/yp-tools/yp-tools-4.2.2.ebuild b/net-nds/yp-tools/yp-tools-4.2.2.ebuild
new file mode 100644
index 000000000000..a566743bf7ce
--- /dev/null
+++ b/net-nds/yp-tools/yp-tools-4.2.2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit systemd
+
+DESCRIPTION="Network Information Service tools"
+HOMEPAGE="http://www.linux-nis.org/nis/"
+SRC_URI="http://www.linux-nis.org/download/yp-tools/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="nls"
+
+src_configure () {
+ econf \
+ --disable-static \
+ --sysconfdir=/etc/yp \
+ $(use_enable nls)
+}
+
+src_install() {
+ default
+
+ insinto /etc/yp
+ doins etc/nicknames
+
+ systemd_dounit "${FILESDIR}/domainname.service"
+ systemd_install_serviced "${FILESDIR}"/domainname.service.conf
+}
diff --git a/net-nds/ypbind/Manifest b/net-nds/ypbind/Manifest
new file mode 100644
index 000000000000..0f536c42e9c3
--- /dev/null
+++ b/net-nds/ypbind/Manifest
@@ -0,0 +1,8 @@
+AUX ypbind.confd-r1 112 SHA256 79f6c6ed4875f00fe702f69e9a6180a032d5a47f3e58e892e6ba0e2746b6fec8 SHA512 31fb25657d330960e11d0a8bb80c75d7b91bbb10ff57568cef265b6599cd62d9ea7bcb2dd67a1f2b10757c3b95b4b2045887661611c031854378daa036300df1 WHIRLPOOL dae9ebd8490a535fadcc06e777b520f3c317386ea0f63e33bab200d2d3b31fd6c664e8a4c2e331b5db26afde6b0ddb96dc47e66dcbdac24a47fe4d11537b5a5e
+AUX ypbind.initd 800 SHA256 fad2c4c9927edd6a3b7479dba733f67c5cfef399de133c1b4a69ac0526692dbd SHA512 8fd49154416311fc0d7cf6b164121148730547169817511d6bb527ae76b4a52df6c27091e758635b526808a5deb23124892917e08316a59c66e624f01d7b9419 WHIRLPOOL 9652efbd415651cdff265e98ea71fae6de473bbc02f58e562f848f92857b0fc7e0ea969805ba9f719ec445967e9f593855ed761d27839a3eddd8bcfb0e849132
+AUX ypbind.service 252 SHA256 91be3d88ca57f491e3f508eaef7c6e1d6d751edf6b1acd50dc8b586730ed1bc6 SHA512 7bcf9e3e63d6e00228dfad1a610a0b5941857874278d31e24eba8d9dd251be9b5a8ba5912f87b4ea51718340c87d87e199509e8216e00f5462e4392dbbbc3fbe WHIRLPOOL 0a3e981091905a2f48cef4179f850ee8cfc4b9f5061ce3d70307c2b97cedca81f6deaefee11a011e75d1046c4bceb82e3fd8d625508f5b222857b7a7b723a95c
+DIST ypbind-mt-1.37.2.tar.bz2 197280 SHA256 abe842b7943bcee4685a63fcd7e40954ac8b97fa94b4a470be9520a6ccde063d SHA512 b101a1144b6886ff02d4ac83705313e20dac998aa30239d8ae34a0413a8deb4e786bbe3b549368119408593ceb40a95170b345c119a23b8fdf2461746c70a7be WHIRLPOOL 74bae5da90187e8e99d514ce25309dfeecd4ea93768bc1810ba6fcaa07acc643991893779496cd8faedc022bc26e565770e24cf258061662c105b42b2c02be9b
+EBUILD ypbind-1.37.2-r1.ebuild 1427 SHA256 e7371f74bc54f5680f46bb4d87457d34d19e7c3f8659738de166d842db6608cb SHA512 c75c822741870e5d67ac5f2c81a398d2fee3e8b68349743bde5faa0c64afcb32aec400b2e4d920d07237b9d42fc3d8bd14a96ca27a5d8bf5623683d01386968b WHIRLPOOL 4795c1f05d9216fd1d47f9112a265140f850bec783efc61e6a76d1aab7d978b81c3a16f0eb302f8f9da2981286ca9f48790427bbc8cd0f5ae356d454c24cc944
+MISC ChangeLog 2994 SHA256 295f73456a8273d65afde4442363665e15467faa7cc8e5ed523320d29b861ab9 SHA512 7cde5072705ec568a5f11c154cf0f2e722f9a879e58368ed774cdaac169afe2abe88b04ebfac92080961030cde083c1b5da6799e32fe9eda9bef04c011e31b5f WHIRLPOOL 24b0433eedf02d440e79c09adf2ba237fadd28bb7f9ed8600f411ad209d553439b0bc19c49183a6d5b268320a1e11c1d0ba908268d6388761513d60353605fa7
+MISC ChangeLog-2015 12257 SHA256 10c706124ad8dc1c23ef49664a67cc45e7f2536bc2ccee744c30a7466fab1291 SHA512 816ec2297cb7b77c902b550b9cad0e28d6855279ec72a2b333775ebcf87e11d040ecfcb1cac162a7727e555d611d8b6abeeb25908f12166d923e2d9581396f7c WHIRLPOOL bed01c7ea47874d51c1f46336da4f72915de70e8154634f0ac26018a659a643e5f46f5fa5a6528f421505aeed02ddd2f4b7f99f5407f52edb7d0c99223b4f136
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-nds/ypbind/files/ypbind.confd-r1 b/net-nds/ypbind/files/ypbind.confd-r1
new file mode 100644
index 000000000000..91cdc60c1030
--- /dev/null
+++ b/net-nds/ypbind/files/ypbind.confd-r1
@@ -0,0 +1,4 @@
+# Config file for /etc/init.d/ypbind
+
+# Set any command line options you want to pass to ypbind.
+YPBIND_OPTS=""
diff --git a/net-nds/ypbind/files/ypbind.initd b/net-nds/ypbind/files/ypbind.initd
new file mode 100644
index 000000000000..27c907ad21b0
--- /dev/null
+++ b/net-nds/ypbind/files/ypbind.initd
@@ -0,0 +1,40 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net portmap
+ use ypserv domainname
+}
+
+start() {
+ ebegin "Starting ypbind"
+ if [ -n "${YPBIND_OPTS}" ]; then
+ YOPTS="-- ${YPBIND_OPTS}"
+ fi
+ start-stop-daemon --start --quiet --exec /usr/sbin/ypbind ${YOPTS}
+ local ret=$?
+ if [ $ret -eq 0 ] ; then
+ notfound=1
+ for i in 0 1 2 3 4 5 6 7 8 9
+ do
+ ypwhich >/dev/null 2>&1 && { notfound=0; break; }
+ sleep 1
+ done
+ if [ $notfound -eq 1 ] ; then
+ eend 1 "No NIS server found"
+ else
+ eend 0
+ fi
+ else
+ eend $ret
+ fi
+}
+
+stop() {
+ ebegin "Stopping ypbind"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/ypbind
+ eend $?
+ # Remove binding files, if ypbind "forgets" it
+ rm -f /var/yp/binding/*
+}
diff --git a/net-nds/ypbind/files/ypbind.service b/net-nds/ypbind/files/ypbind.service
new file mode 100644
index 000000000000..a04ed71fe0d0
--- /dev/null
+++ b/net-nds/ypbind/files/ypbind.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=YP Bind
+Requires=rpcbind.service domainname.service
+After=rpcbind.service domainname.service network.target
+Before=systemd-user-sessions.service
+
+[Service]
+ExecStart=/usr/sbin/ypbind -foreground
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-nds/ypbind/metadata.xml b/net-nds/ypbind/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-nds/ypbind/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-nds/ypbind/ypbind-1.37.2-r1.ebuild b/net-nds/ypbind/ypbind-1.37.2-r1.ebuild
new file mode 100644
index 000000000000..e21f9b413783
--- /dev/null
+++ b/net-nds/ypbind/ypbind-1.37.2-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+inherit readme.gentoo systemd
+
+MY_P=${PN}-mt-${PV}
+S="${WORKDIR}/${MY_P}"
+
+DESCRIPTION="Multithreaded NIS bind service (ypbind-mt)"
+HOMEPAGE="http://www.linux-nis.org/nis/ypbind-mt/index.html"
+SRC_URI="http://www.linux-nis.org/download/ypbind-mt/${MY_P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 sparc x86"
+IUSE="debug dbus nls slp systemd"
+
+RDEPEND="
+ debug? ( dev-libs/dmalloc )
+ dbus? ( dev-libs/dbus-glib )
+ slp? ( net-libs/openslp )
+ systemd? (
+ net-nds/rpcbind
+ >=net-nds/yp-tools-2.12-r1
+ sys-apps/systemd )
+ !systemd? (
+ net-nds/yp-tools
+ || ( net-nds/portmap net-nds/rpcbind ) )
+"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+"
+
+DOC_CONTENTS="
+ If you are using dhcpcd, be sure to add the -Y option to
+ dhcpcd_eth0 (or eth1, etc.) to keep dhcpcd from clobbering
+ /etc/yp.conf.
+"
+
+src_prepare() {
+ ! use systemd && export ac_cv_header_systemd_sd_daemon_h=no
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ $(use_enable slp) \
+ $(use_with debug dmalloc) \
+ $(use_enable dbus dbus-nm)
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ newins etc/yp.conf yp.conf.example
+
+ newconfd "${FILESDIR}/ypbind.confd-r1" ypbind
+ newinitd "${FILESDIR}/ypbind.initd" ypbind
+ use systemd && systemd_dounit "${FILESDIR}/ypbind.service"
+
+ readme.gentoo_create_doc
+}
diff --git a/net-nds/ypserv/Manifest b/net-nds/ypserv/Manifest
new file mode 100644
index 000000000000..48931e4b34e8
--- /dev/null
+++ b/net-nds/ypserv/Manifest
@@ -0,0 +1,11 @@
+AUX rpc.yppasswdd-r1 494 SHA256 870931c5a97510aa266b2df3c1b29fb314e7174cd59fd8b0541ce123ec7c24f3 SHA512 b4edaeba991c595718e3a4b79c90ab13fa7147f07be0c09e38450f6b83bb1bbc9612966c84074e919551b0ef2fd9ef729f8cce07621e67f240ce537d277c7af9 WHIRLPOOL 42f583fe0ddd2d5ed34007b954ad33b199608dd6a58d302fdf73c4586bb8963a030abba53242ac21dc2be5f7fe2d60a1528e9f304b1cbccfbb18c628d943a44d
+AUX rpc.yppasswdd.confd 260 SHA256 e46afe737bfc57aa31be1a441615fcc112e1ebf41d631c1929e00b81baca119d SHA512 2a96f5ef2bc38043f3cb02602b1fa61f312af0b30d875f5811aab7d5e2ebe1ce332fd1ef790554f5f799e4d2e398b81272f14b3486b5ac86c5db8ed2f3169ca5 WHIRLPOOL 521dcc0dec3de9da465662bfff3fd9c15954a005759432b6184f62c7d92b1a89ae06e108588e805643cf6f2b81f5cd21e74c7d6840e79ea0178450b2cf74c490
+AUX rpc.ypxfrd-2.23 537 SHA256 a0a1d437d66636ebb186e7249e8a7aacbff909dde544bd95eaf16f9956708ce1 SHA512 b804f338a464c8a88caa9a9c1b7c0b6a0b87a3db7f9b526aa394f43e8345be7e141b5d1181d808e89a57d626f2a8c946e211eb1710fbf1ca48482d9608da70a7 WHIRLPOOL a0a6fe84283a5a9c44e5874c64837074fa908fb513206eecc3abfabbfcbbb08aef9e872f34973903c98a79b85a444d84f07cb3603f3c109210eb9a3e30c0e53d
+AUX rpc.ypxfrd.confd 122 SHA256 bd1f245a362f85319e83965e8b825e66e686a4a0bf185ab8ec51fd335bc873c2 SHA512 b1bca2cec9ad4e6772a549f847af8e09191b7af1b175d7ee45170f207db1d263d061f333ca33b1a69d38a0202cedb3259b45e84b465ee7e5fe48ef8bcb798e1b WHIRLPOOL 6274ba6e661245d27cccdeb3e44163d62ed8bd196403c9753a6ae9c9eb03bf33ac436bdbd1a2fa4d0b5721e6b0fdb043f96fb1d0e47b0077435dcbd1a8eac83b
+AUX ypserv 477 SHA256 24d4bfd2d938b3b89ae89067e1249631f2a05a81a95772c82861700039f69ab4 SHA512 a66b5d786819633dd8b4324432d94f4129c89d02ba475cd9033f7f33a20b12217419e4cf295f52d2527235facbbdbbec7c5f9d3e2e99e88079720f624c6f740b WHIRLPOOL ff0b76e5504c657cc27fdf36efca3b84fb1bd775b3a5e99db4391bddfb2d5634e779f06f5318e257963ce3ce3cbd8082f58b3b37b863f84bfcd60afa4e778b44
+AUX ypserv.confd 95 SHA256 4edd475ca95d31cfcea20a8e6268024f8128423bc7ae67edb535e6811c64668e SHA512 4ad2efbf644bae1b3e749191965e8e8c40ad48576a4d27e4af0fc312d97ba749c5df14fd35abfeb402e2e247a12a4fedfffd0fa0e1ace64624b38bad7aa2f95c WHIRLPOOL 8455dafbedb65808bd18c30a37813c18bfe265d1480553b1c33d580d9d155e4748d0d1dea2697b953bfceaaeedb19fd79e82c17ba89de8597d6530bf391a9b91
+DIST ypserv-2.26.tar.bz2 196037 SHA256 ba71e4fa9659ebc32325eacb3daa0803332e9ca17e0d0779730ba0e2ece298f8 SHA512 03ae9dfc65cfcedab37f7b0945cf87b9c6e2d15d081d9e023ab6f1d7a8bfe9e00971d7ec4d0f6f040515bc9cd21e4a9fc76b1f4d6fecce9ea48c289b84305ad1 WHIRLPOOL 39b291a7bb798fedfa72143ad73d00f19069061d86bba6306b38451bb52e5fefc9644747974f528a488e6e945c0558a7fc902563abd92e388fc2ceb61a051b23
+EBUILD ypserv-2.26-r1.ebuild 2418 SHA256 a761b79c2cb2838bd391bef4d37ac41fd8855c34b1830c9d46b963947f62f2b8 SHA512 005f0aadceb69b33158ddd4e449033ade7c15542e6ad460d1766b22133e3aec733338c7a1f8ea3070c3f963a714a54695358e90faf311436d0f5b0ab8a83ad50 WHIRLPOOL 58cb9318a47484c628c1e78c8e89c9275aaaba82ededa5ec4b10d96a2b25e8dc4455aeca319d55c6765814da6fd97d1a8601b5dd103882a920b3ca54c9555b53
+MISC ChangeLog 3332 SHA256 32da1c7acf408d83d5dacf2b9abe6bbda84e8667861171589ae243469df76d0b SHA512 71d3c36b31395de05784c87e3dd01abf86fcd59e951527098a3a5cda3a842f321074082954c58dce3233218d827d83ab3b1319bd1c39c90801c08d73b2a1b1c5 WHIRLPOOL a03792d86a7642a51a33e5155be49b3b8a7cf2f6aa40435bcafb8b75cb802a8208f0dd545f8a16923f5fbca0ca3e955016093e616e0d175851353a99f0231129
+MISC ChangeLog-2015 8845 SHA256 9c33dad200c4251affd621f984901741e228ed911f46076f393c88ab3843464d SHA512 eaa3aa91bde482b1623d3d39c596878669926e0d0aa1d01fe0109890bde47c8b5046b18aa04bbcdf2fff54b22f08fbe8f8c97a444e8a861a053d8ab78aaa71a0 WHIRLPOOL 5a47b8bdad7bcb47be66bf8c4b05ccf549e9fd82f7e3d0c0026277e3e4391859ec20460d46c54a8b2f0ddc99ce87a091a6627cda3fb4069b7464ca1d75d443e9
+MISC metadata.xml 166 SHA256 2caff447f5bd2701d8456ada5cc633c41ef4373fa4bfeabeb73599d40bcc941b SHA512 a56648c974a1d14dd4c18237532773c72057a13ab90c58b5da04f185e3c12a8bd8d5c21fb06053507f31766291a82dc7d87b34cd65fd94cfe2af7295c813ef84 WHIRLPOOL 1ff70497eca6531f0e0614c72a19f4b8e5ff486a58d369f4f0b36308d1d6b01168f9da887740e3b9f536236be251d3fe05f904d27a9233a7cf613416ba882968
diff --git a/net-nds/ypserv/files/rpc.yppasswdd-r1 b/net-nds/ypserv/files/rpc.yppasswdd-r1
new file mode 100644
index 000000000000..9c2c2b416c53
--- /dev/null
+++ b/net-nds/ypserv/files/rpc.yppasswdd-r1
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net portmap ypserv
+}
+
+start() {
+ ebegin "Starting rpc.yppasswdd"
+ YOPTS=""
+ if [ -n "${YPPASSWDD_OPTS}" ]; then YOPTS="-- ${YPPASSWDD_OPTS}"; fi
+ start-stop-daemon --start --quiet --exec /usr/sbin/rpc.yppasswdd ${YOPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rpc.yppasswdd"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/rpc.yppasswdd
+ eend $?
+}
diff --git a/net-nds/ypserv/files/rpc.yppasswdd.confd b/net-nds/ypserv/files/rpc.yppasswdd.confd
new file mode 100644
index 000000000000..0d6673630776
--- /dev/null
+++ b/net-nds/ypserv/files/rpc.yppasswdd.confd
@@ -0,0 +1,7 @@
+# -e chsh allows changing shell through ypchsh,
+# -e chfn allows changing GECOS ("finger") information through ypchfn,
+# -D <dir> allows specification of directory with yp/NIS sources
+# if other than /etc.
+#YPPASSWDD_OPTS="-e chsh -e chfn -D /var/yp/source"
+
+
diff --git a/net-nds/ypserv/files/rpc.ypxfrd-2.23 b/net-nds/ypserv/files/rpc.ypxfrd-2.23
new file mode 100644
index 000000000000..d096dbf266a8
--- /dev/null
+++ b/net-nds/ypserv/files/rpc.ypxfrd-2.23
@@ -0,0 +1,21 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net portmap ypserv
+}
+
+start() {
+ ebegin "Starting rpc.ypxfrd"
+ YOPTS=""
+ if [ -n "${YPXFRD_OPTS}" ]; then YOPTS="-- ${YPXFRD_OPTS}"; fi
+ start-stop-daemon --start --quiet --pidfile /var/run/ypxfrd.pid --exec /usr/sbin/rpc.ypxfrd ${YOPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping rpc.ypxfrd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/ypxfrd.pid --exec /usr/sbin/rpc.ypxfrd
+ eend $?
+}
diff --git a/net-nds/ypserv/files/rpc.ypxfrd.confd b/net-nds/ypserv/files/rpc.ypxfrd.confd
new file mode 100644
index 000000000000..73cfc47e7154
--- /dev/null
+++ b/net-nds/ypserv/files/rpc.ypxfrd.confd
@@ -0,0 +1,3 @@
+# Command line options to pass to rpc.ypxfrd
+# eg: you can pass --port <number> to use a non-standard port
+YPXFRD_OPTS=""
diff --git a/net-nds/ypserv/files/ypserv b/net-nds/ypserv/files/ypserv
new file mode 100644
index 000000000000..205c3ef4381b
--- /dev/null
+++ b/net-nds/ypserv/files/ypserv
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net portmap
+ use domainname
+}
+
+start() {
+ ebegin "Starting NIS Server"
+ YOPTS=""
+ if [ -n "${YPSERV_OPTS}" ]; then YOPTS="-- ${YPSERV_OPTS}"; fi
+ start-stop-daemon --start --quiet --exec /usr/sbin/ypserv ${YOPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NIS Server"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/ypserv
+ eend $?
+}
diff --git a/net-nds/ypserv/files/ypserv.confd b/net-nds/ypserv/files/ypserv.confd
new file mode 100644
index 000000000000..0ae9756dc81b
--- /dev/null
+++ b/net-nds/ypserv/files/ypserv.confd
@@ -0,0 +1,4 @@
+# Config file for /etc/init.d/ypserv
+
+# Command line options to pass to ypserv:
+YPSERV_OPTS=""
diff --git a/net-nds/ypserv/metadata.xml b/net-nds/ypserv/metadata.xml
new file mode 100644
index 000000000000..6f49eba8f496
--- /dev/null
+++ b/net-nds/ypserv/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<!-- maintainer-needed -->
+</pkgmetadata>
diff --git a/net-nds/ypserv/ypserv-2.26-r1.ebuild b/net-nds/ypserv/ypserv-2.26-r1.ebuild
new file mode 100644
index 000000000000..700b169788d2
--- /dev/null
+++ b/net-nds/ypserv/ypserv-2.26-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="6"
+
+inherit autotools
+
+DESCRIPTION="Network Information Service server"
+HOMEPAGE="http://www.linux-nis.org/nis/"
+SRC_URI="mirror://kernel/linux/utils/net/NIS/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ppc ppc64 x86"
+IUSE="slp"
+
+DEPEND=">=sys-libs/gdbm-1.8.0
+ slp? ( net-libs/openslp )"
+RDEPEND="${DEPEND}
+ || ( net-nds/rpcbind net-nds/portmap )"
+
+src_prepare() {
+ # The configure script does not provide a command-line flag to control usage
+ # of slp. Use a brutal method in case we need to disable it.
+ if ! use slp; then
+ sed -i -e 's/USE_SLP=1/USE_SLP=0/g' configure.in || die
+ eautoreconf
+ fi
+
+ default
+}
+
+src_install() {
+ default
+ dodoc AUTHORS ChangeLog NEWS README THANKS TODO
+
+ insinto /etc
+ doins etc/ypserv.conf etc/netgroup etc/netmasks
+ insinto /var/yp
+ newins etc/securenets securenets.default
+
+ newconfd "${FILESDIR}/ypserv.confd" ypserv
+ newconfd "${FILESDIR}/rpc.yppasswdd.confd" rpc.yppasswdd
+ newconfd "${FILESDIR}/rpc.ypxfrd.confd" rpc.ypxfrd
+
+ newinitd "${FILESDIR}/ypserv" ypserv
+ newinitd "${FILESDIR}/rpc.yppasswdd-r1" rpc.yppasswdd
+ newinitd "${FILESDIR}/rpc.ypxfrd-2.23" rpc.ypxfrd
+
+ echo "CONFIG_PROTECT=\"/var/yp/Makefile\"" > "${T}"/10ypserv
+ doenvd "${T}"/10ypserv
+}
+
+pkg_preinst() {
+ # This ebuilds installs an env file which CONFIG_PROTECTs /var/yp/Makefile,
+ # but if the user is migrating from older ypserv, this won't take effect
+ # immediately. Keep the older setup with Makefile.dist file and ask the user
+ # to migrate.
+ if [ -f "${ROOT}/var/yp/Makefile.dist" ]; then
+ mv "${D}/var/yp/Makefile" "${D}/var/yp/Makefile.dist" \
+ || die "mv failed"
+ cp "${ROOT}/var/yp/Makefile" "${D}/var/yp/Makefile" \
+ || die "cp failed"
+ elog "Please remove ${ROOT}/var/yp/Makefile.dist after making sure that"
+ elog "${ROOT}/var/yp/Makefile looks fine to you. It is now"
+ elog "CONFIG_PROTECTed, so further changes should be managed with"
+ elog "usual config management tools like etc-update or dispatch-conf."
+ fi
+}
+
+pkg_postinst() {
+ einfo "To complete setup, you will need to edit /var/yp/securenets,"
+ einfo "/etc/conf.d/ypserv, /etc/ypserv.conf, /etc/conf.d/rpc.yppasswdd"
+ einfo "and possibly /var/yp/Makefile."
+
+ einfo "To start the services at boot, you need to enable ypserv and optionally"
+ einfo "the rpc.yppasswdd and/or rpc.ypxfrd services"
+}