Bug 1349954
| Summary: | libselinux-2.5-8.fc25 breaks libselinux-python (ImportError: No module named '_selinux') | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Adam Williamson <awilliam> |
| Component: | libselinux | Assignee: | Petr Lautrbach <plautrba> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | urgent | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | dennis, dwalsh, fweimer, gwync, mgrepl, plautrba, robatino |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | AcceptedBlocker | ||
| Fixed In Version: | libselinux-2.5-8.fc25.x86_64 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-06-27 07:48:28 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1277284 | ||
|
Description
Adam Williamson
2016-06-24 16:01:17 UTC
This is a problem related to the new swig-3.10. It changed a way how it creates modules with bindings so that a new module doesn't use imp.find_module('_selinux', [dirname(__file__)]) but importlib.import_module('_selinux')
It means that even when libselinux-2.5-6.fc25 (which originally worked just find in Rawhide) was rebuilt, it stopped worked. I found it out second day after I built 2.5-7.fc25 because I tested it on my f24 with the old swig and everything worked just fine. It was fixed on Friday by 2.5-8.fc25 update.
# rpm -q libselinux
libselinux-2.5-7.fc25.x86_64
# python3 -c 'import selinux'
Traceback (most recent call last):
File "/usr/lib64/python3.5/site-packages/selinux/__init__.py", line 18, in swig_import_helper
return importlib.import_module(mname)
File "/usr/lib64/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named '_selinux'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib64/python3.5/site-packages/selinux/__init__.py", line 21, in <module>
_selinux = swig_import_helper()
File "/usr/lib64/python3.5/site-packages/selinux/__init__.py", line 20, in swig_import_helper
return importlib.import_module('_selinux')
File "/usr/lib64/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: No module named '_selinux'
# dnf update
...
# rpm -q libselinux
libselinux-2.5-8.fc25.x86_64
# python3 -c 'import selinux'
#
|