Skip to content

[1.5] Makefile: add RUNC_BUILDTAGS, deprecate EXTRA_BUILDTAGS#5198

Merged
lifubang merged 1 commit intoopencontainers:release-1.5from
kolyshkin:1.5-5171
Mar 28, 2026
Merged

[1.5] Makefile: add RUNC_BUILDTAGS, deprecate EXTRA_BUILDTAGS#5198
lifubang merged 1 commit intoopencontainers:release-1.5from
kolyshkin:1.5-5171

Conversation

@kolyshkin
Copy link
Copy Markdown
Contributor

Backport of #5171 to release-1.5.


A bit of history. EXTRA_BUILDTAGS was introduced in commit dac4171, as a quick way to add some extra Go build tags to the runc build.

Later, commit 767bc00 changed 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. commit 0e1fe36).

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 commit 0e1fe36 which 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.

(cherry picked from commit d8c62c7)

@kolyshkin kolyshkin added this to the 1.5.0-rc.2 milestone Mar 26, 2026
A bit of history. EXTRA_BUILDTAGS was introduced in commit dac4171,
as a quick way to add some extra Go build tags to the runc build.

Later, commit 767bc00 changed 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. commit 0e1fe36).

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 commit 0e1fe36 which
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>
(cherry picked from commit d8c62c7)
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Copy Markdown
Contributor Author

Now, after backporting PRs containing changelog entries, we are going to have the same/similar entries in two branches.

Guess we'll need to de-dup the CHANGELOG in the main branch after each release, removing entries that are already in the backported released versions.

@cyphar cyphar added the backport/1.5-pr A backport PR to release-1.5 label Mar 27, 2026
@kolyshkin kolyshkin requested review from lifubang and rata March 27, 2026 21:56
@lifubang
Copy link
Copy Markdown
Member

Now, after backporting PRs containing changelog entries, we are going to have the same/similar entries in two branches.

Guess we'll need to de-dup the CHANGELOG in the main branch after each release, removing entries that are already in the backported released versions.

Let's discuss the workflow for reintegrating the changelog changes back to main.

@lifubang lifubang merged commit 0826ad7 into opencontainers:release-1.5 Mar 28, 2026
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.5-pr A backport PR to release-1.5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants