Port osbuild/images v0.33.0 with dot-notation to composer
Update the osbuild/images to the version which introduces "dot notation" for distro release versions. - Replace all uses of distroregistry by distrofactory. - Delete local version of reporegistry and use the one from the osbuild/images. - Weldr: unify `createWeldrAPI()` and `createWeldrAPI2()` into a single `createTestWeldrAPI()` function`. - store/fixture: rework fixtures to allow overriding the host distro name and host architecture name. A cleanup function to restore the host distro and arch names is always part of the fixture struct. - Delete `distro_mock` package, since it is no longer used. - Bump the required version of osbuild to 98, because the OSCAP customization is using the 'compress_results' stage option, which is not available in older versions of osbuild. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
f6ff8c40dd
commit
625b1578fa
1166 changed files with 154457 additions and 5508 deletions
|
|
@ -12,8 +12,9 @@ import (
|
|||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/fedora"
|
||||
"github.com/osbuild/images/pkg/distroregistry"
|
||||
"github.com/osbuild/images/pkg/distrofactory"
|
||||
"github.com/osbuild/images/pkg/manifest"
|
||||
"github.com/osbuild/images/pkg/reporegistry"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||
"github.com/osbuild/osbuild-composer/internal/dnfjson"
|
||||
|
|
@ -126,7 +127,9 @@ func main() {
|
|||
awsTarget.Created = time.Now()
|
||||
awsTarget.OsbuildArtifact.ExportFilename = "image.ami"
|
||||
|
||||
d := fedora.NewF37()
|
||||
const fedoraID = "fedora-37"
|
||||
|
||||
d := fedora.DistroFactory(fedoraID)
|
||||
a, err := d.GetArch(arch.ARCH_X86_64.String())
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
|
@ -139,7 +142,7 @@ func main() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
allRepos, err := rpmmd.LoadRepositories([]string{cwd}, "fedora-37")
|
||||
allRepos, err := reporegistry.LoadRepositories([]string{cwd}, fedoraID)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
@ -150,8 +153,9 @@ func main() {
|
|||
}
|
||||
rpmmdCache := path.Join(homeDir, ".cache/osbuild-composer/rpmmd")
|
||||
|
||||
dr, _ := distroregistry.New(d, nil)
|
||||
s := store.New(&cwd, dr, nil)
|
||||
df := distrofactory.New(fedora.DistroFactory)
|
||||
|
||||
s := store.New(&cwd, df, nil)
|
||||
if s == nil {
|
||||
panic("could not create store")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue