Skip to content

Commit

Permalink
go.mod: bump images
Browse files Browse the repository at this point in the history
I also had to adjust our use of AnacondaContainerInstaller because
it was changed in osbuild/images#631.
  • Loading branch information
ondrejbudai authored and mvo5 committed Jun 25, 2024
1 parent 61863ff commit 1d04de0
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
22 changes: 15 additions & 7 deletions bib/cmd/bootc-image-builder/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@ package main
import (
cryptorand "crypto/rand"
"fmt"
"golang.org/x/exp/slices"
"math"
"math/big"
"math/rand"
"strconv"
"strings"

"golang.org/x/exp/slices"

"github.com/osbuild/bootc-image-builder/bib/internal/buildconfig"
"github.com/osbuild/bootc-image-builder/bib/internal/distrodef"
"github.com/osbuild/bootc-image-builder/bib/internal/source"
"github.com/osbuild/images/pkg/arch"
"github.com/osbuild/images/pkg/blueprint"
"github.com/osbuild/images/pkg/container"
"github.com/osbuild/images/pkg/customizations/kickstart"
"github.com/osbuild/images/pkg/customizations/users"
"github.com/osbuild/images/pkg/disk"
"github.com/osbuild/images/pkg/image"
Expand Down Expand Up @@ -226,16 +228,23 @@ func manifestForISO(c *ManifestConfig, rng *rand.Rand) (*manifest.Manifest, erro
customizations = c.Config.Customizations
}

img.Users = users.UsersFromBP(customizations.GetUsers())
img.Groups = users.GroupsFromBP(customizations.GetGroups())
img.Kickstart = &kickstart.Options{
Path: "/osbuild.ks",
Users: users.UsersFromBP(customizations.GetUsers()),
Groups: users.GroupsFromBP(customizations.GetGroups()),
NetworkOnBoot: true,
OSTree: &kickstart.OSTree{
OSName: "default",
},
}
if kopts := customizations.GetKernel(); kopts != nil && kopts.Append != "" {
img.KickstartKernelOptionsAppend = append(img.KickstartKernelOptionsAppend, kopts.Append)
img.Kickstart.KernelOptionsAppend = append(img.Kickstart.KernelOptionsAppend, kopts.Append)
}
img.KickstartNetworkOnBoot = true

// XXX: this should really be done by images, the consumer should not
// need to know these details. so once images is fixed drop it here
// again.
if len(img.Users) > 0 || len(img.Groups) > 0 {
if len(img.Kickstart.Users) > 0 || len(img.Kickstart.Groups) > 0 {
img.AdditionalAnacondaModules = append(img.AdditionalAnacondaModules, "org.fedoraproject.Anaconda.Modules.Users")
}

Expand All @@ -261,7 +270,6 @@ func manifestForISO(c *ManifestConfig, rng *rand.Rand) (*manifest.Manifest, erro
}
}

img.OSName = "default"
img.Filename = "install.iso"

mf := manifest.New()
Expand Down
4 changes: 2 additions & 2 deletions bib/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/aws/aws-sdk-go v1.53.5
github.com/cheggaaa/pb/v3 v3.1.5
github.com/google/uuid v1.6.0
github.com/osbuild/images v0.61.0
github.com/osbuild/images v0.67.0
github.com/pelletier/go-toml v1.9.5
github.com/sirupsen/logrus v1.9.3
github.com/spf13/cobra v1.8.0
Expand Down Expand Up @@ -123,7 +123,7 @@ require (
golang.org/x/term v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/tools v0.19.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 // indirect
google.golang.org/grpc v1.63.2 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/go-jose/go-jose.v2 v2.6.1 // indirect
Expand Down
10 changes: 5 additions & 5 deletions bib/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ github.com/opencontainers/runtime-spec v1.2.0 h1:z97+pHb3uELt/yiAWD691HNHQIF07bE
github.com/opencontainers/runtime-spec v1.2.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU=
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
github.com/osbuild/images v0.61.0 h1:bCU4+SrfSlyesGb6RfC9p4fbHmD909ww61TW3wsYNGA=
github.com/osbuild/images v0.61.0/go.mod h1:0X7LQ2czXhbtatmC/xsCwK1tUS10kkAXng1wKJKHK9Q=
github.com/osbuild/images v0.67.0 h1:6DNp0eOVxoUkyIp6XcHXQDbCwiPgQtc8hRH3nfTCf/Q=
github.com/osbuild/images v0.67.0/go.mod h1:kkiJNrd0XkVfwBxrJ8wWt6/d0+Eb+tG+zZVnw/xXE/8=
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f h1:/UDgs8FGMqwnHagNDPGOlts35QkhAZ8by3DR7nMih7M=
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f/go.mod h1:J6OG6YJVEWopen4avK3VNQSnALmmjvniMmni/YFYAwc=
github.com/otiai10/copy v1.14.0 h1:dCI/t1iTdYGtkvCuBG2BgR6KZa83PTclw4U5n2wAllU=
Expand Down Expand Up @@ -514,9 +514,9 @@ google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoA
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw=
google.golang.org/genproto/googleapis/api v0.0.0-20240429193739-8cf5692501f6 h1:DTJM0R8LECCgFeUwApvcEJHz85HLagW8uRENYxHh1ww=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6 h1:DujSIu+2tC9Ht0aPNA7jgj23Iq8Ewi5sgkQ++wdvonE=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240429193739-8cf5692501f6/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY=
google.golang.org/genproto/googleapis/api v0.0.0-20240513163218-0867130af1f8 h1:W5Xj/70xIA4x60O/IFyXivR5MGqblAb8R3w26pnD6No=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8 h1:mxSlqyb8ZAHsYDCfiXN1EDdNTdvjUJSLY+OnAUtYNYA=
google.golang.org/genproto/googleapis/rpc v0.0.0-20240513163218-0867130af1f8/go.mod h1:I7Y+G38R2bu5j1aLzfFmQfTcU/WnFuqDwLZAbvKTKpM=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
Expand Down

0 comments on commit 1d04de0

Please sign in to comment.