Skip to content

feat: bins support - #1

Open
lczyk wants to merge 5 commits into
mainfrom
feat/bins-support
Open

lczyk wants to merge 5 commits into
mainfrom
feat/bins-support

Conversation

@lczyk

@lczyk lczyk commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Adds support for injecting chisel "bin" packages, alongside the existing deb archive path. A bin is a package chisel fetches from the snap store over HTTPS (a .tar.xz), not from an apt archive, so you can author and test a bin slice before the package is published.

how

chisel hardcodes the store hosts and reaches them over plain net/http, so the proxy MITM-terminates TLS for api.staging.snapcraft.io and storage.snapcraftcontent.com using an ephemeral CA, and answers the store's info + download endpoints from memory. chisel is made to trust that CA via
SSL_CERT_FILE in the child environment; the deb path (plain-HTTP interception via http_proxy) is unchanged. No upstream chisel change is required.

The interface is fully positional, following chisel's own bin- convention:

input kind
foo.deb deb, served as-is
foo/ deb, packed
bin-foo/ bin, packed into a .tar.xz
foo.tar.xz bin, served as-is
foo.yaml slice, spliced into the release

Each bin is paired to a bin-<name>.yaml slice among the inputs to resolve the channel track (<default-track>-<release>, risk stable); a bin with no slice, or a bin slice with no payload, is a hard error.

CHISEL=/path/to/chisel-with-bins chisel-proxy cut --release ./chisel-releases \
    bin-demo-hello/ bin-demo-hello.yaml -- bin-demo-hello_bins --root ./rootfs

Serve chisel's snap-store bin packages by intercepting the store over TLS with
an ephemeral CA handed to chisel via SSL_CERT_FILE, alongside the existing deb
archive path. Inputs are classified by chisel's bin- convention: a bin-*/ dir
or a .tar.xz file is a bin, everything else a deb; each bin is paired to its
bin-<name>.yaml slice to resolve the channel track. Linux only, format v3+.
Go 1.27's crypto/x509 honours SSL_CERT_FILE on darwin behind the
x509sslcertoverrideplatform GODEBUG, which chisel's go.mod pins off. Set it
in the child env, carry the macOS system roots in the CA bundle, and gate on
the chisel binary's Go version via debug/buildinfo instead of refusing darwin
outright.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant