Skip to content
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

Kirkstone patch provided by Baxter #12

Merged
merged 3 commits into from
Nov 19, 2024
Merged

Conversation

ryanlink
Copy link

Overview

This patch provided by Baxter International (Eric Laurin and Zachary Salim).

Acceptance criteria

If this PR is successful, what impact does it have on the user experience?

Example: When users do X, Y should now happen.

Testing plan

Someone with access to a bitbake repo and kirkstone Yocto should test this.

Risks

Could break the meta-fossa integration.

References

The Kirkstone patch applies modifications to make meta-fossa compatible with the kirkstone Yocto Project branch. Here’s a breakdown of the key changes described:

  1. fossa.bbclass Modifications
  • Import of image_list_installed_packages: The patch introduces this function from OpenEmbedded core (oe-core). This function lists all packages installed in the final image, which is crucial for collecting accurate dependency data.
  • Usage of pkgs = image_list_installed_packages(d): Replaces the previous method of gathering packages. Instead of looping through all package metadata, it now loops through the installed package list, improving the accuracy of the dependencies collected for FOSSA analysis.
  • Error Handling Adjustment: The except Exception as err block is simplified to just except Exception to handle all exceptions without specifying an error object.
  1. fossa_upload.bbclass Modifications
  • Switch to fossa-cli-native: The do_fossa_analyze and do_fossa_test tasks now depend on fossa-cli-native (a version of fossa-cli built for the host system) instead of fossa-cli (target-specific). This makes sure that the analysis and testing run on the host build environment rather than the target, improving compatibility.
  • Path Update for fossa CLI: The hardcoded path to fossa has been removed, as the sysroot-native directory is already included in the PATH. This change improves portability by allowing the fossa binary to be accessed from any location in the environment.
  1. fossa-cli.bb Modifications
  • BBCLASSEXTEND = "native": This line extends the fossa-cli recipe to allow it to be built as a native package for the build host. This ensures that fossa-cli can be executed in the host environment, aligning with the modifications in fossa_upload.bbclass.

Checklist

  • I added tests for this PR's change (or explained in the PR description why tests don't make sense).
  • If this PR introduced a user-visible change, I have updated relevant documentation.

@ryanlink ryanlink requested a review from a team as a code owner October 30, 2024 16:18
@ryanlink ryanlink requested a review from spatten October 30, 2024 16:18
@ryanlink ryanlink changed the base branch from master to kirkstone October 30, 2024 16:24
Copy link

@spatten spatten left a comment

Choose a reason for hiding this comment

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

This looks good to me. I re-tested with the updated patch, and then removed two lines: one that was duplicated and one that had a no-longer-used import and tested again.

Everything looks the same as on the original kirkstone branch, so I think all is good.

classes/fossa.bbclass Outdated Show resolved Hide resolved
classes/fossa.bbclass Outdated Show resolved Hide resolved
@ryanlink ryanlink merged commit 2ffe673 into kirkstone Nov 19, 2024
3 checks passed
@ryanlink ryanlink deleted the kirkstone-patch-new branch November 19, 2024 16:58
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