-
Notifications
You must be signed in to change notification settings - Fork 60
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
fix(pkg/driver): fixup kernel headers download #499
Conversation
/milestone v0.8.0 |
out, err := exec.Command("bash", "-c", script).Output() //nolint:gosec // false positive | ||
path := strings.TrimSuffix(string(out), "\n") | ||
var path string |
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.
@@ -208,7 +220,12 @@ func Build(ctx context.Context, | |||
// try to load kernel headers urls from driverkit. | |||
if _, found := env[drivertype.KernelDirEnv]; !found { | |||
printer.Logger.Debug("Trying to automatically fetch kernel headers.") | |||
kernelHeadersPath, cleaner, err := loadKernelHeadersFromDk(d.String(), kr) | |||
// KernelVersion needs to be fixed up; it is only used by driverkit Ubuntu builder |
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.
Bumped to driverkit v0.18.2. |
// KernelVersion needs to be fixed up; it is only used by driverkit Ubuntu builder | ||
// and we must ensure that it is correctly set. | ||
fixedKr := d.FixupKernel(kr) | ||
kVerFixedKr := kr |
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.
Don't overwrite kr
here, instead use a copy.
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.
While this is a bit ugly rn, it will be much better once #356 lands.
…kit kernel download script template. Signed-off-by: Federico Di Pierro <[email protected]>
…ad script helper. Signed-off-by: Federico Di Pierro <[email protected]>
ed53932
to
70289f4
Compare
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: FedeDP, leogr The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
/kind bug
/kind cleanup
Any specific area of the project related to this PR?
/area library
What this PR does / why we need it:
This PR fixes the templating of kernel headers download script from driverkit, that needs a fixed up kernelversion (only ubuntu uses it in driverkit, and it must be actually fixed, so that eg:
#26~22.04.1 Ubuntu...
becomes26~22.04.1
).Moreover, it bumps driverkit to what will become v0.18.2 that contains a fix for new KERNELDIR mechanism (falcosecurity/driverkit#330).
Already in falcoctl main!wip
until driverkit v0.18.2 is released.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: