From d1e324767517ce7e3514737bf8dd5b2eb1decc03 Mon Sep 17 00:00:00 2001 From: Erik Skultety Date: Tue, 7 Jun 2022 14:51:14 +0200 Subject: [PATCH] ci: integration: Set 'safe.directory' when installing QEMU from git 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 Reviewed-by: Andrea Bolognani --- 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