go.mod: update to latest images@v0.112.0

This commit is contained in:
Achilleas Koutsou 2025-01-31 14:52:04 +01:00 committed by Sanne Raymaekers
parent bec893e37c
commit 3e321e3cea
11 changed files with 47 additions and 16 deletions

2
go.mod
View file

@ -44,7 +44,7 @@ require (
github.com/labstack/gommon v0.4.2
github.com/openshift-online/ocm-sdk-go v0.1.438
github.com/oracle/oci-go-sdk/v54 v54.0.0
github.com/osbuild/images v0.111.0
github.com/osbuild/images v0.112.0
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d
github.com/osbuild/pulp-client v0.1.0
github.com/prometheus/client_golang v1.20.2

4
go.sum
View file

@ -541,8 +541,8 @@ github.com/openshift-online/ocm-sdk-go v0.1.438 h1:tsLCCUzbLCTL4RZG02y9RuopmGCXp
github.com/openshift-online/ocm-sdk-go v0.1.438/go.mod h1:CiAu2jwl3ITKOxkeV0Qnhzv4gs35AmpIzVABQLtcI2Y=
github.com/oracle/oci-go-sdk/v54 v54.0.0 h1:CDLjeSejv2aDpElAJrhKpi6zvT/zhZCZuXchUUZ+LS4=
github.com/oracle/oci-go-sdk/v54 v54.0.0/go.mod h1:+t+yvcFGVp+3ZnztnyxqXfQDsMlq8U25faBLa+mqCMc=
github.com/osbuild/images v0.111.0 h1:mnPLdSin/q1ZTaGZVJHepsikguFjUMAWblQdPgvZ02M=
github.com/osbuild/images v0.111.0/go.mod h1:58tzp7jV50rjaH9gMpvmQdVati0c4TaC5Op7wmSD/tY=
github.com/osbuild/images v0.112.0 h1:+pKwPniwYTRRgist6V+7DQfZEg7osddl1z4pASecq4M=
github.com/osbuild/images v0.112.0/go.mod h1:58tzp7jV50rjaH9gMpvmQdVati0c4TaC5Op7wmSD/tY=
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d h1:r9BFPDv0uuA9k1947Jybcxs36c/pTywWS1gjeizvtcQ=
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d/go.mod h1:zR1iu/hOuf+OQNJlk70tju9IqzzM4ycq0ectkFBm94U=
github.com/osbuild/pulp-client v0.1.0 h1:L0C4ezBJGTamN3BKdv+rKLuq/WxXJbsFwz/Hj7aEmJ8=

View file

@ -722,10 +722,12 @@ type transactionArgs struct {
}
type packageSpecs []PackageSpec
type moduleSpecs map[string]ModuleSpec
type depsolveResult struct {
Packages packageSpecs `json:"packages"`
Repos map[string]repoConfig `json:"repos"`
Modules moduleSpecs `json:"modules"`
// (optional) contains the solver used, e.g. "dnf5"
Solver string `json:"solver,omitempty"`
@ -748,6 +750,29 @@ type PackageSpec struct {
Secrets string `json:"secrets,omitempty"`
}
// Module specification
type ModuleSpec struct {
ModuleConfigFile ModuleConfigFile `json:"module-file"`
FailsafeFile ModuleFailsafeFile `json:"failsafe-file"`
}
type ModuleConfigFile struct {
Path string `json:"path"`
Data ModuleConfigData `json:"data"`
}
type ModuleConfigData struct {
Name string `json:"name"`
Stream string `json:"stream"`
Profiles []string `json:"profiles"`
State string `json:"state"`
}
type ModuleFailsafeFile struct {
Path string `json:"path"`
Data string `json:"string"`
}
// dnf-json error structure
type Error struct {
Kind string `json:"kind"`

View file

@ -337,6 +337,12 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline {
fstabStage.MountOSTree(p.osName, ref, 0)
pipeline.AddStage(fstabStage)
if len(p.Groups) > 0 {
grpStage := osbuild.GenGroupsStage(p.Groups)
grpStage.MountOSTree(p.osName, ref, 0)
pipeline.AddStage(grpStage)
}
if len(p.Users) > 0 {
usersStage, err := osbuild.GenUsersStage(p.Users, false)
if err != nil {
@ -346,12 +352,6 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline {
pipeline.AddStage(usersStage)
}
if len(p.Groups) > 0 {
grpStage := osbuild.GenGroupsStage(p.Groups)
grpStage.MountOSTree(p.osName, ref, 0)
pipeline.AddStage(grpStage)
}
if p.IgnitionPlatform != "" {
pipeline.AddStage(osbuild.NewIgnitionStage(&osbuild.IgnitionStageOptions{
// This is a workaround to make the systemd believe it's firstboot when ignition runs on real firstboot.

View file

@ -29,7 +29,7 @@ func newContainersInputForSources(containers []container.Spec, forLocal bool) Co
var sourceType string
if forLocal {
sourceType = "org.osbuild.containers-storage"
sourceType = SourceNameContainersStorage
} else {
sourceType = "org.osbuild.containers"
}

View file

@ -2,6 +2,8 @@ package osbuild
import "fmt"
const SourceNameContainersStorage = "org.osbuild.containers-storage"
type ContainersStorageSource struct {
Items map[string]struct{} `json:"items"`
}

View file

@ -4,6 +4,8 @@ import (
"fmt"
)
const SourceNameSkopeoIndex = "org.osbuild.skopeo-index"
type SkopeoIndexSource struct {
Items map[string]SkopeoIndexSourceItem `json:"items"`
}

View file

@ -5,6 +5,8 @@ import (
"regexp"
)
const SourceNameSkopeo = "org.osbuild.skopeo"
var skopeoDigestPattern = regexp.MustCompile(`sha256:[0-9a-f]{64}`)
const DockerTransport = "docker"

View file

@ -41,7 +41,7 @@ func NewSkopeoStageWithContainersStorage(path string, images ContainersInput, ma
}
return &Stage{
Type: "org.osbuild.skopeo",
Type: SourceNameSkopeo,
Options: &SkopeoStageOptions{
Destination: SkopeoDestinationContainersStorage{
Type: "containers-storage",
@ -59,7 +59,7 @@ func NewSkopeoStageWithOCI(path string, images ContainersInput, manifests *Files
}
return &Stage{
Type: "org.osbuild.skopeo",
Type: SourceNameSkopeo,
Options: &SkopeoStageOptions{
Destination: &SkopeoDestinationOCI{
Type: "oci",

View file

@ -160,13 +160,13 @@ func GenSources(inputs SourceInputs, rpmDownloader RpmDownloader) (Sources, erro
}
}
if len(skopeo.Items) > 0 {
sources["org.osbuild.skopeo"] = skopeo
sources[SourceNameSkopeo] = skopeo
}
if len(skopeoIndex.Items) > 0 {
sources["org.osbuild.skopeo-index"] = skopeoIndex
sources[SourceNameSkopeoIndex] = skopeoIndex
}
if len(localContainers.Items) > 0 {
sources["org.osbuild.containers-storage"] = localContainers
sources[SourceNameContainersStorage] = localContainers
}
}

2
vendor/modules.txt vendored
View file

@ -1021,7 +1021,7 @@ github.com/oracle/oci-go-sdk/v54/identity
github.com/oracle/oci-go-sdk/v54/objectstorage
github.com/oracle/oci-go-sdk/v54/objectstorage/transfer
github.com/oracle/oci-go-sdk/v54/workrequests
# github.com/osbuild/images v0.111.0
# github.com/osbuild/images v0.112.0
## explicit; go 1.21.0
github.com/osbuild/images/internal/common
github.com/osbuild/images/internal/environment