Support SBOM for depsolving in osbuild-depsolve-dnf

Extend osbuild-depsolve-dnf, to return JSON with SPDX SBOM that
corresponds to the depsolved package set, if it has been requested.
For now, only DNF4 is supported.

Cover the new functionality with unit test.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2024-06-26 17:02:26 +02:00 committed by Simon de Vlieger
parent 65ef88687e
commit 1d8bd0f8a6
4 changed files with 105 additions and 15 deletions

View file

@ -11,7 +11,14 @@ from libdnf5.common import QueryCmp_CONTAINS as CONTAINS
from libdnf5.common import QueryCmp_EQ as EQ
from libdnf5.common import QueryCmp_GLOB as GLOB
from osbuild.solver import DepsolveError, MarkingError, RepoError, SolverBase, modify_rootdir_path, read_keys
from osbuild.solver import (
DepsolveError,
MarkingError,
RepoError,
SolverBase,
modify_rootdir_path,
read_keys,
)
def remote_location(package, schemes=("http", "ftp", "file", "https")):