Introduce and use hack/sync-nv-rpms.sh#3
Conversation
|
/hold Growing list of deps that need to land first... Any help would be appreciated.
|
|
/close |
Introduce a script to sync NV-variant RPMs (el10nv) for libvirt and qemu-kvm from the CentOS Stream 10 internal koji build system. The script discovers the latest el10nv builds, downloads RPMs to compute SHA-256 checksums and epochs, then updates WORKSPACE with new rpm() entries and rpm/BUILD.bazel with el10nv package references for x86_64 and aarch64 cs10 rpmtree targets. s390x targets are left unchanged. Signed-off-by: Lee Yarwood <lyarwood@redhat.com> Assisted-By: Claude <noreply@anthropic.com>
Generated by hack/sync-nv-rpms.sh. Adds 31 el10nv rpm() entries to WORKSPACE and updates 44 references in rpm/BUILD.bazel cs10 rpmtree targets for x86_64 and aarch64. s390x targets continue to use standard el10 packages. libvirt 11.10.0-10.1.el10nv (x86_64, aarch64) qemu-kvm 10.1.0-12.el10nv (x86_64, aarch64) Signed-off-by: Lee Yarwood <lyarwood@redhat.com> Assisted-By: Claude <noreply@anthropic.com>
|
Latest changes are just shfmt fixes I missed in the original submission, the actual builds and e2e tests were both successful thankfully. |
|
/test pull-kubevirt-aie-kind-1.35-sig-compute-arm64-1.8-aie-nv |
FWIW this was backported early to this branch once approved on main through #4.
With this all in place I think this is ready to merge early next week now. /hold cancel |
jean-edouard
left a comment
There was a problem hiding this comment.
This script is intense... Also highly experimental and dependent on the layout of external webpages.
I love awk as a parser, but the awk code needs a lot of comments, nobody is fluent in that language (anymore?). I'd also suggest moving it to its own .awk file.
At a higher level, what this script does sounds very similar to hack/rpm-deps.sh, except that hack/rpm-deps.sh is super simple. Is there maybe a way to use more similar logic?
Thanks
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
| # Copyright 2025 Red Hat, Inc. |
There was a problem hiding this comment.
Don't we want to use usual Kubevirt copyright wording? Either way, year needs +1
Thanks @jean-edouard, yeah appreciate it's awful but in the context of a one off effort having to pull in builds from koji without underlying repos I thought it was acceptable. I can regenerate the script in bash if you think it would be easier to maintain on this branch?
It's unfortunately very different without access to actual repos and we ultimately don't want to modify the |
Fix the copyright header year (2025 -> 2026) and extract the inline awk script into hack/sync-nv-rpms-update-workspace.awk with comments to help maintainers understand the WORKSPACE update logic. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Lee Yarwood <lyarwood@redhat.com>
If doing things the rpm-deps way isn't feasible, at least we should:
Ultimately, this is just a maintenance script, not something that users, or even regular devs, are expected to use.
I'm not saying we should overload rpm-deps.sh, I just don't understand why we can't use similar mechanisms (basically bazeldnf) to update the RPMs instead of all that sed/awk. |
I'm not sure why, this isn't kubevirt/kubevirt and in the context of this branch this is a required script.
ACK done.
Ultimately There are a few command line options, the original |
That sounds great! I'll have another look at the scripts. Thanks |
jean-edouard
left a comment
There was a problem hiding this comment.
I can't find anything particularly wrong in the scripts. I did my best and reviewed this line by line, but honestly the cognitive complexity here is beyond what my small human brain can handle, so I'm approving without a clear big-picture view.
It's ok because:
- This is a maintenance script
- In a separate repo
- The second commit proves it works, and nothing will immediately break if it stops working
I just really hope all PRs don't become this convoluted in the near future.....
/approve
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jean-edouard, lyarwood The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
| local tmpfile="${TMPDIR}/${rpm_filename}" | ||
|
|
||
| echo " ${rpm_filename}" | ||
| curl -sSL -o "${tmpfile}" "${rpm_url}" |
There was a problem hiding this comment.
Should we verify GPG signatures?
There was a problem hiding this comment.
These packages aren't signed so we can't unfortunately:
$ rpm -K qemu-kvm-10.1.0-12.el10nv.x86_64.rpm
qemu-kvm-10.1.0-12.el10nv.x86_64.rpm: digests OK
$ rpm -qip qemu-kvm-10.1.0-12.el10nv.x86_64.rpm
Name : qemu-kvm
Epoch : 19
Version : 10.1.0
Release : 12.el10nv
Architecture: x86_64
Install Date: (not installed)
Group : Unspecified
Size : 0
License : GPL-2.0-only AND GPL-2.0-or-later AND CC-BY-3.0
Signature : (none)
Source RPM : qemu-kvm-10.1.0-12.el10nv.src.rpm
Build Date : Tue 17 Feb 2026 17:59:38 GMT
Build Host : x86-04.stream.rdu2.redhat.com
Packager : builder@centos.org
Vendor : CentOS
URL : http://www.qemu.org/
Summary : QEMU is a machine emulator and virtualizer
Description :
qemu-kvm is an open source virtualizer that provides hardware
emulation for the KVM hypervisor. qemu-kvm acts as a virtual
machine monitor together with the KVM kernel modules, and emulates the
hardware for a full system such as a PC and its associated peripherals.
|
/lgtm |
What this PR does
Before this PR:
The kubevirt-aie project uses standard el10 RPMs from CentOS Stream 10 mirrors for libvirt and qemu-kvm packages across all architectures.
After this PR:
A new
hack/sync-nv-rpms.shscript automates syncing NV-variant RPMs (el10nv dist tag) for libvirt and qemu-kvm from the CentOS Stream 10 koji build system. The el10nv packages replace the standard el10 packages in x86_64 and aarch64 cs10 rpmtree targets. s390x targets continue to use standard el10 packages as el10nv builds are not available for that architecture.The script:
rpm()entries to WORKSPACE alongside existing el10 entriesrpm/BUILD.bazelcs10 rpmtree targets for x86_64/aarch64 to reference el10nv packagesSynced packages:
References
Why we need it and why it was done in this way
The NV-variant RPMs for libvirt and qemu-kvm include patches and configuration specific to the NVIDIA GPU virtualization use case. Consuming these from the koji build system ensures the kubevirt-aie images are built with the correct driver and device support for NV hardware passthrough on x86_64 and aarch64.
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer
The first commit introduces the script, the second commit contains the output of running it. To verify: reset to the first commit, run
hack/sync-nv-rpms.sh, and diff against the second commit — the WORKSPACE checksums should match (given the same koji builds are still available).Version/release overrides are available via environment variables (
LIBVIRT_NV_VERSION,LIBVIRT_NV_RELEASE,QEMU_NV_VERSION,QEMU_NV_RELEASE) for pinning specific builds.Checklist
Release note