Skip to content

feat(image): add the copier program - #43

Merged
dan-petty merged 1 commit into
mainfrom
feat/42-image-copier
Nov 22, 2026
Merged

dan-petty merged 1 commit into
mainfrom
feat/42-image-copier

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

The image has the copier program (copier 9.19.1). devops repos onboard of devops-cli uses this program to render the repository template of dan-petty/infra. devops-cli does not import the Copier library, because the library needs jinja2-ansible-filters, which is GPL3.

Debian sid has no copier package, so apt cannot install it. copier is a Python tool, so it uses the source of the Python tools of the image:

  • python/copier.in names copier==9.19.1, and python/copier.txt is its universal lock with the hash of each wheel for linux/amd64 and linux/arm64. Renovate pip-compile updates the two files.
  • The python-tools stage installs copier in its own virtual environment, /usr/local/lib/devtools/copier, with --require-hashes and no source build. The last stage links the copier command into /usr/local/bin.
  • The osv-scanner step of image.yml scans python/copier.txt.
  • test/tools.sh runs copier --version.

README.md now says which source installs a tool that sid does not have: mise for a binary tool, python/ for a Python tool and npm for a Node tool.

Closes #42

Debian sid has no copier package, so copier 9.19.1 comes from the hashed uv lock of python/ in a virtual environment of its own, like pre-commit and semgrep. osv-scanner scans its lock file, and test/tools.sh runs copier --version.
@dan-petty dan-petty added type/feature Type feature: a new function scope/image The Dockerfile, the image layers and the tool test labels Nov 22, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Review point for the owner: the source of copier.

The issue says "with apt when Debian sid has a current version, else with mise". This PR uses the hashed uv lock of python/, not mise. The evidence:

  • apt: Debian has no copier package. The sid package lists of 2026-11-22 have no copier or python3-copier, and tracker.debian.org/pkg/copier and the sources.debian.org API give 404. The newest PyPI release is copier 9.19.1 (2026-10-13).
  • mise: the image uses mise only for binary tools. The copy loop copies each mise command as a real file, and the stage then removes the mise data folder. A pipx:copier command is a script that points into that removed virtual environment. Also, mise install --locked needs a locked URL, and mise.lock has no hashes for the dependencies of a Python tool.
  • python/: README.md names this source for the Python tools (pre-commit, semgrep). It locks the hash of each dependency for the two platforms, UV_NO_BUILD=1 refuses a source build, and Renovate pip-compile updates it.

The virtual environment of copier holds jinja2-ansible-filters (GPL-3.0). The image already holds GPL-3.0 programs, for example ansible-core from apt. devops-cli starts copier as a separate program and does not import it.

Person steps: none.

@dan-petty
dan-petty marked this pull request as ready for review November 22, 2026 23:30
@dan-petty
dan-petty merged commit a8dfd73 into main Nov 22, 2026
10 checks passed
@dan-petty
dan-petty deleted the feat/42-image-copier branch November 22, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/image The Dockerfile, the image layers and the tool test type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(image): add the copier program

1 participant