summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kuehn <daniel@kuehn.se>2016-07-25 22:56:19 +0200
committerDaniel Kuehn <lejonet@gentoo.org>2016-07-25 23:03:19 +0200
commit0975334b5b21b0afd0e12632f77fcec65392329b (patch)
treed2b4340026cbad444ad633a69391be5d2e511320 /sys-libs/musl-nscd
parentx11-wm/page: version bump. (diff)
downloadgentoo-0975334b5b21b0afd0e12632f77fcec65392329b.tar.gz
gentoo-0975334b5b21b0afd0e12632f77fcec65392329b.tar.bz2
gentoo-0975334b5b21b0afd0e12632f77fcec65392329b.zip
sys-libs/musl-nscd: Added musl-nscd
Added a live ebuild for musl-nscd, a thin Name Service System "wrapper" for musl libc, highly experimental.
Diffstat (limited to 'sys-libs/musl-nscd')
-rw-r--r--sys-libs/musl-nscd/Manifest5
-rw-r--r--sys-libs/musl-nscd/files/nscd.initd64
-rw-r--r--sys-libs/musl-nscd/files/nscd.service15
-rw-r--r--sys-libs/musl-nscd/files/nscd.tmpfilesd4
-rw-r--r--sys-libs/musl-nscd/metadata.xml14
-rw-r--r--sys-libs/musl-nscd/musl-nscd-9999.ebuild30
6 files changed, 132 insertions, 0 deletions
diff --git a/sys-libs/musl-nscd/Manifest b/sys-libs/musl-nscd/Manifest
new file mode 100644
index 00000000000..4380c29b0d6
--- /dev/null
+++ b/sys-libs/musl-nscd/Manifest
@@ -0,0 +1,5 @@
+AUX nscd.initd 1527 SHA256 70a809ba34959aa9622bda95299e7391d14d84fad8b3cf5012e2284b6324b6cc SHA512 d25cd0696e4ab2c33fbfe4adeb2f7f9ebe6b77f78d8b4aa79e88aaec21e7aa9c26de724ad0aed5e3e994a8c96bbfa759c48eee99b442f0e4ab9b2c62d177549b WHIRLPOOL 2edef69a468325ac30f8b3f9ea3082f9fc69d887f775f5bed96fc1135bbb675ce1a797a898ce9f744d5d0c3fc0f2156edbca0e39134f08a2d8f41ef3513bf3c6
+AUX nscd.service 337 SHA256 de7bc9946309d34f0ab44aa22a4d3cf259fe91c57e8000d741cb09ecd3a6caa0 SHA512 2001100f3b054843c69b6fd2d38852c7c824282aa8998c25a3c0352db993705429d25c70d8ce6cb3579f836b7089644c520acac423ebd69cb1b36e94a77c5bea WHIRLPOOL f01d191971b0dc45f541c9ebaaa1a40f3497e2cc838cff6a20a7b1828d726c248abbd94322a5a5ff30c33ddb7d9086cd4d2ba3bdc1811fed59ff292ef3983a72
+AUX nscd.tmpfilesd 111 SHA256 f0f64c4612d2097173854d2ec2e94ecbf4b77c7a6e94d950874e37346aa90d72 SHA512 53b80b331e1a85d8ee16eb2ce547a7249e944926c3d1cdd4a47a5301a5c842ffc7ec1e3dc0a731542a8facf8261c1c57121802d01741aa89898a3476c09da340 WHIRLPOOL cf1fed1a7e2ac1623a84f1cfa2062645afe3f791da2f4ace3859d12aa05df0e282b4c2e367a460015956ac2a8d01fee4cda84917a3adf2c38561dff200335270
+EBUILD musl-nscd-9999.ebuild 671 SHA256 e067d535fe46a681d8a0d10a70b9642b6181e8ecc55f3e2cba9dd7fb6e138db4 SHA512 4043366b036bfe1815064c5f16941aa7c425cd4d83eb3d3fcee719d4fb542fb455da0ca3b1c35b47697255303060e310a3fd3c82ad48bb9753a4cf8366d29d53 WHIRLPOOL 6725b47e9aeb959e9d7e38608a9eb8c528b674e272982176a84abb41274c20e078096f429714f89d1adbc9ec591eba8909db2d6cdefd0f932863fdcb547d6a8b
+MISC metadata.xml 402 SHA256 0d54a9356015fce546623e40afe99d762f1a69c0ca19d2344ef5a49acd9ac1f2 SHA512 365e5b780076080f19c4377606fd39a4c4f321e5383ed41d7a644601e705942a9c5264acd4a5390c2a57bb3d9bfcd5df00ad961bd07c5e7f28e4d5123b1a24f8 WHIRLPOOL aaa7eeab92d759486ed5ef48f36436e66c4e651f3155209a49d90b79259c28e29b2eb26678f02ad284bd806d9ea7b00c07410c79f0bf3911debce6f6bee63b94
diff --git a/sys-libs/musl-nscd/files/nscd.initd b/sys-libs/musl-nscd/files/nscd.initd
new file mode 100644
index 00000000000..ff7154335f2
--- /dev/null
+++ b/sys-libs/musl-nscd/files/nscd.initd
@@ -0,0 +1,64 @@
+#!/sbin/openrc-run
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use dns ldap net slapd
+}
+
+checkconfig() {
+ if [ ! -d /var/run/nscd ] ; then
+ mkdir -p /var/run/nscd
+ chmod 755 /var/run/nscd
+ fi
+ if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /var/run/nscd)" != "755" ] ; then
+ echo ""
+ ewarn "nscd run dir is not world readable, you should reset the perms:"
+ ewarn "chmod 755 /var/run/nscd"
+ ewarn "chmod a+rw /var/run/nscd/socket"
+ echo ""
+ ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd"
+ echo ""
+ fi
+}
+
+start() {
+ checkconfig
+
+ ebegin "Starting 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="$(strings /usr/sbin/nscd | grep nscd.pid)"
+ mkdir -p "$(dirname ${pidfile})"
+ save_options pidfile "${pidfile}"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/nscd --pidfile "${pidfile}" \
+ -- $secure
+ eend $?
+}
+
+stop() {
+ local pidfile="$(get_options pidfile)"
+ [ -n "${pidfile}" ] && pidfile="--pidfile ${pidfile}"
+ ebegin "Shutting down Name Service Cache Daemon"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/nscd ${pidfile}
+ eend $?
+}
+
+# vim:ts=4
diff --git a/sys-libs/musl-nscd/files/nscd.service b/sys-libs/musl-nscd/files/nscd.service
new file mode 100644
index 00000000000..25a3b1d9be0
--- /dev/null
+++ b/sys-libs/musl-nscd/files/nscd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Name Service Cache Daemon
+After=network.target
+
+[Service]
+ExecStart=/usr/sbin/nscd -F
+ExecStop=/usr/sbin/nscd --shutdown
+ExecReload=/usr/sbin/nscd -i passwd
+ExecReload=/usr/sbin/nscd -i group
+ExecReload=/usr/sbin/nscd -i hosts
+ExecReload=/usr/sbin/nscd -i services
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sys-libs/musl-nscd/files/nscd.tmpfilesd b/sys-libs/musl-nscd/files/nscd.tmpfilesd
new file mode 100644
index 00000000000..52edbba673c
--- /dev/null
+++ b/sys-libs/musl-nscd/files/nscd.tmpfilesd
@@ -0,0 +1,4 @@
+# Configuration to create /run/nscd directory
+# Used as part of systemd's tmpfiles
+
+d /run/nscd 0755 root root
diff --git a/sys-libs/musl-nscd/metadata.xml b/sys-libs/musl-nscd/metadata.xml
new file mode 100644
index 00000000000..7a97e61f8d5
--- /dev/null
+++ b/sys-libs/musl-nscd/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>lejonet@gentoo.org</email>
+ <name>Daniel Kuehn</name>
+ </maintainer>
+ <use>
+ <flag name="minimal">Only installs the header files</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">pikhq/musl-nscd</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-libs/musl-nscd/musl-nscd-9999.ebuild b/sys-libs/musl-nscd/musl-nscd-9999.ebuild
new file mode 100644
index 00000000000..a85cf630108
--- /dev/null
+++ b/sys-libs/musl-nscd/musl-nscd-9999.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit git-r3 systemd
+
+DESCRIPTION="musl-nscd is an implementation of the NSCD protocol for the musl libc"
+HOMEPAGE="https://github.com/pikhq/musl-nscd"
+EGIT_REPO_URI="https://github.com/pikhq/musl-nscd"
+EGIT_BRANCH=master
+
+LICENSE="MIT"
+SLOT="0"
+IUSE="minimal"
+
+src_install() {
+ if use minimal; then
+ emake DESTDIR="${D}" install-headers
+ else
+ emake DESTDIR="${D}" install
+
+ newinitd "${FILESDIR}"/nscd.initd nscd
+ systemd_dounit "${FILESDIR}"/nscd.service
+ systemd_newtmpfilesd "${FILESDIR}"/nscd.tmpfilesd nscd.conf
+
+ dodoc README
+ fi
+}