net-nds/fedora-ds-base: repoman cleanup & new init script with spawn process check

git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@438 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
geos_one 2008-07-31 19:21:08 +00:00
parent 67a7790dcc
commit 339797de35
5 changed files with 132 additions and 43 deletions

View File

@ -2,6 +2,10 @@
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $ # $Header: $
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: 20 Jun 2008; Mario Fetka <mario-fetka@gmx.at> fedora-ds-base-1.1.0.ebuild:
gcc 4.3 hack gcc 4.3 hack

View File

@ -1,9 +1,9 @@
AUX dirsrv.confd 72 RMD160 d5478a77018aeb727ba72217d3e67af3dcd669c9 SHA1 006d238cd3fd31b9019a2a1e5bff250192b05a91 SHA256 62d68e8ab4b2b1342a3418e6b067a99345a2806ec1575f6d49cd6c0d1cbb17bc AUX dirsrv.confd 72 RMD160 d5478a77018aeb727ba72217d3e67af3dcd669c9 SHA1 006d238cd3fd31b9019a2a1e5bff250192b05a91 SHA256 62d68e8ab4b2b1342a3418e6b067a99345a2806ec1575f6d49cd6c0d1cbb17bc
AUX dirsrv.initd 2382 RMD160 9cd3beda5aa05c8db9c9146ed088b22b85c10aba SHA1 5f3555c20c889fd6466ab8a77f686aa6ccaf3ad7 SHA256 8e060936368a9e996ecdc2d46c439906fe8030819e78a8864b9444c6b4d3920d AUX dirsrv.initd 2422 RMD160 f90db40234c6177c2e7b23999786f775fb62fa6e SHA1 36c29829002f91aa9e43d20bfc22dab443791c75 SHA256 8cd646015bd5bd4ea5a50fc5781200b1f287bc48a3892af4e1aea0c3c904c859
AUX fedora-ds-cvs.sh 346 RMD160 d9659f0aa8559c59865f42e16bc611a57a63d893 SHA1 8069aeee78a5fd614f19f3438c9f3dada700e944 SHA256 f2e453b1139b010ceae3dee2c0292e616a67ec55046e759b90c1104721ad412a AUX fedora-ds-cvs.sh 346 RMD160 d9659f0aa8559c59865f42e16bc611a57a63d893 SHA1 8069aeee78a5fd614f19f3438c9f3dada700e944 SHA256 f2e453b1139b010ceae3dee2c0292e616a67ec55046e759b90c1104721ad412a
DIST fedora-ds-base-1.1.0.tar.bz2 2596436 RMD160 4680a729cfdbd762e8fa8e348709e01916340854 SHA1 5ed43a030600ca2cf749c2f9f25c18c72f0a935e SHA256 9e6fc529d335d2ffd10bdd49e40bcf9c002fe6034c644a002aa0511dcc76ac70 DIST fedora-ds-base-1.1.0.tar.bz2 2596436 RMD160 4680a729cfdbd762e8fa8e348709e01916340854 SHA1 5ed43a030600ca2cf749c2f9f25c18c72f0a935e SHA256 9e6fc529d335d2ffd10bdd49e40bcf9c002fe6034c644a002aa0511dcc76ac70
DIST fedora-ds-base-1.1.1.tar.bz2 2590248 RMD160 824ac88f2e901e19a1ec96f5ba9b4d94fc8f39c3 SHA1 78639f5075015cc9663f8e69aacaf2a5aa938e57 SHA256 ffd4cbbd61eef96174784e5de0c01c34738826a6b10bda4fcff6d7369c1cd0b5 DIST fedora-ds-base-1.1.1.tar.bz2 2590248 RMD160 824ac88f2e901e19a1ec96f5ba9b4d94fc8f39c3 SHA1 78639f5075015cc9663f8e69aacaf2a5aa938e57 SHA256 ffd4cbbd61eef96174784e5de0c01c34738826a6b10bda4fcff6d7369c1cd0b5
EBUILD fedora-ds-base-1.1.0.ebuild 2206 RMD160 89ac3b1bf6ffa5a88a631d5dbfc9fd1d88768e2a SHA1 2c90a8aab04ed083414512b496b88911f117669d SHA256 7b1a2848f62537f28f006eda28e3c8d85951eb3b008ad64b12851291d443c41c EBUILD fedora-ds-base-1.1.0.ebuild 1977 RMD160 23cd4ad7da413dbb7dc923eff6378258bc18bed6 SHA1 ed345689af61395902bd8dd033d3517c37933235 SHA256 9e247b2d294efdb7aaa6654c6c7a96090638b77721681eb061debba2de28de8a
EBUILD fedora-ds-base-1.1.1.ebuild 2206 RMD160 89ac3b1bf6ffa5a88a631d5dbfc9fd1d88768e2a SHA1 2c90a8aab04ed083414512b496b88911f117669d SHA256 7b1a2848f62537f28f006eda28e3c8d85951eb3b008ad64b12851291d443c41c EBUILD fedora-ds-base-1.1.1.ebuild 1977 RMD160 23cd4ad7da413dbb7dc923eff6378258bc18bed6 SHA1 ed345689af61395902bd8dd033d3517c37933235 SHA256 9e247b2d294efdb7aaa6654c6c7a96090638b77721681eb061debba2de28de8a
MISC ChangeLog 1131 RMD160 f853108ecea292d020e98cea6a38a10867cc1445 SHA1 15b7aebc6718e25158e99e92392b3df9f4aea63c SHA256 f7dfec2cc5d88a3aebceac77da3b12bb1edb937ccd974dd162b65635dad0236b MISC ChangeLog 1325 RMD160 c798315a8bef75adbdadb6d82d3eb26df5533493 SHA1 eaffb6e606ea3e4259643fa4075375f80952f8a2 SHA256 ac8ec96990f724e9a08b4d955fa2e02acfe9d2de126469fd4b759183cdd74978
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42 MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42

View File

@ -14,41 +14,42 @@ KEYWORDS="~amd64 ~x86"
IUSE="sasl snmp ipv6 debug" IUSE="sasl snmp ipv6 debug"
DEPEND=">=dev-libs/nss-3.11.4 DEPEND=">=dev-libs/nss-3.11.4
>=dev-libs/nspr-4.6.4 >=dev-libs/nspr-4.6.4
>=dev-libs/svrcore-4.0.3 >=dev-libs/svrcore-4.0.3
>=dev-libs/mozldap-6.0.2 >=dev-libs/mozldap-6.0.2
sasl? ( >=dev-libs/cyrus-sasl-2.1.19 ) sasl? ( >=dev-libs/cyrus-sasl-2.1.19 )
>=dev-libs/icu-3.4 >=dev-libs/icu-3.4
>=sys-libs/db-4.2.52 >=sys-libs/db-4.2.52
snmp? ( >=net-analyzer/net-snmp-5.1.2 ) snmp? ( >=net-analyzer/net-snmp-5.1.2 )
sys-apps/lm_sensors sys-apps/lm_sensors
app-arch/bzip2 app-arch/bzip2
dev-libs/openssl dev-libs/openssl
sys-apps/tcp-wrappers sys-apps/tcp-wrappers
sys-libs/pam sys-libs/pam
sys-libs/zlib" sys-libs/zlib"
src_unpack() { src_unpack() {
unpack ${A} unpack ${A}
} }
src_compile() { src_compile() {
if use amd64 ; then if use amd64 ; then
myconf="${myconf} --enable-64bit" myconf="${myconf} --enable-64bit"
elif use sasl ; then elif use sasl ; then
myconf="${myconf} --with-sasl=yes" myconf="${myconf} --with-sasl=yes"
elif use snmp ; then elif use snmp ; then
myconf="${myconf} --netsnmp=yes" myconf="${myconf} --netsnmp=yes"
else else
myconf="" myconf=""
fi fi
append-flags -D_GNU_SOURCE append-flags -D_GNU_SOURCE
econf $(use_enable debug) \ econf $(use_enable debug) \
${myconf} \ ${myconf} \
--with-fhs \ --with-fhs \
|| die "econf failed" || die "econf failed"
emake || die "emake failed"
emake || die "emake failed"
# --with-nspr=yes \ # --with-nspr=yes \
# --with-nss=yes \ # --with-nss=yes \
@ -60,7 +61,7 @@ src_compile() {
} }
src_install () { src_install () {
emake DESTDIR=${D} install || die "emake failed" emake DESTDIR="${D}" install || die "emake failed"
# install not installed header # install not installed header
insinto /usr/include/dirsrv insinto /usr/include/dirsrv
@ -70,12 +71,12 @@ src_install () {
dosed 's|#{{PERL-EXEC}}|#!/usr/bin/perl|' /usr/share/dirsrv/script-templates/template-*.pl dosed 's|#{{PERL-EXEC}}|#!/usr/bin/perl|' /usr/share/dirsrv/script-templates/template-*.pl
# remove redhat style init script and install gentoo style # remove redhat style init script and install gentoo style
rm -rf ${D}/etc/rc.d rm -rf "${D}"/etc/rc.d
newinitd ${FILESDIR}/dirsrv.initd dirsrv newinitd "${FILESDIR}"/dirsrv.initd dirsrv
newconfd ${FILESDIR}/dirsrv.confd dirsrv newconfd "${FILESDIR}"/dirsrv.confd dirsrv
# cope with libraries being in /usr/lib/dirsrv # cope with libraries being in /usr/lib/dirsrv
dodir /etc/env.d dodir /etc/env.d
echo "LDPATH=/usr/$(get_libdir)/dirsrv" > ${D}/etc/env.d/08dirsrv echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${D}"/etc/env.d/08dirsrv
} }

View File

@ -0,0 +1,82 @@
# 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="sasl snmp 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
sasl? ( >=dev-libs/cyrus-sasl-2.1.19 )
>=dev-libs/icu-3.4
>=sys-libs/db-4.2.52
snmp? ( >=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"
src_unpack() {
unpack ${A}
}
src_compile() {
if use amd64 ; then
myconf="${myconf} --enable-64bit"
elif use sasl ; then
myconf="${myconf} --with-sasl=yes"
elif use snmp ; then
myconf="${myconf} --netsnmp=yes"
else
myconf=""
fi
append-flags -D_GNU_SOURCE
econf $(use_enable debug) \
${myconf} \
--with-fhs \
|| 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"
# 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
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

@ -44,12 +44,14 @@ start() {
eend 0 eend 0
for instance in $FDSINSTANCES ; do for instance in $FDSINSTANCES ; do
ebegin "Starting Instance $instance" ebegin "Starting Instance $instance"
start-stop-daemon --start --quiet \ start-stop-daemon --start --quiet -m \
--pidfile $piddir/slapd-$instance.pid \ --pidfile $piddir/slapd-$instance.startpid \
--exec $exec -- -D $instbase/slapd-$instance \ --exec $exec -- -D $instbase/slapd-$instance \
-i $piddir/slapd-$instance.pid -w $piddir/slapd-$instance.startpid -i $piddir/slapd-$instance.pid -w $piddir/slapd-$instance.startpid
eend $? eend $?
done done
sleep 5
status || return 1
} }
@ -82,7 +84,7 @@ status() {
for instance in $INSTANCES; do for instance in $INSTANCES; do
if [ -e $piddir/slapd-$instance.pid ]; then if [ -e $piddir/slapd-$instance.pid ]; then
pid=$(cat $piddir/slapd-$instance.pid) pid=$(cat $piddir/slapd-$instance.pid)
if [ $(echo "$pids" | grep -c $pid) -ge 1 ]; then if [ $(echo "$pid" | grep -c $pid) -ge 1 ]; then
einfo "$prog $instance (pid $pid) is running..." einfo "$prog $instance (pid $pid) is running..."
else else
ewarn "$prog $instance dead but pid file exists" ewarn "$prog $instance dead but pid file exists"