From eea2cbd6a6a2387a1d89946da5512e12c75f19b2 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Wed, 15 Feb 2017 14:48:20 -0600 Subject: [PATCH] .redhat-ci.sh: Correct avoid selinux issues At present, when overlayfs is used on RHEL and Centos to unlock ostree, selinux and permissions get set with the wrong permissions. This is a work-around for now. Closes: #896 Approved by: jlebon --- .redhat-ci.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.redhat-ci.sh b/.redhat-ci.sh index 711fda3..7a8af8d 100755 --- a/.redhat-ci.sh +++ b/.redhat-ci.sh @@ -5,15 +5,22 @@ NO_TEST=${NO_TEST:-} mount --make-rshared / -if [ -f /run/ostree-booted ]; then +if [ -f /run/ostree-booted ] && grep -q ID=fedora /etc/os-release; then if [ ! -e /var/tmp/ostree-unlock-ovl.* ]; then ostree admin unlock fi +elif [ -f /run/ostree-booted ]; then + # Until overlayfs and selinux get along, use remount + # instead of ostree admin unlock + if [ ! -w /usr ]; then + mount -o remount,rw /usr + fi else dnf install -y atomic python3-coverage fi -systemctl start docker +# Restarting docker helps with permissions related to above. +systemctl restart docker # somewhat mimic the spec conditional source /etc/os-release