aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/glibc
diff options
context:
space:
mode:
authorStanislav Brabec <utx@penguin.cz>2009-08-26 21:14:00 +0000
committerutx@penguin.cz <utx@penguin.cz>2009-08-26 21:14:00 +0000
commit70031b2c7fb634f5b36555860549f3f565d1e373 (patch)
treeeab3ed2b900138832b2b35072e04d69bc877073b /recipes/glibc
parent056a67f6070c5ea561acb65049b551e24f3b7eb6 (diff)
downloadopenembedded-70031b2c7fb634f5b36555860549f3f565d1e373.tar.gz
glibc: nscd: Make it working.
Diffstat (limited to 'recipes/glibc')
-rw-r--r--recipes/glibc/files/nscd-init.patch39
-rw-r--r--recipes/glibc/glibc-package.bbclass11
-rw-r--r--recipes/glibc/glibc.inc2
-rw-r--r--recipes/glibc/glibc_2.9.bb3
-rw-r--r--recipes/glibc/glibc_cvs.bb3
5 files changed, 55 insertions, 3 deletions
diff --git a/recipes/glibc/files/nscd-init.patch b/recipes/glibc/files/nscd-init.patch
new file mode 100644
index 0000000000..884609a5a3
--- /dev/null
+++ b/recipes/glibc/files/nscd-init.patch
@@ -0,0 +1,39 @@
+--- nscd/nscd.init
++++ nscd/nscd.init
+@@ -48,9 +48,8 @@
+
+ start () {
+ [ -d /var/run/nscd ] || mkdir /var/run/nscd
+- [ -d /var/db/nscd ] || mkdir /var/db/nscd
+ echo -n $"Starting $prog: "
+- daemon /usr/sbin/nscd
++ /usr/sbin/nscd
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/nscd
+@@ -67,12 +66,10 @@
+ # a non-privileged user
+ rm -f /var/run/nscd/nscd.pid
+ rm -f /var/run/nscd/socket
+- success $"$prog shutdown"
+- else
+- failure $"$prog shutdown"
+ fi
+- echo
+- return $RETVAL
++ echo "Done."
++ # If nscd did not run, return 0 according to LSB.
++ return 0
+ }
+
+ restart() {
+@@ -104,7 +101,8 @@
+ ;;
+ force-reload | reload)
+ echo -n $"Reloading $prog: "
+- killproc /usr/sbin/nscd -HUP
++ # Use killall, initscripts-1.0-r115 don't support -HUP yet.
++ killall -HUP /usr/sbin/nscd
+ RETVAL=$?
+ echo
+ ;;
diff --git a/recipes/glibc/glibc-package.bbclass b/recipes/glibc/glibc-package.bbclass
index 1ed1b7a515..32ea0e3313 100644
--- a/recipes/glibc/glibc-package.bbclass
+++ b/recipes/glibc/glibc-package.bbclass
@@ -42,7 +42,7 @@ FILES_libsegfault = "${base_libdir}/libSegFault*"
FILES_glibc-extra-nss = "${base_libdir}/libnss*"
FILES_sln = "${base_sbindir}/sln"
FILES_glibc-dev_append = " ${libdir}/*.o ${bindir}/rpcgen"
-FILES_nscd = "${sbindir}/nscd*"
+FILES_nscd = "${sbindir}/nscd* ${sysconfdir}/nscd* ${sysconfdir}/init.d/nscd*"
FILES_glibc-utils = "${bindir}/* ${sbindir}/*"
FILES_glibc-gconv = "${libdir}/gconv/*"
FILES_${PN}-dbg += " ${libdir}/gconv/.debug ${libexecdir}/*/.debug"
@@ -60,6 +60,11 @@ DESCRIPTION_ldd = "glibc: print shared library dependencies"
DESCRIPTION_localedef = "glibc: compile locale definition files"
DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..."
+INITSCRIPT_NAME = "nscd"
+INITSCRIPT_PACKAGES = "nscd"
+INITSCRIPT_PARAMS = "start 40 S . stop 40 0 6 1 ."
+inherit update-rc.d
+
def get_glibc_fpu_setting(bb, d):
if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ]:
return "--without-fp"
@@ -84,8 +89,10 @@ do_install() {
mv ${WORKDIR}/SUPPORTED.tmp ${WORKDIR}/SUPPORTED
done
rm -f ${D}{sysconfdir}/rpc
- install -d ${D}${sysconfdir}
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0644 ${S}/nscd/nscd.conf ${D}${sysconfdir}/
install -m 0644 ${WORKDIR}/etc/ld.so.conf ${D}${sysconfdir}/
+ install ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
}
TMP_LOCALE="/tmp/locale${libdir}/locale"
diff --git a/recipes/glibc/glibc.inc b/recipes/glibc/glibc.inc
index 6e5ca68404..6741b21a58 100644
--- a/recipes/glibc/glibc.inc
+++ b/recipes/glibc/glibc.inc
@@ -11,7 +11,7 @@ PROVIDES = "virtual/libc virtual/${TARGET_PREFIX}libc-for-gcc"
PROVIDES += "virtual/libintl virtual/libiconv"
# INC_PR for glibc.inc, glibc-initial.inc and glibc-stage.inc
-INC_PR = "r34"
+INC_PR = "r35"
inherit autotools
diff --git a/recipes/glibc/glibc_2.9.bb b/recipes/glibc/glibc_2.9.bb
index 9849c0afa6..eb157506c6 100644
--- a/recipes/glibc/glibc_2.9.bb
+++ b/recipes/glibc/glibc_2.9.bb
@@ -45,6 +45,7 @@ RDEPENDS_${PN}-dev = "linux-libc-headers-dev"
SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
ftp://ftp.gnu.org/pub/gnu/glibc/glibc-ports-2.7.tar.bz2 \
ftp://ftp.gnu.org/pub/gnu/glibc/glibc-libidn-${PV}.tar.bz2 \
+ file://nscd-init.patch;patch=1;pnum=0 \
file://arm-memcpy.patch;patch=1 \
file://arm-longlong.patch;patch=1 \
file://fhs-linux-paths.patch;patch=1 \
@@ -125,6 +126,8 @@ addtask munge before do_patch after do_unpack
do_configure () {
+# /var/db was not included to FHS
+ sed -i s:/var/db/nscd:/var/run/nscd: ${S}/nscd/nscd.h
# override this function to avoid the autoconf/automake/aclocal/autoheader
# calls for now
# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
diff --git a/recipes/glibc/glibc_cvs.bb b/recipes/glibc/glibc_cvs.bb
index 4d093de722..5290dfa9e6 100644
--- a/recipes/glibc/glibc_cvs.bb
+++ b/recipes/glibc/glibc_cvs.bb
@@ -37,6 +37,7 @@ RPROVIDES_${PN}-dev += "libc-dev virtual-libc-dev"
# file://ldd.patch;patch=1;pnum=0 \
SRC_URI = "cvs://anoncvs@sources.redhat.com/cvs/glibc;module=libc \
cvs://anoncvs@sources.redhat.com/cvs/glibc;module=ports \
+ file://nscd-init.patch;patch=1;pnum=0 \
file://arm-audit.patch;patch=1 \
file://arm-audit2.patch;patch=1 \
file://arm-memcpy.patch;patch=1 \
@@ -71,6 +72,8 @@ do_munge() {
addtask munge before do_patch after do_unpack
do_configure () {
+# /var/db was not included to FHS
+ sed -i s:/var/db/nscd:/var/run/nscd: ${S}/nscd/nscd.h
# override this function to avoid the autoconf/automake/aclocal/autoheader
# calls for now
# don't pass CPPFLAGS into configure, since it upsets the kernel-headers