image: make read only sysroot optional for OSTreeRawImage

This commit is contained in:
Achilleas Koutsou 2022-09-30 17:00:44 +02:00 committed by Tomáš Hozza
parent 4ae8304bd2
commit d32dff14b4
2 changed files with 6 additions and 1 deletions

View file

@ -26,6 +26,8 @@ type OSTreeRawImage struct {
Commit ostree.CommitSpec
SysrootReadOnly bool
Remote ostree.Remote
OSName string
@ -58,6 +60,7 @@ func (img *OSTreeRawImage) InstantiateManifest(m *manifest.Manifest,
osPipeline.Locale = img.Locale
osPipeline.Users = img.Users
osPipeline.Groups = img.Groups
osPipeline.SysrootReadOnly = img.SysrootReadOnly
imagePipeline := manifest.NewRawOStreeImage(m, buildPipeline, img.Platform, osPipeline)

View file

@ -23,6 +23,8 @@ type OSTreeDeployment struct {
commit ostree.CommitSpec
SysrootReadOnly bool
osName string
KernelOptionsAppend []string
@ -144,7 +146,7 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline {
Repo: repoPath,
Config: &osbuild.OSTreeConfig{
Sysroot: &osbuild.SysrootOptions{
ReadOnly: common.BoolToPtr(true),
ReadOnly: &p.SysrootReadOnly,
Bootloader: "none",
},
},