diff --git a/go.mod b/go.mod index 3c0c69617b..535c027000 100644 --- a/go.mod +++ b/go.mod @@ -36,7 +36,7 @@ require ( github.com/labstack/gommon v0.4.2 github.com/openshift-online/ocm-sdk-go v0.1.420 github.com/oracle/oci-go-sdk/v54 v54.0.0 - github.com/osbuild/images v0.62.0 + github.com/osbuild/images v0.63.0 github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20231117174845-e969a9dc3cd1 github.com/osbuild/pulp-client v0.1.0 github.com/prometheus/client_golang v1.19.1 diff --git a/go.sum b/go.sum index 7ac1cbfe85..d5a2f08aca 100644 --- a/go.sum +++ b/go.sum @@ -500,8 +500,8 @@ github.com/openshift-online/ocm-sdk-go v0.1.420 h1:zC/TboLemC09T5qxSdF5IZR20wnn4 github.com/openshift-online/ocm-sdk-go v0.1.420/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.62.0 h1:SFISmpEDjvhV9GEsRkRdw7WwTHJWvSoB7zwqxqdM7Dw= -github.com/osbuild/images v0.62.0/go.mod h1:kkiJNrd0XkVfwBxrJ8wWt6/d0+Eb+tG+zZVnw/xXE/8= +github.com/osbuild/images v0.63.0 h1:tk75nDV78Pbi+RBXCclHYQbzzJeqJDsCMVmDCWRhLcM= +github.com/osbuild/images v0.63.0/go.mod h1:kkiJNrd0XkVfwBxrJ8wWt6/d0+Eb+tG+zZVnw/xXE/8= github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20231117174845-e969a9dc3cd1 h1:UFEJIcPa46W8gtWgOYzriRKYyy1t6SWL0BI7fPTuVvc= github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20231117174845-e969a9dc3cd1/go.mod h1:z+WA+dX6qMwc7fqY5jCzESDIlg4WR2sBQezxsoXv9Ik= github.com/osbuild/pulp-client v0.1.0 h1:L0C4ezBJGTamN3BKdv+rKLuq/WxXJbsFwz/Hj7aEmJ8= diff --git a/internal/blueprint/customizations.go b/internal/blueprint/customizations.go index df01411f6e..fcf788f81c 100644 --- a/internal/blueprint/customizations.go +++ b/internal/blueprint/customizations.go @@ -65,16 +65,17 @@ type SSHKeyCustomization struct { } type UserCustomization struct { - Name string `json:"name" toml:"name"` - Description *string `json:"description,omitempty" toml:"description,omitempty"` - Password *string `json:"password,omitempty" toml:"password,omitempty"` - Key *string `json:"key,omitempty" toml:"key,omitempty"` - Home *string `json:"home,omitempty" toml:"home,omitempty"` - Shell *string `json:"shell,omitempty" toml:"shell,omitempty"` - Groups []string `json:"groups,omitempty" toml:"groups,omitempty"` - UID *int `json:"uid,omitempty" toml:"uid,omitempty"` - GID *int `json:"gid,omitempty" toml:"gid,omitempty"` - ExpireDate *int `json:"expiredate,omitempty" toml:"expiredate,omitempty"` + Name string `json:"name" toml:"name"` + Description *string `json:"description,omitempty" toml:"description,omitempty"` + Password *string `json:"password,omitempty" toml:"password,omitempty"` + Key *string `json:"key,omitempty" toml:"key,omitempty"` + Home *string `json:"home,omitempty" toml:"home,omitempty"` + Shell *string `json:"shell,omitempty" toml:"shell,omitempty"` + Groups []string `json:"groups,omitempty" toml:"groups,omitempty"` + UID *int `json:"uid,omitempty" toml:"uid,omitempty"` + GID *int `json:"gid,omitempty" toml:"gid,omitempty"` + ExpireDate *int `json:"expiredate,omitempty" toml:"expiredate,omitempty"` + ForcePasswordReset *bool `json:"force_password_reset,omitempty" toml:"force_password_reset,omitempty"` } type GroupCustomization struct { diff --git a/vendor/github.com/osbuild/images/pkg/blueprint/customizations.go b/vendor/github.com/osbuild/images/pkg/blueprint/customizations.go index 624ca73b44..80404f5de3 100644 --- a/vendor/github.com/osbuild/images/pkg/blueprint/customizations.go +++ b/vendor/github.com/osbuild/images/pkg/blueprint/customizations.go @@ -63,16 +63,17 @@ type SSHKeyCustomization struct { } type UserCustomization struct { - Name string `json:"name" toml:"name"` - Description *string `json:"description,omitempty" toml:"description,omitempty"` - Password *string `json:"password,omitempty" toml:"password,omitempty"` - Key *string `json:"key,omitempty" toml:"key,omitempty"` - Home *string `json:"home,omitempty" toml:"home,omitempty"` - Shell *string `json:"shell,omitempty" toml:"shell,omitempty"` - Groups []string `json:"groups,omitempty" toml:"groups,omitempty"` - UID *int `json:"uid,omitempty" toml:"uid,omitempty"` - GID *int `json:"gid,omitempty" toml:"gid,omitempty"` - ExpireDate *int `json:"expiredate,omitempty" toml:"expiredate,omitempty"` + Name string `json:"name" toml:"name"` + Description *string `json:"description,omitempty" toml:"description,omitempty"` + Password *string `json:"password,omitempty" toml:"password,omitempty"` + Key *string `json:"key,omitempty" toml:"key,omitempty"` + Home *string `json:"home,omitempty" toml:"home,omitempty"` + Shell *string `json:"shell,omitempty" toml:"shell,omitempty"` + Groups []string `json:"groups,omitempty" toml:"groups,omitempty"` + UID *int `json:"uid,omitempty" toml:"uid,omitempty"` + GID *int `json:"gid,omitempty" toml:"gid,omitempty"` + ExpireDate *int `json:"expiredate,omitempty" toml:"expiredate,omitempty"` + ForcePasswordReset *bool `json:"force_password_reset,omitempty" toml:"force_password_reset,omitempty"` } type GroupCustomization struct { diff --git a/vendor/github.com/osbuild/images/pkg/customizations/users/users.go b/vendor/github.com/osbuild/images/pkg/customizations/users/users.go index a88b2c3ae6..efacd1b80d 100644 --- a/vendor/github.com/osbuild/images/pkg/customizations/users/users.go +++ b/vendor/github.com/osbuild/images/pkg/customizations/users/users.go @@ -3,16 +3,17 @@ package users import "github.com/osbuild/images/pkg/blueprint" type User struct { - Name string - Description *string - Password *string - Key *string - Home *string - Shell *string - Groups []string - UID *int - GID *int - ExpireDate *int + Name string + Description *string + Password *string + Key *string + Home *string + Shell *string + Groups []string + UID *int + GID *int + ExpireDate *int + ForcePasswordReset *bool } type Group struct { diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/ami.go b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/ami.go index 125a550bfe..98ef9ad1e2 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/ami.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/ami.go @@ -417,9 +417,14 @@ func rhelEc2HaPackageSet(t *rhel.ImageType) rpmmd.PackageSet { // Includes the common ec2 package set, the common SAP packages, and // the amazon rhui sap package func rhelEc2SapPackageSet(t *rhel.ImageType) rpmmd.PackageSet { + rhuiPkg := "rh-amazon-rhui-client-sap-bundle-e4s" + if t.Arch().Distro().OsVersion() == "8.10" { + rhuiPkg = "rh-amazon-rhui-client-sap-bundle" + } + return rpmmd.PackageSet{ Include: []string{ - "rh-amazon-rhui-client-sap-bundle-e4s", + rhuiPkg, }, }.Append(rhelEc2CommonPackageSet(t)).Append(SapPackageSet(t)) } diff --git a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/sap.go b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/sap.go index aacdd754d3..b0f7c76504 100644 --- a/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/sap.go +++ b/vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/sap.go @@ -10,7 +10,7 @@ import ( // sapImageConfig returns the SAP specific ImageConfig data func sapImageConfig(rd distro.Distro) *distro.ImageConfig { - return &distro.ImageConfig{ + ic := &distro.ImageConfig{ SELinuxConfig: &osbuild.SELinuxConfigStageOptions{ State: osbuild.SELinuxStatePermissive, }, @@ -105,8 +105,11 @@ func sapImageConfig(rd distro.Distro) *distro.ImageConfig { }, ), }, + } + + if common.VersionLessThan(rd.OsVersion(), "8.10") { // E4S/EUS - DNFConfig: []*osbuild.DNFConfigStageOptions{ + ic.DNFConfig = []*osbuild.DNFConfigStageOptions{ osbuild.NewDNFConfigStageOptions( []osbuild.DNFVariable{ { @@ -116,8 +119,10 @@ func sapImageConfig(rd distro.Distro) *distro.ImageConfig { }, nil, ), - }, + } } + + return ic } func SapPackageSet(t *rhel.ImageType) rpmmd.PackageSet { diff --git a/vendor/github.com/osbuild/images/pkg/osbuild/users_stage.go b/vendor/github.com/osbuild/images/pkg/osbuild/users_stage.go index bd71664ed8..db9e451b4b 100644 --- a/vendor/github.com/osbuild/images/pkg/osbuild/users_stage.go +++ b/vendor/github.com/osbuild/images/pkg/osbuild/users_stage.go @@ -12,15 +12,16 @@ type UsersStageOptions struct { func (UsersStageOptions) isStageOptions() {} type UsersStageOptionsUser struct { - UID *int `json:"uid,omitempty"` - GID *int `json:"gid,omitempty"` - Groups []string `json:"groups,omitempty"` - Description *string `json:"description,omitempty"` - Home *string `json:"home,omitempty"` - Shell *string `json:"shell,omitempty"` - Password *string `json:"password,omitempty"` - Key *string `json:"key,omitempty"` - ExpireDate *int `json:"expiredate,omitempty"` + UID *int `json:"uid,omitempty"` + GID *int `json:"gid,omitempty"` + Groups []string `json:"groups,omitempty"` + Description *string `json:"description,omitempty"` + Home *string `json:"home,omitempty"` + Shell *string `json:"shell,omitempty"` + Password *string `json:"password,omitempty"` + Key *string `json:"key,omitempty"` + ExpireDate *int `json:"expiredate,omitempty"` + ForcePasswordReset *bool `json:"force_password_reset,omitempty"` } func NewUsersStage(options *UsersStageOptions) *Stage { @@ -53,15 +54,16 @@ func NewUsersStageOptions(userCustomizations []users.User, omitKey bool) (*Users } user := UsersStageOptionsUser{ - UID: uc.UID, - GID: uc.GID, - Groups: uc.Groups, - Description: uc.Description, - Home: uc.Home, - Shell: uc.Shell, - Password: uc.Password, - Key: nil, - ExpireDate: uc.ExpireDate, + UID: uc.UID, + GID: uc.GID, + Groups: uc.Groups, + Description: uc.Description, + Home: uc.Home, + Shell: uc.Shell, + Password: uc.Password, + Key: nil, + ExpireDate: uc.ExpireDate, + ForcePasswordReset: uc.ForcePasswordReset, } if !omitKey { user.Key = uc.Key diff --git a/vendor/modules.txt b/vendor/modules.txt index dea7f8dbff..add036041a 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -865,7 +865,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.62.0 +# github.com/osbuild/images v0.63.0 ## explicit; go 1.20 github.com/osbuild/images/internal/common github.com/osbuild/images/internal/environment