Skip to contentSkip to conversation

package/unscd: new package

PATCH Superseded Doug Kehn 2 participants 4 messages Nov 6, 2015

v4 of 7 Superseded Latest is v7 →

lore
Share & tools
lore

Doug Kehn

author
#0 lore raw

v4 cover package/unscd: new package

$(APPLY_PATCHES) suggestion is not incorporated as the debian patches are skipped due to 'Unsupported file type for ...' I'm not sure if updating apply-patches.sh to handle patches with no extension is the right thing to do. Patching the debain series and changing patch names to add .patch extension seems like overkill when compared to just handling everything in the .mk.

systemd recipe/support is removed. systemd support is best left to someone versed in systemd who desires to use unscd with systemd.

The BR2_GLIBC_NSCD suggestion is incorporated. However, I'm not sure what the proper next steps are to properly install glibc nscd for both internal/external toolchains. Is it sufficient, for now, to just define BR2_GLIBC_NSCD?

Doug Kehn (2):
package/unscd: new package
toolchain/toolchain-common.in: install nscd

 package/Config.in             |  1 +
 package/unscd/Config.in       | 11 ++++++++++
 package/unscd/S46unscd        | 24 +++++++++++++++++++++
 package/unscd/unscd.hash      |  4 ++++
 package/unscd/unscd.mk        | 49 +++++++++++++++++++++++++++++++++++++++++++
 toolchain/toolchain-common.in |  4 ++++
 6 files changed, 93 insertions(+)
 create mode 100644 package/unscd/Config.in
 create mode 100644 package/unscd/S46unscd
 create mode 100644 package/unscd/unscd.hash
 create mode 100644 package/unscd/unscd.mk

--
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).

Signature · 1 line
2.6.2
author
#1 lore raw

PATCH v4 1/2 package/unscd: new package

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 <[email protected]>
---
 package/Config.in        |  1 +
 package/unscd/Config.in  | 11 +++++++++++
 package/unscd/S46unscd   | 24 ++++++++++++++++++++++++
 package/unscd/unscd.hash |  4 ++++
 package/unscd/unscd.mk   | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 89 insertions(+)
 create mode 100644 package/unscd/Config.in
 create mode 100644 package/unscd/S46unscd
 create mode 100644 package/unscd/unscd.hash
 create mode 100644 package/unscd/unscd.mk
package/Config.in +1 -0
index bdc3063..7fd3f0d 100644
@@ -1534,6 +1534,7 @@ if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	source "package/sysvinit/Config.in"
 	source "package/tar/Config.in"
 endif
+	source "package/unscd/Config.in"
 	source "package/util-linux/Config.in"
 endmenu
 
package/unscd/Config.in new file +11 -0
new file mode 100644
index 0000000..1639bca
@@ -0,0 +1,11 @@
+config BR2_PACKAGE_UNSCD
+	bool "unscd"
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+	depends on !BR2_GLIBC_NSCD
+	help
+	  Micro Name Service Caching Daemon
+
+	  https://packages.debian.org/unscd
+
+comment "unscd needs an (e)glibc toolchain"
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
package/unscd/S46unscd new file +24 -0
new file mode 100644
index 0000000..7d18f94
@@ -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
package/unscd/unscd.hash new file +4 -0
new file mode 100644
index 0000000..173c59f
@@ -0,0 +1,4 @@
+# From http://snapshot.debian.org/archive/debian/20150519T094547Z/pool/main/u/unscd/unscd_0.51-1.dsc
+sha256	0dbf717726e1c29af8f4ef7d2d2695e5eedb342320a730a56ae0d56fe32891f8	unscd_0.51.orig.tar.gz
+sha256	8ae16a826afd464639f6c6372fabafee5b93aea9645b3fbf23970296d4961f27	unscd_0.51-1.debian.tar.gz
+
package/unscd/unscd.mk new file +49 -0

49 lines not on this page · raw message

Signature · 1 line
2.6.2
author
#2 lore raw

PATCH v4 2/2 toolchain/toolchain-common.in: install nscd

In reply to Doug Kehn

Add BR2_GLIBC_NSCD for installing nscd. BR2_GLIBC_NSCD can be used by other packages (e.g. unscd) to prevent the selection of multiple nscd packages.

Cc Yann E. MORIN <[email protected]>
---
 toolchain/toolchain-common.in | 4 ++++
 1 file changed, 4 insertions(+)
toolchain/toolchain-common.in +4 -0
index 6871d8b..a119c9c 100644
@@ -136,6 +136,10 @@ config BR2_ECLIPSE_REGISTER
 	  configuration files to make your toolchain appear within
 	  Eclipse, through the Eclipse Buildroot plugin.
 
+config BR2_GLIBC_NSCD
+	bool "Install nscd"
+	depends on BR2_TOOLCHAIN_USES_GLIBC
+
 # Options for packages to depend on, if they require at least a
 # specific version of the kernel headers.
 # Toolchains should choose the adequate option (ie. the highest
Signature · 1 line
2.6.2
#3 lore raw

v4 cover package/unscd: new package

In reply to Doug Kehn
Quoted 5 lines · Doug Kehn

$(APPLY_PATCHES) suggestion is not incorporated as the debian patches are skipped due to 'Unsupported file type for ...' I'm not sure if updating apply-patches.sh to handle patches with no extension is the right thing to do. Patching the debain series and changing patch names to add .patch extension seems like overkill when compared to just handling everything in the .mk.

Actually it would be good to modify apply-patches to apply everything when it
comes out of a series file.

Patch follows.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF