Bug 1609491 - mod_wsgi: python3-mod_wsgi requires both Python 2 and Python 3
Summary: mod_wsgi: python3-mod_wsgi requires both Python 2 and Python 3
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: mod_wsgi
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Runge
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1610536 (view as bug list)
Depends On:
Blocks: PYTHON3 PYTHON3-PYTHON2 F29BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2018-07-28 15:02 UTC by Iryna Shcherbina
Modified: 2018-08-01 00:33 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-31 23:52:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Iryna Shcherbina 2018-07-28 15:02:47 UTC
The python3-mod_wsgi RPM requires both Python 2 and Python 3:

$ dnf repoquery --repo=rawhide --requires python3-mod_wsgi | grep python
/usr/bin/python3
libpython2.7.so.1.0()(64bit)
libpython3.7m.so.1.0()(64bit)
python(abi) = 3.7

Except in very special circumstances, there is no need for one package
to drag in both Python stacks. Usually, this is a packaging error.

Please split your package, or remove the stray dependencies.

It's ok to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 28 as well.


If anything is unclear, or if you need any kind of assistance, you can
ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy
to help investigating or fixing this issue!

Comment 1 Alexander Bokovoy 2018-07-31 13:35:10 UTC
This is a blocker for FreeIPA because loading python2 interpreter into mod_wsgi pretty much makes FreeIPA web application non-working as it ships and requires Python3 version:

[Tue Jul 31 13:15:10.689963 2018] [core:notice] [pid 14540:tid 139837933287680] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Tue Jul 31 13:15:10.692504 2018] [suexec:notice] [pid 14540:tid 139837933287680] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jul 31 13:15:10.790784 2018] [lbmethod_heartbeat:notice] [pid 14540:tid 139837933287680] AH02282: No slotmem from mod_heartmonitor
[Tue Jul 31 13:15:11.567403 2018] [mpm_event:notice] [pid 14540:tid 139837933287680] AH00489: Apache/2.4.34 (Fedora) OpenSSL/1.1.1-pre8 mod_wsgi/4.6.4 Python/2.7 mod_auth_gssapi/1.6.1 configured -- resuming normal operations
[Tue Jul 31 13:15:11.567525 2018] [core:notice] [pid 14540:tid 139837933287680] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Tue Jul 31 13:15:11.867309 2018] [wsgi:error] [pid 14545:tid 139837933287680] mod_wsgi (pid=14545): Failed to exec Python script file '/usr/share/ipa/kdcproxy.wsgi'.
[Tue Jul 31 13:15:11.867398 2018] [wsgi:error] [pid 14545:tid 139837933287680] mod_wsgi (pid=14545): Exception occurred processing WSGI script '/usr/share/ipa/kdcproxy.wsgi'.
[Tue Jul 31 13:15:11.867428 2018] [wsgi:error] [pid 14545:tid 139837933287680] Traceback (most recent call last):
[Tue Jul 31 13:15:11.867456 2018] [wsgi:error] [pid 14545:tid 139837933287680]   File "/usr/share/ipa/kdcproxy.wsgi", line 4, in <module>
[Tue Jul 31 13:15:11.867564 2018] [wsgi:error] [pid 14545:tid 139837933287680]     from kdcproxy import application
[Tue Jul 31 13:15:11.867596 2018] [wsgi:error] [pid 14545:tid 139837933287680] ImportError: No module named kdcproxy
[Tue Jul 31 13:15:11.927458 2018] [wsgi:error] [pid 14544:tid 139837933287680] mod_wsgi (pid=14544): Failed to exec Python script file '/usr/share/ipa/kdcproxy.wsgi'.
[Tue Jul 31 13:15:11.927574 2018] [wsgi:error] [pid 14544:tid 139837933287680] mod_wsgi (pid=14544): Exception occurred processing WSGI script '/usr/share/ipa/kdcproxy.wsgi'.
[Tue Jul 31 13:15:11.927618 2018] [wsgi:error] [pid 14544:tid 139837933287680] Traceback (most recent call last):
[Tue Jul 31 13:15:11.927650 2018] [wsgi:error] [pid 14544:tid 139837933287680]   File "/usr/share/ipa/kdcproxy.wsgi", line 4, in <module>
[Tue Jul 31 13:15:11.940511 2018] [wsgi:error] [pid 14544:tid 139837933287680]     from kdcproxy import application
[Tue Jul 31 13:15:11.940679 2018] [wsgi:error] [pid 14544:tid 139837933287680] ImportError: No module named kdcproxy
[Tue Jul 31 13:15:12.205331 2018] [wsgi:error] [pid 14548:tid 139837933287680] mod_wsgi (pid=14548): Failed to exec Python script file '/usr/share/ipa/wsgi.py'.
[Tue Jul 31 13:15:12.205406 2018] [wsgi:error] [pid 14548:tid 139837933287680] mod_wsgi (pid=14548): Exception occurred processing WSGI script '/usr/share/ipa/wsgi.py'.
[Tue Jul 31 13:15:12.205434 2018] [wsgi:error] [pid 14548:tid 139837933287680] Traceback (most recent call last):
[Tue Jul 31 13:15:12.205461 2018] [wsgi:error] [pid 14548:tid 139837933287680]   File "/usr/share/ipa/wsgi.py", line 43, in <module>
[Tue Jul 31 13:15:12.205576 2018] [wsgi:error] [pid 14548:tid 139837933287680]     from ipaplatform.paths import paths
[Tue Jul 31 13:15:12.205607 2018] [wsgi:error] [pid 14548:tid 139837933287680] ImportError: No module named ipaplatform.paths
[Tue Jul 31 13:15:12.208480 2018] [wsgi:error] [pid 14547:tid 139837933287680] mod_wsgi (pid=14547): Failed to exec Python script file '/usr/share/ipa/wsgi.py'.
[Tue Jul 31 13:15:12.208540 2018] [wsgi:error] [pid 14547:tid 139837933287680] mod_wsgi (pid=14547): Exception occurred processing WSGI script '/usr/share/ipa/wsgi.py'.
[Tue Jul 31 13:15:12.208575 2018] [wsgi:error] [pid 14547:tid 139837933287680] Traceback (most recent call last):
[Tue Jul 31 13:15:12.208606 2018] [wsgi:error] [pid 14547:tid 139837933287680]   File "/usr/share/ipa/wsgi.py", line 43, in <module>
[Tue Jul 31 13:15:12.211914 2018] [wsgi:error] [pid 14547:tid 139837933287680]     from ipaplatform.paths import paths
[Tue Jul 31 13:15:12.211990 2018] [wsgi:error] [pid 14547:tid 139837933287680] ImportError: No module named ipaplatform.paths
[Tue Jul 31 13:15:12.231486 2018] [wsgi:error] [pid 14550:tid 139837933287680] mod_wsgi (pid=14550): Failed to exec Python script file '/usr/share/ipa/wsgi.py'.
[Tue Jul 31 13:15:12.231590 2018] [wsgi:error] [pid 14550:tid 139837933287680] mod_wsgi (pid=14550): Exception occurred processing WSGI script '/usr/share/ipa/wsgi.py'.
[Tue Jul 31 13:15:12.231626 2018] [wsgi:error] [pid 14550:tid 139837933287680] Traceback (most recent call last):
[Tue Jul 31 13:15:12.231666 2018] [wsgi:error] [pid 14550:tid 139837933287680]   File "/usr/share/ipa/wsgi.py", line 43, in <module>
[Tue Jul 31 13:15:12.234979 2018] [wsgi:error] [pid 14550:tid 139837933287680]     from ipaplatform.paths import paths
[Tue Jul 31 13:15:12.235053 2018] [wsgi:error] [pid 14550:tid 139837933287680] ImportError: No module named ipaplatform.paths
[Tue Jul 31 13:15:12.251841 2018] [wsgi:error] [pid 14551:tid 139837933287680] mod_wsgi (pid=14551): Failed to exec Python script file '/usr/share/ipa/wsgi.py'.
[Tue Jul 31 13:15:12.251920 2018] [wsgi:error] [pid 14551:tid 139837933287680] mod_wsgi (pid=14551): Exception occurred processing WSGI script '/usr/share/ipa/wsgi.py'.
[Tue Jul 31 13:15:12.251971 2018] [wsgi:error] [pid 14551:tid 139837933287680] Traceback (most recent call last):
[Tue Jul 31 13:15:12.252002 2018] [wsgi:error] [pid 14551:tid 139837933287680]   File "/usr/share/ipa/wsgi.py", line 43, in <module>
[Tue Jul 31 13:15:12.252182 2018] [wsgi:error] [pid 14551:tid 139837933287680]     from ipaplatform.paths import paths
[Tue Jul 31 13:15:12.252219 2018] [wsgi:error] [pid 14551:tid 139837933287680] ImportError: No module named ipaplatform.paths

Comment 2 Adam Williamson 2018-07-31 22:59:16 UTC
It seems that when building for both python2 and python3, the spec first runs configure --with-python=python2 then make and %py2_build , then runs configure --with-python=python3 then make and %py3_build ... *all in the same dir* (without even a 'make clean' in the middle). This is probably the source of the problem.

I'll see if we can make the spec run the builds in different subdirectories, and that may clean this up...

Comment 3 Adam Williamson 2018-07-31 23:14:38 UTC
*** Bug 1610536 has been marked as a duplicate of this bug. ***

Comment 4 Adam Williamson 2018-07-31 23:29:13 UTC
This should be fixed in the 4.6.4-2 build I just sent.

Comment 5 Adam Williamson 2018-07-31 23:52:40 UTC
Yup, an openQA test with that build at least made it all the way through server deployment: https://openqa.stg.fedoraproject.org/tests/335286


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