Replies: 3 comments
|
related #162 (comment) difference between your suggestion and mine, is that I'm also proposing a SBOM of sorts that lives in the users zot state dir, so the extensions themselves can be gitignored. |
|
I agree that recording the resolved artifact could be useful, but I would call that a lockfile, not an SBOM. An SBOM normally describes the dependencies and components contained in a package. A record such as I would also keep generated installation state separate from My main concern with making GitHub Releases the installation protocol is tight coupling to the GitHub API. GitLab, Gitea, Forgejo, and other hosts would then each require provider-specific implementations. The manifest URL-template approach only requires HTTPS, so it works with any forge, object store, or ordinary file server. Keeping an explicit version in The CI material should be understood as examples rather than as a Go-specific requirement. The actual contract is simply that CI publishes a platform matrix using a documented asset and checksum convention. Authors can use GoReleaser, Cargo, Bun, PyInstaller, GraalVM, Nix, or anything else; zot only selects A useful progression might be:
This keeps the initial mechanism small and universal while leaving room for the reproducible package-management model proposed in #162. |
Uh oh!
There was an error while loading. Please reload this page.
zot ext install <git-url>shallow-clones a repo and requiresextension.jsonat the clone root. Nothing runs after the clone. For compiled extensions that
means one of:
"exec": "./binary"(mostexamples/extensions/*)go build, then install;ext install <git-url>is dead on arrival"exec": "go", "args": ["run", "."](examples/extensions/todo).cmdWish
Author side: tag a release, CI attaches per-platform archives. Copy-paste
workflow files for GitHub, GitLab, Gitea/Forgejo.
User side:
zot ext install https://host/owner/extworks without a toolchain.Proposal
1. Manifest:
binaryblock{ "name": "mcp", "version": "1.2.0", "exec": "./mcp-bridge", "binary": { "release": "https://git.miskam.xyz/mxm/zot-mcp/releases/download/v{version}/", "asset": "mcp-bridge_{version}_{os}_{arch}.tar.gz", "checksums": "checksums.txt" } }{version}from the manifest,{os}=runtime.GOOS,{arch}=runtime.GOARCH,{ext}=.exeon windows else empty. Same naminggoreleaser produces by default, so zot's own
.goreleaser.yamlis thetemplate.
checksumsoptional but recommended; relative torelease. Format: thesha256sumoutput goreleaser emits.copied to
exec.2. Behaviour
zot ext install <git-url>:binarypresent andexecnot present on disk (or not executable):download
release + asset, verify againstchecksumsif given, extractinto the manifest dir
execexists; otherwise roll back with a clear error includingthe URL tried
New:
zot ext update <name>—git pullin the install dir, then re-runstep 2 if
versionchanged. Cheap once step 2 exists.3. Copy-paste CI files
Ship under
examples/extensions/_ci/:.github/workflows/release.yml—goreleaser/goreleaser-actiononv*tags; publishes to GitHub Releases.
.gitlab-ci.yml—goreleaser releasewithGITLAB_TOKEN; publishes toGitLab Releases (goreleaser supports it natively).
.gitea/workflows/release.yml/.forgejo/workflows/release.yml— sameaction; goreleaser has a
gitearelease target..goreleaser.yaml— onebuildsentry,binary: {{ .ProjectName }},CGO_ENABLED=0, linux/darwin/windows × amd64/arm64, checksums. Identicalto zot's own minus ldflags.
Author copies four files, sets
binaryinextension.json, tags. Done.All reactions