Skip to content

Commit 0c2df8a

Browse files
committed
osbuild/applehv: output raw.gz
In qemuvariants.py applehv is gzip compressed so let's do the same here and tell postprocess_artifact to skip compression in meta.json. While we are here also have gcp set to skip compression in meta.json.
1 parent 579a3d5 commit 0c2df8a

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

src/cmd-osbuild

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dn=$(dirname "$0")
88
# A list of supported platforms and the filename suffix of the main
99
# artifact that platform produces.
1010
declare -A SUPPORTED_PLATFORMS=(
11-
['applehv']='raw'
11+
['applehv']='raw.gz'
1212
['gcp']='tar.gz'
1313
['hyperv']='vhdx'
1414
['metal4k']='raw'
@@ -360,6 +360,11 @@ main() {
360360

361361
# Perform postprocessing
362362
case "$platform" in
363+
applehv|gcp)
364+
# Update the meta.json and builddir with the generated artifact.
365+
# Skip Compression on these platforms as they are already compressed.
366+
postprocess_artifact "${platform}" "${imgpath}" "${imgname}" 'True'
367+
;;
363368
qemu-secex)
364369
# Massage the generated artifact through an extra VM for secex. This
365370
# will also create an Ignition pubkey and store it in the meta.json

src/osbuild-manifests/platform.applehv.ipp.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ pipelines:
5555
build:
5656
mpp-format-string: '{buildroot}'
5757
stages:
58-
- type: org.osbuild.copy
58+
- type: org.osbuild.gzip
5959
inputs:
60-
tree:
61-
type: org.osbuild.tree
60+
file:
61+
type: org.osbuild.files
6262
origin: org.osbuild.pipeline
6363
references:
64-
- name:raw-applehv-image
64+
name:raw-applehv-image:
65+
file: disk.img
6566
options:
66-
paths:
67-
- from: input://tree/disk.img
68-
to:
69-
mpp-format-string: 'tree:///{artifact_name_prefix}-applehv.{arch}.raw'
67+
level: 9
68+
filename:
69+
mpp-format-string: '{artifact_name_prefix}-applehv.{arch}.raw.gz'

0 commit comments

Comments
 (0)