From 697a448aa02ad0e1fe65226e117c6f36abdce644 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 16 Dec 2025 13:03:58 -0500 Subject: [PATCH 1/2] devenv: Add opencode and rsync I had been trying hard to use goose because I like Rust and some of the core code is good, but opencode seems to be nicer and well maintained. Add infra to inject bits from npm and use it to install. rsync is needed for my dotfiles install and is generally useful. Signed-off-by: Colin Walters --- devenv/.dockerignore | 1 + devenv/Containerfile | 6 +++++- devenv/Containerfile.c10s | 6 +++++- devenv/Containerfile.debian | 2 ++ devenv/npm.txt | 2 ++ devenv/packages-common.txt | 1 + devenv/packages.txt | 1 + 7 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 devenv/npm.txt diff --git a/devenv/.dockerignore b/devenv/.dockerignore index 8779699..85d4d68 100644 --- a/devenv/.dockerignore +++ b/devenv/.dockerignore @@ -7,6 +7,7 @@ !packages-common.txt !packages-debian.txt !packages-c10s.txt +!npm.txt !build-deps.txt !build-deps-debian.txt !build-deps-c10s.txt diff --git a/devenv/Containerfile b/devenv/Containerfile index c03b708..2704725 100644 --- a/devenv/Containerfile +++ b/devenv/Containerfile @@ -36,12 +36,14 @@ arch=$(arch) rm -vrf /usr/local/bin/* -# goose for local AI +# goose is a single static binary target=goose-${arch}-unknown-linux-gnu.tar.bz2 /bin/time -f '%E %C' curl -fLO https://github.com/block/goose/releases/download/$gooseversion/$target tar xvjf $target mv goose /usr/local/bin/goose +## Other tools + # bcvk if test "${arch}" = x86_64; then td=$(mktemp -d) @@ -83,6 +85,8 @@ grep -vEe '^#' packages.txt | /bin/time -f '%E %C' xargs apt -y install grep -vEe '^#' build-deps.txt | /bin/time -f '%E %C' xargs apt -y build-dep apt clean && rm -rf /var/lib/apt/lists/* EORUN +COPY npm.txt /run/src +RUN grep -vEe '^#' npm.txt | /bin/time -f '%E %C' xargs npm i -g # Copy in the binaries from our tools container image COPY --from=tools /usr/local/bin/* /usr/local/bin/ diff --git a/devenv/Containerfile.c10s b/devenv/Containerfile.c10s index 29639cb..1f1f3f0 100644 --- a/devenv/Containerfile.c10s +++ b/devenv/Containerfile.c10s @@ -36,12 +36,14 @@ arch=$(arch) rm -vrf /usr/local/bin/* -# goose for local AI +# goose is a single static binary target=goose-${arch}-unknown-linux-gnu.tar.bz2 /bin/time -f '%E %C' curl -fLO https://github.com/block/goose/releases/download/$gooseversion/$target tar xvjf $target mv goose /usr/local/bin/goose +## Other tools + # bcvk if test "${arch}" = x86_64; then td=$(mktemp -d) @@ -84,6 +86,8 @@ grep -hEve '^#' packages-common.txt packages-c10s.txt | /bin/time -f '%E %C' xar grep -vEe '^#' build-deps-c10s.txt | /bin/time -f '%E %C' xargs dnf -y builddep dnf clean all EORUN +COPY npm.txt /run/src +RUN grep -vEe '^#' npm.txt | /bin/time -f '%E %C' xargs npm i -g # Copy in the binaries from our tools container image COPY --from=tools /usr/local/bin/* /usr/local/bin/ diff --git a/devenv/Containerfile.debian b/devenv/Containerfile.debian index 5dbef1f..edba74d 100644 --- a/devenv/Containerfile.debian +++ b/devenv/Containerfile.debian @@ -84,6 +84,8 @@ grep -hEve '^#' packages-common.txt packages-debian.txt | /bin/time -f '%E %C' x grep -vEe '^#' build-deps-debian.txt | /bin/time -f '%E %C' xargs apt -y build-dep apt clean && rm -rf /var/lib/apt/lists/* EORUN +COPY npm.txt /run/src +RUN grep -vEe '^#' npm.txt | /bin/time -f '%E %C' xargs npm i -g # Copy in the binaries from our tools container image COPY --from=tools /usr/local/bin/* /usr/local/bin/ diff --git a/devenv/npm.txt b/devenv/npm.txt new file mode 100644 index 0000000..aad6ffe --- /dev/null +++ b/devenv/npm.txt @@ -0,0 +1,2 @@ +# renovate: datasource=npm depName=opencode-ai +opencode-ai@1.0.163 diff --git a/devenv/packages-common.txt b/devenv/packages-common.txt index b22beb5..5a0d311 100644 --- a/devenv/packages-common.txt +++ b/devenv/packages-common.txt @@ -7,6 +7,7 @@ sudo # Generic utilities acl +rsync # General build env (note: we install rust through rustup later) gcc diff --git a/devenv/packages.txt b/devenv/packages.txt index 9bf9e16..18ea4f7 100644 --- a/devenv/packages.txt +++ b/devenv/packages.txt @@ -8,6 +8,7 @@ sudo # Generic utilities acl +rsync # General build env, note we install rust through rustup later gcc From a7cb7abf59a7261a179b25dd668a65c1a8395c32 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 16 Dec 2025 14:36:19 -0500 Subject: [PATCH 2/2] devenv: Remove orphaned Containerfile and package lists These files are no longer used after forking the Containerfile into Containerfile.debian and Containerfile.c10s variants. The package lists have been split into packages-common.txt plus distro-specific files (packages-debian.txt, packages-c10s.txt, build-deps-debian.txt, build-deps-c10s.txt). Assisted-by: OpenCode (Claude Sonnet 4) Signed-off-by: Colin Walters --- devenv/Containerfile | 112 ------------------------------------------ devenv/build-deps.txt | 1 - devenv/packages.txt | 30 ----------- 3 files changed, 143 deletions(-) delete mode 100644 devenv/Containerfile delete mode 100644 devenv/build-deps.txt delete mode 100644 devenv/packages.txt diff --git a/devenv/Containerfile b/devenv/Containerfile deleted file mode 100644 index 2704725..0000000 --- a/devenv/Containerfile +++ /dev/null @@ -1,112 +0,0 @@ -# These aren't packages, just low-dependency binaries dropped in /usr/local/bin -# so we can fetch them independently in a separate build. -ARG base=docker.io/library/debian:sid -FROM $base as base -# Life is too short to care about dash -RUN ln -sfr /bin/bash /bin/sh -RUN < /etc/apt/sources.list.d/github-cli.list - -# And re-update after we've fetched repos -apt -y update -EORUN - -FROM base as tools -# renovate: datasource=github-releases depName=block/goose -ARG gooseversion=v1.11.1 -# renovate: datasource=github-releases depName=bootc-dev/bcvk -ARG bcvkversion=v0.5.3 -RUN < /etc/sudoers.d/devenv && chmod 0440 /etc/sudoers.d/devenv -EORUN -# To avoid overlay-on-overlay with nested containers -VOLUME [ "/var/lib/containers", "/home/devenv/.local/share/containers/" ] -USER devenv diff --git a/devenv/build-deps.txt b/devenv/build-deps.txt deleted file mode 100644 index c920542..0000000 --- a/devenv/build-deps.txt +++ /dev/null @@ -1 +0,0 @@ -ostree diff --git a/devenv/packages.txt b/devenv/packages.txt deleted file mode 100644 index 18ea4f7..0000000 --- a/devenv/packages.txt +++ /dev/null @@ -1,30 +0,0 @@ -# Key dependencies -just -podman -curl -git -# Just because lots of things expect it -sudo - -# Generic utilities -acl -rsync - -# General build env, note we install rust through rustup later -gcc -clang -clang-format -libkrb5-dev pkg-config libvirt-dev libostree-dev -go-md2man - -# Runtime virt -genisoimage qemu-utils qemu-kvm libvirt-daemon-system virtiofsd - -# TUI editors on general principle -vim nano - -# dependency of other things like gemini CLI -npm - -# from 3rd party repo -gh