diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index e69de29..bce018d 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/radii-1.0.0-vendor.tar.gz +/radii-1.0.0.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..a9520db --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - rhel-10 +decision_contexts: + - osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} diff --git a/plans/tier0.fmf b/plans/tier0.fmf new file mode 100644 index 0000000..7462dfe --- /dev/null +++ b/plans/tier0.fmf @@ -0,0 +1,7 @@ +summary: radii CI test plan +discover: + how: fmf + url: https://github.com/mizdebsk/radii-tests + filter: tier:0 +execute: + how: tmt diff --git a/radii.spec b/radii.spec new file mode 100644 index 0000000..03cacfc --- /dev/null +++ b/radii.spec @@ -0,0 +1,66 @@ +%global goipath github.com/mizdebsk/radii +%global tag %{version} +%gometa -L -f + +Name: radii +Epoch: 1 +Version: 1.0.0 +Release: %autorelease +Summary: GPU and AI accelerator driver manager +License: GPL-3.0-or-later +URL: %{gourl} + +Source: %{gourl}/releases/download/%{version}/%{archivename}.tar.gz +Source: %{gourl}/releases/download/%{version}/%{archivename}-vendor.tar.gz + +Requires: radii-hwdata-nv + +Obsoletes: rhel-drivers < 1:0 +Provides: rhel-drivers = %{epoch}:%{version}-%{release} + +%description +The radii tool is a command-line utility that provides a consistent +interface for installing and maintaining third-party AI-accelerator +and GPU driver stacks. It detects compatible accelerator hardware, +enables the appropriate package repositories, and installs the +required kernel and user-mode components from distribution +packages. The tool manages multi-component driver stacks end-to-end +and integrates with the standard dnf workflow so that installed +drivers are updated through normal system package management. + +%prep +%goprep -p1 +tar -xf %{S:1} + +%build +GO_LDFLAGS="-X main.version=%{version}-%{release}" +%gobuild -o %{gobuilddir}/bin/radii %{goipath}/cmd/radii +echo "complete -F _radii rhel-drivers" >completions/rhel-drivers.bash +sed /^.Nm/s/radii$/rhel-drivers/ man/radii.1 >man/rhel-drivers.1 +sed /^complete/s/radii$/rhel-drivers/ completions/radii.bash >completions/rhel-drivers.bash + +%install +install -d -m 755 %{buildroot}%{_bindir} +install -p -m 755 %{gobuilddir}/bin/radii %{buildroot}%{_bindir}/ +ln -s radii %{buildroot}%{_bindir}/rhel-drivers +install -d -m 755 %{buildroot}%{_mandir}/man1 +install -p -m 644 man/radii.1 %{buildroot}%{_mandir}/man1/ +install -p -m 644 man/rhel-drivers.1 %{buildroot}%{_mandir}/man1/ +install -d -m 755 %{buildroot}%{_datadir}/bash-completion/completions/ +install -p -m 644 completions/radii.bash %{buildroot}%{_datadir}/bash-completion/completions/ +install -p -m 644 completions/rhel-drivers.bash %{buildroot}%{_datadir}/bash-completion/completions/ + +%check +%{buildroot}%{_bindir}/radii --version +%{buildroot}%{_bindir}/rhel-drivers --version +%gocheck + +%files +%license LICENSE +%doc AUTHORS README.md +%{_bindir}/* +%{_mandir}/man1/* +%{_datadir}/bash-completion + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..0d3d06c --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (radii-1.0.0-vendor.tar.gz) = a0af9e67751cf88cd840460d8506bfa32e3ac6a5d4cd279798e56efb6f8cfe2bda9bae87f0e515d6092da06a935a9be6c85bde6c2bb9ec58dbce8a1543940afd +SHA512 (radii-1.0.0.tar.gz) = 3861e4d4a124384fa27c152df7506826cfafd74b24c1ec4a48429d6f45333a1986d624c44414a76eae11ae03c20a1d3971464355cbbc6ad80c1f8accf45d53ca