-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Makefile: Don't read COMMIT, BUILDTAGS, EXTRA_BUILDTAGS from env vars #4380
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
🙈 needs a rebase |
We recently switched VERSION to be read from env vars (opencontainers#4270). This broke several projects, as they were building runc and using a `VERSION` env var for, e.g. the containerd version. When fixing that in opencontainers#4370, we discussed to consider doing the same for these variables too (opencontainers#4370 (review)). Let's stop reading them from env vars, as it is very easy to do it by mistake (e.g. compile runc and define a COMMIT env var, not to override the commit shown in `runc --version`) and users that want can still override them if they want to. For example, with: make EXTRA_BUILDTAGS=runc_nodmz Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
Rebased now :) |
Wait... this now breaks builds again. |
There is no way to set a COMMIT except by carrying a patch to overwrite this. Keep in mind that most of the time packagers do not have a |
Doesn't |
Oh yes, you are right. I always forget that make args can set those vars even without |
No patch is needed. I am building internally using
|
Yeah, it's easy to confuse order; This takes SOME_VAR=foo make some-target This sets the make var; make SOME_VAR=foo some-target I got bit by that because macOS and Linux |
We recently switched VERSION to be read from env vars (#4270). This
broke several projects, as they were building runc and using a
VERSION
env var for, e.g. the containerd version.
When fixing that in #4370, we discussed to consider doing the same for
these variables too
(#4370 (review)).
Let's stop reading them from env vars, as it is very easy to do it by
mistake (e.g. compile runc and define a COMMIT env var, not to override
the commit shown in
runc --version
) and users that want can stilloverride them if they want to. For example, with: