Skip to content

NVIDIA kernel module common files packaging for RHEL

License

Notifications You must be signed in to change notification settings

NVIDIA/yum-packaging-nvidia-kmod-common

Repository files navigation

yum packaging nvidia kmod common

License Contributing

Overview

Packaging templates for yum and dnf based Linux distros providing common configuration files for NVIDIA driver packages.

The main branch contains this README. The .spec, .conf, and .rules files can be found in the appropriate rhel7, rhel8, and fedora branches.

Table of Contents

Deliverables

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 in 460.32.03

  • RHEL8 or Fedora streams: XXX, XXX-dkms, latest, and latest-dkms
nvidia-kmod-common-${driver}-${rel}.${distro}.noarch.rpm
> ex: nvidia-kmod-common-460.32.03-1.el8.noarch.rpm
  • RHEL7 flavors: branch-XXX, latest, and latest-dkms
nvidia-kmod-common-${driver}-${rel}.${distro}.${arch}.rpm
> ex: nvidia-kmod-common-460.32.03-1.el7.x86_64.rpm
  • These common files include:
    - /usr/lib/dracut/dracut.conf.d/99-nvidia.conf
    - /usr/lib/modprobe.d/nvidia.conf
    - /usr/lib/udev/rules.d/60-nvidia.rules

Prerequisites

Clone this git repository:

Supported branches: rhel7, rhel8 & fedora

git clone -b ${branch} https://github.com/NVIDIA/yum-packaging-nvidia-kmod-common
> ex: git clone -b rhel8 https://github.com/NVIDIA/yum-packaging-nvidia-kmod-common

Install build dependencies

# Packaging
yum install rpm-build

Building with script

Fetch script from main branch

cd yum-packaging-nvidia-kmod-common
git checkout remotes/origin/main -- build.sh

Usage

note: runfile is only used to determine version

./build.sh [$version | path/to/*.run]
> ex: time ./build.sh 450.102.04
> ex: time ./build.sh ~/Downloads/NVIDIA-Linux-x86_64-450.102.04.run

Building Manually

Packaging

mkdir BUILD BUILDROOT RPMS SRPMS SOURCES SPECS
cp 60-nvidia.rules SOURCES/
cp 99-nvidia.conf SOURCES/
cp nvidia.conf SOURCES/
cp nvidia-kmod-common.spec SPECS/

rpmbuild \
    --define "%_topdir $(pwd)" \
    --define "debug_package %{nil}" \
    --define "version $version" \
    --define "epoch 3" \
    --target "noarch" \
    -v -bb SPECS/nvidia-kmod-common.spec

note: noarch as only text files, works for any architecture

Related

DKMS nvidia

NVIDIA driver

NVIDIA modprobe

NVIDIA persistenced

NVIDIA plugin

NVIDIA precompiled kmod

NVIDIA settings

NVIDIA xconfig

Contributing

See CONTRIBUTING.md

Releases

No releases published

Packages

No packages published

Languages