From 9904b034651d6ea983af524f3c6b9870f4f1c7cd Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 18 Jan 2010 19:56:17 +0100 Subject: [PATCH] glibc: some fixes to improve nscd and nsswitch.conf. * nsswitch.conf: enable nss_mdns by default. Won't do any harm if it's not installed. * Moved info files to -devel subpkgs, where they belong. * nscd.conf: removed debug-level that made a lot of spam. Bump revision for involved pkgs. --HG-- extra : convert_revision : ac0615ffd29ca5e8712ca456db76f5f0c542f89c --- srcpkgs/glibc/files/nscd.conf | 1 - srcpkgs/glibc/files/nsswitch.conf | 15 +++++++++++++++ srcpkgs/glibc/glibc-devel.template | 6 +++++- srcpkgs/glibc/nscd.template | 2 ++ srcpkgs/glibc/template | 18 +++--------------- 5 files changed, 25 insertions(+), 17 deletions(-) create mode 100644 srcpkgs/glibc/files/nsswitch.conf diff --git a/srcpkgs/glibc/files/nscd.conf b/srcpkgs/glibc/files/nscd.conf index 0745f8cc69..4c551dd637 100644 --- a/srcpkgs/glibc/files/nscd.conf +++ b/srcpkgs/glibc/files/nscd.conf @@ -1,7 +1,6 @@ # Configuration file for nscd(8). # logfile /var/log/nscd.log -debug-level 1 server-user nobody enable-cache passwd yes enable-cache group yes diff --git a/srcpkgs/glibc/files/nsswitch.conf b/srcpkgs/glibc/files/nsswitch.conf new file mode 100644 index 0000000000..90638a446e --- /dev/null +++ b/srcpkgs/glibc/files/nsswitch.conf @@ -0,0 +1,15 @@ +# /etc/nsswitch.conf +# +# See nsswitch.conf(5) for information. +# +passwd: files +group: files +shadow: files + +hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 +networks: files + +protocols: files +services: files +ethers: files +rpc: files diff --git a/srcpkgs/glibc/glibc-devel.template b/srcpkgs/glibc/glibc-devel.template index 44104915f8..a3991628f7 100644 --- a/srcpkgs/glibc/glibc-devel.template +++ b/srcpkgs/glibc/glibc-devel.template @@ -5,15 +5,19 @@ long_desc="${long_desc} This package contains files for development: headers, static libs, etc." +revision=1 + +Add_dependency run kernel-libc-headers Add_dependency run glibc do_install() { - mkdir -p ${DESTDIR}/usr/lib + mkdir -p ${DESTDIR}/usr/lib ${DESTDIR}/usr/share mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr mv ${SRCPKGDESTDIR}/usr/lib/*.a ${DESTDIR}/usr/lib mv ${SRCPKGDESTDIR}/usr/lib/*.so ${DESTDIR}/usr/lib mv ${SRCPKGDESTDIR}/usr/lib/*crt1.o ${DESTDIR}/usr/lib + mv ${SRCPKGDESTDIR}/usr/share/info ${DESTDIR}/usr/share # Remove scsi.h, it's installed by kernel-libc-headers. rm -f ${DESTDIR}/usr/include/scsi/scsi.h diff --git a/srcpkgs/glibc/nscd.template b/srcpkgs/glibc/nscd.template index b309a7ae9d..d5fef0512a 100644 --- a/srcpkgs/glibc/nscd.template +++ b/srcpkgs/glibc/nscd.template @@ -5,6 +5,8 @@ long_desc=" This package contains nscd, a daemon that provides a cache for the most common name service requests." +revision=1 + openrc_services="nscd default" conf_files="/etc/nscd.conf" diff --git a/srcpkgs/glibc/template b/srcpkgs/glibc/template index 5ceaf73bca..6bffb908e8 100644 --- a/srcpkgs/glibc/template +++ b/srcpkgs/glibc/template @@ -1,6 +1,7 @@ # Template file for 'glibc' pkgname=glibc version=2.11.1 +revision=1 distfiles="http://ftp.gnu.org/gnu/glibc/glibc-${version}.tar.bz2" build_style=gnu_configure build_wrksrc="build" @@ -66,21 +67,8 @@ post_install() sed -i "s|^RTLDLIST.*$|RTLDLIST=\"$rtldlist\"|" \ ${DESTDIR}/usr/bin/ldd fi - - # Create nsswitch.conf - ( \ - echo "passwd: files"; \ - echo "group: files"; \ - echo "shadow: files"; \ - echo; \ - echo "hosts: files dns"; \ - echo "networks: files"; \ - echo; \ - echo "protocols: files"; \ - echo "services: files"; \ - echo "ethers: files"; \ - echo "rpc: files"; \ - ) > ${DESTDIR}/etc/nsswitch.conf + install -m644 ${FILESDIR}/nsswitch.conf \ + ${DESTDIR}/etc/nsswitch.conf || return 1 rm -f ${DESTDIR}/etc/ld.so.cache }