Skip to content

Commit

Permalink
Mark temp repo directory as safe for COPR (oVirt#232)
Browse files Browse the repository at this point in the history
* Mark temp repo directory as safe for COPR

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.
  • Loading branch information
michalskrivanek authored and erav committed Jun 21, 2022
1 parent 849a262 commit 2db58c6
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,9 +1,14 @@
.PHONY: installdeps srpm
.PHONY: installdeps git_cfg_safe srpm

installdeps:
dnf -y install autoconf automake gcc gettext-devel git libtool make openssl python3-dateutil python3-devel python3-libvirt python3-pyyaml python3-six systemd-units util-linux

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
$(eval SUFFIX=$(shell sh -c " echo '.$$(date -u +%Y%m%d%H%M%S).git$$(git rev-parse --short HEAD)'"))
mkdir -p tmp.repos
./autogen.sh \
Expand Down

0 comments on commit 2db58c6

Please sign in to comment.