Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
Description of problem:
semanage command failed with updated selinux-policy-targeted
Version-Release number of selected component (if applicable):
selinux-policy-3.13.1-68.el7.noarch
policycoreutils-python-2.5-2.el7.x86_64
policycoreutils-2.5-2.el7.x86_64
selinux-policy-targeted-3.13.1-68.el7.noarch
libselinux-2.5-2.el7.x86_64
How reproducible:
always
Steps to Reproduce:
1.
# semanage fcontext --add -t virt_image_t -r s0 "/usr/share/avocado/data/avocado-vt/images(/.*)?"
ERROR: policydb version 30 does not match my version range 15-29
ERROR: Unable to open policy //etc/selinux/targeted/policy/policy.30.
Traceback (most recent call last):
File "/usr/sbin/semanage", line 32, in <module>
import seobject
File "/usr/lib/python2.7/site-packages/seobject/__init__.py", line 35, in <module>
import sepolicy
File "/usr/lib64/python2.7/site-packages/sepolicy/__init__.py", line 907, in <module>
raise e
ValueError: Failed to read //etc/selinux/targeted/policy/policy.30 policy file
2.
3.
Actual results:
failed
Expected results:
succeed
Additional info:
works fine when with policy.29
Generally, it should work:
# rpm -qf /etc/selinux/targeted/policy/policy.30
selinux-policy-targeted-3.13.1-68.el7.noarch
# semanage fcontext --add -t virt_image_t -r s0 "/usr/share/avocado/data/avocado-vt/images(/.*)?"
#
We either have a missing dependency or need to make another rebuild.
Please provide an output of:
$ rpm -q checkpolicy setools policycoreutils libsemanage libselinux libsepol
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHEA-2016-2279.html
hello,
I worked on yocto with meta-selinux, and have same issue.
Could you let me know which patch work on this issue?
Comment 16Dalibor Pospíšil
2017-12-08 09:29:53 UTC
This is not about patch, it is about process of releasing correctly build and published matching versions of policy and userspace in the available repositories. This might occur during some transitional period when there's new policy package but not yet update userspace libraries and/or tools. Normally, this should not happen while using official supported repositories.
Description of problem: semanage command failed with updated selinux-policy-targeted Version-Release number of selected component (if applicable): selinux-policy-3.13.1-68.el7.noarch policycoreutils-python-2.5-2.el7.x86_64 policycoreutils-2.5-2.el7.x86_64 selinux-policy-targeted-3.13.1-68.el7.noarch libselinux-2.5-2.el7.x86_64 How reproducible: always Steps to Reproduce: 1. # semanage fcontext --add -t virt_image_t -r s0 "/usr/share/avocado/data/avocado-vt/images(/.*)?" ERROR: policydb version 30 does not match my version range 15-29 ERROR: Unable to open policy //etc/selinux/targeted/policy/policy.30. Traceback (most recent call last): File "/usr/sbin/semanage", line 32, in <module> import seobject File "/usr/lib/python2.7/site-packages/seobject/__init__.py", line 35, in <module> import sepolicy File "/usr/lib64/python2.7/site-packages/sepolicy/__init__.py", line 907, in <module> raise e ValueError: Failed to read //etc/selinux/targeted/policy/policy.30 policy file 2. 3. Actual results: failed Expected results: succeed Additional info: works fine when with policy.29