Skip to content

many: support kernel.version customization - #2618

Draft
supakeen wants to merge 1 commit into
osbuild:mainfrom
supakeen:kernel-version
Draft

many: support kernel.version customization#2618
supakeen wants to merge 1 commit into
osbuild:mainfrom
supakeen:kernel-version

Conversation

@supakeen

Copy link
Copy Markdown
Member

Support optionally pinning the kernel version through the kernel customization. This can be useful when debugging with older kernel packages or when dealing with certain NVIDIA drivers.


Will need osbuild/blueprint#55 to land first so draft.

Support optionally pinning the kernel version through the kernel
customization. This can be useful when debugging with older kernel
packages or when dealing with certain NVIDIA drivers.

Signed-off-by: Simon de Vlieger <cmdr@supakeen.com>
Comment on lines +37 to +48
if expected.Version != "" {
stdout, _, _, err := ExecString("rpm", "-q", "--queryformat", "%{VERSION}-%{RELEASE}", expected.Name)
if err != nil {
return Fail("failed to query kernel version:", err)
}

if !strings.HasPrefix(stdout, expected.Version) {
return Fail("kernel version mismatch: expected", expected.Version, "got", stdout)
}

log.Printf("Kernel version check passed: %s matches %s\n", stdout, expected.Version)
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking about how to test this:
We could have a test config with a custom repo pointing to an older snapshot with an older kernel and pin it in the config. We could do it with an older distro version, something with long term support (RHEL 9.6 probably), so we don't need to change it any time soon.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea this sounds like something that should work. I was going to initially maybe not provide a test config for this yet on the other hand if it's straightforward to test maybe we should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants