From 601e3242f026eabd8056e41f6eb07bbd82da1226 Mon Sep 17 00:00:00 2001 From: Martin Perina Date: Fri, 26 Apr 2024 16:23:03 +0200 Subject: [PATCH] Mark current dir as safe for git in build-srpm.sh Mark current directory as safe for git operation to be able to create RPM release properly. Signed-off-by: Martin Perina --- .automation/build-srpm.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.automation/build-srpm.sh b/.automation/build-srpm.sh index 211d9b0..ca66d77 100755 --- a/.automation/build-srpm.sh +++ b/.automation/build-srpm.sh @@ -1,5 +1,9 @@ #!/bin/bash -xe +# From git 2.35.2 we need to mark temporary directory, where the project is cloned to, as safe, otherwise +# git commands won't work because of the fix for CVE-2022-24765 +git config --global --add safe.directory "$(pwd)" + # git hash of current commit should be passed as the 1st paraameter if [ "${GITHUB_SHA}" == "" ]; then GIT_HASH=$(git rev-list HEAD | wc -l)