Gentoo Archives: gentoo-commits

From: Daniel Kuehn <lejonet@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/musl-nscd/files/, sys-libs/musl-nscd/
Date: Mon, 25 Jul 2016 21:03:39
Message-Id: 1469480599.0975334b5b21b0afd0e12632f77fcec65392329b.lejonet@gentoo
1 commit: 0975334b5b21b0afd0e12632f77fcec65392329b
2 Author: Daniel Kuehn <daniel <AT> kuehn <DOT> se>
3 AuthorDate: Mon Jul 25 20:56:19 2016 +0000
4 Commit: Daniel Kuehn <lejonet <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 25 21:03:19 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0975334b
7
8 sys-libs/musl-nscd: Added musl-nscd
9
10 Added a live ebuild for musl-nscd, a thin Name Service System "wrapper"
11 for musl libc, highly experimental.
12
13 sys-libs/musl-nscd/Manifest | 5 +++
14 sys-libs/musl-nscd/files/nscd.initd | 64 ++++++++++++++++++++++++++++++++
15 sys-libs/musl-nscd/files/nscd.service | 15 ++++++++
16 sys-libs/musl-nscd/files/nscd.tmpfilesd | 4 ++
17 sys-libs/musl-nscd/metadata.xml | 14 +++++++
18 sys-libs/musl-nscd/musl-nscd-9999.ebuild | 30 +++++++++++++++
19 6 files changed, 132 insertions(+)
20
21 diff --git a/sys-libs/musl-nscd/Manifest b/sys-libs/musl-nscd/Manifest
22 new file mode 100644
23 index 0000000..4380c29
24 --- /dev/null
25 +++ b/sys-libs/musl-nscd/Manifest
26 @@ -0,0 +1,5 @@
27 +AUX nscd.initd 1527 SHA256 70a809ba34959aa9622bda95299e7391d14d84fad8b3cf5012e2284b6324b6cc SHA512 d25cd0696e4ab2c33fbfe4adeb2f7f9ebe6b77f78d8b4aa79e88aaec21e7aa9c26de724ad0aed5e3e994a8c96bbfa759c48eee99b442f0e4ab9b2c62d177549b WHIRLPOOL 2edef69a468325ac30f8b3f9ea3082f9fc69d887f775f5bed96fc1135bbb675ce1a797a898ce9f744d5d0c3fc0f2156edbca0e39134f08a2d8f41ef3513bf3c6
28 +AUX nscd.service 337 SHA256 de7bc9946309d34f0ab44aa22a4d3cf259fe91c57e8000d741cb09ecd3a6caa0 SHA512 2001100f3b054843c69b6fd2d38852c7c824282aa8998c25a3c0352db993705429d25c70d8ce6cb3579f836b7089644c520acac423ebd69cb1b36e94a77c5bea WHIRLPOOL f01d191971b0dc45f541c9ebaaa1a40f3497e2cc838cff6a20a7b1828d726c248abbd94322a5a5ff30c33ddb7d9086cd4d2ba3bdc1811fed59ff292ef3983a72
29 +AUX nscd.tmpfilesd 111 SHA256 f0f64c4612d2097173854d2ec2e94ecbf4b77c7a6e94d950874e37346aa90d72 SHA512 53b80b331e1a85d8ee16eb2ce547a7249e944926c3d1cdd4a47a5301a5c842ffc7ec1e3dc0a731542a8facf8261c1c57121802d01741aa89898a3476c09da340 WHIRLPOOL cf1fed1a7e2ac1623a84f1cfa2062645afe3f791da2f4ace3859d12aa05df0e282b4c2e367a460015956ac2a8d01fee4cda84917a3adf2c38561dff200335270
30 +EBUILD musl-nscd-9999.ebuild 671 SHA256 e067d535fe46a681d8a0d10a70b9642b6181e8ecc55f3e2cba9dd7fb6e138db4 SHA512 4043366b036bfe1815064c5f16941aa7c425cd4d83eb3d3fcee719d4fb542fb455da0ca3b1c35b47697255303060e310a3fd3c82ad48bb9753a4cf8366d29d53 WHIRLPOOL 6725b47e9aeb959e9d7e38608a9eb8c528b674e272982176a84abb41274c20e078096f429714f89d1adbc9ec591eba8909db2d6cdefd0f932863fdcb547d6a8b
31 +MISC metadata.xml 402 SHA256 0d54a9356015fce546623e40afe99d762f1a69c0ca19d2344ef5a49acd9ac1f2 SHA512 365e5b780076080f19c4377606fd39a4c4f321e5383ed41d7a644601e705942a9c5264acd4a5390c2a57bb3d9bfcd5df00ad961bd07c5e7f28e4d5123b1a24f8 WHIRLPOOL aaa7eeab92d759486ed5ef48f36436e66c4e651f3155209a49d90b79259c28e29b2eb26678f02ad284bd806d9ea7b00c07410c79f0bf3911debce6f6bee63b94
32
33 diff --git a/sys-libs/musl-nscd/files/nscd.initd b/sys-libs/musl-nscd/files/nscd.initd
34 new file mode 100644
35 index 0000000..ff71543
36 --- /dev/null
37 +++ b/sys-libs/musl-nscd/files/nscd.initd
38 @@ -0,0 +1,64 @@
39 +#!/sbin/openrc-run
40 +# Copyright 1999-2005 Gentoo Foundation
41 +# Distributed under the terms of the GNU General Public License v2
42 +# $Id$
43 +
44 +depend() {
45 + use dns ldap net slapd
46 +}
47 +
48 +checkconfig() {
49 + if [ ! -d /var/run/nscd ] ; then
50 + mkdir -p /var/run/nscd
51 + chmod 755 /var/run/nscd
52 + fi
53 + if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /var/run/nscd)" != "755" ] ; then
54 + echo ""
55 + ewarn "nscd run dir is not world readable, you should reset the perms:"
56 + ewarn "chmod 755 /var/run/nscd"
57 + ewarn "chmod a+rw /var/run/nscd/socket"
58 + echo ""
59 + ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd"
60 + echo ""
61 + fi
62 +}
63 +
64 +start() {
65 + checkconfig
66 +
67 + ebegin "Starting Name Service Cache Daemon"
68 + local secure=`while read curline ; do
69 + table=${curline%:*}
70 + entries=${curline##$table:}
71 + table=${table%%[^a-z]*}
72 + case $table in
73 + passwd*|group*|hosts)
74 + for entry in $entries ; do
75 + case $entry in
76 + nisplus*)
77 + /usr/sbin/nscd_nischeck $table || \
78 + /echo "-S $table,yes"
79 + ;;
80 + esac
81 + done
82 + ;;
83 + esac
84 + done < /etc/nsswitch.conf`
85 + local pidfile="$(strings /usr/sbin/nscd | grep nscd.pid)"
86 + mkdir -p "$(dirname ${pidfile})"
87 + save_options pidfile "${pidfile}"
88 + start-stop-daemon --start --quiet \
89 + --exec /usr/sbin/nscd --pidfile "${pidfile}" \
90 + -- $secure
91 + eend $?
92 +}
93 +
94 +stop() {
95 + local pidfile="$(get_options pidfile)"
96 + [ -n "${pidfile}" ] && pidfile="--pidfile ${pidfile}"
97 + ebegin "Shutting down Name Service Cache Daemon"
98 + start-stop-daemon --stop --quiet --exec /usr/sbin/nscd ${pidfile}
99 + eend $?
100 +}
101 +
102 +# vim:ts=4
103
104 diff --git a/sys-libs/musl-nscd/files/nscd.service b/sys-libs/musl-nscd/files/nscd.service
105 new file mode 100644
106 index 0000000..25a3b1d
107 --- /dev/null
108 +++ b/sys-libs/musl-nscd/files/nscd.service
109 @@ -0,0 +1,15 @@
110 +[Unit]
111 +Description=Name Service Cache Daemon
112 +After=network.target
113 +
114 +[Service]
115 +ExecStart=/usr/sbin/nscd -F
116 +ExecStop=/usr/sbin/nscd --shutdown
117 +ExecReload=/usr/sbin/nscd -i passwd
118 +ExecReload=/usr/sbin/nscd -i group
119 +ExecReload=/usr/sbin/nscd -i hosts
120 +ExecReload=/usr/sbin/nscd -i services
121 +Restart=always
122 +
123 +[Install]
124 +WantedBy=multi-user.target
125
126 diff --git a/sys-libs/musl-nscd/files/nscd.tmpfilesd b/sys-libs/musl-nscd/files/nscd.tmpfilesd
127 new file mode 100644
128 index 0000000..52edbba
129 --- /dev/null
130 +++ b/sys-libs/musl-nscd/files/nscd.tmpfilesd
131 @@ -0,0 +1,4 @@
132 +# Configuration to create /run/nscd directory
133 +# Used as part of systemd's tmpfiles
134 +
135 +d /run/nscd 0755 root root
136
137 diff --git a/sys-libs/musl-nscd/metadata.xml b/sys-libs/musl-nscd/metadata.xml
138 new file mode 100644
139 index 0000000..7a97e61
140 --- /dev/null
141 +++ b/sys-libs/musl-nscd/metadata.xml
142 @@ -0,0 +1,14 @@
143 +<?xml version="1.0" encoding="UTF-8"?>
144 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
145 +<pkgmetadata>
146 + <maintainer type="person">
147 + <email>lejonet@g.o</email>
148 + <name>Daniel Kuehn</name>
149 + </maintainer>
150 + <use>
151 + <flag name="minimal">Only installs the header files</flag>
152 + </use>
153 + <upstream>
154 + <remote-id type="github">pikhq/musl-nscd</remote-id>
155 + </upstream>
156 +</pkgmetadata>
157
158 diff --git a/sys-libs/musl-nscd/musl-nscd-9999.ebuild b/sys-libs/musl-nscd/musl-nscd-9999.ebuild
159 new file mode 100644
160 index 0000000..a85cf63
161 --- /dev/null
162 +++ b/sys-libs/musl-nscd/musl-nscd-9999.ebuild
163 @@ -0,0 +1,30 @@
164 +# Copyright 1999-2016 Gentoo Foundation
165 +# Distributed under the terms of the GNU General Public License v2
166 +# $Id$
167 +
168 +EAPI=6
169 +
170 +inherit git-r3 systemd
171 +
172 +DESCRIPTION="musl-nscd is an implementation of the NSCD protocol for the musl libc"
173 +HOMEPAGE="https://github.com/pikhq/musl-nscd"
174 +EGIT_REPO_URI="https://github.com/pikhq/musl-nscd"
175 +EGIT_BRANCH=master
176 +
177 +LICENSE="MIT"
178 +SLOT="0"
179 +IUSE="minimal"
180 +
181 +src_install() {
182 + if use minimal; then
183 + emake DESTDIR="${D}" install-headers
184 + else
185 + emake DESTDIR="${D}" install
186 +
187 + newinitd "${FILESDIR}"/nscd.initd nscd
188 + systemd_dounit "${FILESDIR}"/nscd.service
189 + systemd_newtmpfilesd "${FILESDIR}"/nscd.tmpfilesd nscd.conf
190 +
191 + dodoc README
192 + fi
193 +}