-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of "go mod verify" in Makefile results in unreproducible builds #4165
Comments
@leoluk Thank you for taking the time to report this bug and helping to make Cosmos SDK better. Few things:
Furthermore, concerning the following:
All tools but [1] We have enabled |
This is only a partial fix, no? Builds are still unreproducible. Any of the dependencies in go.mod could do a minor release and break builds. |
@leoluk We are not yet providing reproducible builds. We have an relevant issue to track work on it: #4027 We need to come up with a proper (and preferably simple) solution to achieve build reproducibility. I thought of https://gitian.org/ - do you have any recommendations? |
As far as I can tell, it is still executed as the build target depends on go.sum. Aside from that, the builds are already reproducible with CGO disabled and a known build environment (paths, Go compiler version). We make use of this property internally to validate the integrity of our builds and this is how this issue was found. |
The
go.sum
make target (required by thebuild
target) runsgo mod verify
:cosmos-sdk/Makefile
Lines 113 to 115 in 93e8f46
There are two concerns with this:
tools
target pulls in unverified third party dependencies.go mod verify
does not respect-mod=readonly
and will modify go.mod and go.sum during build if the minimum version selection algorithm finds updated dependencies (cmd/go: 'mod verify' should not modify the go.mod file golang/go#31372)Suggested fix is to remove the target. Tools aren't required for the build target and
go mod verify
is unnecessary.For Admin Use
The text was updated successfully, but these errors were encountered: