-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkmod-nvidia.spec
340 lines (242 loc) · 10.6 KB
/
kmod-nvidia.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
%global kmod_name nvidia
%global debug_package %{nil}
# Generate kernel symbols requirements:
%global _use_internal_dependency_generator 0
%define __spec_install_post \
%{__arch_install_post}\
%{__os_install_post}\
%{__mod_compress_install_post}
%define __mod_compress_install_post \
if [ $kernel_version ]; then \
find %{buildroot} -type f -name '*.ko' | xargs %{__strip} --strip-debug; \
find %{buildroot} -type f -name '*.ko' | xargs xz; \
fi
%{!?kversion: %global kversion %(uname -r)}
Name: kmod-%{kmod_name}
Version: 570.86.15
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/%{version}/open-gpu-kernel-modules-%{version}.tar.gz
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} 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.*
%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$') )
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$' > %{_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
* Mon Jan 27 2025 Simone Caronni <[email protected]> - 3:570.86.15-1
- Update to 570.86.15.
- Switch to open modules, required for Blackwell.
* Mon Dec 09 2024 Simone Caronni <[email protected]> - 3:565.77-1
- Update to 565.77.
- Rename source package from nvidia-kmod to kmod-nvidia, the former is now used
for the akmods variant.
- Use /usr/lib/modules for installing kernel modules and not /lib/modules.
* Sat Oct 26 2024 Simone Caronni <[email protected]> - 3:565.57.01-1
- Update to 565.57.01.
* Wed Sep 04 2024 Simone Caronni <[email protected]> - 3:560.35.03-1
- Update to 560.35.03.
* Tue Jul 02 2024 Simone Caronni <[email protected]> - 3:555.58.02-1
- Update to 555.58.02.
* Fri Jun 28 2024 Simone Caronni <[email protected]> - 3:555.58-1
- Update to 555.58.
* Wed Jun 05 2024 Simone Caronni <[email protected]> - 3:550.90.07-1
- Update to 550.90.07.
* Fri Apr 26 2024 Simone Caronni <[email protected]> - 3:550.78-1
- Update to 550.78.
* Thu Apr 18 2024 Simone Caronni <[email protected]> - 3:550.76-1
- Update to 550.76.
* Sun Mar 24 2024 Simone Caronni <[email protected]> - 3:550.67-1
- Update to 550.67.
* Sat Mar 09 2024 Simone Caronni <[email protected]> - 3:550.54.14-2
- Enable aarch64.
* Sun Mar 03 2024 Simone Caronni <[email protected]> - 3:550.54.14-1
- Update to 550.54.14.
* Thu Nov 23 2023 Simone Caronni <[email protected]> - 3:545.29.06-1
- Update to 545.29.06.
* Tue Oct 31 2023 Simone Caronni <[email protected]> - 3:545.29.02-1
- Update to 545.29.02.
* Wed Oct 18 2023 Simone Caronni <[email protected]> - 3:545.23.06-1
- Update to 545.23.06.
* Fri Sep 22 2023 Simone Caronni <[email protected]> - 3:535.113.01-1
- Update to 535.113.01.
* Thu Aug 24 2023 Simone Caronni <[email protected]> - 3:535.104.05-1
- Update to 535.104.05.
* Wed Aug 09 2023 Simone Caronni <[email protected]> - 3:535.98-1
- Update to 535.98.
* Wed Jul 19 2023 Simone Caronni <[email protected]> - 3:535.86.05-1
- Update to 535.86.05.
* Thu Jun 15 2023 Simone Caronni <[email protected]> - 3:535.54.03-1
- Update to 535.54.03.
* Fri May 12 2023 Simone Caronni <[email protected]> - 3:525.116.04-1
- Update to 525.116.04.
* Mon May 01 2023 Simone Caronni <[email protected]> - 3:525.116.03-1
- Update to 525.116.03.
* Fri Feb 10 2023 Simone Caronni <[email protected]> - 3:525.89.02-1
- Update to 525.89.02.
* Fri Jan 20 2023 Simone Caronni <[email protected]> - 3:525.85.05-1
- Update to 525.85.05.
* Mon Jan 09 2023 Simone Caronni <[email protected]> - 3:525.78.01-1
- Update to 525.78.01.
* Tue Nov 29 2022 Simone Caronni <[email protected]> - 3:525.60.11-1
- Update to 525.60.11.
* Sun Oct 30 2022 Simone Caronni <[email protected]> - 3:520.56.06-1
- Update to 520.56.06.
* Wed Sep 21 2022 Simone Caronni <[email protected]> - 3:515.76-1
- Update to 515.76.
* Mon Aug 08 2022 Simone Caronni <[email protected]> - 3:515.65.01-1
- Update to 515.65.01.
* Wed Jun 29 2022 Simone Caronni <[email protected]> - 3:515.57-1
- Update to 515.57.
* Thu Jun 09 2022 Simone Caronni <[email protected]> - 3:515.48.07-1
- Update to 515.48.07.
* Tue May 31 2022 Simone Caronni <[email protected]> - 3:510.73.05-1
- Update to 510.73.05.
* Mon May 16 2022 Simone Caronni <[email protected]> - 3:510.68.02-2
- Rebuild for latest kernels.
* Mon May 02 2022 Simone Caronni <[email protected]> - 3:510.68.02-1
- Update to 510.68.02.
* Mon Mar 28 2022 Simone Caronni <[email protected]> - 3:510.60.02-1
- Update to 510.60.02.
* Tue Feb 15 2022 Simone Caronni <[email protected]> - 3:510.54-1
- Update to 510.43.
* Wed Feb 02 2022 Simone Caronni <[email protected]> - 3:510.47.03-1
- Update to 510.47.03.
* Tue Dec 14 2021 Simone Caronni <[email protected]> - 3:495.46-1
- Update to 495.46.
* Tue Nov 02 2021 Simone Caronni <[email protected]> - 3:495.44-1
- Update to 495.44.
* Tue Nov 02 2021 Simone Caronni <[email protected]> - 3:470.82.00-1
- Update to 470.82.00.
* Tue Sep 21 2021 Simone Caronni <[email protected]> - 3:470.74-1
- Update to 470.74.
* Thu Aug 19 2021 Simone Caronni <[email protected]> - 3:470.63.01-2
- Fix compression, add stripping.
- Add missing build requirement for correctly adding kernel symbols as
requirements.
- Simplify SPEC file.
* Wed Aug 11 2021 Simone Caronni <[email protected]> - 3:470.63.01-1
- Update to 470.63.01.
* Tue Jul 20 2021 Simone Caronni <[email protected]> - 3:470.57.02-1
- Update to 470.57.02.
* Mon Jun 07 2021 Simone Caronni <[email protected]> - 3:460.84-1
- Update to 460.84.
* Wed May 12 2021 Simone Caronni <[email protected]> - 3:460.80-1
- Update to 460.80.
* Sun Apr 18 2021 Simone Caronni <[email protected]> - 3:460.73.01-1
- Update to 460.73.01.
* Fri Mar 19 2021 Simone Caronni <[email protected]> - 3:460.67-1
- Update to 460.67.
* Mon Mar 01 2021 Simone Caronni <[email protected]> - 3:460.56-1
- Update to 460.56.
* Wed Jan 27 2021 Simone Caronni <[email protected]> - 3:460.39-1
- Update to 460.39.
* Wed Jan 13 2021 Simone Caronni <[email protected]> - 3:460.32.03-2
- Merge kmodtool script into SPEC file and remove obsolete stuff.
* Thu Jan 7 2021 Simone Caronni <[email protected]> - 3:460.32.03-1
- Update to 460.32.03.
* Sun Dec 20 2020 Simone Caronni <[email protected]> - 3:460.27.04-1
- Update to 460.27.04.
- Trim changelog.
* Mon Dec 07 2020 Simone Caronni <[email protected]> - 3:450.80.02-2
- Drop support for CentOS/RHEL 6.
* Tue Oct 06 2020 Simone Caronni <[email protected]> - 3:450.80.02-1
- Update to 450.80.02.
* Thu Aug 20 2020 Simone Caronni <[email protected]> - 3:450.66-1
- Update to 450.66.
* Fri Jul 10 2020 Simone Caronni <[email protected]> - 3:450.57-1
- Update to 450.57.
* Thu Jun 25 2020 Simone Caronni <[email protected]> - 3:440.100-1
- Update to 440.100.
* Thu Apr 09 2020 Simone Caronni <[email protected]> - 3:440.82-1
- Update to 440.82.
* Fri Feb 28 2020 Simone Caronni <[email protected]> - 3:440.64-1
- Update to 440.64.
* Tue Feb 04 2020 Simone Caronni <[email protected]> - 3:440.59-1
- Update to 440.59.
* Sun Feb 02 2020 Simone Caronni <[email protected]> - 3:440.44-2
- Rebuild for CentOS/RHEL 8.1 kernels.
* Sat Dec 14 2019 Simone Caronni <[email protected]> - 3:440.44-1
- Update to 440.44.
* Sat Nov 30 2019 Simone Caronni <[email protected]> - 3:440.36-1
- Update to 440.36.
* Mon Nov 11 2019 Simone Caronni <[email protected]> - 3:440.31-1
- Update to 440.31.
* Tue Oct 01 2019 Simone Caronni <[email protected]> - 3:435.21-1
- Update to 435.21.
* Fri Sep 20 2019 Simone Caronni <[email protected]> - 3:430.50-2
- Build for 7.7 kernels.
* Sat Sep 14 2019 Simone Caronni <[email protected]> - 3:430.50-1
- Update to 430.50.
* Wed Jul 31 2019 Simone Caronni <[email protected]> - 3:430.40-1
- Update to 430.40.
* Fri Jul 12 2019 Simone Caronni <[email protected]> - 3:430.34-1
- Update to 430.34.
* Wed Jun 12 2019 Simone Caronni <[email protected]> - 3:430.26-1
- Update to 430.26.
* Fri Jun 07 2019 Simone Caronni <[email protected]> - 3:430.14-1
- Update to 430.14.
* Thu May 09 2019 Simone Caronni <[email protected]> - 3:418.74-1
- Update to 418.74.
* Sun Mar 24 2019 Simone Caronni <[email protected]> - 3:418.56-1
- Update to 418.56.
- Change logic for kernel versions.
* Fri Feb 22 2019 Simone Caronni <[email protected]> - 3:418.43-1
- Update to 418.43.
- Trim changelog.
* Sun Feb 03 2019 Simone Caronni <[email protected]> - 3:410.93-2
- Do not require nvidia-driver, require nvidia-kmod-common.
* Fri Jan 04 2019 Simone Caronni <[email protected]> - 3:410.93-1
- Update to 410.93.