From afa4a7c1c834a346bf52e95307507160adcddb2b8d540f2e55770f0cd0180acc Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 7 Jul 2011 08:29:39 +0000 Subject: [PATCH] Accepting request 75602 from home:a_jaeger:branches:openSUSE:Factory Cleanup; add nscd systemd config files. OBS-URL: https://build.opensuse.org/request/show/75602 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=78 --- glibc-2.8-getconf.diff | 4 +++- glibc.changes | 5 +++++ glibc.spec | 22 +++++++++++++++++++--- nscd.conf | 1 + nscd.service | 14 ++++++++++++++ nscd.socket | 8 ++++++++ 6 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 nscd.conf create mode 100644 nscd.service create mode 100644 nscd.socket diff --git a/glibc-2.8-getconf.diff b/glibc-2.8-getconf.diff index 9c0879e..fdf9c05 100644 --- a/glibc-2.8-getconf.diff +++ b/glibc-2.8-getconf.diff @@ -1,4 +1,6 @@ -This is required for too noisy rpmlint. +This is required for too noisy rpmlint: +glibc.i586: E: hardlink-across-partition (Badness: 10000) /usr/lib/getconf/POSIX_V7_ILP32_OFFBIG /usr/bin/getconf + Index: posix/Makefile =================================================================== diff --git a/glibc.changes b/glibc.changes index 8343320..c05d086 100644 --- a/glibc.changes +++ b/glibc.changes @@ -3,6 +3,11 @@ Wed Jul 6 08:24:45 UTC 2011 - lnussel@suse.de - enable glibc-2.8-getconf.diff again to fix build failure +------------------------------------------------------------------- +Tue Jul 5 20:22:50 UTC 2011 - aj@suse.de + +- Add systemd configuration for nscd. + ------------------------------------------------------------------- Tue Jul 5 08:03:26 UTC 2011 - aj@suse.de diff --git a/glibc.spec b/glibc.spec index 5c8c362..8585efd 100644 --- a/glibc.spec +++ b/glibc.spec @@ -90,6 +90,11 @@ Source10: bindresvport.blacklist Source12: glibc_post_upgrade.c Source15: glibc.rpmlintrc Source16: baselibs.conf +# For systemd +Source20: nscd.conf +Source21: nscd.service +Source22: nscd.socket + Requires(pre): filesystem Provides: rtld(GNU_HASH) BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -131,7 +136,7 @@ Patch18: glibc-2.3.3-amd64-s_ceil.diff Patch20: glibc-2.4-china.diff # PATCH-FIX-OPENSUSE Fix gb18030 code bnc#54080 Patch21: glibc-2.3.4-gb18030-big5hkscs.diff.bz2 -# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines +# PATCH-FIX-OPENSUSE Handle Patch22: glibc-2.4.90-nscd.diff # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch23: glibc-2.3.3-nscd-db-path.diff @@ -143,7 +148,7 @@ Patch25: glibc-2.3.90-langpackdir.diff Patch27: glibc-2.6-configure.diff # PATCH-FIX-OPENSUSE Fix hangs in UDP RPC calls bso#5379 Patch28: glibc-2.2-sunrpc.diff -# PATCH-FIX-OPENSUSE Workaround rpmlint warning +# PATCH-FIX-OPENSUSE Do not generate hardlink for getconf Patch29: glibc-2.8-getconf.diff # PATCH-FIX-OPENSUSE only use ipv6 if real ipv6 address exists bnc#361697, bnc#684534 Patch30: getaddrinfo-ipv6-sanity.diff @@ -173,7 +178,7 @@ Patch47: glibc-nscd-hconf.diff Patch48: glibc-malloc-arena-max.diff # PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch49: glibc-fini-unwind.diff -# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines +# PATCH-FIX-UPSTREAM install gconv-modules aj@suse.de Patch50: glibc-gconvcache-s390.diff # PATCH-FIX-UPSTREAM - Fix alloca argument bso#12445 aj@suse.de Patch51: glibc-vfprintf-positional.diff @@ -827,6 +832,13 @@ for o in %{buildroot}/%{_libdir}/crt[1in].o %{buildroot}/%{_libdir}/lib*_nonshar objcopy -R ".comment.SUSE.OPTs" -R ".note.gnu.build-id" $o done +mkdir -p %{buildroot}/usr/lib/tmpfiles.d/ +install -m 644 %{SOURCE20} %{buildroot}/usr/lib/tmpfiles.d/ +mkdir -p %{buildroot}/lib/systemd/system +install -m 644 %{SOURCE21} %{buildroot}/lib/systemd/system +install -m 644 %{SOURCE22} %{buildroot}/lib/systemd/system + + ####################################################################### ### ### ... @@ -1104,6 +1116,10 @@ exit 0 %config /etc/init.d/nscd %{_sbindir}/nscd %{_sbindir}/rcnscd +/lib/systemd/system/nscd.service +/lib/systemd/system/nscd.socket +%dir /usr/lib/tmpfiles.d +/usr/lib/tmpfiles.d/nscd.conf %dir %attr(0755,root,root) %ghost /var/run/nscd %attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid %attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket diff --git a/nscd.conf b/nscd.conf new file mode 100644 index 0000000..1807bd5 --- /dev/null +++ b/nscd.conf @@ -0,0 +1 @@ +d /var/run/nscd 0755 root root diff --git a/nscd.service b/nscd.service new file mode 100644 index 0000000..80e7626 --- /dev/null +++ b/nscd.service @@ -0,0 +1,14 @@ +[Unit] +Description=Name Service Cache Daemon +After=syslog.target + +[Service] +Type=forking +ExecStart=/usr/sbin/nscd +ExecStop=/usr/sbin/nscd --shutdown +Restart=always +PIDFile=/var/run/nscd/nscd.pid + +[Install] +WantedBy=multi-user.target +Also=nscd.socket diff --git a/nscd.socket b/nscd.socket new file mode 100644 index 0000000..cec9134 --- /dev/null +++ b/nscd.socket @@ -0,0 +1,8 @@ +[Unit] +Description=Name Service Cache Daemon Socket + +[Socket] +ListenDatagram=/var/run/nscd/socket + +[Install] +WantedBy=sockets.target