Vagrantfile.fedora: fix build wrt new git

With the updated git in Fedora 35, we can't build it via sudo:

	ssh default 'sudo -i make -C /vagrant localunittest'
	make: Entering directory '/vagrant'
	fatal: unsafe repository ('/vagrant' is owned by someone else)
	To add an exception for this directory, call:

		git config --global --add safe.directory /vagrant
	go build -trimpath "-buildmode=pie"  -tags "seccomp" -ldflags "-X main.gitCommit= -X main.version=1.1.0+dev " -o runc .
	error obtaining VCS status: exit status 128
		Use -buildvcs=false to disable VCS stamping.
	make: Leaving directory '/vagrant'

This commit should fix this.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2022-05-11 15:03:32 -07:00
parent 94105ca31d
commit 009e627cb0
+3
View File
@@ -29,6 +29,9 @@ EOF
done
dnf clean all
# Prevent the "fatal: unsafe repository" git complain during build.
git config --global --add safe.directory /vagrant
# Install golang.
# FIXME go back to golang-go rpm once switched to Fedora 36.
curl -fsSL https://go.dev/dl/go1.18.linux-amd64.tar.gz | tar Cxz /usr/local