Normalize NVIDIA library paths to /usr/lib/#425
Conversation
|
Can we have separate commits for each kmod. Also the commit is not signed and doesn't have Signed-off-by. |
3b33a61 to
66fe31d
Compare
|
Split up commits for each kmod. Signed commits and added |
66fe31d to
a06d78e
Compare
|
Force push to fix merge conflicts |
| %dir %{_cross_libexecdir}/nvidia | ||
| %dir %{_cross_libdir}/nvidia | ||
| %dir %{_cross_libdir}/nvidia/tesla | ||
| %{_cross_libdir}/nvidia/tesla/* |
There was a problem hiding this comment.
Can we list the files explicitly instead of using *?
The %{_cross_libdir}/nvidia/tesla/* glob removes a safety check we rely on today. Right now every .so is listed by name, and the install step in spec file has this comment:
# We install all the libraries, and filter them out in the 'files' section,
# so we can catch when new libraries are added
If NVIDIA adds a new library in a future driver, the build fails on unpackaged files and we get to decide whether to ship it. With tesla/*, anything new silently lands in the image and %exclude is the only thing in the way.
This applies to other spec file in the review.
There was a problem hiding this comment.
This glob should be fine to keep. The expanded list is now in %{_cross_libdir} so we won't miss libraries
| done | ||
|
|
||
| # Create per-library symlinks in nvidia/tesla/ for backwards compatibility | ||
| for lib in $(find %{buildroot}/%{_cross_libdir} -maxdepth 1 -type f -name '*.so*' -printf '%%P\n'); do |
There was a problem hiding this comment.
You could move this to the for above, before the soname check.
| %dir %{_cross_libexecdir}/nvidia | ||
| %dir %{_cross_libdir}/nvidia | ||
| %dir %{_cross_libdir}/nvidia/tesla | ||
| %{_cross_libdir}/nvidia/tesla/* |
There was a problem hiding this comment.
This glob should be fine to keep. The expanded list is now in %{_cross_libdir} so we won't miss libraries
| done | ||
|
|
||
| # Create per-library symlinks in nvidia/tesla/ for backwards compatibility | ||
| for lib in $(find %{buildroot}/%{_cross_libdir} -maxdepth 1 -type f -name '*.so*' -printf '%%P\n'); do |
There was a problem hiding this comment.
Same as elsewhere, you could include this line in the for above.
Move nvidia libraries from /usr/lib/nvidia/tesla/ to the standard /usr/lib/ path. Create backwards-compatibility symlinks in /usr/lib/nvidia/tesla/ pointing back to /usr/lib/. Remove nvidia-ld.so.conf.in (Source302) and its references since libraries are now in the standard linker search path. Remove the tmpfiles entry for the nvidia/tesla directory. Signed-off-by: Maher Homsi <maherhom@amazon.com>
Move nvidia libraries from /usr/lib/nvidia/tesla/ to the standard /usr/lib/ path. Create backwards-compatibility symlinks in /usr/lib/nvidia/tesla/ pointing back to /usr/lib/. Remove nvidia-ld.so.conf.in (Source302) and its references since libraries are now in the standard linker search path. Remove the tmpfiles entry for the nvidia/tesla directory. Signed-off-by: Maher Homsi <maherhom@amazon.com>
Move nvidia libraries from /usr/lib/nvidia/tesla/ to the standard /usr/lib/ path. Create backwards-compatibility symlinks in /usr/lib/nvidia/tesla/ pointing back to /usr/lib/. Remove nvidia-ld.so.conf.in (Source302) and its references since libraries are now in the standard linker search path. Remove the tmpfiles entry for the nvidia/tesla directory. Signed-off-by: Maher Homsi <maherhom@amazon.com>
a06d78e to
5a61475
Compare
|
Force push: Addresses above comments to move symlink creation into the existing for-loop across all three spec files (6.1, 6.12, 6.18) |
Merge with bottlerocket-os/bottlerocket-core-kit#919
Description of changes:
Normalize NVIDIA library installation paths from
/usr/lib/nvidia/tesla/to the standard/usr/lib/path. Create backwards-compatibility symlinks in/usr/lib/nvidia/tesla/pointing back to/usr/lib/for workloads thatreference the legacy path.Changes across kmod-6.1-nvidia-r580, kmod-6.12-nvidia-r580, and kmod-6.18-nvidia-r580:
nvidia/tesla/subdirectory to/usr/lib/directly%{_cross_libdir}/nvidia/tesla/*to%filesfor the backwards-compat symlinksnvidia-ld.so.conf.in(Source302) and all references — no longer needed since libraries are in the standard linker search pathnvidia/teslatmpfiles directory entryTesting done:
/usr/lib/, symlinks at/usr/lib/nvidia/tesla/→../../<lib>/usr/lib/, symlinks at/usr/lib/nvidia/tesla/→/usr/lib/<lib>Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.