Repository navigation
error obtaining VCS status: exit status 128 #3273
Copy link
Copy link
Closed
Description
While trying to build toolkit with 2.0-stable branch I ran into the following error:
[644/1838]Makefile:13: CONFIG_FILE is empty, defaulting to toolkit's core-efi.json unless CONFIG_FILE="" was set explicitly.
fatal: unsafe repository ('/home/XXXXXX/CBL-Mariner' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /home/XXXXXX/CBL-Mariner
cd /home/XXXXXX/CBL-Mariner/toolkit/tools/ && \
go test -covermode=atomic -coverprofile=/home/XXXXXX/CBL-Mariner/build/tools/internal.test_coverage ./...
? microsoft.com/pkggen/boilerplate [no test files]
ok microsoft.com/pkggen/boilerplate/hello 0.007s coverage: 100.0% of statements
? microsoft.com/pkggen/depsearch [no test files]
? microsoft.com/pkggen/graphPreprocessor [no test files]
? microsoft.com/pkggen/graphanalytics [no test files]
? microsoft.com/pkggen/grapher [no test files]
? microsoft.com/pkggen/graphpkgfetcher [no test files]
ok microsoft.com/pkggen/imageconfigvalidator 0.021s coverage: 64.8% of statements
? microsoft.com/pkggen/imagegen/attendedinstaller [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/primitives/customshortcutlist [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/primitives/enumfield [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/primitives/navigationbar [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/primitives/progressbar [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/speakuputils [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/uitext [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/uiutils [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views/confirmview [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views/diskview [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views/diskview/autopartitionwidget [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views/diskview/manualpartitionwidget [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views/encryptview [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views/eulaview [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views/finishview [no test files]
ok microsoft.com/pkggen/imagegen/attendedinstaller/views/hostnameview 0.008s coverage: 43.8% of statements
? microsoft.com/pkggen/imagegen/attendedinstaller/views/installationview [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views/installerview [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views/progressview [no test files]
? microsoft.com/pkggen/imagegen/attendedinstaller/views/userview [no test files]
ok microsoft.com/pkggen/imagegen/configuration 0.030s coverage: 87.6% of statements [607/1838]ok microsoft.com/pkggen/imagegen/diskutils 0.009s coverage: 0.0% of statements
ok microsoft.com/pkggen/imagegen/installutils 0.012s coverage: 0.3% of statements
? microsoft.com/pkggen/imagepkgfetcher [no test files]
? microsoft.com/pkggen/imager [no test files]
? microsoft.com/pkggen/internal/buildpipeline [no test files]
? microsoft.com/pkggen/internal/debugutils [no test files]
? microsoft.com/pkggen/internal/directory [no test files]
? microsoft.com/pkggen/internal/exe [no test files]
? microsoft.com/pkggen/internal/file [no test files]
? microsoft.com/pkggen/internal/jsonutils [no test files]
? microsoft.com/pkggen/internal/logger [no test files]
? microsoft.com/pkggen/internal/logger/hooks/writerhook [no test files]
? microsoft.com/pkggen/internal/network [no test files]
? microsoft.com/pkggen/internal/packagerepo/repocloner [no test files]
? microsoft.com/pkggen/internal/packagerepo/repocloner/rpmrepocloner [no test files]
? microsoft.com/pkggen/internal/packagerepo/repomanager [no test files]
? microsoft.com/pkggen/internal/packagerepo/repomanager/rpmrepomanager [no test files]
? microsoft.com/pkggen/internal/packagerepo/repoutils [no test files]
ok microsoft.com/pkggen/internal/pkggraph 0.054s coverage: 64.0% of statements
ok microsoft.com/pkggen/internal/pkgjson 0.015s coverage: 92.9% of statements
ok microsoft.com/pkggen/internal/randomization 0.511s coverage: 93.3% of statements
? microsoft.com/pkggen/internal/retry [no test files]
ok microsoft.com/pkggen/internal/rpm 0.115s coverage: 40.2% of statements
ok microsoft.com/pkggen/internal/safechroot 0.046s coverage: 65.2% of statements
? microsoft.com/pkggen/internal/shell [no test files]
? microsoft.com/pkggen/internal/sliceutils [no test files]
ok microsoft.com/pkggen/internal/storage 0.006s coverage: 87.5% of statements
? microsoft.com/pkggen/internal/systemdependency [no test files]
ok microsoft.com/pkggen/internal/versioncompare 0.009s coverage: 98.3% of statements
? microsoft.com/pkggen/isomaker [no test files]
? microsoft.com/pkggen/liveinstaller [no test files]
? microsoft.com/pkggen/pkgworker [no test files]
? microsoft.com/pkggen/roast [no test files]
? microsoft.com/pkggen/roast/formats [no test files]
? microsoft.com/pkggen/scheduler [no test files]
? microsoft.com/pkggen/scheduler/buildagents [no test files]
? microsoft.com/pkggen/scheduler/schedulerutils [no test files]
? microsoft.com/pkggen/specreader [no test files]
? microsoft.com/pkggen/srpmpacker [no test files]
? microsoft.com/pkggen/validatechroot [no test files]
cd /home/XXXXXX/CBL-Mariner/toolkit/tools/boilerplate && \
go test -covermode=atomic -coverprofile=/home/XXXXXX/CBL-Mariner/build/tools/boilerplate.test_coverage ./... && \
go build \
-ldflags="-X microsoft.com/pkggen/internal/exe.ToolkitVersion=2.0.20220630.1604" \
-o /home/XXXXXX/CBL-Mariner/toolkit/out/tools
? microsoft.com/pkggen/boilerplate [no test files]
ok microsoft.com/pkggen/boilerplate/hello 0.006s coverage: 100.0% of statements
error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
make: *** [/home/XXXXXX/CBL-Mariner/toolkit/scripts/tools.mk:83: /home/XXXXXX/CBL-Mariner/toolkit/out/tools/boilerplate] Error 1
$ go version
go version go1.18.3 linux/arm64
I had to run the following to fix this issue
sudo git config --global --add safe.directory /home/XXXXXX/CBL-Mariner
Seems like I need to checkout CBL-Mariner repo as root, to get the builds to works seamlessly. Is there is a better way to handle this error?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
PawelWMS commentedon Jul 1, 2022
Hey Praveen K Paladugu (@praveen-pk), thanks for mentioning
gitissue - I've opened #3284 to fix this.From the output you've provided, however, it might be possible that there is also an issue with your Go version. Right now, Mariner is expected to build with the 1.17 version and not 1.18. Please let know, if you see the tooling crashing with the 1.17 version - I was unable to reproduce your crash with Go 1.17.3.
praveen-pk commentedon Jul 1, 2022
I retried to build with go-1.17.8 and couldn't reproduce the issue.
I am able to reproduce this issue with go-1.18.3 only.
elsaco commentedon Jul 3, 2022
go versionin1.18embeds version control information in binaries, that's why the error didn't show ingo-1.17. Like the error message says, if you don't need to embed version control in your binaries use the-buildvcs=falseoption.Looks like you're using the
ARMversion. I did a CBL-Mariner 2.0-stable core build on x64 withgo-1.18.1andWSL/Ubuntuand thevhdxwas generated w/out errors.From
go help build:mfrw commentedon Jul 3, 2022
Closing as per:
gitas repo owner. #3284