diff options
author | Fabio Erculiani <lxnay@gentoo.org> | 2010-07-11 09:57:25 +0000 |
---|---|---|
committer | Fabio Erculiani <lxnay@gentoo.org> | 2010-07-11 09:57:25 +0000 |
commit | f5e438cb1fd70ecb5e54fabeb0c6ea7a0aa691a1 (patch) | |
tree | f01f137a808864f7a159b2896923ddca4fa73377 /net-nds/389-admin | |
parent | Migrate to xorg-2 eclass. (diff) | |
download | historical-f5e438cb1fd70ecb5e54fabeb0c6ea7a0aa691a1.tar.gz historical-f5e438cb1fd70ecb5e54fabeb0c6ea7a0aa691a1.tar.bz2 historical-f5e438cb1fd70ecb5e54fabeb0c6ea7a0aa691a1.zip |
new ebuild, part of 389 Directory Server (http://port389.org), closes bug #309575
Package-Manager: portage-2.2_rc67/cvs/Linux x86_64
Diffstat (limited to 'net-nds/389-admin')
-rw-r--r-- | net-nds/389-admin/389-admin-1.1.11_rc1.ebuild | 168 | ||||
-rw-r--r-- | net-nds/389-admin/ChangeLog | 20 | ||||
-rw-r--r-- | net-nds/389-admin/Manifest | 16 | ||||
-rw-r--r-- | net-nds/389-admin/files/1.1.11_rc1/0001-gentoo-apache-names.patch | 18 | ||||
-rw-r--r-- | net-nds/389-admin/files/1.1.11_rc1/0003-find-mod_nss.m4.patch | 11 | ||||
-rw-r--r-- | net-nds/389-admin/files/1.1.11_rc1/0004-rpath-fix.configure.ac.patch | 19 | ||||
-rw-r--r-- | net-nds/389-admin/files/1.1.11_rc1/0010-gentoo_selinux_makefile.patch | 11 | ||||
-rw-r--r-- | net-nds/389-admin/files/1.1.11_rc1/48_mod_admserv.conf | 3 | ||||
-rw-r--r-- | net-nds/389-admin/files/1.1.11_rc1/48_mod_restartd.conf | 5 | ||||
-rw-r--r-- | net-nds/389-admin/files/389-admin-cfgstuff-1.patch | 56 | ||||
-rw-r--r-- | net-nds/389-admin/files/389-admin.confd | 73 | ||||
-rw-r--r-- | net-nds/389-admin/files/389-admin.initd | 163 | ||||
-rw-r--r-- | net-nds/389-admin/files/restart-ds-admin | 7 | ||||
-rw-r--r-- | net-nds/389-admin/files/start-ds-admin | 7 | ||||
-rw-r--r-- | net-nds/389-admin/files/stop-ds-admin | 7 | ||||
-rw-r--r-- | net-nds/389-admin/metadata.xml | 10 |
16 files changed, 594 insertions, 0 deletions
diff --git a/net-nds/389-admin/389-admin-1.1.11_rc1.ebuild b/net-nds/389-admin/389-admin-1.1.11_rc1.ebuild new file mode 100644 index 000000000000..4c0a3fe4572b --- /dev/null +++ b/net-nds/389-admin/389-admin-1.1.11_rc1.ebuild @@ -0,0 +1,168 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-nds/389-admin/389-admin-1.1.11_rc1.ebuild,v 1.1 2010/07/11 09:57:25 lxnay Exp $ + +EAPI="2" + +WANT_AUTOMAKE="1.9" + +MY_PV=${PV/_rc/.rc} +MY_PV=${MY_PV/_a/.a} + +inherit eutils multilib autotools depend.apache + +DESCRIPTION="389 Directory Server (admin)" +HOMEPAGE="http://port389.org/" +SRC_URI="http://directory.fedoraproject.org/sources/${PN}-${MY_PV}.tar.bz2" + +LICENSE="GPL-2 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug ipv6 selinux" + +# TODO snmp agent init script + +RDEPEND=">=app-admin/389-admin-console-1.1.0 + >=app-admin/389-ds-console-1.1.0 + app-misc/mime-types + dev-libs/389-adminutil + dev-libs/cyrus-sasl + dev-libs/icu + dev-libs/mozldap + dev-libs/nss[utils] + || ( <=dev-libs/nspr-4.8.3-r3[ipv6?] >=dev-libs/nspr-4.8.4 ) + dev-libs/svrcore + net-analyzer/net-snmp[ipv6?] + selinux? ( + sys-apps/checkpolicy + sys-apps/policycoreutils + sec-policy/selinux-base-policy + ) + >=sys-libs/db-4.2.52 + sys-libs/pam + sys-apps/tcp-wrappers[ipv6?] + www-apache/mod_nss + www-client/lynx + www-servers/apache:2[apache2_modules_actions,apache2_modules_alias] + www-servers/apache:2[apache2_modules_auth_basic,apache2_modules_authz_default] + www-servers/apache:2[apache2_modules_cgi,apache2_modules_mime_magic,apache2_modules_rewrite] + www-servers/apache:2[apache2_modules_setenvif,suexec,threads]" + +DEPEND="sys-apps/sed ${RDEPEND}" + +S="${WORKDIR}/${PN}-${MY_PV}" + +need_apache2_2 + +src_prepare() { + # as per 389 documentation, when 64bit, export USE_64 + use amd64 && export USE_64=1 + + epatch "${FILESDIR}/${PV}/"*.patch + # Configuration fixes + epatch "${FILESDIR}/${PN}-cfgstuff-1.patch" + + sed -e "s!SUBDIRS!# SUBDIRS!g" -i Makefile.am || die "sed failed" + # Setup default user/group, in this case it's dirsrv + sed -e "s!nobody!dirsrv!g" -i configure.ac || die "sed failed" + + eautoreconf +} + +src_configure() { + # stub autoconf triplet :( + local myconf="" + use debug && myconf="--enable-debug" + use selinux && myconf="${myconf} --with-selinux" + + econf \ + --enable-threading \ + --disable-rpath \ + --with-fhs \ + --with-apr-config \ + --with-apxs=${APXS} \ + --with-httpd=${APACHE_BIN} \ + ${myconf} || die "econf failed" +} + +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}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + + # remove redhat style wrapper scripts + # and install gentoo scripts. + rm -rf "${D}"/usr/sbin/*-ds-admin + dosbin "${FILESDIR}"/*-ds-admin || die "cannot install gentoo start/stop scripts" + + # In this version build systems for modules is delete :( + # manually install modules, not using apache-modules eclass + # because use bindled library + + # install mod_admserv + exeinto "${APACHE_MODULESDIR}" + doexe "${S}/.libs"/mod_admserv.so || die "internal ebuild error: mod_admserv not found" + + insinto "${APACHE_MODULES_CONFDIR}" + newins "${FILESDIR}/${PV}"/48_mod_admserv.conf 48_mod_admserv \ + || die "internal ebuild error: 48_mod_admserv.conf not found" + + # install mod_restard + exeinto "${APACHE_MODULESDIR}" + doexe "${S}/.libs"/mod_restartd.so || die "internal ebuild error: mod_restartd not found" + + insinto "${APACHE_MODULES_CONFDIR}" + newins "${FILESDIR}/${PV}"/48_mod_restartd.conf 48_mod_restartd \ + || die "internal ebuild error: 48_mod_restard.conf not found" + + if use selinux; then + local POLICY_TYPES="targeted" + cd "${S}"/selinux-build + cp /usr/share/selinux/${POLICY_TYPES}/include/Makefile . + make || die "selinux policy compile failed" + insinto /usr/share/selinux/${POLICY_TYPES} + doins -r "${S}/selinux-build/"*.pp + fi + +} + +pkg_postinst() { + + # show setup information + elog "Once you configured www-servers/apache as written above," + elog "you need to run (as root): /usr/sbin/setup-ds-admin.pl" + elog + + # show security and sysctl info + elog "It is recommended to setup net.ipv4.tcp_keep_alive_time" + elog "in /etc/sysctl.conf (or via sysctl -w && sysctl -p) to a reasonable" + elog "value (in milliseconds) to avoid temporary server congestions" + elog "from lost client connections" + elog + + # /etc/security/limits.conf settings + elog "It is also recommended to fine tune the maximum open files" + elog "settings inside /etc/security/limits.conf:" + elog "* soft nofile 2048" + elog "* hard nofile 4096" + elog + + elog "To start 389 Directory Server Administration Interface at boot" + elog "please add 389-admin service to the default runlevel:" + elog + elog " rc-update add 389-admin default" + elog + + elog "for 389 Directory Server Admin interface to work, you need" + elog "to setup a FQDN hostname and use it while running /usr/sbin/setup-ds-admin.pl" + elog + +} diff --git a/net-nds/389-admin/ChangeLog b/net-nds/389-admin/ChangeLog new file mode 100644 index 000000000000..7984bf919dab --- /dev/null +++ b/net-nds/389-admin/ChangeLog @@ -0,0 +1,20 @@ +# ChangeLog for net-nds/389-admin +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-nds/389-admin/ChangeLog,v 1.1 2010/07/11 09:57:25 lxnay Exp $ + +*389-admin-1.1.11_rc1 (11 Jul 2010) + + 11 Jul 2010; Fabio Erculiani <lxnay@gentoo.org> + +files/389-admin-cfgstuff-1.patch, + +files/1.1.11_rc1/0001-gentoo-apache-names.patch, + +files/1.1.11_rc1/0003-find-mod_nss.m4.patch, + +files/1.1.11_rc1/0004-rpath-fix.configure.ac.patch, + +files/1.1.11_rc1/0010-gentoo_selinux_makefile.patch, + +files/1.1.11_rc1/48_mod_admserv.conf, + +files/1.1.11_rc1/48_mod_restartd.conf, +files/389-admin.confd, + +files/389-admin.initd, +389-admin-1.1.11_rc1.ebuild, + +files/restart-ds-admin, +files/start-ds-admin, +files/stop-ds-admin, + +metadata.xml: + new ebuild, part of 389 Directory Server (http://port389.org), closes bug + #309575 + diff --git a/net-nds/389-admin/Manifest b/net-nds/389-admin/Manifest new file mode 100644 index 000000000000..b9fc94adb364 --- /dev/null +++ b/net-nds/389-admin/Manifest @@ -0,0 +1,16 @@ +AUX 1.1.11_rc1/0001-gentoo-apache-names.patch 523 RMD160 08927556b054e031dc78f5e4e920a7b4e8f64c3c SHA1 6290294a583f43ac2e20f2e5fdb41435768fcbb3 SHA256 3f6a5375eacd26e0930fda25c78ca8effcc563758b490ae316a2e668b2a87cd1 +AUX 1.1.11_rc1/0003-find-mod_nss.m4.patch 496 RMD160 49ccbb6cc8ca7e25d454fd8c6167bd8d704a32f7 SHA1 e7bc9742b1dcd8f62a20e5bd27a51bc2707d4dcf SHA256 89d9f97f08b3ca8bd82273ee439ef7b22d6dcd46e90e793a3b5b4c91df50a63f +AUX 1.1.11_rc1/0004-rpath-fix.configure.ac.patch 633 RMD160 369fcbdc4ac78e97657a94e8a75a559680d6c3e4 SHA1 e2302b39fd13603d3c3d10196c0a2e723b408628 SHA256 74b6279e52377911bbc8e9298241d88e9314f4be913b2c563d1f996f30e415b1 +AUX 1.1.11_rc1/0010-gentoo_selinux_makefile.patch 410 RMD160 740270c1331e29ac752b3ec83539032d3f88dc45 SHA1 3ee1abf259af424a5b6b2573e145b2d321bbf40c SHA256 c0102c8c33a482782005de62cc1f2b0a7c30e8985d4803a097a593f9bbaa71aa +AUX 1.1.11_rc1/48_mod_admserv.conf 87 RMD160 ccd49a802e45a0300867438651f7782861f92a3f SHA1 002a39651cc2f4ce9364b06620c1fa8a69887ff6 SHA256 99b42c7de91de448b5974360820c27f89a641ff59e6bdac46595ca8043058f84 +AUX 1.1.11_rc1/48_mod_restartd.conf 126 RMD160 c60b0d5ab784508f670ded3015e1a7bcfd0a7209 SHA1 e3d842b3f358116c10f01987ecc89d05ac06549f SHA256 48561ef7da874d08bab5e97b1eecdda77680d1b9e417507da1afa3c62fbcc958 +AUX 389-admin-cfgstuff-1.patch 2035 RMD160 75f4bb6ebaa0aeb7da954dcb3b66e920c9274ccf SHA1 fc46e58875fc64cd1fa0c9c72c8078e0a99e0316 SHA256 baa2f8c5f7d9e62d9c983edcac2620b2bc480ba4004eee2559740dfb3ffcd9c6 +AUX 389-admin.confd 3083 RMD160 0b897c6b0593ec4ba2b30e4b4181215bd32ae461 SHA1 d190753070fc63520e611e5c0a306a4f563fd342 SHA256 c70ca2808bd07d31bd6b25103fb54234ec4f7c714c31d4350e9c91dee41be9f2 +AUX 389-admin.initd 3870 RMD160 d75ba700c97235b68ea07e47aaeda43e9a2cf32c SHA1 36eaee292dabf0d34ac42f0d4870eaaa110d0d14 SHA256 4c11ec0565e85b2095841dedec57ef0ccc21d753a07917d2fd6634695c077452 +AUX restart-ds-admin 155 RMD160 5b0323ca05f75e08c043fbb4f6221e6688d4f24c SHA1 f2cc95327604e873bf00a0cb798de9f82303dbc6 SHA256 264a25107a7ea7ae0abf576a73acb8996a5449bf13d59f29282914bcc8ae0eea +AUX start-ds-admin 153 RMD160 b77b3e0a6d4658869e0cbf1d001e480c3141b14a SHA1 686d2748d781301dfc2f83b373efda9fbcbc253e SHA256 c4df46c6041fb11d0069ee2837361c12a05b349ac259bb9c29fa0b389de416ec +AUX stop-ds-admin 152 RMD160 64e8627ceed23664432ced3311442c9088ded19e SHA1 101045da509e09a3f84f8cbdc41a6dd3dd6d37f3 SHA256 4e7ecdeb64807b8ce0b2da4dca8c1bb9511c8babbfe8d7ae1c9e63f490070685 +DIST 389-admin-1.1.11.rc1.tar.bz2 657171 RMD160 0bc411e0d0ed944be68f69d79378c980c54d9f22 SHA1 1e48f1f8a742476ffb2560802b3fc8c230f5db0c SHA256 8712d7a5b0ca721470a65585f359cfe4fa923996478228781393375e0d4d197e +EBUILD 389-admin-1.1.11_rc1.ebuild 4858 RMD160 4c76c747e9e09e773f9c53c20f83c5786749c452 SHA1 dff2b9e762ac1a52906e8d5313281148566fc3f9 SHA256 0cba31ebd2e3d290efd6edafe367177f6890ac46b591b55c4d02ccf0c9b0bcd8 +MISC ChangeLog 880 RMD160 e143b17226a7bcd43680df3329f997e75c524a1f SHA1 67740b30a8015f4b527c302513d61e222783b8bf SHA256 3544fc7621245ea56f795f9584d3631fae991960d517f4f63200cf6f5822a091 +MISC metadata.xml 476 RMD160 51ca8a6b8c749e2c263e00ddd93e20dfb899d7a7 SHA1 b1bed78f43bcf6eff73133b0ba0101f68cfa7997 SHA256 3bae7b14a10aaff31d6ec0ac7bd09091aec3a5d03eb41187fb6e9250096a2c9d 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 diff --git a/net-nds/389-admin/metadata.xml b/net-nds/389-admin/metadata.xml new file mode 100644 index 000000000000..eb5952259fad --- /dev/null +++ b/net-nds/389-admin/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>maintainer-wanted</herd> +<longdescription> +389 Administration Server is an HTTP agent that provides management features +for 389 Directory Server. It provides some management web apps that can +be used through a web browser. It provides the authentication, access control, +and CGI utilities used by the console.</longdescription> +</pkgmetadata> |