Repository navigation
feat(offload): ship LICENSE and THIRD-PARTY-NOTICES in packages - #606
Merged
Merged
Conversation
vvoland
approved these changes
Nov 23, 2026
vvoland
left a comment
Collaborator
There was a problem hiding this comment.
One blocker, LGTM otherwise
| override_dh_auto_install: | ||
| install -D -p -m 0755 $(CURDIR)/offload/dist/docker-offload debian/docker-offload-plugin/usr/libexec/docker/cli-plugins/docker-offload | ||
| install -D -p -m 0644 $(CURDIR)/offload/LICENSE debian/docker-offload-plugin/usr/share/doc/docker-offload-plugin/LICENSE | ||
| install -D -p -m 0644 $(CURDIR)/notices/THIRD-PARTY-NOTICES debian/docker-offload-plugin/usr/share/doc/docker-offload-plugin/THIRD-PARTY-NOTICES |
Collaborator
There was a problem hiding this comment.
My agent flagged this:
dh_compress will gzip THIRD-PARTY-NOTICES, so the deb check fails**
deb/rulesinstallsTHIRD-PARTY-NOTICESandLICENSEintousr/share/doc/docker-offload-plugin/, then runs the defaultdhsequence.- In that sequence,
dh_compressgzips any file inusr/share/doclarger than 4k, exceptcopyright, web files and images. I checked this against the debhelper source on salsa. - A notices file for a Go plugin's dependencies will be well over 4k, so the package will contain
THIRD-PARTY-NOTICES.gz.LICENSEmay end up as.gztoo, depending on its final text. - The
verify.Dockerfilegreps use.../THIRD-PARTY-NOTICES$, so the deb verify step fails, which then fails the release. - Fix either side:
- Keep the files uncompressed. That's probably better for a compliance file. Add this to
rules:override_dh_compress: dh_compress -X LICENSE -X THIRD-PARTY-NOTICES - Or accept the Debian convention and make both greps match
(\.gz)?$.
- Keep the files uncompressed. That's probably better for a compliance file. Add this to
- add `notices` named context holding the release THIRD-PARTY-NOTICES - static: copy THIRD-PARTY-NOTICES into archive doc/, fail without it - deb: install LICENSE and notices under /usr/share/doc, point copyright at them - rpm: %license LICENSE and THIRD-PARTY-NOTICES - verify: check the files in the static archives, debs and rpms - dh_compress gzips usr/share/doc files over 4k, which breaks the verify check - exclude both files from dh_compress Signed-off-by: Nick Sieger <nick@nicksieger.com>
nicksieger
force-pushed
the
offload-notices
branch
from
November 23, 2026 17:57
9a5069f to
55d4c5d
Compare
vvoland
approved these changes
Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Offload packages do not include
THIRD-PARTY-NOTICES. The deb and rpm packages do not includeLICENSEeither. docker/cloud#694 generates the notices at release time and attaches them to the release, but nothing in the packaging recipes copies them into a package.Changes
pkg/offload/Dockerfile: newnoticesnamed context, mounted in the static, deb and rpm builders. The caller passes a directory withTHIRD-PARTY-NOTICESat its root, like thesrccontext. There is no fallback, so the build fails without the file.pkg-static-build.shcopiesTHIRD-PARTY-NOTICESinto the archive'sdoc/next toLICENSEandREADME.md.rulesinstallsLICENSEandTHIRD-PARTY-NOTICESinto/usr/share/doc/docker-offload-plugin/.deb/copyrightpoints to them.%license.pkg-rpm-build.shdefines_noticesdir.pkg-deb-build.shandpkg-rpm-build.shfail early whenLICENSEor the notices file is missing or empty.verify.Dockerfilechecks that both files are in each static archive, deb and rpm. For deb and rpm it reads the package contents, because some base images exclude/usr/share/doc.docker-bake.hcl: the comment on_pkg-offloadlists thenoticescontext.Merge order
Every Offload build fails until docker/cloud passes the
noticescontext, including the Linux packages. The docker/cloud change setspkg-offload-${DISTRO}.contexts.noticesto itsvalues/directory and movesPACKAGING_REFto the merge commit of this PR. Merge this first.Not checked
docker buildx bake --printcannot show them here.%licenseentries use paths relative to the build directory, as the other specs do. This is not run.LICENSEtext and the debcopyrightwording are placeholders until compliance answers on DCL-2316.🤖 Generated with Claude Code