Skip to content

Commit

Permalink
Check blueprint mountpoints against OSTree mountpoint policies
Browse files Browse the repository at this point in the history
This requires a new release of images that exposes the policies package.
  • Loading branch information
bcl committed Feb 28, 2024
1 parent 5a6208c commit f80ea0f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bib/cmd/bootc-image-builder/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
"github.com/osbuild/images/pkg/image"
"github.com/osbuild/images/pkg/manifest"
"github.com/osbuild/images/pkg/platform"
"github.com/osbuild/images/pkg/policies"
"github.com/osbuild/images/pkg/rpmmd"
"github.com/osbuild/images/pkg/runner"
)
Expand Down Expand Up @@ -119,6 +120,11 @@ func manifestForDiskImage(c *ManifestConfig, rng *rand.Rand) (*manifest.Manifest
img.KernelOptionsAppend = append(img.KernelOptionsAppend, kopts.Append)
}

// Check the filesystem customizations against the policy
if err := blueprint.CheckMountpointsPolicy(customizations.GetFilesystems(), policies.OstreeMountpointPolicies); err != nil {
return nil, err
}

basept, ok := partitionTables[c.Architecture.String()]
if !ok {
return nil, fmt.Errorf("pipelines: no partition tables defined for %s", c.Architecture)
Expand Down

0 comments on commit f80ea0f

Please sign in to comment.