Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1734789

Summary: ModuleNotFoundError: No module named 'setools.policyrep.qpol'
Product: [Fedora] Fedora Reporter: Lukas Slebodnik <lslebodn>
Component: setoolsAssignee: Petr Lautrbach <plautrba>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: urgent Docs Contact:
Priority: urgent    
Version: rawhideCC: caillon+fedoraproject, caolanm, cpebenito, dwalsh, john.j5live, mgrepl, mhroncok, plautrba, rhughes, rstrode, sandmann, vmojzis
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: setools-4.2.2-1.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 08:11:56 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: 1686977    

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
python3-setools-4.1.1-15.fc31.x86_64

How reproducible:
Deterministic

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

Actual results:
sh-5.0# rpm -q python3-setools
python3-setools-4.1.1-15.fc31.x86_64
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 $?
1

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

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.
python3-setools-0:4.1.1-14.fc30.x86_64

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. ***