From fbe8c1cb393772a6c8bdae029dd434e91820b9f2 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Tue, 23 Aug 2022 19:12:01 +0200 Subject: [PATCH] manifest: use new ostree mount in fstab stage for commit deployment Use the new stage mount instead of the old stage-specific options. --- internal/manifest/commit_deployment.go | 10 +++------- ..._35-aarch64-fedora_iot_raw_image-boot.json | 19 +++++++++++++------ ...a_35-x86_64-fedora_iot_raw_image-boot.json | 19 +++++++++++++------ ..._36-aarch64-fedora_iot_raw_image-boot.json | 19 +++++++++++++------ ...a_36-x86_64-fedora_iot_raw_image-boot.json | 19 +++++++++++++------ ..._37-aarch64-fedora_iot_raw_image-boot.json | 19 +++++++++++++------ ...a_37-x86_64-fedora_iot_raw_image-boot.json | 19 +++++++++++++------ 7 files changed, 81 insertions(+), 43 deletions(-) diff --git a/internal/manifest/commit_deployment.go b/internal/manifest/commit_deployment.go index f3855ec44..7827ddf2d 100644 --- a/internal/manifest/commit_deployment.go +++ b/internal/manifest/commit_deployment.go @@ -152,13 +152,9 @@ func (p *OSTreeDeployment) serialize() osbuild.Pipeline { )) fstabOptions := osbuild.NewFSTabStageOptions(p.PartitionTable) - fstabOptions.OSTree = &osbuild.OSTreeFstab{ - Deployment: osbuild.OSTreeDeployment{ - OSName: p.osName, - Ref: p.osTreeRef, - }, - } - pipeline.AddStage(osbuild.NewFSTabStage(fstabOptions)) + fstabStage := osbuild.NewFSTabStage(fstabOptions) + fstabStage.MountOSTree(p.osName, p.osTreeRef, 0) + pipeline.AddStage(fstabStage) if p.Keyboard != "" { options := &osbuild.KeymapStageOptions{ diff --git a/test/data/manifests/fedora_35-aarch64-fedora_iot_raw_image-boot.json b/test/data/manifests/fedora_35-aarch64-fedora_iot_raw_image-boot.json index ebd20ae5c..39ef8bb38 100644 --- a/test/data/manifests/fedora_35-aarch64-fedora_iot_raw_image-boot.json +++ b/test/data/manifests/fedora_35-aarch64-fedora_iot_raw_image-boot.json @@ -1888,14 +1888,21 @@ "options": "umask=0077,shortname=winnt", "passno": 2 } - ], - "ostree": { - "deployment": { - "osname": "fedora-iot", - "ref": "test/fedora/iot" + ] + }, + "mounts": [ + { + "name": "ostree-test/fedora/iot", + "type": "org.osbuild.ostree.deployment", + "options": { + "deployment": { + "osname": "fedora-iot", + "ref": "test/fedora/iot", + "serial": 0 + } } } - } + ] }, { "type": "org.osbuild.keymap", diff --git a/test/data/manifests/fedora_35-x86_64-fedora_iot_raw_image-boot.json b/test/data/manifests/fedora_35-x86_64-fedora_iot_raw_image-boot.json index 7d1e21441..b50e91cdf 100644 --- a/test/data/manifests/fedora_35-x86_64-fedora_iot_raw_image-boot.json +++ b/test/data/manifests/fedora_35-x86_64-fedora_iot_raw_image-boot.json @@ -1912,14 +1912,21 @@ "options": "umask=0077,shortname=winnt", "passno": 2 } - ], - "ostree": { - "deployment": { - "osname": "fedora-iot", - "ref": "test/fedora/iot" + ] + }, + "mounts": [ + { + "name": "ostree-test/fedora/iot", + "type": "org.osbuild.ostree.deployment", + "options": { + "deployment": { + "osname": "fedora-iot", + "ref": "test/fedora/iot", + "serial": 0 + } } } - } + ] }, { "type": "org.osbuild.keymap", diff --git a/test/data/manifests/fedora_36-aarch64-fedora_iot_raw_image-boot.json b/test/data/manifests/fedora_36-aarch64-fedora_iot_raw_image-boot.json index db9d0b1f0..3fab3010c 100644 --- a/test/data/manifests/fedora_36-aarch64-fedora_iot_raw_image-boot.json +++ b/test/data/manifests/fedora_36-aarch64-fedora_iot_raw_image-boot.json @@ -2136,14 +2136,21 @@ "options": "umask=0077,shortname=winnt", "passno": 2 } - ], - "ostree": { - "deployment": { - "osname": "fedora-iot", - "ref": "test/fedora/iot" + ] + }, + "mounts": [ + { + "name": "ostree-test/fedora/iot", + "type": "org.osbuild.ostree.deployment", + "options": { + "deployment": { + "osname": "fedora-iot", + "ref": "test/fedora/iot", + "serial": 0 + } } } - } + ] }, { "type": "org.osbuild.keymap", diff --git a/test/data/manifests/fedora_36-x86_64-fedora_iot_raw_image-boot.json b/test/data/manifests/fedora_36-x86_64-fedora_iot_raw_image-boot.json index 27342433c..5a0c7bd4e 100644 --- a/test/data/manifests/fedora_36-x86_64-fedora_iot_raw_image-boot.json +++ b/test/data/manifests/fedora_36-x86_64-fedora_iot_raw_image-boot.json @@ -2160,14 +2160,21 @@ "options": "umask=0077,shortname=winnt", "passno": 2 } - ], - "ostree": { - "deployment": { - "osname": "fedora-iot", - "ref": "test/fedora/iot" + ] + }, + "mounts": [ + { + "name": "ostree-test/fedora/iot", + "type": "org.osbuild.ostree.deployment", + "options": { + "deployment": { + "osname": "fedora-iot", + "ref": "test/fedora/iot", + "serial": 0 + } } } - } + ] }, { "type": "org.osbuild.keymap", diff --git a/test/data/manifests/fedora_37-aarch64-fedora_iot_raw_image-boot.json b/test/data/manifests/fedora_37-aarch64-fedora_iot_raw_image-boot.json index e80ce9866..21ea539ec 100644 --- a/test/data/manifests/fedora_37-aarch64-fedora_iot_raw_image-boot.json +++ b/test/data/manifests/fedora_37-aarch64-fedora_iot_raw_image-boot.json @@ -2144,14 +2144,21 @@ "options": "umask=0077,shortname=winnt", "passno": 2 } - ], - "ostree": { - "deployment": { - "osname": "fedora-iot", - "ref": "test/fedora/iot" + ] + }, + "mounts": [ + { + "name": "ostree-test/fedora/iot", + "type": "org.osbuild.ostree.deployment", + "options": { + "deployment": { + "osname": "fedora-iot", + "ref": "test/fedora/iot", + "serial": 0 + } } } - } + ] }, { "type": "org.osbuild.keymap", diff --git a/test/data/manifests/fedora_37-x86_64-fedora_iot_raw_image-boot.json b/test/data/manifests/fedora_37-x86_64-fedora_iot_raw_image-boot.json index 4a906aea8..8888506ce 100644 --- a/test/data/manifests/fedora_37-x86_64-fedora_iot_raw_image-boot.json +++ b/test/data/manifests/fedora_37-x86_64-fedora_iot_raw_image-boot.json @@ -2168,14 +2168,21 @@ "options": "umask=0077,shortname=winnt", "passno": 2 } - ], - "ostree": { - "deployment": { - "osname": "fedora-iot", - "ref": "test/fedora/iot" + ] + }, + "mounts": [ + { + "name": "ostree-test/fedora/iot", + "type": "org.osbuild.ostree.deployment", + "options": { + "deployment": { + "osname": "fedora-iot", + "ref": "test/fedora/iot", + "serial": 0 + } } } - } + ] }, { "type": "org.osbuild.keymap",