upload/koji: don't depend on rpmmd.RPM for build metadata

The use of rpmmd.RPM is exclusive to the Koji upload implementation.
Consolidate the metadata structure for RPMs into the koji package
codebase, together with any required functions for converting osbuild
stage metadata. The respective code in osbuild/images will be eventually
removed.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2025-07-07 15:19:32 +02:00 committed by Tomáš Hozza
parent 0ca81d5af4
commit 0bafc0915d
6 changed files with 288 additions and 17 deletions

View file

@ -24,7 +24,6 @@ import (
"github.com/stretchr/testify/require"
"github.com/osbuild/images/pkg/platform"
"github.com/osbuild/images/pkg/rpmmd"
"github.com/osbuild/osbuild-composer/internal/upload/koji"
)
@ -166,7 +165,7 @@ func TestKojiImport(t *testing.T) {
Arch: "noarch",
},
Tools: []koji.Tool{},
RPMs: []rpmmd.RPM{},
RPMs: []koji.RPM{},
},
}
output := []koji.BuildOutput{
@ -178,7 +177,7 @@ func TestKojiImport(t *testing.T) {
ChecksumType: koji.ChecksumTypeMD5,
Checksum: hash,
Type: koji.BuildOutputTypeImage,
RPMs: []rpmmd.RPM{},
RPMs: []koji.RPM{},
Extra: &koji.BuildOutputExtra{
ImageOutput: koji.ImageExtraInfo{
Arch: "noarch",