[DSE-Dev] Bug#888722: policycoreutils-python-utils: semanage port -a fails when python3-numpy is installed

Russell Coker russell at coker.com.au
Mon Jan 29 07:19:37 UTC 2018


Package: policycoreutils-python-utils
Version: 2.6-3
Severity: normal

# semanage port -a -t ssh_port_t -p tcp 1234
ValueError: Port tcp/1234 already defined
# apt-get install python3-numpy
[...]
Setting up python3-numpy (1:1.12.1-3) ...
# semanage port -a -t ssh_port_t -p tcp 1234
Traceback (most recent call last):
  File "/usr/sbin/semanage", line 28, in <module>
    import seobject
  File "/usr/lib/python3/dist-packages/seobject.py", line 34, in <module>
    import sepolicy
  File "/usr/lib/python3/dist-packages/sepolicy/__init__.py", line 8, in <module>
    import setools
  File "/usr/lib/python3/dist-packages/setools/__init__.py", line 74, in <module>
    from .infoflow import InfoFlowAnalysis
  File "/usr/lib/python3/dist-packages/setools/infoflow.py", line 22, in <module>
    import networkx as nx
  File "/usr/lib/python3/dist-packages/networkx/__init__.py", line 93, in <module>
    import networkx.linalg
  File "/usr/lib/python3/dist-packages/networkx/linalg/__init__.py", line 9, in <module>
    from networkx.linalg.algebraicconnectivity import *
  File "/usr/lib/python3/dist-packages/networkx/linalg/algebraicconnectivity.py", line 18, in <module>
    from numpy import (array, asmatrix, asarray, dot, matrix, ndarray, ones,
  File "/usr/lib/python3/dist-packages/numpy/__init__.py", line 142, in <module>
    from . import add_newdocs
  File "/usr/lib/python3/dist-packages/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/usr/lib/python3/dist-packages/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/usr/lib/python3/dist-packages/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/usr/lib/python3/dist-packages/numpy/core/__init__.py", line 33, in <module>
    from . import _internal  # for freeze programs
  File "/usr/lib/python3/dist-packages/numpy/core/_internal.py", line 14, in <module>
    import ctypes
  File "/usr/lib/python3.5/ctypes/__init__.py", line 537, in <module>
    _reset_cache()
  File "/usr/lib/python3.5/ctypes/__init__.py", line 276, in _reset_cache
    CFUNCTYPE(c_int)(lambda: None)
MemoryError
# dpkg --purge python3-numpy
(Reading database ... 37729 files and directories currently installed.)
Removing python3-numpy (1:1.12.1-3) ...
Processing triggers for man-db (2.7.6.1-2) ...
# semanage port -a -t ssh_port_t -p tcp 1234
ValueError: Port tcp/1234 already defined

The above is a transcript of a test session.  Installing python3-numpy breaks
the "semanage port -a" command, and removing it (but not removing the
dependencies it dragged in) fixes it.

Ideally this should work, and it needs to be fixed in testing if the same bug
is there (so far I've only tested on stable).  If we aren't going to backport
a fix to stable then this bug should be left open for the benefit of users.

-- System Information:
Debian Release: 9.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages policycoreutils-python-utils depends on:
ii  libc6             2.24-11+deb9u1
ii  libselinux1       2.6-3+b3
ii  libsepol1         2.6-2
ii  policycoreutils   2.6-3
ii  python3           3.5.3-1
ii  python3-audit     1:2.6.7-2
ii  python3-ipy       1:0.83-1
ii  python3-selinux   2.6-3+b3
ii  python3-semanage  2.6-2
ii  python3-sepolgen  2.6-3
ii  python3-sepolicy  2.6-3
ii  selinux-utils     2.6-3+b3

policycoreutils-python-utils recommends no packages.

policycoreutils-python-utils suggests no packages.

-- no debconf information



More information about the SELinux-devel mailing list