RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1932650 - add python38-libselinux
Summary: add python38-libselinux
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: distribution
Version: 8.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Tomas Orsava
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-24 20:29 UTC by Lark Gordon
Modified: 2024-06-14 00:29 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-03-31 10:29:26 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)

Description Lark Gordon 2021-02-24 20:29:48 UTC
Description of problem:
There's no python38-libselinux package for RHEL 8, which causes some applications to fail when python38 is used.

For example, when I install python38 and attempt to use Ansible modules, I get this error: 

"Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"

How reproducible:

100%; customer portal package search confirms there's no python38-libselinux package available.

Actual results:
No python38-libselinux package is available

Expected results:
Should have libselinux functionality for python38

Comment 1 Tomas Orsava 2021-02-25 16:02:49 UTC
Hi Lark,
I see that the customer "want[s] to use the latest python and still be able to use selinux enforcing."

Selinux enforcing works with Python 3.8 already. A python38-libselinux package is not necessary for selinux enforcing to work.

The python3-libselinux package that we provide contains Python 3.6 SELinux bindings for developing SELinux applications.
Is is not feasible to ship the libselinux Python bindings for other alternative Python stacks, so we don't provide python38-libselinux.

We recommend to use Python 3.6 or Platform-Python to run Ansible.

https://www.ansible.com/blog/integrating-ansible-and-red-hat-enterprise-linux-8-beta

Comment 5 Mark Faine 2022-04-25 19:04:32 UTC
As someone who has to deal with these issues all the time and has been working to resolve this issue for a while, after so much searching, this is a very disappointing response.

Comment 6 Jens Viebig 2022-05-31 07:13:33 UTC
Now that ansible-core in RHEL 8.6 depends on python38 and sets it as the default python binary, I think this bug should be reopened and a solution reconsidered

Comment 7 frush 2022-06-02 17:26:23 UTC
Let me second the call that this bug should be reopened.   Ansible-core 2.12.2 on EL 8.6 requires python 3.8, and therefore a python38-libselinux

#  ansible --version
ansible [core 2.12.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python3.8/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /bin/ansible
  python version = 3.8.12 (default, Apr  5 2022, 08:07:47) [GCC 8.5.0 20210514 (Red Hat 8.5.0-10.0.1)]
  jinja version = 2.10.3
  libyaml = True

Example error:

TASK [ Set SELINUX Boolean ]
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'selinux'
fatal: [isxxt003.is.colostate.edu]: FAILED! => {"changed": false, "msg": "Failed to import the required Python library (libselinux-python) on hostnames's Python /usr/bin/python3.8. Please read the module documentation and install it in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter"}


Lack of this library will be a breaking change to ansible on hosts that are updated from 2.9 to 5.4.

Comment 8 Miro Hrončok 2022-06-03 10:00:33 UTC
We regularly triage new bugzillas but we don't go over the closed ones. If you have a new problem/request, open a new bugzilla, please.

Comment 9 Harald Gutmann 2022-06-04 15:01:50 UTC
Stumbled on same issue, opened a new ticket:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=2093589

Comment 10 frush 2022-06-13 14:26:08 UTC
I also opened a new ticket:
https://bugzilla.redhat.com/show_bug.cgi?id=2093105


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