mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
d8c62c7d0b
A bit of history. EXTRA_BUILDTAGS was introduced in commitdac417174, as a quick way to add some extra Go build tags to the runc build. Later, commit767bc008changed Makefile to not get EXTRA_TAGS from the shell environment, as the name is quite generic and some unrelated environment variable with that name can affect runc build. While such change does make sense, it makes it more complicated to pass build tags in CI and otherwise (see e.g. commit0e1fe368a). Moreover, runc build uses some Go build tags by default (via Makefile), and while it is easy to add more build tags (via EXTRA_BUILDTAGS), in order to remove some existing tags one has to redefine BUILDTAGS from scratch, which is not very convenient (again, see commit0e1fe368awhich gets the current value of BUILDTAGS from the Makefile in order to remove a single tag). To handle all of the above, let's do this: - implement RUNC_BUILDTAGS, fixing the issue of not-so-unique name; - allow to get RUNC_BUILDTAGS from shell environment; - implement a feature to remove a build tag from default set by prefixing it with "-" (as in RUNC_BUILDTAGS="-seccomp"); - document all this in README; - make CI use the new feature; - keep EXTRA_BUILDTAGS for backward compatibility, add a make warning and a TODO to remove it for runc 1.6. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>