commit:     0975334b5b21b0afd0e12632f77fcec65392329b
Author:     Daniel Kuehn <daniel <AT> kuehn <DOT> se>
AuthorDate: Mon Jul 25 20:56:19 2016 +0000
Commit:     Daniel Kuehn <lejonet <AT> gentoo <DOT> org>
CommitDate: Mon Jul 25 21:03:19 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0975334b

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.

 sys-libs/musl-nscd/Manifest              |  5 +++
 sys-libs/musl-nscd/files/nscd.initd      | 64 ++++++++++++++++++++++++++++++++
 sys-libs/musl-nscd/files/nscd.service    | 15 ++++++++
 sys-libs/musl-nscd/files/nscd.tmpfilesd  |  4 ++
 sys-libs/musl-nscd/metadata.xml          | 14 +++++++
 sys-libs/musl-nscd/musl-nscd-9999.ebuild | 30 +++++++++++++++
 6 files changed, 132 insertions(+)

diff --git a/sys-libs/musl-nscd/Manifest b/sys-libs/musl-nscd/Manifest
new file mode 100644
index 0000000..4380c29
--- /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 0000000..ff71543
--- /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 0000000..25a3b1d
--- /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 0000000..52edbba
--- /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 0000000..7a97e61
--- /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>lejo...@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 0000000..a85cf63
--- /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
+}

Reply via email to