[packages/nss_ldapd] - updated to 0.9.2 - added utils subpackage - added systemd service - renamed tmpfiles config, it's

baggins baggins at pld-linux.org
Tue Dec 10 20:38:13 CET 2013


commit ee246e95c0ef20cbffd7285b1598a11b4c88c83c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Dec 10 20:37:00 2013 +0100

    - updated to 0.9.2
    - added utils subpackage
    - added systemd service
    - renamed tmpfiles config, it's only for nslcd
    - moved deamon deps to nslcd package

 nslcd.service                        | 10 ++++++
 nss_ldapd.tmpfiles => nslcd.tmpfiles |  0
 nss_ldapd.spec                       | 59 ++++++++++++++++++++++++++++++------
 3 files changed, 59 insertions(+), 10 deletions(-)
---
diff --git a/nss_ldapd.spec b/nss_ldapd.spec
index 762a64e..f10d714 100644
--- a/nss_ldapd.spec
+++ b/nss_ldapd.spec
@@ -6,14 +6,15 @@ Summary(es.UTF-8):	Biblioteca NSS para LDAP
 Summary(pl.UTF-8):	Moduł NSS LDAP
 Summary(pt_BR.UTF-8):	Biblioteca NSS para LDAP
 Name:		nss_ldapd
-Version:	0.8.12
+Version:	0.9.2
 Release:	1
 License:	LGPL v2.1+
 Group:		Base
 Source0:	http://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-%{version}.tar.gz
-# Source0-md5:	83121b0a536e763a9c0e3eec66ab2ef8
+# Source0-md5:	0c60d4c300dd9a4fb40b6ba7abeed8a2
 Source1:	nslcd.init
-Source2:	%{name}.tmpfiles
+Source2:	nslcd.service
+Source3:	nslcd.tmpfiles
 Patch0:		%{name}-no-root.patch
 URL:		http://arthurdejong.org/nss-pam-ldapd/
 BuildRequires:	autoconf >= 2.61
@@ -23,9 +24,7 @@ BuildRequires:	docbook2X
 BuildRequires:	heimdal-devel
 BuildRequires:	openldap-devel >= 2.3.0
 BuildRequires:	pam-devel
-Requires(post,preun):	/sbin/chkconfig
-Requires:	nslcd = %{version}-%{release}
-Requires:	rc-scripts >= 0.2.0
+BuildRequires:	rpmbuild(macros) >= 1.671
 Conflicts:	nss_ldap
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -52,7 +51,10 @@ do osobnego demona.
 Summary:	NSS LDAPD name service daemon
 Summary(pl.UTF-8):	Demon serwisu nazw NSS LDAPD
 Group:		Base
-Provides:	nslcd = %{version}-%{release}
+Requires(post,preun):	/sbin/chkconfig
+Requires(post,preun,postun):	systemd-units >= 38
+Requires:	rc-scripts >= 0.2.0
+Requires:	systemd-units >= 38
 
 %description nslcd
 NSS LDAPD name service daemon.
@@ -60,6 +62,18 @@ NSS LDAPD name service daemon.
 %description nslcd -l pl.UTF-8
 Demon serwisu nazw NSS LDAPD.
 
+%package nslcd-utils
+Summary:	Utilities using NSLCD for LDAPD operations
+Summary(pl.UTF-8):	Demon serwisu nazw NSS LDAPD
+Group:		Base
+Requires:	nslcd = %{version}-%{release}
+
+%description nslcd-utils
+Utilities using NSLCD for LDAPD operations.
+
+%description nslcd-utils -l pl.UTF-8
+Narzędzia wykorzystujące NSLCD do operacji LDAP-owych.
+
 %package pam
 Summary:	NSS LDAPD Pluggable Authentication Module
 Summary(pl.UTF-8):	Moduł PAM do uwierzytelniania z użyciem NSS LDAPD
@@ -81,6 +95,8 @@ zmianę haseł i obsługę sesji.
 %setup -q -n nss-pam-ldapd-%{version}
 %patch0 -p1
 
+%{__sed} -i -e '1s|#!.*|#!%{__python}|' utils/*.py
+
 %build
 %configure \
 	DOCBOOK2X_MAN=/usr/bin/docbook2X2man \
@@ -92,13 +108,14 @@ zmianę haseł i obsługę sesji.
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/rc.d/init.d,/var/run/nslcd} \
-	$RPM_BUILD_ROOT/usr/lib/tmpfiles.d
+	$RPM_BUILD_ROOT{%{systemdunitdir},%{systemdtmpfilesdir}}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/nslcd
-install %{SOURCE2} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
+install %{SOURCE2} $RPM_BUILD_ROOT%{systemdunitdir}/nslcd.service
+install %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/nslcd.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -112,17 +129,20 @@ rm -rf $RPM_BUILD_ROOT
 %post nslcd
 /sbin/chkconfig --add nslcd
 %service nslcd restart "NSS LDAP Cache Daemon"
+%systemd_post nslcd.service
 
 %preun nslcd
 if [ "$1" = "0" ]; then
 	%service nslcd stop
 	/sbin/chkconfig --del nslcd
 fi
+%systemd_preun nslcd.service
 
 %postun nslcd
 if [ "$1" = "0" ]; then
 	%userremove nslcd
 fi
+%systemd_reload
 
 %triggerpostun nslcd -- nss_ldapd < 0.7.0
 if [ -e %{_sysconfdir}/nss-ldapd.conf.rpmsave ]; then
@@ -130,6 +150,9 @@ if [ -e %{_sysconfdir}/nss-ldapd.conf.rpmsave ]; then
 	mv -f %{_sysconfdir}/nss-ldapd.conf.rpmsave %{_sysconfdir}/nslcd.conf
 fi
 
+%triggerpostun nslcd -- nslcd < 0.9.2-1
+%systemd_trigger nslcd.service
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README TODO
@@ -138,12 +161,28 @@ fi
 %files nslcd
 %defattr(644,root,root,755)
 %attr(754,root,root) /etc/rc.d/init.d/nslcd
+%{systemdunitdir}/nslcd.service
 %attr(640,nslcd,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nslcd.conf
 %attr(755,root,root) %{_sbindir}/nslcd
 %{_mandir}/man5/nslcd.conf.5*
 %{_mandir}/man8/nslcd.8*
 %dir /var/run/nslcd
-/usr/lib/tmpfiles.d/%{name}.conf
+%{systemdtmpfilesdir}/nslcd.conf
+
+%files nslcd-utils
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/chsh.ldap
+%attr(755,root,root) %{_bindir}/getent.ldap
+%attr(755,root,root) %{_datadir}/nslcd-utils/chsh.py
+%{_datadir}/nslcd-utils/cmdline.py
+%{_datadir}/nslcd-utils/constants.py
+%attr(755,root,root) %{_datadir}/nslcd-utils/getent.py
+%{_datadir}/nslcd-utils/nslcd.py
+%{_datadir}/nslcd-utils/shells.py
+%{_datadir}/nslcd-utils/users.py
+%{_datadir}/nslcd-utils/*.py[co]
+%{_mandir}/man1/chsh.ldap.1*
+%{_mandir}/man1/getent.ldap.1*
 
 %files pam
 %defattr(644,root,root,755)
diff --git a/nslcd.service b/nslcd.service
new file mode 100644
index 0000000..6163c57
--- /dev/null
+++ b/nslcd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Naming services LDAP client daemon.
+After=syslog.target network.target named.service ldap.service samba.service
+
+[Service]
+PIDFile=/var/run/nslcd/nslcd.pid
+ExecStart=/usr/sbin/nslcd -n
+
+[Install]
+WantedBy=multi-user.target
diff --git a/nss_ldapd.tmpfiles b/nslcd.tmpfiles
similarity index 100%
rename from nss_ldapd.tmpfiles
rename to nslcd.tmpfiles
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nss_ldapd.git/commitdiff/ee246e95c0ef20cbffd7285b1598a11b4c88c83c



More information about the pld-cvs-commit mailing list