Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: When bind is being installed in container while building container image, tracebacks are shown. Version-Release number of selected component (if applicable): bind-9.11.4-10.P2.fc28.x86_64 How reproducible: Deterministic. Steps to Reproduce: 1. Have Dockerfile: FROM registry.fedoraproject.org/fedora:28 RUN dnf install -y bind 2. Build the image: docker build . Actual results: Installing : GeoIP-GeoLite-data-2018.06-1.fc28.noarch 14/18 Installing : GeoIP-1.6.12-3.fc28.x86_64 15/18 Installing : bind-libs-lite-32:9.11.4-10.P2.fc28.x86_64 16/18 Installing : bind-libs-32:9.11.4-10.P2.fc28.x86_64 17/18 Running scriptlet: bind-32:9.11.4-10.P2.fc28.x86_64 18/18 Installing : bind-32:9.11.4-10.P2.fc28.x86_64 18/18 Running scriptlet: bind-32:9.11.4-10.P2.fc28.x86_64 18/18 Traceback (most recent call last): File "/sbin/semanage", line 28, in <module> import seobject File "/usr/lib/python3.6/site-packages/seobject.py", line 1045, in <module> class portRecords(semanageRecords): File "/usr/lib/python3.6/site-packages/seobject.py", line 1047, in portRecords valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "port_type"))[0]["types"]) File "/usr/lib/python3.6/site-packages/sepolicy/__init__.py", line 197, in <genexpr> return ({ File "/usr/lib64/python3.6/site-packages/setools/typeattrquery.py", line 65, in results for attr in self.policy.typeattributes(): AttributeError: 'NoneType' object has no attribute 'typeattributes' /var/tmp/rpm-tmp.nhHq8c: line 10: /var/lib/selinux/targeted/rpmbooleans.custom: No such file or directory Traceback (most recent call last): File "/sbin/semanage", line 28, in <module> import seobject File "/usr/lib/python3.6/site-packages/seobject.py", line 1045, in <module> class portRecords(semanageRecords): File "/usr/lib/python3.6/site-packages/seobject.py", line 1047, in portRecords valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "port_type"))[0]["types"]) File "/usr/lib/python3.6/site-packages/sepolicy/__init__.py", line 197, in <genexpr> return ({ File "/usr/lib64/python3.6/site-packages/setools/typeattrquery.py", line 65, in results for attr in self.policy.typeattributes(): AttributeError: 'NoneType' object has no attribute 'typeattributes' /var/tmp/rpm-tmp.nhHq8c: line 28: /var/lib/selinux/targeted/rpmbooleans.custom: No such file or directory Traceback (most recent call last): File "/usr/sbin/semanage", line 28, in <module> import seobject File "/usr/lib/python3.6/site-packages/seobject.py", line 1045, in <module> class portRecords(semanageRecords): File "/usr/lib/python3.6/site-packages/seobject.py", line 1047, in portRecords valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "port_type"))[0]["types"]) File "/usr/lib/python3.6/site-packages/sepolicy/__init__.py", line 197, in <genexpr> return ({ File "/usr/lib64/python3.6/site-packages/setools/typeattrquery.py", line 65, in results for attr in self.policy.typeattributes(): AttributeError: 'NoneType' object has no attribute 'typeattributes' Running scriptlet: GeoIP-GeoLite-data-2018.06-1.fc28.noarch 18/18 Running scriptlet: bind-32:9.11.4-10.P2.fc28.x86_64 18/18 Verifying : bind-32:9.11.4-10.P2.fc28.x86_64 1/18 Verifying : bind-libs-32:9.11.4-10.P2.fc28.x86_64 2/18 Verifying : bind-libs-lite-32:9.11.4-10.P2.fc28.x86_64 3/18 Expected results: No tracebacks. Additional info:
The same problem appears on Fedora 29. I believe the cause is that selinux-policy-targeted is not installed in the set of packages. No package brings the dependency on selinux-policy-targeted. # docker build . Sending build context to Docker daemon 165.2 MB Step 1/2 : FROM registry.fedoraproject.org/fedora:29 Trying to pull repository registry.fedoraproject.org/fedora ... sha256:93bf09b2808722b4506658b64d863e736c627a079f206b4437b0d9565bf307ac: Pulling from registry.fedoraproject.org/fedora 7692efc5f81c: Pull complete Digest: sha256:93bf09b2808722b4506658b64d863e736c627a079f206b4437b0d9565bf307ac Status: Downloaded newer image for registry.fedoraproject.org/fedora:29 ---> a5cc8ccd230a Step 2/2 : RUN dnf install -y bind ---> Running in c17061722743 Fedora Modular 29 - x86_64 418 kB/s | 1.5 MB 00:03 Fedora Modular 29 - x86_64 - Updates 755 kB/s | 1.6 MB 00:02 Fedora Modular 29 - x86_64 - Test Updates 622 kB/s | 1.7 MB 00:02 Fedora 29 - x86_64 - Test Updates 1.1 MB/s | 14 MB 00:12 Fedora 29 - x86_64 - Updates 971 kB/s | 12 MB 00:12 Fedora 29 - x86_64 666 kB/s | 62 MB 01:35 Last metadata expiration check: 0:00:01 ago on Wed Nov 14 19:33:19 2018. Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: bind x86_64 32:9.11.4-10.P2.fc29 updates-testing 2.1 M Installing dependencies: bind-libs x86_64 32:9.11.4-10.P2.fc29 updates-testing 84 k bind-libs-lite x86_64 32:9.11.4-10.P2.fc29 updates-testing 1.0 M bind-license noarch 32:9.11.4-10.P2.fc29 updates-testing 18 k libselinux-utils x86_64 2.8-4.fc29 updates-testing 100 k policycoreutils x86_64 2.8-8.fc29 updates-testing 187 k policycoreutils-python-utils noarch 2.8-8.fc29 updates-testing 64 k python3-audit x86_64 3.0-0.4.20180831git0047a6c.fc29 updates-testing 75 k python3-libselinux x86_64 2.8-4.fc29 updates-testing 165 k python3-libsemanage x86_64 2.8-4.fc29 updates-testing 76 k python3-policycoreutils noarch 2.8-8.fc29 updates-testing 2.1 M python3-setools x86_64 4.1.1-13.fc29 updates-testing 434 k selinux-policy noarch 3.14.2-42.fc29 updates 116 k GeoIP x86_64 1.6.12-4.fc29 fedora 113 k GeoIP-GeoLite-data noarch 2018.06-2.fc29 fedora 549 k checkpolicy x86_64 2.8-2.fc29 fedora 311 k python3-IPy noarch 0.81-23.fc29 fedora 37 k Transaction Summary ================================================================================ Install 17 Packages Total download size: 7.4 M Installed size: 20 M Downloading Packages: (1/17): bind-libs-9.11.4-10.P2.fc29.x86_64.rpm 262 kB/s | 84 kB 00:00 (2/17): bind-license-9.11.4-10.P2.fc29.noarch.r 283 kB/s | 18 kB 00:00 (3/17): libselinux-utils-2.8-4.fc29.x86_64.rpm 386 kB/s | 100 kB 00:00 (4/17): policycoreutils-2.8-8.fc29.x86_64.rpm 395 kB/s | 187 kB 00:00 (5/17): policycoreutils-python-utils-2.8-8.fc29 329 kB/s | 64 kB 00:00 (6/17): python3-audit-3.0-0.4.20180831git0047a6 309 kB/s | 75 kB 00:00 (7/17): python3-libselinux-2.8-4.fc29.x86_64.rp 348 kB/s | 165 kB 00:00 (8/17): python3-libsemanage-2.8-4.fc29.x86_64.r 295 kB/s | 76 kB 00:00 (9/17): bind-libs-lite-9.11.4-10.P2.fc29.x86_64 380 kB/s | 1.0 MB 00:02 (10/17): bind-9.11.4-10.P2.fc29.x86_64.rpm 545 kB/s | 2.1 MB 00:03 (11/17): python3-setools-4.1.1-13.fc29.x86_64.r 350 kB/s | 434 kB 00:01 (12/17): selinux-policy-3.14.2-42.fc29.noarch.r 296 kB/s | 116 kB 00:00 (13/17): GeoIP-1.6.12-4.fc29.x86_64.rpm 243 kB/s | 113 kB 00:00 (14/17): checkpolicy-2.8-2.fc29.x86_64.rpm 541 kB/s | 311 kB 00:00 (15/17): python3-IPy-0.81-23.fc29.noarch.rpm 333 kB/s | 37 kB 00:00 (16/17): GeoIP-GeoLite-data-2018.06-2.fc29.noar 423 kB/s | 549 kB 00:01 (17/17): python3-policycoreutils-2.8-8.fc29.noa 573 kB/s | 2.1 MB 00:03 -------------------------------------------------------------------------------- Total 756 kB/s | 7.4 MB 00:10 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : python3-libselinux-2.8-4.fc29.x86_64 1/17 Installing : libselinux-utils-2.8-4.fc29.x86_64 2/17 Installing : policycoreutils-2.8-8.fc29.x86_64 3/17 Running scriptlet: policycoreutils-2.8-8.fc29.x86_64 3/17 Installing : bind-license-32:9.11.4-10.P2.fc29.noarch 4/17 Installing : selinux-policy-3.14.2-42.fc29.noarch 5/17 Running scriptlet: selinux-policy-3.14.2-42.fc29.noarch 5/17 Installing : python3-libsemanage-2.8-4.fc29.x86_64 6/17 Installing : python3-setools-4.1.1-13.fc29.x86_64 7/17 Installing : python3-IPy-0.81-23.fc29.noarch 8/17 Installing : checkpolicy-2.8-2.fc29.x86_64 9/17 Installing : GeoIP-GeoLite-data-2018.06-2.fc29.noarch 10/17 Installing : GeoIP-1.6.12-4.fc29.x86_64 11/17 Installing : bind-libs-lite-32:9.11.4-10.P2.fc29.x86_64 12/17 Installing : bind-libs-32:9.11.4-10.P2.fc29.x86_64 13/17 Installing : python3-audit-3.0-0.4.20180831git0047a6c.fc29.x86_ 14/17 Installing : python3-policycoreutils-2.8-8.fc29.noarch 15/17 Installing : policycoreutils-python-utils-2.8-8.fc29.noarch 16/17 Running scriptlet: bind-32:9.11.4-10.P2.fc29.x86_64 17/17 Installing : bind-32:9.11.4-10.P2.fc29.x86_64 17/17 Running scriptlet: bind-32:9.11.4-10.P2.fc29.x86_64 17/17 Traceback (most recent call last): File "/sbin/semanage", line 28, in <module> import seobject File "/usr/lib/python3.7/site-packages/seobject.py", line 1039, in <module> class portRecords(semanageRecords): File "/usr/lib/python3.7/site-packages/seobject.py", line 1041, in portRecords valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "port_type"))[0]["types"]) File "/usr/lib/python3.7/site-packages/sepolicy/__init__.py", line 197, in <genexpr> return ({ File "/usr/lib64/python3.7/site-packages/setools/typeattrquery.py", line 65, in results for attr in self.policy.typeattributes(): AttributeError: 'NoneType' object has no attribute 'typeattributes' /var/tmp/rpm-tmp.eHPbYG: line 10: /var/lib/selinux/targeted/rpmbooleans.custom: No such file or directory Traceback (most recent call last): File "/sbin/semanage", line 28, in <module> import seobject File "/usr/lib/python3.7/site-packages/seobject.py", line 1039, in <module> class portRecords(semanageRecords): File "/usr/lib/python3.7/site-packages/seobject.py", line 1041, in portRecords valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "port_type"))[0]["types"]) File "/usr/lib/python3.7/site-packages/sepolicy/__init__.py", line 197, in <genexpr> return ({ File "/usr/lib64/python3.7/site-packages/setools/typeattrquery.py", line 65, in results for attr in self.policy.typeattributes(): AttributeError: 'NoneType' object has no attribute 'typeattributes' /var/tmp/rpm-tmp.eHPbYG: line 28: /var/lib/selinux/targeted/rpmbooleans.custom: No such file or directory Traceback (most recent call last): File "/usr/sbin/semanage", line 28, in <module> import seobject File "/usr/lib/python3.7/site-packages/seobject.py", line 1039, in <module> class portRecords(semanageRecords): File "/usr/lib/python3.7/site-packages/seobject.py", line 1041, in portRecords valid_types = list(list(sepolicy.info(sepolicy.ATTRIBUTE, "port_type"))[0]["types"]) File "/usr/lib/python3.7/site-packages/sepolicy/__init__.py", line 197, in <genexpr> return ({ File "/usr/lib64/python3.7/site-packages/setools/typeattrquery.py", line 65, in results for attr in self.policy.typeattributes(): AttributeError: 'NoneType' object has no attribute 'typeattributes' Running scriptlet: GeoIP-GeoLite-data-2018.06-2.fc29.noarch 17/17 Running scriptlet: bind-32:9.11.4-10.P2.fc29.x86_64 17/17 Verifying : bind-32:9.11.4-10.P2.fc29.x86_64 1/17 Verifying : bind-libs-32:9.11.4-10.P2.fc29.x86_64 2/17 Verifying : bind-libs-lite-32:9.11.4-10.P2.fc29.x86_64 3/17 Verifying : bind-license-32:9.11.4-10.P2.fc29.noarch 4/17 Verifying : libselinux-utils-2.8-4.fc29.x86_64 5/17 Verifying : policycoreutils-2.8-8.fc29.x86_64 6/17 Verifying : policycoreutils-python-utils-2.8-8.fc29.noarch 7/17 Verifying : python3-audit-3.0-0.4.20180831git0047a6c.fc29.x86_ 8/17 Verifying : python3-libselinux-2.8-4.fc29.x86_64 9/17 Verifying : python3-libsemanage-2.8-4.fc29.x86_64 10/17 Verifying : python3-policycoreutils-2.8-8.fc29.noarch 11/17 Verifying : python3-setools-4.1.1-13.fc29.x86_64 12/17 Verifying : selinux-policy-3.14.2-42.fc29.noarch 13/17 Verifying : GeoIP-1.6.12-4.fc29.x86_64 14/17 Verifying : GeoIP-GeoLite-data-2018.06-2.fc29.noarch 15/17 Verifying : checkpolicy-2.8-2.fc29.x86_64 16/17 Verifying : python3-IPy-0.81-23.fc29.noarch 17/17 Installed: bind-32:9.11.4-10.P2.fc29.x86_64 bind-libs-32:9.11.4-10.P2.fc29.x86_64 bind-libs-lite-32:9.11.4-10.P2.fc29.x86_64 bind-license-32:9.11.4-10.P2.fc29.noarch libselinux-utils-2.8-4.fc29.x86_64 policycoreutils-2.8-8.fc29.x86_64 policycoreutils-python-utils-2.8-8.fc29.noarch python3-audit-3.0-0.4.20180831git0047a6c.fc29.x86_64 python3-libselinux-2.8-4.fc29.x86_64 python3-libsemanage-2.8-4.fc29.x86_64 python3-policycoreutils-2.8-8.fc29.noarch python3-setools-4.1.1-13.fc29.x86_64 selinux-policy-3.14.2-42.fc29.noarch GeoIP-1.6.12-4.fc29.x86_64 GeoIP-GeoLite-data-2018.06-2.fc29.noarch checkpolicy-2.8-2.fc29.x86_64 python3-IPy-0.81-23.fc29.noarch Complete! ---> aece20d614bd Removing intermediate container c17061722743 Successfully built aece20d614bd
*** This bug has been marked as a duplicate of bug 1558861 ***