From cd7fa00d6bf9fe0ffa0fdba79119df81bd581cad Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 11 May 2022 15:03:32 -0700 Subject: [PATCH] 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 (cherry picked from commit 009e627cb02beeda55275dc4cdebc3e1bcf1eb7a) Signed-off-by: Kir Kolyshkin --- Vagrantfile.fedora | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Vagrantfile.fedora b/Vagrantfile.fedora index fc96d7f25..b84bd10f2 100644 --- a/Vagrantfile.fedora +++ b/Vagrantfile.fedora @@ -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 + # Add a user for rootless tests useradd -u2000 -m -d/home/rootless -s/bin/bash rootless