From 0838a7ed482f29ddf71cf05e7ec6cf7c2728ce34 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 18 Jun 2012 00:01:40 +0000 Subject: Mon Jun 18 00:01:40 UTC 2012 --- testing/glibc/PKGBUILD | 27 ++++++++++++------- testing/glibc/nscd.rcd | 65 +++++++++++++++++++++++++++++++++++++++++++++ testing/glibc/nscd.service | 17 ++++++++++++ testing/glibc/nscd.tmpfiles | 1 + 4 files changed, 100 insertions(+), 10 deletions(-) create mode 100755 testing/glibc/nscd.rcd create mode 100644 testing/glibc/nscd.service create mode 100644 testing/glibc/nscd.tmpfiles (limited to 'testing/glibc') diff --git a/testing/glibc/PKGBUILD b/testing/glibc/PKGBUILD index bbcbf2f19..1e82d8ce2 100644 --- a/testing/glibc/PKGBUILD +++ b/testing/glibc/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 161273 2012-06-08 12:53:50Z allan $ +# $Id: PKGBUILD 161927 2012-06-16 17:14:28Z dreisner $ # Maintainer: Allan McRae # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc @@ -6,7 +6,7 @@ pkgname=glibc pkgver=2.15 -pkgrel=11 +pkgrel=12 _glibcdate=20111227 pkgdesc="GNU C Library" arch=('i686' 'x86_64') @@ -50,7 +50,9 @@ source=(ftp://ftp.archlinux.org/other/glibc/${pkgname}-${pkgver}_${_glibcdate}.t glibc-2.15-nearbyintf-rounding.patch glibc-2.15-confstr-local-buffer-extent.patch glibc-2.15-testsuite.patch - nscd + nscd.rcd + nscd.service + nscd.tmpfiles locale.gen.txt locale-gen) md5sums=('6ffdf5832192b92f98bdd125317c0dfc' @@ -83,10 +85,13 @@ md5sums=('6ffdf5832192b92f98bdd125317c0dfc' '7ff501435078b1a2622124fbeaafc921' '8d1023a51e0932681b46440d5f8551ee' '6962c3fa29306bfbf6f0d22b19cb825d' - 'b587ee3a70c9b3713099295609afde49' + '589d79041aa767a5179eaa4e2737dd3f' + 'ad8a9af15ab7eeaa23dc7ee85024af9f' + 'bccbe5619e75cf1d97312ec3681c605c' '07ac979b6ab5eeb778d55f041529d623' '476e9113489f93b348b21e144b6a8fcf') + mksource() { git clone git://sourceware.org/git/glibc.git pushd glibc @@ -269,15 +274,17 @@ package() { rm -f ${pkgdir}/etc/ld.so.{cache,conf} - install -dm755 ${pkgdir}/etc/rc.d - install -dm755 ${pkgdir}/usr/sbin - install -dm755 ${pkgdir}/usr/lib/locale + install -dm755 ${pkgdir}/{etc/rc.d,usr/{sbin,lib/{,locale,systemd/system,tmpfiles.d}}} + install -m644 ${srcdir}/glibc/nscd/nscd.conf ${pkgdir}/etc/nscd.conf - install -m755 ${srcdir}/nscd ${pkgdir}/etc/rc.d/nscd - install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin + sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf + install -m755 ${srcdir}/nscd.rcd ${pkgdir}/etc/rc.d/nscd + install -m644 ${srcdir}/nscd.service ${pkgdir}/usr/lib/systemd/system + install -m644 ${srcdir}/nscd.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/nscd.conf + install -m644 ${srcdir}/glibc/posix/gai.conf ${pkgdir}/etc/gai.conf - sed -i -e 's/^\tserver-user/#\tserver-user/' ${pkgdir}/etc/nscd.conf + install -m755 ${srcdir}/locale-gen ${pkgdir}/usr/sbin # create /etc/locale.gen install -m644 ${srcdir}/locale.gen.txt ${pkgdir}/etc/locale.gen diff --git a/testing/glibc/nscd.rcd b/testing/glibc/nscd.rcd new file mode 100755 index 000000000..4b48ab002 --- /dev/null +++ b/testing/glibc/nscd.rcd @@ -0,0 +1,65 @@ +#!/bin/bash + +daemon_name="nscd" + +. /etc/rc.conf +. /etc/rc.d/functions + + +get_pid() { + pidof -o %PPID $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name daemon" + PID=$(get_pid) + if [[ -z $PID ]]; then + rm -f /run/$daemon_name.pid + mkdir -p /run/nscd /var/db/nscd + rm -f /run/nscd/* /var/db/nscd/* + $daemon_name + if (( $? > 0 )); then + stat_fail + exit 1 + else + echo $(get_pid) > /var/run/$daemon_name.pid + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + [[ -n $PID ]] && nscd --shutdown &> /dev/null + if (( $? > 0 )); then + stat_fail + exit 1 + else + rm -f /run/$daemon_name.pid &> /dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + sleep 3 + $0 start + ;; + + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + + *) + echo "usage: $0 {start|stop|restart|status}" +esac + +exit 0 diff --git a/testing/glibc/nscd.service b/testing/glibc/nscd.service new file mode 100644 index 000000000..de5315e9b --- /dev/null +++ b/testing/glibc/nscd.service @@ -0,0 +1,17 @@ +[Unit] +Description=Name Service Cache Daemon +After=syslog.target + +[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 service +Restart=always +PIDFile=/run/nscd/nscd.pid + +[Install] +WantedBy=multi-user.target diff --git a/testing/glibc/nscd.tmpfiles b/testing/glibc/nscd.tmpfiles new file mode 100644 index 000000000..8a24a785e --- /dev/null +++ b/testing/glibc/nscd.tmpfiles @@ -0,0 +1 @@ +d /run/nscd 0755 root root -- cgit v1.2.3-54-g00ecf