make trimpath optional#3908
Conversation
|
codespell is complaining about a non-error, that isn't even part of this PR 🤷♂️ |
| # some tools use to infer the version, in the absence of go information, | ||
| # which happens when you use `go build`. | ||
| # This enables someone to override by doing `make runc TRIMPATH= ` etc. | ||
| TRIMPATH := -trimpath |
There was a problem hiding this comment.
I think we might want to call this something like BUILD_FLAGS_REPRODUCIBLE= because -buildvcs=false is something we will also want to add, and it will also strip debug information that users might want (notably the commit id). I think it's fair to say that most of the build flags we will add for reproducibility are going to be related to removing debug information that is less reproducible...
Or maybe you don't care about the vcs information auto-added to Go binaries in the recent versions of Go?
There was a problem hiding this comment.
I can see use cases both ways. My immediate preference is a flag targeted on trimpath, but if you prefer the flag as you put it, I'm fine changing it. What's your preference?
There was a problem hiding this comment.
BUILD_FLAGS_REPRODUCIBLE
Can we use SOURCE_DATE_EPOCH ?
There was a problem hiding this comment.
What does SDE have to do with whether or not we set trimpath?
There was a problem hiding this comment.
If it is set, it is expected to be reproducible
There was a problem hiding this comment.
Oh. If set, run -trimpath, else not? That does change the default from "no special var set = trimpath" to "only if special var set = trimpath", but if that's what you want, I can change this PR. Let me know.
This is being fixed in #3907 which is waiting for another LGTM. Please ignore for now. |
|
Cool. I'll ignore. Waiting to see if @cyphar wants me to rename it as suggested in his comment, or just leave it like this. |
|
@cyphar and @kolyshkin what can I do to move this ahead? |
81424d6 to
e3fd502
Compare
|
Rebased on main now that #3907 is in. What else can I do to move this ahead? |
|
Also, whatever you did in #3907 works, as that check no longer is failing. |
|
Been a few weeks; can we get a review and a potential merge, please? |
e3fd502 to
47e379a
Compare
|
I rebased to latest main |
Signed-off-by: Avi Deitcher <avi@deitcher.net>
47e379a to
024c271
Compare
Fixes #3906
Makes
-trimpathoptional by calling it asThe default mode is unchanged.
Comments in the Makefile make it clear that this may still be required for reproducible builds.
cc @cyphar