4be9fcec4cc1fcd4d486676020d05520c468f8a3
[cascardo/ipsilon.git] / contrib / fedora / ipsilon.spec
1 # Bundling request for bootstrap/patternfly: https://fedorahosted.org/fpc/ticket/483
2
3 Name:       ipsilon
4 Version:    0.3.0
5 Release:    6%{?dist}
6 Summary:    An Identity Provider Server
7
8 Group:      System Environment/Base
9 License:    GPLv3+
10 URL:        https://fedorahosted.org/ipsilon/
11 Source0:    https://fedorahosted.org/released/ipsilon/ipsilon-%{version}.tar.gz
12 BuildArch:  noarch
13
14
15 BuildRequires:  python2-devel
16 BuildRequires:  python-setuptools
17 BuildRequires:  lasso-python
18 BuildRequires:  python-openid, python-openid-cla, python-openid-teams
19 BuildRequires:  m2crypto
20 Requires:       httpd
21 Requires:       mod_ssl
22 Requires:       ipsilon-provider = %{version}-%{release}
23 Requires:       mod_wsgi
24 Requires:       python-cherrypy
25 Requires:       python-jinja2
26 Requires:       python-lxml
27 Requires:       python-sqlalchemy
28 Requires:       open-sans-fonts
29 Requires(pre):  shadow-utils
30 Requires(post): %_sbindir/semanage, %_sbindir/restorecon
31 Requires(postun): %_sbindir/semanage
32
33 %description
34 Ipsilon is a multi-protocol Identiy Provider service. Its function is to
35 bridge authentication providers and applications to achieve Single Sign On
36 and Federation.
37
38
39 %package tools
40 Summary:        Client tools for the Ipsilon IDP
41 Group:          System Environment/Base
42 License:        GPLv3+
43 Requires:       python-requests
44 Requires:       python-lxml
45 Requires:       lasso-python
46 Requires:       mod_auth_mellon
47 BuildArch:      noarch
48
49 %description tools
50 Convenience install tools for the Ipsilon identity Provider
51
52
53 %package tools-ipa
54 summary:        IPA helpers
55 Group:          System Environment/Base
56 License:        GPLv3+
57 Requires:       %{name}-tools = %{version}-%{release}
58 %if 0%{?rhel}
59 Requires:       ipa-client
60 Requires:       ipa-admintools
61 %else
62 Requires:       freeipa-client
63 Requires:       freeipa-admintools
64 %endif
65 BuildArch:      noarch
66
67 %description tools-ipa
68 Convenience client install tools for IPA support in the Ipsilon identity Provider
69
70
71 %package saml2
72 Summary:        SAML2 provider plugin
73 Group:          System Environment/Base
74 License:        GPLv3+
75 Provides:       ipsilon-provider = %{version}-%{release}
76 Requires:       %{name} = %{version}-%{release}
77 Requires:       lasso-python
78 BuildArch:      noarch
79
80 %description saml2
81 Provides a SAML2 provider plugin for the Ipsilon identity Provider
82
83
84 %package openid
85 Summary:        Openid provider plugin
86 Group:          System Environment/Base
87 License:        GPLv3+
88 Provides:       ipsilon-provider = %{version}-%{release}
89 Requires:       %{name} = %{version}-%{release}
90 Requires:       python-openid
91 Requires:       python-openid-cla
92 Requires:       python-openid-teams
93 BuildArch:      noarch
94
95 %description openid
96 Provides an OpenId provider plugin for the Ipsilon identity Provider
97
98
99 %package persona
100 Summary:        Persona provider plugin
101 Group:          System Environment/Base
102 License:        GPLv3+
103 Provides:       ipsilon-provider = %{version}-%{release}
104 Requires:       %{name} = %{version}-%{release}
105 Requires:       m2crypto
106 BuildArch:      noarch
107
108 %description persona
109 Provides a Persona provider plugin for the Ipsilon identity Provider
110
111
112 %package authfas
113 Summary:        Fedora Authentication System login plugin
114 Group:          System Environment/Base
115 License:        GPLv3+
116 Requires:       %{name} = %{version}-%{release}
117 Requires:       python-fedora
118 BuildArch:      noarch
119
120 %description authfas
121 Provides a login plugin to authenticate against the Fedora Authentication System
122
123
124 %package authform
125 Summary:        mod_intercept_form_submit login plugin
126 Group:          System Environment/Base
127 License:        GPLv3+
128 Requires:       %{name} = %{version}-%{release}
129 Requires:       mod_intercept_form_submit
130 BuildArch:      noarch
131
132 %description authform
133 Provides a login plugin to authenticate with mod_intercept_form_submit
134
135
136 %package authpam
137 Summary:        PAM based login plugin
138 Group:          System Environment/Base
139 License:        GPLv3+
140 Requires:       %{name} = %{version}-%{release}
141 Requires:       python-pam
142 BuildArch:      noarch
143
144 %description authpam
145 Provides a login plugin to authenticate against the local PAM stack
146
147
148 %package authkrb
149 Summary:        mod_auth_kerb based login plugin
150 Group:          System Environment/Base
151 License:        GPLv3+
152 Requires:       %{name} = %{version}-%{release}
153 Requires:       mod_auth_kerb
154 BuildArch:      noarch
155
156 %description authkrb
157 Provides a login plugin to allow authentication via the mod_auth_kerb Apache
158 module.
159
160
161 %package authldap
162 Summary:        mod_auth_kerb based login plugin
163 Group:          System Environment/Base
164 License:        GPLv3+
165 Requires:       %{name} = %{version}-%{release}
166 Requires:       python-ldap
167 BuildArch:      noarch
168
169 %description authldap
170 Provides a login plugin to allow authentication and info retrieval via LDAP.
171
172 %package infosssd
173 Summary:        SSSD & mod_lookup_identity-based identity plugin
174 Group:          System Environment/Base
175 License:        GPLv3+
176 Requires:       %{name} = %{version}-%{release}
177 Requires:       mod_lookup_identity
178 Requires:       libsss_simpleifp
179 Requires:       sssd >= 1.12.4
180 BuildArch:      noarch
181
182 %description infosssd
183 Provides an info plugin to allow retrieval via mod_lookup_identity and
184 SSSD.
185
186 %prep
187 %setup -q
188
189
190 %build
191 CFLAGS="%{optflags}" %{__python} setup.py build
192
193
194 %install
195 %{__python} setup.py install --skip-build --root %{buildroot}
196 mkdir -p %{buildroot}%{_sbindir}
197 mkdir -p %{buildroot}%{_defaultdocdir}
198 # These 0700 permissions are because ipsilon will store private keys here
199 install -d -m 0700 %{buildroot}%{_sharedstatedir}/ipsilon
200 install -d -m 0700 %{buildroot}%{_sysconfdir}/ipsilon
201 mv %{buildroot}/%{_bindir}/ipsilon %{buildroot}/%{_sbindir}
202 mv %{buildroot}/%{_bindir}/ipsilon-server-install %{buildroot}/%{_sbindir}
203 mv %{buildroot}%{_defaultdocdir}/%{name} %{buildroot}%{_defaultdocdir}/%{name}-%{version}
204 rm -fr %{buildroot}%{python2_sitelib}/tests
205 ln -s %{_datadir}/fonts %{buildroot}%{_datadir}/ipsilon/ui/fonts
206
207 #%check
208 # The test suite is not being run because:
209 #  1. The last step of %%install removes the entire test suite
210 #  2. It increases build time a lot
211 #  3. It adds more build dependencies (namely postgresql server and client libraries)
212
213 %pre
214 getent group ipsilon >/dev/null || groupadd -r ipsilon
215 getent passwd ipsilon >/dev/null || \
216     useradd -r -g ipsilon -d %{_sharedstatedir}/ipsilon -s /sbin/nologin \
217     -c "Ipsilon Server" ipsilon
218 exit 0
219
220 %post
221 semanage fcontext -a -t httpd_var_lib_t '%{_sharedstatedir}/ipsilon(/.*)?' || :
222 semanage fcontext -a -t var_lib_t '%{_sharedstatedir}/ipsilon(/.*)/*.conf' || :
223 restorecon -R %{_sharedstatedir}/ipsilon || :
224
225 %postun
226 # Clean up after package removal
227 if [ $1 -eq 0 ]; then
228     semanage fcontext -d -t var_lib_t '%{_sharedstatedir}/ipsilon(/.*)/*.conf' || :
229     semanage fcontext -d -t httpd_var_lib_t '%{_sharedstatedir}/ipsilon(/.*)?' || :
230 fi
231
232
233 %files
234 %{_defaultdocdir}/%{name}-%{version}
235 %{python2_sitelib}/ipsilon-*.egg-info
236 %dir %{python2_sitelib}/ipsilon
237 %{python2_sitelib}/ipsilon/admin
238 %dir %{python2_sitelib}/ipsilon/login
239 %{python2_sitelib}/ipsilon/login/__init__*
240 %{python2_sitelib}/ipsilon/login/common*
241 %{python2_sitelib}/ipsilon/login/authtest*
242 %dir %{python2_sitelib}/ipsilon/info
243 %{python2_sitelib}/ipsilon/info/__init__*
244 %{python2_sitelib}/ipsilon/info/common*
245 %{python2_sitelib}/ipsilon/info/nss*
246 %dir %{python2_sitelib}/ipsilon/providers
247 %{python2_sitelib}/ipsilon/providers/__init__*
248 %{python2_sitelib}/ipsilon/providers/common*
249 %{python2_sitelib}/ipsilon/root.py*
250 %{python2_sitelib}/ipsilon/util
251 %{_mandir}/man*/ipsilon*
252 %dir %{_datadir}/ipsilon
253 %dir %{_datadir}/ipsilon/templates
254 %{_datadir}/ipsilon/templates/*.html
255 %{_datadir}/ipsilon/templates/admin
256 %dir %{_datadir}/ipsilon/templates/login
257 %{_datadir}/ipsilon/templates/login/index.html
258 %{_datadir}/ipsilon/templates/login/form.html
259 %dir %{_datadir}/ipsilon/ui
260 %{_datadir}/ipsilon/ui/css
261 %{_datadir}/ipsilon/ui/img
262 %{_datadir}/ipsilon/ui/js
263 %{_datadir}/ipsilon/ui/fonts
264 %{_sbindir}/ipsilon
265 %dir %attr(0700,ipsilon,ipsilon) %{_sharedstatedir}/ipsilon
266 %dir %attr(0700,ipsilon,ipsilon) %{_sysconfdir}/ipsilon
267
268 %files tools
269 %doc COPYING README
270 %{python2_sitelib}/ipsilon-*.egg-info
271 %{python2_sitelib}/ipsilon/__init__.py*
272 %{python2_sitelib}/ipsilon/tools
273 %dir %{python2_sitelib}/ipsilon/helpers
274 %{python2_sitelib}/ipsilon/helpers/common.py*
275 %{python2_sitelib}/ipsilon/helpers/__init__.py*
276 %{_datadir}/ipsilon/templates/install/saml2
277 %{_datadir}/ipsilon/ui/saml2sp
278 %{_bindir}/ipsilon-client-install
279 %{_sbindir}/ipsilon-server-install
280 %dir %{_datadir}/ipsilon/templates/install
281 %{_datadir}/ipsilon/templates/install/*.conf
282
283 %files tools-ipa
284 %{python2_sitelib}/ipsilon/helpers/ipa.py*
285
286 %files saml2
287 %{python2_sitelib}/ipsilon/providers/saml2*
288 %{_datadir}/ipsilon/templates/saml2
289
290 %files openid
291 %{python2_sitelib}/ipsilon/providers/openid*
292 %{_datadir}/ipsilon/templates/openid
293
294 %files persona
295 %{python2_sitelib}/ipsilon/providers/persona*
296 %{_datadir}/ipsilon/templates/persona
297
298 %files authfas
299 %{python2_sitelib}/ipsilon/login/authfas*
300
301 %files authform
302 %{python2_sitelib}/ipsilon/login/authform*
303
304 %files authpam
305 %{python2_sitelib}/ipsilon/login/authpam*
306
307 %files authkrb
308 %{python2_sitelib}/ipsilon/login/authkrb*
309 %{_datadir}/ipsilon/templates/login/krb.html
310
311 %files authldap
312 %{python2_sitelib}/ipsilon/login/authldap*
313 %{python2_sitelib}/ipsilon/info/infoldap*
314
315 %files infosssd
316 %{python2_sitelib}/ipsilon/info/infosssd.*
317
318 %changelog
319 * Thu Feb 12 2015 Rob Crittenden <rcritten@redhat.com> - 0.3.0-6
320 - Add mod_identity_lookup info plugin package
321
322 * Wed Jan 28 2015 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-5
323 - Split IPA tools
324
325 * Mon Jan 12 2015 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-4
326 - Add symlink to fonts directory
327
328 * Tue Dec 16 2014 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-3
329 - Fix typo
330 - Add comments on why the test suite is not in check
331 - The subpackages require the base package
332 - Add link to FPC ticket for bundling exception request
333
334 * Tue Dec 16 2014 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-2
335 - Fix shebang removal
336
337 * Tue Dec 16 2014 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-1
338 - Initial packaging