diff --git a/anda/lib/nvidia/cuda/cuda.spec b/anda/lib/nvidia/cuda/cuda.spec index 4ead4898dd..5b62cee66f 100644 --- a/anda/lib/nvidia/cuda/cuda.spec +++ b/anda/lib/nvidia/cuda/cuda.spec @@ -3,7 +3,7 @@ Name: cuda Version: 13.1.80 -Release: 1%?dist +Release: 2%?dist Summary: NVIDIA Compute Unified Device Architecture Toolkit Epoch: 1 License: CUDA Toolkit @@ -58,7 +58,7 @@ Requires: libnvjpeg%{?_isa} Conflicts: %{name}-driver-devel-%{major_package_version} < %{?epoch:%{epoch}:}%{version}-%{release} Conflicts: %{name}-libraries-%{major_package_version} < %{?epoch:%{epoch}:}%{version}-%{release} # Explicitly declare the dependency or libcuda.so.1()(64bit) will pull in xorg-x11-drv-cuda-libs -Requires: nvidia-driver-cuda-libs%{_isa} +Requires: (nvidia-driver-cuda-libs%{_isa} or nvidia-driver-580-cuda-libs%{_isa}) %description libs Contains the CUDA run-time library required to run CUDA application natively. diff --git a/anda/lib/nvidia/libnvidia-container/libnvidia-container.spec b/anda/lib/nvidia/libnvidia-container/libnvidia-container.spec index 3e61fb57e8..3fe6d1eea1 100644 --- a/anda/lib/nvidia/libnvidia-container/libnvidia-container.spec +++ b/anda/lib/nvidia/libnvidia-container/libnvidia-container.spec @@ -2,7 +2,7 @@ Name: libnvidia-container Version: 1.18.1 -Release: 1%?dist +Release: 2%?dist Summary: NVIDIA container runtime library License: BSD-3-Clause AND Apache-2.0 AND GPL-3.0-or-later AND LGPL-3.0-or-later AND MIT AND GPL-2.0-only Vendor: NVIDIA Corporation @@ -45,7 +45,7 @@ make install DESTDIR=%{buildroot} REVISION=%{version} WITH_LIBELF=yes \ %package -n %{name}%{_major} Summary: NVIDIA container runtime library -Requires: nvidia-driver >= 340.29 +Requires: (nvidia-driver or nvidia-driver-580) %description -n %{name}%{_major} The nvidia-container library provides an interface to configure containers using NVIDIA hardware. @@ -55,21 +55,21 @@ The nvidia-container library provides an interface to configure containers using %package devel Requires: %{name}%{_major}%{?_isa} = %{version}-%{release} Summary: NVIDIA container runtime library development files -Requires: nvidia-driver >= 340.29 +Requires: (nvidia-driver or nvidia-driver-580) %description devel This package contains the files required to compile programs with the library. %package static Requires: %{name}-devel%{?_isa} = %{version}-%{release} Summary: NVIDIA container runtime library static library -Requires: nvidia-driver >= 340.29 +Requires: (nvidia-driver or nvidia-driver-580) %description static The nvidia-container library provides an interface to configure containers using NVIDIA hardware. %package tools Requires: %{name}%{_major}%{?_isa} >= %{version}-%{release} Summary: NVIDIA container runtime library command-line tools -Requires: nvidia-driver >= 340.29 +Requires: (nvidia-driver or nvidia-driver-580) %description tools This package contains command-line tools that facilitate using the nvidia-container library. diff --git a/anda/lib/terra-glfw/anda.hcl b/anda/lib/terra-glfw/anda.hcl index 0cf0b7e70a..52b2c3d44b 100644 --- a/anda/lib/terra-glfw/anda.hcl +++ b/anda/lib/terra-glfw/anda.hcl @@ -1,5 +1,5 @@ project pkg { - arches = ["x86_64", "aarch64", "i386"] + arches = ["x86_64", "aarch64"] rpm { spec = "terra-glfw.spec" } diff --git a/anda/system/nvidia-580/README.md b/anda/system/nvidia-580/README.md new file mode 100644 index 0000000000..6f391e74de --- /dev/null +++ b/anda/system/nvidia-580/README.md @@ -0,0 +1,41 @@ +# The Terra NVIDIA 580 Driver tree + +This directory contains the Terra distribution of NVIDIA 580 legacy drivers for Maxwell, Pascal, and Volta NVIDIA GPUs. + +These driver packages are based on negativo17's NVIDIA driver packages for Fedora, with very slight modifications for hardware compatibility, and conforming to the Terra packaging guidelines. + +Unlike negativo17 and Nobara, we do not manually generate a tarball of the NVIDIA drivers, but directly generate them +on-the-fly from the NVIDIA installer. This ensures that the packages can be easily maintained and updated, as long as the +self-extracting NVIDIA installer still has the same command-line options. + +## How Terra unpacks the self-extracting archive + +Instead of pre-generating the tarball, we run the NVIDIA installer with the `-x` flag to extract the contents directly to the build directory. We then make use of an RPM macro to set the new build directory as that tree. + +```rpmspec +Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run + + +... skip to the %prep section ... + +%prep +sh %{SOURCE0} -x --target nvidia-driver-%{version} +%setup -T -D -n nvidia-driver-%{version} + +%build + +... Build the package as usual ... + +``` + +This is simpler than manually generating the tarball, but comes with a slight cost of having to download the NVIDIA installer every time we build any package that relies on that archive. + +## Support + +If you have any issues with the NVIDIA drivers, please file an issue on the [Terra Monorepo](https://github.com/terrapkg/packages/issues). We will try to help you as best as we can. + +## License + +The NVIDIA drivers are licensed under the NVIDIA Software License. Please refer to the [NVIDIA Software License](https://www.nvidia.com/content/DriverDownload-March2009/licence.php?lang=us) for more information. + +We do not modify the actual NVIDIA drivers in any way, only providing a re-packaged version compatible with Ultramarine and Fedora. diff --git a/anda/system/nvidia-580/compat-nvidia-repo/anda.hcl b/anda/system/nvidia-580/compat-nvidia-repo/anda.hcl new file mode 100644 index 0000000000..8e890788b8 --- /dev/null +++ b/anda/system/nvidia-580/compat-nvidia-repo/anda.hcl @@ -0,0 +1,10 @@ +project pkg { + arches = ["x86_64"] + rpm { + spec = "compat-nvidia-repo-580.spec" + } + labels { + subrepo = "nvidia" + weekly = 4 + } +} diff --git a/anda/system/nvidia-580/compat-nvidia-repo/compat-nvidia-repo-580.spec b/anda/system/nvidia-580/compat-nvidia-repo/compat-nvidia-repo-580.spec new file mode 100644 index 0000000000..7e9e211914 --- /dev/null +++ b/anda/system/nvidia-580/compat-nvidia-repo/compat-nvidia-repo-580.spec @@ -0,0 +1,34 @@ +Name: compat-nvidia-repo-580 +Version: 580.119.02 +Epoch: 3 +Release: 1%?dist +Summary: Compatibility package required by official CUDA packages +License: NVIDIA License +URL: https://developer.nvidia.com/cuda-toolkit + +BuildArch: noarch + +Requires: nvidia-driver-580 >= %{?epoch:%{epoch}:}%{version} +Requires: nvidia-driver-580-cuda >= %{?epoch:%{epoch}:}%{version} +Requires: nvidia-driver-580-cuda-libs >= %{?epoch:%{epoch}:}%{version} +Requires: nvidia-driver-580-libs >= %{?epoch:%{epoch}:}%{version} +Requires: nvidia-580-kmod >= %{?epoch:%{epoch}:}%{version} +Requires: nvidia-settings-580 >= %{?epoch:%{epoch}:}%{version} + +Provides: cuda-drivers-580 >= %{?epoch:%{epoch}:}%{version} +Provides: nvidia-open-580 >= %{?epoch:%{epoch}:}%{version} +# Add any versioned provides: +Provides: cuda-drivers-560 >= %{?epoch:%{epoch}:}%{version} +Provides: cuda-drivers-565 >= %{?epoch:%{epoch}:}%{version} +Provides: nvidia-open-560 >= %{?epoch:%{epoch}:}%{version} +Provides: nvidia-open-565 >= %{?epoch:%{epoch}:}%{version} + +%description +Nvidia drivers metapackage required by official CUDA packages. It pulls in all +Nvidia driver components. + +%files +# Without an empty files section the package is not created. + +%changelog +%autochangelog diff --git a/anda/system/nvidia-580/compat-nvidia-repo/update.rhai b/anda/system/nvidia-580/compat-nvidia-repo/update.rhai new file mode 100644 index 0000000000..d1ef2924fb --- /dev/null +++ b/anda/system/nvidia-580/compat-nvidia-repo/update.rhai @@ -0,0 +1,3 @@ +import "andax/nvidia.rhai" as nvidia; + +rpm.version(nvidia::nvidia_legacy_version()); diff --git a/anda/system/nvidia/dkms-nvidia/open/anda.hcl b/anda/system/nvidia-580/dkms-nvidia/anda.hcl similarity index 63% rename from anda/system/nvidia/dkms-nvidia/open/anda.hcl rename to anda/system/nvidia-580/dkms-nvidia/anda.hcl index d3607398c9..2f72acbae0 100644 --- a/anda/system/nvidia/dkms-nvidia/open/anda.hcl +++ b/anda/system/nvidia-580/dkms-nvidia/anda.hcl @@ -1,9 +1,10 @@ project pkg { rpm { - spec = "dkms-nvidia-open.spec" + spec = "dkms-nvidia-580.spec" } labels { subrepo = "nvidia" updbranch = 1 + mock = 1 } } diff --git a/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.spec b/anda/system/nvidia-580/dkms-nvidia/dkms-nvidia-580.spec similarity index 78% rename from anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.spec rename to anda/system/nvidia-580/dkms-nvidia/dkms-nvidia-580.spec index 0f344a4385..c6fed3eb11 100644 --- a/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.spec +++ b/anda/system/nvidia-580/dkms-nvidia/dkms-nvidia-580.spec @@ -1,9 +1,11 @@ ## NVIDIA DKMS package, based on the work of Negativo17 with tweaks for Terra. +# RPM inexplicably thinks this package deps on a version of libcrypto it does not? +%global __requires_exclude (libcrypto\\.so\\.1\\.1.*)$ %global debug_package %{nil} %global modulename nvidia -Name: dkms-%{modulename}-open +Name: dkms-%{modulename}-580 Version: 580.105.08 Release: 1%?dist Summary: NVIDIA display driver kernel module @@ -11,17 +13,17 @@ Epoch: 3 License: NVIDIA License URL: https://www.nvidia.com/object/unix.html Source0: https://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run -Source1: %{name}.conf +Source1: dkms-%{modulename}.conf BuildRequires: sed -Provides: %{modulename}-open-kmod = %{?epoch:%{epoch}:}%{version} -Requires: %{modulename}-kmod-common = %{?epoch:%{epoch}:}%{version} +Provides: %{modulename}-580-kmod = %{?epoch:%{epoch}:}%{version} +Requires: %{modulename}-580-kmod-common = %{?epoch:%{epoch}:}%{version} Requires: dkms Conflicts: akmod-nvidia # Unlike most DKMS packages, this package is NOT noarch! ExclusiveArch: x86_64 aarch64 %description -This package provides the NVIDIA kernel driver modules. +This package provides the proprietary NVIDIA kernel driver modules. %prep sh %{SOURCE0} -x --target dkms-nvidia-%{version}-%{_arch} diff --git a/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.conf b/anda/system/nvidia-580/dkms-nvidia/dkms-nvidia.conf similarity index 60% rename from anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.conf rename to anda/system/nvidia-580/dkms-nvidia/dkms-nvidia.conf index 1b1ecb2efb..a6b18a83fb 100644 --- a/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.conf +++ b/anda/system/nvidia-580/dkms-nvidia/dkms-nvidia.conf @@ -2,27 +2,20 @@ PACKAGE_NAME="nvidia" PACKAGE_VERSION="__VERSION_STRING" AUTOINSTALL="yes" -MODULE_VARIANT=kernel - # Quote make to avoid DKMS replacing it with "make -j$parallel_jobs KERNELRELEASE=$kernelver" -MAKE[0]="'make' -j$(nproc) -C ${MODULE_VARIANT} KERNEL_UNAME=${kernelver} modules" +MAKE[0]="'make' -j$(nproc) KERNEL_UNAME=${kernelver} modules" BUILT_MODULE_NAME[0]="nvidia" -BUILT_MODULE_LOCATION[0]="${MODULE_VARIANT}" DEST_MODULE_LOCATION[0]="/extra" BUILT_MODULE_NAME[1]="nvidia-modeset" -BUILT_MODULE_LOCATION[1]="${MODULE_VARIANT}" DEST_MODULE_LOCATION[1]="/extra" BUILT_MODULE_NAME[2]="nvidia-drm" -BUILT_MODULE_LOCATION[2]="${MODULE_VARIANT}" DEST_MODULE_LOCATION[2]="/extra" BUILT_MODULE_NAME[3]="nvidia-uvm" -BUILT_MODULE_LOCATION[3]="${MODULE_VARIANT}" DEST_MODULE_LOCATION[3]="/extra" BUILT_MODULE_NAME[4]="nvidia-peermem" -BUILT_MODULE_LOCATION[4]="${MODULE_VARIANT}" DEST_MODULE_LOCATION[4]="/extra" diff --git a/anda/system/nvidia/dkms-nvidia/closed/modules.conf b/anda/system/nvidia-580/dkms-nvidia/modules.conf similarity index 100% rename from anda/system/nvidia/dkms-nvidia/closed/modules.conf rename to anda/system/nvidia-580/dkms-nvidia/modules.conf diff --git a/anda/system/nvidia-580/dkms-nvidia/update.rhai b/anda/system/nvidia-580/dkms-nvidia/update.rhai new file mode 100644 index 0000000000..ea0b60bd3d --- /dev/null +++ b/anda/system/nvidia-580/dkms-nvidia/update.rhai @@ -0,0 +1,3 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("nvidia-580-kmod-common", labels.branch)); diff --git a/anda/system/nvidia-580/nvidia-driver/.gitignore b/anda/system/nvidia-580/nvidia-driver/.gitignore new file mode 100644 index 0000000000..cfb0b7a5cd --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/.gitignore @@ -0,0 +1,4 @@ +nvidia*/ +NVIDIA*/ +*.tar.* +*.run \ No newline at end of file diff --git a/anda/system/nvidia-580/nvidia-driver/10-nvidia.conf b/anda/system/nvidia-580/nvidia-driver/10-nvidia.conf new file mode 100644 index 0000000000..b9db1a9928 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/10-nvidia.conf @@ -0,0 +1,8 @@ +Section "OutputClass" + Identifier "nvidia" + MatchDriver "nvidia-drm" + Driver "nvidia" + Option "AllowEmptyInitialConfiguration" + Option "SLI" "Auto" + Option "BaseMosaic" "on" +EndSection diff --git a/anda/system/nvidia-580/nvidia-driver/70-nvidia-driver-cuda.preset b/anda/system/nvidia-580/nvidia-driver/70-nvidia-driver-cuda.preset new file mode 100644 index 0000000000..ef728bd1e8 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/70-nvidia-driver-cuda.preset @@ -0,0 +1,4 @@ +# Enable persistence state. From: +# file:///usr/share/doc/nvidia-driver/html/nvidia-persistenced.html + +enable nvidia-persistenced.service diff --git a/anda/system/nvidia-580/nvidia-driver/70-nvidia-driver.preset b/anda/system/nvidia-580/nvidia-driver/70-nvidia-driver.preset new file mode 100644 index 0000000000..f897d23a61 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/70-nvidia-driver.preset @@ -0,0 +1,12 @@ +# Enable complete power management. From: +# file:///usr/share/doc/nvidia-driver/html/powermanagement.html + +enable nvidia-hibernate.service +enable nvidia-resume.service +enable nvidia-suspend.service +enable nvidia-suspend-then-hibernate.service + +# Enable Dynamic Boost. From: +# file:///usr/share/doc/nvidia-driver/html/dynamicboost.html + +enable nvidia-powerd.service diff --git a/anda/system/nvidia-580/nvidia-driver/alternate-install-present b/anda/system/nvidia-580/nvidia-driver/alternate-install-present new file mode 100644 index 0000000000..4f8206e1ef --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/alternate-install-present @@ -0,0 +1,7 @@ +The NVIDIA proprietary driver is already installed in this system. It was +installed through a 3d party repository. + +Please refer to the following page for additional information and to install +optional driver components: + + https://negativo17.org/nvidia-driver/ diff --git a/anda/system/nvidia-580/nvidia-driver/anda.hcl b/anda/system/nvidia-580/nvidia-driver/anda.hcl new file mode 100644 index 0000000000..abc8605434 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/anda.hcl @@ -0,0 +1,14 @@ +project "pkg" { + rpm { + spec = "nvidia-driver-580.spec" + # We run the negativo17 generator script here because I genuinely tried fixing the spec file with our fancy patch and it didn't work + # TODO: Port it inside the specfile scripts + # pre_script = "nvidia-generate-tarballs.sh" + } + arches = ["x86_64", "aarch64"] + labels = { + subrepo = "nvidia" + mock = 1 + weekly = 4 + } +} diff --git a/anda/system/nvidia-580/nvidia-driver/com.nvidia.driver.metainfo.xml b/anda/system/nvidia-580/nvidia-driver/com.nvidia.driver.metainfo.xml new file mode 100644 index 0000000000..ccc42a3963 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/com.nvidia.driver.metainfo.xml @@ -0,0 +1,47 @@ + + + com.nvidia.driver + + nvidia-settings.desktop + + NVIDIA Graphics Driver + /usr/share/pixmaps/com.nvidia.driver.png + NVIDIA Accelerated Graphics Driver + + NVIDIA Corporation + + +

The NVIDIA Accelerated Linux Graphics Driver brings accelerated 2D functionality and high-performance OpenGL support to Linux with the use of NVIDIA graphics processing units.

+

These drivers provide optimized hardware acceleration for OpenGL and X applications and support nearly all recent NVIDIA GPU products. The NVIDIA graphics driver uses a Unified Driver Architecture: the single graphics driver supports all modern NVIDIA GPUs.

+
+ + CUDA + GeForce + NVIDIA + OpenGL + Quadro + Tesla + Video + Vulkan + av1 + avc + driver + h264 + h265 + hevc + jpeg + mpeg2 + vaapi + vc-1 + vp8 + vp9 + + CC0-1.0 + LicenseRef-proprietary:NVIDIA + https://www.nvidia.com/ + https://github.com/terrapkg/packages/issues + https://github.com/terrapkg/packages + + True + +
diff --git a/anda/system/nvidia-580/nvidia-driver/com.nvidia.driver.png b/anda/system/nvidia-580/nvidia-driver/com.nvidia.driver.png new file mode 100644 index 0000000000..ff023b8b1b Binary files /dev/null and b/anda/system/nvidia-580/nvidia-driver/com.nvidia.driver.png differ diff --git a/anda/system/nvidia-580/nvidia-driver/nvidia-driver-580.spec b/anda/system/nvidia-580/nvidia-driver/nvidia-driver-580.spec new file mode 100644 index 0000000000..63b656ea59 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/nvidia-driver-580.spec @@ -0,0 +1,536 @@ +%global debug_package %{nil} +%global __strip %{nil} +%global __brp_strip_comment_note %{nil} +%global __brp_ldconfig %{nil} +%define _build_id_links none +%global real_name nvidia-driver + +# systemd 248+ +%if 0%{?rhel} == 8 +%global _systemd_util_dir %{_prefix}/lib/systemd +%endif + +Name: %{real_name}-580 +Version: 580.119.02 +Release: 1%?dist +Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards +Epoch: 3 +License: NVIDIA License +URL: http://www.nvidia.com/object/unix.html +ExclusiveArch: %{ix86} x86_64 aarch64 + +%dnl Source0: %{name}-%{version}-i386.tar.xz +%dnl Source1: %{name}-%{version}-x86_64.tar.xz +%dnl Source2: %{name}-%{version}-aarch64.tar.xz +Source8: 70-%{real_name}.preset +Source9: 70-%{real_name}-cuda.preset +Source10: 10-nvidia.conf +Source13: alternate-install-present + +Source40: com.nvidia.driver.metainfo.xml +Source41: parse-supported-gpus.py +Source42: com.nvidia.driver.png + +Source99: nvidia-generate-tarballs.sh + +%ifarch x86_64 aarch64 +BuildRequires: libappstream-glib +%if 0%{?rhel} == 8 +# xml.etree.ElementTree has indent only from 3.9+: +BuildRequires: python(abi) >= 3.9 +%else +BuildRequires: python3 +%endif +BuildRequires: systemd-rpm-macros +%endif + +BuildRequires: wget +BuildRequires: coreutils + +Requires: %{real_name}-libs%{?_isa} = %{?epoch:%{epoch}:}%{version} +Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version} + +Conflicts: nvidia-x11-drv +Conflicts: nvidia-x11-drv-470xx +Conflicts: xorg-x11-drv-nvidia +Conflicts: xorg-x11-drv-nvidia-470xx + +%description +This package provides the most recent NVIDIA display driver which allows for +hardware accelerated rendering with recent NVIDIA chipsets. + +For the full product support list, please consult the release notes for driver +version %{version}. + +%package libs +Summary: Libraries for %{name} +Requires: egl-gbm%{?_isa} >= 2:1.1.2.1 +Requires: (egl-wayland%{?_isa} >= 1.1.20 or egl-wayland2%{?_isa} >= 1.0.0~20250806gitd4deb7c-3) +Suggests: egl-wayland%{?_isa} >= 1.1.20 +Requires: egl-x11%{?_isa} >= 1.0.3 +Requires: libvdpau%{?_isa} >= 1.5 +Requires: libglvnd%{?_isa} >= 1.0 +Requires: libglvnd-egl%{?_isa} >= 1.0 +Requires: libglvnd-gles%{?_isa} >= 1.0 +Requires: libglvnd-glx%{?_isa} >= 1.0 +Requires: libglvnd-opengl%{?_isa} >= 1.0 +Requires: libnvidia-ml-580%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: vulkan-loader +%if 0%{?fedora} +%ifarch x86_64 +Requires: (%{name}-libs(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} if steam(x86-32)) +%endif +%endif +# dlopened +Requires: libnvidia-gpucomp-580%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: libnvidia-ml-580%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +Conflicts: nvidia-x11-drv-libs +Conflicts: nvidia-x11-drv-470xx-libs +Conflicts: xorg-x11-drv-nvidia-libs +Conflicts: xorg-x11-drv-nvidia-470xx-libs + +%description libs +This package provides the shared libraries for %{name}. + +%package cuda-libs +Summary: Libraries for %{name}-cuda +Provides: %{name}-devel = %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: %{name}-devel < %{?epoch:%{epoch}:}%{version}-%{release} +Requires: libnvidia-ml-580 = %{?epoch:%{epoch}:}%{version}-%{release} + +%ifarch x86_64 aarch64 +Requires: libnvidia-cfg-580 = %{?epoch:%{epoch}:}%{version}-%{release} +%endif +%if 0%{?fedora} +%ifarch x86_64 +Requires: (%{name}-cuda-libs-580(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} if steam(x86-32)) +%endif +%endif +# dlopened: +Requires: libnvidia-gpucomp-580%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: libnvidia-ml-580 = %{?epoch:%{epoch}:}%{version}-%{release} + +Conflicts: xorg-x11-drv-nvidia-cuda-libs +Conflicts: xorg-x11-drv-nvidia-470xx-cuda-libs + +%description cuda-libs +This package provides the CUDA libraries for %{name}-cuda. + +%package -n libnvidia-fbc-580 +Summary: NVIDIA OpenGL-based Framebuffer Capture libraries +Provides: %{real_name}-NvFBCOpenGL-580 = %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: %{real_name}-NvFBCOpenGL < %{?epoch:%{epoch}:}%{version}-%{release} +%if 0%{?fedora} +%ifarch x86_64 +Requires: (libnvidia-fbc-580(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} if steam(x86-32)) +%endif +%endif +# dlopened: +Requires: %{name}-cuda-libs-580%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} + +%description -n libnvidia-fbc-580 +This library provides a high performance, low latency interface to capture and +optionally encode the composited framebuffer of an X screen. NvFBC are private +APIs that are only available to NVIDIA approved partners for use in remote +graphics scenarios. + +%package -n libnvidia-gpucomp-580 +Summary: NVIDIA library for shader compilation (nvgpucomp) +%if 0%{?fedora} +%ifarch x86_64 +Requires: (libnvidia-gpucomp-580(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} if steam(x86-32)) +%endif +%endif + +%description -n libnvidia-gpucomp-580 +This package contains the private libnvidia-gpucomp runtime library which is used by +other driver components. + +%package -n libnvidia-ml-580 +Summary: NVIDIA Management Library (NVML) +Provides: cuda-nvml-580%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: %{real_name}-NVML-580 = %{?epoch:%{epoch}:}%{version}-%{release} +%if 0%{?fedora} +%ifarch x86_64 +Requires: (libnvidia-ml-580(x86-32) = %{?epoch:%{epoch}:}%{version}-%{release} if steam(x86-32)) +%endif +%endif +Obsoletes: %{real_name}-NVML < %{?epoch:%{epoch}:}%{version}-%{release} + +%description -n libnvidia-ml-580 +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 run-time version of NVML ships with the NVIDIA display driver, +and the SDK provides the appropriate header, stub libraries and sample +applications. Each new version of NVML is backwards compatible and is intended +to be a platform for building 3rd party applications. + +%ifarch x86_64 aarch64 + +%package -n libnvidia-cfg-580 +Summary: NVIDIA Config public interface (nvcfg) + +%description -n libnvidia-cfg-580 +This package contains the private libnvidia-cfg runtime library which is used by +other driver components. + +%package cuda +Summary: CUDA integration for %{name} +Requires: %{name}-cuda-libs-580%{?_isa} = %{?epoch:%{epoch}:}%{version} +Requires: nvidia-580-kmod-common = %{?epoch:%{epoch}:}%{version} +Requires: nvidia-persistenced-580 = %{?epoch:%{epoch}:}%{version} +Requires: opencl-filesystem +Requires: ocl-icd + +Conflicts: xorg-x11-drv-nvidia-cuda +Conflicts: xorg-x11-drv-nvidia-470xx-cuda + +%description cuda +This package provides the CUDA integration components for %{name}. + +%if 0%{?fedora} || 0%{?rhel} < 10 +%package -n xorg-x11-nvidia-580 +Summary: X.org X11 NVIDIA driver and extensions +Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version} +Requires: xorg-x11-server-Xorg%{?_isa} +Supplements: (%{real_name}-580 and xorg-x11-server-Xorg) + +Conflicts: xorg-x11-drv-nvidia +Conflicts: xorg-x11-drv-nvidia-470xx + +%description -n xorg-x11-nvidia-580 +The NVIDIA X.org X11 driver and associated components. +%endif + +%endif + +%prep +source %{SOURCE99} +export VERSION=%{version} +%ifarch %ix86 +export ARCH=x86_64 +%else +export ARCH=%{_arch} +%endif + +unpack() { + set_vars + run_file_get + run_file_extract + cleanup_folder + create_tarball +} + +unpack +%setup -D -T -n %{real_name}-%{version}-%{_arch} + +%ifarch x86_64 +%if 0%{?rhel} == 8 +rm -f libnvidia-pkcs11-openssl3.so.%{version} +%else +rm -f libnvidia-pkcs11.so.%{version} +%endif +%endif + +# Create symlinks for shared objects +ldconfig -vn . + +# Required for building gstreamer 1.0 NVENC plugins +ln -sf libnvidia-encode.so.%{version} libnvidia-encode.so + +# Required for building ffmpeg 3.1 Nvidia CUVID +ln -sf libnvcuvid.so.%{version} libnvcuvid.so + +# Required for building against CUDA +ln -sf libcuda.so.%{version} libcuda.so + +%build + +%install +# EGL loader +install -p -m 0644 -D 10_nvidia.json %{buildroot}%{_datadir}/glvnd/egl_vendor.d/10_nvidia.json + +# Vulkan loader +install -p -m 0644 -D nvidia_icd.json %{buildroot}%{_datadir}/vulkan/icd.d/nvidia_icd.%{_target_cpu}.json +sed -i -e 's|libGLX_nvidia|%{_libdir}/libGLX_nvidia|g' %{buildroot}%{_datadir}/vulkan/icd.d/nvidia_icd.%{_target_cpu}.json + +%ifarch x86_64 +# Vulkan SC loader and compiler +install -p -m 0644 -D nvidia_icd_vksc.json %{buildroot}%{_datadir}/vulkansc/icd.d/nvidia_icd.%{_target_cpu}.json +sed -i -e 's|libnvidia-vksc-core|%{_libdir}/libnvidia-vksc-core|g' %{buildroot}%{_datadir}/vulkansc/icd.d/nvidia_icd.%{_target_cpu}.json +install -p -m 0755 -D nvidia-pcc %{buildroot}%{_bindir}/nvidia-pcc +%endif + +# Unique libraries +mkdir -p %{buildroot}%{_libdir}/vdpau/ +cp -a lib*GL*_nvidia.so* libcuda*.so* libnv*.so* %{buildroot}%{_libdir}/ +cp -a libvdpau_nvidia.so* %{buildroot}%{_libdir}/vdpau/ + +%if 0%{?fedora} || 0%{?rhel} >= 9 +# GBM loader +mkdir -p %{buildroot}%{_libdir}/gbm/ +ln -sf ../libnvidia-allocator.so.%{version} %{buildroot}%{_libdir}/gbm/nvidia-drm_gbm.so +%endif + +%ifarch x86_64 + +# NGX Proton/Wine library +mkdir -p %{buildroot}%{_libdir}/nvidia/wine/ +cp -a *.dll %{buildroot}%{_libdir}/nvidia/wine/ + +%endif + +%ifarch x86_64 aarch64 + +# alternate-install-present file triggers runfile warning +install -m 0755 -d %{buildroot}/usr/lib/nvidia/ +install -p -m 0644 %{SOURCE13} %{buildroot}/usr/lib/nvidia/ + +# Empty? +mkdir -p %{buildroot}%{_sysconfdir}/nvidia/ + +# OpenCL config +install -p -m 0755 -D nvidia.icd %{buildroot}%{_sysconfdir}/OpenCL/vendors/nvidia.icd + +# Binaries +mkdir -p %{buildroot}%{_bindir} +install -p -m 0755 nvidia-{debugdump,smi,cuda-mps-control,cuda-mps-server,bug-report.sh,ngx-updater,powerd} %{buildroot}%{_bindir} + +# Man pages +mkdir -p %{buildroot}%{_mandir}/man1/ +install -p -m 0644 nvidia-{smi,cuda-mps-control}*.gz %{buildroot}%{_mandir}/man1/ + +%if 0%{?fedora} || 0%{?rhel} < 10 +# X stuff +install -p -m 0644 -D %{SOURCE10} %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/10-nvidia.conf +install -p -m 0755 -D nvidia_drv.so %{buildroot}%{_libdir}/xorg/modules/drivers/nvidia_drv.so +install -p -m 0755 -D libglxserver_nvidia.so.%{version} %{buildroot}%{_libdir}/xorg/modules/extensions/libglxserver_nvidia.so +%endif + +# NVIDIA specific configuration files +mkdir -p %{buildroot}%{_datadir}/nvidia/ +install -p -m 0644 nvidia-application-profiles-%{version}-key-documentation \ + %{buildroot}%{_datadir}/nvidia/ +install -p -m 0644 nvidia-application-profiles-%{version}-rc \ + %{buildroot}%{_datadir}/nvidia/ + +# OptiX +install -p -m 0644 nvoptix.bin %{buildroot}%{_datadir}/nvidia/ + +# Systemd units and script for suspending/resuming +mkdir -p %{buildroot}%{_systemd_util_dir}/system-preset/ +install -p -m 0644 %{SOURCE8} %{SOURCE9} %{buildroot}%{_systemd_util_dir}/system-preset/ +mkdir -p %{buildroot}%{_unitdir}/ +install -p -m 0644 systemd/system/*.service %{buildroot}%{_unitdir}/ +install -p -m 0755 systemd/nvidia-sleep.sh %{buildroot}%{_bindir}/ +install -p -m 0755 -D systemd/system-sleep/nvidia %{buildroot}%{_systemd_util_dir}/system-sleep/nvidia +install -p -m 0644 -D nvidia-dbus.conf %{buildroot}%{_datadir}/dbus-1/system.d/nvidia-dbus.conf + +# Ignore powerd binary exiting if hardware is not present +# We should check for information in the DMI table +sed -i -e 's/ExecStart=/ExecStart=-/g' %{buildroot}%{_unitdir}/nvidia-powerd.service + +# Vulkan layer +install -p -m 0644 -D nvidia_layers.json %{buildroot}%{_datadir}/vulkan/implicit_layer.d/nvidia_layers.json + +# Install AppData and add modalias provides, do not use appstream-util add-provide as it mangles the xml +install -p -m 0644 -D %{SOURCE40} %{buildroot}%{_metainfodir}/com.nvidia.driver.metainfo.xml +%{SOURCE41} supported-gpus/supported-gpus.json %{buildroot}%{_metainfodir}/com.nvidia.driver.metainfo.xml +mkdir -p %{buildroot}%{_datadir}/pixmaps/ +cp %{SOURCE42} %{buildroot}%{_datadir}/pixmaps/ + +# nvsandboxutils configuration +install -p -m 0644 -D sandboxutils-filelist.json %{buildroot}%{_datadir}/nvidia/files.d/sandboxutils-filelist.json + +# dnf needs-restarting plugin +# dnf4 only for the moment: https://github.com/rpm-software-management/dnf5/issues/1815 +%if 0%{?fedora} < 42 || 0%{?rhel} +mkdir -p %{buildroot}%{_sysconfdir}/dnf/plugins/needs-restarting.d +echo %{real_name} > %{buildroot}%{_sysconfdir}/dnf/plugins/needs-restarting.d/%{real_name}.conf +echo %{real_name}-cuda > %{buildroot}%{_sysconfdir}/dnf/plugins/needs-restarting.d/%{real_name}-cuda.conf +%endif + +%check +# Using appstreamcli: appstreamcli validate --strict +# Icon type local is not supported by appstreamcli for drivers +appstream-util validate --nonet %{buildroot}%{_metainfodir}/com.nvidia.driver.metainfo.xml + +%endif + +%ifarch x86_64 aarch64 + +%post +%systemd_post nvidia-hibernate.service +%systemd_post nvidia-powerd.service +%systemd_post nvidia-resume.service +%systemd_post nvidia-suspend.service +%systemd_post nvidia-suspend-then-hibernate.service + +%preun +%systemd_preun nvidia-hibernate.service +%systemd_preun nvidia-powerd.service +%systemd_preun nvidia-resume.service +%systemd_preun nvidia-suspend.service +%systemd_preun nvidia-suspend-then-hibernate.service + +%postun +%systemd_postun nvidia-hibernate.service +%systemd_postun nvidia-powerd.service +%systemd_postun nvidia-resume.service +%systemd_postun nvidia-suspend.service +%systemd_postun nvidia-suspend-then-hibernate.service + +%endif + +%ifarch x86_64 aarch64 + +%files +%license LICENSE +%doc NVIDIA_Changelog README.txt html supported-gpus/supported-gpus.json +%dir %{_sysconfdir}/nvidia +%{_bindir}/nvidia-bug-report.sh +%{_bindir}/nvidia-ngx-updater +%ifarch x86_64 +%{_bindir}/nvidia-pcc +%endif +%{_bindir}/nvidia-powerd +%{_bindir}/nvidia-sleep.sh +%{_metainfodir}/com.nvidia.driver.metainfo.xml +%{_datadir}/dbus-1/system.d/nvidia-dbus.conf +%{_datadir}/nvidia/nvidia-application-profiles* +%{_datadir}/pixmaps/com.nvidia.driver.png +%{_systemd_util_dir}/system-preset/70-%{real_name}.preset +%{_systemd_util_dir}/system-sleep/nvidia +%{_unitdir}/nvidia-hibernate.service +%{_unitdir}/nvidia-powerd.service +%{_unitdir}/nvidia-resume.service +%{_unitdir}/nvidia-suspend.service +%{_unitdir}/nvidia-suspend-then-hibernate.service +%if 0%{?fedora} < 42 || 0%{?rhel} +%{_sysconfdir}/dnf/plugins/needs-restarting.d/%{real_name}.conf +%endif + +%if 0%{?fedora} || 0%{?rhel} < 10 +%files -n xorg-x11-nvidia-580 +%config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/10-nvidia.conf +%{_libdir}/xorg/modules/extensions/libglxserver_nvidia.so +%{_libdir}/xorg/modules/drivers/nvidia_drv.so +%endif + +%files -n libnvidia-cfg-580 +%{_libdir}/libnvidia-cfg.so.1 +%{_libdir}/libnvidia-cfg.so.%{version} + +%files cuda +%{_sysconfdir}/OpenCL/vendors/* +%{_bindir}/nvidia-cuda-mps-control +%{_bindir}/nvidia-cuda-mps-server +%{_bindir}/nvidia-debugdump +%{_bindir}/nvidia-smi +%{_datadir}/nvidia/files.d/sandboxutils-filelist.json +%{_mandir}/man1/nvidia-cuda-mps-control.1.* +%{_mandir}/man1/nvidia-smi.* +%{_prefix}/lib/nvidia/alternate-install-present +%{_systemd_util_dir}/system-preset/70-%{real_name}-cuda.preset +%if 0%{?fedora} < 42 || 0%{?rhel} +%{_sysconfdir}/dnf/plugins/needs-restarting.d/%{real_name}-cuda.conf +%endif + +%endif + +%files libs +%{_datadir}/glvnd/egl_vendor.d/10_nvidia.json +%{_datadir}/vulkan/icd.d/nvidia_icd.%{_target_cpu}.json +%if 0%{?fedora} || 0%{?rhel} >= 9 +%dir %{_libdir}/gbm +%{_libdir}/gbm/nvidia-drm_gbm.so +%endif +%{_libdir}/libEGL_nvidia.so.0 +%{_libdir}/libEGL_nvidia.so.%{version} +%{_libdir}/libGLESv1_CM_nvidia.so.1 +%{_libdir}/libGLESv1_CM_nvidia.so.%{version} +%{_libdir}/libGLESv2_nvidia.so.2 +%{_libdir}/libGLESv2_nvidia.so.%{version} +%{_libdir}/libGLX_nvidia.so.0 +%{_libdir}/libGLX_nvidia.so.%{version} +%{_libdir}/libnvidia-allocator.so.1 +%{_libdir}/libnvidia-allocator.so.%{version} +%{_libdir}/libnvidia-eglcore.so.%{version} +%{_libdir}/libnvidia-glcore.so.%{version} +%{_libdir}/libnvidia-glsi.so.%{version} +%{_libdir}/libnvidia-glvkspirv.so.%{version} +%{_libdir}/libnvidia-gpucomp.so.%{version} +%{_libdir}/libnvidia-tls.so.%{version} +%{_libdir}/vdpau/libvdpau_nvidia.so.1 +%{_libdir}/vdpau/libvdpau_nvidia.so.%{version} +%ifarch x86_64 aarch64 +%{_datadir}/nvidia/nvoptix.bin +%{_datadir}/vulkan/implicit_layer.d/nvidia_layers.json +%{_libdir}/libnvidia-api.so.1 +%{_libdir}/libnvidia-ngx.so.1 +%{_libdir}/libnvidia-ngx.so.%{version} +%{_libdir}/libnvidia-rtcore.so.%{version} +%{_libdir}/libnvoptix.so.1 +%{_libdir}/libnvoptix.so.%{version} +%endif +%ifarch x86_64 +%{_datadir}/vulkansc/icd.d/nvidia_icd.%{_target_cpu}.json +%if v"%{version}" > v"570.144" +%{_libdir}/libnvidia-present.so.%{version} +%endif +%{_libdir}/libnvidia-vksc-core.so.1 +%{_libdir}/libnvidia-vksc-core.so.%{version} +%dir %{_libdir}/nvidia +%dir %{_libdir}/nvidia/wine +%{_libdir}/nvidia/wine/*.dll +%endif + +%files cuda-libs +%{_libdir}/libcuda.so +%{_libdir}/libcuda.so.1 +%{_libdir}/libcuda.so.%{version} +%{_libdir}/libnvcuvid.so +%{_libdir}/libnvcuvid.so.1 +%{_libdir}/libnvcuvid.so.%{version} +%{_libdir}/libnvidia-encode.so +%{_libdir}/libnvidia-encode.so.1 +%{_libdir}/libnvidia-encode.so.%{version} +%{_libdir}/libnvidia-nvvm.so.4 +%{_libdir}/libnvidia-nvvm.so.%{version} +%{_libdir}/libnvidia-opencl.so.1 +%{_libdir}/libnvidia-opencl.so.%{version} +%{_libdir}/libnvidia-opticalflow.so.1 +%{_libdir}/libnvidia-opticalflow.so.%{version} +%{_libdir}/libnvidia-ptxjitcompiler.so.1 +%{_libdir}/libnvidia-ptxjitcompiler.so.%{version} +%ifarch x86_64 aarch64 +%{_libdir}/libcudadebugger.so.1 +%{_libdir}/libcudadebugger.so.%{version} +%if v"%{version}" > v"570.144" +%{_libdir}/libnvidia-nvvm70.so.4 +%endif +%{_libdir}/libnvidia-sandboxutils.so.1 +%{_libdir}/libnvidia-sandboxutils.so.%{version} +%endif +%ifarch x86_64 +%if 0%{?rhel} == 8 +%{_libdir}/libnvidia-pkcs11.so.%{version} +%else +%{_libdir}/libnvidia-pkcs11-openssl3.so.%{version} +%endif +%endif + +%files -n libnvidia-fbc-580 +%{_libdir}/libnvidia-fbc.so.1 +%{_libdir}/libnvidia-fbc.so.%{version} + +%files -n libnvidia-gpucomp-580 +%{_libdir}/libnvidia-gpucomp.so.%{version} + +%files -n libnvidia-ml-580 +%{_libdir}/libnvidia-ml.so.1 +%{_libdir}/libnvidia-ml.so.%{version} + +%changelog +%autochangelog diff --git a/anda/system/nvidia-580/nvidia-driver/nvidia-generate-tarballs.sh b/anda/system/nvidia-580/nvidia-driver/nvidia-generate-tarballs.sh new file mode 100755 index 0000000000..37a41b0bc3 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/nvidia-generate-tarballs.sh @@ -0,0 +1,117 @@ +#!/bin/sh +# Slightly modified from negativo's tarball generator script + +# instead of generating tarballs, we just make this script export +# the functions + +CONTEXT=$(realpath $(dirname $0)) +set -e + +set_vars() { + export VERSION=${VERSION:?"VERSION not set"} + export DL_SITE=${DL_SITE:-http://download.nvidia.com/XFree86} + export TEMP_UNPACK=${ARCH} + export PLATFORM=Linux-${ARCH} + export RUN_FILE=NVIDIA-${PLATFORM}-${VERSION}.run +} + +run_file_get() { + printf "Downloading installer ${RUN_FILE}... " + [[ -f $RUN_FILE ]] || wget -c -q ${DL_SITE}/${PLATFORM}/${VERSION}/$RUN_FILE + printf "OK\n" +} + +run_file_extract() { + rm -fr ${TEMP_UNPACK} + sh ${RUN_FILE} --extract-only --target ${TEMP_UNPACK} +} + +cleanup_folder() { + + printf "Cleaning up binaries... " + + cd ${TEMP_UNPACK} + + # Stuff not needed for packages: + # - Compiled from source + # - Interactive installer files + # - GLVND GL libraries + # - Internal development only libraries + rm -fr \ + nvidia-xconfig* \ + nvidia-persistenced* \ + nvidia-modprobe* \ + libnvidia-gtk* libnvidia-wayland-client* nvidia-settings* \ + libGLESv1_CM.so.* libGLESv2.so.* libGLdispatch.so.* libOpenGL.so.* libGLX.so.* libGL.so.1* libEGL.so.1* \ + libnvidia-egl-wayland.so.* libnvidia-egl-gbm.so.* libnvidia-egl-xcb.so.* libnvidia-egl-xlib.so.* \ + libOpenCL.so.1* \ + libEGL.so.${VERSION} \ + nvidia-installer* .manifest make* mk* tls_test* libglvnd_install_checker + + if [ "${ARCH}" == x86_64 ]; then + rm -fr \ + 32/libGLESv1_CM.so.* 32/libGLESv2.so.* 32/libGLdispatch.so.* 32/libOpenGL.so.* 32/libGLX.so.* 32/libGL.so.1* 32/libEGL.so.1* \ + 32/libOpenCL.so.1* \ + 32/libGL.so.${VERSION} 32/libEGL.so.${VERSION} \ + 32/libnvidia-egl-wayland.so.* 32/libnvidia-egl-gbm.so.* 32/libnvidia-egl-xcb.so.* 32/libnvidia-egl-xlib.so.* + + cp -f *.json* 32/ + fi + + cd .. + + printf "OK\n" +} + +create_tarball() { + + KMOD=nvidia-kmod-${VERSION}-${ARCH} + KMOD_COMMON=nvidia-kmod-common-${VERSION} + USR_64=nvidia-driver-${VERSION}-${ARCH} + + mkdir ${KMOD} ${KMOD_COMMON} ${USR_64} + mv ${TEMP_UNPACK}/kernel* ${KMOD}/ + mv ${TEMP_UNPACK}/firmware ${KMOD_COMMON}/ + + if [ "$ARCH" == x86_64 ]; then + + USR_32=nvidia-driver-${VERSION}-i386 + + mkdir ${USR_32} + mv ${TEMP_UNPACK}/32/* ${USR_32}/ + rm -fr ${TEMP_UNPACK}/32 + + fi + + mv ${TEMP_UNPACK}/* ${USR_64}/ + + rm -fr ${TEMP_UNPACK} + + for tarball in ${KMOD} ${KMOD_COMMON} ${USR_64} ${USR_32}; do + + printf "Creating tarball $tarball... " + + # XZ_OPT='-T0' tar --remove-files -cJf $tarball.tar.xz $tarball + + printf "OK\n" + + done +} + +# pushd $CONTEXT + +# ARCH=aarch64 +# set_vars +# run_file_get +# run_file_extract +# cleanup_folder +# create_tarball + +# ARCH=x86_64 +# set_vars +# run_file_get +# run_file_extract +# cleanup_folder +# create_tarball + +# popd \ No newline at end of file diff --git a/anda/system/nvidia-580/nvidia-driver/parse-supported-gpus.py b/anda/system/nvidia-580/nvidia-driver/parse-supported-gpus.py new file mode 100755 index 0000000000..cb2feef6c3 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/parse-supported-gpus.py @@ -0,0 +1,43 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +# +# Copyright (C) 2021-2024 Simone Caronni +# Licensed under the GNU General Public License Version or later + +import json +import sys +import xml.etree.ElementTree as ElementTree + +def main(): + if len(sys.argv) != 3: + print("usage: %s supported-gpus.json com.nvidia.driver.metainfo.xml" % sys.argv[0]) + return 1 + + json_input = open(sys.argv[1]) + gpus_raw = json.load(json_input) + legacy = 'legacybranch' + devids = [] + + for product in gpus_raw["chips"]: + + if legacy not in product.keys(): + + devid = int(product["devid"], 16) + if not devid in devids: + devids.append(devid) + + appstream_xml = ElementTree.parse(sys.argv[2]) + root = appstream_xml.getroot() + provides = ElementTree.Element('provides') + root.append(provides) + + for devid in devids: + modalias = ElementTree.SubElement(provides, "modalias") + modalias.text = "pci:v000010DEd%08Xsv*sd*bc*sc*i*" % (devid) + + ElementTree.indent(root, space=" ", level=0) + # appstream-util validate requires the xml header + appstream_xml.write(sys.argv[2], encoding="utf-8", xml_declaration=True) + +if __name__ == "__main__": + main() diff --git a/anda/system/nvidia-580/nvidia-driver/pre.sh b/anda/system/nvidia-580/nvidia-driver/pre.sh new file mode 100755 index 0000000000..24f660da43 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/pre.sh @@ -0,0 +1,9 @@ +#!/bin/bash -x + +# We are going to assume we already have andax installed + +export VERSION=$(anda run andax/nvidia_driver_print.rhai) + +SCRIPT_DIR=$(realpath $(dirname $0)) + +$SCRIPT_DIR/nvidia-generate-tarballs.sh \ No newline at end of file diff --git a/anda/system/nvidia-580/nvidia-driver/update.rhai b/anda/system/nvidia-580/nvidia-driver/update.rhai new file mode 100644 index 0000000000..d1ef2924fb --- /dev/null +++ b/anda/system/nvidia-580/nvidia-driver/update.rhai @@ -0,0 +1,3 @@ +import "andax/nvidia.rhai" as nvidia; + +rpm.version(nvidia::nvidia_legacy_version()); diff --git a/anda/system/nvidia-580/nvidia-kmod-common/10-nvidia-fallback.rules b/anda/system/nvidia-580/nvidia-kmod-common/10-nvidia-fallback.rules new file mode 100644 index 0000000000..5ead9f6780 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod-common/10-nvidia-fallback.rules @@ -0,0 +1,2 @@ +SUBSYSTEM=="pci", ATTRS{vendor}=="0x12d2", ATTRS{class}=="0x030000", TAG+="systemd", ENV{SYSTEMD_WANTS}="nvidia-fallback.service" +SUBSYSTEM=="pci", ATTRS{vendor}=="0x10de", ATTRS{class}=="0x030[02]00", TAG+="systemd", ENV{SYSTEMD_WANTS}="nvidia-fallback.service" diff --git a/anda/system/nvidia-580/nvidia-kmod-common/60-nvidia.rules b/anda/system/nvidia-580/nvidia-kmod-common/60-nvidia.rules new file mode 100644 index 0000000000..40e532f346 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod-common/60-nvidia.rules @@ -0,0 +1,13 @@ +# Device nodes are created by nvidia-modprobe, which is called by the nvidia DDX. +# In case the DDX is not started, the device nodes are never created, so call +# nvidia-modprobe in the udev rules to cover the Wayland/EGLStream and compute +# case without a started display. +ACTION=="add|bind", KERNEL=="nvidia", RUN+="/usr/bin/nvidia-modprobe" + +# Enable runtime PM for NVIDIA VGA/3D controller devices on driver bind +ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="auto" +ACTION=="bind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="auto" + +# Disable runtime PM for NVIDIA VGA/3D controller devices on driver unbind +ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030000", TEST=="power/control", ATTR{power/control}="on" +ACTION=="unbind", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x030200", TEST=="power/control", ATTR{power/control}="on" diff --git a/anda/system/nvidia-580/nvidia-kmod-common/99-nvidia.conf b/anda/system/nvidia-580/nvidia-kmod-common/99-nvidia.conf new file mode 100644 index 0000000000..ddff6a6500 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod-common/99-nvidia.conf @@ -0,0 +1,3 @@ +# Omit the nvidia driver from the ramdisk, to avoid needing to regenerate +# the ramdisk on updates. +omit_drivers+=" nvidia nvidia_drm nvidia_modeset nvidia_peermem nvidia_uvm " diff --git a/anda/system/nvidia-580/nvidia-kmod-common/anda.hcl b/anda/system/nvidia-580/nvidia-kmod-common/anda.hcl new file mode 100644 index 0000000000..57de07767d --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod-common/anda.hcl @@ -0,0 +1,10 @@ +project "pkg" { + rpm { + spec = "nvidia-580-kmod-common.spec" + } + arches = ["x86_64"] + labels = { + subrepo = "nvidia" + weekly = 4 + } +} diff --git a/anda/system/nvidia-580/nvidia-kmod-common/nvidia-580-kmod-common.spec b/anda/system/nvidia-580/nvidia-kmod-common/nvidia-580-kmod-common.spec new file mode 100644 index 0000000000..8dc4e72170 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod-common/nvidia-580-kmod-common.spec @@ -0,0 +1,96 @@ +%global _dracut_conf_d %{_prefix}/lib/dracut/dracut.conf.d + +# gsp_*.bin: ELF 64-bit LSB executable, UCB RISC-V +%global _binaries_in_noarch_packages_terminate_build 0 +%global __brp_strip %{nil} + +Name: nvidia-580-kmod-common +Version: 580.119.02 +Release: 1%?dist +Summary: Common file for NVIDIA's proprietary driver kernel modules +Epoch: 3 +License: NVIDIA License +URL: http://www.nvidia.com/object/unix.html + +BuildArch: noarch + +Source0: http://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run +Source17: nvidia-boot-update +Source18: nvidia-modeset.conf +Source19: nvidia.conf +Source20: 60-nvidia.rules +Source21: 99-nvidia.conf + +# UDev rule location (_udevrulesdir) and systemd macros: +BuildRequires: systemd-rpm-macros + +Requires: dracut +Requires: nvidia-modprobe-580 +Requires: nvidia-driver-580 = %{?epoch:%{epoch}:}%{version} +Requires: nvidia-driver-580-libs = %{?epoch:%{epoch}:}%{version} +Requires: nvidia-580-kmod = %{?epoch:%{epoch}:}%{version} +Provides: nvidia-580-kmod-common = %{?epoch:%{epoch}:}%{version} +Obsoletes: cuda-nvidia-kmod-common < %{?epoch:%{epoch}:}%{version} + +%description +This package provides the common files required by all NVIDIA kernel module +package variants. + +%prep +sh %{SOURCE0} -x --target nvidia-kmod-%{version}-x86_64 +%setup -T -D -n nvidia-kmod-%{version}-x86_64 + +%install +# Script for post/preun tasks +install -p -m 0755 -D %{SOURCE17} %{buildroot}%{_bindir}/nvidia-boot-update + +# Nvidia modesetting support: +install -p -m 0644 -D %{SOURCE18} %{buildroot}%{_sysconfdir}/modprobe.d/nvidia-modeset.conf + +# Load nvidia-uvm, enable complete power management: +install -p -m 0644 -D %{SOURCE19} %{buildroot}%{_modprobedir}/nvidia.conf + +# Avoid Nvidia modules getting in the initrd: +install -p -m 0644 -D %{SOURCE21} %{buildroot}%{_dracut_conf_d}/99-nvidia.conf + +# UDev rules +# https://github.com/NVIDIA/nvidia-modprobe/blob/master/modprobe-utils/nvidia-modprobe-utils.h#L33-L46 +# https://github.com/negativo17/nvidia-kmod-common/issues/11 +# https://github.com/negativo17/nvidia-driver/issues/27 +install -p -m 644 -D %{SOURCE20} %{buildroot}%{_udevrulesdir}/60-nvidia.rules + +# Firmware files: +mkdir -p %{buildroot}%{_prefix}/lib/firmware/nvidia/%{version}/ +install -p -m 644 firmware/* %{buildroot}%{_prefix}/lib/firmware/nvidia/%{version} + +# Fallback service. Fall back to Nouveau if NVIDIA drivers fail. +# This is actually from RPM Fusion. +%dnl install -Dm644 %{SOURCE22} -t %{buildroot}%{_unitdir} +%dnl install -Dm644 %{SOURCE23} -t %{buildroot}%{_udevrulesdir} + +%post +%{_bindir}/nvidia-boot-update post || : + +%pre +# Remove the kernel command line adjustments one last time when doing an upgrade +# from a version that was still setting up the command line parameters: +if [ "$1" -eq "2" ] && [ -x %{_bindir}/nvidia-boot-update ]; then + %{_bindir}/nvidia-boot-update preun || : + +fi ||: + +%triggerin -- nvidia-kmod,nvidia-open-kmod +dracut --regenerate-all --force || : + +%files +%{_dracut_conf_d}/99-nvidia.conf +%{_modprobedir}/nvidia.conf +%dir %{_prefix}/lib/firmware +%dir %{_prefix}/lib/firmware/nvidia +%{_prefix}/lib/firmware/nvidia/%{version} +%{_bindir}/nvidia-boot-update +%config(noreplace) %{_sysconfdir}/modprobe.d/nvidia-modeset.conf +%{_udevrulesdir}/60-nvidia.rules + +%changelog +%autochangelog diff --git a/anda/system/nvidia-580/nvidia-kmod-common/nvidia-boot-update b/anda/system/nvidia-580/nvidia-kmod-common/nvidia-boot-update new file mode 100755 index 0000000000..83c13dd144 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod-common/nvidia-boot-update @@ -0,0 +1,209 @@ +#!/usr/bin/sh + + +# EL8 (grub2 with BootLoaderSpec patches) +# +# kernel options: grub.cfg + grubenv +# kernel options in /boot/loader/entries/*.conf use kernelopts from /boot/grub2/grubenv +# grubby +# - updates kernelopts in /boot/grub2/grubenv +# - does not update /etc/default/grub +# - does not update kernelopts in grub.cfg +# grub.cfg: +# - UEFI: /etc/grub2-efi.cfg -> /boot/efi/EFI//grub.cfg +# - BIOS: /etc/grub2.cfg -> /boot/grub2/grub.cfg + + +# EL9 + EL10 (grub2 with BootLoaderSpec patches) +# +# kernel options: grub.cfg + /etc/kernel/cmdline + /boot/loader/entries/*.conf +# manually update: /etc/default/grub + /etc/kernel/cmdline +# /etc/kernel/cmdline is not really used +# grub2-mkconfig does not update /boot/loader/entries/*.conf +# grub.cfg: +# - UEFI: /etc/grub2-efi.cfg -> /boot/efi/EFI//grub.cfg +# - BIOS: /etc/grub2.cfg -> /boot/grub2/grub.cfg + + +# Fedora (grub2 with BootLoaderSpec patches) +# +# kernel options: grub.cfg + /etc/kernel/cmdline + /boot/loader/entries/*.conf +# manually update: /etc/default/grub +# grub2-mkconfig: +# - updates /boot/loader/entries/*.conf +# - updates /etc/kernel/cmdline +# grub.cfg: +# - UEFI/BIOS: /boot/grub2/grub.cfg + + +# Fedora (systemd-boot) +# +# kernel options: grub.cfg + /boot/efi/loader/entries/*.conf (UEFI only) +# grubby as an updateloaderentries alias: +# - updates all entries in /boot/efi/loader/entries/*.conf +# - does not work with multiple parameters at once +# - does not update /etc/kernel/cmdline + + +# Complete use case coverage, regardless of boot loaders: +# +# - update options in /etc/default/grub +# - regenerate grub.cfg/grubenv +# - update options in /boot/{efi/}loader/entries/*.conf entries +# - update options in /etc/kernel/cmdline +# - cover both UEFI and BIOS case + +CMDLINE_ARGS_NVIDIA="rd.driver.blacklist=nouveau rd.driver.blacklist=nova-core" +CMDLINE_ARGS_ALWAYS_REMOVE="nomodeset gfxpayload=vga=normal nouveau.modeset=0 nvidia-drm.modeset=1 nvidia-drm.fbdev=1 modprobe.blacklist=nouveau initcall_blacklist=simpledrm_platform_driver_init" + +print_usage() { +cat <> /etc/default/grub + else + for param in $CMDLINE_ARGS_NVIDIA; do + echo ${GRUB_CMDLINE_LINUX} | grep -q $param + [ $? -eq 1 ] && GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX} ${param}" + done + for param in $CMDLINE_ARGS_ALWAYS_REMOVE; do + echo ${GRUB_CMDLINE_LINUX} | grep -q $param + [ $? -eq 0 ] && GRUB_CMDLINE_LINUX="$(echo ${GRUB_CMDLINE_LINUX} | sed -e "s/ $param//g")" + done + sed -i -e "s|^GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX=\"${GRUB_CMDLINE_LINUX}\"|g" /etc/default/grub + fi + + grub2-mkconfig -o $GRUB_CFG &>/dev/null + + fi + + # Edit BootLoaderSpec entries + if [ -v BLS_ENTRIES ]; then + + for config_file in $BLS_ENTRIES/*.conf; do + for param in $CMDLINE_ARGS_NVIDIA; do + grep -q $param $config_file + [ $? -eq 1 ] && sed -i -e "s|^options.*|& $param|" $config_file + done + for param in $CMDLINE_ARGS_ALWAYS_REMOVE; do + grep -q $param $config_file + [ $? -eq 0 ] && sed -i -e "s| $param||" $config_file + done + done + + fi + + # Edit /etc/kernel/cmdline + if [ -f /etc/kernel/cmdline ]; then + for param in $CMDLINE_ARGS_NVIDIA; do + grep -q $param /etc/kernel/cmdline + [ $? -eq 1 ] && sed -i -e "s|^.*|& $param|" /etc/kernel/cmdline + done + for param in $CMDLINE_ARGS_ALWAYS_REMOVE; do + grep -q $param /etc/kernel/cmdline + [ $? -eq 0 ] && sed -i -e "s| $param||" /etc/kernel/cmdline + done + fi +} + +preun() { + + # Edit GRUB configuration file + if [ -v GRUB_CFG ]; then + + for param in $CMDLINE_ARGS_NVIDIA; do + echo ${GRUB_CMDLINE_LINUX} | grep -q $param + [ $? -eq 0 ] && GRUB_CMDLINE_LINUX="$(echo ${GRUB_CMDLINE_LINUX} | sed -e "s/ $param//g")" + done + sed -i -e "s|^GRUB_CMDLINE_LINUX=.*|GRUB_CMDLINE_LINUX=\"${GRUB_CMDLINE_LINUX}\"|g" /etc/default/grub + + grub2-mkconfig -o $GRUB_CFG &>/dev/null + + fi + + # Edit BootLoaderSpec entries + if [ -v BLS_ENTRIES ]; then + + for config_file in $BLS_ENTRIES/*.conf; do + for param in $CMDLINE_ARGS_NVIDIA; do + grep -q $param $config_file + [ $? -eq 0 ] && sed -i -e "s| $param||" $config_file + done + done + + fi + + # Edit /etc/kernel/cmdline + if [ -f /etc/kernel/cmdline ]; then + for param in $CMDLINE_ARGS_NVIDIA; do + grep -q $param /etc/kernel/cmdline + [ $? -eq 0 ] && sed -i -e "s| $param||" /etc/kernel/cmdline + done + fi +} + +case "$1" in + post) + check + post + exit 0 + ;; + preun) + check + preun + exit 0 + ;; + *) + print_usage + exit 0 + ;; +esac diff --git a/anda/system/nvidia-580/nvidia-kmod-common/nvidia-fallback.service b/anda/system/nvidia-580/nvidia-kmod-common/nvidia-fallback.service new file mode 100644 index 0000000000..8e08e806f0 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod-common/nvidia-fallback.service @@ -0,0 +1,17 @@ +[Unit] +Description=Fallback to nouveau as nvidia did not load +After=akmods.service +Before=display-manager.service +ConditionKernelCommandLine=rd.driver.blacklist=nouveau +ConditionPathExists=!/sys/module/nvidia + + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=-/sbin/modprobe nouveau +ExecStartPost=-/bin/plymouth message --text="NVIDIA kernel module missing. Falling back to Nouveau." + + +[Install] +WantedBy=graphical.target diff --git a/anda/system/nvidia-580/nvidia-kmod-common/nvidia-modeset.conf b/anda/system/nvidia-580/nvidia-kmod-common/nvidia-modeset.conf new file mode 100644 index 0000000000..9ac5dcd4b6 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod-common/nvidia-modeset.conf @@ -0,0 +1,4 @@ +# Nvidia modesetting support. Set to 0 or comment to disable kernel modesetting +# support. This must be disabled in case of SLI Mosaic. + +options nvidia-drm modeset=1 diff --git a/anda/system/nvidia-580/nvidia-kmod-common/nvidia.conf b/anda/system/nvidia-580/nvidia-kmod-common/nvidia.conf new file mode 100644 index 0000000000..04dcf5bd0b --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod-common/nvidia.conf @@ -0,0 +1,25 @@ +# Nouvea/Nova must be blacklisted here as well beside from the initrd to avoid a +# delayed loading (for example on Optimus laptops where the Nvidia card is not +# driving the main display). + +blacklist nouveau +blacklist nova-core + +# Add soft dependencies for extra modules as adding the module loading to +# /usr/lib/modules-load.d/*.conf for systemd consumption, makes the +# configuration file to be added to the initrd but not the module, throwing an +# error on plymouth about not being able to find the module. +# Ref: /usr/lib/dracut/modules.d/00systemd/module-setup.sh + +# Even adding the modules is not the correct thing, as we don't want it to be +# included in the initrd, so use this configuration file to specify the +# dependency. + +softdep nvidia post: nvidia-uvm nvidia-drm + +# Enable complete power management. From: +# file:///usr/share/doc/nvidia-driver/html/powermanagement.html + +options nvidia NVreg_TemporaryFilePath=/var/tmp +options nvidia NVreg_EnableS0ixPowerManagement=1 +options nvidia NVreg_PreserveVideoMemoryAllocations=1 diff --git a/anda/system/nvidia-580/nvidia-kmod-common/update.rhai b/anda/system/nvidia-580/nvidia-kmod-common/update.rhai new file mode 100644 index 0000000000..d1ef2924fb --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod-common/update.rhai @@ -0,0 +1,3 @@ +import "andax/nvidia.rhai" as nvidia; + +rpm.version(nvidia::nvidia_legacy_version()); diff --git a/anda/system/nvidia/nvidia-kmod/open/anda.hcl b/anda/system/nvidia-580/nvidia-kmod/anda.hcl similarity index 75% rename from anda/system/nvidia/nvidia-kmod/open/anda.hcl rename to anda/system/nvidia-580/nvidia-kmod/anda.hcl index 8b9559c1ff..d7f5dc58e2 100644 --- a/anda/system/nvidia/nvidia-kmod/open/anda.hcl +++ b/anda/system/nvidia-580/nvidia-kmod/anda.hcl @@ -1,6 +1,6 @@ project "pkg" { rpm { - spec = "nvidia-open-kmod.spec" + spec = "nvidia-580-kmod.spec" } labels { mock = 1 diff --git a/anda/system/nvidia/nvidia-kmod/open/nvidia-open-kmod.spec b/anda/system/nvidia-580/nvidia-kmod/nvidia-580-kmod.spec similarity index 66% rename from anda/system/nvidia/nvidia-kmod/open/nvidia-open-kmod.spec rename to anda/system/nvidia-580/nvidia-kmod/nvidia-580-kmod.spec index 4029c6481d..0c862ffe9c 100644 --- a/anda/system/nvidia/nvidia-kmod/open/nvidia-open-kmod.spec +++ b/anda/system/nvidia-580/nvidia-kmod/nvidia-580-kmod.spec @@ -1,9 +1,10 @@ # Build only the akmod package and no kernel module packages: %define buildforkernels akmod +%global real_name nvidia-kmod %global debug_package %{nil} -Name: nvidia-open-kmod +Name: nvidia-580-kmod Version: 580.105.08 Release: 1%?dist Summary: NVIDIA display driver kernel module @@ -13,7 +14,7 @@ URL: http://www.nvidia.com/object/unix.html ExclusiveArch: x86_64 aarch64 Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run -Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version} +Requires: nvidia-580-kmod-common = %{?epoch:%{epoch}:}%{version} Requires: akmods @@ -21,7 +22,7 @@ Requires: akmods BuildRequires: kmodtool # kmodtool does its magic here: -%{expand:%(kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } +%{expand:%(kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{real_name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } %description The NVidia %{version} display driver kernel module for kernel %{kversion}. @@ -30,33 +31,30 @@ The NVidia %{version} display driver kernel module for kernel %{kversion}. # Error out if there was something wrong with kmodtool: %{?kmodtool_check} # Print kmodtool output for debugging purposes: -kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null +kmodtool --target %{_target_cpu} --repo terra.fyralabs.com --kmodname %{real_name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null -sh %{SOURCE0} -x --target nvidia-kmod-%{version}-%{_arch} -%setup -T -D -n nvidia-kmod-%{version}-%{_arch} +sh %{SOURCE0} -x --target %{real_name}-%{version}-%{_arch} +%setup -T -D -n %{real_name}-%{version}-%{_arch} %autopatch -p1 rm -f */dkms.conf for kernel_version in %{?kernel_versions}; do mkdir _kmod_build_${kernel_version%%___*} - cp -fr kernel* _kmod_build_${kernel_version%%___*} + cp -fr Kbuild Makefile common conftest.sh *.mk nvidia* _kmod_build_${kernel_version%%___*}/ done %build -export MODULE_VARIANT=kernel-open for kernel_version in %{?kernel_versions}; do pushd _kmod_build_${kernel_version%%___*}/ - make %{?_smp_mflags} -C ${MODULE_VARIANT} \ - KERNEL_UNAME="${kernel_version%%___*}" modules + make %{?_smp_mflags} KERNEL_UNAME="${kernel_version%%___*}" modules popd done %install -export MODULE_VARIANT=kernel-open for kernel_version in %{?kernel_versions}; do mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ - install -p -m 0755 _kmod_build_${kernel_version%%___*}/${MODULE_VARIANT}/*.ko \ + install -p -m 0755 _kmod_build_${kernel_version%%___*}/*.ko \ %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ done %{?akmod_install} diff --git a/anda/system/nvidia-580/nvidia-kmod/update.rhai b/anda/system/nvidia-580/nvidia-kmod/update.rhai new file mode 100644 index 0000000000..ea0b60bd3d --- /dev/null +++ b/anda/system/nvidia-580/nvidia-kmod/update.rhai @@ -0,0 +1,3 @@ +import "andax/bump_extras.rhai" as bump; + +rpm.version(bump::madoguchi("nvidia-580-kmod-common", labels.branch)); diff --git a/anda/system/nvidia-580/nvidia-modprobe/anda.hcl b/anda/system/nvidia-580/nvidia-modprobe/anda.hcl new file mode 100644 index 0000000000..1d778d61d8 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-modprobe/anda.hcl @@ -0,0 +1,9 @@ +project "pkg" { + rpm { + spec = "nvidia-modprobe-580.spec" + } + labels = { + subrepo = "nvidia" + weekly = 4 + } +} diff --git a/anda/system/nvidia-580/nvidia-modprobe/nvidia-modprobe-580.spec b/anda/system/nvidia-580/nvidia-modprobe/nvidia-modprobe-580.spec new file mode 100644 index 0000000000..c37a6e9e6c --- /dev/null +++ b/anda/system/nvidia-580/nvidia-modprobe/nvidia-modprobe-580.spec @@ -0,0 +1,49 @@ +%global real_name nvidia-modprobe + +Name: %{real_name}-580 +Version: 580.119.02 +Release: 1%?dist +Summary: NVIDIA kernel module loader +Epoch: 3 +License: GPLv2+ +URL: http://www.nvidia.com/object/unix.html +ExclusiveArch: x86_64 aarch64 + +Source0: https://download.nvidia.com/XFree86/%{real_name}/%{real_name}-%{version}.tar.bz2 +Patch0: %{real_name}-man-page-permissions.patch + +BuildRequires: gcc +BuildRequires: m4 + +%description +This utility is used by user-space NVIDIA driver components to make sure the +NVIDIA kernel modules are loaded and that the NVIDIA character device files are +present. + +%prep +%autosetup -p1 -n %{real_name}-%{version} +# Remove additional CFLAGS added when enabling DEBUG +sed -i '/+= -O0 -g/d' utils.mk + +%build +export CFLAGS="%{optflags}" +export LDFLAGS="%{?__global_ldflags}" +make %{?_smp_mflags} \ + DEBUG=1 \ + NV_VERBOSE=1 \ + PREFIX=%{_prefix} \ + STRIP_CMD=true + +%install +%make_install \ + NV_VERBOSE=1 \ + PREFIX=%{_prefix} \ + STRIP_CMD=true + +%files +%license COPYING +%attr(4755, root, root) %{_bindir}/%{real_name} +%{_mandir}/man1/%{real_name}.1.* + +%changelog +%autochangelog diff --git a/anda/system/nvidia-580/nvidia-modprobe/nvidia-modprobe-man-page-permissions.patch b/anda/system/nvidia-580/nvidia-modprobe/nvidia-modprobe-man-page-permissions.patch new file mode 100644 index 0000000000..96d073cda3 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-modprobe/nvidia-modprobe-man-page-permissions.patch @@ -0,0 +1,12 @@ +diff -Naur nvidia-modprobe-525.60.11.old/Makefile nvidia-modprobe-525.60.11/Makefile +--- nvidia-modprobe-525.60.11.old/Makefile 2022-11-28 20:15:22.000000000 +0100 ++++ nvidia-modprobe-525.60.11/Makefile 2022-11-30 07:56:18.751429168 +0100 +@@ -110,7 +110,7 @@ + .PHONY: MANPAGE_install + MANPAGE_install: $(MANPAGE) + $(MKDIR) $(MANDIR) +- $(INSTALL) $(INSTALL_BIN_ARGS) $< $(MANDIR)/$(notdir $<) ++ $(INSTALL) $(INSTALL_DOC_ARGS) $< $(MANDIR)/$(notdir $<) + + $(eval $(call DEBUG_INFO_RULES, $(NVIDIA_MODPROBE))) + $(NVIDIA_MODPROBE).unstripped: $(OBJS) diff --git a/anda/system/nvidia-580/nvidia-modprobe/update.rhai b/anda/system/nvidia-580/nvidia-modprobe/update.rhai new file mode 100644 index 0000000000..d1ef2924fb --- /dev/null +++ b/anda/system/nvidia-580/nvidia-modprobe/update.rhai @@ -0,0 +1,3 @@ +import "andax/nvidia.rhai" as nvidia; + +rpm.version(nvidia::nvidia_legacy_version()); diff --git a/anda/system/nvidia-580/nvidia-persistenced/anda.hcl b/anda/system/nvidia-580/nvidia-persistenced/anda.hcl new file mode 100644 index 0000000000..1ae5a90bf5 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-persistenced/anda.hcl @@ -0,0 +1,9 @@ +project "pkg" { + rpm { + spec = "nvidia-persistenced-580.spec" + } + labels = { + subrepo = "nvidia" + weekly = 4 + } +} diff --git a/anda/system/nvidia-580/nvidia-persistenced/nvidia-persistenced-580.spec b/anda/system/nvidia-580/nvidia-persistenced/nvidia-persistenced-580.spec new file mode 100644 index 0000000000..ede9d0f6fd --- /dev/null +++ b/anda/system/nvidia-580/nvidia-persistenced/nvidia-persistenced-580.spec @@ -0,0 +1,81 @@ +%global real_name nvidia-persistenced + +Name: %{real_name}-580 +Version: 580.119.02 +Release: 1%?dist +Summary: A daemon to maintain persistent software state in the NVIDIA driver +Epoch: 3 +License: GPLv2+ +URL: http://www.nvidia.com/object/unix.html +ExclusiveArch: x86_64 aarch64 + +Source0: https://download.nvidia.com/XFree86/%{real_name}/%{real_name}-%{version}.tar.bz2 +Source1: %{real_name}.service + +BuildRequires: gcc +BuildRequires: libtirpc-devel +BuildRequires: m4 + +# For Fedora systemd-rpm-macros would be enough: +BuildRequires: systemd-devel +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd +Requires: libnvidia-cfg-580%{?_isa} >= %{?epoch:%{epoch}:}%{version} + +%description +The %{real_name} utility is used to enable persistent software state in the NVIDIA +driver. When persistence mode is enabled, the daemon prevents the driver from +releasing device state when the device is not in use. This can improve the +startup time of new clients in this scenario. + +%prep +%autosetup -n %{real_name}-%{version} +# Remove additional CFLAGS added when enabling DEBUG +sed -i -e '/+= -O0 -g/d' utils.mk + +%build +export CFLAGS="%{optflags} -I%{_includedir}/tirpc" +make %{?_smp_mflags} \ + DEBUG=1 \ + LIBS="-ldl -ltirpc" \ + NV_VERBOSE=1 \ + PREFIX=%{_prefix} \ + STRIP_CMD=true + +%install +%make_install \ + NV_VERBOSE=1 \ + PREFIX=%{_prefix} \ + STRIP_CMD=true + +%if 0%{?fedora} < 42 +mv %{buildroot}%{_bindir} %{buildroot}%{_sbindir} +%endif +mkdir -p %{buildroot}%{_sharedstatedir}/%{real_name} + +# Systemd unit files +install -p -m 644 -D %{SOURCE1} %{buildroot}%{_unitdir}/%{real_name}.service + +%post +%systemd_post %{real_name}.service + +%preun +%systemd_preun %{real_name}.service + +%postun +%systemd_postun_with_restart %{real_name}.service + +%files +%license COPYING +%{_mandir}/man1/%{real_name}.1.* +%if 0%{?fedora} < 42 +%{_sbindir}/%{real_name} +%else +%{_bindir}/%{real_name} +%endif +%{_unitdir}/%{real_name}.service +%{_sharedstatedir}/%{real_name} + +%changelog +%autochangelog diff --git a/anda/system/nvidia-580/nvidia-persistenced/nvidia-persistenced.service b/anda/system/nvidia-580/nvidia-persistenced/nvidia-persistenced.service new file mode 100644 index 0000000000..0d83758660 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-persistenced/nvidia-persistenced.service @@ -0,0 +1,14 @@ +[Unit] +Description=NVIDIA Persistence Daemon +After=syslog.target + +[Service] +Type=forking +PIDFile=/var/run/nvidia-persistenced/nvidia-persistenced.pid +Restart=always +ExecStart=/usr/sbin/nvidia-persistenced --verbose +ExecStopPost=/bin/rm -rf /var/run/nvidia-persistenced/* +TimeoutSec=300 + +[Install] +WantedBy=multi-user.target diff --git a/anda/system/nvidia-580/nvidia-persistenced/update.rhai b/anda/system/nvidia-580/nvidia-persistenced/update.rhai new file mode 100644 index 0000000000..d1ef2924fb --- /dev/null +++ b/anda/system/nvidia-580/nvidia-persistenced/update.rhai @@ -0,0 +1,3 @@ +import "andax/nvidia.rhai" as nvidia; + +rpm.version(nvidia::nvidia_legacy_version()); diff --git a/anda/system/nvidia-580/nvidia-settings/anda.hcl b/anda/system/nvidia-580/nvidia-settings/anda.hcl new file mode 100644 index 0000000000..12805e9931 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-settings/anda.hcl @@ -0,0 +1,9 @@ +project "pkg" { + rpm { + spec = "nvidia-settings-580.spec" + } + labels = { + subrepo = "nvidia" + weekly = 4 + } +} diff --git a/anda/system/nvidia-580/nvidia-settings/nvidia-settings-580.spec b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-580.spec new file mode 100644 index 0000000000..d288962416 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-580.spec @@ -0,0 +1,139 @@ +%global real_name nvidia-settings + +Name: %{real_name}-580 +Version: 580.119.02 +Release: 1%?dist +Summary: Configure the NVIDIA graphics driver +Epoch: 3 +License: GPLv2+ +URL: http://www.nvidia.com/object/unix.html +ExclusiveArch: x86_64 aarch64 + +Source0: https://download.nvidia.com/XFree86/%{real_name}/%{real_name}-%{version}.tar.bz2 +Source1: %{real_name}-load.desktop +Source2: %{real_name}.appdata.xml +Patch0: %{real_name}-desktop.patch +Patch1: %{real_name}-lib-permissions.patch +Patch2: %{real_name}-link-order.patch +Patch3: %{real_name}-libXNVCtrl.patch +Patch4: %{real_name}-ld-dep-remove.patch + +BuildRequires: desktop-file-utils +BuildRequires: dbus-devel +BuildRequires: gcc +BuildRequires: jansson-devel +BuildRequires: libappstream-glib +BuildRequires: libvdpau-devel >= 1.0 +BuildRequires: libXxf86vm-devel +BuildRequires: libXext-devel +BuildRequires: libXrandr-devel +BuildRequires: libXv-devel +BuildRequires: m4 +BuildRequires: mesa-libEGL-devel +BuildRequires: mesa-libGL-devel +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(wayland-client) +BuildRequires: vulkan-headers + +Requires: nvidia-libXNVCtrl-580%{?_isa} = %{?epoch}:%{version}-%{release} +Requires: nvidia-driver-580%{?_isa} = %{?epoch}:%{version} +# Loaded at runtime +Requires: libvdpau%{?_isa} >= 0.9 + +%description +The %{real_name} utility is a tool for configuring the NVIDIA graphics +driver. It operates by communicating with the NVIDIA X driver, querying and +updating state as appropriate. + +This communication is done with the NV-CONTROL X extension. + +%package -n nvidia-libXNVCtrl-580 +Summary: Library providing the NV-CONTROL API +Obsoletes: libXNVCtrl < %{?epoch}:%{version}-%{release} +Provides: libXNVCtrl-580 = %{?epoch}:%{version}-%{release} + +%description -n nvidia-libXNVCtrl-580 +This library provides the NV-CONTROL API for communicating with the proprietary +NVidia xorg driver. It is required for proper operation of the %{real_name} utility. + +%package -n nvidia-libXNVCtrl-580-devel +Summary: Development files for libXNVCtrl +Requires: nvidia-libXNVCtrl-580 = %{?epoch}:%{version}-%{release} +Requires: libX11-devel + +%description -n nvidia-libXNVCtrl-580-devel +This devel package contains libraries and header files for +developing applications that use the NV-CONTROL API. + +%prep +%autosetup -p1 -n %{real_name}-%{version} + +# Remove bundled jansson +rm -fr src/jansson + +# Remove additional CFLAGS added when enabling DEBUG +sed -i '/+= -O0 -g/d' utils.mk src/libXNVCtrl/utils.mk + +# Change all occurrences of destinations in each utils.mk. +sed -i -e 's|$(PREFIX)/lib|$(PREFIX)/%{_lib}|g' utils.mk src/libXNVCtrl/utils.mk + +%build +export CFLAGS="%{optflags} -fPIC" +export LDFLAGS="%{?__global_ldflags}" +make \ + DEBUG=1 \ + NV_USE_BUNDLED_LIBJANSSON=0 \ + NV_VERBOSE=1 \ + PREFIX=%{_prefix} \ + XNVCTRL_LDFLAGS="-L%{_libdir}" + +%install +# Install libXNVCtrl headers +mkdir -p %{buildroot}%{_includedir}/NVCtrl +cp -af src/libXNVCtrl/*.h %{buildroot}%{_includedir}/NVCtrl/ + +# Install main program +%make_install \ + DEBUG=1 \ + NV_USE_BUNDLED_LIBJANSSON=0 \ + NV_VERBOSE=1 \ + PREFIX=%{_prefix} + +# Install desktop file +mkdir -p %{buildroot}%{_datadir}/{applications,pixmaps} +desktop-file-install --dir %{buildroot}%{_datadir}/applications/ doc/%{real_name}.desktop +cp doc/%{real_name}.png %{buildroot}%{_datadir}/pixmaps/ + +# Install autostart file to load settings at login +install -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/xdg/autostart/%{real_name}-load.desktop + +# install AppData and add modalias provides +mkdir -p %{buildroot}%{_metainfodir}/ +install -p -m 0644 %{SOURCE2} %{buildroot}%{_metainfodir}/ + +%check +desktop-file-validate %{buildroot}/%{_datadir}/applications/%{real_name}.desktop +desktop-file-validate %{buildroot}%{_sysconfdir}/xdg/autostart/%{real_name}-load.desktop +appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/%{real_name}.appdata.xml + +%files +%{_bindir}/%{real_name} +%{_metainfodir}/%{real_name}.appdata.xml +%{_datadir}/applications/%{real_name}.desktop +%{_datadir}/pixmaps/%{real_name}.png +%{_libdir}/libnvidia-gtk3.so.%{version} +%{_libdir}/libnvidia-wayland-client.so.%{version} +%{_mandir}/man1/%{real_name}.* +%{_sysconfdir}/xdg/autostart/%{real_name}-load.desktop + +%files -n nvidia-libXNVCtrl-580 +%license COPYING +%{_libdir}/libXNVCtrl.so.* + +%files -n nvidia-libXNVCtrl-580-devel +%doc doc/NV-CONTROL-API.txt doc/FRAMELOCK.txt +%{_includedir}/NVCtrl +%{_libdir}/libXNVCtrl.so + +%changelog +%autochangelog diff --git a/anda/system/nvidia-580/nvidia-settings/nvidia-settings-desktop.patch b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-desktop.patch new file mode 100644 index 0000000000..9ea63a8c5e --- /dev/null +++ b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-desktop.patch @@ -0,0 +1,18 @@ +diff -Naur nvidia-settings-530.30.02/doc/nvidia-settings.desktop nvidia-settings-530.30.02.old/doc/nvidia-settings.desktop +--- nvidia-settings-530.30.02/doc/nvidia-settings.desktop 2023-03-08 13:01:39.749406623 +0100 ++++ nvidia-settings-530.30.02.old/doc/nvidia-settings.desktop 2023-03-08 13:02:50.950572460 +0100 +@@ -1,11 +1,11 @@ + [Desktop Entry] + Type=Application +-Encoding=UTF-8 + Name=NVIDIA X Server Settings + Comment=Configure NVIDIA X Server Settings +-Exec=__UTILS_PATH__/nvidia-settings ++Exec=nvidia-settings + Icon=nvidia-settings +-Categories=__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__ ++Categories=System;Settings ++Keywords=nvidia;vulkan;opengl;driver + + # Translation by Marcin Mikołajczak + Name[pl]=Ustawienia serwera X NVIDIA diff --git a/anda/system/nvidia-580/nvidia-settings/nvidia-settings-ld-dep-remove.patch b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-ld-dep-remove.patch new file mode 100644 index 0000000000..3af69b6d21 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-ld-dep-remove.patch @@ -0,0 +1,12 @@ +Index: nvidia-settings-545.13/utils.mk +=================================================================== +--- nvidia-settings-545.13.orig/utils.mk ++++ nvidia-settings-545.13/utils.mk +@@ -584,7 +584,6 @@ define READ_ONLY_OBJECT_FROM_FILE_RULE + $(at_if_quiet)$$(MKDIR) $$(OUTPUTDIR) + $(at_if_quiet)cd $$(dir $(1)); \ + $$(call quiet_cmd_no_at,LD) -r -z noexecstack --format=binary \ +- $$(LD_TARGET_EMULATION_FLAG) \ + $$(notdir $(1)) -o $$(OUTPUTDIR_ABSOLUTE)/$$(notdir $$@) + $$(call quiet_cmd,OBJCOPY) \ + --rename-section .data=.rodata,contents,alloc,load,data,readonly \ diff --git a/anda/system/nvidia-580/nvidia-settings/nvidia-settings-lib-permissions.patch b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-lib-permissions.patch new file mode 100644 index 0000000000..6f98c875bf --- /dev/null +++ b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-lib-permissions.patch @@ -0,0 +1,24 @@ +diff -Naur nvidia-settings-525.60.11.old/src/libXNVCtrl/utils.mk nvidia-settings-525.60.11/src/libXNVCtrl/utils.mk +--- nvidia-settings-525.60.11.old/src/libXNVCtrl/utils.mk 2022-12-01 07:56:28.691047034 +0100 ++++ nvidia-settings-525.60.11/src/libXNVCtrl/utils.mk 2022-12-01 07:56:49.882413208 +0100 +@@ -92,7 +92,7 @@ + + INSTALL ?= install + INSTALL_BIN_ARGS ?= -m 755 +-INSTALL_LIB_ARGS ?= -m 644 ++INSTALL_LIB_ARGS ?= -m 755 + INSTALL_DOC_ARGS ?= -m 644 + + M4 ?= m4 +diff -Naur nvidia-settings-525.60.11.old/utils.mk nvidia-settings-525.60.11/utils.mk +--- nvidia-settings-525.60.11.old/utils.mk 2022-12-01 07:56:28.651046343 +0100 ++++ nvidia-settings-525.60.11/utils.mk 2022-12-01 07:56:49.883413225 +0100 +@@ -92,7 +92,7 @@ + + INSTALL ?= install + INSTALL_BIN_ARGS ?= -m 755 +-INSTALL_LIB_ARGS ?= -m 644 ++INSTALL_LIB_ARGS ?= -m 755 + INSTALL_DOC_ARGS ?= -m 644 + + M4 ?= m4 diff --git a/anda/system/nvidia-580/nvidia-settings/nvidia-settings-libXNVCtrl.patch b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-libXNVCtrl.patch new file mode 100644 index 0000000000..3661d8c6f5 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-libXNVCtrl.patch @@ -0,0 +1,97 @@ +diff -Naur nvidia-settings-525.60.11.old/src/libXNVCtrl/Makefile nvidia-settings-525.60.11/src/libXNVCtrl/Makefile +--- nvidia-settings-525.60.11.old/src/libXNVCtrl/Makefile 2022-12-01 07:56:28.691047034 +0100 ++++ nvidia-settings-525.60.11/src/libXNVCtrl/Makefile 2022-12-01 08:02:18.889098255 +0100 +@@ -49,9 +49,10 @@ + ############################################################################## + + .PHONY: all +-all: $(LIBXNVCTRL) ++all: $(LIBXNVCTRL_SHARED) + + .PHONY: clean + clean: + rm -rf $(LIBXNVCTRL) *~ \ + $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d ++ rm -f $(LIBXNVCTRL_SHARED) $(LIBXNVCTRL_SHARED).* +diff -Naur nvidia-settings-525.60.11.old/src/libXNVCtrl/xnvctrl.mk nvidia-settings-525.60.11/src/libXNVCtrl/xnvctrl.mk +--- nvidia-settings-525.60.11.old/src/libXNVCtrl/xnvctrl.mk 2022-12-01 07:56:28.691047034 +0100 ++++ nvidia-settings-525.60.11/src/libXNVCtrl/xnvctrl.mk 2022-12-01 08:02:18.934099033 +0100 +@@ -39,6 +39,8 @@ + + LIBXNVCTRL = $(OUTPUTDIR)/libXNVCtrl.a + ++LIBXNVCTRL_SHARED = $(OUTPUTDIR)/libXNVCtrl.so ++ + LIBXNVCTRL_SRC = $(XNVCTRL_DIR)/NVCtrl.c + + LIBXNVCTRL_OBJ = $(call BUILD_OBJECT_LIST,$(LIBXNVCTRL_SRC)) +@@ -47,3 +49,9 @@ + + $(LIBXNVCTRL) : $(LIBXNVCTRL_OBJ) + $(call quiet_cmd,AR) ru $@ $(LIBXNVCTRL_OBJ) ++ ++$(LIBXNVCTRL_SHARED): $(LIBXNVCTRL_OBJ) ++ $(RM) $@ $@.* ++ $(CC) -shared -Wl,-soname=$(@F).0 -o $@.0.0.0 $(LDFLAGS) $^ -lXext -lX11 ++ ln -s $(@F).0.0.0 $@.0 ++ ln -s $(@F).0 $@ +diff -Naur nvidia-settings-525.60.11.old/src/Makefile nvidia-settings-525.60.11/src/Makefile +--- nvidia-settings-525.60.11.old/src/Makefile 2022-12-01 08:02:11.280966791 +0100 ++++ nvidia-settings-525.60.11/src/Makefile 2022-12-01 08:02:59.233795388 +0100 +@@ -303,7 +303,11 @@ + all: $(NVIDIA_SETTINGS) $(GTK2LIB) $(GTK3LIB) $(WAYLANDLIB) + + .PHONY: install +-install: NVIDIA_SETTINGS_install NVIDIA_GTKLIB_install WAYLAND_LIB_install ++install: NVIDIA_SETTINGS_install NVIDIA_GTKLIB_install WAYLAND_LIB_install NVIDIA_XNVCTRL_install ++ ++NVIDIA_XNVCTRL_install: ++ $(MKDIR) $(LIBDIR) ++ cp -a $(LIBXNVCTRL_SHARED)* $(LIBDIR) + + .PHONY: NVIDIA_GTKLIB_install + NVIDIA_GTKLIB_install: $(GTK2LIB) $(GTK3LIB) +@@ -329,28 +333,28 @@ + $(INSTALL) $(INSTALL_BIN_ARGS) $< $(BINDIR)/$(notdir $<) + + $(eval $(call DEBUG_INFO_RULES, $(NVIDIA_SETTINGS))) +-$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(LIBXNVCTRL) ++$(NVIDIA_SETTINGS).unstripped: $(OBJS) $(LIBXNVCTRL_SHARED) + $(call quiet_cmd,LINK) $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ +- -rdynamic -o $@ $(OBJS) $(LIBXNVCTRL) $(LIBS) ++ -rdynamic -o $@ $(OBJS) $(LIBXNVCTRL_SHARED) $(LIBS) + + ifdef BUILD_GTK2LIB + $(eval $(call DEBUG_INFO_RULES, $(GTK2LIB))) +-$(GTK2LIB).unstripped: $(LIBXNVCTRL) $(GTK2_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK) ++$(GTK2LIB).unstripped: $(LIBXNVCTRL_SHARED) $(GTK2_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK) + $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ + -o $@ \ + -Wl,-soname -Wl,$(GTK2LIB_SONAME) \ + $(GTK2_OBJS) $(IMAGE_OBJS) $(XCP_OBJS) \ +- $(LIBXNVCTRL) $(LIBS) $(GTK2_LIBS) ++ $(LIBXNVCTRL_SHARED) $(LIBS) $(GTK2_LIBS) + endif + + ifdef BUILD_GTK3LIB + $(eval $(call DEBUG_INFO_RULES, $(GTK3LIB))) +-$(GTK3LIB).unstripped: $(LIBXNVCTRL) $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK) ++$(GTK3LIB).unstripped: $(LIBXNVCTRL_SHARED) $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK) + $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ + -o $@ \ + -Wl,-soname -Wl,$(GTK3LIB_SONAME) \ + $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) \ +- $(LIBXNVCTRL) $(LIBS) $(GTK3_LIBS) ++ $(LIBXNVCTRL_SHARED) $(LIBS) $(GTK3_LIBS) + endif + + ifdef BUILD_WAYLANDLIB +@@ -379,7 +383,7 @@ + $(OUTPUTDIR)/*.o $(OUTPUTDIR)/*.d \ + $(GTK2LIB) $(GTK3LIB) $(GTK2LIB_DIR) $(GTK3LIB_DIR) \ + $(WAYLANDLIB) $(WAYLANDLIB_DIR) \ +- $(IMAGE_HEADERS) $(LIBXNVCTRL) ++ $(IMAGE_HEADERS) $(LIBXNVCTRL_SHARED) + + ifdef BUILD_GTK2LIB + $(foreach src,$(GTK_SRC), \ diff --git a/anda/system/nvidia-580/nvidia-settings/nvidia-settings-link-order.patch b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-link-order.patch new file mode 100644 index 0000000000..b8fffa9e45 --- /dev/null +++ b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-link-order.patch @@ -0,0 +1,60 @@ +diff -Naur nvidia-settings-525.60.11.old/src/Makefile nvidia-settings-525.60.11/src/Makefile +--- nvidia-settings-525.60.11.old/src/Makefile 2022-12-01 07:56:28.657046446 +0100 ++++ nvidia-settings-525.60.11/src/Makefile 2022-12-01 08:01:09.920906524 +0100 +@@ -60,7 +60,7 @@ + endif + + ifndef GTK2_LDFLAGS +- GTK2_LDFLAGS := -Wl,--no-as-needed $(shell $(PKG_CONFIG) --libs gtk+-2.0) ++ GTK2_LDFLAGS := $(shell $(PKG_CONFIG) --libs gtk+-2.0) + endif + else + GTK2_CFLAGS ?= +@@ -82,7 +82,7 @@ + endif + + ifndef GTK3_LDFLAGS +- GTK3_LDFLAGS := -Wl,--no-as-needed $(shell $(PKG_CONFIG) --libs gtk+-3.0) ++ GTK3_LDFLAGS := $(shell $(PKG_CONFIG) --libs gtk+-3.0) + endif + else + GTK3_CFLAGS ?= +@@ -337,30 +337,29 @@ + $(eval $(call DEBUG_INFO_RULES, $(GTK2LIB))) + $(GTK2LIB).unstripped: $(LIBXNVCTRL) $(GTK2_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK) + $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ +- $(LIBXNVCTRL) $(LIBS) $(GTK2_LIBS) \ +- -Wl,--unresolved-symbols=ignore-all -o $@ \ ++ -o $@ \ + -Wl,-soname -Wl,$(GTK2LIB_SONAME) \ +- $(GTK2_OBJS) $(IMAGE_OBJS) $(XCP_OBJS) ++ $(GTK2_OBJS) $(IMAGE_OBJS) $(XCP_OBJS) \ ++ $(LIBXNVCTRL) $(LIBS) $(GTK2_LIBS) + endif + + ifdef BUILD_GTK3LIB + $(eval $(call DEBUG_INFO_RULES, $(GTK3LIB))) + $(GTK3LIB).unstripped: $(LIBXNVCTRL) $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) $(VERSION_MK) + $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ +- $(LIBXNVCTRL) $(LIBS) $(GTK3_LIBS) \ +- -Wl,--unresolved-symbols=ignore-all -o $@ \ ++ -o $@ \ + -Wl,-soname -Wl,$(GTK3LIB_SONAME) \ +- $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) ++ $(GTK3_OBJS) $(XCP_OBJS) $(IMAGE_OBJS) \ ++ $(LIBXNVCTRL) $(LIBS) $(GTK3_LIBS) + endif + + ifdef BUILD_WAYLANDLIB + $(eval $(call DEBUG_INFO_RULES, $(WAYLANDLIB))) + $(WAYLANDLIB).unstripped: $(WAYLAND_OBJS) + $(call quiet_cmd,LINK) -shared $(CFLAGS) $(LDFLAGS) $(BIN_LDFLAGS) \ +- $(LIBS) $(WAYLAND_LIBS) \ +- -Wl,--unresolved-symbols=ignore-all -o $@ \ ++ -o $@ \ + -Wl,-soname -Wl,$(WAYLANDLIB_SONAME) \ +- $(WAYLAND_OBJS) ++ $(WAYLAND_OBJS) $(LIBS) $(WAYLAND_LIBS) + + endif + diff --git a/anda/system/nvidia-580/nvidia-settings/nvidia-settings-load.desktop b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-load.desktop new file mode 100644 index 0000000000..664e1f5e0e --- /dev/null +++ b/anda/system/nvidia-580/nvidia-settings/nvidia-settings-load.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Name=NVIDIA X Server Settings +Comment=Configure NVIDIA X Server Settings +Exec=/usr/bin/nvidia-settings --load-config-only +Terminal=false +Icon=nvidia-settings +Categories=Settings; diff --git a/anda/system/nvidia-580/nvidia-settings/nvidia-settings.appdata.xml b/anda/system/nvidia-580/nvidia-settings/nvidia-settings.appdata.xml new file mode 100644 index 0000000000..0240ba817a --- /dev/null +++ b/anda/system/nvidia-580/nvidia-settings/nvidia-settings.appdata.xml @@ -0,0 +1,57 @@ + + + nvidia-settings.desktop + NVIDIA Graphics Drivers Control Panel + Accelerated Linux Graphics Driver Control Panel + +

+ The NVIDIA Accelerated Linux Graphics Driver brings accelerated 2D + functionality and high-performance OpenGL support to Linux with the + use of NVIDIA graphics processing units. +

+

+ These drivers provide optimized hardware acceleration for OpenGL and X + applications and support nearly all recent NVIDIA GPU products. + The NVIDIA graphics driver uses a Unified Driver Architecture: the single + graphics driver supports all modern NVIDIA GPUs. +

+

+ The nvidia-settings utility is a tool for configuring the NVIDIA graphics + driver. It operates by communicating with the NVIDIA X driver, querying + and updating state as appropriate. This communication is done via the + NV-CONTROL, GLX, XVideo, and RandR X extensions. +

+

+ Values such as brightness and gamma, XVideo attributes, temperature, and + OpenGL settings can be queried and configured via nvidia-settings. +

+
+ + http://www.nvidia.com/ + CC0-1.0 + GPL-2.0+ + NVIDIA Corporation + + + The nvidia-settings utility main window + https://negativo17.org/appstream/nvidia-settings-0.png + + + Monitoring GPU status + https://negativo17.org/appstream/nvidia-settings-1.png + + + Application profiles creation + https://negativo17.org/appstream/nvidia-settings-2.png + + + + NVIDIA + driver + GeForce + Quadro + Vulkan + OpenGL + + negativo17@gmail.com +
diff --git a/anda/system/nvidia-580/nvidia-settings/update.rhai b/anda/system/nvidia-580/nvidia-settings/update.rhai new file mode 100644 index 0000000000..d1ef2924fb --- /dev/null +++ b/anda/system/nvidia-580/nvidia-settings/update.rhai @@ -0,0 +1,3 @@ +import "andax/nvidia.rhai" as nvidia; + +rpm.version(nvidia::nvidia_legacy_version()); diff --git a/anda/system/nvidia-580/nvidia-xconfig/anda.hcl b/anda/system/nvidia-580/nvidia-xconfig/anda.hcl new file mode 100644 index 0000000000..e96198e2ee --- /dev/null +++ b/anda/system/nvidia-580/nvidia-xconfig/anda.hcl @@ -0,0 +1,9 @@ +project "pkg" { + rpm { + spec = "nvidia-xconfig-580.spec" + } + labels = { + subrepo = "nvidia" + weekly = 4 + } +} diff --git a/anda/system/nvidia-580/nvidia-xconfig/nvidia-xconfig-580.spec b/anda/system/nvidia-580/nvidia-xconfig/nvidia-xconfig-580.spec new file mode 100644 index 0000000000..ae59883e8f --- /dev/null +++ b/anda/system/nvidia-580/nvidia-xconfig/nvidia-xconfig-580.spec @@ -0,0 +1,53 @@ +%global real_name nvidia-xconfig + +Name: %{real_name}-580 +Version: 580.119.02 +Release: 1%?dist +Summary: NVIDIA X configuration file editor +Epoch: 3 +License: GPLv2+ +URL: http://www.nvidia.com/object/unix.html +ExclusiveArch: x86_64 aarch64 + +Source0: https://download.nvidia.com/XFree86/%{real_name}/%{real_name}-%{version}.tar.bz2 + +BuildRequires: gcc +BuildRequires: libpciaccess-devel +BuildRequires: m4 + +Requires: libnvidia-cfg-580%{?_isa} >= %{?epoch:%{epoch}:}%{version} +Requires: xorg-x11-nvidia-580%{?_isa} >= %{?epoch:%{epoch}:}%{version} + +%description +%{real_name} is a command line tool intended to provide basic control over +configuration options available in the NVIDIA X driver. + +%prep +%autosetup -p1 -n %{real_name}-%{version} +# Remove additional CFLAGS added when enabling DEBUG +sed -i '/+= -O0 -g/d' utils.mk + +%build +export CFLAGS="%{optflags}" +export LDFLAGS="%{?__global_ldflags}" +make %{?_smp_mflags} \ + DEBUG=1 \ + MANPAGE_GZIP=0 \ + NV_VERBOSE=1 \ + PREFIX=%{_prefix} \ + STRIP_CMD=true + +%install +%make_install \ + MANPAGE_GZIP=0 \ + NV_VERBOSE=1 \ + PREFIX=%{_prefix} \ + STRIP_CMD=true + +%files +%license COPYING +%{_bindir}/%{real_name} +%{_mandir}/man1/%{real_name}.1* + +%changelog +%autochangelog diff --git a/anda/system/nvidia-580/nvidia-xconfig/update.rhai b/anda/system/nvidia-580/nvidia-xconfig/update.rhai new file mode 100644 index 0000000000..d1ef2924fb --- /dev/null +++ b/anda/system/nvidia-580/nvidia-xconfig/update.rhai @@ -0,0 +1,3 @@ +import "andax/nvidia.rhai" as nvidia; + +rpm.version(nvidia::nvidia_legacy_version()); diff --git a/anda/system/nvidia/README.md b/anda/system/nvidia/README.md index c0fe5a7a8a..d09b8df2ec 100644 --- a/anda/system/nvidia/README.md +++ b/anda/system/nvidia/README.md @@ -8,8 +8,6 @@ Unlike negativo17 and Nobara, we do not manually generate a tarball of the NVIDI on-the-fly from the NVIDIA installer. This ensures that the packages can be easily maintained and updated, as long as the self-extracting NVIDIA installer still has the same command-line options. -One major difference for Terra's distro is that we install the closed-source kernel modules by default, instead of the newer open-source kernel modules. This is because the open-source modules only support GPUs that have a GSP (GPU System Processor), which only includes Turing (RTX 20 series) and newer GPUs. As we would like to still support older GPUs, we install the closed-source modules by default. - ## How Terra unpacks the self-extracting archive Instead of pre-generating the tarball, we run the NVIDIA installer with the `-x` flag to extract the contents directly to the build directory. We then make use of an RPM macro to set the new build directory as that tree. diff --git a/anda/system/nvidia/dkms-nvidia/closed/anda.hcl b/anda/system/nvidia/dkms-nvidia/anda.hcl similarity index 73% rename from anda/system/nvidia/dkms-nvidia/closed/anda.hcl rename to anda/system/nvidia/dkms-nvidia/anda.hcl index cb2055bdb2..6ddfc98572 100644 --- a/anda/system/nvidia/dkms-nvidia/closed/anda.hcl +++ b/anda/system/nvidia/dkms-nvidia/anda.hcl @@ -4,6 +4,7 @@ project pkg { } labels { subrepo = "nvidia" - updbranch = 1 + updbranch = 1 + mock = 1 } } diff --git a/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.conf b/anda/system/nvidia/dkms-nvidia/dkms-nvidia.conf similarity index 60% rename from anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.conf rename to anda/system/nvidia/dkms-nvidia/dkms-nvidia.conf index 5db6994392..c91458b65a 100644 --- a/anda/system/nvidia/dkms-nvidia/open/dkms-nvidia-open.conf +++ b/anda/system/nvidia/dkms-nvidia/dkms-nvidia.conf @@ -2,27 +2,25 @@ PACKAGE_NAME="nvidia" PACKAGE_VERSION="__VERSION_STRING" AUTOINSTALL="yes" -MODULE_VARIANT=kernel-open - # Quote make to avoid DKMS replacing it with "make -j$parallel_jobs KERNELRELEASE=$kernelver" -MAKE[0]="'make' -j$(nproc) -C ${MODULE_VARIANT} KERNEL_UNAME=${kernelver} modules" +MAKE[0]="'make' -j$(nproc) KERNEL_UNAME=${kernelver} modules" BUILT_MODULE_NAME[0]="nvidia" -BUILT_MODULE_LOCATION[0]="${MODULE_VARIANT}" +BUILT_MODULE_LOCATION[0]="kernel-open" DEST_MODULE_LOCATION[0]="/extra" BUILT_MODULE_NAME[1]="nvidia-modeset" -BUILT_MODULE_LOCATION[1]="${MODULE_VARIANT}" +BUILT_MODULE_LOCATION[1]="kernel-open" DEST_MODULE_LOCATION[1]="/extra" BUILT_MODULE_NAME[2]="nvidia-drm" -BUILT_MODULE_LOCATION[2]="${MODULE_VARIANT}" +BUILT_MODULE_LOCATION[2]="kernel-open" DEST_MODULE_LOCATION[2]="/extra" BUILT_MODULE_NAME[3]="nvidia-uvm" -BUILT_MODULE_LOCATION[3]="${MODULE_VARIANT}" +BUILT_MODULE_LOCATION[3]="kernel-open" DEST_MODULE_LOCATION[3]="/extra" BUILT_MODULE_NAME[4]="nvidia-peermem" -BUILT_MODULE_LOCATION[4]="${MODULE_VARIANT}" +BUILT_MODULE_LOCATION[4]="kernel-open" DEST_MODULE_LOCATION[4]="/extra" diff --git a/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.spec b/anda/system/nvidia/dkms-nvidia/dkms-nvidia.spec similarity index 88% rename from anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.spec rename to anda/system/nvidia/dkms-nvidia/dkms-nvidia.spec index 8022d1ceff..3cdefc9092 100644 --- a/anda/system/nvidia/dkms-nvidia/closed/dkms-nvidia.spec +++ b/anda/system/nvidia/dkms-nvidia/dkms-nvidia.spec @@ -1,13 +1,11 @@ ## NVIDIA DKMS package, based on the work of Negativo17 with tweaks for Terra. -# RPM inexplicably thinks this package deps on a version of libcrypto it does not? -%global __requires_exclude (libcrypto\\.so\\.1\\.1.*)$ %global debug_package %{nil} %global modulename nvidia Name: dkms-%{modulename} Version: 580.105.08 -Release: 1%?dist +Release: 2%?dist Summary: NVIDIA display driver kernel module Epoch: 3 License: NVIDIA License @@ -21,9 +19,11 @@ Requires: dkms Conflicts: akmod-nvidia # Unlike most DKMS packages, this package is NOT noarch! ExclusiveArch: x86_64 aarch64 +Provides: %{name}-open = %{?epoch:%{epoch}:}%{version} +Obsoletes: %{name}-open < %{?epoch:%{epoch}:}%{version} %description -This package provides the proprietary NVIDIA kernel driver modules. +This package provides the NVIDIA kernel driver modules. %prep sh %{SOURCE0} -x --target dkms-nvidia-%{version}-%{_arch} diff --git a/anda/system/nvidia/dkms-nvidia/open/modules.conf b/anda/system/nvidia/dkms-nvidia/modules.conf similarity index 100% rename from anda/system/nvidia/dkms-nvidia/open/modules.conf rename to anda/system/nvidia/dkms-nvidia/modules.conf diff --git a/anda/system/nvidia/dkms-nvidia/closed/update.rhai b/anda/system/nvidia/dkms-nvidia/update.rhai similarity index 100% rename from anda/system/nvidia/dkms-nvidia/closed/update.rhai rename to anda/system/nvidia/dkms-nvidia/update.rhai diff --git a/anda/system/nvidia/kmod-nvidia/RELEASE_kernel.txt b/anda/system/nvidia/kmod-nvidia/RELEASE_kernel.txt deleted file mode 100644 index d69e1e9e5d..0000000000 --- a/anda/system/nvidia/kmod-nvidia/RELEASE_kernel.txt +++ /dev/null @@ -1 +0,0 @@ -124.13.1 diff --git a/anda/system/nvidia/kmod-nvidia/VERSION_kernel.txt b/anda/system/nvidia/kmod-nvidia/VERSION_kernel.txt deleted file mode 100644 index d4e6cb4293..0000000000 --- a/anda/system/nvidia/kmod-nvidia/VERSION_kernel.txt +++ /dev/null @@ -1 +0,0 @@ -6.12.0 diff --git a/anda/system/nvidia/kmod-nvidia/anda.hcl b/anda/system/nvidia/kmod-nvidia/anda.hcl deleted file mode 100644 index 7a00ac7878..0000000000 --- a/anda/system/nvidia/kmod-nvidia/anda.hcl +++ /dev/null @@ -1,10 +0,0 @@ -project pkg { - rpm { - spec = "kmod-nvidia.spec" - } - labels { - subrepo = "nvidia" - mock = 1 - updbranch = 1 - } -} diff --git a/anda/system/nvidia/kmod-nvidia/kmod-nvidia-ldflags.patch b/anda/system/nvidia/kmod-nvidia/kmod-nvidia-ldflags.patch deleted file mode 100644 index 4b3bd00d94..0000000000 --- a/anda/system/nvidia/kmod-nvidia/kmod-nvidia-ldflags.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 38b7e1478b58b983724ec817562301edd5c244a2 Mon Sep 17 00:00:00 2001 -From: Neal Gompa -Date: Mon, 7 Apr 2025 19:34:49 -0400 -Subject: [PATCH] src/nvidia/Makefile: Drop broken addition of userspace linker - flags - -The Makefile currently causes the package build of the kernel modules -to fail with the following error: - -ld: unrecognized option '-Wl,-z,relro' -ld: use the --help option for usage information -make[1]: *** [Makefile:214: _out/Linux_x86_64/nv-kernel.o] Error 1 -make: *** [Makefile:34: src/nvidia/_out/Linux_x86_64/nv-kernel.o] Error 2 - -Dropping this line fixes this issue. - -Signed-off-by: Neal Gompa ---- - src/nvidia/Makefile | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/src/nvidia/Makefile b/src/nvidia/Makefile -index 931a74c0..423414af 100644 ---- a/src/nvidia/Makefile -+++ b/src/nvidia/Makefile -@@ -208,8 +208,6 @@ all: $(NV_KERNEL_O) - - LINKER_SCRIPT = nv-kernel.ld - --NV_KERNEL_O_LDFLAGS += $(LDFLAGS) -- - $(NV_KERNEL_O): $(OBJS) $(EXPORTS_LINK_COMMAND) $(LINKER_SCRIPT) - $(call quiet_cmd,LD) \ - $(NV_KERNEL_O_LDFLAGS) \ --- -2.48.1 diff --git a/anda/system/nvidia/kmod-nvidia/kmod-nvidia-no-hostname-whoami.patch b/anda/system/nvidia/kmod-nvidia/kmod-nvidia-no-hostname-whoami.patch deleted file mode 100644 index e16336f827..0000000000 --- a/anda/system/nvidia/kmod-nvidia/kmod-nvidia-no-hostname-whoami.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/utils.mk 2025-05-29 12:58:21.000000000 -0500 -+++ b/utils.mk 2025-06-01 18:17:28.229885115 -0500 -@@ -116,9 +116,6 @@ - XZ ?= xz - PKG_CONFIG ?= pkg-config - --NV_BUILD_USER ?= $(shell whoami) --NV_BUILD_HOST ?= $(shell hostname) -- - NV_AUTO_DEPEND ?= 1 - NV_VERBOSE ?= 0 - diff --git a/anda/system/nvidia/kmod-nvidia/kmod-nvidia.spec b/anda/system/nvidia/kmod-nvidia/kmod-nvidia.spec deleted file mode 100644 index d935aa10d4..0000000000 --- a/anda/system/nvidia/kmod-nvidia/kmod-nvidia.spec +++ /dev/null @@ -1,99 +0,0 @@ -%global kmod_name nvidia - -%global debug_package %{nil} - -# Generate kernel symbols requirements: -%global _use_internal_dependency_generator 0 - -# uname -r does not work in GitHub runners -%{!?kversion: %global kversion %(rpm -q kernel-devel | sed 's/kernel-devel-//g')} - -Name: kmod-%{kmod_name} -Version: 580.105.08 -Release: 2%?dist -Summary: NVIDIA display driver kernel module -Epoch: 3 -License: NVIDIA License -URL: http://www.nvidia.com/ -ExclusiveArch: x86_64 aarch64 - -Source0: https://github.com/NVIDIA/open-gpu-kernel-modules/archive/refs/tags/%{version}.tar.gz -# https://git.almalinux.org/ngompa/nvidia-kmod-el-rpm/ -Patch0: %{name}-ldflags.patch -Patch1: %{name}-no-hostname-whoami.patch -# This is needed for the Makefile for the beta drivers, added just in case it's needed in the future -%dnl Patch3: fix-build-in-actions.patch - -BuildRequires: elfutils-libelf-devel -BuildRequires: gcc -BuildRequires: gcc-c++ -BuildRequires: kernel-abi-stablelists -BuildRequires: kernel-devel -BuildRequires: kernel-rpm-macros -BuildRequires: kmod -BuildRequires: redhat-rpm-config - -Provides: kabi-modules = %{kversion} -Provides: %{kmod_name}-kmod = %{?epoch:%{epoch}:}%{version}-%{release} -Requires: module-init-tools - -%description -This package provides the proprietary NVIDIA kernel modules. It is built to -depend upon the specific ABI provided by a range of releases of the same variant -of the Linux kernel and not on any one specific build. - -%prep -%autosetup -p1 -n open-gpu-kernel-modules-%{version} - -echo "override %{kmod_name} * weak-updates/%{kmod_name}" > kmod-%{kmod_name}.conf - -%build -export SYSSRC=%{_usrsrc}/kernels/%{kversion} -export IGNORE_XEN_PRESENCE=1 -export IGNORE_PREEMPT_RT_PRESENCE=1 -export IGNORE_CC_MISMATCH=1 - -%make_build modules - -%install -export INSTALL_MOD_PATH=%{buildroot}%{_prefix} -export INSTALL_MOD_DIR=extra/%{kmod_name} - -make -C %{_usrsrc}/kernels/%{kversion} -j$(nproc) modules_install M=$PWD/kernel-open - -install -d %{buildroot}%{_sysconfdir}/depmod.d/ -install kmod-%{kmod_name}.conf %{buildroot}%{_sysconfdir}/depmod.d/ -# Remove the unrequired files. -rm -f %{buildroot}%{_prefix}/lib/modules/%{kversion}/modules.* - -find %{buildroot} -type f -name '*.ko' | xargs %{__strip} --strip-debug -find %{buildroot} -type f -name '*.ko' | xargs xz - -%post -if [ -e "/boot/System.map-%{kversion}" ]; then - %{_sbindir}/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || : -fi -modules=( $(find %{_prefix}/lib/modules/%{kversion}/extra/%{kmod_name} | grep '\.ko.xz$') ) -if [ -x "%{_sbindir}/weak-modules" ]; then - printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --add-modules -fi - -%preun -rpm -ql kmod-%{kmod_name}-%{version}-%{release}.%{_target_cpu} | grep '\.ko.xz$' > %{_var}/run/rpm-kmod-%{kmod_name}-modules - -%postun -if [ -e "/boot/System.map-%{kversion}" ]; then - %{_sbindir}/depmod -aeF "/boot/System.map-%{kversion}" "%{kversion}" > /dev/null || : -fi -modules=( $(cat /var/run/rpm-kmod-%{kmod_name}-modules) ) -rm %{_var}/run/rpm-kmod-%{kmod_name}-modules -if [ -x "%{_sbindir}/weak-modules" ]; then - printf '%s\n' "${modules[@]}" | %{_sbindir}/weak-modules --remove-modules -fi - -%files -%{_prefix}/lib/modules/%{kversion}/extra/* -%config %{_sysconfdir}/depmod.d/kmod-%{kmod_name}.conf - -%changelog -%autochangelog diff --git a/anda/system/nvidia/kmod-nvidia/update.rhai b/anda/system/nvidia/kmod-nvidia/update.rhai deleted file mode 100644 index 1a96a612e6..0000000000 --- a/anda/system/nvidia/kmod-nvidia/update.rhai +++ /dev/null @@ -1,20 +0,0 @@ -import "andax/bump_extras.rhai" as bump; -import "andax/spec.rhai" as spec; - -let v = bump::madoguchi("nvidia-kmod-common", labels.branch); -let m = gh("NVIDIA/open-gpu-kernel-modules"); -if m == v { - rpm.version(v); -} - -// Rebuild the package whenever the Alma kernel updates -let kver = bump::alma_vr("kernel", "BaseOS", labels.branch)[1]; -let krel = bump::alma_vr("kernel", "BaseOS", labels.branch)[2]; -open_file("anda/system/nvidia/kmod-nvidia/VERSION_kernel.txt", "w").write(kver); -open_file("anda/system/nvidia/kmod-nvidia/RELEASE_kernel.txt", "w").write(krel); - -let dir = sub(`/[^/]+$`, "", __script_path); -if sh("[[ `git status " + dir + " --porcelain` ]] && exit 1 || exit 0", #{}).ctx.rc == 1 { - let rel = spec::get_release(rpm).parse_int(); - rpm.release(rel + 1); -} diff --git a/anda/system/nvidia/libva-nvidia-driver/libva-nvidia-driver.spec b/anda/system/nvidia/libva-nvidia-driver/libva-nvidia-driver.spec index 3462a97b36..8255c2bf77 100644 --- a/anda/system/nvidia/libva-nvidia-driver/libva-nvidia-driver.spec +++ b/anda/system/nvidia/libva-nvidia-driver/libva-nvidia-driver.spec @@ -1,5 +1,5 @@ -%global commit0 57a476b0e55f015759d9c50cc1f13159c6cd8f95 -%global date 20251114 +%global commit0 2e204c67d4401292905f6afb4832a7e7df9ce53a +%global date 20251125 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global upstream_name nvidia-vaapi-driver diff --git a/anda/system/nvidia/nvidia-driver/nvidia-driver.spec b/anda/system/nvidia/nvidia-driver/nvidia-driver.spec index cdb04923be..7546b22049 100644 --- a/anda/system/nvidia/nvidia-driver/nvidia-driver.spec +++ b/anda/system/nvidia/nvidia-driver/nvidia-driver.spec @@ -11,7 +11,7 @@ Name: nvidia-driver Version: 580.119.02 -Release: 1%?dist +Release: 2%?dist Summary: NVIDIA's proprietary display driver for NVIDIA graphic cards Epoch: 3 License: NVIDIA License diff --git a/anda/system/nvidia/nvidia-kmod-common/MODULE_VARIANT.txt b/anda/system/nvidia/nvidia-kmod-common/MODULE_VARIANT.txt deleted file mode 100644 index b10acb2a04..0000000000 --- a/anda/system/nvidia/nvidia-kmod-common/MODULE_VARIANT.txt +++ /dev/null @@ -1,17 +0,0 @@ -# This variable determines what kind of modules get installed on the system -# until the Nvidia driver provides only the open source variant. -# -# The name of the variable is the name of the folder that hosts the kernel -# module code inside the driver installer: -# -# +-------------+---------------------+----------------+ -# | Value | Type | License type | -# +-------------+---------------------+----------------+ -# | kernel | Proprietary drivers | NVIDIA license | -# +-------------+---------------------+----------------+ -# | kernel-open | Open source drivers | Dual MIT/GPL | -# +-------------+---------------------+----------------+ - -# TERRA-SPECIFIC NOTES: -# The default module versions have been added to the DKMS and Akmods packages. -# This file now exists only to explain how the variable works. diff --git a/anda/system/nvidia/nvidia-kmod-common/nvidia-kmod-common.spec b/anda/system/nvidia/nvidia-kmod-common/nvidia-kmod-common.spec index a910b91f41..57832dab32 100644 --- a/anda/system/nvidia/nvidia-kmod-common/nvidia-kmod-common.spec +++ b/anda/system/nvidia/nvidia-kmod-common/nvidia-kmod-common.spec @@ -6,7 +6,7 @@ Name: nvidia-kmod-common Version: 580.119.02 -Release: 1%?dist +Release: 2%?dist Summary: Common file for NVIDIA's proprietary driver kernel modules Epoch: 3 License: NVIDIA License @@ -15,7 +15,6 @@ URL: http://www.nvidia.com/object/unix.html BuildArch: noarch Source0: http://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}.run -Source16: MODULE_VARIANT.txt Source17: nvidia-boot-update Source18: nvidia-modeset.conf Source19: nvidia.conf @@ -29,9 +28,9 @@ Requires: dracut Requires: nvidia-modprobe Requires: nvidia-driver = %{?epoch:%{epoch}:}%{version} Requires: nvidia-driver-libs = %{?epoch:%{epoch}:}%{version} -Requires: (nvidia-open-kmod = %{?epoch:%{epoch}:}%{version} or nvidia-kmod = %{?epoch:%{epoch}:}%{version}) +Requires: nvidia-kmod = %{?epoch:%{epoch}:}%{version} Provides: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version} -Provides: nvidia-open-kmod-common = %{?epoch:%{epoch}:}%{version} +Obsoletes: nvidia-open-kmod-common < %{?epoch:%{epoch}:}%{version} Obsoletes: cuda-nvidia-kmod-common < %{?epoch:%{epoch}:}%{version} %description @@ -65,9 +64,6 @@ install -p -m 644 -D %{SOURCE20} %{buildroot}%{_udevrulesdir}/60-nvidia.rules mkdir -p %{buildroot}%{_prefix}/lib/firmware/nvidia/%{version}/ install -p -m 644 firmware/* %{buildroot}%{_prefix}/lib/firmware/nvidia/%{version} -# Old kernel.conf rewritten as a doc file. -cp %{SOURCE16} . - # Fallback service. Fall back to Nouveau if NVIDIA drivers fail. # This is actually from RPM Fusion. %dnl install -Dm644 %{SOURCE22} -t %{buildroot}%{_unitdir} @@ -88,7 +84,6 @@ fi ||: dracut --regenerate-all --force || : %files -%doc MODULE_VARIANT.txt %{_dracut_conf_d}/99-nvidia.conf %{_modprobedir}/nvidia.conf %dir %{_prefix}/lib/firmware diff --git a/anda/system/nvidia/nvidia-kmod/closed/anda.hcl b/anda/system/nvidia/nvidia-kmod/anda.hcl similarity index 100% rename from anda/system/nvidia/nvidia-kmod/closed/anda.hcl rename to anda/system/nvidia/nvidia-kmod/anda.hcl diff --git a/anda/system/nvidia/nvidia-kmod/closed/update.rhai b/anda/system/nvidia/nvidia-kmod/closed/update.rhai deleted file mode 100644 index a50e623acd..0000000000 --- a/anda/system/nvidia/nvidia-kmod/closed/update.rhai +++ /dev/null @@ -1,3 +0,0 @@ -import "andax/bump_extras.rhai" as bump; - -rpm.version(bump::madoguchi("nvidia-kmod-common", labels.branch)); diff --git a/anda/system/nvidia/nvidia-kmod/closed/nvidia-kmod.spec b/anda/system/nvidia/nvidia-kmod/nvidia-kmod.spec similarity index 82% rename from anda/system/nvidia/nvidia-kmod/closed/nvidia-kmod.spec rename to anda/system/nvidia/nvidia-kmod/nvidia-kmod.spec index 3f8f901dbf..60fe470fb3 100644 --- a/anda/system/nvidia/nvidia-kmod/closed/nvidia-kmod.spec +++ b/anda/system/nvidia/nvidia-kmod/nvidia-kmod.spec @@ -5,7 +5,7 @@ Name: nvidia-kmod Version: 580.105.08 -Release: 1%?dist +Release: 2%?dist Summary: NVIDIA display driver kernel module Epoch: 3 License: NVIDIA License @@ -15,6 +15,8 @@ ExclusiveArch: x86_64 aarch64 Source0: http://download.nvidia.com/XFree86/Linux-%{_arch}/%{version}/NVIDIA-Linux-%{_arch}-%{version}.run Requires: nvidia-kmod-common = %{?epoch:%{epoch}:}%{version} Requires: akmods +Provides: akmod-nvidia-open = %{?epoch:%{epoch}:}%{version} +Obsoletes: akmod-nvidia-open < %{?epoch:%{epoch}:}%{version} # Get the needed BuildRequires (in parts depending on what we build for): @@ -39,24 +41,20 @@ sh %{SOURCE0} -x --target nvidia-kmod-%{version}-%{_arch} rm -f */dkms.conf for kernel_version in %{?kernel_versions}; do - mkdir _kmod_build_${kernel_version%%___*} - cp -fr kernel* _kmod_build_${kernel_version%%___*} + cp -fr open-gpu-kernel-modules-%{version} _kmod_build_${kernel_version%%___*} done %build -export MODULE_VARIANT=kernel for kernel_version in %{?kernel_versions}; do pushd _kmod_build_${kernel_version%%___*}/ - make %{?_smp_mflags} -C ${MODULE_VARIANT} \ - KERNEL_UNAME="${kernel_version%%___*}" modules + make %{?_smp_mflags} KERNEL_UNAME="${kernel_version%%___*}" modules popd done %install -export MODULE_VARIANT=kernel for kernel_version in %{?kernel_versions}; do mkdir -p %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ - install -p -m 0755 _kmod_build_${kernel_version%%___*}/${MODULE_VARIANT}/*.ko \ + install -p -m 0755 _kmod_build_${kernel_version%%___*}/kernel-open/*.ko \ %{buildroot}/%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ done %{?akmod_install} diff --git a/anda/system/nvidia/nvidia-kmod/open/update.rhai b/anda/system/nvidia/nvidia-kmod/open/update.rhai deleted file mode 100644 index a50e623acd..0000000000 --- a/anda/system/nvidia/nvidia-kmod/open/update.rhai +++ /dev/null @@ -1,3 +0,0 @@ -import "andax/bump_extras.rhai" as bump; - -rpm.version(bump::madoguchi("nvidia-kmod-common", labels.branch)); diff --git a/anda/system/nvidia/dkms-nvidia/open/update.rhai b/anda/system/nvidia/nvidia-kmod/update.rhai similarity index 100% rename from anda/system/nvidia/dkms-nvidia/open/update.rhai rename to anda/system/nvidia/nvidia-kmod/update.rhai diff --git a/anda/system/nvidia/nvidia-modprobe/nvidia-modprobe.spec b/anda/system/nvidia/nvidia-modprobe/nvidia-modprobe.spec index aac0bbbaf4..b21c5df946 100644 --- a/anda/system/nvidia/nvidia-modprobe/nvidia-modprobe.spec +++ b/anda/system/nvidia/nvidia-modprobe/nvidia-modprobe.spec @@ -1,6 +1,6 @@ Name: nvidia-modprobe Version: 580.119.02 -Release: 1%?dist +Release: 2%?dist Summary: NVIDIA kernel module loader Epoch: 3 License: GPLv2+ @@ -44,254 +44,4 @@ make %{?_smp_mflags} \ %{_mandir}/man1/%{name}.1.* %changelog -* Thu Dec 05 2024 Simone Caronni - 3:565.77-1 -- Update to 565.77. - -* Wed Oct 23 2024 Simone Caronni - 3:565.57.01-1 -- Update to 565.57.01. - -* Wed Aug 21 2024 Simone Caronni - 3:560.35.03-1 -- Update to 560.35.03. - -* Tue Aug 06 2024 Simone Caronni - 3:560.31.02-1 -- Update to 560.31.02. - -* Mon Aug 05 2024 Simone Caronni - 3:560.28.03-1 -- Update to 560.28.03. - -* Tue Jul 02 2024 Simone Caronni - 3:555.58.02-1 -- Update to 555.58.02. - -* Thu Jun 27 2024 Simone Caronni - 3:555.58-1 -- Update to 555.58. - -* Thu Jun 06 2024 Simone Caronni - 3:555.52.04-1 -- Update to 555.52.04. - -* Wed May 22 2024 Simone Caronni - 3:555.42.02-1 -- Update to 555.42.02. - -* Tue Apr 30 2024 Simone Caronni - 3:550.78-2 -- Switch to Nvidia provided tarball. - -* Fri Apr 26 2024 Simone Caronni - 3:550.78-1 -- Update to 550.78. - -* Thu Apr 18 2024 Simone Caronni - 3:550.76-1 -- Update to 550.76. - -* Sun Mar 24 2024 Simone Caronni - 3:550.67-1 -- Update to 550.67. - -* Sat Mar 09 2024 Simone Caronni - 3:550.54.14-2 -- Enable aarch64. - -* Sun Mar 03 2024 Simone Caronni - 3:550.54.14-1 -- Update to 550.54.14. - -* Tue Feb 06 2024 Simone Caronni - 3:550.40.07-1 -- Update to 550.40.07. - -* Fri Dec 01 2023 Simone Caronni - 3:545.29.06-1 -- Update to 545.29.06. - -* Tue Oct 31 2023 Simone Caronni - 3:545.29.02-1 -- Update to 545.29.02. - -* Wed Oct 18 2023 Simone Caronni - 3:545.23.06-1 -- Update to 545.23.06. - -* Fri Sep 22 2023 Simone Caronni - 3:535.113.01-1 -- Update to 535.113.01. - -* Thu Aug 24 2023 Simone Caronni - 3:535.104.05-1 -- Update to 535.104.05. - -* Wed Aug 09 2023 Simone Caronni - 3:535.98-1 -- Update to 535.98. - -* Wed Jul 19 2023 Simone Caronni - 3:535.86.05-1 -- Update to 535.86.05. - -* Thu Jun 15 2023 Simone Caronni - 3:535.54.03-1 -- Update to 535.54.03. - -* Tue Jun 13 2023 Simone Caronni - 3:535.43.02-1 -- Update to 535.43.02. - -* Fri Mar 24 2023 Simone Caronni - 3:530.41.03-1 -- Update to 530.41.03. - -* Wed Mar 08 2023 Simone Caronni - 3:530.30.02-1 -- Update to 530.30.02. - -* Fri Feb 10 2023 Simone Caronni - 3:525.89.02-1 -- Update to 525.89.02. - -* Fri Jan 20 2023 Simone Caronni - 3:525.85.05-1 -- Update to 525.85.05. - -* Mon Jan 09 2023 Simone Caronni - 3:525.78.01-1 -- Update to 525.78.01. - -* Tue Nov 29 2022 Simone Caronni - 3:525.60.11-1 -- Update to 525.60.11. - -* Thu Oct 13 2022 Simone Caronni - 3:520.56.06-1 -- Update to 520.56.06. - -* Wed Sep 21 2022 Simone Caronni - 3:515.76-1 -- Update to 515.76. - -* Mon Aug 08 2022 Simone Caronni - 3:515.65.01-1 -- Update to 515.65.01. - -* Wed Jun 29 2022 Simone Caronni - 3:515.57-1 -- Update to 515.57. - -* Wed Jun 01 2022 Simone Caronni - 3:515.48.07-1 -- Update to 515.48.07. - -* Thu May 12 2022 Simone Caronni - 3:515.43.04-1 -- Update to 515.43.04. - -* Mon May 02 2022 Simone Caronni - 3:510.68.02-1 -- Update to 510.68.02. - -* Mon Mar 28 2022 Simone Caronni - 3:510.60.02-1 -- Update to 510.60.02. - -* Mon Feb 14 2022 Simone Caronni - 3:510.54-1 -- Update to 510.54. - -* Wed Feb 02 2022 Simone Caronni - 3:510.47.03-1 -- Update to 510.47.03. - -* Tue Dec 14 2021 Simone Caronni - 3:495.46-1 -- Update to 495.46. - -* Tue Nov 02 2021 Simone Caronni - 3:495.44-1 -- Update to 495.44. - -* Tue Nov 02 2021 Simone Caronni - 3:470.82.00-1 -- Update to 470.82.00. - -* Tue Sep 21 2021 Simone Caronni - 3:470.74-1 -- Update to 470.74. - -* Wed Aug 11 2021 Simone Caronni - 3:470.63.01-1 -- Update to 470.63.01. - -* Tue Jul 20 2021 Simone Caronni - 3:470.57.02-1 -- Update to 470.57.02. - -* Wed Jun 30 2021 Simone Caronni - 3:470.42.01-1 -- Update to 470.42.01. - -* Wed May 26 2021 Simone Caronni - 3:465.31-1 -- Update to 465.31. - -* Sat May 01 2021 Simone Caronni - 3:465.27-1 -- Update to 465.27. - -* Sun Apr 18 2021 Simone Caronni - 3:465.24.02-1 -- Update to 465.24.02. -- Switch to github sources. - -* Fri Apr 09 2021 Simone Caronni - 3:465.19.01-1 -- Update to 465.19.01. - -* Fri Mar 19 2021 Simone Caronni - 3:460.67-1 -- Update to 460.67. - -* Mon Mar 01 2021 Simone Caronni - 3:460.56-1 -- Update to 460.56. - -* Wed Jan 27 2021 Simone Caronni - 3:460.39-1 -- Update to 460.39. - -* Thu Jan 7 2021 Simone Caronni - 3:460.32.03-1 -- Update to 460.32.03. - -* Sun Dec 20 2020 Simone Caronni - 3:460.27.04-1 -- Update to 460.27.04. -- Trim changelog. - -* Mon Dec 07 2020 Simone Caronni - 3:455.45.01-2 -- Use autoseptup macro. - -* Wed Nov 18 2020 Simone Caronni - 3:455.45.01-1 -- Update to 455.45.01. - -* Mon Nov 02 2020 Simone Caronni - 3:455.38-1 -- Update to 455.38. - -* Mon Oct 12 2020 Simone Caronni - 3:455.28-1 -- Update to 455.28. - -* Tue Oct 06 2020 Simone Caronni - 3:450.80.02-1 -- Update to 450.80.02. - -* Thu Aug 20 2020 Simone Caronni - 3:450.66-1 -- Update to 450.66. - -* Fri Jul 10 2020 Simone Caronni - 3:450.57-1 -- Update to 450.57. - -* Thu Jun 25 2020 Simone Caronni - 3:440.100-1 -- Update to 440.100. - -* Thu Apr 09 2020 Simone Caronni - 3:440.82-1 -- Update to 440.82. - -* Fri Feb 28 2020 Simone Caronni - 3:440.64-1 -- Update to 440.64. - -* Tue Feb 04 2020 Simone Caronni - 3:440.59-1 -- Update to 440.59. - -* Sat Dec 14 2019 Simone Caronni - 3:440.44-1 -- Update to 440.44. - -* Sat Nov 30 2019 Simone Caronni - 3:440.36-1 -- Update to 440.36. - -* Sat Nov 09 2019 Simone Caronni - 3:440.31-1 -- Update to 440.31. - -* Thu Oct 17 2019 Simone Caronni - 3:440.26-1 -- Update to 440.26. - -* Mon Sep 02 2019 Simone Caronni - 3:435.21-1 -- Update to 435.21. - -* Thu Aug 22 2019 Simone Caronni - 3:435.17-1 -- Update to 435.17. - -* Wed Jul 31 2019 Simone Caronni - 3:430.40-1 -- Update to 430.40. - -* Fri Jul 12 2019 Simone Caronni - 3:430.34-1 -- Update to 430.34. - -* Wed Jun 12 2019 Simone Caronni - 3:430.26-1 -- Update to 430.26. - -* Sat May 18 2019 Simone Caronni - 3:430.14-1 -- Update to 430.14. - -* Thu May 09 2019 Simone Caronni - 3:418.74-1 -- Update to 418.74. - -* Sun Mar 24 2019 Simone Caronni - 3:418.56-1 -- Update to 418.56. - -* Fri Feb 22 2019 Simone Caronni - 3:418.43-1 -- Update to 418.43. -- Trim changelog. - -* Wed Feb 06 2019 Simone Caronni - 3:418.30-1 -- Update to 418.30. - -* Thu Jan 17 2019 Simone Caronni - 3:415.27-1 -- Update to 415.27. +%autochangelog diff --git a/anda/system/nvidia/nvidia-persistenced/nvidia-persistenced.spec b/anda/system/nvidia/nvidia-persistenced/nvidia-persistenced.spec index 00442366b8..6efe1a8c24 100644 --- a/anda/system/nvidia/nvidia-persistenced/nvidia-persistenced.spec +++ b/anda/system/nvidia/nvidia-persistenced/nvidia-persistenced.spec @@ -1,6 +1,6 @@ Name: nvidia-persistenced Version: 580.119.02 -Release: 1%?dist +Release: 2%?dist Summary: A daemon to maintain persistent software state in the NVIDIA driver Epoch: 3 License: GPLv2+ diff --git a/anda/system/nvidia/nvidia-settings/nvidia-settings.spec b/anda/system/nvidia/nvidia-settings/nvidia-settings.spec index 83edc40e59..89cf91cffc 100644 --- a/anda/system/nvidia/nvidia-settings/nvidia-settings.spec +++ b/anda/system/nvidia/nvidia-settings/nvidia-settings.spec @@ -1,6 +1,6 @@ Name: nvidia-settings Version: 580.119.02 -Release: 1%?dist +Release: 2%?dist Summary: Configure the NVIDIA graphics driver Epoch: 3 License: GPLv2+ @@ -406,4 +406,4 @@ appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/%{name}.appda - Update to 418.30. * Thu Jan 17 2019 Simone Caronni - 3:415.27-1 -- Update to 415.27. \ No newline at end of file +- Update to 415.27. diff --git a/anda/system/nvidia/nvidia-xconfig/nvidia-xconfig.spec b/anda/system/nvidia/nvidia-xconfig/nvidia-xconfig.spec index 011bac0cb3..99878c9144 100644 --- a/anda/system/nvidia/nvidia-xconfig/nvidia-xconfig.spec +++ b/anda/system/nvidia/nvidia-xconfig/nvidia-xconfig.spec @@ -1,6 +1,6 @@ Name: nvidia-xconfig Version: 580.119.02 -Release: 1%?dist +Release: 2%?dist Summary: NVIDIA X configuration file editor Epoch: 3 License: GPLv2+ @@ -304,4 +304,4 @@ make %{?_smp_mflags} \ - Update to 418.30. * Thu Jan 17 2019 Simone Caronni - 3:415.27-1 -- Update to 415.27. \ No newline at end of file +- Update to 415.27. diff --git a/andax/nvidia.rhai b/andax/nvidia.rhai index 03d82bea6a..613181faa3 100644 --- a/andax/nvidia.rhai +++ b/andax/nvidia.rhai @@ -16,3 +16,8 @@ fn nvidia_driver_version() { let driver = get("https://gfwsl.geforce.com/services_toolkit/services/com/nvidia/services/AjaxDriverService.php?func=DriverManualLookup&osID=12&languageCode=1033&numberOfResults=1&beta=0").json().IDS[0].downloadInfo.DisplayVersion; return(driver); } + +fn nvidia_legacy_version() { + let driver = get("https://gfwsl.geforce.com/services_toolkit/services/com/nvidia/services/AjaxDriverService.php?func=DriverManualLookup&osID=12&languageCode=1033&numberOfResults=1&beta=0&release=580").json().IDS[0].downloadInfo.DisplayVersion; + return(driver); +} diff --git a/andax/nvidia_driver_print.rhai b/andax/nvidia_driver_print.rhai index 4882ab2bc3..9cab449bdb 100644 --- a/andax/nvidia_driver_print.rhai +++ b/andax/nvidia_driver_print.rhai @@ -1,3 +1,4 @@ import "andax/nvidia.rhai" as nvidia; -print(nvidia::nvidia_driver_version()); \ No newline at end of file +print(nvidia::nvidia_driver_version()); +print(nvidia::nvidia_legacy_version());