2a0c4df
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_lib(1))")}
2a0c4df
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import *; import sys; sys.stdout.write(get_python_lib())")}
7a716e3
abb369a
Name: sssd
f4c0030
Version: 0.7.1
f4c0030
Release: 1%{?dist}
abb369a
Group: Applications/System
abb369a
Summary: System Security Services Daemon
abb369a
# The entire source code is GPLv3+ except replace/ which is LGPLv3+
abb369a
License: GPLv3+ and LGPLv3+
4f14304
URL: http://fedorahosted.org/sssd
298ea67
Source: https://fedorahosted.org/released/sssd/sssd-%{version}.tar.gz
abb369a
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
abb369a
abb369a
### Patches ###
abb369a
abb369a
### Dependencies ###
abb369a
298ea67
Requires: libldb >= 0.9.3
8b935a1
Requires: libtdb >= 1.1.3
f4c0030
Requires: sssd-client = 0.7.1
7a716e3
Requires(post): python
abb369a
Requires(preun):  initscripts chkconfig
abb369a
Requires(postun): /sbin/service
abb369a
abb369a
%define servicename sssd
8b935a1
%define sssdstatedir %{_localstatedir}/lib/sss
8b935a1
%define dbpath %{sssdstatedir}/db
8b935a1
%define pipepath %{sssdstatedir}/pipes
abb369a
abb369a
### Build Dependencies ###
abb369a
abb369a
BuildRequires: autoconf
298ea67
BuildRequires: automake
298ea67
BuildRequires: libtool
298ea67
BuildRequires: m4
7a716e3
%{?fedora:BuildRequires: popt-devel}
7a716e3
%{?rhel:BuildRequires: popt}
abb369a
BuildRequires: libtalloc-devel
abb369a
BuildRequires: libtevent-devel
abb369a
BuildRequires: libtdb-devel
abb369a
BuildRequires: libldb-devel
abb369a
BuildRequires: dbus-devel
abb369a
BuildRequires: dbus-libs
abb369a
BuildRequires: openldap-devel
abb369a
BuildRequires: pam-devel
abb369a
BuildRequires: nss-devel
abb369a
BuildRequires: nspr-devel
740369e
BuildRequires: pcre-devel
298ea67
BuildRequires: libxslt
298ea67
BuildRequires: libxml2
298ea67
BuildRequires: docbook-style-xsl
8b935a1
BuildRequires: krb5-devel
8b935a1
BuildRequires: c-ares-devel
7a716e3
BuildRequires: python-devel
abb369a
abb369a
%description
abb369a
Provides a set of daemons to manage access to remote directories and
abb369a
authentication mechanisms. It provides an NSS and PAM interface toward
abb369a
the system and a pluggable backend system to connect to multiple different
abb369a
account sources. It is also the basis to provide client auditing and policy
abb369a
services for projects like FreeIPA.
abb369a
7a716e3
%package client
7a716e3
Summary: SSSD Client libraries for NSS and PAM
7a716e3
Group: Applications/System
7a716e3
7a716e3
%description client
7a716e3
Provides the libraries needed by the PAM and NSS stacks to connect to the SSSD
7a716e3
service.
7a716e3
abb369a
%prep
abb369a
%setup -q
abb369a
abb369a
%build
298ea67
%configure \
298ea67
    --without-tests \
8b935a1
    --with-db-path=%{dbpath} \
8b935a1
    --with-pipe-path=%{pipepath} \
298ea67
    --with-init-dir=%{_initrddir} \
298ea67
    --enable-nsslibdir=/%{_lib}
276bbb1
276bbb1
make %{?_smp_mflags}
abb369a
abb369a
%install
abb369a
rm -rf $RPM_BUILD_ROOT
abb369a
abb369a
make install DESTDIR=$RPM_BUILD_ROOT
abb369a
2a0c4df
# Prepare language files
2a0c4df
/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT sss_daemon
2a0c4df
/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT sss_client
2a0c4df
2a0c4df
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sssd
f4c0030
install -m600 server/examples/sssd.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.conf
2a0c4df
2a0c4df
install -m400 server/config/etc/sssd.api.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.api.conf
2a0c4df
install -m400 server/config/etc/sssd.api.d/* $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.api.d/
2a0c4df
298ea67
# Remove .la files created by libtool
298ea67
rm -f \
298ea67
    $RPM_BUILD_ROOT/%{_lib}/libnss_sss.la \
298ea67
    $RPM_BUILD_ROOT/%{_lib}/security/pam_sss.la \
298ea67
    $RPM_BUILD_ROOT/%{_libdir}/ldb/memberof.la \
298ea67
    $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_ldap.la \
8b935a1
    $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_proxy.la \
8b935a1
    $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_krb5.la \
7a716e3
    $RPM_BUILD_ROOT/%{_libdir}/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.la \
7a716e3
    $RPM_BUILD_ROOT/%{python_sitearch}/pysss.la
abb369a
7a716e3
if test -e $RPM_BUILD_ROOT/%{_libdir}/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.so
7a716e3
then
2a0c4df
    # Apppend this file to the sss_daemon.lang
2a0c4df
    # Older versions of rpmbuild can only handle one -f option
2a0c4df
    echo %{_libdir}/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.so >> sss_daemon.lang
7a716e3
fi
7a716e3
abb369a
%clean
abb369a
rm -rf $RPM_BUILD_ROOT
abb369a
2a0c4df
%files -f sss_daemon.lang
abb369a
%defattr(-,root,root,-)
abb369a
%doc COPYING
298ea67
%attr(755,root,root) %{_initrddir}/%{name}
abb369a
%{_sbindir}/sssd
abb369a
%{_sbindir}/sss_useradd
abb369a
%{_sbindir}/sss_userdel
4f14304
%{_sbindir}/sss_usermod
abb369a
%{_sbindir}/sss_groupadd
abb369a
%{_sbindir}/sss_groupdel
4f14304
%{_sbindir}/sss_groupmod
abb369a
%{_libexecdir}/%{servicename}/
abb369a
%{_libdir}/%{name}/
298ea67
%{_libdir}/ldb/memberof.so
8b935a1
%dir %{sssdstatedir}
8b935a1
%attr(700,root,root) %dir %{dbpath}
8b935a1
%attr(755,root,root) %dir %{pipepath}
8b935a1
%attr(700,root,root) %dir %{pipepath}/private
7a716e3
%attr(750,root,root) %dir %{_var}/log/%{name}
c8e1473
%attr(700,root,root) %dir %{_sysconfdir}/sssd
276bbb1
%config(noreplace) %{_sysconfdir}/sssd/sssd.conf
c8e1473
%config %{_sysconfdir}/sssd/sssd.api.conf
c8e1473
%attr(700,root,root) %dir %{_sysconfdir}/sssd/sssd.api.d
c8e1473
%config %{_sysconfdir}/sssd/sssd.api.d/
7a716e3
%{_mandir}/man5/sssd.conf.5*
2a0c4df
%{_mandir}/man5/sssd-ipa.5*
7a716e3
%{_mandir}/man5/sssd-krb5.5*
7a716e3
%{_mandir}/man5/sssd-ldap.5*
7a716e3
%{_mandir}/man8/sssd.8*
7a716e3
%{_mandir}/man8/sss_groupadd.8*
7a716e3
%{_mandir}/man8/sss_groupdel.8*
7a716e3
%{_mandir}/man8/sss_groupmod.8*
7a716e3
%{_mandir}/man8/sss_useradd.8*
7a716e3
%{_mandir}/man8/sss_userdel.8*
7a716e3
%{_mandir}/man8/sss_usermod.8*
7a716e3
%{_mandir}/man8/sssd_krb5_locator_plugin.8*
7a716e3
%{python_sitearch}/pysss.so
c8e1473
%{python_sitelib}/*.py*
c8e1473
%{?fedora:%{python_sitelib}/*.egg-info}
7a716e3
2a0c4df
%files client -f sss_client.lang
ece3561
%defattr(-,root,root,-)
7a716e3
/%{_lib}/libnss_sss.so.2
7a716e3
/%{_lib}/security/pam_sss.so
7a716e3
%{_mandir}/man8/pam_sss.8*
abb369a
abb369a
%post
abb369a
/sbin/ldconfig
abb369a
/sbin/chkconfig --add %{servicename}
7a716e3
if [ $1 -ge 2 ] ; then
7a716e3
# a one-time upgrade from confdb v1 to v2, only if upgrading
7a716e3
    python %{_libexecdir}/%{servicename}/upgrade_config.py
7a716e3
fi
abb369a
abb369a
%preun
abb369a
if [ $1 = 0 ]; then
abb369a
    /sbin/service %{servicename} stop 2>&1 > /dev/null
abb369a
    /sbin/chkconfig --del %{servicename}
abb369a
fi
abb369a
abb369a
%postun
abb369a
/sbin/ldconfig
abb369a
if [ $1 -ge 1 ] ; then
abb369a
    /sbin/service %{servicename} condrestart 2>&1 > /dev/null
abb369a
fi
abb369a
2a0c4df
%post client -p /sbin/ldconfig
2a0c4df
2a0c4df
%postun client -p /sbin/ldconfig
2a0c4df
abb369a
%changelog
f4c0030
* Tue Oct 27 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.7.1-1
f4c0030
- Fix segfault in sssd_pam when cache_credentials was enabled
f4c0030
- Update the sample configuration
f4c0030
- Fix upgrade issues caused by data provider service removal
f4c0030
f9a7cb8
* Mon Oct 26 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.7.0-2
f9a7cb8
- Fix upgrade issues from old (pre-0.5.0) releases of SSSD
f9a7cb8
2a0c4df
* Fri Oct 23 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.7.0-1
2a0c4df
- New upstream release 0.7.0
2a0c4df
ece3561
* Thu Oct 15 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.6.1-2
ece3561
- Fix missing file permissions for sssd-clients
ece3561
c8e1473
* Tue Oct 13 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.6.1-1
c8e1473
- Add SSSDConfig API
c8e1473
- Update polish translation for 0.6.0
c8e1473
- Fix long timeout on ldap operation
c8e1473
- Make dp requests more robust
c8e1473
5efd631
* Tue Sep 29 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.6.0-1
5efd631
- Ensure that the configuration upgrade script always writes the config
5efd631
  file with 0600 permissions
5efd631
- Eliminate an infinite loop in group enumerations
5efd631
7a716e3
* Mon Sep 28 2009 Sumit Bose <sbose@redhat.com> - 0.6.0-0
7a716e3
- New upstream release 0.6.0
7a716e3
8b935a1
* Mon Aug 24 2009 Simo Sorce <ssorce@redhat.com> - 0.5.0-0
8b935a1
- New upstream release 0.5.0
8b935a1
2cae3a8
* Wed Jul 29 2009 Jakub Hrozek <jhrozek@redhat.com> - 0.4.1-4
2cae3a8
- Fix for CVE-2009-2410 - Native SSSD users with no password set could log in
2cae3a8
  without a password. (Patch by Stephen Gallagher)
2cae3a8
56d52b4
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-3
56d52b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
56d52b4
7522c31
* Mon Jun 22 2009 Simo Sorce <ssorce@redhat.com> - 0.4.1-2
7522c31
- Fix a couple of segfaults that may happen on reload
7522c31
d0eb246
* Thu Jun 11 2009 Simo Sorce <ssorce@redhat.com> - 0.4.1-1
d0eb246
- add missing configure check that broke stopping the daemon
d0eb246
- also fix default config to add a missing required option
d0eb246
298ea67
* Mon Jun  8 2009 Simo Sorce <ssorce@redhat.com> - 0.4.1-0
298ea67
- latest upstream release.
298ea67
- also add a patch that fixes debugging output (potential segfault)
298ea67
e034caf
* Mon Apr 20 2009 Simo Sorce <ssorce@redhat.com> - 0.3.2-2
e034caf
- release out of the official 0.3.2 tarball
e034caf
6f3fcee
* Mon Apr 20 2009 Jakub Hrozek <jhrozek@redhat.com> - 0.3.2-1
6f3fcee
- bugfix release 0.3.2
6f3fcee
- includes previous release patches
6f3fcee
- change permissions of the /etc/sssd/sssd.conf to 0600
6f3fcee
d4c7182
* Tue Apr 14 2009 Simo Sorce <ssorce@redhat.com> - 0.3.1-2
d4c7182
- Add last minute bug fixes, found in testing the package
d4c7182
9797cfd
* Mon Apr 13 2009 Simo Sorce <ssorce@redhat.com> - 0.3.1-1
9797cfd
- Version 0.3.1
9797cfd
- includes previous release patches
9797cfd
9afc8fc
* Mon Apr 13 2009 Simo Sorce <ssorce@redhat.com> - 0.3.0-2
9afc8fc
- Try to fix build adding automake as an explicit BuildRequire
abd724a
- Add also a couple of last minute patches from upstream
9afc8fc
276bbb1
* Mon Apr 13 2009 Simo Sorce <ssorce@redhat.com> - 0.3.0-1
276bbb1
- Version 0.3.0
276bbb1
- Provides file based configuration and lots of improvements
276bbb1
a85a961
* Tue Mar 10 2009 Simo Sorce <ssorce@redhat.com> - 0.2.1-1
a85a961
- Version 0.2.1
a85a961
4f14304
* Tue Mar 10 2009 Simo Sorce <ssorce@redhat.com> - 0.2.0-1
4f14304
- Version 0.2.0
4f14304
abb369a
* Sun Mar 08 2009 Jakub Hrozek <jhrozek@redhat.com> - 0.1.0-5.20090309git691c9b3
abb369a
- package git snapshot
abb369a
abb369a
* Fri Mar 06 2009 Jakub Hrozek <jhrozek@redhat.com> - 0.1.0-4
abb369a
- fixed items found during review
abb369a
- added initscript
abb369a
abb369a
* Thu Mar 05 2009 Sumit Bose <sbose@redhat.com> - 0.1.0-3
abb369a
- added sss_client
abb369a
abb369a
* Mon Feb 23 2009 Jakub Hrozek <jhrozek@redhat.com> - 0.1.0-2
abb369a
- Small cleanup and fixes in the spec file
abb369a
abb369a
* Thu Feb 12 2009 Stephen Gallagher <sgallagh@redhat.com> - 0.1.0-1
abb369a
- Initial release (based on version 0.1.0 upstream code)