move fds to own overlay

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@704 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one
2009-01-21 13:02:35 +00:00
parent 4542d290c6
commit 76ad780934
45 changed files with 0 additions and 2241 deletions

View File

@@ -1,66 +0,0 @@
# ChangeLog for net-nds/fedora-ds-admin
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
15 Sep 2008; Mario Fetka <mario.fetka@gmail.com>
+fedora-ds-admin-1.1.6.ebuild:
bump
30 Aug 2008; Mario Fetka <mario.fetka@gmail.com>
+files/fedora-ds-admin-1.1.5-cfgstuff-1.patch,
fedora-ds-admin-1.1.5-r2.ebuild:
correct cfg stuff
30 Aug 2008; Mario Fetka <mario.fetka@gmail.com>
-fedora-ds-admin-1.1.5-r1.ebuild, +fedora-ds-admin-1.1.5-r2.ebuild:
depend on java part of admin server
22 Aug 2008; Mario Fetka <mario.fetka@gmail.com>
fedora-ds-admin-1.1.5-r1.ebuild:
add missing depend
20 Aug 2008; Mario Fetka <mario.fetka@gmail.com>
-fedora-ds-admin-1.1.2.ebuild, -fedora-ds-admin-1.1.4.ebuild,
-fedora-ds-admin-1.1.5.ebuild, fedora-ds-admin-1.1.5-r1.ebuild:
Repoman Cleanup
18 Aug 2008; Mario Fetka <mario.fetka@gmail.com>
+files/dirsrv-admin.confd, +files/dirsrv-admin.initd,
fedora-ds-admin-1.1.5.ebuild, +fedora-ds-admin-1.1.5-r1.ebuild:
remove USE for now as the m4 macros aren't really usable for a system like
gentoo ebuild fedora-ds-admin-1.1.5-r1.ebuild digest
27 Jun 2008; Mario Fetka <mario-fetka@gmx.at> ChangeLog:
Bump
27 Jun 2008; Mario Fetka <mario-fetka@gmx.at>
+fedora-ds-admin-1.1.5.ebuild:
Bump
21 May 2008; Mario Fetka <mario-fetka@gmx.at>
+fedora-ds-admin-1.1.4.ebuild:
bump
27 Jan 2008; Mario Fetka <mario-fetka@gmx.at> ChangeLog:
bump
11 Nov 2007; Mario Fetka <mario-fetka@gmx.at> ++, ++,
-fedora-ds-admin-1.1.0_pre20071017.ebuild:
bump
17 Oct 2007; Mario Fetka <mario-fetka@gmx.at> ++, ++,
-fedora-ds-admin-1.1.0_pre20071014.ebuild:
Bump to latest snapshot
14 Oct 2007; Mario Fetka <mario-fetka@gmx.at> ++, ++,
-fedora-ds-admin-1.1.0_pre20071009.ebuild:
Bump to latest snapshot
09 Oct 2007; Mario Fetka <mario-fetka@gmx.at> ++, ++,
-fedora-ds-admin-1.1.0_pre20071006.ebuild:
Bump to snapshot 20071009
06 Oct 2007; Mario Fetka <mario-fetka@gmx.at> +metadata.xml,
+fedora-ds-admin-1.1.0_pre20071006.ebuild:
first version

View File

@@ -1,10 +0,0 @@
AUX dirsrv-admin.confd 3079 RMD160 4c85078cd92ca5b16582aabb6c5c614d2cb06784 SHA1 d0dd4117d67324bb5fe005ef54a7882b46ff2556 SHA256 e27ea96a265e3738905c9acb37096a6fe15d873d15832e417d7dff41fc94a149
AUX dirsrv-admin.initd 3701 RMD160 70ea7e54f83fb5c29e0c931c4143198832f4562e SHA1 56f635f57df05f965fe9c66f2b57921eec96c2c8 SHA256 4f3e7a2795527633fecc70685e9109519e6780f528382ac663f5d280bff28226
AUX fedora-ds-admin-1.1.5-cfgstuff-1.patch 2162 RMD160 b90280b41920d7e8351ef001f3d9e096e980052b SHA1 6252504afa4d7cd41d0e6abab84fd4ae34b94f6e SHA256 97fd463723eb927a81fd7524eeb32e165c90a9caa7651a6b1ec250217af3573f
AUX fedora-ds-admin-cvs.sh 340 RMD160 ebd9c99007e7c0864b1bb654333d1b672294e91d SHA1 3dc407f3e5f8cd1afab01106d7e3fddfb4201048 SHA256 7572aa1936dc728732e59412a033077a58e2bd399ec9ab90857a1716739d4a62
DIST fedora-ds-admin-1.1.5.tar.bz2 1068625 RMD160 1bcb1f9f3cf38ef15e38a89ae943c2965ac98306 SHA1 55749243ca9ad7f304dced35154904c6b1c1a20b SHA256 27560a4cdccde8360d098b8370aa8880139b0b47d6ae9080e8ecee7b0e71f1a6
DIST fedora-ds-admin-1.1.6.tar.bz2 1039309 RMD160 7b830a0c029fff71e3fe594491e784858e87ec68 SHA1 005007ebcfdfe0bc46e7d53f857b8d1d4cb4ff3e SHA256 49b011e2b406ec8cf90d7ae64b1f924cb81eb38d7d6de259eba8435c36c30b0b
EBUILD fedora-ds-admin-1.1.5-r2.ebuild 1877 RMD160 60b28f587ab2dbbebb13a91ba7cc0042449650c2 SHA1 1c2c79fcf86d7d456e68647f33b6706dba13525b SHA256 9fd2b3f45d3764ae6a6589eb45a64b4ab7108ad20f0c341679b3b0a66da6010f
EBUILD fedora-ds-admin-1.1.6.ebuild 1877 RMD160 60b28f587ab2dbbebb13a91ba7cc0042449650c2 SHA1 1c2c79fcf86d7d456e68647f33b6706dba13525b SHA256 9fd2b3f45d3764ae6a6589eb45a64b4ab7108ad20f0c341679b3b0a66da6010f
MISC ChangeLog 2078 RMD160 30b4d28a80aa23eabac2a5979b385a47be1b1062 SHA1 7edfd08111291176c14ae70c51317db59daa4bad SHA256 1549c582a8f74005140c84ca80f9d605deb9176e2e94cce0508ccd167327ad4d
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42

View File

@@ -1,80 +0,0 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
inherit eutils multilib autotools depend.apache
DESCRIPTION="Fedora Directory Server (admin)"
HOMEPAGE="http://directory.fedora.redhat.com/"
SRC_URI="http://directory.fedoraproject.org/sources/${P}.tar.bz2"
LICENSE="GPL-2-with-exceptions"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ipv6 debug"
DEPEND=">=dev-libs/nss-3.11.4
>=dev-libs/nspr-4.6.4
>=dev-libs/svrcore-4.0.3
>=dev-libs/mozldap-6.0.2
>=dev-libs/adminutil-1.1.5
>=dev-libs/cyrus-sasl-2.1.19
>=dev-libs/icu-3.4
>=sys-libs/db-4.2.52
>=net-analyzer/net-snmp-5.1.2
sys-apps/lm_sensors
app-arch/bzip2
dev-libs/openssl
sys-apps/tcp-wrappers
sys-libs/pam
sys-libs/zlib
app-misc/mime-types
>=www-servers/apache-2.0
www-apache/mod_restartd
www-apache/mod_nss
www-apache/mod_admserv
>=app-admin/fedora-ds-admin-console-1.1.0
>=app-admin/fedora-ds-console-1.1.0"
need_apache2
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/fedora-ds-admin-1.1.5-cfgstuff-1.patch
sed -e "s!SUBDIRS!# SUBDIRS!g" -i Makefile.am
rm -rf mod_*
eautoreconf
}
src_compile() {
econf $(use_enable debug) \
--with-fhs \
--with-httpd=${APACHE_BIN} \
|| die "econf failed"
emake || die "emake failed"
# --with-nspr=yes \
# --with-nss=yes \
# --with-ldapsdk=yes \
# --with-db=yes \
# --with-svrcore=yes \
# --with-icu=yes \
}
src_install () {
emake DESTDIR="${D}" install || die "emake failed"
keepdir /var/log/dirsrv/admin-serv
# remove redhat style init script.
rm -rf "${D}"/etc/rc.d
rm -rf "${D}"/etc/default
# install gentoo style init script.
newinitd "${FILESDIR}"/dirsrv-admin.initd dirsrv-admin
newconfd "${FILESDIR}"/dirsrv-admin.confd dirsrv-admin
}

View File

@@ -1,80 +0,0 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
inherit eutils multilib autotools depend.apache
DESCRIPTION="Fedora Directory Server (admin)"
HOMEPAGE="http://directory.fedora.redhat.com/"
SRC_URI="http://directory.fedoraproject.org/sources/${P}.tar.bz2"
LICENSE="GPL-2-with-exceptions"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="ipv6 debug"
DEPEND=">=dev-libs/nss-3.11.4
>=dev-libs/nspr-4.6.4
>=dev-libs/svrcore-4.0.3
>=dev-libs/mozldap-6.0.2
>=dev-libs/adminutil-1.1.5
>=dev-libs/cyrus-sasl-2.1.19
>=dev-libs/icu-3.4
>=sys-libs/db-4.2.52
>=net-analyzer/net-snmp-5.1.2
sys-apps/lm_sensors
app-arch/bzip2
dev-libs/openssl
sys-apps/tcp-wrappers
sys-libs/pam
sys-libs/zlib
app-misc/mime-types
>=www-servers/apache-2.0
www-apache/mod_restartd
www-apache/mod_nss
www-apache/mod_admserv
>=app-admin/fedora-ds-admin-console-1.1.0
>=app-admin/fedora-ds-console-1.1.0"
need_apache2
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/fedora-ds-admin-1.1.5-cfgstuff-1.patch
sed -e "s!SUBDIRS!# SUBDIRS!g" -i Makefile.am
rm -rf mod_*
eautoreconf
}
src_compile() {
econf $(use_enable debug) \
--with-fhs \
--with-httpd=${APACHE_BIN} \
|| die "econf failed"
emake || die "emake failed"
# --with-nspr=yes \
# --with-nss=yes \
# --with-ldapsdk=yes \
# --with-db=yes \
# --with-svrcore=yes \
# --with-icu=yes \
}
src_install () {
emake DESTDIR="${D}" install || die "emake failed"
keepdir /var/log/dirsrv/admin-serv
# remove redhat style init script.
rm -rf "${D}"/etc/rc.d
rm -rf "${D}"/etc/default
# install gentoo style init script.
newinitd "${FILESDIR}"/dirsrv-admin.initd dirsrv-admin
newconfd "${FILESDIR}"/dirsrv-admin.confd dirsrv-admin
}

View File

@@ -1,73 +0,0 @@
# /etc/conf.d/dirsrv-admin: config file for /etc/init.d/dirsrv-admin
# When you install a module it is easy to activate or deactivate the modules
# and other features of apache using the APACHE2_OPTS line. Every module should
# install a configuration in /etc/dirsrv/admin-serv. In that file will have an
# <IfDefine NNN> directive where NNN is the option to enable that module.
#
# Here are the options available in the default configuration:
#
# AUTH_DIGEST Enables mod_auth_digest
# AUTHNZ_LDAP Enables authentication through mod_ldap (available if USE=ldap)
# CACHE Enables mod_cache
# DAV Enables mod_dav
# ERRORDOCS Enables default error documents for many languages.
# INFO Enables mod_info, a useful module for debugging
# LANGUAGE Enables content-negotiation based on language and charset.
# LDAP Enables mod_ldap (available if USE=ldap)
# MANUAL Enables /manual/ to be the apache manual (available if USE=docs)
# MEM_CACHE Enables default configuration mod_mem_cache
# PROXY Enables mod_proxy
# SSL Enables SSL (available if USE=ssl)
# SUEXEC Enables running CGI scripts (in USERDIR) through suexec.
# USERDIR Enables /~username mapping to /home/username/public_html
#
#
# The following two options provide the default virtual host for the HTTP and
# HTTPS protocol. YOU NEED TO ENABLE AT LEAST ONE OF THEM, otherwise apache
# will not listen for incomming connections on the approriate port.
#
# DEFAULT_VHOST Enables name-based virtual hosts, with the default
# virtual host being in /var/www/localhost/htdocs
# SSL_DEFAULT_VHOST Enables default vhost for SSL (you should enable this
# when you enable SSL)
#
APACHE2_OPTS="-D DEFAULT_VHOST -D LANGUAGE -D INFO"
# Extended options for advanced uses of Apache ONLY
# You don't need to edit these unless you are doing crazy Apache stuff
# As not having them set correctly, or feeding in an incorrect configuration
# via them will result in Apache failing to start
# YOU HAVE BEEN WARNED.
# PID file
#PIDFILE=/var/run/dirsrv/admin-serv.pid
# timeout for startup/shutdown checks
#TIMEOUT=10
# ServerRoot setting
#SERVERROOT=/usr/lib/apache2
# Configuration file location
# - If this does NOT start with a '/', then it is treated relative to
# $SERVERROOT by Apache
#CONFIGFILE=/etc/dirsrv/admin-serv/httpd.conf
# Location to log startup errors to
# They are normally dumped to your terminal.
#STARTUPERRORLOG="/var/log/dirsrv/admin-serv/startuperror.log"
# A command that outputs a formatted text version of the HTML at the URL
# of the command line. Designed for lynx, however other programs may work.
#LYNX="lynx -dump"
# The URL to your server's mod_status status page.
# Required for status and fullstatus
#STATUSURL="http://localhost/server-status"
# Method to use when reloading the server
# Valid options are 'restart' and 'graceful'
# See http://httpd.apache.org/docs/2.2/stopping.html for information on
# what they do and how they differ.
#RELOAD_TYPE="graceful"

View File

@@ -1,165 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
opts="configdump configtest fullstatus graceful gracefulstop modules reload"
depend() {
need net
use mysql dns logger netmount postgresql
after sshd
}
configtest() {
ebegin "Checking Apache Configuration"
checkconfig
eend $?
}
checkconfd() {
PIDFILE="${PIDFILE:-/var/run/dirsrv/admin-serv.pid}"
TIMEOUT=${TIMEOUT:-10}
SERVERROOT="${SERVERROOT:-/usr/lib/apache2}"
if [ ! -d ${SERVERROOT} ]; then
eerror "SERVERROOT does not exist: ${SERVERROOT}"
return 1
fi
CONFIGFILE="${CONFIGFILE:-/etc/dirsrv/admin-serv/httpd.conf}"
[ "${CONFIGFILE#/}" = "${CONFIGFILE}" ] && CONFIGFILE="${SERVERROOT}/${CONFIGFILE}"
if [ ! -r "${CONFIGFILE}" ]; then
eerror "Unable to read configuration file: ${CONFIGFILE}"
return 1
fi
APACHE2_OPTS="${APACHE2_OPTS} -d ${SERVERROOT}"
APACHE2_OPTS="${APACHE2_OPTS} -f ${CONFIGFILE}"
[ -n "${STARTUPERRORLOG}" ] && APACHE2_OPTS="${APACHE2_OPTS} -E ${STARTUPERRORLOG}"
APACHE2="/usr/sbin/apache2"
}
checkconfig() {
checkconfd || return 1
${APACHE2} ${APACHE2_OPTS} -t 1>/dev/null 2>&1
ret=$?
if [ $ret -ne 0 ]; then
eerror "Apache2 has detected a syntax error in your configuration files:"
${APACHE2} ${APACHE2_OPTS} -t
fi
return $ret
}
start() {
checkconfig || return 1
[ -f /var/log/dirsrv/admin-serv/ssl_scache ] && rm /var/log/dirsrv/admin-serv/ssl_scache
ebegin "Starting apache2"
${APACHE2} ${APACHE2_OPTS} -k start
let i=0
while [ ! -e "${PIDFILE}" ] && [ $i -lt ${TIMEOUT} ]; do
sleep 1 && let i++
done
test $i -le ${TIMEOUT}
eend $?
}
stop() {
checkconfd || return 1
ebegin "Stopping apache2"
${APACHE2} ${APACHE2_OPTS} -k stop
let i=0
while pidof "${APACHE2}" >/dev/null && [ $i -lt ${TIMEOUT} ]; do
sleep 1 && let i++
done
test $i -le ${TIMEOUT}
eend $?
}
reload() {
RELOAD_TYPE="${RELOAD_TYPE:-graceful}"
checkconfig || return 1
service_started "${SVCNAME}" || return
if [ "${RELOAD_TYPE}" = "restart" ]; then
ebegin "Restarting apache2"
${APACHE2} ${APACHE2_OPTS} -k restart
eend $?
elif [ "${RELOAD_TYPE}" = "graceful" ]; then
ebegin "Gracefully restarting apache2"
${APACHE2} ${APACHE2_OPTS} -k graceful
eend $?
else
eerror "${RELOAD_TYPE} is not a valid RELOAD_TYPE. Please edit /etc/conf.d/dirsrv-admin"
fi
}
graceful() {
checkconfig || return 1
service_started "${SVCNAME}" || return
ebegin "Gracefully restarting apache2"
${APACHE2} ${APACHE2_OPTS} -k graceful
eend $?
}
gracefulstop() {
checkconfig || return 1
# zap!
if service_started "${SVCNAME}"; then
mark_service_stopped "${SVCNAME}"
fi
ebegin "Gracefully stopping apache2"
${APACHE2} ${APACHE2_OPTS} -k graceful-stop
eend $?
}
modules() {
checkconfig || return 1
${APACHE2} ${APACHE2_OPTS} -M 2>&1
}
fullstatus() {
LYNX="${LYNX:-lynx -dump}"
STATUSURL="${STATUSURL:-http://localhost/server-status}"
if ! service_started "${SVCNAME}"; then
eerror "${SVCNAME} not started"
elif ! type -p ${LYNX} 2>&1 >/dev/null; then
eerror "lynx not found! you need to emerge www-client/lynx"
else
${LYNX} ${STATUSURL}
fi
}
configdump() {
LYNX="${LYNX:-lynx -dump}"
INFOURL="${INFOURL:-http://localhost/server-info}"
checkconfd || return 1
if ! service_started "${SVCNAME}"; then
eerror "${SVCNAME} not started"
elif ! type -p ${LYNX} 2>&1 >/dev/null; then
eerror "lynx not found! you need to emerge www-client/lynx"
else
echo "${APACHE2} started with '${APACHE2_OPTS}'"
for i in config server list; do
${LYNX} "${INFOURL}/?${i}" | sed '/Apache Server Information/d;/^[[:space:]]\+[_]\+$/Q'
done
fi
}
# vim: ts=4 filetype=gentoo-init-d

View File

@@ -1,43 +0,0 @@
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
Date: 2008-08-30
Initial Package Version: 1.1.5
Origin: me
Upstream Status: Gentoo specific
Description: correct filelocations
diff -Naur fedora-ds-admin-1.1.5.orig/admserv/cfgstuff/httpd-2.2.conf.in fedora-ds-admin-1.1.5/admserv/cfgstuff/httpd-2.2.conf.in
--- fedora-ds-admin-1.1.5.orig/admserv/cfgstuff/httpd-2.2.conf.in 2007-08-01 18:14:53.000000000 +0000
+++ fedora-ds-admin-1.1.5/admserv/cfgstuff/httpd-2.2.conf.in 2008-08-30 12:25:00.766003282 +0000
@@ -141,10 +141,10 @@
LoadModule disk_cache_module @moddir@/mod_disk_cache.so
LoadModule file_cache_module @moddir@/mod_file_cache.so
LoadModule mem_cache_module @moddir@/mod_mem_cache.so
-LoadModule cgi_module @moddir@/mod_cgi.so
-LoadModule restartd_module @admmoddir@/mod_restartd.so
-LoadModule nss_module @nssmoddir@/libmodnss.so
-LoadModule admserv_module @admmoddir@/mod_admserv.so
+LoadModule cgid_module @moddir@/mod_cgid.so
+LoadModule restartd_module @moddir@/mod_restartd.so
+LoadModule nss_module @moddir@/mod_nss.so
+LoadModule admserv_module @moddir@/mod_admserv.so
### Section 2: 'Main' server configuration
#
diff -Naur fedora-ds-admin-1.1.5.orig/admserv/cfgstuff/httpd.conf.in fedora-ds-admin-1.1.5/admserv/cfgstuff/httpd.conf.in
--- fedora-ds-admin-1.1.5.orig/admserv/cfgstuff/httpd.conf.in 2007-08-01 18:14:53.000000000 +0000
+++ fedora-ds-admin-1.1.5/admserv/cfgstuff/httpd.conf.in 2008-08-30 12:26:03.402003388 +0000
@@ -140,10 +140,10 @@
LoadModule disk_cache_module @moddir@/mod_disk_cache.so
LoadModule file_cache_module @moddir@/mod_file_cache.so
LoadModule mem_cache_module @moddir@/mod_mem_cache.so
-LoadModule cgi_module @moddir@/mod_cgi.so
-LoadModule restartd_module @admmoddir@/mod_restartd.so
-LoadModule nss_module @nssmoddir@/libmodnss.so
-LoadModule admserv_module @admmoddir@/mod_admserv.so
+LoadModule cgid_module @moddir@/mod_cgid.so
+LoadModule restartd_module @moddir@/mod_restartd.so
+LoadModule nss_module @moddir@/mod_nss.so
+LoadModule admserv_module @moddir@/mod_admserv.so
### Section 2: 'Main' server configuration
#

View File

@@ -1,13 +0,0 @@
#!/bin/bash
DATE=`date +%Y%m%d`
CVSTAG=HEAD
VERSION=1.1.0
PKGNAME=fedora-ds-admin
export CVSROOT=:pserver:anonymous@cvs.fedora.redhat.com:/cvs/dirsec
cvs -d "$CVSROOT" -z3 export -r$CVSTAG -d $PKGNAME-$VERSION-pre$DATE adminserver
tar -cjf $PKGNAME-$VERSION-pre$DATE.tar.bz2 $PKGNAME-$VERSION-pre$DATE
rm -rf $PKGNAME-$VERSION-pre$DATE

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>maintainer-wanted</herd>
</pkgmetadata>

View File

@@ -1,71 +0,0 @@
# ChangeLog for net-nds/fedora-ds-base
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
04 Nov 2008; Mario Fetka <mario.fetka@gmail.com>
+fedora-ds-base-1.1.3.ebuild:
Bump
15 Sep 2008; Mario Fetka <mario.fetka@gmail.com>
fedora-ds-base-1.1.2.ebuild:
correct not needed patch
15 Sep 2008; Mario Fetka <mario.fetka@gmail.com> +files/bug435774.patch,
+fedora-ds-base-1.1.1-r2.ebuild, +fedora-ds-base-1.1.2.ebuild:
bump
30 Aug 2008; Mario Fetka <mario.fetka@gmail.com> +files/bug439829.patch,
fedora-ds-base-1.1.1-r1.ebuild:
deactivate devel bugfix
20 Aug 2008; Mario Fetka <mario.fetka@gmail.com>
-fedora-ds-base-1.1.0.ebuild, -fedora-ds-base-1.1.1.ebuild,
fedora-ds-base-1.1.1-r1.ebuild:
Repoman Cleanup
18 Aug 2008; Mario Fetka <mario.fetka@gmail.com>
fedora-ds-base-1.1.1.ebuild, +fedora-ds-base-1.1.1-r1.ebuild:
remove USE for now as the m4 macros aren't really usable for a system like
gentoo cd fedora-ds-base/
18 Aug 2008; Mario Fetka <mario.fetka@gmail.com>
fedora-ds-base-1.1.1.ebuild:
does not build without sasl gentoo Bug #104554 comment 55 thx Vladimir
Rusinov
31 Jul 2008; Mario Fetka <mario.fetka@gmail.com> files/dirsrv.initd,
fedora-ds-base-1.1.0.ebuild, +fedora-ds-base-1.1.1.ebuild:
repoman cleanup & new init script with spawn process check
20 Jun 2008; Mario Fetka <mario-fetka@gmx.at> fedora-ds-base-1.1.0.ebuild:
gcc 4.3 hack
19 Jan 2008; Mario Fetka <mario-fetka@gmx.at> ++, ++,
-fedora-ds-base-1.1.0_pre20071111.ebuild:
Initial 1.1 FDS
11 Nov 2007; Mario Fetka <mario-fetka@gmx.at> ++, ++,
-fedora-ds-base-1.1.0_pre20071017.ebuild:
bump
17 Oct 2007; Mario Fetka <mario-fetka@gmx.at> ++, ++,
-fedora-ds-base-1.1.0_pre20071014.ebuild:
Bump to latest snapshot
14 Oct 2007; Mario Fetka <mario-fetka@gmx.at> ++, ++,
-fedora-ds-base-1.1.0_pre20071009.ebuild:
Bump to latest snapshot
09 Oct 2007; Mario Fetka <mario-fetka@gmx.at> ++, ++,
-fedora-ds-base-1.1.0_pre20071006.ebuild:
Bump to snapshot 20071009
06 Oct 2007; Mario Fetka <mario-fetka@gmx.at> ++, ++, +metadata.xml,
-fedora-ds-base-1.1.0_pre20070818.ebuild:
Bump to latest snapshot
18 Aug 2007; Mario Fetka <mario-fetka@gmx.at>
-fedora-ds-base-1.1.0_pre20070808.ebuild,
+fedora-ds-base-1.1.0_pre20070818.ebuild:
bump to newest snapshot

View File

@@ -1,14 +0,0 @@
AUX bug435774.patch 1566 RMD160 aea416deddee6308f02a023bbc8d7fc2ac7e5363 SHA1 058c58bc8e9bf59476c1a58572501d9d8ba8e39c SHA256 ee9de736b54639f2a11e3dc7fe4a87b015eb9326e745d4b7e90785eac117bb92
AUX bug439829.patch 9701 RMD160 265747b19535c44abd5e5b6f67871d525ba2f152 SHA1 c22008a29dfe59d20e61b16ad70d192be4948c6d SHA256 d3fc786de0e25636673c0e1b5f228e965f5d56b8073f2654b4bd45812600a7fa
AUX dirsrv.confd 72 RMD160 d5478a77018aeb727ba72217d3e67af3dcd669c9 SHA1 006d238cd3fd31b9019a2a1e5bff250192b05a91 SHA256 62d68e8ab4b2b1342a3418e6b067a99345a2806ec1575f6d49cd6c0d1cbb17bc
AUX dirsrv.initd 2422 RMD160 f90db40234c6177c2e7b23999786f775fb62fa6e SHA1 36c29829002f91aa9e43d20bfc22dab443791c75 SHA256 8cd646015bd5bd4ea5a50fc5781200b1f287bc48a3892af4e1aea0c3c904c859
AUX fedora-ds-cvs.sh 346 RMD160 d9659f0aa8559c59865f42e16bc611a57a63d893 SHA1 8069aeee78a5fd614f19f3438c9f3dada700e944 SHA256 f2e453b1139b010ceae3dee2c0292e616a67ec55046e759b90c1104721ad412a
DIST fedora-ds-base-1.1.1.tar.bz2 2590248 RMD160 824ac88f2e901e19a1ec96f5ba9b4d94fc8f39c3 SHA1 78639f5075015cc9663f8e69aacaf2a5aa938e57 SHA256 ffd4cbbd61eef96174784e5de0c01c34738826a6b10bda4fcff6d7369c1cd0b5
DIST fedora-ds-base-1.1.2.tar.bz2 2663360 RMD160 fe51ca7466c1c8ff8d9ab9f9b6e88b4398656792 SHA1 e50ed2653538cc6f5071744177119e6f56aea3ad SHA256 edf64eaa16dc1f5a8fdf0e7cb802d92315b131541c3080c3521ceddffb722302
DIST fedora-ds-base-1.1.3.tar.bz2 2611619 RMD160 13c8505897a445b5ca59bac08edd0e01b1161f2f SHA1 140a94fdf1708aabebaa6015879893e141512c51 SHA256 ae56b93803363429eb5fa63b26dd6380c299c78bdf8d6aefe8dc72d4e4dd035f
EBUILD fedora-ds-base-1.1.1-r1.ebuild 1851 RMD160 0be248448f65ef9d57f91957d3b01407099332b4 SHA1 48f5b9eaf63143c10675f3031b764246fd51cd64 SHA256 67257aba20ba01e3896b970c46549670406c916eb5ee8308ca02b75abb9ef0ac
EBUILD fedora-ds-base-1.1.1-r2.ebuild 1849 RMD160 d590fcdf83339154d51900a8301039d6b3f9c103 SHA1 02b1e0c0338cd66fe01300de22d2c978fbf7bf6a SHA256 f6843041dd35ada00a553169adc56f64f3ec15f41081d988143371d39e49cac7
EBUILD fedora-ds-base-1.1.2.ebuild 1850 RMD160 586c46aee425700f0db01659d975f209c9c9eaec SHA1 2d531a42cbaa770495209fd5d65ee3cfec6cc67c SHA256 18db267c60ebf1b38baa5d72ed3a60ab7d2d1141c9bbce73776e637e41d7d29d
EBUILD fedora-ds-base-1.1.3.ebuild 1850 RMD160 586c46aee425700f0db01659d975f209c9c9eaec SHA1 2d531a42cbaa770495209fd5d65ee3cfec6cc67c SHA256 18db267c60ebf1b38baa5d72ed3a60ab7d2d1141c9bbce73776e637e41d7d29d
MISC ChangeLog 2363 RMD160 fcb6d057ad393bfb13688077a2873263080dad1a SHA1 a534e9d99fdda498b126870213dbf9b330443236 SHA256 c82c8607bda5a3729640de1999ed46d410468b432b668919289d9f152f22b157
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42

View File

@@ -1,77 +0,0 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils multilib flag-o-matic
DESCRIPTION="Fedora Directory Server (base)"
HOMEPAGE="http://directory.fedora.redhat.com/"
SRC_URI="http://directory.fedoraproject.org/sources/${P}.tar.bz2"
LICENSE="GPL-2-with-exceptions"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"
DEPEND=">=dev-libs/nss-3.11.4
>=dev-libs/nspr-4.6.4
>=dev-libs/svrcore-4.0.3
>=dev-libs/mozldap-6.0.2
>=dev-libs/cyrus-sasl-2.1.19
>=dev-libs/icu-3.4
>=sys-libs/db-4.2.52
>=net-analyzer/net-snmp-5.1.2
sys-apps/lm_sensors
app-arch/bzip2
dev-libs/openssl
sys-apps/tcp-wrappers
sys-libs/pam
sys-libs/zlib
dev-perl/perl-mozldap"
src_unpack() {
unpack ${A}
# cd ${S}
# epatch ${FILESDIR}/bug439829.patch
}
src_compile() {
append-flags -D_GNU_SOURCE
econf $(use_enable debug) \
--with-fhs || die "econf failed"
# --with-db=yes \
# --with-ldapsdk=yes \
# --with-svrcore=yes \
# --with-nss=yes \
# --with-nspr=yes \
# --with-icu=yes \
# $(use_enable pam pam-passthru) \
# $(use_enable ldapi) \
# $(use_with sasl sasl yes) \
# $(use_with snmp netsnmp yes) \
emake || die "emake failed"
}
src_install () {
emake DESTDIR="${D}" install || die "emake failed"
# install not installed header
insinto /usr/include/dirsrv
doins ldap/servers/slapd/slapi-plugin.h
# make sure perl scripts have a proper shebang
dosed 's|#{{PERL-EXEC}}|#!/usr/bin/perl|' /usr/share/dirsrv/script-templates/template-*.pl
# remove redhat style init script and install gentoo style
rm -rf "${D}"/etc/rc.d
rm -rf "${D}"/etc/default
newinitd "${FILESDIR}"/dirsrv.initd dirsrv
newconfd "${FILESDIR}"/dirsrv.confd dirsrv
# cope with libraries being in /usr/lib/dirsrv
dodir /etc/env.d
echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv
}

View File

@@ -1,77 +0,0 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils multilib flag-o-matic
DESCRIPTION="Fedora Directory Server (base)"
HOMEPAGE="http://directory.fedora.redhat.com/"
SRC_URI="http://directory.fedoraproject.org/sources/${P}.tar.bz2"
LICENSE="GPL-2-with-exceptions"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"
DEPEND=">=dev-libs/nss-3.11.4
>=dev-libs/nspr-4.6.4
>=dev-libs/svrcore-4.0.3
>=dev-libs/mozldap-6.0.2
>=dev-libs/cyrus-sasl-2.1.19
>=dev-libs/icu-3.4
>=sys-libs/db-4.2.52
>=net-analyzer/net-snmp-5.1.2
sys-apps/lm_sensors
app-arch/bzip2
dev-libs/openssl
sys-apps/tcp-wrappers
sys-libs/pam
sys-libs/zlib
dev-perl/perl-mozldap"
src_unpack() {
unpack ${A}
cd ${S}
epatch ${FILESDIR}/bug435774.patch
}
src_compile() {
append-flags -D_GNU_SOURCE
econf $(use_enable debug) \
--with-fhs || die "econf failed"
# --with-db=yes \
# --with-ldapsdk=yes \
# --with-svrcore=yes \
# --with-nss=yes \
# --with-nspr=yes \
# --with-icu=yes \
# $(use_enable pam pam-passthru) \
# $(use_enable ldapi) \
# $(use_with sasl sasl yes) \
# $(use_with snmp netsnmp yes) \
emake || die "emake failed"
}
src_install () {
emake DESTDIR="${D}" install || die "emake failed"
# install not installed header
insinto /usr/include/dirsrv
doins ldap/servers/slapd/slapi-plugin.h
# make sure perl scripts have a proper shebang
dosed 's|#{{PERL-EXEC}}|#!/usr/bin/perl|' /usr/share/dirsrv/script-templates/template-*.pl
# remove redhat style init script and install gentoo style
rm -rf "${D}"/etc/rc.d
rm -rf "${D}"/etc/default
newinitd "${FILESDIR}"/dirsrv.initd dirsrv
newconfd "${FILESDIR}"/dirsrv.confd dirsrv
# cope with libraries being in /usr/lib/dirsrv
dodir /etc/env.d
echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv
}

View File

@@ -1,77 +0,0 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils multilib flag-o-matic
DESCRIPTION="Fedora Directory Server (base)"
HOMEPAGE="http://directory.fedora.redhat.com/"
SRC_URI="http://directory.fedoraproject.org/sources/${P}.tar.bz2"
LICENSE="GPL-2-with-exceptions"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"
DEPEND=">=dev-libs/nss-3.11.4
>=dev-libs/nspr-4.6.4
>=dev-libs/svrcore-4.0.3
>=dev-libs/mozldap-6.0.2
>=dev-libs/cyrus-sasl-2.1.19
>=dev-libs/icu-3.4
>=sys-libs/db-4.2.52
>=net-analyzer/net-snmp-5.1.2
sys-apps/lm_sensors
app-arch/bzip2
dev-libs/openssl
sys-apps/tcp-wrappers
sys-libs/pam
sys-libs/zlib
dev-perl/perl-mozldap"
src_unpack() {
unpack ${A}
cd ${S}
# epatch ${FILESDIR}/bug435774.patch
}
src_compile() {
append-flags -D_GNU_SOURCE
econf $(use_enable debug) \
--with-fhs || die "econf failed"
# --with-db=yes \
# --with-ldapsdk=yes \
# --with-svrcore=yes \
# --with-nss=yes \
# --with-nspr=yes \
# --with-icu=yes \
# $(use_enable pam pam-passthru) \
# $(use_enable ldapi) \
# $(use_with sasl sasl yes) \
# $(use_with snmp netsnmp yes) \
emake || die "emake failed"
}
src_install () {
emake DESTDIR="${D}" install || die "emake failed"
# install not installed header
insinto /usr/include/dirsrv
doins ldap/servers/slapd/slapi-plugin.h
# make sure perl scripts have a proper shebang
dosed 's|#{{PERL-EXEC}}|#!/usr/bin/perl|' /usr/share/dirsrv/script-templates/template-*.pl
# remove redhat style init script and install gentoo style
rm -rf "${D}"/etc/rc.d
rm -rf "${D}"/etc/default
newinitd "${FILESDIR}"/dirsrv.initd dirsrv
newconfd "${FILESDIR}"/dirsrv.confd dirsrv
# cope with libraries being in /usr/lib/dirsrv
dodir /etc/env.d
echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv
}

View File

@@ -1,77 +0,0 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
inherit eutils multilib flag-o-matic
DESCRIPTION="Fedora Directory Server (base)"
HOMEPAGE="http://directory.fedora.redhat.com/"
SRC_URI="http://directory.fedoraproject.org/sources/${P}.tar.bz2"
LICENSE="GPL-2-with-exceptions"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"
DEPEND=">=dev-libs/nss-3.11.4
>=dev-libs/nspr-4.6.4
>=dev-libs/svrcore-4.0.3
>=dev-libs/mozldap-6.0.2
>=dev-libs/cyrus-sasl-2.1.19
>=dev-libs/icu-3.4
>=sys-libs/db-4.2.52
>=net-analyzer/net-snmp-5.1.2
sys-apps/lm_sensors
app-arch/bzip2
dev-libs/openssl
sys-apps/tcp-wrappers
sys-libs/pam
sys-libs/zlib
dev-perl/perl-mozldap"
src_unpack() {
unpack ${A}
cd ${S}
# epatch ${FILESDIR}/bug435774.patch
}
src_compile() {
append-flags -D_GNU_SOURCE
econf $(use_enable debug) \
--with-fhs || die "econf failed"
# --with-db=yes \
# --with-ldapsdk=yes \
# --with-svrcore=yes \
# --with-nss=yes \
# --with-nspr=yes \
# --with-icu=yes \
# $(use_enable pam pam-passthru) \
# $(use_enable ldapi) \
# $(use_with sasl sasl yes) \
# $(use_with snmp netsnmp yes) \
emake || die "emake failed"
}
src_install () {
emake DESTDIR="${D}" install || die "emake failed"
# install not installed header
insinto /usr/include/dirsrv
doins ldap/servers/slapd/slapi-plugin.h
# make sure perl scripts have a proper shebang
dosed 's|#{{PERL-EXEC}}|#!/usr/bin/perl|' /usr/share/dirsrv/script-templates/template-*.pl
# remove redhat style init script and install gentoo style
rm -rf "${D}"/etc/rc.d
rm -rf "${D}"/etc/default
newinitd "${FILESDIR}"/dirsrv.initd dirsrv
newconfd "${FILESDIR}"/dirsrv.confd dirsrv
# cope with libraries being in /usr/lib/dirsrv
dodir /etc/env.d
echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv
}

View File

@@ -1,30 +0,0 @@
Index: ldapserver/ldap/admin/src/scripts/DSCreate.pm.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/scripts/DSCreate.pm.in,v
retrieving revision 1.11
diff -u -8 -r1.11 DSCreate.pm.in
--- ldapserver/ldap/admin/src/scripts/DSCreate.pm.in 16 May 2008 16:25:54 -0000 1.11
+++ ldapserver/ldap/admin/src/scripts/DSCreate.pm.in 14 Jul 2008 16:28:33 -0000
@@ -462,18 +462,21 @@
my $inf = shift;
my $istempldif = 0;
# If the user has specified an LDIF file to use to initialize the database,
# load it now
my $ldiffile = $inf->{slapd}->{InstallLdifFile};
if ($ldiffile =~ /none/i) {
debug(1, "No ldif file or org entries specified - no initial database will be created\n");
return ();
- } elsif ($ldiffile && -f $ldiffile) {
+ } elsif ($ldiffile && ($ldiffile !~ /suggest/i)) {
debug(1, "Loading initial ldif file $ldiffile\n");
+ if (! -r $ldiffile) {
+ return ('error_opening_init_ldif', $ldiffile);
+ }
} elsif (($inf->{slapd}->{Suffix} =~ /^(.*?)=/) && $suffixTable{$1}) {
my @errs;
my $template = $inf->{General}->{prefix} . $suffixTable{$1};
my $mapper = new Inf("$inf->{General}->{prefix}@infdir@/dsorgentries.map");
my $dsinf = new Inf("$inf->{General}->{prefix}@infdir@/slapd.inf");
my @rdns = ldap_explode_dn($inf->{slapd}->{Suffix}, 1);
$inf->{slapd}->{naming_value} = $rdns[0];
$mapper = process_maptbl($mapper, \@errs, $inf, $dsinf);

View File

@@ -1,299 +0,0 @@
Index: ldap/servers/slapd/detach.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/detach.c,v
retrieving revision 1.6
diff -u -8 -r1.6 detach.c
--- ldap/servers/slapd/detach.c 10 Nov 2006 23:45:40 -0000 1.6
+++ ldap/servers/slapd/detach.c 2 Apr 2008 23:32:27 -0000
@@ -71,17 +71,18 @@
#include "slap.h"
#include "fe.h"
#if defined(USE_SYSCONF) || defined(LINUX)
#include <unistd.h>
#endif /* USE_SYSCONF */
void
-detach()
+detach( int slapd_exemode, int importexport_encrypt,
+ int s_port, daemon_ports_t *ports_info )
{
#ifndef _WIN32
int i, sd;
char *workingdir = 0;
char *errorlog = 0;
char *ptr = 0;
char errorbuf[BUFSIZ];
extern char *config_get_errorlog(void);
@@ -103,16 +104,22 @@
break;
default:
_exit( 0 );
}
break;
}
+ /* call this right after the fork, but before closing stdin */
+ if (slapd_do_all_nss_ssl_init(slapd_exemode, importexport_encrypt,
+ s_port, ports_info)) {
+ exit(1);
+ }
+
workingdir = config_get_workingdir();
if ( NULL == workingdir ) {
errorlog = config_get_errorlog();
if ( NULL == errorlog ) {
(void) chdir( "/" );
} else {
if ((ptr = strrchr(errorlog, '/')) ||
(ptr = strrchr(errorlog, '\\'))) {
@@ -145,17 +152,22 @@
#else /* USE_SETSID */
if ( (sd = open( "/dev/tty", O_RDWR )) != -1 ) {
(void) ioctl( sd, TIOCNOTTY, NULL );
(void) close( sd );
}
#endif /* USE_SETSID */
g_set_detached(1);
- }
+ } else { /* not detaching - call nss/ssl init */
+ if (slapd_do_all_nss_ssl_init(slapd_exemode, importexport_encrypt,
+ s_port, ports_info)) {
+ exit(1);
+ }
+ }
(void) SIGNAL( SIGPIPE, SIG_IGN );
#endif /* _WIN32 */
}
#ifndef _WIN32
/*
Index: ldap/servers/slapd/main.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/main.c,v
retrieving revision 1.22
diff -u -8 -r1.22 main.c
--- ldap/servers/slapd/main.c 18 Oct 2007 00:08:34 -0000 1.22
+++ ldap/servers/slapd/main.c 2 Apr 2008 23:32:28 -0000
@@ -896,58 +896,24 @@
return_value = main_setuid(slapdFrontendConfig->localuser);
if (0 != return_value) {
LDAPDebug( LDAP_DEBUG_ANY, "Failed to change user and group identity to that of %s\n",
slapdFrontendConfig->localuser, 0, 0 );
exit(1);
}
#endif
- /*
- * Initialise NSS once for the whole slapd process, whether SSL
- * is enabled or not. We use NSS for random number generation and
- * other things even if we are not going to accept SSL connections.
- * We also need NSS for attribute encryption/decryption on import and export.
- */
- init_ssl = ( (slapd_exemode == SLAPD_EXEMODE_SLAPD) || importexport_encrypt)
- && config_get_security()
- && (0 != s_port) && (s_port <= LDAP_PORT_MAX);
- /* As of DS 6.1, always do a full initialization so that other
- * modules can assume NSS is available
- */
- if ( slapd_nss_init((slapd_exemode == SLAPD_EXEMODE_SLAPD),
- (slapd_exemode != SLAPD_EXEMODE_REFERRAL) /* have config? */ )) {
- LDAPDebug(LDAP_DEBUG_ANY,
- "ERROR: NSS Initialization Failed.\n", 0, 0, 0);
- exit (1);
- }
-
- if (slapd_exemode == SLAPD_EXEMODE_SLAPD) {
- client_auth_init();
- }
-
- if ( init_ssl && ( 0 != slapd_ssl_init())) {
- LDAPDebug(LDAP_DEBUG_ANY,
- "ERROR: SSL Initialization Failed.\n", 0, 0, 0 );
- exit( 1 );
- }
-
- if ((slapd_exemode == SLAPD_EXEMODE_SLAPD) ||
- (slapd_exemode == SLAPD_EXEMODE_REFERRAL)) {
- if ( init_ssl ) {
- PRFileDesc **sock;
- for (sock = ports_info.s_socket; sock && *sock; sock++) {
- if ( 0 != slapd_ssl_init2(sock, 0) ) {
- LDAPDebug(LDAP_DEBUG_ANY,
- "ERROR: SSL Initialization phase 2 Failed.\n", 0, 0, 0 );
- exit( 1 );
- }
- }
- }
- }
+ /* Do NSS and/or SSL init for those modes other than listening modes */
+ if ((slapd_exemode != SLAPD_EXEMODE_REFERRAL) &&
+ (slapd_exemode != SLAPD_EXEMODE_SLAPD)) {
+ if (slapd_do_all_nss_ssl_init(slapd_exemode, importexport_encrypt,
+ s_port, &ports_info)) {
+ return 1;
+ }
+ }
/*
* if we were called upon to do special database stuff, do it and be
* done.
*/
switch ( slapd_exemode ) {
case SLAPD_EXEMODE_LDIF2DB:
return slapd_exemode_ldif2db();
@@ -997,17 +963,18 @@
/*
* Detach ourselves from the terminal (unless running in debug mode).
* We must detach before we start any threads since detach forks() on
* UNIX.
* Have to detach after ssl_init - the user may be prompted for the PIN
* on the terminal, so it must be open.
*/
- detach();
+ detach(slapd_exemode, importexport_encrypt,
+ s_port, &ports_info);
/*
* Now write our PID to the startup PID file.
* This is used by the start up script to determine our PID quickly
* after we fork, without needing to wait for the 'real' pid file to be
* written. That could take minutes. And the start script will wait
* that long looking for it. With this new 'early pid' file, it can avoid
* doing that, by detecting the pid and watching for the process exiting.
@@ -2880,8 +2847,72 @@
"values with a + character, e.g., all of the following"
" have the same effect:\n"
" -d connections+filters\n"
" -d 8+32\n"
" -d 40\n" );
}
#endif /* LDAP_DEBUG */
+/*
+ This function does all NSS and SSL related initialization
+ required during startup. We use this function rather
+ than just call this code from main because we must perform
+ all of this initialization after the fork() but before
+ we detach from the controlling terminal. This is because
+ the NSS softokn requires that NSS_Init is called after the
+ fork - this was always the case, but it is a hard error in
+ NSS 3.11.99 and later. We also have to call NSS_Init before
+ doing the detach because NSS may prompt the user for the
+ token (h/w or softokn) password on stdin. So we use this
+ function that we can call from detach() if running in
+ regular slapd exemode or from main() if running in other
+ modes (or just not detaching).
+*/
+int
+slapd_do_all_nss_ssl_init(int slapd_exemode, int importexport_encrypt,
+ int s_port, daemon_ports_t *ports_info)
+{
+ /*
+ * Initialise NSS once for the whole slapd process, whether SSL
+ * is enabled or not. We use NSS for random number generation and
+ * other things even if we are not going to accept SSL connections.
+ * We also need NSS for attribute encryption/decryption on import and export.
+ */
+ int init_ssl = ( (slapd_exemode == SLAPD_EXEMODE_SLAPD) || importexport_encrypt)
+ && config_get_security()
+ && (0 != s_port) && (s_port <= LDAP_PORT_MAX);
+ /* As of DS 6.1, always do a full initialization so that other
+ * modules can assume NSS is available
+ */
+ if ( slapd_nss_init((slapd_exemode == SLAPD_EXEMODE_SLAPD),
+ (slapd_exemode != SLAPD_EXEMODE_REFERRAL) /* have config? */ )) {
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "ERROR: NSS Initialization Failed.\n", 0, 0, 0);
+ exit (1);
+ }
+
+ if (slapd_exemode == SLAPD_EXEMODE_SLAPD) {
+ client_auth_init();
+ }
+
+ if ( init_ssl && ( 0 != slapd_ssl_init())) {
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "ERROR: SSL Initialization Failed.\n", 0, 0, 0 );
+ exit( 1 );
+ }
+
+ if ((slapd_exemode == SLAPD_EXEMODE_SLAPD) ||
+ (slapd_exemode == SLAPD_EXEMODE_REFERRAL)) {
+ if ( init_ssl ) {
+ PRFileDesc **sock;
+ for (sock = ports_info->s_socket; sock && *sock; sock++) {
+ if ( 0 != slapd_ssl_init2(sock, 0) ) {
+ LDAPDebug(LDAP_DEBUG_ANY,
+ "ERROR: SSL Initialization phase 2 Failed.\n", 0, 0, 0 );
+ exit( 1 );
+ }
+ }
+ }
+ }
+
+ return 0;
+}
Index: ldap/servers/slapd/proto-slap.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/slapd/proto-slap.h,v
retrieving revision 1.31
diff -u -8 -r1.31 proto-slap.h
--- ldap/servers/slapd/proto-slap.h 18 Oct 2007 01:22:29 -0000 1.31
+++ ldap/servers/slapd/proto-slap.h 2 Apr 2008 23:32:28 -0000
@@ -478,17 +478,18 @@
* delete.c
*/
void do_delete( Slapi_PBlock *pb );
/*
* detach.c
*/
-void detach( void );
+void detach( int slapd_exemode, int importexport_encrypt,
+ int s_port, daemon_ports_t *ports_info );
#ifndef _WIN32
void close_all_files( void );
#endif
void raise_process_limits( void );
/*
* dn.c
@@ -874,17 +875,16 @@
int slapd_sasl_ext_client_bind( LDAP* ld, int **msgid);
int slapd_nss_init(int init_ssl, int config_available);
int slapd_ssl_init();
int slapd_ssl_init2(PRFileDesc **fd, int startTLS);
int slapd_security_library_is_initialized();
int slapd_ssl_listener_is_initialized();
int sasl_io_cleanup(Connection *c);
-
/*
* security_wrappers.c
*/
int slapd_ssl_handshakeCallback(PRFileDesc *fd, void * callback, void * client_data);
int slapd_ssl_badCertHook(PRFileDesc *fd, void * callback, void * client_data);
CERTCertificate * slapd_ssl_peerCertificate(PRFileDesc *fd);
SECStatus slapd_ssl_getChannelInfo(PRFileDesc *fd, SSLChannelInfo *sinfo, PRUintn len);
SECStatus slapd_ssl_getCipherSuiteInfo(PRUint16 ciphersuite, SSLCipherSuiteInfo *cinfo, PRUintn len);
@@ -1272,9 +1272,12 @@
#endif
/*
* main.c
*/
#if ( defined( hpux ) || defined( irix ))
void signal2sigaction( int s, void *a );
#endif
+int slapd_do_all_nss_ssl_init(int slapd_exemode, int importexport_encrypt,
+ int s_port, daemon_ports_t *ports_info);
+
#endif /* _PROTO_SLAP */

View File

@@ -1,2 +0,0 @@
# the instances that have been configured with setup-ds.pl
INSTANCES=""

View File

@@ -1,111 +0,0 @@
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
exec="/usr/sbin/ns-slapd"
# PID directory
piddir="/var/run/dirsrv"
# Instance basedir
instbase="/etc/dirsrv"
# Empty Instances List
FDSINSTANCES=""
depend() {
need net
use dns
}
checkconfig() {
if [ -z "$INSTANCES" ] ; then
eerror "Fedora Directory Server has not been configured."
eend 1
return 1
elif [ -n "$INSTANCES" ] ; then
for INST in $INSTANCES ; do
if [ ! -d "$instbase/slapd-$INST" ] ; then
eerror "Instance $INST has not been configured."
eend 1
return 1
fi
done
fi
}
start() {
checkconfig || return 1
for inst in $INSTANCES ; do
if [ -d "$instbase/slapd-$INST" ] ; then
FDSINSTANCES="$FDSINSTANCES $inst"
fi
done
einfo "Starting Fedora DS"
eend 0
for instance in $FDSINSTANCES ; do
ebegin "Starting Instance $instance"
start-stop-daemon --start --quiet -m \
--pidfile $piddir/slapd-$instance.startpid \
--exec $exec -- -D $instbase/slapd-$instance \
-i $piddir/slapd-$instance.pid -w $piddir/slapd-$instance.startpid
eend $?
done
sleep 5
status || return 1
}
stop() {
checkconfig || return 1
for inst in $INSTANCES ; do
if [ -d "$instbase/slapd-$INST" ] ; then
FDSINSTANCES="$FDSINSTANCES $inst"
fi
done
einfo "Stopping Fedora DS"
eend 0
for instance in $FDSINSTANCES ; do
ebegin "Stopping Instance $instance"
start-stop-daemon --stop --quiet \
--pidfile $piddir/slapd-$instance.pid \
--exec $exec
eend $?
done
}
restart() {
svc_stop
svc_start
}
status() {
for instance in $INSTANCES; do
if [ -e $piddir/slapd-$instance.pid ]; then
pid=$(cat $piddir/slapd-$instance.pid)
if [ $(echo "$pid" | grep -c $pid) -ge 1 ]; then
einfo "$prog $instance (pid $pid) is running..."
else
ewarn "$prog $instance dead but pid file exists"
fi
else
eerror "$prog $instance is stopped"
fi
done
}
#if [ -n "$2" ]; then
# for I in $INSTANCES; do
# if [ "$2" = "$I" ]; then
# INSTANCES="$2"
# fi
# done
# if [ "$2" != "$INSTANCES" ]; then
# echo -n "$2 is an invalid fedora-ds instance"
# failure; echo
# exit 1
# fi
#fi

View File

@@ -1,13 +0,0 @@
#!/bin/bash
DATE=`date +%Y%m%d`
CVSTAG=FedoraDirSvr110b1
VERSION=1.1.0
PKGNAME=fedora-ds
export CVSROOT=:pserver:anonymous@cvs.fedora.redhat.com:/cvs/dirsec
cvs -d "$CVSROOT" -z3 export -r$CVSTAG -d $PKGNAME-$VERSION-pre$DATE ldapserver
tar -cjf $PKGNAME-$VERSION-pre$DATE.tar.bz2 $PKGNAME-$VERSION-pre$DATE
rm -rf $PKGNAME-$VERSION-pre$DATE

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>maintainer-wanted</herd>
</pkgmetadata>