From 56e02693154ff7c1d91ae914592e18cbd9bb3ab7 Mon Sep 17 00:00:00 2001 From: Katerina Koukiou Date: Tue, 9 Jul 2024 10:50:01 +0200 Subject: [PATCH] infra: temporarily install selinux-policy-targeted in container This will unblock container refreshes. This affects also RHEL. Related: https://bugzilla.redhat.com/show_bug.cgi?id=2295428 Related: https://issues.redhat.com/browse/RHEL-46558 --- dockerfile/anaconda-ci/Dockerfile | 5 +++++ .../payload/test_module_payload_dnf_installation.py | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dockerfile/anaconda-ci/Dockerfile b/dockerfile/anaconda-ci/Dockerfile index 81354df82ff..abaf566b2fc 100644 --- a/dockerfile/anaconda-ci/Dockerfile +++ b/dockerfile/anaconda-ci/Dockerfile @@ -49,6 +49,10 @@ RUN set -ex; \ fi; \ # Update the base container packages dnf update -y; \ + # FIXME + # https://bugzilla.redhat.com/show_bug.cgi?id=2295428 + # https://issues.redhat.com/browse/RHEL-46558 + # Remove selinux-policy targeted when the rhbz / RHEL issue above is fixed # Install rest of the dependencies dnf install -y \ /usr/bin/xargs \ @@ -57,6 +61,7 @@ RUN set -ex; \ bzip2 \ rpm-ostree \ python3-pip \ + selinux-policy-targeted \ rsync \ # Need to have restorecon for the tests execution policycoreutils; \ diff --git a/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_module_payload_dnf_installation.py b/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_module_payload_dnf_installation.py index f8dc81857e7..2129be56cbb 100644 --- a/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_module_payload_dnf_installation.py +++ b/tests/unit_tests/pyanaconda_tests/modules/payloads/payload/test_module_payload_dnf_installation.py @@ -59,7 +59,8 @@ def test_set_rpm_macros_default(self, mock_rpm): data = PackagesConfigurationData() macros = [ - ('__dbi_htconfig', 'hash nofsync %{__dbi_other} %{__dbi_perms}') + ('__dbi_htconfig', 'hash nofsync %{__dbi_other} %{__dbi_perms}'), + ('__file_context_path', '/etc/selinux/targeted/contexts/files/file_contexts') ] task = self._run_task(data) @@ -73,6 +74,7 @@ def test_set_rpm_macros_exclude_docs(self, mock_rpm): macros = [ ('__dbi_htconfig', 'hash nofsync %{__dbi_other} %{__dbi_perms}'), ('_excludedocs', '1'), + ('__file_context_path', '/etc/selinux/targeted/contexts/files/file_contexts') ] task = self._run_task(data) @@ -86,6 +88,7 @@ def test_set_rpm_macros_install_langs(self, mock_rpm): macros = [ ('__dbi_htconfig', 'hash nofsync %{__dbi_other} %{__dbi_perms}'), ('_install_langs', 'en:es'), + ('__file_context_path', '/etc/selinux/targeted/contexts/files/file_contexts') ] task = self._run_task(data) @@ -99,6 +102,7 @@ def test_set_rpm_macros_no_install_langs(self, mock_rpm): macros = [ ('__dbi_htconfig', 'hash nofsync %{__dbi_other} %{__dbi_perms}'), ('_install_langs', '%{nil}'), + ('__file_context_path', '/etc/selinux/targeted/contexts/files/file_contexts') ] task = self._run_task(data)