Update osbuild/images to v0.82.0

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2024-09-03 10:48:35 +02:00 committed by Tomáš Hozza
parent 6563e98c94
commit d6fd6a9be5
6 changed files with 16 additions and 16 deletions

View file

@ -228,7 +228,7 @@ func (c *Customizations) GetTimezoneSettings() (*string, []string) {
}
func (c *Customizations) GetUsers() []UserCustomization {
if c == nil {
if c == nil || (c.SSHKey == nil && c.User == nil) {
return nil
}

View file

@ -24,17 +24,17 @@ func (fsc *FilesystemCustomization) UnmarshalTOML(data interface{}) error {
return fmt.Errorf("TOML unmarshal: mountpoint must be string, got %v of type %T", d["mountpoint"], d["mountpoint"])
}
switch d["size"].(type) {
switch d["minsize"].(type) {
case int64:
fsc.MinSize = uint64(d["size"].(int64))
fsc.MinSize = uint64(d["minsize"].(int64))
case string:
size, err := common.DataSizeToUint64(d["size"].(string))
minSize, err := common.DataSizeToUint64(d["minsize"].(string))
if err != nil {
return fmt.Errorf("TOML unmarshal: size is not valid filesystem size (%w)", err)
return fmt.Errorf("TOML unmarshal: minsize is not valid filesystem size (%w)", err)
}
fsc.MinSize = size
fsc.MinSize = minSize
default:
return fmt.Errorf("TOML unmarshal: size must be integer or string, got %v of type %T", d["size"], d["size"])
return fmt.Errorf("TOML unmarshal: minsize must be integer or string, got %v of type %T", d["minsize"], d["minsize"])
}
return nil
@ -57,14 +57,13 @@ func (fsc *FilesystemCustomization) UnmarshalJSON(data []byte) error {
// The JSON specification only mentions float64 and Go defaults to it: https://go.dev/blog/json
switch d["minsize"].(type) {
case float64:
// Note that it uses different key than the TOML version
fsc.MinSize = uint64(d["minsize"].(float64))
case string:
size, err := common.DataSizeToUint64(d["minsize"].(string))
minSize, err := common.DataSizeToUint64(d["minsize"].(string))
if err != nil {
return fmt.Errorf("JSON unmarshal: size is not valid filesystem size (%w)", err)
return fmt.Errorf("JSON unmarshal: minsize is not valid filesystem size (%w)", err)
}
fsc.MinSize = size
fsc.MinSize = minSize
default:
return fmt.Errorf("JSON unmarshal: minsize must be float64 number or string, got %v of type %T", d["minsize"], d["minsize"])
}

View file

@ -155,7 +155,8 @@ func gceCommonPackageSet(t *rhel.ImageType) rpmmd.PackageSet {
// the el9 version depends on libboost_regex.so.1.75.0()(64bit), which is not available on el10
//"google-compute-engine",
"google-osconfig-agent",
"gce-disk-expand",
// Requires gdisk which was removed late in the RHEL 10 development cycle
// "gce-disk-expand",
// cloud-init is a replacement for "google-compute-engine", remove once the package is available
"cloud-init",