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

Standard dep metadata #580

Draft
wants to merge 6 commits into
base: v2
Choose a base branch
from
Draft

Standard dep metadata #580

wants to merge 6 commits into from

Conversation

thitch97
Copy link
Contributor

@thitch97 thitch97 commented Jun 17, 2024

Summary

This serves as the initial implementation of RFC 0059, wherein packit adopts the accepted Standardized Dependency Metadata format. As part of this implementation changes were made in the cargo, postal, scribe, and sbom packages to accommodate the new metadata fields. For backwards compatibility, the new fields exist alongside the deprecated fields instead of replacing them entirely.

Unresolved Issues:

  • The standardized format defines a PURLs field (i.e. a set of PURLs) instead of just a single PURL for each dependency. This makes sense in theory, but the syft library we use to generate SBoMs only allows one PURL per package declaration. To get around this, I thought it appropriate to create a syft catalog with a package for each unique PURL as opposed to just a single package. However, I have yet to find a suitable method of testing this approach.

  • Though the RFC states: "Note: Both the distros and licenses fields are optional, however if they are given then the non-optional components of them must be set.", I'm not sure what an appropriate place is to enforce that rule (perhaps the parsing logic in cargo and postal).

Resolves #557

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@ForestEckhardt
Copy link
Contributor

  • The standardized format defines a PURLs field (i.e. a set of PURLs) instead of just a single PURL for each dependency. This makes sense in theory, but the syft library we use to generate SBoMs only allows one PURL per package declaration. To get around this, I thought it appropriate to create a syft catalog with a package for each unique PURL as opposed to just a single package. However, I have yet to find a suitable method of testing this approach.

I think that your idea makes sense unfortunately I am not sure that I have a much better idea when it comes to how to test this.

  • Though the RFC states: "Note: Both the distros and licenses fields are optional, however if they are given then the non-optional components of them must be set.", I'm not sure what an appropriate place is to enforce that rule (perhaps the parsing logic in cargo and postal).

I don't think that there needs to be enforcement of this it would just mean that any buildpack.toml that did not conform would not be compliant and therefore there are no guarantees that it will be compatible with the Paketo Buildpacks ecosystem. I think if critical information is missing then the build will fail and if it is not critical then maybe there will be some malformed logging or SBOM generation and I think that is sufficient for me.

@thitch97 thitch97 added the semver:minor A change requiring a minor version bump label Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor A change requiring a minor version bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement RFC 0059: Standardized Dependency Metadata
2 participants