Packaging templates for yum
and dnf
based Linux distros to build NVIDIA persistenced packages.
The main
branch contains this README. The .spec
, .service
, and .init
files can be found in the appropriate rhel7, rhel8, and fedora branches.
This repo contains the .spec
file used to build the following RPM packages:
note:
XXX
is the first.
delimited field in the driver version, ex:460
in460.32.03
- RHEL8 or Fedora streams:
XXX
,XXX-dkms
,latest
, andlatest-dkms
nvidia-persistenced
For RHEL7 and derivatives, there are three sets of packages with different package dependencies.
The latest
and latest-dkms
flavors always update to the highest versioned driver, while the branch-XXX
flavor locks driver updates to the specified driver branch.
- RHEL7 flavor:
latest-dkms
nvidia-driver-latest-dkms-persistenced
note:
XXX-dkms
is not supported for RHEL7
To use the precompiled flavors latest
and branch-XXX
, use yum-packaging-precompiled-kmod to build kmod-nvidia-latest
or kmod-nvidia-branch-XXX
kernel modules for a specific kernel and driver combination.
- RHEL7 flavor:
latest
nvidia-driver-latest-persistenced
- RHEL7 flavor:
branch-XXX
nvidia-driver-branch-XXX-persistenced
Supported branches: rhel7
, rhel8
& fedora
git clone -b ${branch} https://github.com/NVIDIA/yum-packaging-nvidia-persistenced
> ex: git clone -b rhel8 https://github.com/NVIDIA/yum-packaging-nvidia-persistenced
-
Source code location: https://github.com/NVIDIA/nvidia-persistenced/releases
ex: https://github.com/NVIDIA/nvidia-persistenced/archive/460.32.03.tar.gz
ex: https://github.com/NVIDIA/nvidia-persistenced/archive/460.56.tar.gz
# Compilation
yum install m4 gcc
# Misc
yum install libtirpc-devel
# Packaging
yum install rpm-build
cd yum-packaging-nvidia-persistenced
git checkout remotes/origin/main -- build.sh
./build.sh [$version | path/to/*.tar.{gz,bz2} | path/to/*.run]
> ex: time ./build.sh 460.32.03
> ex: time ./build.sh ~/Downloads/nvidia-persistenced-450.102.04.tar.bz2
> ex: time ./build.sh ~/Downloads/nvidia-persistenced-460.32.03.tar.gz
> ex: time ./build.sh ~/Downloads/NVIDIA-Linux-x86_64-450.102.04.run
note: runfile is only used to determine version
note:
fedora
&rhel8
-based distros
mkdir BUILD BUILDROOT RPMS SRPMS SOURCES SPECS
cp *init* SOURCES/
cp *.service SOURCES/
cp nvidia-persistenced-${version}.tar.gz SOURCES/
cp nvidia-persistenced.spec SPECS/
rpmbuild \
--define "%_topdir $(pwd)" \
--define "debug_package %{nil}" \
--define "version $version" \
--define "epoch 3" \
--define "extension gz" \
-v -bb SPECS/nvidia-persistenced.spec
note:
rhel7
-based distros
mkdir BUILD BUILDROOT RPMS SRPMS SOURCES SPECS
cp *init* SOURCES/
cp *.service SOURCES/
cp nvidia-persistenced-${version}.tar.gz SOURCES/
cp nvidia-persistenced.spec SPECS/
# latest-dkms
rpmbuild \
--define "%_topdir $(pwd)" \
--define "debug_package %{nil}" \
--define "version $version" \
--define "driver_branch latest-dkms" \
--define "is_dkms 1" \
--define "is_latest 1" \
--define "epoch 3" \
--define "extension gz" \
-v -bb SPECS/nvidia-persistenced.spec
# latest
rpmbuild \
--define "%_topdir $(pwd)" \
--define "debug_package %{nil}" \
--define "version $version" \
--define "driver_branch latest" \
--define "is_dkms 0" \
--define "is_latest 1" \
--define "epoch 3" \
--define "extension gz" \
-v -bb SPECS/nvidia-persistenced.spec
# branch-460
rpmbuild \
--define "%_topdir $(pwd)" \
--define "debug_package %{nil}" \
--define "version $version" \
--define "driver_branch branch-460" \
--define "is_dkms 0" \
--define "is_latest 0" \
--define "epoch 3" \
--define "extension gz" \
-v -bb SPECS/nvidia-persistenced.spec
- nvidia-driver
- nvidia-modprobe
- dnf-plugin-nvidia & yum-plugin-nvidia
- Precompiled kernel modules
- nvidia-settings
- nvidia-xconfig
See CONTRIBUTING.md