From c1e4d11f19f5b1a3ad3448ce1d5f4535a10fb6fb Mon Sep 17 00:00:00 2001 From: Ben Cressey Date: Thu, 23 May 2024 23:29:58 +0000 Subject: [PATCH] kmod-*-nvidia: specify AWS EULA as license Previously, the NVIDIA packages were special-cased with a "bring your own license" step, to support the case where a developer building the project might choose the terms of a different license under which to distribute the software or to make it available to end users. With the advent of out-of-tree builds, packages are moving into kits that contain pre-compiled binary RPMs, which means they will always have a header indicating which license applies. This commit makes it explicit what license those RPMs will have at the time they are published. Since the terms of the AWS EULA indicate that the software should be used to develop AMIs for use on AWS, add an install-time requirement for `aws-*` variants. Signed-off-by: Ben Cressey --- packages/kmod-5.10-nvidia/.gitignore | 1 + packages/kmod-5.10-nvidia/Cargo.toml | 4 ++++ packages/kmod-5.10-nvidia/kmod-5.10-nvidia.spec | 11 +++++++---- packages/kmod-5.15-nvidia/.gitignore | 1 + packages/kmod-5.15-nvidia/Cargo.toml | 4 ++++ packages/kmod-5.15-nvidia/kmod-5.15-nvidia.spec | 12 +++++++----- packages/kmod-6.1-nvidia/.gitignore | 1 + packages/kmod-6.1-nvidia/Cargo.toml | 4 ++++ packages/kmod-6.1-nvidia/kmod-6.1-nvidia.spec | 12 +++++++----- 9 files changed, 36 insertions(+), 14 deletions(-) create mode 100644 packages/kmod-5.10-nvidia/.gitignore create mode 100644 packages/kmod-5.15-nvidia/.gitignore create mode 100644 packages/kmod-6.1-nvidia/.gitignore diff --git a/packages/kmod-5.10-nvidia/.gitignore b/packages/kmod-5.10-nvidia/.gitignore new file mode 100644 index 00000000000..0bcfb52fdbc --- /dev/null +++ b/packages/kmod-5.10-nvidia/.gitignore @@ -0,0 +1 @@ +NVidiaEULAforAWS.pdf diff --git a/packages/kmod-5.10-nvidia/Cargo.toml b/packages/kmod-5.10-nvidia/Cargo.toml index fff8948342f..9edcbcc60bb 100644 --- a/packages/kmod-5.10-nvidia/Cargo.toml +++ b/packages/kmod-5.10-nvidia/Cargo.toml @@ -12,6 +12,10 @@ path = "../packages.rs" package-name = "kmod-5.10-nvidia" releases-url = "https://docs.nvidia.com/datacenter/tesla/" +[[package.metadata.build-package.external-files]] +url = "https://s3.amazonaws.com/EULA/NVidiaEULAforAWS.pdf" +sha512 = "e1926fe99afc3ab5b2f2744fcd53b4046465aefb2793e2e06c4a19455a3fde895e00af1415ff1a5804c32e6a2ed0657e475de63da6c23a0e9c59feeef52f3f58" + [[package.metadata.build-package.external-files]] url = "https://us.download.nvidia.com/tesla/470.239.06/NVIDIA-Linux-x86_64-470.239.06.run" sha512 = "92bdfb11db405071cd58deed2a0853448932657e256258e0a0bda5069f00485e2b6e49b4a0eeff499a4991be4f884273f3564c164110b1ed1f5d924506f13e2d" diff --git a/packages/kmod-5.10-nvidia/kmod-5.10-nvidia.spec b/packages/kmod-5.10-nvidia/kmod-5.10-nvidia.spec index 0de7ac535f6..c592ddd74a8 100644 --- a/packages/kmod-5.10-nvidia/kmod-5.10-nvidia.spec +++ b/packages/kmod-5.10-nvidia/kmod-5.10-nvidia.spec @@ -1,8 +1,6 @@ %global tesla_470 470.239.06 %global tesla_470_libdir %{_cross_libdir}/nvidia/tesla/%{tesla_470} %global tesla_470_bindir %{_cross_libexecdir}/nvidia/tesla/bin/%{tesla_470} -%global spdx_id %(bottlerocket-license-tool -l %{_builddir}/Licenses.toml spdx-id nvidia) -%global license_file %(bottlerocket-license-tool -l %{_builddir}/Licenses.toml path nvidia -p ./licenses) Name: %{_cross_os}kmod-5.10-nvidia Version: 1.0.0 @@ -16,6 +14,7 @@ URL: http://www.nvidia.com/ # NVIDIA .run scripts from 0 to 199 Source0: https://us.download.nvidia.com/tesla/%{tesla_470}/NVIDIA-Linux-x86_64-%{tesla_470}.run Source1: https://us.download.nvidia.com/tesla/%{tesla_470}/NVIDIA-Linux-aarch64-%{tesla_470}.run +Source2: NVidiaEULAforAWS.pdf # Common NVIDIA conf files from 200 to 299 Source200: nvidia-tmpfiles.conf.in @@ -36,7 +35,8 @@ BuildRequires: %{_cross_os}kernel-5.10-archive %package tesla-470 Summary: NVIDIA 470 Tesla driver Version: %{tesla_470} -License: %{spdx_id} +License: LicenseRef-NVIDIA-AWS-EULA +Requires: %{_cross_os}variant-platform(aws) Requires: %{name} %description tesla-470 @@ -47,6 +47,9 @@ Requires: %{name} # the driver in the current run sh %{_sourcedir}/NVIDIA-Linux-%{_cross_arch}-%{tesla_470}.run -x +# Add the license. +install -p -m 0644 %{S:2} . + %global kernel_sources %{_builddir}/kernel-devel tar -xf %{_cross_datadir}/bottlerocket/kernel-devel.tar.xz @@ -179,7 +182,7 @@ popd %{_cross_libdir}/modules-load.d/nvidia-dependencies.conf %files tesla-470 -%license %{license_file} +%license NVidiaEULAforAWS.pdf %dir %{_cross_datadir}/nvidia/tesla/%{tesla_470} %dir %{_cross_libexecdir}/nvidia/tesla/bin/%{tesla_470} %dir %{tesla_470_libdir} diff --git a/packages/kmod-5.15-nvidia/.gitignore b/packages/kmod-5.15-nvidia/.gitignore new file mode 100644 index 00000000000..0bcfb52fdbc --- /dev/null +++ b/packages/kmod-5.15-nvidia/.gitignore @@ -0,0 +1 @@ +NVidiaEULAforAWS.pdf diff --git a/packages/kmod-5.15-nvidia/Cargo.toml b/packages/kmod-5.15-nvidia/Cargo.toml index 20d2c316a9b..713bb11f871 100644 --- a/packages/kmod-5.15-nvidia/Cargo.toml +++ b/packages/kmod-5.15-nvidia/Cargo.toml @@ -12,6 +12,10 @@ path = "../packages.rs" package-name = "kmod-5.15-nvidia" releases-url = "https://docs.nvidia.com/datacenter/tesla/" +[[package.metadata.build-package.external-files]] +url = "https://s3.amazonaws.com/EULA/NVidiaEULAforAWS.pdf" +sha512 = "e1926fe99afc3ab5b2f2744fcd53b4046465aefb2793e2e06c4a19455a3fde895e00af1415ff1a5804c32e6a2ed0657e475de63da6c23a0e9c59feeef52f3f58" + [[package.metadata.build-package.external-files]] url = "https://us.download.nvidia.com/tesla/535.161.07/NVIDIA-Linux-x86_64-535.161.07.run" sha512 = "4e8dd709157c15519f01a8d419daa098da64666d20a80edf3894239707ff1e83b48553f3edc5d567109d36e52b31ac7c0c7218ea77862a04e89aa3cc1f16a5ba" diff --git a/packages/kmod-5.15-nvidia/kmod-5.15-nvidia.spec b/packages/kmod-5.15-nvidia/kmod-5.15-nvidia.spec index e0df743c35d..c4f9313c3f0 100644 --- a/packages/kmod-5.15-nvidia/kmod-5.15-nvidia.spec +++ b/packages/kmod-5.15-nvidia/kmod-5.15-nvidia.spec @@ -8,9 +8,6 @@ %global fm_arch %{_cross_arch} %endif -%global spdx_id %(bottlerocket-license-tool -l %{_builddir}/Licenses.toml spdx-id nvidia) -%global license_file %(bottlerocket-license-tool -l %{_builddir}/Licenses.toml path nvidia -p ./licenses) - # With the split of the firmware binary from firmware/gsp.bin to firmware/gsp_ga10x.bin # and firmware/gsp_tu10x.bin the file format changed from executable to relocatable. # The __spec_install_post macro will by default try to strip all binary files. @@ -31,6 +28,7 @@ URL: http://www.nvidia.com/ # NVIDIA .run scripts for kernel and userspace drivers Source0: https://us.download.nvidia.com/tesla/%{tesla_ver}/NVIDIA-Linux-x86_64-%{tesla_ver}.run Source1: https://us.download.nvidia.com/tesla/%{tesla_ver}/NVIDIA-Linux-aarch64-%{tesla_ver}.run +Source2: NVidiaEULAforAWS.pdf # fabricmanager for NVSwitch Source10: https://developer.download.nvidia.com/compute/nvidia-driver/redist/fabricmanager/linux-x86_64/fabricmanager-linux-x86_64-%{tesla_ver}-archive.tar.xz @@ -64,7 +62,8 @@ Requires: %{name}-tesla(fabricmanager) %package tesla-%{tesla_major} Summary: NVIDIA %{tesla_major} Tesla driver Version: %{tesla_ver} -License: %{spdx_id} +License: LicenseRef-NVIDIA-AWS-EULA +Requires: %{_cross_os}variant-platform(aws) Requires: %{name} Requires: %{name}-fabricmanager Provides: %{name}-tesla(fabricmanager) @@ -81,6 +80,9 @@ sh %{_sourcedir}/NVIDIA-Linux-%{_cross_arch}-%{tesla_ver}.run -x # correct source is architecture-dependent. tar -xf %{_sourcedir}/fabricmanager-linux-%{fm_arch}-%{tesla_ver}-archive.tar.xz +# Add the license. +install -p -m 0644 %{S:2} . + %global kernel_sources %{_builddir}/kernel-devel tar -xf %{_cross_datadir}/bottlerocket/kernel-devel.tar.xz @@ -233,7 +235,7 @@ popd %{_cross_libdir}/modules-load.d/nvidia-dependencies.conf %files tesla-%{tesla_major} -%license %{license_file} +%license NVidiaEULAforAWS.pdf %license fabricmanager-linux-%{fm_arch}-%{tesla_ver}-archive/third-party-notices.txt %dir %{_cross_datadir}/nvidia/tesla %dir %{_cross_libexecdir}/nvidia/tesla/bin diff --git a/packages/kmod-6.1-nvidia/.gitignore b/packages/kmod-6.1-nvidia/.gitignore new file mode 100644 index 00000000000..0bcfb52fdbc --- /dev/null +++ b/packages/kmod-6.1-nvidia/.gitignore @@ -0,0 +1 @@ +NVidiaEULAforAWS.pdf diff --git a/packages/kmod-6.1-nvidia/Cargo.toml b/packages/kmod-6.1-nvidia/Cargo.toml index d1ab1a3c25f..9be7e87d162 100644 --- a/packages/kmod-6.1-nvidia/Cargo.toml +++ b/packages/kmod-6.1-nvidia/Cargo.toml @@ -12,6 +12,10 @@ path = "../packages.rs" package-name = "kmod-6.1-nvidia" releases-url = "https://docs.nvidia.com/datacenter/tesla/" +[[package.metadata.build-package.external-files]] +url = "https://s3.amazonaws.com/EULA/NVidiaEULAforAWS.pdf" +sha512 = "e1926fe99afc3ab5b2f2744fcd53b4046465aefb2793e2e06c4a19455a3fde895e00af1415ff1a5804c32e6a2ed0657e475de63da6c23a0e9c59feeef52f3f58" + [[package.metadata.build-package.external-files]] url = "https://us.download.nvidia.com/tesla/535.161.07/NVIDIA-Linux-x86_64-535.161.07.run" sha512 = "4e8dd709157c15519f01a8d419daa098da64666d20a80edf3894239707ff1e83b48553f3edc5d567109d36e52b31ac7c0c7218ea77862a04e89aa3cc1f16a5ba" diff --git a/packages/kmod-6.1-nvidia/kmod-6.1-nvidia.spec b/packages/kmod-6.1-nvidia/kmod-6.1-nvidia.spec index 5b08cd60eeb..d6b8771c4cc 100644 --- a/packages/kmod-6.1-nvidia/kmod-6.1-nvidia.spec +++ b/packages/kmod-6.1-nvidia/kmod-6.1-nvidia.spec @@ -8,9 +8,6 @@ %global fm_arch %{_cross_arch} %endif -%global spdx_id %(bottlerocket-license-tool -l %{_builddir}/Licenses.toml spdx-id nvidia) -%global license_file %(bottlerocket-license-tool -l %{_builddir}/Licenses.toml path nvidia -p ./licenses) - # With the split of the firmware binary from firmware/gsp.bin to firmware/gsp_ga10x.bin # and firmware/gsp_tu10x.bin the file format changed from executable to relocatable. # The __spec_install_post macro will by default try to strip all binary files. @@ -31,6 +28,7 @@ URL: http://www.nvidia.com/ # NVIDIA .run scripts for kernel and userspace drivers Source0: https://us.download.nvidia.com/tesla/%{tesla_ver}/NVIDIA-Linux-x86_64-%{tesla_ver}.run Source1: https://us.download.nvidia.com/tesla/%{tesla_ver}/NVIDIA-Linux-aarch64-%{tesla_ver}.run +Source2: NVidiaEULAforAWS.pdf # fabricmanager for NVSwitch Source10: https://developer.download.nvidia.com/compute/nvidia-driver/redist/fabricmanager/linux-x86_64/fabricmanager-linux-x86_64-%{tesla_ver}-archive.tar.xz @@ -64,7 +62,8 @@ Requires: %{name}-tesla(fabricmanager) %package tesla-%{tesla_major} Summary: NVIDIA %{tesla_major} Tesla driver Version: %{tesla_ver} -License: %{spdx_id} +License: LicenseRef-NVIDIA-AWS-EULA +Requires: %{_cross_os}variant-platform(aws) Requires: %{name} Requires: %{name}-fabricmanager Provides: %{name}-tesla(fabricmanager) @@ -81,6 +80,9 @@ sh %{_sourcedir}/NVIDIA-Linux-%{_cross_arch}-%{tesla_ver}.run -x # correct source is architecture-dependent. tar -xf %{_sourcedir}/fabricmanager-linux-%{fm_arch}-%{tesla_ver}-archive.tar.xz +# Add the license. +install -p -m 0644 %{S:2} . + %global kernel_sources %{_builddir}/kernel-devel tar -xf %{_cross_datadir}/bottlerocket/kernel-devel.tar.xz @@ -233,7 +235,7 @@ popd %{_cross_libdir}/modules-load.d/nvidia-dependencies.conf %files tesla-%{tesla_major} -%license %{license_file} +%license NVidiaEULAforAWS.pdf %license fabricmanager-linux-%{fm_arch}-%{tesla_ver}-archive/third-party-notices.txt %dir %{_cross_datadir}/nvidia/tesla %dir %{_cross_libexecdir}/nvidia/tesla/bin