Fix, yum operations: set SELinux context for repo paths

The path to the repositories passed by the user may not have
a system context and then it may not visibile inside the container,
unless :z is specified.

The issue can be seen at least in wallaby (caught in a downstream
build), while it used to work on train (maybe different podman?),
but the addition of :z doesn't seem to break the latter branch.

Closes-Bug: #1981340
Change-Id: If14c2249da09a5d855f33abf9b68f5897aa43490
This commit is contained in:
Luigi Toscano 2022-07-11 17:40:09 +02:00
parent c9831b59fd
commit 7730fd1965
2 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@
{% endif %}
{% for repo in file_repos.stdout_lines %}
{% if repo is exists %}
--volume {{ repo }}:{{ repo }}
--volume {{ repo }}:{{ repo }}:z
{% endif %}
{% endfor %}
--user root
@ -74,7 +74,7 @@
{% endif %}
{% for repo in file_repos.stdout_lines %}
{% if repo is exists %}
--volume {{ repo }}:{{ repo }}
--volume {{ repo }}:{{ repo }}:z
{% endif %}
{% endfor %}
--user root

View File

@ -117,7 +117,7 @@
{% endif %}
{% for repo in file_repos.stdout_lines %}
{% if repo is exists %}
--volume {{ repo }}:{{ repo }}
--volume {{ repo }}:{{ repo }}:z
{% endif %}
{% endfor %}
--user root
@ -138,7 +138,7 @@
--volume /etc/pki:/etc/pki
{% for repo in file_repos.stdout_lines %}
{% if repo is exists %}
--volume {{ repo }}:{{ repo }}
--volume {{ repo }}:{{ repo }}:z
{% endif %}
{% endfor %}
--user root