URL: https://github.com/freeipa/freeipa/pull/674 Author: tiran Title: #674: Replace hard-coded kdcproxy path with WSGI script Action: opened
PR body: """ 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 <chei...@redhat.com> """ To pull the PR as Git branch: git remote add ghfreeipa https://github.com/freeipa/freeipa git fetch ghfreeipa pull/674/head:pr674 git checkout pr674
From c10b628ecc6ef9759300ad96d065566c5e3ca94d Mon Sep 17 00:00:00 2001 From: Christian Heimes <chei...@redhat.com> Date: Wed, 29 Mar 2017 17:58:47 +0200 Subject: [PATCH] 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 <chei...@redhat.com> --- freeipa.spec.in | 1 + install/conf/ipa-kdc-proxy.conf.template | 4 ++-- install/share/Makefile.am | 1 + install/share/kdcproxy.wsgi | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 install/share/kdcproxy.wsgi diff --git a/freeipa.spec.in b/freeipa.spec.in index 829c3f0..d606996 100644 --- a/freeipa.spec.in +++ b/freeipa.spec.in @@ -1256,6 +1256,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 diff --git a/install/conf/ipa-kdc-proxy.conf.template b/install/conf/ipa-kdc-proxy.conf.template index 9290ceb..6721219 100644 --- a/install/conf/ipa-kdc-proxy.conf.template +++ b/install/conf/ipa-kdc-proxy.conf.template @@ -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"> diff --git a/install/share/Makefile.am b/install/share/Makefile.am index 9e539a3..3a34f6e 100644 --- a/install/share/Makefile.am +++ b/install/share/Makefile.am @@ -90,6 +90,7 @@ dist_app_DATA = \ gssapi.login \ ipa.conf.tmpfiles \ gssproxy.conf.template \ + kdcproxy.wsgi \ $(NULL) kdcproxyconfdir = $(IPA_SYSCONF_DIR)/kdcproxy diff --git a/install/share/kdcproxy.wsgi b/install/share/kdcproxy.wsgi new file mode 100644 index 0000000..be1693c --- /dev/null +++ b/install/share/kdcproxy.wsgi @@ -0,0 +1,5 @@ +# Copyright (C) 2017 FreeIPA Contributors see COPYING for license +"""WSGI entry point for kdcproxy +""" +from kdcproxy import application +
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code