Add THIRD_PARTY_NOTICES.md and a generator for it - #387
Open
abrarshivani wants to merge 1 commit into
Open
Conversation
lahwaacz
reviewed
Aug 11, 2026
|
|
||
| ## What this file does not cover | ||
|
|
||
| * **This project's own code.** `LICENSE` (BSD 3-clause) governs it, and the |
There was a problem hiding this comment.
This claim is false, the LICENSE file is Apache License 2.0 as of 09b47cc
Note that #193 was never resolved; letting that issue go stale and auto-closing due to inactivity does not count as being resolved.
While a third-party notices statement is surely welcome, this project needs a clear overall statement regarding its licensing, without a disclaimer like this section.
Author
There was a problem hiding this comment.
Thanks for taking a look. Good catch. I will update this. Until #193 is resolved, I think we would also need to update the NOTICE file (https://github.com/NVIDIA/libnvidia-container/blob/main/NOTICE#L3) as it is not consistent with the LICENSE file.
abrarshivani
force-pushed
the
third-party-notices
branch
3 times, most recently
from
August 13, 2026 00:57
b219ef9 to
c11c240
Compare
rahulait
reviewed
Aug 13, 2026
rahulait
reviewed
Aug 13, 2026
abrarshivani
marked this pull request as ready for review
August 14, 2026 17:29
abrarshivani
force-pushed
the
third-party-notices
branch
4 times, most recently
from
August 18, 2026 08:00
e059701 to
d519874
Compare
rahulait
reviewed
Aug 18, 2026
Signed-off-by: Abrar Shivani <ashivani@nvidia.com>
abrarshivani
force-pushed
the
third-party-notices
branch
from
August 18, 2026 21:38
d519874 to
4d42890
Compare
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.
Adds
THIRD_PARTY_NOTICES.mdcovering both surfaces of this project, the scriptthat generates it, and a CI check that fails when deps change without the notices
being refreshed.
Same change already proposed for gpu-operator, mig-parted, k8s-device-plugin,
k8s-driver-manager and nvidia-container-toolkit. This repo is mostly C, so it
needed more than
go-licenses.NOTICE,LICENSE,COPYINGandCOPYING.LESSERare unchanged.What to review
71% of the diff is generated (2,374 of 3,343 added lines). Hand-written, 969 lines:
hack/generate-third-party-notices.shdeployments/devel/go.sumMakefile.github/workflows/build.yamldeployments/devel/go.moddeployments/devel/tools.go.gitignoreGenerated:
THIRD_PARTY_NOTICES.md(2374 lines).go-licensesis pinned indeployments/devel/, beside theDockerfilethatalready pins the golang version. Note that dependabot does not cover this
go.modtoday:.github/dependabot.ymlregisters/deployments/develunder thedocker ecosystem only, and its gomod entries point at
src/nvcgo/and/. Untila gomod entry is added for it, the pin needs bumping by hand.
How it works
make third-party-noticescovers two surfaces:Go, for the
src/nvcgosubcomponent.go-licenses saveandcsvperplatform against its vendored deps, licenses joined, module paths resolved from
src/nvcgo/vendor/modules.txtby longest-prefix match, since a license may sitbelow the module root.
C, for the three build-time dependencies. Versions and URLs are parsed from
mk/elftoolchain.mk,mk/libtirpc.mkandmk/nvidia-modprobe.mk, each tarballis downloaded at generation time, and the terms are quoted from the archive. The
document's versions are the build's by construction, so they cannot drift.
make check-third-party-noticesregenerates and diffs, on every build, no path filter.Implementation notes
mk/common.mkcalls GNU-onlydate -u --iso-8601and errors on any arch outside x86_64/ppc64le/aarch64, soshelling out to
makewould make the generator unrunnable on a macOS host.Only
$(VERSION)and$(PREFIX)are expanded, and any surviving$(isfatal.
rule does not fit. libtirpc ships
COPYING, but it names only Bull S.A. whilethe sources carry around 37 further holders, so the per-file notices are
collected too. elftoolchain ships no
LICENSEorCOPYINGat all, so itsterms come entirely from file headers. Whole comment blocks are collected, not
just copyright lines, because BSD and MIT both require the conditions text to
travel with the notice.
COPYINGisGPL-2.0 and covers binaries this repo does not build:
mk/nvidia-modprobe.mkextracts only
modprobe-utils/and linkslibnvidia-modprobe-utils.a, andthose files are individually MIT. Quoting
COPYINGwould have declared GPL-2.0over code that is not GPL and is statically linked into an Apache-2.0 library.
The linked subset is also not purely NVIDIA's: it carries IBM, Red Hat and
Zanoni/Vignatti notices, and
pci-sysfs.csays it is based on libpciaccess.pkg/rpm/SPECS/libnvidia-container.specalready notes the MIT headers.WITH_TIRPCandWITH_LIBELFare rendered as a table grepped from themakefiles, not described in prose, so it cannot rot. That grep surfaced a
third configuration worth knowing about: rhel8 links the system libtirpc via
-ltirpcwithout settingWITH_TIRPC.LC_ALL=Con every awk, not just sorts and greps.libtirpc-1.3.2'ssrc/epoll_sub.chas a Latin-1 comment that aborts macOS awk with a multibyteconversion failure. An
iconvgate on the composed document fails loudly if afuture dependency ships a legacy encoding.
mv, notcp, so an interrupted run cannot leave ahalf-written file.
Scope
Three C dependencies and five Go license roots.
The new file defers to the existing ones rather than replacing them.
LICENSEgoverns this project's own code.
NOTICE,COPYINGandCOPYING.LESSERremainauthoritative for the
WITH_LIBELF=yescase, where elfutils libelf is linkeddynamically under LGPL, and the new document names that configuration and points
at them.
Also out of scope and stated in the document itself: other link-time system
libraries such as
libcapandlibseccomp, host driver components, andbuild-time tooling that leaves no code in the artifacts. That last one covers the
go-licensesdependencies indeployments/devel/go.mod, which is why moduleslike
github.com/inconshreveable/mousetrapdo not appear here. The Go entriesare the vendored deps of
src/nvcgothat are actually linked intolibnvidia-container-go.so.THIRD_PARTY_NOTICES.mdis added toDOC_FILES, so it installs beside theexisting four and the rpm subpackages'
%licenseglob picks it up with no specchange.
Testing
golang:1.26.4, all byte-identical,sha256
5c068f65…. Nothing is cached between runs, so each re-downloads allthree tarballs.
go list -deps ./...over three platforms: 11expected, 11 present, 0 missing, 0 extra.
mk/*.mkfor all three, and bumping libtirpc to 1.3.3 inthe makefile makes
check-third-party-noticesfail. That test fetched 1.3.3 and re-quotedit, so it is end-to-end rather than a string comparison.
Unknown, 0 missing text, 0 unresolved module paths, 8sections, fences balanced, valid UTF-8.
an unexpanded make variable, a drifted platform matrix, an unsafe
LICENSES_DIR, and absentgo-licenses. Each exits non-zero with a clearmessage and leaves the committed file untouched.
shellcheckclean.make -nconfirms the default goal is unchanged.Two things worth knowing.
make third-party-noticescannot run on macOS, sincemk/common.mkrejects arm64 at parse time, which predates this change; thescript itself runs there. And SourceForge is slow, so the elftoolchain fetch can
take several minutes. The repo's own
make depsalready pulls the same URLs, sothis is not new exposure, but CI runtime is worth watching.
Noticed, not fixed here
NOTICEstill describes this project as "BSD 3-clause" whileLICENSEhas been Apache-2.0 since 09b47cc in 2019, so this file namesLICENSEas the authority and flags the discrepancy rather than repeating it. CorrectingNOTICEis a licensing call, so #193 seems the better place for it.It may also be worth a look at
pkg/rpm/SPECS/libnvidia-container.spec, which declaresGPL-2.0-onlyin itsLicense:field. That appears to trace back to nvidia-modprobe's top-levelCOPYINGrather than to anything actually linked.pkg/deb/copyrightlikewise does not mention libtirpc. Happy to be wrong on either, and a distro package's declared license felt like a call for someone closer to it than a change to make here.