From c90023ad5d9ebf30a06f3e9fd7534aa74be60a24 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Fri, 16 Jul 2021 11:44:55 +0200 Subject: [PATCH] ci: add the root user to the libvirt group When starting a minikube VM, there are always warning messages like this: X libvirt group membership check failed: user is not a member of the appropriate libvirt group The CI jobs run as root, so minikube works just fine. By adding the root user to the libvirt group, the warning is hopefully removed. Note that the libvirt group may not exist yet, as the packages will get installed in a later stage. This change also adds a check to create the libvirt group in case it is missing. Signed-off-by: Niels de Vos --- prepare.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/prepare.sh b/prepare.sh index b9c599345..7f88c20f1 100755 --- a/prepare.sh +++ b/prepare.sh @@ -80,6 +80,10 @@ set -x dnf -y install git podman make +# minikube wants the user (everything runs as root) to be in the libvirt group +getent group libvirt || groupadd --system libvirt +usermod --append --groups libvirt root + # if --history is passed, don't pass --depth=1 depth='--depth=1' if [[ "${history}" == 'yes' ]]