osbuild / images

Image builder image definition library
Apache License 2.0
23 stars 52 forks source link

cmd: add new `otk-make-grub2-inst-stage` external #916

Closed mvo5 closed 2 months ago

mvo5 commented 2 months ago

This external allows us to generate the org.osbuild.grub2.inst for otk.

E.g. in PR#193 we can now use the following diff:

diff --git a/example/centos/centos-9-x86_64-qcow2.yaml b/example/centos/centos-9-x86_64-qcow2.yaml
index 0d6c0cd..b3693d4 100644
--- a/example/centos/centos-9-x86_64-qcow2.yaml
+++ b/example/centos/centos-9-x86_64-qcow2.yaml
@@ -262,20 +262,9 @@ otk.target.osbuild:
                   ${fs_options.devices}
                 mounts:
                   ${fs_options.mounts}
-              - type: org.osbuild.grub2.inst
-                options:
-                  filename: disk.img
+            - - otk.external.otk-make-grub2-inst-stage:
                   platform: i386-pc
-                  location: 2048
-                  core:
-                    type: mkimage
-                    partlabel: gpt
-                    filesystem: xfs
-                  prefix:
-                    type: partition
-                    partlabel: gpt
-                    number: 2
-                    path: /grub2
+                  filesystem: ${filesystem}
     - name: qcow2
       build: name:build
       stages: