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

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