Bug 984713 - add a mod_wsgi build for the python 2.7 SCL
Summary: add a mod_wsgi build for the python 2.7 SCL
Alias: None
Product: Red Hat Software Collections
Classification: Red Hat
Component: mod_wsgi
Version: python27
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 1.1
Assignee: Jan Kaluža
QA Contact: Branislav Náter
Depends On:
TreeView+ depends on / blocked
Reported: 2013-07-15 19:08 UTC by Rob Millner
Modified: 2014-06-04 07:26 UTC (History)
12 users (show)

Fixed In Version: python27-mod_wsgi-3.4-10.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-06-04 07:26:10 UTC
Target Upstream Version:

Attachments (Terms of Use)
SCL spec file for mod_wsgi 3.4 (3.48 KB, text/x-rpm-spec)
2013-07-15 19:08 UTC, Rob Millner
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:0610 normal SHIPPED_LIVE python27 bug fix and enhancement update 2014-06-04 11:06:18 UTC

Description Rob Millner 2013-07-15 19:08:56 UTC
Created attachment 773875 [details]
SCL spec file for mod_wsgi 3.4

OpenShift on RHEL 6 is trying to deploy the Python 2.7 SCL environment instead of the hand maintained community cartridge.

We would like mod_wsgi for this environment.  I've created a package, built and tested it but need it to be built by Brew in the SCL environment and managed properly for inclusion into OpenShift.

The package I wrote creates mod_wsgi as "python27-mod_wsgi" in the regular Apache modules directory and does not load it into Apache by default.  That can certainly change as necessary but its what we'd prefer for OpenShift.

Comment 2 Bohuslav "Slavek" Kabrda 2013-07-19 11:13:55 UTC
So, after playing around with mod_wsgi + SCLs, here's a little analysis:

- Usable for both python27 and python33 (some minor patching for Python 3).
- Needs to be build separately for each Python runtime.
- If multiple mod_wsgi are installed (that includes two SCL mod_wsgi or system+SCL mod_wsgi), each one _must_ have it's own Apache instance with own httpd.conf (if we don't want to modify the current one, which we don't).
- Seems pretty ok from packaging/maintenance POV (no additional deps, little to no bugs).

Comment 3 Rob Millner 2013-07-23 21:31:51 UTC
Would you mind attaching any modifications to the spec file and patches.  We're going ahead with our own build for testing and would like to make sure there are no surprises.  Thanks!

Comment 4 Rob Millner 2013-07-23 22:27:44 UTC
An ETA for this package would be really helpful for our planning.  Thanks!

Comment 5 Bohuslav "Slavek" Kabrda 2013-07-24 07:41:01 UTC
For ETA, I think you'll need to talk to Brian Gollager (requesting needinfo from him so that he knows about this bug).

For the technical part: my specfile is a not working ATM, I built the package pretty much the same way you did and then I moved the files around by hand to make things work. Basically, what you need to do is:
1) Build mod_wsgi against scl python (correct in your specfile).
2) Place built mod_wsgi in correct location (I'd say using /opt/... is better than using the system dir).
3) Create a new httpd.conf (preferably in /opt/.../etc/httpd/conf) file that you will use to run the new apache instance.
4) Create wsgi.conf (in /opt/.../etc/httpd/conf.d) that will load the mod_wsgi built in step 2) (note that this will require using full path to mod_wsgi.so).
5) Run a new apache instance with the new httpd.conf.

This is what you need to do to not break system mod_wsgi (and _probably_ what we will do in RHSCL if adding mod_wsgi). If you are sure that you will only use the collection mod_wsgi, you can probably skip moving the files around, creating new httpd.conf etc - pretty much what you do in your specfile.

Comment 6 Rob Millner 2013-08-01 19:35:40 UTC
We're rolling our own version to continue testing and will switch to the official SCL version when its ready.

Comment 7 Rob Millner 2013-08-06 18:29:34 UTC
We're sticking with module installation as:

Files in /usr/lib64/httpd/modules/* get a specific SELinux tag as Apache modules.  If the official SCL package places the module in the SCL build root instead, please ensure that it works with SELinux in enforcing mode.  Thanks!

Comment 8 Vít Ondruch 2013-08-13 07:22:10 UTC
Why not use passenger to serve WSGI [1]? If I am not mistaken, OpenShift already supports passenger ... just saying

[1] http://www.modrails.com/documentation/Users%20guide%20Apache.html#_deploying_a_wsgi_python_application

Comment 9 Rob Millner 2013-08-13 16:52:40 UTC
We have use cases where Apache mod_wsgi is preferred; though the latest version of our cartridge also allows the end-user to stand up their own framework and stand-alone Passenger would be an option.

Comment 15 Ariel 2014-03-27 16:12:48 UTC
I've seen there is a new Python 2.7 SCL version available (using the Repo:
http://people.redhat.com/bkabrda/python27-rhel-6/ )
but the mod WSGI package python27-mod_wsgi is not there.

That package was however available in the "candidate" Repo

Is there any problem with that package, or what is the current status?

Thanks a lot for your answer and your work! :)

Comment 16 Marcela Mašláňová 2014-03-27 17:55:54 UTC
Thank you for your interest in SCL. We don't plan to maintain packages on our private pages anymore. You can:
1/ buy a subscription
2/ wait for official start of our upstream pages http://softwarecollections.org/ (now Beta). We will be posting our upstream SCL there in few weeks.

Comment 17 errata-xmlrpc 2014-06-04 07:26:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.