mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6e0b4a8c66 |
@@ -0,0 +1 @@
|
||||
124.13.1
|
||||
@@ -0,0 +1 @@
|
||||
6.12.0
|
||||
@@ -0,0 +1,10 @@
|
||||
project pkg {
|
||||
rpm {
|
||||
spec = "kmod-nvidia.spec"
|
||||
}
|
||||
labels {
|
||||
subrepo = "nvidia"
|
||||
mock = 1
|
||||
updbranch = 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
From 38b7e1478b58b983724ec817562301edd5c244a2 Mon Sep 17 00:00:00 2001
|
||||
From: Neal Gompa <ngompa@almalinux.org>
|
||||
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 <ngompa@almalinux.org>
|
||||
---
|
||||
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
|
||||
@@ -0,0 +1,12 @@
|
||||
--- 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
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
%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: 590.48.01
|
||||
Release: 1%?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
|
||||
export EXTRA_CFLAGS+=" -Wno-incompatible-pointer-types"
|
||||
|
||||
%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
|
||||
@@ -0,0 +1,20 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user