-
Notifications
You must be signed in to change notification settings - Fork 580
OOT Modules -> Add kernel version and release nb into release nb #13645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OOT Modules -> Add kernel version and release nb into release nb #13645
Conversation
|
||
%global KVERSION %{target_kernel_version_full} | ||
|
||
%{!?_name: %define _name isert} | ||
|
||
Summary: %{_name} Driver | ||
Name: %{_name}-signed | ||
Name: %{_name}-signed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit-pick:
Name: %{_name}-signed | |
Name: %{_name}-signed |
|
||
%global KVERSION %{target_kernel_version_full} | ||
%define _name mft_kernel | ||
|
||
Name: %{_name}-signed | ||
Summary: %{_name} Kernel Module for the %{KVERSION} kernel | ||
Version: 4.30.0 | ||
Release: 16%{?dist} | ||
Release: 17%{release_suffix}%{?dist} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Release: 17%{release_suffix}%{?dist} | |
Release: 17%{release_suffix}%{?dist} |
SPECS-SIGNED/mlnx-ofa_kernel-modules-signed/mlnx-ofa_kernel-modules-signed.spec
Outdated
Show resolved
Hide resolved
305d255
to
4b532e4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I focused on the spec changes and less so on the validation scripts.
Thanks for all the efforts in pushing this change, Nicolas! Have we made sure the new version schema is upgradable from the existing one? i.e. "rpm upgrade" of the new versioned package replaces the existing one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates several SPEC files and related workflow scripts to incorporate dynamic kernel version extraction and release suffix generation. The changes replace hardcoded kernel version strings with dynamically queried values using RPM macros and update dependent package declarations and changelogs accordingly.
- Updated kernel version extraction macros in SPEC files.
- Updated BuildRequires/Requires fields to use the new computed macro (_mofed_full_version).
- Adjustments to GitHub workflow scripts to handle chroot environments for cgmanifest validation.
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
SPECS/* | Updated kernel version extraction and release suffix macros in multiple SPEC files. |
.github/workflows/* | Adjusted workflow scripts to incorporate chroot-based spec parsing and improved error handling. |
Others | Changelog and dependency changes for new kernel version details. |
Comments suppressed due to low confidence (1)
.github/workflows/validate-cg-manifest.sh:194
- Ensure that the alternate source URL variable is consistently named (e.g. 'source0_alt') throughout the script to improve code clarity and avoid confusion with any legacy variable names.
+ source0_alt=""
%if 0%{azl} | ||
%global target_kernel_version_full %(/bin/rpm -q --queryformat '%{VERSION}-%{RELEASE}' kernel-headers) | ||
%global target_kernel_version_full %(/bin/rpm -q --queryformat '%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}' $(/bin/rpm -q --whatprovides kernel-headers)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider refactoring the repeated kernel version extraction macros (including target_kernel_version_full, target_azl_build_kernel_version, target_kernel_release, and release_suffix) into a common include file to reduce duplication across the SPEC files and ease future maintenance.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks fine. Please consider my comments on consolidating duplicated version and release values into individual macros/defines within spec so that it reduces the probability of desync due to human error on update.
|
||
%global KVERSION %{target_kernel_version_full} | ||
|
||
%{!?_name: %define _name fwctl} | ||
%{!?_mofed_full_version: %define _mofed_full_version 24.10-17%{release_suffix}%{?dist}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the release number were to get incremented due to a change to the spec, this value would need to change too, correct?
If so, would it make sense to make the release number also a %define so there is only one spot to update in the spec when incrementing the release number? I can see someone inadvertently missing this, and causing the requires _mofed_full_version go out of sync with the package itself.
@@ -64,7 +66,7 @@ | |||
Summary: %{_name} Driver | |||
Name: isert | |||
Version: 24.10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this use %{_version} so this value is controlled by one define?
489c40b
to
dd0ebb4
Compare
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-static
subpackages, etc.) have had theirRelease
tag incremented../cgmanifest.json
,./toolkit/scripts/toolchain/cgmanifest.json
,.github/workflows/cgmanifest.json
)./LICENSES-AND-NOTICES/SPECS/data/licenses.json
,./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md
,./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON
)*.signatures.json
filessudo make go-tidy-all
andsudo make go-test-coverage
passSummary
OOT Modules -> Add kernel version and release nb into release nb
Change Log
Does this affect the toolchain?
NO
Associated issues
Links to CVEs
Test Methodology