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 56b0c7c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion 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 @@ -32,7 +37,8 @@ RUN set -e; \
python3-lxml \
policycoreutils \
python3-gobject-base \
python3-pip; \
python3-pip \
selinux-policy-targeted; \
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; \
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; \
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 56b0c7c

Please sign in to comment.