-
Notifications
You must be signed in to change notification settings - Fork 580
Set unique names for subpackages in kernel-rt spec #13084
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
base: 3.0-dev
Are you sure you want to change the base?
Set unique names for subpackages in kernel-rt spec #13084
Conversation
SPECS/tuned/tuned.spec
Outdated
@@ -36,7 +36,7 @@ Requires: python3-configobj | |||
Requires: python3-dbus | |||
Requires: python3-decorator | |||
Requires: python3-linux-procfs | |||
Requires: python3-perf | |||
Requires: (python3-perf or python3-perf-rt) |
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.
@dmcilvaney what is our graph's behavior for this kind of "or" for one package built in specs and another built in specs-extended, but we're only building our core specs?
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.
I'll double check, but I believe it takes the pessimistic approach and ensures both are built. I'll need to figure out what the scheduler picks though.
So, if one is simply not available (ie extended), it may cause an unresolved package issue.
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.
I queued https://dev.azure.com/mariner-org/mariner/_build/results?buildId=773396&view=results to double check experimentally as well.
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.
I also queued off a buddy build for tuned
and it does have an "unresolved dependency" failure on python3-perf-rt missing, even though tuned
went ahead and was built.
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.
Change currently causes a build failure. Evaluating alternatives
SPECS/tuned/tuned.spec
Outdated
@@ -36,7 +36,7 @@ Requires: python3-configobj | |||
Requires: python3-dbus | |||
Requires: python3-decorator | |||
Requires: python3-linux-procfs | |||
Requires: python3-perf | |||
Requires: (python3-perf or python3-perf-rt) |
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.
@rlmenge @harshitgupta1337 have you evaluated if we could keep this as Requires: python3-perf
and instead do a Provides: python3-perf
from within the various kernel specs?
If that method works, it would be more sustainable than always needing to keep this Requires: (<package> or <package2> ...)
method for each kernel package added or removed
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.
I agree that the method you propose would be a more sustainable method of managing this dependency of tuned.
However, if we do that - and then try installing tuned
from a system running kernel-rt
, how would we enforce the selection of python3-perf-rt
(part of kernel-rt.spec
) and not python3-perf
(part of kernel.spec
) ?
In the PR created by @rlmenge (#5897 ), each kernel spec has a conflict with every other kernel spec - could be a solution by enforcing that only python3-perf-rt
would be installed because installing python3-perf
would require kernel
which conflicts with already installed kernel-rt
.
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.
Hi @christopherco , I have tried the same approach that @rlmenge used in #5897 and tested it with an image build using AzureLinux toolkit with default kernel set to one of kernel
, kernel-rt
, and kernel-ipe
. In each case, the tuned
package was installed, which installed the correct type of python3-perf
package based on the kernel type. I used the RPMs built by this buddy build pipeline (which failed in the License Check step): https://dev.azure.com/mariner-org/mariner/_build/results?buildId=785103&view=results
2c04318
to
61558cf
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.
Copilot reviewed 4 out of 11 changed files in this pull request and generated no comments.
Files not reviewed (7)
- SPECS-EXTENDED/kernel-ipe/kernel-ipe.spec: Language not supported
- SPECS-EXTENDED/kernel-rt/kernel-rt.spec: Language not supported
- SPECS-SIGNED/kernel-64k-signed/kernel-64k-signed.spec: Language not supported
- SPECS-SIGNED/kernel-signed/kernel-signed.spec: Language not supported
- SPECS/kernel-64k/kernel-64k.spec: Language not supported
- SPECS/kernel-headers/kernel-headers.spec: Language not supported
- SPECS/kernel/kernel.spec: Language not supported
10675b8
to
f200d6f
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.
There are recent changes to the OOT specs so these are no longer required to be bumped #13645.
Additionally looking to confirm image builds occcur as expected
1a90328
to
19c1079
Compare
@christopherco The build failure was likely due to the boolean OR expression in the The RPMs build successfully, as evidenced by the following pipeline runs:
Furthermore, I have validated that upon installing |
dcb484a
to
d10c0fa
Compare
@christopherco @rlmenge I had to push some new commits due to a rebase. The PR is ready for review. |
Testing after recent rebase:
|
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.
I think this approach should work. Might want to double check on a VM/Container that it doesn't swap the kernel or something, but otherwise lgtm.
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
Currently, the subpackages
python3-perf
andbpftools
are being built both by the kernel-rt and kernel specs. However, they have the same name - irrespective of which spec file they are built from. This causes thepython3-perf
RPM built against kernel-rt source-code to override the RPM built against kernel source-code (same forbpftools
RPM).Change Log
bpftool
andpython3-perf
subpackages to be kernel-specific in each of the kernel type's spec file.Provide
a dependency with same name as the subpackage's name under defaultkernel
rpm. E.g.,Provides: python3-perf
for the subpkgpython3-perf-rt
, etc.Conflicts
with other kernel types in the spec files.Does this affect the toolchain?
YES
Test Methodology
The proposed changes were tested by ensuring that when an image is built with a given kernel variant and tuned is to be installed, the right variant of the
python3-perf
subpackage is installed (depending on which kernel is on the image).SPECS
andSPECS-EXTENDED
) andtuned
were built.https://dev.azure.com/mariner-org/mariner/_build/results?buildId=834792&view=results
imageconfigs/core-efi.json
image with includedtuned
package as well along with the original ones. The default kernel for the image was set to one ofkernel
,kernel-rt
,kernel-ipe
andkernel-lpg-innovate
. In each case, when thetuned
package was installed, the toolkit installed the correct variant of thepython3-perf
package based on the kernel type.After the above script is run, upon inspection of the
imager-kernel-rt.log
file, it contains the following logs, indicating thatpython3-perf-rt
package was installed as a dependency fortuned
.