Replace hard-coded kdcproxy path with WSGI script

mod_wsgi has no way to import a WSGI module by dotted module name. A new
kdcproxy.wsgi script is used to import kdcproxy from whatever Python
version mod_wsgi is compiled against. This will simplify moving FreeIPA
to Python 3 and solves an import problem on Debian.

Resolves: https://pagure.io/freeipa/issue/6834

Signed-off-by: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
Christian Heimes 2017-03-29 17:58:47 +02:00 committed by Martin Basti
parent 1160dc5d8b
commit 2cd6788c3f
4 changed files with 9 additions and 2 deletions

View File

@ -1260,6 +1260,7 @@ fi
# END
%dir %{_usr}/share/ipa
%{_usr}/share/ipa/wsgi.py*
%{_usr}/share/ipa/kdcproxy.wsgi
%{_usr}/share/ipa/*.ldif
%{_usr}/share/ipa/*.uldif
%{_usr}/share/ipa/*.template

View File

@ -16,9 +16,9 @@
WSGIDaemonProcess kdcproxy processes=2 threads=15 maximum-requests=5000 \
user=kdcproxy group=kdcproxy display-name=%{GROUP}
WSGIImportScript /usr/lib/python2.7/site-packages/kdcproxy/__init__.py \
WSGIImportScript /usr/share/ipa/kdcproxy.wsgi \
process-group=kdcproxy application-group=kdcproxy
WSGIScriptAlias /KdcProxy /usr/lib/python2.7/site-packages/kdcproxy/__init__.py
WSGIScriptAlias /KdcProxy /usr/share/ipa/kdcproxy.wsgi
WSGIScriptReloading Off
<Location "/KdcProxy">

View File

@ -90,6 +90,7 @@ dist_app_DATA = \
gssapi.login \
ipa.conf.tmpfiles \
gssproxy.conf.template \
kdcproxy.wsgi \
$(NULL)
kdcproxyconfdir = $(IPA_SYSCONF_DIR)/kdcproxy

View File

@ -0,0 +1,5 @@
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
"""WSGI entry point for kdcproxy
"""
from kdcproxy import application