diff --git a/Dockerfile b/Dockerfile index 2187f93..42de39e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,8 +25,6 @@ LABEL org.opensuse.reference="%%REGISTRY%%/%%TAGPREFIX%%/virt-launcher:%%PKG_VER # endlabelprefix RUN zypper -n install \ - augeas \ - augeas-lenses \ curl \ ethtool \ gawk \ @@ -49,43 +47,42 @@ RUN zypper -n install \ #!ArchExclusiveLine: x86_64 RUN if [ "$(uname -m)" = "x86_64" ]; then \ - zypper -n install qemu-x86 ; \ - fi; - -#!ArchExclusiveLine: aarch64 -RUN if [ "$(uname -m)" = "aarch64" ]; then \ - zypper -n install \ - qemu-arm \ - qemu-uefi-aarch64 ; \ - fi; - -RUN zypper clean -a - -#!ArchExclusiveLine: x86_64 -RUN if [ "$(uname -m)" = "x86_64" ]; then \ + zypper -n install qemu-x86 && \ mkdir -p /usr/share/OVMF && \ 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 ; \ - fi; + fi #!ArchExclusiveLine: aarch64 RUN if [ "$(uname -m)" = "aarch64" ]; then \ + zypper -n install \ + qemu-arm \ + qemu-uefi-aarch64 && \ mkdir -p /usr/share/AAVMF && \ ln -s ../qemu/aavmf-aarch64-code.bin /usr/share/AAVMF/AAVMF_CODE.fd && \ ln -s ../qemu/aavmf-aarch64-vars.bin /usr/share/AAVMF/AAVMF_VARS.fd ; \ - fi; - -# KubeVirt expects virtiofsd to be installed in /usr/libexec -RUN ls /usr/libexec/virtiofsd || \ - (mkdir -p /usr/libexec && ln -s ../lib/virtiofsd /usr/libexec/virtiofsd) + fi COPY augconf /augconf +RUN zypper -n install \ + augeas \ + augeas-lenses && \ + augtool --echo -f /augconf && \ + zypper -n remove \ + augeas \ + augeas-lenses && \ + zypper clean -a && \ + rm -f /augconf -RUN augtool -f /augconf -RUN cd /var && rm -rf run && ln -s ../run . +# KubeVirt expects virtiofsd to be installed in /usr/libexec +# NOTE: the value of %{_libexecdir} may vary across distros +RUN VIRTIOFSD=$(rpm --eval '%{_libexecdir}')/virtiofsd; \ + [ -d ${VIRTIOFSD} ] && VIRTIOFSD=${VIRTIOFSD}/virtiofsd; \ + [ -f /usr/libexec/virtiofsd ] || \ + (mkdir -p /usr/libexec && ln -svrt /usr/libexec ${VIRTIOFSD}) # Setup permissions and capabilities for non-root VMIs RUN setcap 'cap_net_bind_service=+ep' /usr/bin/virt-launcher && \ @@ -93,4 +90,6 @@ RUN setcap 'cap_net_bind_service=+ep' /usr/bin/virt-launcher && \ setcap 'cap_net_bind_service=+ep' /usr/bin/qemu-system-$(uname -m) && \ chmod 0755 /etc/libvirt +RUN cd /var && rm -rf run && ln -s ../run . + ENTRYPOINT [ "/usr/bin/virt-launcher-monitor" ] diff --git a/virt-launcher-container.changes b/virt-launcher-container.changes index 1e72fad..f68bac8 100644 --- a/virt-launcher-container.changes +++ b/virt-launcher-container.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Feb 23 08:53:39 UTC 2024 - Vasily Ulyanov + +- Handle various virtiofsd install paths (bsc#1219772) +- Group together arch specific parts of the code +- Cleanup after writing config files with augtool + ------------------------------------------------------------------- Wed Jan 3 12:29:33 UTC 2024 - Vasily Ulyanov