Repository navigation
feat(nvidia): record nvidia package contents - #2865
Merged
Merged
Conversation
lawraa
requested review from
kummatty and
mselim00
and removed request for
kummatty
October 26, 2026 17:39
lawraa
force-pushed
the
nvidia-tree-manifest
branch
from
October 30, 2026 21:13
c15efdc to
b50e54c
Compare
kummatty
approved these changes
Nov 2, 2026
| PACKAGE_VERSION=$(sudo rpm --query --package --queryformat '%{VERSION}' "$RPM") | ||
| SCRIPTS=$(sudo rpm --query --package --scripts --triggers --filetriggers "$RPM") | ||
| # the file list goes through stdin because it can be too long for an argument | ||
| echo "$(sudo rpm --query --package --queryformat '[%{FILENAMES}\n]' "$RPM" | grep -v '^/usr/src/' \ |
Contributor
There was a problem hiding this comment.
We don't really care about all the files. We do explicitly copy out all the files within /usr/bin, /usr/lib64 and /usr/share during out boot.
So its only files outside these (and /usr/src), that we care about. Nit, In case the json can be made smaller ( i would assume most files to be in /usr/lib64)
Contributor
Author
There was a problem hiding this comment.
Thanks for the review, done in f359bf9, the file now leaves out /usr/bin, /usr/lib64, /usr/share and /usr/src.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
generate-version-info.shwritesnvidia-package-contents.json: for each NVIDIA driver in the AMI, its version, and for each of its rpms the version, files.<ami_name>-nvidia-package-contents.json{}.Example
nvidia-package-contents.json(trimmed to one package and one kmod):{ "lts": { "driver_version": "580.178.04", "packages": { "nvidia-persistenced": { "version": "580.178.04", "files": [ "/usr/lib/.build-id", "/usr/lib/.build-id/e3", "/usr/lib/.build-id/e3/34cc7b05850a440c15910224e12ca286d02179", "/usr/lib/systemd/system/nvidia-persistenced.service" ], "scripts": "preinstall scriptlet (using /bin/sh):\n..." } }, "kmods": { "kmod-nvidia-open-dkms": { "version": "580.178.04", "files": [], "scripts": "postinstall scriptlet (using /bin/sh):\ndkms add -m nvidia -v 580.178.04 -q --rpm_safe_upgrade || :" } } } }By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Testing Done
make lint-codeandpacker validate(standard andenable_accelerator=nvidia){}