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