scripts: introduce containerized builds
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 7 repliesIn review
- v32 patches 22 repliesSuperseded
- v22 patches 9 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 2 patches | 9 replies | Superseded |
Changes in v4 from the cover letter
- Add entries to MAINTAINERS for the new script and docs
- Give priority to Podman over Docker when no -r option given
- Update help message and docs regarding Podman priority
- Add note and workaround for out-of-tree builds in the docs
- Mention TuxMake prebuilt images more explicitly in the docs
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | scripts: add tool to run containerized buildsMAINTAINERS scripts/ | +205 | 5 replies | |
| 2/2 | Documentation: dev-tools: add container.rst pageDocumentation/ Documentation/ MAINTAINERS | +229 | 1 reply |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Onur Özkan |
|---|---|
| 1/2 | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/2] scripts: introduce containerized builds
This proposal emerged from discussions over email and after a talk at Plumbers 2024:
https://lore.kernel.org/all/[email protected]/
The aim is to facilitate reproducing builds for CI bots as well as developers using containers. Here's an illustrative example with a kernel.org toolchain in a Docker image from tuxmake:
$ scripts/container -i docker.io/tuxmake/korg-clang-21 make LLVM=1 defconfig
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
[...]
HOSTCC scripts/kconfig/util.o
HOSTLD scripts/kconfig/conf
*** Default configuration is based on 'x86_64_defconfig'
#
# configuration written to .config
#This patch series also includes a documentation page with all the relevant details and further examples about how to use the tool.
To go one step further, I'm in the process of preparing reference container images with kernel.org toolchains and no third-party dependencies other than the base Debian distro. See this thread for more details and options to host them in an upstream way:
https://lore.kernel.org/all/[email protected]/
Say, to run KUnit using the latest kernel.org GCC toolchain:
scripts/container --shell \
-i registry.gitlab.com/gtucker/korg-containers/gcc:kunit -- \
tools/testing/kunit/kunit.py \
run \
--arch=x86_64 \
--cross_compile=x86_64-linux----
Changes in v4:
- Add entries to MAINTAINERS for the new script and docs
- Give priority to Podman over Docker when no -r option given
- Update help message and docs regarding Podman priority
- Add note and workaround for out-of-tree builds in the docs
- Mention TuxMake prebuilt images more explicitly in the docs
Changes in v3:
- Refactor common code for Docker and Podman
- Add docs.kernel.org URL in help message
- Use pathlib Python package
- Handle signals in parent process by default
- Add --shell option to use an interactive shell
- Tweak debug messages in verbose mode
- Specify Python 3.10 as minimum version in the docs
- Provide an example env file in the docs
- Update docs regarding interactive shell usage
Changes in v2:
- Drop default image but make -i option required
- Look for Docker and Podman if no runtime specified
- Catch SIGINT from user to abort container with Docker
- Explicitly name each container with a UUID
- Update documentation accordingly
---
Guillaume Tucker (2):
scripts: add tool to run containerized builds
Documentation: dev-tools: add container.rst page
Documentation/dev-tools/container.rst | 227 ++++++++++++++++++++++++++ Documentation/dev-tools/index.rst | 1 + MAINTAINERS | 7 + scripts/container | 199 ++++++++++++++++++++++ 4 files changed, 434 insertions(+) create mode 100644 Documentation/dev-tools/container.rst create mode 100755 scripts/container
Signature · 1 line
2.47.3