]> git.pld-linux.org Git - packages/sssd.git/blame - sssd.spec
- new, based on fedora spec
[packages/sssd.git] / sssd.spec
CommitLineData
599b73f3
ER
1# TODO
2#error: Failed build dependencies:
3# keyutils-libs-devel is needed by sssd-1.6.1-0.1.src
4# krb5-devel >= 1.9 is needed by sssd-1.6.1-0.1.src
5# libcollection-devel is needed by sssd-1.6.1-0.1.src
6# libdhash-devel >= 0.4.2 is needed by sssd-1.6.1-0.1.src
7# libini_config-devel is needed by sssd-1.6.1-0.1.src
8# libldb-devel = 1.1.0 is needed by sssd-1.6.1-0.1.src
9# libtdb-devel is needed by sssd-1.6.1-0.1.src
10# libtevent-devel is needed by sssd-1.6.1-0.1.src
11
12%define ldb_version 1.1.0
13Summary: System Security Services Daemon
14Name: sssd
15Version: 1.6.1
16Release: 0.1
17License: GPL v3+
18Group: Applications/System
19URL: http://fedorahosted.org/sssd/
20Source0: https://fedorahosted.org/released/sssd/%{name}-%{version}.tar.gz
21BuildRequires: autoconf
22BuildRequires: automake
23BuildRequires: bind-utils
24BuildRequires: c-ares-devel
25BuildRequires: check-devel
26BuildRequires: dbus-devel
27BuildRequires: dbus-libs
28BuildRequires: docbook-style-xsl
29BuildRequires: doxygen
30BuildRequires: gettext-devel
31BuildRequires: keyutils-libs-devel
32BuildRequires: krb5-devel >= 1.9
33BuildRequires: libcollection-devel
34BuildRequires: libdhash-devel >= 0.4.2
35BuildRequires: libini_config-devel
36BuildRequires: libldb-devel = %{ldb_version}
37BuildRequires: libnl-devel
38BuildRequires: libselinux-devel
39BuildRequires: libsemanage-devel
40BuildRequires: libtalloc-devel
41BuildRequires: libtdb-devel
42BuildRequires: libtevent-devel
43BuildRequires: libtool
44BuildRequires: libunistring-devel
45BuildRequires: libxml2
46BuildRequires: libxslt
47BuildRequires: m4
48BuildRequires: nscd
49BuildRequires: nspr-devel
50BuildRequires: nss-devel
51BuildRequires: openldap-devel
52BuildRequires: pam-devel
53BuildRequires: pcre-devel
54BuildRequires: popt-devel
55BuildRequires: python-devel
56BuildRequires: rpmbuild(macros) >= 1.228
57Requires(post,preun): /sbin/chkconfig
58Requires(post,postun): /sbin/ldconfig
59Requires: cyrus-sasl-gssapi
60Requires: krb5-libs >= 1.9
61Requires: libldb = %{ldb_version}
62Requires: libtdb >= 1.1.3
63Requires: %{name}-client = %{version}-%{release}
64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66%define servicename sssd
67%define sssdstatedir %{_localstatedir}/lib/sss
68%define dbpath %{sssdstatedir}/db
69%define pipepath %{sssdstatedir}/pipes
70%define pubconfpath %{sssdstatedir}/pubconf
71
72# Determine the location of the LDB modules directory
73%define ldb_modulesdir %(pkg-config --variable=modulesdir ldb)
74
75%description
76Provides a set of daemons to manage access to remote directories and
77authentication mechanisms. It provides an NSS and PAM interface toward
78the system and a pluggable backend system to connect to multiple
79different account sources. It is also the basis to provide client
80auditing and policy services for projects like FreeIPA.
81
82%package client
83Summary: SSSD Client libraries for NSS and PAM
84License: LGPLv3+
85Group: Applications/System
86
87%description client
88Provides the libraries needed by the PAM and NSS stacks to connect to
89the SSSD service.
90
91%package tools
92Summary: Userspace tools for use with the SSSD
93License: GPL v3+
94Group: Applications/System
95Requires: %{name} = %{version}-%{release}
96
97%description tools
98Provides userspace tools for manipulating users, groups, and nested
99groups in SSSD when using id_provider = local in /etc/sssd/sssd.conf.
100
101Also provides a userspace tool for generating an obfuscated LDAP
102password for use with ldap_default_authtok_type = obfuscated_password.
103
104%package -n libipa_hbac
105Summary: FreeIPA HBAC Evaluator library
106License: LGPLv3+
107Group: Development/Libraries
108
109%description -n libipa_hbac
110Utility library to validate FreeIPA HBAC rules for authorization
111requests
112
113%package -n libipa_hbac-devel
114Summary: FreeIPA HBAC Evaluator library
115License: LGPLv3+
116Group: Development/Libraries
117Requires: libipa_hbac = %{version}-%{release}
118
119%description -n libipa_hbac-devel
120Utility library to validate FreeIPA HBAC rules for authorization
121requests
122
123%package -n python-libipa_hbac
124Summary: Python bindings for the FreeIPA HBAC Evaluator library
125License: LGPLv3+
126Group: Development/Libraries
127Requires: libipa_hbac = %{version}-%{release}
128Obsoletes: libipa_hbac-python
129
130%description -n python-libipa_hbac
131This package contains the bindings so that libipa_hbac can be used by
132Python applications.
133
134%prep
135%setup -q
136
137%build
138autoreconf -ivf
139%configure \
140 --with-db-path=%{dbpath} \
141 --with-pipe-path=%{pipepath} \
142 --with-pubconf-path=%{pubconfpath} \
143 --with-init-dir=%{_initrddir} \
144 --enable-nsslibdir=/%{_lib} \
145 --enable-pammoddir=/%{_lib}/security \
146 --disable-static \
147 --disable-rpath \
148 --with-test-dir=/dev/shm
149
150%{__make}
151
152%if %{with tests}
153export CK_TIMEOUT_MULTIPLIER=10
154%{__make} check
155unset CK_TIMEOUT_MULTIPLIER
156%endif
157
158%install
159rm -rf $RPM_BUILD_ROOT
160%{__make} install \
161 DESTDIR=$RPM_BUILD_ROOT
162
163# Prepare language files
164%find_lang %{name}
165
166# Copy default sssd.conf file
167install -d $RPM_BUILD_ROOT%{_sysconfdir}/sssd
168cp -p src/examples/sssd.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.conf
169cp -p src/config%{_sysconfdir}/sssd.api.conf $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.api.conf
170cp -p src/config%{_sysconfdir}/sssd.api.d/* $RPM_BUILD_ROOT%{_sysconfdir}/sssd/sssd.api.d/
171
172# Copy default logrotate file
173install -d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
174cp -p src/examples/logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/sssd
175
176# Make sure SSSD is able to run on read-only root
177install -d $RPM_BUILD_ROOT/%{_sysconfdir}/rwtab.d
178cp -p src/examples/rwtab $RPM_BUILD_ROOT%{_sysconfdir}/rwtab.d/sssd
179
180# Remove .la files created by libtool
181%{__rm} \
182 $RPM_BUILD_ROOT/%{_lib}/libnss_sss.la \
183 $RPM_BUILD_ROOT/%{_lib}/security/pam_sss.la \
184 $RPM_BUILD_ROOT/%{ldb_modulesdir}/memberof.la \
185 $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_ldap.la \
186 $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_proxy.la \
187 $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_krb5.la \
188 $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_ipa.la \
189 $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_simple.la \
190 $RPM_BUILD_ROOT/%{_libdir}/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.la \
191 $RPM_BUILD_ROOT/%{_libdir}/libipa_hbac.la \
192 $RPM_BUILD_ROOT/%{py_sitedir}/pysss.la \
193 $RPM_BUILD_ROOT/%{py_sitedir}/pyhbac.la
194
195touch sssd_tools.lang
196for man in `find $RPM_BUILD_ROOT/%{_mandir}/??/man?/ -type f | sed -e "s#$RPM_BUILD_ROOT/%{_mandir}/##"`; do
197 lang=`echo $man | cut -c 1-2`
198 case `basename $man` in
199 sss_*)
200 echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd_tools.lang
201 ;;
202 *)
203 echo \%lang\(${lang}\) \%{_mandir}/${man}\* >> sssd.lang
204 ;;
205 esac
206done
207
208%clean
209rm -rf $RPM_BUILD_ROOT
210
211%post
212/sbin/ldconfig
213/sbin/chkconfig --add %{name}
214%service %{name} restart
215
216%preun
217if [ "$1" = "0" ]; then
218 %service -q %{name} stop
219 /sbin/chkconfig --del %{name}
220fi
221
222%post client -p /sbin/ldconfig
223%postun client -p /sbin/ldconfig
224
225%post -n libipa_hbac -p /sbin/ldconfig
226%postun -n libipa_hbac -p /sbin/ldconfig
227
228%files -f sssd.lang
229%defattr(644,root,root,755)
230%attr(755,root,root) %{_sbindir}/sssd
231%{_libexecdir}/%{servicename}
232%{_libdir}/%{name}/
233%attr(755,root,root) %{ldb_modulesdir}/memberof.so
234%dir %{sssdstatedir}
235%attr(700,root,root) %dir %{dbpath}
236%dir %{pipepath}
237%dir %{pubconfpath}
238%attr(700,root,root) %dir %{pipepath}/private
239%attr(750,root,root) %dir %{_var}/log/%{name}
240%attr(700,root,root) %dir %{_sysconfdir}/sssd
241%config(noreplace) %{_sysconfdir}/sssd/sssd.conf
242%config(noreplace) /etc/logrotate.d/sssd
243%config(noreplace) %{_sysconfdir}/rwtab.d/sssd
244%config %{_sysconfdir}/sssd/sssd.api.conf
245%attr(700,root,root) %dir %{_sysconfdir}/sssd/sssd.api.d
246%config %{_sysconfdir}/sssd/sssd.api.d/
247%{_mandir}/man5/sssd.conf.5*
248%{_mandir}/man5/sssd-ipa.5*
249%{_mandir}/man5/sssd-krb5.5*
250%{_mandir}/man5/sssd-ldap.5*
251%{_mandir}/man5/sssd-simple.5*
252%{_mandir}/man8/sssd.8*
253%attr(755,root,root) %{py_sitedir}/pysss.so
254%{py_sitescriptdir}/*.py[co]
255
256%files client -f sssd_tools.lang
257%defattr(644,root,root,755)
258%attr(755,root,root) /%{_lib}/libnss_sss.so.2
259%attr(755,root,root) /%{_lib}/security/pam_sss.so
260%attr(755,root,root) %{_libdir}/krb5/plugins/libkrb5/sssd_krb5_locator_plugin.so
261%{_mandir}/man8/pam_sss.8*
262%{_mandir}/man8/sssd_krb5_locator_plugin.8*
263
264%files tools
265%defattr(644,root,root,755)
266%attr(755,root,root) %{_sbindir}/sss_useradd
267%attr(755,root,root) %{_sbindir}/sss_userdel
268%attr(755,root,root) %{_sbindir}/sss_usermod
269%attr(755,root,root) %{_sbindir}/sss_groupadd
270%attr(755,root,root) %{_sbindir}/sss_groupdel
271%attr(755,root,root) %{_sbindir}/sss_groupmod
272%attr(755,root,root) %{_sbindir}/sss_groupshow
273%attr(755,root,root) %{_sbindir}/sss_obfuscate
274%attr(755,root,root) %{_sbindir}/sss_cache
275%{_mandir}/man8/sss_groupadd.8*
276%{_mandir}/man8/sss_groupdel.8*
277%{_mandir}/man8/sss_groupmod.8*
278%{_mandir}/man8/sss_groupshow.8*
279%{_mandir}/man8/sss_useradd.8*
280%{_mandir}/man8/sss_userdel.8*
281%{_mandir}/man8/sss_usermod.8*
282%{_mandir}/man8/sss_obfuscate.8*
283%{_mandir}/man8/sss_cache.8*
284
285%files -n libipa_hbac
286%defattr(644,root,root,755)
287%{_libdir}/libipa_hbac.so.*
288
289%files -n libipa_hbac-devel
290%defattr(644,root,root,755)
291%{_includedir}/ipa_hbac.h
292%{_libdir}/libipa_hbac.so
293%{_pkgconfigdir}/ipa_hbac.pc
294
295%files -n python-libipa_hbac
296%defattr(644,root,root,755)
297%{py_sitedir}/pyhbac.so
298%{py_sitescriptdir}/*.egg-info
This page took 0.184058 seconds and 4 git commands to generate.