__init__ needs to be in the main package
[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:    7%{?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/__init__.py*
236 %{python2_sitelib}/ipsilon-*.egg-info
237 %dir %{python2_sitelib}/ipsilon
238 %{python2_sitelib}/ipsilon/admin
239 %dir %{python2_sitelib}/ipsilon/login
240 %{python2_sitelib}/ipsilon/login/__init__*
241 %{python2_sitelib}/ipsilon/login/common*
242 %{python2_sitelib}/ipsilon/login/authtest*
243 %dir %{python2_sitelib}/ipsilon/info
244 %{python2_sitelib}/ipsilon/info/__init__*
245 %{python2_sitelib}/ipsilon/info/common*
246 %{python2_sitelib}/ipsilon/info/nss*
247 %dir %{python2_sitelib}/ipsilon/providers
248 %{python2_sitelib}/ipsilon/providers/__init__*
249 %{python2_sitelib}/ipsilon/providers/common*
250 %{python2_sitelib}/ipsilon/root.py*
251 %{python2_sitelib}/ipsilon/util
252 %{_mandir}/man*/ipsilon*
253 %dir %{_datadir}/ipsilon
254 %dir %{_datadir}/ipsilon/templates
255 %{_datadir}/ipsilon/templates/*.html
256 %{_datadir}/ipsilon/templates/admin
257 %dir %{_datadir}/ipsilon/templates/login
258 %{_datadir}/ipsilon/templates/login/index.html
259 %{_datadir}/ipsilon/templates/login/form.html
260 %dir %{_datadir}/ipsilon/ui
261 %{_datadir}/ipsilon/ui/css
262 %{_datadir}/ipsilon/ui/img
263 %{_datadir}/ipsilon/ui/js
264 %{_datadir}/ipsilon/ui/fonts
265 %{_sbindir}/ipsilon
266 %dir %attr(0700,ipsilon,ipsilon) %{_sharedstatedir}/ipsilon
267 %dir %attr(0700,ipsilon,ipsilon) %{_sysconfdir}/ipsilon
268
269 %files tools
270 %doc COPYING README
271 %{python2_sitelib}/ipsilon/tools
272 %dir %{python2_sitelib}/ipsilon/helpers
273 %{python2_sitelib}/ipsilon/helpers/common.py*
274 %{python2_sitelib}/ipsilon/helpers/__init__.py*
275 %{_datadir}/ipsilon/templates/install/saml2
276 %{_datadir}/ipsilon/ui/saml2sp
277 %{_bindir}/ipsilon-client-install
278 %{_sbindir}/ipsilon-server-install
279 %dir %{_datadir}/ipsilon/templates/install
280 %{_datadir}/ipsilon/templates/install/*.conf
281
282 %files tools-ipa
283 %{python2_sitelib}/ipsilon/helpers/ipa.py*
284
285 %files saml2
286 %{python2_sitelib}/ipsilon/providers/saml2*
287 %{_datadir}/ipsilon/templates/saml2
288
289 %files openid
290 %{python2_sitelib}/ipsilon/providers/openid*
291 %{_datadir}/ipsilon/templates/openid
292
293 %files persona
294 %{python2_sitelib}/ipsilon/providers/persona*
295 %{_datadir}/ipsilon/templates/persona
296
297 %files authfas
298 %{python2_sitelib}/ipsilon/login/authfas*
299
300 %files authform
301 %{python2_sitelib}/ipsilon/login/authform*
302
303 %files authpam
304 %{python2_sitelib}/ipsilon/login/authpam*
305
306 %files authkrb
307 %{python2_sitelib}/ipsilon/login/authkrb*
308 %{_datadir}/ipsilon/templates/login/krb.html
309
310 %files authldap
311 %{python2_sitelib}/ipsilon/login/authldap*
312 %{python2_sitelib}/ipsilon/info/infoldap*
313
314 %files infosssd
315 %{python2_sitelib}/ipsilon/info/infosssd.*
316
317 %changelog
318 * Tue Feb 24 2015 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-7
319 - Split the installer into -tools
320 - Split authform into -authform
321
322 * Thu Feb 12 2015 Rob Crittenden <rcritten@redhat.com> - 0.3.0-6
323 - Add mod_identity_lookup info plugin package
324
325 * Wed Jan 28 2015 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-5
326 - Split IPA tools
327
328 * Mon Jan 12 2015 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-4
329 - Add symlink to fonts directory
330
331 * Tue Dec 16 2014 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-3
332 - Fix typo
333 - Add comments on why the test suite is not in check
334 - The subpackages require the base package
335 - Add link to FPC ticket for bundling exception request
336
337 * Tue Dec 16 2014 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-2
338 - Fix shebang removal
339
340 * Tue Dec 16 2014 Patrick Uiterwijk <puiterwijk@redhat.com> - 0.3.0-1
341 - Initial packaging