From: Edwin Török Date: Tue, 17 Nov 2020 18:24:09 +0000 (+0000) Subject: automation/scripts/containerize: fix DOCKER_CMD=podman X-Git-Tag: archive/raspbian/4.16.0+51-g0941d6cb-1+rpi1~2^2~42^2~1402 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=415f904254b7343a90db895134980cbb7f7f0479;p=xen.git automation/scripts/containerize: fix DOCKER_CMD=podman On CentOS 8 with SELinux containerize doesn't work at all: Make sure that the source code and SSH agent directories are passed on with SELinux relabeling enabled. (`-security-opt label=disabled` would be another option) Signed-off-by: Edwin Török Acked-by: Doug Goldstein --- diff --git a/automation/scripts/containerize b/automation/scripts/containerize index 58b83653b1..c8c3c20fa2 100755 --- a/automation/scripts/containerize +++ b/automation/scripts/containerize @@ -7,7 +7,7 @@ # and /etc/subgid. # docker_cmd=${DOCKER_CMD:-"docker"} -[ "$DOCKER_CMD" = "podman" ] && userns_podman="--userns=keep-id" +[ "$DOCKER_CMD" = "podman" ] && userns_podman="--userns=keep-id" selinux=",z" einfo() { echo "$*" >&2 @@ -94,9 +94,9 @@ einfo "*** Launching container ..." exec ${docker_cmd} run \ ${userarg} \ ${SSH_AUTH_SOCK:+-e SSH_AUTH_SOCK="/tmp/ssh-agent/${SSH_AUTH_NAME}"} \ - -v "${CONTAINER_PATH}":/build:rw \ + -v "${CONTAINER_PATH}":/build:rw${selinux} \ -v "${HOME}/.ssh":/root/.ssh:ro \ - ${SSH_AUTH_DIR:+-v "${SSH_AUTH_DIR}":/tmp/ssh-agent} \ + ${SSH_AUTH_DIR:+-v "${SSH_AUTH_DIR}":/tmp/ssh-agent${selinux}} \ ${XEN_CONFIG_EXPERT:+-e XEN_CONFIG_EXPERT=${XEN_CONFIG_EXPERT}} \ ${CONTAINER_ARGS} \ -${termint}i --rm -- \