2 # - consider name change
4 Summary: LDAP Name Service Switch Module
5 Summary(es.UTF-8): Biblioteca NSS para LDAP
6 Summary(pl.UTF-8): Moduł NSS LDAP
7 Summary(pt_BR.UTF-8): Biblioteca NSS para LDAP
13 Source0: http://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-%{version}.tar.gz
14 # Source0-md5: 0c60d4c300dd9a4fb40b6ba7abeed8a2
16 Source2: nslcd.service
17 Source3: nslcd.tmpfiles
18 Patch0: %{name}-no-root.patch
19 Patch1: optimize-queries.patch
20 Patch2: ntohl-signedness.patch
21 Patch3: fix-to_date.patch
22 URL: http://arthurdejong.org/nss-pam-ldapd/
23 BuildRequires: autoconf >= 2.61
24 BuildRequires: automake
25 BuildRequires: cyrus-sasl-devel
26 BuildRequires: docbook2X
27 BuildRequires: heimdal-devel
28 BuildRequires: openldap-devel >= 2.3.0
29 BuildRequires: pam-devel
30 BuildRequires: rpmbuild(macros) >= 1.671
31 Requires: nslcd = %{version}-%{release}
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 %define _libdir /%{_lib}
38 nss_ldapd is a C library extension (NSS module) and daemon which
39 allows X.500 and LDAP directory servers to be used as a primary source
40 of aliases, ethers, groups, hosts, networks, protocols, users, RPCs,
41 services and shadow passwords (instead of or in addition to using flat
44 %description -l pl.UTF-8
45 Moduł serwisu nazw oraz osobny demon. Ten pakiet pozwala na
46 korzystanie z serwerów X.500 i LDAP jako źródła aliasów, grup, hostów,
47 sieci, protokołów, użytkowników, RPC, usług i haseł (zamiast lub
48 oprócz zwykłych plików lub NIS).
50 nss_ldapd jest forkiem projektu nss_ldap. Celem projektu jest
51 naprawienie pewnych problemów z nss_ldap poprzez wydzielenie kodu LDAP
55 Summary: NSS LDAPD name service daemon
56 Summary(pl.UTF-8): Demon serwisu nazw NSS LDAPD
58 Requires(post,preun): /sbin/chkconfig
59 Requires(post,preun,postun): systemd-units >= 38
60 Requires: rc-scripts >= 0.2.0
61 Requires: systemd-units >= 38
62 Provides: nslcd = %{version}-%{release}
65 NSS LDAPD name service daemon.
67 %description nslcd -l pl.UTF-8
68 Demon serwisu nazw NSS LDAPD.
71 Summary: Utilities using NSLCD for LDAPD operations
72 Summary(pl.UTF-8): Demon serwisu nazw NSS LDAPD
74 Requires: nslcd = %{version}-%{release}
76 %description nslcd-utils
77 Utilities using NSLCD for LDAPD operations.
79 %description nslcd-utils -l pl.UTF-8
80 Narzędzia wykorzystujące NSLCD do operacji LDAP-owych.
83 Summary: NSS LDAPD Pluggable Authentication Module
84 Summary(pl.UTF-8): Moduł PAM do uwierzytelniania z użyciem NSS LDAPD
86 Requires: nslcd = %{version}-%{release}
87 Conflicts: pam-pam_ldap
90 This is pam_ldap, a pluggable authentication module that can be used
91 with linux-PAM. This module supports authentication, account
92 management, password management and session management.
94 %description pam -l pl.UTF-8
95 To jest pam_ldap, wymienny moduł uwierzytelniania, który może być
96 użyty z linux-PAM. Moduł ten wspiera autentykację, obsługę kont,
97 zmianę haseł i obsługę sesji.
100 %setup -q -n nss-pam-ldapd-%{version}
106 %{__sed} -i -e '1s|#!.*|#!%{__python}|' utils/*.py
110 DOCBOOK2X_MAN=/usr/bin/docbook2X2man \
111 --with-pam-seclib-dir=/%{_lib}/security \
112 --with-ldap-lib=openldap
117 rm -rf $RPM_BUILD_ROOT
118 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d,/var/run/nslcd} \
119 $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}}
122 DESTDIR=$RPM_BUILD_ROOT
124 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nslcd
125 install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/nslcd.service
126 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nslcd.conf
129 rm -rf $RPM_BUILD_ROOT
131 %post -p /sbin/ldconfig
132 %postun -p /sbin/ldconfig
135 %useradd -u 21 -d /usr/share/empty -s /bin/false -c "NSS LDAP Cache Daemon User" -g nobody nslcd
138 /sbin/chkconfig --add nslcd
139 %service nslcd restart "NSS LDAP Cache Daemon"
140 %systemd_post nslcd.service
143 if [ "$1" = "0" ]; then
145 /sbin/chkconfig --del nslcd
147 %systemd_preun nslcd.service
150 if [ "$1" = "0" ]; then
155 %triggerpostun nslcd -- nss_ldapd < 0.7.0
156 if [ -e %{_sysconfdir}/nss-ldapd.conf.rpmsave ]; then
157 mv -f %{_sysconfdir}/nslcd.conf{,rpmnew}
158 mv -f %{_sysconfdir}/nss-ldapd.conf.rpmsave %{_sysconfdir}/nslcd.conf
161 %triggerpostun nslcd -- nslcd < 0.9.2-1
162 %systemd_trigger nslcd.service
165 %defattr(644,root,root,755)
166 %doc AUTHORS ChangeLog NEWS README TODO
167 %attr(755,root,root) %{_libdir}/libnss_ldap.so.2
170 %defattr(644,root,root,755)
171 %attr(754,root,root) /etc/rc.d/init.d/nslcd
172 %{systemdunitdir}/nslcd.service
173 %attr(640,nslcd,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nslcd.conf
174 %attr(755,root,root) %{_sbindir}/nslcd
175 %{_mandir}/man5/nslcd.conf.5*
176 %{_mandir}/man8/nslcd.8*
178 %{systemdtmpfilesdir}/nslcd.conf
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_bindir}/chsh.ldap
183 %attr(755,root,root) %{_bindir}/getent.ldap
184 %attr(755,root,root) %{_datadir}/nslcd-utils/chsh.py
185 %dir %{_datadir}/nslcd-utils
186 %{_datadir}/nslcd-utils/cmdline.py
187 %{_datadir}/nslcd-utils/constants.py
188 %attr(755,root,root) %{_datadir}/nslcd-utils/getent.py
189 %{_datadir}/nslcd-utils/nslcd.py
190 %{_datadir}/nslcd-utils/shells.py
191 %{_datadir}/nslcd-utils/users.py
192 %{_datadir}/nslcd-utils/*.py[co]
193 %{_mandir}/man1/chsh.ldap.1*
194 %{_mandir}/man1/getent.ldap.1*
197 %defattr(644,root,root,755)
198 %attr(755,root,root) /%{_lib}/security/pam_ldap.so
199 %{_mandir}/man8/pam_ldap.8*