diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-nds/389-ds-base | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-nds/389-ds-base')
-rw-r--r-- | net-nds/389-ds-base/389-ds-base-1.3.0.2-r1.ebuild | 165 | ||||
-rw-r--r-- | net-nds/389-ds-base/Manifest | 1 | ||||
-rw-r--r-- | net-nds/389-ds-base/files/389-ds-base-1.2.11-fix-mozldap.patch | 28 | ||||
-rw-r--r-- | net-nds/389-ds-base/files/389-ds-snmp.initd | 45 | ||||
-rw-r--r-- | net-nds/389-ds-base/files/389-ds.initd | 78 | ||||
-rw-r--r-- | net-nds/389-ds-base/files/restart-dirsrv | 30 | ||||
-rw-r--r-- | net-nds/389-ds-base/files/start-dirsrv | 14 | ||||
-rw-r--r-- | net-nds/389-ds-base/metadata.xml | 22 |
8 files changed, 383 insertions, 0 deletions
diff --git a/net-nds/389-ds-base/389-ds-base-1.3.0.2-r1.ebuild b/net-nds/389-ds-base/389-ds-base-1.3.0.2-r1.ebuild new file mode 100644 index 000000000000..dcdc456a94b5 --- /dev/null +++ b/net-nds/389-ds-base/389-ds-base-1.3.0.2-r1.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +WANT_AUTOMAKE="1.9" +MY_P=${P/_alpha/.a} +MY_P=${MY_P/_rc/.rc} + +inherit user eutils multilib flag-o-matic autotools + +DESCRIPTION="389 Directory Server (core librares and daemons )" +HOMEPAGE="http://port389.org/" +SRC_URI="http://directory.fedoraproject.org/sources/${MY_P}.tar.bz2" + +LICENSE="GPL-2-with-exceptions" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="autobind auto-dn-suffix debug doc +pam-passthru +dna +ldapi +bitwise +presence kerberos selinux" + +ALL_DEPEND=" + !>=sys-libs/db-5.0 + >=dev-libs/cyrus-sasl-2.1.19 + >=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 + >=net-analyzer/net-snmp-5.1.2 + net-nds/openldap + sys-apps/tcp-wrappers + >=sys-libs/db-4.5:= + sys-libs/pam + sys-libs/zlib + kerberos? ( >=app-crypt/mit-krb5-1.7-r100[openldap] )" + +DEPEND="${ALL_DEPEND} + virtual/pkgconfig + sys-devel/libtool + doc? ( app-doc/doxygen ) + sys-apps/sed" +RDEPEND="${ALL_DEPEND} + selinux? ( sec-policy/selinux-dirsrv ) + virtual/perl-Time-Local + virtual/perl-MIME-Base64" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup dirsrv + enewuser dirsrv -1 -1 -1 dirsrv +} + +src_prepare() { + # Fix compilation against mozldap + # epatch "${FILESDIR}/389-ds-base-1.2.11-fix-mozldap.patch" + + # as per 389 documentation, when 64bit, export USE_64 + use amd64 && export USE_64=1 + + sed -i -e 's/nobody/dirsrv/g' configure.ac || die "sed failed on configure.ac" + eautoreconf + + # enable nsslapd-allow-unauthenticated-binds by default + sed -i '/^nsslapd-allow-unauthenticated-binds/ s/off/on/' "${S}"/ldap/ldif/template-dse.ldif.in || \ + die "cannot tweak default setting: nsslapd-allow-unauthenticated-binds" + + append-lfs-flags +} + +src_configure() { + local myconf="" + + use auto-dn-suffix && myconf="${myconf} --enable-auto-dn-suffix" + + 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) \ + --enable-maintainer-mode \ + --enable-autobind \ + --with-fhs \ + --with-openldap \ + $myconf +} + +src_install () { + # Use -j1 otherwise libacl-plugin.so could fail to install properly + emake -j1 DESTDIR="${D}" install + + # install not installed header + insinto /usr/include/dirsrv + doins ldap/servers/slapd/slapi-plugin.h + + # for build free-ipa require winsync-plugin + doins ldap/servers/plugins/replication/winsync-plugin.h + doins ldap/servers/plugins/replication/repl-session-plugin.h + + # make sure perl scripts have a proper shebang + cd "${D}"/usr/share/dirsrv/script-templates/ || die + + for i in $(find ./ -iname '*.pl') ;do + sed -i -e 's/#{{PERL-EXEC}}/#\!\/usr\/bin\/perl/' $i || die + done + + # remove redhat style init script + rm -rf "${D}"/etc/rc.d || die + rm -rf "${D}"/etc/default || die + + # and install gentoo style init script + newinitd "${FILESDIR}"/389-ds.initd 389-ds + newinitd "${FILESDIR}"/389-ds-snmp.initd 389-ds-snmp + + # install Gentoo-specific start/stop scripts + rm -f "${D}"/usr/sbin/{re,}start-dirsrv || die "cannot remove 389 start/stop executables" + dosbin "${FILESDIR}"/{re,}start-dirsrv + + # cope with libraries being in /usr/lib/dirsrv + dodir /etc/env.d + echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv + + # create the directory where our log file and database + dodir /var/lib/dirsrv + keepdir /var/lib/dirsrv + dodir /var/lock/dirsrv + keepdir /var/lock/dirsrv + # snmp agent, required directory + keepdir /var/agentx + dodir /var/agentx + + if use doc; then + cd "${S}" || die + doxygen slapi.doxy || die "cannot run doxygen" + dohtml -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/Manifest b/net-nds/389-ds-base/Manifest new file mode 100644 index 000000000000..13c1e88c2e2b --- /dev/null +++ b/net-nds/389-ds-base/Manifest @@ -0,0 +1 @@ +DIST 389-ds-base-1.3.0.2.tar.bz2 3008002 SHA256 0482f8cddbb32dc44051d59efe085eb744295a32eac65fbcd0b1bfd807319755 SHA512 99d41e2df832eaf8d83ec32fd9e7ef1819d75640fae2c69e62f5d11998c29d780726cb5d97cec7a6ae410c440d5124ca8b9d0cb7091a437a57f2625b16fca29f WHIRLPOOL 8ad72341e15d05e6af0999808a1930f11c7589c211424f7dfa68c1d8d5cd18657086dbf9aa6c856dc84a3926b47ed46484b30e6f72819a22e26277a3c504c1e0 diff --git a/net-nds/389-ds-base/files/389-ds-base-1.2.11-fix-mozldap.patch b/net-nds/389-ds-base/files/389-ds-base-1.2.11-fix-mozldap.patch new file mode 100644 index 000000000000..7c99085e3d3b --- /dev/null +++ b/net-nds/389-ds-base/files/389-ds-base-1.2.11-fix-mozldap.patch @@ -0,0 +1,28 @@ +commit f5bd0ed47523b39aedb6bcc1f9c0754371159a77 +Author: Rich Megginson <rmeggins at redhat.com> +Date: Fri Sep 14 09:20:18 2012 -0600 + + Ticket #461 - fix build problem with mozldap c sdk + + https://fedorahosted.org/389/ticket/461 + Reviewed by: rmeggins + Fixed by: cgrzemba + Branch: master + Fix Description: mozldap does not define LDAP_MOD_OP so define it + Platforms tested: RHEL6 x86_64 + Flag Day: no + Doc impact: no + +diff --git a/ldap/servers/slapd/pw.c b/ldap/servers/slapd/pw.c +index bfd48b1..4736e82 100644 +--- a/ldap/servers/slapd/pw.c ++++ b/ldap/servers/slapd/pw.c +@@ -61,6 +61,9 @@ + #if defined( _WIN32 ) + #undef LDAPDebug + #endif /* _WIN32 */ ++#if defined( USE_MOZLDAP ) ++#define LDAP_MOD_OP (0x0007) ++#endif /* USE_MOZLDAP */ + + #include "slap.h" 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..0e56f8b9cff8 --- /dev/null +++ b/net-nds/389-ds-base/files/389-ds-snmp.initd @@ -0,0 +1,45 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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 b/net-nds/389-ds-base/files/389-ds.initd new file mode 100644 index 000000000000..5afe506086c9 --- /dev/null +++ b/net-nds/389-ds-base/files/389-ds.initd @@ -0,0 +1,78 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DIRSRV_EXEC="/usr/sbin/ns-slapd" +PID_DIRECTORY="/var/run/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 + 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}) + 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 [ -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/files/restart-dirsrv b/net-nds/389-ds-base/files/restart-dirsrv new file mode 100644 index 000000000000..90654eca170a --- /dev/null +++ b/net-nds/389-ds-base/files/restart-dirsrv @@ -0,0 +1,30 @@ +#!/bin/sh + +# Script that restarts the ns-slapd server. +# Exit status can be: +# 0: Server restarted successfully +# 1: Server could not be started +# 2: Server started successfully (was not running) +# 3: Server could not be stopped + +sleep_time=8 +/etc/init.d/389-ds status &> /dev/null +running="${?}" + +rc-config stop 389-ds +if [ "${?}" = "1" ]; then + sleep ${sleep_time} + exit 3 +fi +rc-config start 389-ds +if [ "${?}" = "1" ]; then + sleep ${sleep_time} + exit 1 +fi +if [ "${running}" = "0" ]; then + sleep ${sleep_time} + exit 0 +else + sleep ${sleep_time} + exit 2 +fi diff --git a/net-nds/389-ds-base/files/start-dirsrv b/net-nds/389-ds-base/files/start-dirsrv new file mode 100644 index 000000000000..45c2a6c2c7d4 --- /dev/null +++ b/net-nds/389-ds-base/files/start-dirsrv @@ -0,0 +1,14 @@ +#!/bin/sh + +# Script that starts the ns-slapd server. +# Exit status can be: +# 0: Server started successfully +# 1: Server could not be started +# 2: Server already running + +rc-config stop 389-ds +rc-config start 389-ds +rc="${?}" +# give the daemon a chance to start +sleep 8 +exit "${rc:-1}" diff --git a/net-nds/389-ds-base/metadata.xml b/net-nds/389-ds-base/metadata.xml new file mode 100644 index 000000000000..47330005454e --- /dev/null +++ b/net-nds/389-ds-base/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>maintainer-needed@gentoo.org</email> +</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-stabdart 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> |