summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordan.goodliffe <dan.goodliffe@localhost>2008-10-27 11:06:18 +0000
committerdan.goodliffe <dan.goodliffe@localhost>2008-10-27 11:06:18 +0000
commitaa51339cdc4523e1592054fab36796479ddc25b9 (patch)
tree784566d2c972f88b55308e12c75b4f559b1f0195
parentTweaks (diff)
downloadportage-aa51339cdc4523e1592054fab36796479ddc25b9.tar.bz2
portage-aa51339cdc4523e1592054fab36796479ddc25b9.tar.xz
portage-aa51339cdc4523e1592054fab36796479ddc25b9.zip
Add unscd cos nscd keeps crashing
-rw-r--r--sys-libs/unscd/Manifest7
-rw-r--r--sys-libs/unscd/files/patch-pid_file_location.diff11
-rw-r--r--sys-libs/unscd/files/unscd-1.init67
-rw-r--r--sys-libs/unscd/files/unscd.init67
-rw-r--r--sys-libs/unscd/unscd-0.33.ebuild35
-rw-r--r--sys-libs/unscd/unscd-0.34.ebuild34
6 files changed, 221 insertions, 0 deletions
diff --git a/sys-libs/unscd/Manifest b/sys-libs/unscd/Manifest
new file mode 100644
index 0000000..a6841fb
--- /dev/null
+++ b/sys-libs/unscd/Manifest
@@ -0,0 +1,7 @@
+AUX patch-pid_file_location.diff 389 RMD160 abd1f630a58d621a83b318b3335b8b363b02b264 SHA1 9cf9e67064a0a4f7268e71cfc3dab2e1527aee92 SHA256 f3c00a004cd94be3c4e7e7fc4691fb6b58fed6d574d90aa187dc0fa870763c95
+AUX unscd-1.init 1509 RMD160 2ee3173ee1b6215c4fa44bdbcfdf22d84f8ddc85 SHA1 530a3e8f58704af5e1af6063452abb873502e3d9 SHA256 f673e56eea5903d2274d90579ebdfbaa9c0c1935cea2a7585e5e3da339ded5df
+AUX unscd.init 1509 RMD160 ecef57672bbdf24da8290d56cd81eb93ee09404e SHA1 08f8bab79006870271c2275992d31a90182d20f2 SHA256 446d8e687b3e693d2aff1f944c30901fb0f55c62c4bc70e5e387537518885e03
+DIST nscd-0.33.c 58033 RMD160 46d34c103d8c788ae39e6bbf028a0a2cf64a8733 SHA1 0714ea4c9ab698788e7fd5044b85c87e68d80eee SHA256 afe56e820bd6c97110a684ab3a78250069c08f7f711b702c2ad3358f25d33fb8
+DIST nscd-0.34.c 58301 RMD160 9e688700d1a0796251d683e7f2d029de711c2054 SHA1 84ff1724433be11ee0be3777641004aa1d8eb56f SHA256 84c74fec159103ec26732ef20a8e4faa3a28f12e122e56fa61604f5c1c61cc46
+EBUILD unscd-0.33.ebuild 955 RMD160 bafb224ed55eca943c7d34ea81b848cab497c59c SHA1 57eac03be6c03c23746990702601e72ca72ca07b SHA256 133118f13986895805c9fb4ea76403b04ec5ca72cd2fb321c2f322981199277a
+EBUILD unscd-0.34.ebuild 884 RMD160 531ec00714a8e0591f192845fb5443763749abff SHA1 f637ef43f67f9a910b11e94b338ad165d6a50151 SHA256 e6e12ee5513d399d17370e9462a0df0d7ed91a465e9ac76ad55dde482168d121
diff --git a/sys-libs/unscd/files/patch-pid_file_location.diff b/sys-libs/unscd/files/patch-pid_file_location.diff
new file mode 100644
index 0000000..38e9310
--- /dev/null
+++ b/sys-libs/unscd/files/patch-pid_file_location.diff
@@ -0,0 +1,11 @@
+--- src/unscd.c.org 2008-10-03 02:37:41.648628473 +0200
++++ src/unscd.c 2008-10-03 02:42:55.881093205 +0200
+@@ -1776,7 +1776,7 @@
+ ** Initialization
+ */
+
+-#define NSCD_PIDFILE "/var/run/nscd.pid"
++#define NSCD_PIDFILE "/var/run/nscd/unscd.pid"
+ #define NSCD_DIR "/var/run/nscd"
+ #define NSCD_SOCKET "/var/run/nscd/socket"
+ #define NSCD_SOCKET_OLD "/var/run/.nscd_socket"
diff --git a/sys-libs/unscd/files/unscd-1.init b/sys-libs/unscd/files/unscd-1.init
new file mode 100644
index 0000000..3802a3c
--- /dev/null
+++ b/sys-libs/unscd/files/unscd-1.init
@@ -0,0 +1,67 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns ldap net slapd
+ provide nscd
+}
+
+get_pidfile() {
+ strings /usr/sbin/unscd | grep -F nscd.pid
+}
+
+checkconfig() {
+ if [ ! -d /var/run/nscd ] ; then
+ mkdir -p /var/run/nscd
+ chmod 755 /var/run/nscd
+ fi
+ if [ -z "${UNSCD_PERMS_OK}" ] && [ "$(stat -c %a /var/run/nscd)" != "755" ] ; then
+ echo ""
+ ewarn "nscd run dir is not world writeable, you should reset the perms:"
+ ewarn "chmod 755 /var/run/nscd"
+ ewarn "chmod a+rw /var/run/nscd/socket"
+ ewarn "chmod a+rw /var/run/.nscd_socket"
+ echo ""
+ ewarn "To disable this warning, set 'UNSCD_PERMS_OK' in /etc/conf.d/unscd"
+ echo ""
+ fi
+}
+
+start() {
+ checkconfig
+
+ ebegin "Starting Simplyfied Name Service Cache Daemon"
+ local secure=`while read curline ; do
+ table=${curline%:*}
+ entries=${curline##$table:}
+ table=${table%%[^a-z]*}
+ case $table in
+ passwd*|group*|hosts)
+ for entry in $entries ; do
+ case $entry in
+ nisplus*)
+ /usr/sbin/nscd_nischeck $table || \
+ echo "-S $table,yes"
+ ;;
+ esac
+ done
+ ;;
+ esac
+ done < /etc/nsswitch.conf`
+ local pidfile=$(get_pidfile)
+ mkdir -p "$(dirname ${pidfile})"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/unscd --pidfile ${pidfile} \
+ -- $secure
+ eend $?
+}
+
+stop() {
+ local pidfile=$(get_pidfile)
+ ebegin "Shutting down Simplyfied Name Service Cache Daemon"
+ start-stop-daemon --stop --quiet \
+ --exec /usr/sbin/unscd --pidfile ${pidfile}
+ eend $?
+}
+
+# vim:ts=4
diff --git a/sys-libs/unscd/files/unscd.init b/sys-libs/unscd/files/unscd.init
new file mode 100644
index 0000000..c8300c6
--- /dev/null
+++ b/sys-libs/unscd/files/unscd.init
@@ -0,0 +1,67 @@
+#!/sbin/runscript
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use dns ldap net slapd
+ provide nscd
+}
+
+get_pidfile() {
+ strings /usr/sbin/unscd | grep -F nscd.pid
+}
+
+checkconfig() {
+ if [ ! -d /var/run/nscd ] ; then
+ mkdir -p /var/run/nscd
+ chmod 755 /var/run/nscd
+ fi
+ if [ -z "${UNSCD_PERMS_OK}" ] && [ "$(stat -c %a /var/run/nscd)" != "777" ] ; then
+ echo ""
+ ewarn "nscd run dir is not world writeable, you should reset the perms:"
+ ewarn "chmod 777 /var/run/nscd"
+ ewarn "chmod a+rw /var/run/nscd/socket"
+ ewarn "chmod a+rw /var/run/.nscd_socket"
+ echo ""
+ ewarn "To disable this warning, set 'UNSCD_PERMS_OK' in /etc/conf.d/unscd"
+ echo ""
+ fi
+}
+
+start() {
+ checkconfig
+
+ ebegin "Starting Simplyfied Name Service Cache Daemon"
+ local secure=`while read curline ; do
+ table=${curline%:*}
+ entries=${curline##$table:}
+ table=${table%%[^a-z]*}
+ case $table in
+ passwd*|group*|hosts)
+ for entry in $entries ; do
+ case $entry in
+ nisplus*)
+ /usr/sbin/nscd_nischeck $table || \
+ echo "-S $table,yes"
+ ;;
+ esac
+ done
+ ;;
+ esac
+ done < /etc/nsswitch.conf`
+ local pidfile=$(get_pidfile)
+ mkdir -p "$(dirname ${pidfile})"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/unscd --pidfile ${pidfile} \
+ -- $secure
+ eend $?
+}
+
+stop() {
+ local pidfile=$(get_pidfile)
+ ebegin "Shutting down Simplyfied Name Service Cache Daemon"
+ start-stop-daemon --stop --quiet \
+ --exec /usr/sbin/unscd --pidfile ${pidfile}
+ eend $?
+}
+
+# vim:ts=4
diff --git a/sys-libs/unscd/unscd-0.33.ebuild b/sys-libs/unscd/unscd-0.33.ebuild
new file mode 100644
index 0000000..7ae365f
--- /dev/null
+++ b/sys-libs/unscd/unscd-0.33.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvs/lportage/sys-libs/unscd/unscd-0.33.ebuild,v 1.1 2008-10-27 11:06:18 dan.goodliffe Exp $
+inherit eutils
+
+DESCRIPTION="Drop-in replacement for glibc nscd designed for simplicity and stability"
+HOMEPAGE="http://busybox.net/~vda/unscd/"
+SRC_URI="http://busybox.net/~vda/unscd/nscd-${PV}.c"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_unpack() {
+ mkdir "${WORKDIR}/src" "${WORKDIR}/rc" || die "preparation failed"
+ cp "${DISTDIR}/${A}" "${WORKDIR}/src/unscd.c" || die "preparation failed"
+ cp "${FILESDIR}/unscd.init" "${WORKDIR}/rc/unscd" || die "preparation failed"
+ epatch "${FILESDIR}/patch-pid_file_location.diff" || die "patch failed"
+}
+
+src_compile() {
+ emake src/unscd || die "emake failed"
+ chmod 0755 rc/unscd || die "rc script failed"
+}
+
+src_install() {
+ exeinto /usr/sbin
+ doexe src/unscd || die "install failed"
+ exeinto /etc/init.d
+ doexe rc/unscd || die "install failed"
+}
diff --git a/sys-libs/unscd/unscd-0.34.ebuild b/sys-libs/unscd/unscd-0.34.ebuild
new file mode 100644
index 0000000..6584b63
--- /dev/null
+++ b/sys-libs/unscd/unscd-0.34.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvs/lportage/sys-libs/unscd/unscd-0.34.ebuild,v 1.1 2008-10-27 11:06:18 dan.goodliffe Exp $
+inherit eutils
+
+DESCRIPTION="Drop-in replacement for glibc nscd designed for simplicity and stability"
+HOMEPAGE="http://busybox.net/~vda/unscd/"
+SRC_URI="http://busybox.net/~vda/unscd/nscd-${PV}.c"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE=""
+
+DEPEND=""
+RDEPEND=""
+
+src_unpack() {
+ mkdir "${WORKDIR}/src" "${WORKDIR}/rc" || die "preparation failed"
+ cp "${DISTDIR}/${A}" "${WORKDIR}/src/unscd.c" || die "preparation failed"
+ cp "${FILESDIR}/unscd-1.init" "${WORKDIR}/rc/unscd" || die "preparation failed"
+}
+
+src_compile() {
+ emake src/unscd || die "emake failed"
+ chmod 0755 rc/unscd || die "rc script failed"
+}
+
+src_install() {
+ exeinto /usr/sbin
+ doexe src/unscd || die "install failed"
+ exeinto /etc/init.d
+ doexe rc/unscd || die "install failed"
+}