1
0

Accepting request 947114 from home:Guillaume_G:branches:Virtualization

- Handle aarch64
- Enable build only on aarch64 and x86_64

OBS-URL: https://build.opensuse.org/request/show/947114
OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-launcher-container?expand=0&rev=17
This commit is contained in:
Vasily Ulyanov 2022-01-18 13:10:50 +00:00 committed by Git OBS Bridge
parent 4520f518aa
commit 9b897b7925
2 changed files with 37 additions and 5 deletions

View File

@ -3,11 +3,16 @@
#!BuildTag: %%TAGPREFIX%%/virt-launcher:%%PKG_VERSION%%.%RELEASE%
#!BuildTag: %%TAGPREFIX%%/virt-launcher:%%PKG_VERSION%%-%%PKG_RELEASE%%
#!ExclusiveArch: x86_64 aarch64
# virt-launcher container image
# KUBEVIRTFROM defined in prjconf, e.g.
# BuildFlags: dockerarg:KUBEVIRTFROM=opensuse/tumbleweed
ARG KUBEVIRTFROM
FROM $KUBEVIRTFROM
# TARGETARCH defined in prjconf, to handle architecture specific bits
# since TARGETARCH is not defined in OBS builds yet.
ARG TARGETARCH
# labelprefix=%%LABELPREFIX%%
PREFIXEDLABEL org.opencontainers.image.title="kubevirt virt-launcher container"
@ -29,21 +34,42 @@ RUN zypper -n install \
libvirt-daemon-qemu \
nftables \
qemu-tools \
qemu-x86 \
socat \
tar \
timezone \
vim \
xorriso && \
zypper clean -a && \
xorriso
#!ArchExclusiveLine: x86_64
RUN if [ "$TARGETARCH" = "amd64" ]; then \
zypper -n install qemu-x86 ; \
fi;
#!ArchExclusiveLine: aarch64
RUN if [ "$TARGETARCH" = "arm64" ]; then \
zypper -n install \
qemu-arm \
qemu-uefi-aarch64 ; \
fi;
RUN zypper clean -a && \
mkdir -p /usr/share/kubevirt/virt-launcher
RUN mkdir -p /usr/share/OVMF && \
RUN mkdir -p /usr/share/OVMF
#!ArchExclusiveLine: x86_64
RUN if [ "$TARGETARCH" = "amd64" ]; then \
ln -s ../qemu/ovmf-x86_64-code.bin /usr/share/OVMF/OVMF_CODE.fd && \
ln -s ../qemu/ovmf-x86_64-vars.bin /usr/share/OVMF/OVMF_VARS.fd && \
ln -s ../qemu/ovmf-x86_64-code.bin /usr/share/OVMF/OVMF_CODE.cc.fd && \
ln -s ../qemu/ovmf-x86_64-smm-ms-code.bin /usr/share/OVMF/OVMF_CODE.secboot.fd && \
ln -s ../qemu/ovmf-x86_64-smm-ms-vars.bin /usr/share/OVMF/OVMF_VARS.secboot.fd
ln -s ../qemu/ovmf-x86_64-smm-ms-vars.bin /usr/share/OVMF/OVMF_VARS.secboot.fd ; \
fi;
#!ArchExclusiveLine: aarch64
RUN if [ "$TARGETARCH" = "arm64" ]; then \
ln -s ../qemu/aavmf-aarch64-code.bin /usr/share/OVMF/AAVMF_CODE.fd && \
ln -s ../qemu/aavmf-aarch64-vars.bin /usr/share/OVMF/AAVMF_VARS.fd ; \
fi;
COPY augconf /augconf

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 10 10:56:39 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Handle aarch64
- Enable build only on aarch64 and x86_64
-------------------------------------------------------------------
Mon Jan 10 09:52:56 UTC 2022 - Vasily Ulyanov <vasily.ulyanov@suse.com>