Skip to content

Commit 06c3faf

Browse files
committed
Update to work with COSA a13cf77
In COSA we dropped the compression of hyperv and applehv in the OSBuild invocation [1] so we update here for that. In COSA upstream we also merged in patches for Live ISO building but that hasn't landed in RPMS yet so we surgically remove it here until those new stages land. [1] coreos/coreos-assembler#3982
1 parent 1d7c55e commit 06c3faf

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ mode and some software installed:
7878
sudo dnf update -y
7979
sudo setenforce 0
8080
sudo sed -i -e 's/SELINUX=enforcing/SELINUX=permissive/' /etc/selinux/config
81-
sudo dnf install -y osbuild osbuild-tools osbuild-ostree podman jq xfsprogs e2fsprogs zip
81+
sudo dnf install -y osbuild osbuild-tools osbuild-ostree podman jq xfsprogs e2fsprogs
8282
```
8383

8484
Now you should be able to generate an image with something like:

custom-coreos-disk-images.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ ARCH=$(arch)
2626
# A list of supported platforms and the filename suffix of the main
2727
# artifact that platform produces.
2828
declare -A SUPPORTED_PLATFORMS=(
29-
['applehv']='raw.gz'
29+
['applehv']='raw'
3030
['gcp']='tar.gz'
31-
['hyperv']='vhdx.zip'
31+
['hyperv']='vhdx'
3232
['metal4k']='raw'
3333
['metal']='raw'
3434
['qemu']='qcow2'
@@ -43,7 +43,7 @@ check_rpm() {
4343
}
4444

4545
check_rpms() {
46-
reqs=(osbuild osbuild-tools osbuild-ostree jq xfsprogs e2fsprogs zip)
46+
reqs=(osbuild osbuild-tools osbuild-ostree jq xfsprogs e2fsprogs)
4747
for req in "${reqs[@]}"; do
4848
check_rpm "$req"
4949
done
@@ -156,14 +156,21 @@ main() {
156156

157157
# Freeze on specific version for now to increase stability.
158158
#gitreporef="main"
159-
gitreporef="10e397bfd966a60e5e43ec3ad49443c0c9323d74"
159+
gitreporef="a13cf77d37aa4c57922e83f3706630ae7e33ac4e"
160160
gitrepotld="https://raw.githubusercontent.com/coreos/coreos-assembler/${gitreporef}/"
161161
pushd "${tmpdir}"
162162
curl -LO --fail "${gitrepotld}/src/runvm-osbuild"
163163
chmod +x runvm-osbuild
164-
for manifest in "coreos.osbuild.${ARCH}.mpp.yaml" platform.{applehv,gcp,hyperv,metal,qemu,qemu-secex}.ipp.yaml; do
164+
for manifest in "coreos.osbuild.${ARCH}.mpp.yaml" platform.{applehv,gcp,hyperv,live,metal,qemu,qemu-secex}.ipp.yaml; do
165165
curl -LO --fail "${gitrepotld}/src/osbuild-manifests/${manifest}"
166166
done
167+
# Temporarily chop off the last two lines from "coreos.osbuild.${ARCH}.mpp.yaml"
168+
# that performs inclusion of the `live` platform added in [1]. The stages
169+
# haven't been merged upstream yet and won't be in the installed OSBuild
170+
# RPMs yet.
171+
# [1] https://github.com/coreos/coreos-assembler/pull/3976
172+
mv "coreos.osbuild.${ARCH}.mpp.yaml"{,.orig}
173+
head -n -2 "coreos.osbuild.${ARCH}.mpp.yaml.orig" > "coreos.osbuild.${ARCH}.mpp.yaml"
167174
popd
168175

169176

0 commit comments

Comments
 (0)