Add THIRD_PARTY_NOTICES.md and a generator for it - #387
Conversation
|
|
||
| ## 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.
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.
72081a3 to
b219ef9
Compare
Signed-off-by: Abrar Shivani <[email protected]>
b219ef9 to
c11c240
Compare
| github.com/spf13/pflag v1.0.5 // indirect | ||
| go.opencensus.io v0.24.0 // indirect | ||
| golang.org/x/mod v0.27.0 // indirect | ||
| golang.org/x/net v0.43.0 // indirect |
There was a problem hiding this comment.
This version of golang.org/x/net has CVEs
|
|
||
| | Package | License | Module | | ||
| |---------|---------|--------| | ||
| | `github.com/cilium/ebpf` | MIT | `github.com/cilium/[email protected]` | |
There was a problem hiding this comment.
We shouldn't add version in this file.
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,370 of 3,330 added lines). Hand-written, 960 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(2370 lines).go-licensesis pinned indeployments/devel/, beside theDockerfilethatalready pins the golang version, so dependabot manages both.
How it works
make third-party-noticescovers two surfaces:Go, for the
src/nvcgosubcomponent.go-licenses saveandcsvperplatform against its vendored deps, licenses joined,
module@versionfromsrc/nvcgo/vendor/modules.txt.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: other link-time system libraries such as
libcapand
libseccomp, host driver components, and build tooling that leaves no codein the artifacts.
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
9306eee4…. 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 unresolvedmodule@version, 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.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.