Bug 1734789 - ModuleNotFoundError: No module named 'setools.policyrep.qpol'
Summary: ModuleNotFoundError: No module named 'setools.policyrep.qpol'
Alias: None
Product: Fedora
Classification: Fedora
Component: setools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
: 1725791 1735179 (view as bug list)
Depends On:
Blocks: PYTHON38
TreeView+ depends on / blocked
Reported: 2019-07-31 12:40 UTC by Lukas Slebodnik
Modified: 2019-08-06 08:11 UTC (History)
12 users (show)

Fixed In Version: setools-4.2.2-1.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-08-06 08:11:56 UTC
Type: Bug

Attachments (Terms of Use)

Description Lukas Slebodnik 2019-07-31 12:40:15 UTC
Description of problem:
The mass rebuild of packages in rawhide revealed this problem.
And it breaks selinux troubleshooter server.

Version-Release number of selected component (if applicable):
sh$ rpm -q python3-setools

How reproducible:

Steps to Reproduce:
1. dnf isntall -y python3-setools
2. python3 -c "import setools"

Actual results:
sh-5.0# rpm -q python3-setools
sh-5.0# python3 -c "import setools"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib64/python3.7/site-packages/setools/__init__.py", line 31, in <module>
    from . import policyrep
  File "/usr/lib64/python3.7/site-packages/setools/policyrep/__init__.py", line 26, in <module>
    from .bounds import BoundsRuletype
  File "/usr/lib64/python3.7/site-packages/setools/policyrep/bounds.py", line 22, in <module>
    from .qpol import qpol_typebounds_t
ModuleNotFoundError: No module named 'setools.policyrep.qpol'
sh-5.0# echo $?

Expected results:
//module imported whithout any problem
sh-5.0# python3 -c "import setools"
sh-5.0# echo $?

Additional info:
sh-5.0# dnf repoquery --whatprovides /usr/lib64/python3.7/site-packages/setools/policyrep/qpol.py
Last metadata expiration check: 0:00:54 ago on Wed 31 Jul 2019 02:34:50 PM CEST.

Comment 1 Petr Lautrbach 2019-07-31 19:16:12 UTC
*** Bug 1725791 has been marked as a duplicate of this bug. ***

Comment 2 Petr Lautrbach 2019-07-31 19:16:57 UTC
It's most likely related to changes in swig-4.0.0

Comment 3 Miro Hrončok 2019-07-31 19:33:30 UTC
See also bz1715589.

Comment 4 Petr Lautrbach 2019-07-31 20:02:13 UTC
The simplest solution would be to update to latest setools-4.2.2 which doesn't use swig anymore. We already have this version in a module. setools is python3 only since 4.2.0 release, python2-setools is required by python2-policycoreutils, and python2-policycoreutils is required by dokuwiki-selinux - https://src.fedoraproject.org/rpms/dokuwiki/pull-requests - and vdsm - latest build seems to be 447.git0bb7717.fc28.

So I'd update setools to 4.2.2 and drop python2-setools and python2-policycoreutils in order to get rid of the dependency on swig.

Comment 5 Miro Hrončok 2019-07-31 20:13:09 UTC
vdsm doesn't install anyway, see bz1701928.

Comment 6 Petr Lautrbach 2019-08-02 09:13:08 UTC
WIP https://src.fedoraproject.org/rpms/setools/pull-request/10

Comment 7 Lukas Slebodnik 2019-08-02 17:54:42 UTC
*** Bug 1735179 has been marked as a duplicate of this bug. ***

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