From 36ef1d00600192855c7f240744e6ef0a7416135267c1dad004f81ab133cbae22 Mon Sep 17 00:00:00 2001 From: Howard Guo Date: Mon, 14 Sep 2015 08:01:34 +0000 Subject: [PATCH] Accepting request 294676 from home:ailin_nemui:nss_pam_ldapd I think this ldap NSS which is superior and more recent than the PADL nss_ldap should be part of opensuse. It used to be until 12.3 but I'm not sure why it was removed. I'm no expert packager but with a little help I will see what I can do! OBS-URL: https://build.opensuse.org/request/show/294676 OBS-URL: https://build.opensuse.org/package/show/network:ldap/nss-pam-ldapd?expand=0&rev=1 --- .gitattributes | 23 ++++++++ .gitignore | 1 + baselibs.conf | 2 + nslcd-user-conf.dif | 15 +++++ nslcd.service | 11 ++++ nss-pam-ldapd-0.9.5.tar.gz | 3 + nss-pam-ldapd-rpmlintrc | 5 ++ nss-pam-ldapd.changes | 6 ++ nss-pam-ldapd.spec | 113 +++++++++++++++++++++++++++++++++++++ 9 files changed, 179 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 baselibs.conf create mode 100644 nslcd-user-conf.dif create mode 100644 nslcd.service create mode 100644 nss-pam-ldapd-0.9.5.tar.gz create mode 100644 nss-pam-ldapd-rpmlintrc create mode 100644 nss-pam-ldapd.changes create mode 100644 nss-pam-ldapd.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..68de9aa --- /dev/null +++ b/baselibs.conf @@ -0,0 +1,2 @@ +nss-pam-ldapd + supplements "packageand(nss-pam-ldapd:glibc-)" diff --git a/nslcd-user-conf.dif b/nslcd-user-conf.dif new file mode 100644 index 0000000..ebbfa07 --- /dev/null +++ b/nslcd-user-conf.dif @@ -0,0 +1,15 @@ +Index: nss-pam-ldapd-0.7.12/nslcd.conf +=================================================================== +--- nss-pam-ldapd-0.7.12.orig/nslcd.conf ++++ nss-pam-ldapd-0.7.12/nslcd.conf +@@ -5,8 +5,8 @@ + # See the manual page nslcd.conf(5) for more information. + + # The user and group nslcd should run as. +-uid nslcd +-gid nslcd ++#uid nslcd ++#gid nslcd + + # The uri pointing to the LDAP server to use for name lookups. + # Multiple entries may be specified. The address that is used diff --git a/nslcd.service b/nslcd.service new file mode 100644 index 0000000..d5c3092 --- /dev/null +++ b/nslcd.service @@ -0,0 +1,11 @@ +[Unit] +Description=Naming services LDAP client daemon. +After=syslog.target network.target named.service dirsrv.target slapd.service + +[Service] +Type=forking +PIDFile=/var/run/nslcd/nslcd.pid +ExecStart=/usr/sbin/nslcd + +[Install] +WantedBy=multi-user.target diff --git a/nss-pam-ldapd-0.9.5.tar.gz b/nss-pam-ldapd-0.9.5.tar.gz new file mode 100644 index 0000000..6fdbbdb --- /dev/null +++ b/nss-pam-ldapd-0.9.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49080058d85f60213c1b661a899ffe44e30770b5034e5a6ce48486a8d92bee6c +size 750988 diff --git a/nss-pam-ldapd-rpmlintrc b/nss-pam-ldapd-rpmlintrc new file mode 100644 index 0000000..55c019a --- /dev/null +++ b/nss-pam-ldapd-rpmlintrc @@ -0,0 +1,5 @@ +# Silence rpmlint's warning regarding the shared library policy as +# splitting of a library package for libnss_ldap.so.2 doesn't make much +# sense. The NSS Module doesn't do anything useful with out the nslcd +# daemon +addFilter("shlib-policy-name-error .*") diff --git a/nss-pam-ldapd.changes b/nss-pam-ldapd.changes new file mode 100644 index 0000000..a1e01e5 --- /dev/null +++ b/nss-pam-ldapd.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Sun Apr 5 00:01:47 UTC 2015 - ailin.nemui@gmail.com + +- new upload to the build service after discontinuation in opensuse + 12.3 + diff --git a/nss-pam-ldapd.spec b/nss-pam-ldapd.spec new file mode 100644 index 0000000..bc8c339 --- /dev/null +++ b/nss-pam-ldapd.spec @@ -0,0 +1,113 @@ +# +# spec file for package nss-pam-ldapd +# +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: nss-pam-ldapd +BuildRequires: automake +BuildRequires: krb5-devel +BuildRequires: openldap2-devel +BuildRequires: pam-devel +BuildRequires: systemd-rpm-macros +Version: 0.9.5 +Release: 0 +Summary: NSS module and daemon for using LDAP as a naming service +License: LGPL-2.1+ +Group: Productivity/Networking/LDAP/Clients +Url: http://arthurdejong.org/nss-ldapd/ +PreReq: /bin/chmod +Conflicts: nss_ldap pam_ldap +Obsoletes: nss-ldapd < %{version}-%{release} +Provides: nss-ldapd = %{version}-%{release} +Source: nss-pam-ldapd-%{version}.tar.gz +Source1: baselibs.conf +Source2: nslcd.service +Source100: nss-pam-ldapd-rpmlintrc +Patch0: nslcd-user-conf.dif +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +This is nss-pam-ldapd which provides a Name Service Switch (NSS) +module that allows your LDAP server to provide user account, group, +host name, alias, netgroup, and basically any other information that +you would normally get from /etc flat files or NIS. It also provides a +Pluggable Authentication Module (PAM) to do authentication to an LDAP +server. + +This is implemented using thin NSS and PAM modules which delegate to a +dedicated service (nslcd) that queries the LDAP server with persistent +connections, authentication, attribute translation, etc. + + +Authors: +-------- + Luke Howard + West Consulting + Arthur de Jong + +%prep +%setup -q +%patch0 -p1 + +%build +%{?suse_update_config:%{suse_update_config -f}} +autoreconf +CFLAGS="$RPM_OPT_FLAGS" \ +CPPFLAGS="-I/usr/include/sasl" \ +./configure --prefix=/usr \ + --mandir=%{_mandir} \ + --libdir=/%{_lib} \ + --with-pam-seclib-dir=/%{_lib}/security \ + --sysconfdir=/etc +make + +%install +make DESTDIR=$RPM_BUILD_ROOT install +mkdir -p $RPM_BUILD_ROOT/%{_unitdir}/ +install -p -m644 %{S:2} $RPM_BUILD_ROOT/%{_unitdir}/ + +%clean +rm -fr $RPM_BUILD_ROOT + +%pre +%service_add_pre nslcd.service + +%post +/sbin/ldconfig +%service_add_post nslcd.service + +%preun +%stop_on_removal nslcd +%service_del_preun nslcd.service + +%postun +/sbin/ldconfig +%service_del_postun nslcd.service +%restart_on_update nslcd +%insserv_cleanup + +%files +%defattr(-,root,root) +%doc AUTHORS COPYING ChangeLog NEWS README +/%{_lib}/libnss_ldap.so.2 +/%{_lib}/security/pam_ldap.so +%doc %{_mandir}/man5/* +%doc %{_mandir}/man8/* +%config(noreplace) %attr(640,root,root) /etc/nslcd.conf +/%{_unitdir}/nslcd.service +/usr/sbin/nslcd + +%changelog