Skip to content

feat(package): track if binary packages are essential#182

Open
fmoessbauer wants to merge 6 commits intomainfrom
fm/essential-tracking
Open

feat(package): track if binary packages are essential#182
fmoessbauer wants to merge 6 commits intomainfrom
fm/essential-tracking

Conversation

@fmoessbauer
Copy link
Member

This information is useful for information routing, as in debian essential packages are assumed to be always installed, hence do not need to be added to package dependencies.

Some tests currently assume that the dpkg-minimal status file only has a
single package. To test for more corner cases, we want to add multiple
packages to that file in the future, breaking the assumption that the
file only has one.

We now adjust the tests so that they do not assume that there is only a
single package.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
This information is useful for information routing, as in debian
essential packages are assumed to be always installed, hence do not need
to be added to package dependencies.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
In CycloneDX we denote if a package is an essential package. Downstream
tooling can use this information for improved dependency analysis. As
SPDX does not offer a field for this information, this remains CDX only
for now.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
This is a CycloneDX only feature, as SPDX does not encode this
information.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
@fmoessbauer fmoessbauer requested a review from Urist-McGit March 2, 2026 12:44
entry.description = package.description
entry.properties.add(cdx_model.Property(name="section", value=package.section))
entry.properties.add(
cdx_model.Property(name="essential", value="yes" if package.essential else "no")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we not use a simple True or False here? It should translate directly to the JSON boolean type

add_key("purl", "string", "node")
add_key("type", "string", "node")
add_key("section", "string", "node")
add_key("essential", "string", "node")
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this property only exists for CDX SBOMs we want to document that. IIRC we recommend to use SPDX SBOMs for graph exporting since they contain better relationship information, so we might want to add this info there too.

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