-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move ucore addons builds here (#219)
- Loading branch information
Showing
8 changed files
with
153 additions
and
20 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
set -oeux pipefail | ||
|
||
### BUILD UCORE-ADDONS RPM | ||
install -D /etc/pki/akmods/certs/public_key.der /tmp/ublue-os-ucore-addons/rpmbuild/SOURCES/public_key.der | ||
rpmbuild -ba \ | ||
--define '_topdir /tmp/ublue-os-ucore-addons/rpmbuild' \ | ||
--define '%_tmppath %{_topdir}/tmp' \ | ||
/tmp/ublue-os-ucore-addons/ublue-os-ucore-addons.spec |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
|
||
set -oeux pipefail | ||
|
||
### SETUP nvidia container stuffs | ||
|
||
mkdir -p /tmp/ublue-os-ucore-nvidia/rpmbuild/SOURCES/ | ||
|
||
curl -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo \ | ||
-o /tmp/ublue-os-ucore-nvidia/rpmbuild/SOURCES/nvidia-container-toolkit.repo | ||
sed -i "s@gpgcheck=0@gpgcheck=1@" /tmp/ublue-os-ucore-nvidia/rpmbuild/SOURCES/nvidia-container-toolkit.repo | ||
|
||
curl -L https://raw.githubusercontent.com/NVIDIA/dgx-selinux/master/bin/RHEL9/nvidia-container.pp \ | ||
-o /tmp/ublue-os-ucore-nvidia/rpmbuild/SOURCES/nvidia-container.pp | ||
|
||
rpmbuild -ba \ | ||
--define '_topdir /tmp/ublue-os-ucore-nvidia/rpmbuild' \ | ||
--define '%_tmppath %{_topdir}/tmp' \ | ||
/tmp/ublue-os-ucore-nvidia/ublue-os-ucore-nvidia.spec |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Name: ublue-os-ucore-addons | ||
Version: 0.1 | ||
Release: 1%{?dist} | ||
Summary: Signing key for ucore kmods | ||
|
||
License: MIT | ||
URL: https://github.com/ublue-os/ucore-kmods | ||
|
||
BuildArch: noarch | ||
Supplements: mokutil policycoreutils | ||
|
||
Source0: public_key.der | ||
|
||
%description | ||
Adds the signing key for importing with mokutil to enable secure boot for kernel modules. | ||
|
||
%prep | ||
%setup -q -c -T | ||
|
||
|
||
%build | ||
# Have different name for *.der in case kmodgenca is needed for creating more keys | ||
install -Dm0644 %{SOURCE0} %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/pki/akmods/certs/akmods-ublue.der | ||
|
||
install -Dm0644 %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/pki/akmods/certs/akmods-ublue.der %{buildroot}%{_sysconfdir}/pki/akmods/certs/akmods-ublue.der | ||
|
||
%files | ||
%attr(0644,root,root) %{_datadir}/ublue-os/%{_sysconfdir}/pki/akmods/certs/akmods-ublue.der | ||
%attr(0644,root,root) %{_sysconfdir}/pki/akmods/certs/akmods-ublue.der | ||
|
||
%changelog | ||
* Sat Dec 30 2023 Benjamin Sherman <[email protected]> - 0.1 | ||
- Add key for enrolling ucore kernel modules for secure boot |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
Name: ublue-os-ucore-nvidia | ||
Version: 0.3 | ||
Release: 1%{?dist} | ||
Summary: Additional files for nvidia driver support on CoreOS | ||
|
||
License: MIT | ||
URL: https://github.com/ublue-os/akmods | ||
|
||
BuildArch: noarch | ||
Supplements: mokutil policycoreutils | ||
|
||
Source0: nvidia-container-toolkit.repo | ||
Source1: nvidia-container.pp | ||
Source2: ublue-nvctk-cdi.service | ||
Source3: 70-ublue-nvctk-cdi.preset | ||
|
||
%description | ||
Adds various runtime files for nvidia support on Fedora CoreOS. | ||
|
||
%prep | ||
%setup -q -c -T | ||
|
||
|
||
%build | ||
install -Dm0644 %{SOURCE0} %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/nvidia-container-toolkit.repo | ||
install -Dm0644 %{SOURCE1} %{buildroot}%{_datadir}/ublue-os/%{_datadir}/selinux/packages/nvidia-container.pp | ||
install -Dm0644 %{SOURCE2} %{buildroot}%{_datadir}/ublue-os/%{_unitdir}/ublue-nvctk-cdi.service | ||
install -Dm0644 %{SOURCE3} %{buildroot}%{_presetdir}/70-ublue-nvctk-cdi.preset | ||
|
||
sed -i 's@enabled=1@enabled=0@g' %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/nvidia-container-toolkit.repo | ||
|
||
install -Dm0644 %{buildroot}%{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/nvidia-container-toolkit.repo %{buildroot}%{_sysconfdir}/yum.repos.d/nvidia-container-toolkit.repo | ||
install -Dm0644 %{buildroot}%{_datadir}/ublue-os/%{_datadir}/selinux/packages/nvidia-container.pp %{buildroot}%{_datadir}/selinux/packages/nvidia-container.pp | ||
install -Dm0644 %{buildroot}%{_datadir}/ublue-os/%{_unitdir}/ublue-nvctk-cdi.service %{buildroot}%{_unitdir}/ublue-nvctk-cdi.service | ||
|
||
%files | ||
%attr(0644,root,root) %{_datadir}/ublue-os/%{_sysconfdir}/yum.repos.d/nvidia-container-toolkit.repo | ||
%attr(0644,root,root) %{_datadir}/ublue-os/%{_datadir}/selinux/packages/nvidia-container.pp | ||
%attr(0644,root,root) %{_datadir}/ublue-os/%{_unitdir}/ublue-nvctk-cdi.service | ||
%attr(0644,root,root) %{_sysconfdir}/yum.repos.d/nvidia-container-toolkit.repo | ||
%attr(0644,root,root) %{_datadir}/selinux/packages/nvidia-container.pp | ||
%attr(0644,root,root) %{_unitdir}/ublue-nvctk-cdi.service | ||
%attr(0644,root,root) %{_presetdir}/70-ublue-nvctk-cdi.preset | ||
|
||
%changelog | ||
* Fri Oct 6 2023 Benjamin Sherman <[email protected]> - 0.3 | ||
- add ublue-nvctk-cdi service to auto-generate NVIDIA CDI GPU definitions | ||
|
||
* Wed Oct 04 2023 Benjamin Sherman <[email protected]> - 0.2 | ||
- use newer nvidia-container-toolkit repo | ||
- repo provides newer toolkit, no longer requires config.toml | ||
|
||
* Sat Aug 19 2023 Benjamin Sherman <[email protected]> - 0.1 | ||
First release for Fedora CoreOS based on ublue-os-nvidia-addons includes: | ||
- nvidia-container-runtime repo | ||
- nvidia-container-runtime rootless config | ||
- nvidia-container-runtime selinux policy file |