Update osbuild/images to v0.41.0

Multiple blueprint fixes:

- Extend the blueprint service customizations to accept services to be
  masked.

- The `storage-path` and `container-transport` fields were removed in
  imagees 41.0 in order to simplify the way local storage containers are
  handled.
This commit is contained in:
Gianluca Zuccarelli 2024-02-28 14:57:33 +00:00 committed by Tomáš Hozza
parent 4e504f7905
commit f6b76cce31
50 changed files with 615 additions and 529 deletions

View file

@ -48,9 +48,8 @@ type Container struct {
Source string `json:"source,omitempty" toml:"source"`
Name string `json:"name,omitempty" toml:"name,omitempty"`
TLSVerify *bool `json:"tls-verify,omitempty" toml:"tls-verify,omitempty"`
ContainersTransport *string `json:"containers-transport,omitempty" toml:"containers-transport,omitempty"`
StoragePath *string `json:"source-path,omitempty" toml:"source-path,omitempty"`
TLSVerify *bool `json:"tls-verify,omitempty" toml:"tls-verify,omitempty"`
LocalStorage bool `json:"local-storage,omitempty" toml:"local-storage,omitempty"`
}
// DeepCopy returns a deep copy of the blueprint

View file

@ -109,6 +109,7 @@ type FirewallServicesCustomization struct {
type ServicesCustomization struct {
Enabled []string `json:"enabled,omitempty" toml:"enabled,omitempty"`
Disabled []string `json:"disabled,omitempty" toml:"disabled,omitempty"`
Masked []string `json:"masked,omitempty" toml:"masked,omitempty"`
}
type OpenSCAPCustomization struct {

View file

@ -228,6 +228,7 @@ func TestGetServices(t *testing.T) {
expectedServices := ServicesCustomization{
Enabled: []string{"cockpit", "osbuild-composer"},
Disabled: []string{"sshd", "ftp"},
Masked: []string{"firewalld"},
}
TestCustomizations := Customizations{
@ -238,6 +239,7 @@ func TestGetServices(t *testing.T) {
assert.ElementsMatch(t, expectedServices.Enabled, retServices.Enabled)
assert.ElementsMatch(t, expectedServices.Disabled, retServices.Disabled)
assert.ElementsMatch(t, expectedServices.Masked, retServices.Masked)
}
func TestError(t *testing.T) {

View file

@ -499,7 +499,7 @@ func TestBlueprintsCustomizationInfoToml(t *testing.T) {
],
"disabled": [
"telnet"
]
]
}
},
"services": {
@ -511,6 +511,9 @@ func TestBlueprintsCustomizationInfoToml(t *testing.T) {
"disabled": [
"postfix",
"telnetd"
],
"masked": [
"firewalld"
]
},
"user": [
@ -629,6 +632,7 @@ func TestBlueprintsCustomizationInfoToml(t *testing.T) {
Services: &blueprint.ServicesCustomization{
Enabled: []string{"sshd", "cockpit.socket", "httpd"},
Disabled: []string{"postfix", "telnetd"},
Masked: []string{"firewalld"},
},
Filesystem: []blueprint.FilesystemCustomization{
blueprint.FilesystemCustomization{