Skip to content

Add relationships for dpkg packages#2212

Merged
wagoodman merged 4 commits intomainfrom
add-dpkg-relationships
Oct 11, 2023
Merged

Add relationships for dpkg packages#2212
wagoodman merged 4 commits intomainfrom
add-dpkg-relationships

Conversation

@wagoodman
Copy link
Copy Markdown
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 <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@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
Copy Markdown
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"
>         },

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
@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
@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 <wagoodman@users.noreply.github.com>

* update snapshots

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* bump json schema

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* small refactor to remove duplicate code

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
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