stages: add coreos.live-artifacts.mono stage
This adds a new `org.osbuild.coreos.live-artifacts.mono` stage to build
CoreOS Live ISO/PXE artifacts. The code is heavily based on the
`cmd-buildextend-live` script from coreos-assembler [1], but a lot of
things had to be adapted:
- the stage is provided the deployed oscontainer tree, metal, and
metal4k images as inputs
- we use chroot instead of supermin to execute some commands in the
context of the target oscontainer
- a bunch of calls that were wrapped by libguestfs for us (e.g.
mkfs.vfat, mksquashfs), we now have to call ourselves; to retain
maximum compatibility, we ensured that we still effectively use the
same args that libguestfs passed
And various other minor adjustments.
Of course, this is not really in line with the OSBuild philosophy
of having smaller-scoped stages. We have labeled this with a .mono
suffix to denote it is monolithic, similar to the existing
`org.osbuild.bootiso.mono` stage today.
Eventually we may be able to break this stage down if we find it worth
the effort. Alternatively the need for it may go away as we align more
with Image Mode.
[1] 43a9c80e1f/src/cmd-buildextend-live
Co-authored-by: Dusty Mabe <dusty@dustymabe.com>
Co-authored-by: Renata Ravanelli <renata.ravanelli@gmail.com>
This commit is contained in:
parent
b7e3268ef0
commit
0331e6f313
4 changed files with 990 additions and 0 deletions
|
|
@ -1635,6 +1635,50 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "live",
|
||||
"build": "name:build",
|
||||
"stages": [
|
||||
{
|
||||
"type": "org.osbuild.coreos.live-artifacts.mono",
|
||||
"inputs": {
|
||||
"deployed-tree": {
|
||||
"type": "org.osbuild.tree",
|
||||
"origin": "org.osbuild.pipeline",
|
||||
"references": [
|
||||
"name:deployed-tree"
|
||||
]
|
||||
},
|
||||
"metal": {
|
||||
"type": "org.osbuild.files",
|
||||
"origin": "org.osbuild.pipeline",
|
||||
"references": {
|
||||
"name:metal": {
|
||||
"file": "/metal.raw"
|
||||
}
|
||||
}
|
||||
},
|
||||
"metal4k": {
|
||||
"type": "org.osbuild.files",
|
||||
"origin": "org.osbuild.pipeline",
|
||||
"references": {
|
||||
"name:metal4k": {
|
||||
"file": "/metal4k.raw"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"filenames": {
|
||||
"live-iso": "coreos-live-iso.x86_64.iso",
|
||||
"live-kernel": "coreos-live-kernel.x86_64",
|
||||
"live-initramfs": "coreos-live-initramfs.x86_64.img",
|
||||
"live-rootfs": "coreos-live-rootfs.x86_64.img"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"sources": {
|
||||
|
|
|
|||
|
|
@ -873,3 +873,36 @@ pipelines:
|
|||
type: qcow2
|
||||
compression: false
|
||||
compat: '1.1'
|
||||
- name: live
|
||||
build:
|
||||
mpp-format-string: '{buildroot}'
|
||||
stages:
|
||||
- type: org.osbuild.coreos.live-artifacts.mono
|
||||
inputs:
|
||||
deployed-tree:
|
||||
type: org.osbuild.tree
|
||||
origin: org.osbuild.pipeline
|
||||
references:
|
||||
- name:deployed-tree
|
||||
metal:
|
||||
type: org.osbuild.files
|
||||
origin: org.osbuild.pipeline
|
||||
references:
|
||||
name:metal:
|
||||
file: /metal.raw
|
||||
metal4k:
|
||||
type: org.osbuild.files
|
||||
origin: org.osbuild.pipeline
|
||||
references:
|
||||
name:metal4k:
|
||||
file: /metal4k.raw
|
||||
options:
|
||||
filenames:
|
||||
live-iso:
|
||||
mpp-format-string: 'coreos-live-iso.{arch}.iso'
|
||||
live-kernel:
|
||||
mpp-format-string: 'coreos-live-kernel.{arch}'
|
||||
live-initramfs:
|
||||
mpp-format-string: 'coreos-live-initramfs.{arch}.img'
|
||||
live-rootfs:
|
||||
mpp-format-string: 'coreos-live-rootfs.{arch}.img'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue