summaryrefslogtreecommitdiff
path: root/core/glibc
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@kiwwwi.com.ar>2012-06-23 23:53:55 -0300
committerNicolás Reynolds <fauno@kiwwwi.com.ar>2012-06-23 23:53:55 -0300
commita0426fca029e4fabdbd378793c5c12a4a808abb7 (patch)
treefbeda447b8e1352c8943b036e432e00697aef8e1 /core/glibc
parentc9e2e09a44815d2ae06f1da099f6a71ad4ac9ae2 (diff)
parent4319f36e44d4e7c70bf010c3286bb1739c59d4de (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/chrony/PKGBUILD community/lxdm/PKGBUILD community/oidentd/PKGBUILD community/oss/PKGBUILD community/pdnsd/PKGBUILD community/ruby-cairo/PKGBUILD community/subtle/PKGBUILD core/lvm2/PKGBUILD core/openldap/PKGBUILD extra/smartmontools/PKGBUILD
Diffstat (limited to 'core/glibc')
-rw-r--r--core/glibc/PKGBUILD27
-rwxr-xr-xcore/glibc/nscd.rcd65
-rw-r--r--core/glibc/nscd.service17
-rw-r--r--core/glibc/nscd.tmpfiles1
4 files changed, 100 insertions, 10 deletions
diff --git a/core/glibc/PKGBUILD b/core/glibc/PKGBUILD
index 849f6910d..2c119d97e 100644
--- a/core/glibc/PKGBUILD
+++ b/core/glibc/PKGBUILD
@@ -1,4 +1,4 @@
-# $Id: PKGBUILD 161348 2012-06-10 05:52:29Z allan $
+# $Id: PKGBUILD 162151 2012-06-22 12:55:07Z dreisner $
# Maintainer: Allan McRae <allan@archlinux.org>
# 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
_glibcportsver=2.15
_glibcportsdate=20120127
@@ -53,7 +53,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'
@@ -87,10 +89,13 @@ md5sums=('6ffdf5832192b92f98bdd125317c0dfc'
'7ff501435078b1a2622124fbeaafc921'
'8d1023a51e0932681b46440d5f8551ee'
'6962c3fa29306bfbf6f0d22b19cb825d'
- 'b587ee3a70c9b3713099295609afde49'
+ '589d79041aa767a5179eaa4e2737dd3f'
+ 'ad8a9af15ab7eeaa23dc7ee85024af9f'
+ 'bccbe5619e75cf1d97312ec3681c605c'
'07ac979b6ab5eeb778d55f041529d623'
'476e9113489f93b348b21e144b6a8fcf')
+
mksource() {
git clone http://sourceware.org/git/glibc.git
pushd glibc
@@ -292,15 +297,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/core/glibc/nscd.rcd b/core/glibc/nscd.rcd
new file mode 100755
index 000000000..4b48ab002
--- /dev/null
+++ b/core/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/core/glibc/nscd.service b/core/glibc/nscd.service
new file mode 100644
index 000000000..de5315e9b
--- /dev/null
+++ b/core/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/core/glibc/nscd.tmpfiles b/core/glibc/nscd.tmpfiles
new file mode 100644
index 000000000..8a24a785e
--- /dev/null
+++ b/core/glibc/nscd.tmpfiles
@@ -0,0 +1 @@
+d /run/nscd 0755 root root