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 1728700 - Unable to install container-selinux 2.107
Summary: Unable to install container-selinux 2.107
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: container-selinux
Version: 8.0
Hardware: ppc64le
OS: All
high
high
Target Milestone: rc
: 8.1
Assignee: Jindrich Novy
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On: 1697826
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-10 13:40 UTC by Qian Cai
Modified: 2020-11-14 08:05 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 21:02:47 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:3403 0 None None None 2019-11-05 21:03:41 UTC

Description Qian Cai 2019-07-10 13:40:31 UTC
Description of problem:
  Installing       : container-selinux-2:2.107-1.module+el8.1.0+3402+f73c5901.noarch                                                                                                                           1/1 
  Running scriptlet: container-selinux-2:2.107-1.module+el8.1.0+3402+f73c5901.noarch                                                                                                                           1/1 
Failed to resolve typeattributeset statement at /var/lib/selinux/targeted/tmp/modules/200/container/cil:258
/usr/sbin/semodule:  Failed!

Comment 2 Qian Cai 2019-07-10 14:04:35 UTC
Apparently, this is a 8.1 container-selinux version that not going to work well with the 8.0.1 selinux policy.

Comment 3 Qian Cai 2019-07-10 14:08:15 UTC
Actually, I think the bug is still valid as once 8.1 is released, and people would hit this bug on 8.0 systems where it uses container-tools:rhel8 stream instead of 1.0.

Comment 6 Daniel Walsh 2019-07-15 17:57:41 UTC
Lukas and Petr, what is the command to see the attribute that semodule is complaining about?

Comment 7 Petr Lautrbach 2019-07-16 07:05:07 UTC
You should be able to open and read the file in the report:

# bzless /var/lib/selinux/targeted/tmp/modules/200/container/cil

or if you have a source .pp file, you can use:

# /usr/libexec/selinux/hll/pp container.pp


line 258 seems to be:

(typeattributeset cil_gen_require kmod_t)

Comment 8 Petr Lautrbach 2019-07-16 07:55:01 UTC
Btw this looks suspicious:

# rpm -ivh container-selinux-2.107-1.module+el8.1.0+3402+f73c5901.noarch.rpm 
error: Failed dependencies:
         selinux-policy-base >= 3.13.1-216.el7 is needed by container-selinux-2:2.107-1.module+el8.1.0+3402+f73c5901.noarch
         selinux-policy-targeted >= 3.13.1-216.el7 is needed by container-selinux-2:2.107-1.module+el8.1.0+3402+f73c5901.noarch

It looks like el8.1.0 requires something from .el7

Comment 9 Lokesh Mandvekar 2019-07-22 15:08:55 UTC
(In reply to Petr Lautrbach from comment #8)
> Btw this looks suspicious:
> 
> # rpm -ivh container-selinux-2.107-1.module+el8.1.0+3402+f73c5901.noarch.rpm 
> error: Failed dependencies:
>          selinux-policy-base >= 3.13.1-216.el7 is needed by
> container-selinux-2:2.107-1.module+el8.1.0+3402+f73c5901.noarch
>          selinux-policy-targeted >= 3.13.1-216.el7 is needed by
> container-selinux-2:2.107-1.module+el8.1.0+3402+f73c5901.noarch
> 
> It looks like el8.1.0 requires something from .el7

Can't reproduce it on my env

$ sudo rpm -ivh container-selinux-2.107-1.module+el8.1.0+3402+f73c5901.noarch.rpm 
Verifying...                          ################################# [100%]
Preparing...                          ################################# [100%]
Updating / installing...
   1:container-selinux-2:2.107-1.modul################################# [100%]

Comment 10 Lokesh Mandvekar 2019-07-22 15:15:30 UTC
so Cai Qian pointed out to a spec file issue in container-selinux which explicitly mentions an el7 build. Specifically, https://pkgs.devel.redhat.com/cgit/rpms/container-selinux/tree/container-selinux.spec?h=stream-container-tools-rhel8-rhel-8.1.0#n24 . %global selinux_policyver 3.13.1-216.el7

But in the lines below where it's used, it's always `>= %{selinux_policyver}`. So dnf install should work.

Comment 16 Jindrich Novy 2019-07-30 17:56:25 UTC
(In reply to Petr Lautrbach from comment #7)
> You should be able to open and read the file in the report:
> 
> # bzless /var/lib/selinux/targeted/tmp/modules/200/container/cil
> 
> or if you have a source .pp file, you can use:
> 
> # /usr/libexec/selinux/hll/pp container.pp
> 
> 
> line 258 seems to be:
> 
> (typeattributeset cil_gen_require kmod_t)

Seems this is the real issue here as semodule failing at this will break the whole transaction.

The el7 in the %global selinux_policyver 3.13.1-216.el7 is a red herring as there is this later in the spec:

Requires: selinux-policy >= %{selinux_policyver}
Requires(post): selinux-policy-base >= %{selinux_policyver}
Requires(post): selinux-policy-targeted >= %{selinux_policyver}

Note it is el8 version of container-selinux-2:2.107-1.module+el8.1.0+3402+f73c5901.noarch which is pulled via the dep which fails.

Anyone SELinux policy experienced, any idea why %post fails with this?

%{_sbindir}/semodule -n -s %{selinuxtype} -r container 2> /dev/null

Comment 17 Daniel Walsh 2019-07-30 19:17:59 UTC
Most likely some other package is requiring container.pp to be installed.

Comment 18 Jindrich Novy 2019-08-05 14:51:12 UTC
(In reply to Daniel Walsh from comment #17)
> Most likely some other package is requiring container.pp to be installed.

Not sure about this as the scriptlet of container-selinux itself fails according to the report:

  Installing       : container-selinux-2:2.107-1.module+el8.1.0+3402+f73c5901.noarch                                                                                                                           1/1 
  Running scriptlet: container-selinux-2:2.107-1.module+el8.1.0+3402+f73c5901.noarch                                                                                                                           1/1 
Failed to resolve typeattributeset statement at /var/lib/selinux/targeted/tmp/modules/200/container/cil:258
/usr/sbin/semodule:  Failed!

Or there is a file trigger on container.pp.bz2 in a different package executing this? Is it what are you trying to say Dan?

Comment 19 Daniel Walsh 2019-08-05 16:52:54 UTC
I think container-selinux requires a newer version of selinux-policy to be installed

Comment 20 Ed Santiago 2019-08-05 17:14:54 UTC
Yes, selinux-policy >= 3.14.3-9.el8. That is what I tried to say in comment 12, I am sorry for not being clear.

Comment 21 Daniel Walsh 2019-08-05 19:55:08 UTC
So container-selinux should require that version or newer to be installed prior to post.

Comment 22 Jindrich Novy 2019-08-13 13:21:15 UTC
Thanks Ed, Dan.

Only dev_ack is remaining and it's ready to get committed and built.

Comment 24 Joy Pu 2019-09-27 15:59:57 UTC
Related request is already added to container-selinux-2.107-2.module+el8.1.0+4081+b29780af.noarch. So set this to verified.
# rpm -qR container-selinux
/bin/sh
/bin/sh
libselinux-utils
policycoreutils >= 2.5-11
policycoreutils-python-utils
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
sed
selinux-policy >= 3.14.3-9.el8
selinux-policy-base >= 3.14.3-9.el8
selinux-policy-targeted >= 3.14.3-9.el8

Comment 26 errata-xmlrpc 2019-11-05 21:02:47 UTC
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://access.redhat.com/errata/RHSA-2019:3403


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