diff --git a/pkg/distro/rhel9/imagetype.go b/pkg/distro/rhel9/imagetype.go index a307caec32..818ef8ab4d 100644 --- a/pkg/distro/rhel9/imagetype.go +++ b/pkg/distro/rhel9/imagetype.go @@ -166,9 +166,6 @@ func (t *imageType) getPartitionTable( // Edge supports only LVM, force it. // Raw is not supported, return an error if it is requested // TODO Need a central location for logic like this - if partitioningMode == disk.RawPartitioningMode { - return nil, fmt.Errorf("partitioning mode raw not supported for %s on %s", t.Name(), t.arch.Name()) - } partitioningMode = disk.LVMPartitioningMode } @@ -355,8 +352,10 @@ func (t *imageType) checkOptions(bp *blueprint.Blueprint, options distro.ImageOp if options.OSTree == nil || options.OSTree.URL == "" { return warnings, fmt.Errorf("%q images require specifying a URL from which to retrieve the OSTree commit", t.name) } - allowed := []string{"Ignition", "Kernel", "User", "Group", "FIPS"} + if t.name == "edge-raw-image" { + allowed = append(allowed, "Filesystem") + } 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, ", ")) } @@ -383,12 +382,15 @@ func (t *imageType) checkOptions(bp *blueprint.Blueprint, options distro.ImageOp } mountpoints := customizations.GetFilesystems() + mountPointPolicies := pathpolicy.MountpointPolicies - if mountpoints != nil && t.rpmOstree { + if mountpoints != nil && t.rpmOstree && t.name != "edge-raw-image" { return warnings, fmt.Errorf("Custom mountpoints are not supported for ostree types") + } else if t.name == "edge-raw-image" { + mountPointPolicies = pathpolicy.OstreeMountpointPolicies } - err := blueprint.CheckMountpointsPolicy(mountpoints, pathpolicy.MountpointPolicies) + err := blueprint.CheckMountpointsPolicy(mountpoints, mountPointPolicies) if err != nil { return warnings, err } diff --git a/test/configs/filesystem-customizations.json b/test/configs/filesystem-customizations.json new file mode 100644 index 0000000000..ec6d967f74 --- /dev/null +++ b/test/configs/filesystem-customizations.json @@ -0,0 +1,16 @@ +{ + "name": "filesystem-customizations", + "ostree": { + "url": "http://example.com/repo" + }, + "blueprint": { + "customizations": { + "filesystem": [ + { + "mountpoint": "/foo", + "minsize": "2147483648" + } + ] + } + } +}