Skip to content

Commit 29e4572

Browse files
committed
bib: update to images version v0.197.0
Update go.mod and do the required AI changes for v0.197.0
1 parent 4935f49 commit 29e4572

File tree

6 files changed

+21
-17
lines changed

6 files changed

+21
-17
lines changed

bib/cmd/bootc-image-builder/cloud.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,20 @@ func upload(uploader cloud.Uploader, path string, flags *pflag.FlagSet) error {
3333
defer file.Close()
3434

3535
var r io.Reader = file
36+
var size int64
3637
if pbar != nil {
3738
st, err := file.Stat()
3839
if err != nil {
3940
return err
4041
}
41-
pbar.SetTotal(st.Size())
42+
size = st.Size()
43+
pbar.SetTotal(size)
4244
pbar.Set(pb.Bytes, true)
4345
pbar.SetWriter(osStdout)
4446
r = pbar.NewProxyReader(file)
4547
pbar.Start()
4648
defer pbar.Finish()
4749
}
4850

49-
return uploader.UploadAndRegister(r, osStderr)
51+
return uploader.UploadAndRegister(r, uint64(size), osStderr)
5052
}

bib/cmd/bootc-image-builder/legacy_iso.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,11 @@ func makeISOManifest(c *ManifestConfig, solver *depsolvednf.Solver, cacheRoot st
164164
// depsolve packages
165165
depsolvedSets := make(map[string]depsolvednf.DepsolveResult)
166166
depsolvedRepos := make(map[string][]rpmmd.RepoConfig)
167-
for name, pkgSet := range mani.GetPackageSetChains() {
167+
pkgSetChains, err := mani.GetPackageSetChains()
168+
if err != nil {
169+
return nil, nil, err
170+
}
171+
for name, pkgSet := range pkgSetChains {
168172
res, err := solver.Depsolve(pkgSet, 0)
169173
if err != nil {
170174
return nil, nil, fmt.Errorf("cannot depsolve: %w", err)

bib/cmd/bootc-image-builder/main.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package main
22

33
import (
4-
"bytes"
54
"encoding/json"
65
"errors"
76
"fmt"
@@ -177,13 +176,11 @@ func manifestFromCobraForDisk(imgref, buildImgref, imgTypeStr, rootFs, rpmCacheR
177176
return nil, nil, err
178177
}
179178

180-
var buf bytes.Buffer
181179
repos, err := reporegistry.New(nil, []fs.FS{repos.FS})
182180
if err != nil {
183181
return nil, nil, err
184182
}
185183
mg, err := manifestgen.New(repos, &manifestgen.Options{
186-
Output: &buf,
187184
// XXX: hack to skip repo loading for the bootc image.
188185
// We need to add a SkipRepositories or similar to
189186
// manifestgen instead to make this clean
@@ -196,10 +193,11 @@ func manifestFromCobraForDisk(imgref, buildImgref, imgTypeStr, rootFs, rpmCacheR
196193
if err != nil {
197194
return nil, nil, err
198195
}
199-
if err := mg.Generate(config, distro, imgType, archi, nil); err != nil {
196+
manifest, err := mg.Generate(config, imgType, nil)
197+
if err != nil {
200198
return nil, nil, err
201199
}
202-
return buf.Bytes(), nil, nil
200+
return manifest, nil, nil
203201
}
204202

205203
func cmdManifest(cmd *cobra.Command, args []string) error {

bib/cmd/upload/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func uploadAMI(cmd *cobra.Command, args []string) {
5050
// nolint:errcheck
5151
defer f.Close()
5252

53-
check(uploader.UploadAndRegister(f, os.Stderr))
53+
check(uploader.UploadAndRegister(f, 0, os.Stderr))
5454
}
5555

5656
func setupCLI() *cobra.Command {

bib/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ require (
88
github.com/cheggaaa/pb/v3 v3.1.7
99
github.com/hashicorp/go-version v1.7.0
1010
github.com/osbuild/blueprint v1.13.0
11-
github.com/osbuild/image-builder-cli v0.0.0-20250331194259-63bb56e12db3
12-
github.com/osbuild/images v0.191.0
11+
github.com/osbuild/image-builder-cli v0.0.0-20250924085931-15de5139f521
12+
github.com/osbuild/images v0.197.0
1313
github.com/sirupsen/logrus v1.9.3
1414
github.com/spf13/cobra v1.10.1
1515
github.com/spf13/pflag v1.0.10

bib/go.sum

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,19 +243,19 @@ github.com/opencontainers/selinux v1.12.0 h1:6n5JV4Cf+4y0KNXW48TLj5DwfXpvWlxXplU
243243
github.com/opencontainers/selinux v1.12.0/go.mod h1:BTPX+bjVbWGXw7ZZWUbdENt8w0htPSrlgOOysQaU62U=
244244
github.com/osbuild/blueprint v1.13.0 h1:blo22+S2ZX5bBmjGcRveoTUrV4Ms7kLfKyb32WyuymA=
245245
github.com/osbuild/blueprint v1.13.0/go.mod h1:HPlJzkEl7q5g8hzaGksUk7ifFAy9QFw9LmzhuFOAVm4=
246-
github.com/osbuild/image-builder-cli v0.0.0-20250331194259-63bb56e12db3 h1:M3yYunKH4quwJLQrnFo7dEwCTKorafNC+AUqAo7m5Yo=
247-
github.com/osbuild/image-builder-cli v0.0.0-20250331194259-63bb56e12db3/go.mod h1:0sEmiQiMo1ChSuOoeONN0RmsoZbQEvj2mlO2448gC5w=
248-
github.com/osbuild/images v0.191.0 h1:nhTIAf0JJTEf1gIUsU1II0BVIYBj537BvDpBBXCLYig=
249-
github.com/osbuild/images v0.191.0/go.mod h1:KPiYBF0VrOXz5NAw6Lv4X170uN8wnOHpWuBzKT4jPrU=
246+
github.com/osbuild/image-builder-cli v0.0.0-20250924085931-15de5139f521 h1:Mo1htXYyEoKrBQD+/RC/kluAWu4+E0oEjPorujVn/K8=
247+
github.com/osbuild/image-builder-cli v0.0.0-20250924085931-15de5139f521/go.mod h1:oTn9T+bV9g/760hM/jX7AV0c4vuVIn6FjAnaVM9RzRo=
248+
github.com/osbuild/images v0.197.0 h1:JSwivw9X2HLgGPq1NG407FrSbyNlfwdACwI0g6kUkjY=
249+
github.com/osbuild/images v0.197.0/go.mod h1:xkXfw5CIy0bVNTNdB6GXiewu/IzBgpofkItDJPAzGA4=
250250
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
251251
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
252252
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
253253
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
254254
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
255255
github.com/proglottis/gpgme v0.1.4 h1:3nE7YNA70o2aLjcg63tXMOhPD7bplfE5CBdV+hLAm2M=
256256
github.com/proglottis/gpgme v0.1.4/go.mod h1:5LoXMgpE4bttgwwdv9bLs/vwqv3qV7F4glEEZ7mRKrM=
257-
github.com/prometheus/client_golang v1.22.0 h1:rb93p9lokFEsctTys46VnV1kLCDpVZ0a/Y92Vm0Zc6Q=
258-
github.com/prometheus/client_golang v1.22.0/go.mod h1:R7ljNsLXhuQXYZYtw6GAE9AZg8Y7vEW5scdCXrWRXC0=
257+
github.com/prometheus/client_golang v1.23.0 h1:ust4zpdl9r4trLY/gSjlm07PuiBq2ynaXXlptpfy8Uc=
258+
github.com/prometheus/client_golang v1.23.0/go.mod h1:i/o0R9ByOnHX0McrTMTyhYvKE4haaf2mW08I+jGAjEE=
259259
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
260260
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
261261
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=

0 commit comments

Comments
 (0)