diff options
author | Spider.007 / Sjon | 2015-07-02 08:57:21 +0200 |
---|---|---|
committer | Spider.007 / Sjon | 2015-07-02 08:57:21 +0200 |
commit | d88802d16fd9c51b977113c2128cde5bee199b09 (patch) | |
tree | 89fc60830ba820e439f71b739d9d7613484101f7 | |
download | aur-d88802d16fd9c51b977113c2128cde5bee199b09.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 35 | ||||
-rw-r--r-- | unscd.8 | 31 | ||||
-rw-r--r-- | unscd.conf | 71 | ||||
-rw-r--r-- | unscd.service | 16 |
5 files changed, 172 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b998c9965a55 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = unscd + pkgdesc = Drop-in replacement for glibc nscd which is designed for simplicity and stability + pkgver = 0.52 + pkgrel = 1 + url = http://busybox.net/~vda/unscd/ + arch = i686 + arch = x86_64 + license = GPL2 + source = http://busybox.net/~vda/unscd/nscd-0.52.c + source = unscd.service + source = unscd.conf + source = unscd.8 + md5sums = 846d108ed997a3cbd94fe953bea40a48 + md5sums = SKIP + md5sums = SKIP + md5sums = SKIP + +pkgname = unscd + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..1072ac8c8aad --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,35 @@ +# Maintainer: Spider.007 <aur@spider007.net> +# Submitter: Sébastien Luttringer <seblu@aur.archlinux.org> + +pkgname=unscd +pkgver=0.52 +pkgrel=1 +pkgdesc='Drop-in replacement for glibc nscd which is designed for simplicity and stability' +arch=('i686' 'x86_64') +url='http://busybox.net/~vda/unscd/' +license=('GPL2') +source=("http://busybox.net/~vda/unscd/nscd-$pkgver.c" + 'unscd.service' 'unscd.conf' 'unscd.8') +md5sums=('846d108ed997a3cbd94fe953bea40a48' + 'SKIP' + 'SKIP' + 'SKIP') + +prepare() { + sed -i 's,/etc/nscd.conf,/etc/unscd.conf,g' "nscd-$pkgver.c" + sed -i 's,/var/run/,/run/,g' "nscd-$pkgver.c" +} + +build() { + gcc -fomit-frame-pointer -Wl,--sort-section -Wl,alignment -Wl,--sort-common \ + -Os $CFLAGS $LDFLAGS -o $pkgname "nscd-$pkgver.c" +} + +package() { + install -D -m 755 unscd "$pkgdir/usr/bin/unscd" + install -D -m 644 unscd.conf "$pkgdir/etc/unscd.conf" + install -D -m 644 unscd.8 "$pkgdir/usr/share/man/man8/unscd.8" + install -D -m 644 unscd.service "$pkgdir/usr/lib/systemd/system/unscd.service" +} + +# vim:set ts=2 sw=2 ft=sh et: diff --git a/unscd.8 b/unscd.8 new file mode 100644 index 000000000000..b1b347dada29 --- /dev/null +++ b/unscd.8 @@ -0,0 +1,31 @@ +.TH UNSCD "8" "October 2010" "unscd - nscd which does not hang" "User Commands" +.SH NAME +unscd \- nscd which does not hang +.SH SYNOPSIS +.B unscd +[\fIOPTION\fR...] +.SH DESCRIPTION +Micro Name Service Cache Daemon +.TP +\fB\-d\fR, \-\-debug +Do not daemonize; log to stderr +.HP +\fB\-f\fR, \-\-config\-file File to read configuration from +.TP +\fB\-i\fR, \-\-invalidate +Invalidate cache +.TP +\fB\-K\fR, \-\-shutdown +Shut the server down +.TP +\fB\-t\fR, \-\-nthreads +Serve N requests in parallel +.TP +\fB\-V\fR, \-\-version +Version +.SH FILES +.B /etc/unscd.conf +.SH AUTHOR +unscd was written by Denys Vlasenko and is licensed under the GPL version 2. +.TP +This manpage was written by Don Armstrong <don@debian.org> and updated to Archlinux by Sebastien Luttringer <seblu+arch@seblu.net> diff --git a/unscd.conf b/unscd.conf new file mode 100644 index 000000000000..771fea0bb781 --- /dev/null +++ b/unscd.conf @@ -0,0 +1,71 @@ +# This file is currently taken verbatim from the version distributed +# with GNU glibc's nscd with unused configurations removed +# +# /etc/unscd.conf +# +# An example Name Service Cache config file. This file is needed by nscd. +# +# Legal entries are: +# +# logfile <file> +# debug-level <level> +# threads <initial #threads to use> +# max-threads <maximum #threads to use> +# server-user <user to run server as instead of root> +# 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)x +# +# enable-cache <service> <yes|no> +# positive-time-to-live <service> <time in seconds> +# negative-time-to-live <service> <time in seconds> +# suggested-size <service> <prime number> +# check-files <service> <yes|no> +# persistent <service> (ignored) +# shared <service> (ignored) +# auto-propagate <service> (ignored) +# +# Currently supported cache names (services): passwd, group, hosts +# + + +# logfile /var/log/unscd.log +# threads 4 +# max-threads 32 +# server-user nobody +# stat-user somebody + debug-level 0 +# reload-count 5 + paranoia no +# restart-interval 3600 + + enable-cache passwd yes + positive-time-to-live passwd 600 + negative-time-to-live passwd 20 + suggested-size passwd 211 + check-files passwd yes + persistent passwd yes + shared passwd yes + auto-propagate passwd yes + + enable-cache group yes + positive-time-to-live group 3600 + negative-time-to-live group 60 + suggested-size group 211 + check-files group yes + persistent group yes + shared group yes + auto-propagate group yes + +# hosts caching is broken with gethostby* calls, hence is now disabled per default. + enable-cache hosts no + positive-time-to-live hosts 3600 + negative-time-to-live hosts 20 + suggested-size hosts 211 + check-files hosts yes + persistent hosts yes + shared hosts yes + +# unscd does not support services caching diff --git a/unscd.service b/unscd.service new file mode 100644 index 000000000000..ff200a144822 --- /dev/null +++ b/unscd.service @@ -0,0 +1,16 @@ +[Unit] +Description=Name Service Cache Daemon + +[Service] +Type=forking +ExecStart=/usr/sbin/nscd +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 +PIDFile=/run/nscd/nscd.pid + +[Install] +WantedBy=multi-user.target |