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 Patch4: shadowExpire-from-AD.patch
23 URL: http://arthurdejong.org/nss-pam-ldapd/
24 BuildRequires: autoconf >= 2.61
25 BuildRequires: automake
26 BuildRequires: cyrus-sasl-devel
27 BuildRequires: docbook2X
28 BuildRequires: heimdal-devel
29 BuildRequires: openldap-devel >= 2.3.0
30 BuildRequires: pam-devel
31 BuildRequires: rpmbuild(macros) >= 1.671
32 Requires: nslcd = %{version}-%{release}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 %define _libdir /%{_lib}
39 nss_ldapd is a C library extension (NSS module) and daemon which
40 allows X.500 and LDAP directory servers to be used as a primary source
41 of aliases, ethers, groups, hosts, networks, protocols, users, RPCs,
42 services and shadow passwords (instead of or in addition to using flat
45 %description -l pl.UTF-8
46 Moduł serwisu nazw oraz osobny demon. Ten pakiet pozwala na
47 korzystanie z serwerów X.500 i LDAP jako źródła aliasów, grup, hostów,
48 sieci, protokołów, użytkowników, RPC, usług i haseł (zamiast lub
49 oprócz zwykłych plików lub NIS).
51 nss_ldapd jest forkiem projektu nss_ldap. Celem projektu jest
52 naprawienie pewnych problemów z nss_ldap poprzez wydzielenie kodu LDAP
56 Summary: NSS LDAPD name service daemon
57 Summary(pl.UTF-8): Demon serwisu nazw NSS LDAPD
59 Requires(post,preun): /sbin/chkconfig
60 Requires(post,preun,postun): systemd-units >= 38
61 Requires: rc-scripts >= 0.2.0
62 Requires: systemd-units >= 38
63 Provides: nslcd = %{version}-%{release}
66 NSS LDAPD name service daemon.
68 %description nslcd -l pl.UTF-8
69 Demon serwisu nazw NSS LDAPD.
72 Summary: Utilities using NSLCD for LDAPD operations
73 Summary(pl.UTF-8): Demon serwisu nazw NSS LDAPD
75 Requires: nslcd = %{version}-%{release}
77 %description nslcd-utils
78 Utilities using NSLCD for LDAPD operations.
80 %description nslcd-utils -l pl.UTF-8
81 Narzędzia wykorzystujące NSLCD do operacji LDAP-owych.
84 Summary: NSS LDAPD Pluggable Authentication Module
85 Summary(pl.UTF-8): Moduł PAM do uwierzytelniania z użyciem NSS LDAPD
87 Requires: nslcd = %{version}-%{release}
88 Conflicts: pam-pam_ldap
91 This is pam_ldap, a pluggable authentication module that can be used
92 with linux-PAM. This module supports authentication, account
93 management, password management and session management.
95 %description pam -l pl.UTF-8
96 To jest pam_ldap, wymienny moduł uwierzytelniania, który może być
97 użyty z linux-PAM. Moduł ten wspiera autentykację, obsługę kont,
98 zmianę haseł i obsługę sesji.
101 %setup -q -n nss-pam-ldapd-%{version}
108 %{__sed} -i -e '1s|#!.*|#!%{__python}|' utils/*.py
112 DOCBOOK2X_MAN=/usr/bin/docbook2X2man \
113 --with-pam-seclib-dir=/%{_lib}/security \
114 --with-ldap-lib=openldap
119 rm -rf $RPM_BUILD_ROOT
120 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d,/var/run/nslcd} \
121 $RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}}
124 DESTDIR=$RPM_BUILD_ROOT
126 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nslcd
127 install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/nslcd.service
128 install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nslcd.conf
131 rm -rf $RPM_BUILD_ROOT
133 %post -p /sbin/ldconfig
134 %postun -p /sbin/ldconfig
137 %useradd -u 21 -d /usr/share/empty -s /bin/false -c "NSS LDAP Cache Daemon User" -g nobody nslcd
140 /sbin/chkconfig --add nslcd
141 %service nslcd restart "NSS LDAP Cache Daemon"
142 %systemd_post nslcd.service
145 if [ "$1" = "0" ]; then
147 /sbin/chkconfig --del nslcd
149 %systemd_preun nslcd.service
152 if [ "$1" = "0" ]; then
157 %triggerpostun nslcd -- nss_ldapd < 0.7.0
158 if [ -e %{_sysconfdir}/nss-ldapd.conf.rpmsave ]; then
159 mv -f %{_sysconfdir}/nslcd.conf{,rpmnew}
160 mv -f %{_sysconfdir}/nss-ldapd.conf.rpmsave %{_sysconfdir}/nslcd.conf
163 %triggerpostun nslcd -- nslcd < 0.9.2-1
164 %systemd_trigger nslcd.service
167 %defattr(644,root,root,755)
168 %doc AUTHORS ChangeLog NEWS README TODO
169 %attr(755,root,root) %{_libdir}/libnss_ldap.so.2
172 %defattr(644,root,root,755)
173 %attr(754,root,root) /etc/rc.d/init.d/nslcd
174 %{systemdunitdir}/nslcd.service
175 %attr(640,nslcd,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nslcd.conf
176 %attr(755,root,root) %{_sbindir}/nslcd
177 %{_mandir}/man5/nslcd.conf.5*
178 %{_mandir}/man8/nslcd.8*
180 %{systemdtmpfilesdir}/nslcd.conf
183 %defattr(644,root,root,755)
184 %attr(755,root,root) %{_bindir}/chsh.ldap
185 %attr(755,root,root) %{_bindir}/getent.ldap
186 %attr(755,root,root) %{_datadir}/nslcd-utils/chsh.py
187 %dir %{_datadir}/nslcd-utils
188 %{_datadir}/nslcd-utils/cmdline.py
189 %{_datadir}/nslcd-utils/constants.py
190 %attr(755,root,root) %{_datadir}/nslcd-utils/getent.py
191 %{_datadir}/nslcd-utils/nslcd.py
192 %{_datadir}/nslcd-utils/shells.py
193 %{_datadir}/nslcd-utils/users.py
194 %{_datadir}/nslcd-utils/*.py[co]
195 %{_mandir}/man1/chsh.ldap.1*
196 %{_mandir}/man1/getent.ldap.1*
199 %defattr(644,root,root,755)
200 %attr(755,root,root) /%{_lib}/security/pam_ldap.so
201 %{_mandir}/man8/pam_ldap.8*