Skip to content

Commit

Permalink
fix missing libnvidia-ml.so symlink in nvidia drivers (negativo17/cud…
Browse files Browse the repository at this point in the history
  • Loading branch information
GloriousEggroll committed Nov 22, 2024
1 parent 9706a0a commit c703f7b
Show file tree
Hide file tree
Showing 10 changed files with 139 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Name: dkms-%{dkms_name}
Version: 565.57.01
Release: 2%{?dist}
Release: 3%{?dist}
Summary: NVIDIA display driver kernel module
Epoch: 3
License: NVIDIA License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Name: nvidia-driver
Version: 565.57.01
Release: 2%{?dist}
Release: 3%{?dist}
Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards
Epoch: 3
License: NVIDIA License
Expand Down Expand Up @@ -293,6 +293,8 @@ install -p -m 0644 -D %{SOURCE40} %{buildroot}%{_metainfodir}/com.nvidia.driver.
mkdir -p %{buildroot}%{_datadir}/pixmaps/
cp %{SOURCE42} %{buildroot}%{_datadir}/pixmaps/

ln -sfv %{_libdir}/libnvidia-ml.so.1 %{buildroot}%{_prefix}/lib/libnvidia-ml.so

%check
appstream-util validate --nonet %{buildroot}%{_metainfodir}/com.nvidia.driver.metainfo.xml

Expand Down Expand Up @@ -453,6 +455,9 @@ appstream-util validate --nonet %{buildroot}%{_metainfodir}/com.nvidia.driver.me
%files -n libnvidia-ml
%{_libdir}/libnvidia-ml.so.1
%{_libdir}/libnvidia-ml.so.%{version}
%ifarch x86_64 aarch64
%{_prefix}/lib/libnvidia-ml.so
%endif

%changelog
* Sun Oct 27 2024 Simone Caronni <negativo17@gmail.com> - 3:565.57.01-2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Name: nvidia-kmod-common
Version: 565.57.01
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Common file for NVIDIA's proprietary driver kernel modules
Epoch: 3
License: NVIDIA License
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

Name: nvidia-kmod
Version: 565.57.01
Release: 2%{?dist}
Release: 3%{?dist}
Summary: NVIDIA display driver kernel module
Epoch: 3
License: NVIDIA License
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: nvidia-modprobe
Version: 565.57.01
Release: 2%{?dist}
Release: 3%{?dist}
Summary: NVIDIA kernel module loader
Epoch: 3
License: GPLv2+
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: nvidia-persistenced
Version: 565.57.01
Release: 2%{?dist}
Release: 3%{?dist}
Summary: A daemon to maintain persistent software state in the NVIDIA driver
Epoch: 3
License: GPLv2+
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: nvidia-settings
Version: 565.57.01
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Configure the NVIDIA graphics driver
Epoch: 3
License: GPLv2+
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Name: nvidia-xconfig
Version: 565.57.01
Release: 2%{?dist}
Release: 3%{?dist}
Summary: NVIDIA X configuration file editor
Epoch: 3
License: GPLv2+
Expand Down
118 changes: 118 additions & 0 deletions appstream/nobara-nvidia-drivers/cuda-nvml/cuda-nvml.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
%global real_name cuda_nvml_dev

%global debug_package %{nil}
%global __strip /bin/true
%global _missing_build_ids_terminate_build 0
%global _build_id_links none
%global major_package_version 12-6

Name: cuda-nvml
Epoch: 1
Version: 12.6.68
Release: 2%{?dist}
Summary: NVIDIA Management library (NVML)
License: CUDA Toolkit
URL: https://developer.nvidia.com/cuda-toolkit
ExclusiveArch: x86_64 aarch64

Source0: https://developer.download.nvidia.com/compute/cuda/redist/%{real_name}/linux-x86_64/%{real_name}-linux-x86_64-%{version}-archive.tar.xz
Source1: https://developer.download.nvidia.com/compute/cuda/redist/%{real_name}/linux-sbsa/%{real_name}-linux-sbsa-%{version}-archive.tar.xz
Source3: nvidia-ml.pc

Requires(post): ldconfig
Conflicts: %{name}-%{major_package_version} < %{?epoch:%{epoch}:}%{version}-%{release}

%description
A C-based API for monitoring and managing various states of the NVIDIA GPU
devices. It provides a direct access to the queries and commands exposed via
nvidia-smi. The runtime version of NVML ships with the NVIDIA display driver.

Each new version of NVML is backwards compatible and is intended to be a
platform for building 3rd party applications.

%package devel
Summary: Development files for the NVIDIA Management library (NVML)
# Unversioned as it is provided by the driver's NVML library
Requires: %{name}%{_isa}
Requires: libnvidia-ml
Conflicts: %{name}-devel-%{major_package_version} < %{?epoch:%{epoch}:}%{version}

%description devel
This package provides development files for the NVIDIA Management library
(NVML). Main libraries are provided by the driver package.

%prep
%ifarch x86_64
%setup -q -n %{real_name}-linux-x86_64-%{version}-archive
%endif

%ifarch aarch64
%setup -q -T -b 1 -n %{real_name}-linux-sbsa-%{version}-archive
%endif

%install
mkdir -p %{buildroot}%{_includedir}
mkdir -p %{buildroot}%{_libdir}/pkgconfig/

cp -fr include/* %{buildroot}%{_includedir}/
cp -fr %{SOURCE3} %{buildroot}/%{_libdir}/pkgconfig/

# Set proper variables
sed -i \
-e 's|CUDA_VERSION|%{version}|g' \
-e 's|LIBDIR|%{_libdir}|g' \
-e 's|INCLUDE_DIR|%{_includedir}|g' \
%{buildroot}/%{_libdir}/pkgconfig/*.pc

%{?ldconfig_scriptlets}

%files devel
%license LICENSE
%doc nvml/example
%{_includedir}/nvml.h
%{_libdir}/pkgconfig/nvidia-ml.pc

%changelog
* Thu Sep 19 2024 Simone Caronni <negativo17@gmail.com> - 1:12.6.68-1
- Update to 12.6.68.

* Thu Jul 11 2024 Simone Caronni <negativo17@gmail.com> - 1:12.5.82-1
- Update to 12.5.82.

* Tue Mar 12 2024 Simone Caronni <negativo17@gmail.com> - 1:12.4.99-1
- Update to 12.4.99.
- Drop ppc64le.

* Tue Nov 28 2023 Simone Caronni <negativo17@gmail.com> - 1:12.3.101-1
- Update to 12.3.101.

* Thu Sep 28 2023 Simone Caronni <negativo17@gmail.com> - 1:12.2.140-1
- Update to 12.2.140.

* Tue Jul 11 2023 Simone Caronni <negativo17@gmail.com> - 1:12.2.81-1
- Update to 12.2.81.

* Thu Jun 08 2023 Simone Caronni <negativo17@gmail.com> - 1:12.1.105-1
- Update to 12.1.105.

* Tue Apr 11 2023 Simone Caronni <negativo17@gmail.com> - 1:12.1.55-1
- Update to 12.1.55.

* Sat Feb 25 2023 Simone Caronni <negativo17@gmail.com> - 1:12.0.140-1
- Update to 12.0.140.

* Tue Dec 13 2022 Simone Caronni <negativo17@gmail.com> - 1:12.0.76-1
- Update to 12.0.76.

* Fri Nov 11 2022 Simone Caronni <negativo17@gmail.com> - 1:11.8.86-1
- Update to 11.8.86.
- Use aarch64 archive in place of sbsa.

* Sun Sep 04 2022 Simone Caronni <negativo17@gmail.com> - 1:11.7.91-1
- Update to 11.7.91.

* Thu Jun 23 2022 Simone Caronni <negativo17@gmail.com> - 1:11.7.50-1
- Update to 11.7.50.

* Thu Jan 27 2022 Simone Caronni <negativo17@gmail.com> - 1:11.6.55-1
- First build with the new tarball components.
8 changes: 8 additions & 0 deletions appstream/nobara-nvidia-drivers/cuda-nvml/nvidia-ml.pc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
libdir=LIBDIR
includedir=INCLUDE_DIR

Name: nvidia-ml
Description: NVML
Version: CUDA_VERSION
Libs: -L${libdir} -lnvidia-ml
Cflags: -I${includedir}

0 comments on commit c703f7b

Please sign in to comment.