Ubuntu autopkgtests is giving me "No module named pyudev" for PYBUILD tests

Bug #1890243 reported by Rafael David Tinoco
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-rtslib-fb (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

In the build attempt of version

https://launchpad.net/ubuntu/+source/python-rtslib-fb/2.1.73-1ubuntu1

I got:

...
copying rtslib/tcm.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib
copying rtslib/target.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib
copying rtslib/alua.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib
copying rtslib/__init__.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib
copying rtslib/fabric.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib
copying rtslib/root.py -> /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib
running build_scripts
creating build
creating build/scripts-3.8
copying and adjusting scripts/targetctl -> build/scripts-3.8
changing mode of build/scripts-3.8/targetctl from 644 to 755
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_auto_test -O--buildsystem=pybuild
 pybuild --test -i python{version} -p 3.8
I: pybuild base:217: cd /<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build; python3.8 -m unittest discover -v
rtslib (unittest.loader._FailedTest) ... ERROR
rtslib_fb (unittest.loader._FailedTest) ... ERROR

======================================================================
ERROR: rtslib (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: rtslib
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/loader.py", line 470, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib/__init__.py", line 24, in <module>
    from .root import RTSRoot
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib/root.py", line 28, in <module>
    from .node import CFSNode
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib/node.py", line 23, in <module>
    from .utils import fread, fwrite, RTSLibError, RTSLibNotInCFS
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib/utils.py", line 30, in <module>
    import pyudev
ModuleNotFoundError: No module named 'pyudev'

======================================================================
ERROR: rtslib_fb (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: rtslib_fb
Traceback (most recent call last):
  File "/usr/lib/python3.8/unittest/loader.py", line 470, in _find_test_path
    package = self._get_module_from_name(name)
  File "/usr/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib_fb/__init__.py", line 24, in <module>
    from .root import RTSRoot
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib_fb/root.py", line 28, in <module>
    from .node import CFSNode
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib_fb/node.py", line 23, in <module>
    from .utils import fread, fwrite, RTSLibError, RTSLibNotInCFS
  File "/<<PKGBUILDDIR>>/.pybuild/cpython3_3.8/build/rtslib_fb/utils.py", line 30, in <module>
    import pyudev
ModuleNotFoundError: No module named 'pyudev'

----------------------------------------------------------------------
Ran 2 tests in 0.000s
...

I can't reproduce it locally and I'm able to import related modules.

I'm disabling PYBUILD test for python3 for it to pass for now...

Related branches

CVE References

Changed in python-rtslib-fb (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

I'll get back to this again when I put python-rtslib-fb back to sync with debian after Debian openstack team accepts (or not :o) my current merge requests (which this new version is based on).

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-rtslib-fb - 2.1.74-0ubuntu1

---------------
python-rtslib-fb (2.1.74-0ubuntu1) hirsute; urgency=medium

  * New upstream release. Remaining changes:
    - d/p/fix-path-of-etc-saveconfig.json.patch: Refresh patch.
    - d/p/lp1891214-disable-xen-pvscsi.patch: Disable xen-pvscsi due
      to unsup xen_scsiback module (LP #1891214)
    - Adjust rules for build, install, man, docs, init and systemd:
      + Use the pybuild build system.
      + Add override_installman to install manpages.
      + Add override_dh_installdocs to install the .md documentation
        files shipped by the project.
      + Simplify override_dh_installinit.
      + Add override_dh_installsystemd to install the systemd unit file.
    - d/p/fix-interpreter-version.patch: Set interpreter version to
      Python 3.
  * Dropped changes:
    - d/p/CVE-2020-14019.patch: keep proper umask when calling
      shutil.copy() in rtslib/root.py.
      [Incorporated by upstream]
  * Added changes:
    - d/python3-rtslib-fb.install: Use wildcard to match any Python
      version when installing the files.
    - Reenable testsuite run (LP: #1890243)
      + d/control: B-D on python3-pyudev.
      + d/rules: Don't disable tests.

 -- Sergio Durigan Junior <email address hidden> Fri, 29 Jan 2021 15:34:36 -0500

Changed in python-rtslib-fb (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.