[libvirt PATCH 2/2] ci: integration: Set 'safe.directory' when installing QEMU from git

Erik Skultety eskultet at redhat.com
Wed Jun 8 05:59:37 UTC 2022


Since a fix for CVE-2022-24765 was released every git command is now
checked against the context repo in which it's supposed to run
resulting in a fatal error if the repo is owned by other user than the
one running the git command.
This means that in order to be able to do 'sudo make install', we have
to set the 'safe.directory' for the root user. This is because QEMU
runs 'git submodule update' automatically on 'make install'.

Signed-off-by: Erik Skultety <eskultet at redhat.com>
---
 ci/integration-template.yml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ci/integration-template.yml b/ci/integration-template.yml
index a04c72acbf..a1fecbb78d 100644
--- a/ci/integration-template.yml
+++ b/ci/integration-template.yml
@@ -16,6 +16,11 @@
     then
       make -j"$JOBS" check-build;
     fi
+
+  # we need the following since the fix for CVE-2022-24765 now causes a fatal
+  # error if a user issues a git command from within a directory owned by some
+  # other user
+  - sudo git config --global --add safe.directory "$SCRATCH_DIR/qemu"
   - sudo make install
 
 
-- 
2.36.1



More information about the libvir-list mailing list