Skip to content

Commit

Permalink
infra: temporarily install selinux-policy-targeted in container
Browse files Browse the repository at this point in the history
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

Cherry-picked from master branch commit: 56e0269.
  • Loading branch information
KKoukiou committed Sep 20, 2024
1 parent 8627b8b commit 89b03f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions dockerfile/anaconda-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ RUN set -ex; \
# Prepare environment and install build dependencies
RUN set -e; \
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 \
curl-minimal \
/usr/bin/xargs \
Expand All @@ -34,6 +39,7 @@ RUN set -e; \
python3-gobject-base \
python3-pip; \
curl -L https://raw.githubusercontent.com/rhinstaller/anaconda/${git_branch}/anaconda.spec.in | sed 's/@PACKAGE_VERSION@/0/; s/@PACKAGE_RELEASE@/0/; s/%{__python3}/python3/' > /tmp/anaconda.spec; \
selinux-policy-targeted \
rpmspec -q --buildrequires /tmp/anaconda.spec | xargs -d '\n' dnf install -y; \
rpmspec -q --requires /tmp/anaconda.spec | grep -v anaconda | xargs -d '\n' dnf install -y; \
dnf clean all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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)
Expand All @@ -63,6 +64,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)
Expand All @@ -76,6 +78,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)
Expand All @@ -89,6 +92,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)
Expand Down

0 comments on commit 89b03f4

Please sign in to comment.