Skip to content

Vagrantfile.fedora: fix build wrt new git#3471

Merged
AkihiroSuda merged 1 commit intoopencontainers:mainfrom
kolyshkin:fix-fedora-ci-git
May 12, 2022
Merged

Vagrantfile.fedora: fix build wrt new git#3471
AkihiroSuda merged 1 commit intoopencontainers:mainfrom
kolyshkin:fix-fedora-ci-git

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

@kolyshkin kolyshkin commented May 11, 2022

Currently Fedora CI is broken on all PRs. This is caused by the updated git,
as a result we can no longer build runc via sudo from Vagrant:

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.

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>
@kolyshkin kolyshkin added area/ci backport/1.1-todo A PR in main branch which needs to be backported to release-1.1 labels May 11, 2022
@kolyshkin
Copy link
Copy Markdown
Contributor Author

This workaround is kind of dirty, but this is only for CI so I guess it's OK.

In case anyone has a better solution, please speak up.

@kolyshkin
Copy link
Copy Markdown
Contributor Author

1.1 backport: #3472

@kolyshkin kolyshkin added backport/1.1-done A PR in main branch which has been backported to release-1.1 and removed backport/1.1-todo A PR in main branch which needs to be backported to release-1.1 labels May 11, 2022
Copy link
Copy Markdown
Member

@cyphar cyphar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@AkihiroSuda AkihiroSuda merged commit 2661d59 into opencontainers:main May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci backport/1.1-done A PR in main branch which has been backported to release-1.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants