Skip to content

Commit

Permalink
Mark temp repo directory as safe for COPR (#27)
Browse files Browse the repository at this point in the history
When building from COPR the project is cloned into temporary directory,
which is not owned by current user. From git 2.35.2 such directory needs
to be marked as safe inn order git commands work correctly.

Signed-off-by: Aviv Litman <[email protected]>
  • Loading branch information
avlitman authored May 25, 2022
1 parent fe0f8a8 commit 42438ba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .copr/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.PHONY: installdeps srpm
.PHONY: installdeps git_cfg_safe srpm

installdeps:
dnf -y install git make

srpm: installdeps
git_cfg_safe:
# 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 "$(shell pwd)"

srpm: installdeps git_cfg_safe
./.automation/build-srpm.sh
cp rpmbuild/SRPMS/*.src.rpm $(outdir)

0 comments on commit 42438ba

Please sign in to comment.