Skip to content

build(release): ship licence notices with the binary and image - #80

Merged
aledbf merged 1 commit into
mainfrom
licenses-notices
Nov 16, 2026
Merged

aledbf merged 1 commit into
mainfrom
licenses-notices

Conversation

@aledbf

@aledbf aledbf commented Nov 16, 2026

Copy link
Copy Markdown
Member

The Go CLI is Apache-2.0, but it ports github.com/devcontainers/cli and carries material from it under MIT (Copyright (c) Microsoft Corporation): the fixtures in src/test/configs/ and internal/docker/updateUID.Dockerfile, which the binary embeds. The MIT notice has to go with that material. The modules the binary links (MIT, BSD-2/3, Apache-2.0) also ask that their notice accompany every copy, including a compiled one. Until now, neither notice was in the repo or the release.

  • NOTICE: names what comes from devcontainers/cli and carries its MIT text, verbatim from upstream's LICENSE.txt at the pinned reference commit.
  • LICENSE.txt: the copyright line is now Copyright The spin-stack Authors, the line every spin-stack repository will use.
  • task release:notices: writes THIRD_PARTY_NOTICES, with Go's own licence plus each linked module's licence text. It uses go-licenses report (pinned in versions.yaml) and the template in hack/third-party-notices.tmpl. The output is byte-identical across runs. A module without a licence file fails the task.
  • .goreleaser.yml: runs release:notices as a before hook. archives.files and dockers_v2.extra_files ship LICENSE.txt, NOTICE and THIRD_PARTY_NOTICES, and the Dockerfile copies them to /usr/share/doc/devcontainer-cli/.
  • release:smoke: now also fails when an archive in dist/ or the published image is missing one of the three files.

Archive names, image tags and the binary are unchanged. The archives gain three files beside the binary.

Validation:

  • goreleaser check passed.
  • goreleaser release --snapshot --clean --skip=publish,docker,sbom passed. Both archives list LICENSE.txt NOTICE THIRD_PARTY_NOTICES devcontainer.
  • Built a local amd64 image from the snapshot binary, then ran RELEASE_VERSION=… task release:smoke: it passed. With NOTICE removed from an archive it fails with …: no NOTICE.
  • task lint passed, and so did go test ./internal/devtools/ ./internal/cli/ -run 'Versions|Workflow'.

🤖 Generated with Claude Code

The Go CLI ports github.com/devcontainers/cli and carries its test
fixtures and updateUID.Dockerfile, which are MIT (Copyright (c)
Microsoft Corporation); NOTICE now keeps that notice. The modules the
binary links (MIT, BSD, Apache) ask that their notice go with every
copy, so task release:notices writes THIRD_PARTY_NOTICES from
go-licenses (pinned in versions.yaml) plus Go's own licence, and the
archives and the image ship LICENSE.txt, NOTICE and
THIRD_PARTY_NOTICES. release:smoke fails a release without them.

LICENSE.txt's copyright line names The spin-stack Authors, as the
other spin-stack repositories will.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aledbf
aledbf merged commit f8322b3 into main Nov 16, 2026
20 of 23 checks passed
@aledbf
aledbf deleted the licenses-notices branch November 16, 2026 19:39
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