]> git.pld-linux.org Git - packages/unscd.git/blame - unscd.spec
up to 0.52: make free_refcounted_ureq() tolerant to pointers to NULLs
[packages/unscd.git] / unscd.spec
CommitLineData
a5677c9e 1Summary: Single threaded NSCD (Name Service Caching Daemon)
0acbfe51 2Name: unscd
a1189f15 3Version: 0.52
360053eb 4Release: 1
0acbfe51
ER
5License: GPL v2
6Group: Networking/Daemons
7Source0: http://busybox.net/~vda/unscd/nscd-%{version}.c
a1189f15 8# Source0-md5: 846d108ed997a3cbd94fe953bea40a48
09c4871c
ER
9Source1: nscd.init
10Source2: nscd.sysconfig
11Source3: nscd.logrotate
12Source4: nscd.conf
f89d5ba4
ER
13Source5: http://svn.donarmstrong.com/deb_pkgs/unscd/trunk/debian/nscd.8
14# Source5-md5: eac364084cae21114174404790dfc0df
96a75a87 15Source6: nscd.tmpfiles
96f723d5 16URL: http://busybox.net/~vda/unscd/
5c1495e5 17BuildRequires: rpmbuild(macros) >= 1.644
09c4871c
ER
18Provides: group(nscd)
19Requires(post): fileutils
20Requires(post,preun): /sbin/chkconfig
21Requires(postun): /usr/sbin/groupdel
22Requires(postun): /usr/sbin/userdel
23Requires(pre): /bin/id
24Requires(pre): /usr/bin/getgid
25Requires(pre): /usr/sbin/groupadd
26Requires(pre): /usr/sbin/useradd
f87ccbf9 27Requires: rc-scripts >= 0.4.1.26
09c4871c 28Provides: user(nscd)
5c1495e5 29Obsoletes: gnscd
09c4871c 30Obsoletes: nscd
0acbfe51
ER
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
56b4846c 33# glibc private symbols
0ed36568 34%define _noautoreq GLIBC_PRIVATE
56b4846c 35
0acbfe51 36%description
a5677c9e
ER
37A daemon which handles passwd, group and host lookups for running
38programs and caches the results for the next query. You only need this
39package if you are using slow Name Services like LDAP, NIS or NIS+.
0acbfe51 40
a5677c9e
ER
41This particular NSCD is a complete rewrite of the GNU glibc nscd which
42is a single threaded server process which offloads all NSS lookups to
43worker children; cache hits are handled by the parent, and only cache
44misses start worker children, making the parent immune to resource
45leaks, hangs, and crashes in NSS libraries.
46
47It should mostly be a drop-in replacement for existing installs using
48nscd.
0acbfe51
ER
49
50%prep
51%setup -qcT
3ec8870b
ER
52%{__sed} -ne '/Description:/,/\*\*\*/p' %{SOURCE0} > README
53
54%{__sed} -e '/#define DEBUG_BUILD/ s,^,// ,' %{SOURCE0} > %{name}.c
0acbfe51
ER
55
56%build
3ec8870b 57%{__cc} -o %{name} %{rpmcflags} %{!?debug:-Os} %{rpmcppflags} -DDEBUG_BUILD=0%{?debug:1} %{rpmldflags} -Wall -Wunused-parameter -Wl,--sort-section -Wl,alignment -Wl,--sort-common %{name}.c
0acbfe51
ER
58
59%install
60rm -rf $RPM_BUILD_ROOT
5c1495e5 61install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man8,/var/log,/var/run/nscd,/etc/{logrotate.d,rc.d/init.d,sysconfig},%{systemdtmpfilesdir}}
3ec8870b 62install -p %{name} $RPM_BUILD_ROOT%{_sbindir}/nscd
09c4871c 63install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nscd
f89d5ba4
ER
64cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_mandir}/man8
65cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/nscd
66cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/logrotate.d/nscd
67cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}
5c1495e5 68cp -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nscd.conf
09c4871c 69: > $RPM_BUILD_ROOT/var/log/nscd
0acbfe51
ER
70
71%clean
72rm -rf $RPM_BUILD_ROOT
73
09c4871c
ER
74%pre
75%groupadd -P nscd -g 144 -r nscd
76%useradd -P nscd -u 144 -r -d /tmp -s /bin/false -c "Name Service Cache Daemon" -g nscd nscd
77
78%post
79if [ ! -f /var/log/nscd ]; then
80 umask 027
81 touch /var/log/nscd
82 chown root:root /var/log/nscd
83 chmod 640 /var/log/nscd
84fi
85/sbin/chkconfig --add nscd
86%service nscd restart "Name Service Cache Daemon"
87
88%preun
89if [ "$1" = "0" ]; then
90 %service nscd stop
91 /sbin/chkconfig --del nscd
92fi
93
94%postun
95if [ "$1" = "0" ]; then
96 %userremove nscd
97 %groupremove nscd
98fi
99
0acbfe51
ER
100%files
101%defattr(644,root,root,755)
102%doc README
09c4871c
ER
103%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/nscd
104%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nscd.conf
105%attr(754,root,root) /etc/rc.d/init.d/nscd
106%attr(755,root,root) %{_sbindir}/nscd
f89d5ba4 107%{_mandir}/man8/nscd.8*
09c4871c
ER
108%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/nscd
109%attr(640,root,root) %ghost /var/log/nscd
5c1495e5 110%{systemdtmpfilesdir}/nscd.conf
09c4871c 111%dir /var/run/nscd
This page took 0.086769 seconds and 4 git commands to generate.