File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414! devenv-init.sh
1515! fetch-tools.sh
1616! install-rust.sh
17+ ! install-uv.sh
1718! install-kani.sh
1819! devenv-selftest.sh
1920! userns-setup
Original file line number Diff line number Diff line change @@ -30,8 +30,13 @@ FROM base as tools
3030ARG bcvkversion=v0.9.0
3131# renovate: datasource=github-releases depName=ossf/scorecard
3232ARG scorecardversion=v5.1.1
33- COPY fetch-tools.sh /run/src/
34- RUN bcvkversion=$bcvkversion scorecardversion=$scorecardversion /run/src/fetch-tools.sh
33+ # renovate: datasource=github-releases depName=nushell/nushell
34+ ARG nushellversion=0.110.0
35+ # renovate: datasource=github-releases depName=astral-sh/uv
36+ ARG uvversion=0.10.2
37+ COPY fetch-tools.sh install-uv.sh /run/src/
38+ RUN bcvkversion=$bcvkversion scorecardversion=$scorecardversion nushellversion=$nushellversion /run/src/fetch-tools.sh
39+ RUN uvversion=$uvversion /run/src/install-uv.sh
3540
3641FROM base as rust
3742COPY install-rust.sh /run/src/
@@ -73,6 +78,9 @@ COPY --from=kani /usr/local/kani /usr/local/kani
7378ENV RUSTUP_HOME=/usr/local/rustup
7479# Point Kani at the system-wide installation
7580ENV KANI_HOME=/usr/local/kani
81+ # Configure uv for system-wide tool installation
82+ ENV UV_TOOL_DIR=/usr/local/uv-tools
83+ ENV UV_TOOL_BIN_DIR=/usr/local/bin
7684# Setup for codespaces
7785COPY devenv-init.sh /usr/local/bin/
7886COPY userns-setup /usr/lib/devenv/userns-setup
Original file line number Diff line number Diff line change @@ -33,8 +33,13 @@ FROM base as tools
3333ARG bcvkversion=v0.9.0
3434# renovate: datasource=github-releases depName=ossf/scorecard
3535ARG scorecardversion=v5.1.1
36- COPY fetch-tools.sh /run/src/
37- RUN bcvkversion=$bcvkversion scorecardversion=$scorecardversion /run/src/fetch-tools.sh
36+ # renovate: datasource=github-releases depName=nushell/nushell
37+ ARG nushellversion=0.110.0
38+ # renovate: datasource=github-releases depName=astral-sh/uv
39+ ARG uvversion=0.10.2
40+ COPY fetch-tools.sh install-uv.sh /run/src/
41+ RUN bcvkversion=$bcvkversion scorecardversion=$scorecardversion nushellversion=$nushellversion /run/src/fetch-tools.sh
42+ RUN uvversion=$uvversion /run/src/install-uv.sh
3843
3944FROM base as rust
4045COPY install-rust.sh /run/src/
6267COPY npm.txt /run/src
6368RUN grep -vEe '^#' npm.txt | /bin/time -f '%E %C' xargs npm i -g
6469
70+ # Install tmt via uv tool install for isolated environment
71+ # UV_TOOL_DIR and UV_TOOL_BIN_DIR set to system-wide locations like rustup
72+ COPY --from=tools /usr/local/bin/uv /usr/local/bin/uv
73+ COPY --from=tools /usr/local/bin/uvx /usr/local/bin/uvx
74+ ENV UV_TOOL_DIR=/usr/local/uv-tools
75+ ENV UV_TOOL_BIN_DIR=/usr/local/bin
76+ RUN uv tool install 'tmt[provision-virtual]'
77+
6578# Copy in the binaries from our tools container image
6679COPY --from=tools /usr/local/bin/* /usr/local/bin/
6780COPY --from=kani /usr/local/bin/* /usr/local/bin/
Original file line number Diff line number Diff line change @@ -4,8 +4,16 @@ This container image is suitable for use on
44developing projects in the bootc-dev organization,
55especially bootc.
66
7- It includes all tools used in the Justfile
8- for relevant projects.
7+ The goal is to make this completely usable as a devcontainer
8+ with tools such as VSCode remote containers, Codespaces,
9+ [ devpod] ( https://devpod.sh/ ) and others.
10+
11+ Specifically this includes e.g.:
12+
13+ - Rust and C/C++ toolchains
14+ - ` nu `
15+ - [ tmt] ( https://tmt.readthedocs.io/ )
16+ - [ Kani] ( https://model-checking.github.io/kani/usage.html ) for system verification
917
1018## Base image
1119
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # Thin wrapper that calls the Python implementation
3- exec python3 /usr/lib/devenv/userns-setup " $@ "
2+ # Initialize development environment
3+ set -euo pipefail
4+
5+ # Set up podman for nested containers
6+ python3 /usr/lib/devenv/userns-setup " $@ "
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ set -xeuo pipefail
66# Required environment variables (passed as build ARGs)
77: " ${bcvkversion:? bcvkversion is required} "
88: " ${scorecardversion:? scorecardversion is required} "
9+ : " ${nushellversion:? nushellversion is required} "
910
1011arch=$( arch)
1112
@@ -42,3 +43,22 @@ td=$(mktemp -d)
4243 mv scorecard /usr/local/bin/scorecard
4344)
4445rm -rf $td
46+
47+ # nushell - modern shell
48+ td=$( mktemp -d)
49+ (
50+ cd $td
51+ # Map arch to nushell naming convention
52+ case " ${arch} " in
53+ x86_64) nuarch=x86_64 ;;
54+ aarch64) nuarch=aarch64 ;;
55+ * ) echo " nushell unavailable for $arch " ; return 0 ;;
56+ esac
57+ target=nu-${nushellversion} -${nuarch} -unknown-linux-gnu.tar.gz
58+ /bin/time -f ' %E %C' curl -fLO https://github.com/nushell/nushell/releases/download/$nushellversion /$target
59+ tar xvzf $target
60+ # The extracted directory has the same name as the archive without .tar.gz
61+ extracted_dir=nu-${nushellversion} -${nuarch} -unknown-linux-gnu
62+ mv $extracted_dir /nu /usr/local/bin/nu
63+ )
64+ rm -rf $td
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # Install uv system-wide into /usr/local
3+ # This script is shared between c10s and debian container builds.
4+ # Similar to rustup, we install the binary to /usr/local/bin and configure
5+ # tools to be installed system-wide via environment variables.
6+ set -xeuo pipefail
7+
8+ : " ${uvversion:? uvversion is required} "
9+
10+ arch=$( arch)
11+
12+ # Map arch to uv naming convention
13+ case " ${arch} " in
14+ x86_64) uvarch=x86_64 ;;
15+ aarch64) uvarch=aarch64 ;;
16+ * ) echo " uv unavailable for $arch " ; exit 1 ;;
17+ esac
18+
19+ target=uv-${uvarch} -unknown-linux-gnu.tar.gz
20+
21+ td=$( mktemp -d)
22+ (
23+ cd $td
24+ /bin/time -f ' %E %C' curl -fLO https://github.com/astral-sh/uv/releases/download/${uvversion} /$target
25+ tar xvzf $target
26+ # The extracted directory has the same name as the archive without .tar.gz
27+ extracted_dir=uv-${uvarch} -unknown-linux-gnu
28+ mv $extracted_dir /uv /usr/local/bin/uv
29+ mv $extracted_dir /uvx /usr/local/bin/uvx
30+ )
31+ rm -rf $td
32+
33+ # Verify installation
34+ /usr/local/bin/uv --version
Original file line number Diff line number Diff line change @@ -12,5 +12,8 @@ xorriso
1212qemu-img
1313libvirt-daemon-kvm
1414
15+ # Testing framework
16+ tmt
17+
1518# TUI editors
1619vim-enhanced
Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ libkrb5-dev
77libvirt-dev
88libostree-dev
99
10+ # Python dev headers (needed for uv to build libvirt-python from source for tmt)
11+ python3-dev
12+
1013# Runtime virt
1114genisoimage
1215qemu-utils
You can’t perform that action at this time.
0 commit comments