From mboxrd@z Thu Jan 1 00:00:00 1970 From: Doug Kehn Date: Tue, 1 Dec 2015 09:15:54 -0600 Subject: [Buildroot] [PATCH v6] package/unscd: new package Message-ID: <1448982954-5055-1-git-send-email-rdkehn@yahoo.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net A daemon which handles passwd, group and host lookups for running programs and caches the results for the next query. You only need this package if you are using slow Name Services like LDAP, NIS or NIS+. This particular NSCD is a complete rewrite of the GNU glibc nscd which is a single threaded server process which offloads all NSS lookups to worker children; cache hits are handled by the parent, and only cache misses start worker children, making the parent immune to resource leaks, hangs, and crashes in NSS libraries. It should mostly be a drop-in replacement for existing installs using nscd. Cc: Yann E. MORIN Cc: Arnout Vandecappelle Cc: Thomas Petazzoni Signed-off-by: Doug Kehn --- Changes v5 -> v6 - Remove toolchain patch/BR2_GLIBC_NSCD (Thomas). - Change source site from Debian to upstream (Thomas). - Update to version 0.52 (Thomas). Changes v4 -> v5 - Reincorporate $(APPLY_PATCHES) suggestion after update by Arnout. Changes v3 -> v4 - Incorporate feedback/suggestions by Yann and Maxime. Changes v2 -> v3 - Remove trailing '/' from UNSCD_SITE. - Whitespace cleanup. Changes v1 -> v2 - Incorporate feedback/suggestions by Yann (from nss-pam-ldapd patch). --- package/unscd/Config.in | 8 ++++++ package/unscd/S46unscd | 24 ++++++++++++++++++ package/unscd/nscd.conf | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ package/unscd/unscd.hash | 2 ++ package/unscd/unscd.mk | 35 ++++++++++++++++++++++++++ 5 files changed, 134 insertions(+) create mode 100644 package/unscd/Config.in create mode 100644 package/unscd/S46unscd create mode 100644 package/unscd/nscd.conf create mode 100644 package/unscd/unscd.hash create mode 100644 package/unscd/unscd.mk diff --git a/package/unscd/Config.in b/package/unscd/Config.in new file mode 100644 index 0000000..937aeb2 --- /dev/null +++ b/package/unscd/Config.in @@ -0,0 +1,8 @@ +config BR2_PACKAGE_UNSCD + bool "unscd" + depends on BR2_TOOLCHAIN_USES_GLIBC + help + Micro Name Service Caching Daemon + +comment "unscd needs an (e)glibc toolchain" + depends on !BR2_TOOLCHAIN_USES_GLIBC diff --git a/package/unscd/S46unscd b/package/unscd/S46unscd new file mode 100644 index 0000000..7d18f94 --- /dev/null +++ b/package/unscd/S46unscd @@ -0,0 +1,24 @@ +#!/bin/sh + +NAME="nscd" +DAEMON="/usr/sbin/${NAME}" + +case "$1" in +start) + printf "Starting ${NAME}: " + start-stop-daemon -S -x ${DAEMON} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +stop) + printf "Stopping ${NAME}: " + start-stop-daemon -K -x ${DAEMON} + [ $? -eq 0 ] && echo "OK" || echo "FAIL" + ;; +restart|reload) + $0 stop + $0 start + ;; +*) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac diff --git a/package/unscd/nscd.conf b/package/unscd/nscd.conf new file mode 100644 index 0000000..fe77d05 --- /dev/null +++ b/package/unscd/nscd.conf @@ -0,0 +1,65 @@ +# This file is currently taken verbatim from the version distributed +# with GNU glibc's nscd with unused configurations removed +# +# /etc/nscd.conf +# +# An example Name Service Cache config file. This file is needed by nscd. +# +# Legal entries are: +# +# logfile +# debug-level +# threads +# max-threads +# server-user +# server-user is ignored if nscd is started with -S parameters +# stat-user (ignored; any user can stat) +# reload-count (ignored; unscd should never crash) +# paranoia (ignored) +# restart-interval (ignored; unscd should never crash) +# +# enable-cache +# positive-time-to-live