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

Add relationships for dpkg packages #2212

Merged
merged 4 commits into from
Oct 11, 2023
Merged

Add relationships for dpkg packages #2212

merged 4 commits into from
Oct 11, 2023

Conversation

wagoodman
Copy link
Contributor

This adds package relationships for debian packages. Specifically the Depends, Pre-Depends, and Provides dpkg status fields are supported, crafting relationships only for installed packages (which for these fields tends to be the case).

This PR does not add dependencies for build-related dependencies (e.g. the Build-Depends, Build-Depends-Indep, Build-Depends-Arch, Build-Conflicts, Build-Conflicts-Indep, and Build-Conflicts-Arch fields) or non-required but related relationships (e.g. the Recommends, Suggests, Breaks, Conflicts, Replaces, and Enhances fields).

Partially addresses #572
Closes #2040

Signed-off-by: Alex Goodman <[email protected]>
@wagoodman wagoodman added blocked Progress is being stopped by something and removed blocked Progress is being stopped by something labels Oct 10, 2023
@wagoodman
Copy link
Contributor Author

Here's the json schema difference to help reviewers:

# diff schema/json/schema-11.0.0.json schema/json/schema-11.0.1.json 

<   "$id": "anchore.io/schema/syft/json/11.0.0/document",
---
>   "$id": "anchore.io/schema/syft/json/11.0.1/document",
539a540,551
>         },
>         "provides": {
>           "items": {
>             "type": "string"
>           },
>           "type": "array"
>         },
>         "depends": {
>           "items": {
>             "type": "string"
>           },
>           "type": "array"
540a553,558
>         "preDepends": {
>           "items": {
>             "type": "string"
>           },
>           "type": "array"
>         },

@wagoodman wagoodman marked this pull request as ready for review October 10, 2023 22:46
@wagoodman wagoodman requested a review from a team October 10, 2023 22:46
@wagoodman wagoodman merged commit ef75903 into main Oct 11, 2023
9 checks passed
@wagoodman wagoodman deleted the add-dpkg-relationships branch October 11, 2023 12:56
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
* add relationships for deb packages

Signed-off-by: Alex Goodman <[email protected]>

* update snapshots

Signed-off-by: Alex Goodman <[email protected]>

* bump json schema

Signed-off-by: Alex Goodman <[email protected]>

* small refactor to remove duplicate code

Signed-off-by: Alex Goodman <[email protected]>

---------

Signed-off-by: Alex Goodman <[email protected]>
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.

Add support for dpkg dependency relationships
2 participants