distro/el8: restrict allowed 'edge-raw-image' type customizations
Previously, the rest was mostly silently ignored without errors. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
2cd7074b23
commit
76cbec2149
1 changed files with 11 additions and 3 deletions
|
|
@ -433,9 +433,17 @@ func (t *imageType) checkOptions(customizations *blueprint.Customizations, optio
|
|||
}
|
||||
}
|
||||
|
||||
// check the checksum instead of the URL, because the URL should have been used to resolve the checksum and we need both
|
||||
if t.name == "edge-raw-image" && options.OSTree.FetchChecksum == "" {
|
||||
return warnings, fmt.Errorf("edge raw images require specifying a URL from which to retrieve the OSTree commit")
|
||||
if t.name == "edge-raw-image" {
|
||||
// check the checksum instead of the URL, because the URL should have been used to resolve the checksum and we need both
|
||||
if options.OSTree.FetchChecksum == "" {
|
||||
return warnings, fmt.Errorf("edge raw images require specifying a URL from which to retrieve the OSTree commit")
|
||||
}
|
||||
|
||||
allowed := []string{"User", "Group"}
|
||||
if err := customizations.CheckAllowed(allowed...); err != nil {
|
||||
return warnings, fmt.Errorf("unsupported blueprint customizations found for image type %q: (allowed: %s)", t.name, strings.Join(allowed, ", "))
|
||||
}
|
||||
// TODO: consider additional checks, such as those in "edge-simplified-installer"
|
||||
}
|
||||
|
||||
// warn that user & group customizations on edge-commit, edge-container are deprecated
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue