summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Erculiani <lxnay@gentoo.org>2010-07-11 09:57:25 +0000
committerFabio Erculiani <lxnay@gentoo.org>2010-07-11 09:57:25 +0000
commit34d0976d6023392b0983153e47d58908b4a2ccaa (patch)
tree760d02a12ce30858fc483ee31e491df582ba7283 /net-nds/389-admin/files
parentMigrate to xorg-2 eclass. (diff)
downloadgentoo-2-34d0976d6023392b0983153e47d58908b4a2ccaa.tar.gz
gentoo-2-34d0976d6023392b0983153e47d58908b4a2ccaa.tar.bz2
gentoo-2-34d0976d6023392b0983153e47d58908b4a2ccaa.zip
new ebuild, part of 389 Directory Server (http://port389.org), closes bug #309575
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-nds/389-admin/files')
-rw-r--r--net-nds/389-admin/files/1.1.11_rc1/0001-gentoo-apache-names.patch18
-rw-r--r--net-nds/389-admin/files/1.1.11_rc1/0003-find-mod_nss.m4.patch11
-rw-r--r--net-nds/389-admin/files/1.1.11_rc1/0004-rpath-fix.configure.ac.patch19
-rw-r--r--net-nds/389-admin/files/1.1.11_rc1/0010-gentoo_selinux_makefile.patch11
-rw-r--r--net-nds/389-admin/files/1.1.11_rc1/48_mod_admserv.conf3
-rw-r--r--net-nds/389-admin/files/1.1.11_rc1/48_mod_restartd.conf5
-rw-r--r--net-nds/389-admin/files/389-admin-cfgstuff-1.patch56
-rw-r--r--net-nds/389-admin/files/389-admin.confd73
-rw-r--r--net-nds/389-admin/files/389-admin.initd163
-rw-r--r--net-nds/389-admin/files/restart-ds-admin7
-rw-r--r--net-nds/389-admin/files/start-ds-admin7
-rw-r--r--net-nds/389-admin/files/stop-ds-admin7
12 files changed, 380 insertions, 0 deletions
diff --git a/net-nds/389-admin/files/1.1.11_rc1/0001-gentoo-apache-names.patch b/net-nds/389-admin/files/1.1.11_rc1/0001-gentoo-apache-names.patch
new file mode 100644
index 000000000000..9f145d959894
--- /dev/null
+++ b/net-nds/389-admin/files/1.1.11_rc1/0001-gentoo-apache-names.patch
@@ -0,0 +1,18 @@
+diff -ur m4.orig/httpd.m4 m4/httpd.m4
+--- m4.orig/httpd.m4 2009-10-25 14:10:24.398721002 +0200
++++ m4/httpd.m4 2009-10-25 14:12:54.463219758 +0200
+@@ -58,12 +58,12 @@
+ *) APACHE22= ;;
+ esac
+
+-httpdconf=${httpd_root}/${httpd_conf_rel}
++httpdconf=/etc/apache2/httpd.conf
+
+ mimemagic=`grep MIMEMagicFile $httpdconf|grep -v \^# | awk '{print $2}'`
+ if test ! -f "$mimemagic" ; then
+ # assume relative to root
+- mimemagic=${httpd_root}/${mimemagic}
++ mimemagic=/etc/apache2/magic
+ fi
+
+ # check for mime.types file
diff --git a/net-nds/389-admin/files/1.1.11_rc1/0003-find-mod_nss.m4.patch b/net-nds/389-admin/files/1.1.11_rc1/0003-find-mod_nss.m4.patch
new file mode 100644
index 000000000000..5a15e1dbf606
--- /dev/null
+++ b/net-nds/389-admin/files/1.1.11_rc1/0003-find-mod_nss.m4.patch
@@ -0,0 +1,11 @@
+--- m4/mod_nss.m4.orig 2010-01-14 23:05:29.000000000 +0200
++++ m4/mod_nss.m4 2010-01-24 20:58:47.086937825 +0200
+@@ -52,7 +52,7 @@
+
+ # else, parse httpd.conf or httpconfdir/nss.conf
+ if test -z "$modnssbindir" ; then
+- nsspcache=`grep NSSPassPhraseHelper $httpdconf|awk '{print $2}'`
++ nsspcache=`grep -R NSSPassPhraseHelper /etc/apache2/* |awk '{print $2}'`
+ if test -z "$nsspcache" ; then
+ nsspcache=`grep NSSPassPhraseHelper $httpd_root/conf.d/* | awk '{print $2}'`
+ fi
diff --git a/net-nds/389-admin/files/1.1.11_rc1/0004-rpath-fix.configure.ac.patch b/net-nds/389-admin/files/1.1.11_rc1/0004-rpath-fix.configure.ac.patch
new file mode 100644
index 000000000000..d74c345363f1
--- /dev/null
+++ b/net-nds/389-admin/files/1.1.11_rc1/0004-rpath-fix.configure.ac.patch
@@ -0,0 +1,19 @@
+--- configure.ac.orig 2010-01-25 01:34:58.296824267 +0200
++++ configure.ac 2010-01-25 01:36:16.101825667 +0200
+@@ -433,13 +433,10 @@
+
+ if test "$enable_rpath" != "yes" ; then
+ AC_MSG_NOTICE([Fixing libtool to remove automatic rpath to $libdir . . .])
+- cp -p libtool libtool.orig
+- cp -p libtool libtool.tmp
++ cp -p ./libtool libtool.orig
++ cp -p ./libtool libtool.tmp
+ sed -e '/^runpath_var/ d' \
+- -e '/^hardcode_libdir_flag_spec/ d' \
+- libtool > libtool.tmp
+- cp -p libtool.tmp libtool
+- rm -f libtool.tmp
++ -e '/^hardcode_libdir_flag_spec/ d' -i ./libtool
+ fi
+
+ AC_CONFIG_FILES([Makefile])
diff --git a/net-nds/389-admin/files/1.1.11_rc1/0010-gentoo_selinux_makefile.patch b/net-nds/389-admin/files/1.1.11_rc1/0010-gentoo_selinux_makefile.patch
new file mode 100644
index 000000000000..f7856efce231
--- /dev/null
+++ b/net-nds/389-admin/files/1.1.11_rc1/0010-gentoo_selinux_makefile.patch
@@ -0,0 +1,11 @@
+--- m4.orig/selinux.m4 2010-03-11 23:18:19.697503404 +0200
++++ m4/selinux.m4 2010-03-11 23:19:04.653503112 +0200
+@@ -27,7 +27,7 @@
+ with_selinux=yes
+ AC_MSG_RESULT(yes)
+ AC_SUBST(with_selinux)
+- if test ! -f "/usr/share/selinux/devel/Makefile"; then
++ if test ! -f "/usr/share/selinux/targeted/include/Makefile"; then
+ AC_MSG_ERROR([SELinux development tools (selinux-policy) not found])
+ fi
+ ],
diff --git a/net-nds/389-admin/files/1.1.11_rc1/48_mod_admserv.conf b/net-nds/389-admin/files/1.1.11_rc1/48_mod_admserv.conf
new file mode 100644
index 000000000000..4a3f296f48e5
--- /dev/null
+++ b/net-nds/389-admin/files/1.1.11_rc1/48_mod_admserv.conf
@@ -0,0 +1,3 @@
+<IfDefine ADMSERV>
+ LoadModule mod_admserv modules/mod_admserv.so
+</IfDefine ADMSERV>
diff --git a/net-nds/389-admin/files/1.1.11_rc1/48_mod_restartd.conf b/net-nds/389-admin/files/1.1.11_rc1/48_mod_restartd.conf
new file mode 100644
index 000000000000..1d0d2f37825d
--- /dev/null
+++ b/net-nds/389-admin/files/1.1.11_rc1/48_mod_restartd.conf
@@ -0,0 +1,5 @@
+<IfDefine RESTARTD>
+ <IfModule !mod_restartd.c>
+ LoadModule restartd_module modules/mod_restartd.so
+ </IfModule>
+</IfDefine>
diff --git a/net-nds/389-admin/files/389-admin-cfgstuff-1.patch b/net-nds/389-admin/files/389-admin-cfgstuff-1.patch
new file mode 100644
index 000000000000..783f4772f7f1
--- /dev/null
+++ b/net-nds/389-admin/files/389-admin-cfgstuff-1.patch
@@ -0,0 +1,56 @@
+--- 389-admin-1.1.11.rc1.orig/admserv/cfgstuff/httpd-2.2.conf.in
++++ 389-admin-1.1.11.rc1/admserv/cfgstuff/httpd-2.2.conf.in
+@@ -143,7 +143,7 @@ LoadModule file_cache_module @moddir@/mo
+ 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 nss_module @moddir@/mod_nss.so
+ LoadModule admserv_module @admmoddir@/mod_admserv.so
+
+ ### Section 2: 'Main' server configuration
+@@ -389,15 +389,7 @@ ServerSignature On
+ # Alias.
+ #
+
+-<IfModule mod_cgid.c>
+-#
+-# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
+-# for setting UNIX socket for communicating with cgid.
+-#
+-Scriptsock @piddir@/admin-serv.cgisock
+-</IfModule>
+-
+-# and this one is for mod_restartd because mod_cgid will consume the other one
++# Setup mod_admserv socket handle
+ Scriptsock @piddir@/admin-serv.cgisock
+
+ #
+--- 389-admin-1.1.11.rc1.orig/admserv/cfgstuff/httpd.conf.in
++++ 389-admin-1.1.11.rc1/admserv/cfgstuff/httpd.conf.in
+@@ -142,7 +142,7 @@ LoadModule file_cache_module @moddir@/mo
+ 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 nss_module @moddir@/mod_nss.so
+ LoadModule admserv_module @admmoddir@/mod_admserv.so
+
+ ### Section 2: 'Main' server configuration
+@@ -388,15 +388,7 @@ ServerSignature On
+ # Alias.
+ #
+
+-<IfModule mod_cgid.c>
+-#
+-# Additional to mod_cgid.c settings, mod_cgid has Scriptsock <path>
+-# for setting UNIX socket for communicating with cgid.
+-#
+-Scriptsock @piddir@/admin-serv.cgisock
+-</IfModule>
+-
+-# and this one is for mod_restartd because mod_cgid will consume the other one
++# Setup mod_admserv socket handle
+ Scriptsock @piddir@/admin-serv.cgisock
+
+ #
diff --git a/net-nds/389-admin/files/389-admin.confd b/net-nds/389-admin/files/389-admin.confd
new file mode 100644
index 000000000000..8f134a4a2e76
--- /dev/null
+++ b/net-nds/389-admin/files/389-admin.confd
@@ -0,0 +1,73 @@
+# /etc/conf.d/389-admin: config file for /etc/init.d/389-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 -D SUEXEC"
+
+# 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"
diff --git a/net-nds/389-admin/files/389-admin.initd b/net-nds/389-admin/files/389-admin.initd
new file mode 100644
index 000000000000..965420f9f0b7
--- /dev/null
+++ b/net-nds/389-admin/files/389-admin.initd
@@ -0,0 +1,163 @@
+#!/sbin/runscript
+# Copyright 1999-2010 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
+ before 389-admin
+}
+
+configtest() {
+ ebegin "Checking Apache Configuration of 389 Directory Server Admin"
+ 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 "389 Directory Server Admin (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 389 Directory Server Admin (apache2)"
+ ${APACHE2} ${APACHE2_OPTS} -k start
+ [ "${?}" != "0" ] && eend "${?}" && return 1
+
+ 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 389 Directory Server Admin (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 389 Directory Server Admin (apache2)"
+ ${APACHE2} ${APACHE2_OPTS} -k restart
+ eend ${?}
+ elif [ "${RELOAD_TYPE}" = "graceful" ]; then
+ ebegin "Gracefully restarting 389 Directory Server Admin (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 389 Directory Server Admin (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 389 Directory Server Admin (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"
+ 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
+}
diff --git a/net-nds/389-admin/files/restart-ds-admin b/net-nds/389-admin/files/restart-ds-admin
new file mode 100644
index 000000000000..1f0cb71769d2
--- /dev/null
+++ b/net-nds/389-admin/files/restart-ds-admin
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# Copyright (c) 2007-2009, Mario Fetka <mario-fetka@gmx.at>
+#
+# Licensed under the GNU General Public License, v2
+
+rc-config restart 389-admin
diff --git a/net-nds/389-admin/files/start-ds-admin b/net-nds/389-admin/files/start-ds-admin
new file mode 100644
index 000000000000..1131e1d41880
--- /dev/null
+++ b/net-nds/389-admin/files/start-ds-admin
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# Copyright (c) 2007-2009, Mario Fetka <mario-fetka@gmx.at>
+#
+# Licensed under the GNU General Public License, v2
+
+rc-config start 389-admin
diff --git a/net-nds/389-admin/files/stop-ds-admin b/net-nds/389-admin/files/stop-ds-admin
new file mode 100644
index 000000000000..31f841f5e932
--- /dev/null
+++ b/net-nds/389-admin/files/stop-ds-admin
@@ -0,0 +1,7 @@
+#!/bin/sh
+#
+# Copyright (c) 2007-2009, Mario Fetka <mario-fetka@gmx.at>
+#
+# Licensed under the GNU General Public License, v2
+
+rc-config stop 389-admin