commit a47636816788e0390a4cd9e0e0db853d437182f574a931aeb454e2e6ce68f1a2 Author: Vasily Ulyanov Date: Mon Jul 15 08:22:48 2024 +0000 - Install passt package OBS-URL: https://build.opensuse.org/package/show/Virtualization/virt-launcher-container?expand=0&rev=61 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e9169b4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,94 @@ +# SPDX-License-Identifier: Apache-2.0 + +# Define the tags for OBS and build script builds: +#!BuildTag: %%TAGPREFIX%%/virt-launcher:%%PKG_VERSION%% +#!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 + +# Mandatory labels for the build service: +# https://en.opensuse.org/Building_derived_containers +# labelprefix=%%LABELPREFIX%% +LABEL org.opencontainers.image.title="kubevirt virt-launcher container" +LABEL org.opencontainers.image.description="Container to host VM processes for kubevirt" +LABEL org.opencontainers.image.created="%BUILDTIME%" +LABEL org.opencontainers.image.version="%%PKG_VERSION%%.%RELEASE%" +LABEL org.opencontainers.image.source="%SOURCEURL%" +LABEL org.openbuildservice.disturl="%DISTURL%" +LABEL org.opensuse.reference="%%REGISTRY%%/%%TAGPREFIX%%/virt-launcher:%%PKG_VERSION%%.%RELEASE%" +# endlabelprefix + +RUN zypper -n install \ + curl \ + ethtool \ + gawk \ + iptables \ + kubevirt-container-disk \ + kubevirt-virt-launcher \ + libcap-progs \ + libvirt-client \ + libvirt-daemon-driver-qemu \ + netcat \ + nftables \ + passt \ + procps \ + psmisc \ + qemu-hw-usb-host \ + qemu-hw-usb-redirect \ + qemu-img \ + socat \ + tar \ + timezone \ + vim-small \ + virtiofsd \ + xorriso + +#!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 + +#!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 + +RUN zypper clean -a + +RUN cp -f /usr/share/kube-virt/virt-launcher/virtqemud.conf /etc/libvirt/virtqemud.conf && \ + cp -f /usr/share/kube-virt/virt-launcher/qemu.conf /etc/libvirt/qemu.conf + +# 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 && \ + setcap 'cap_net_bind_service=+ep' /usr/bin/virt-launcher-monitor && \ + 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/_constraints b/_constraints new file mode 100644 index 0000000..4988ecd --- /dev/null +++ b/_constraints @@ -0,0 +1,7 @@ + + + + 10 + + + diff --git a/_service b/_service new file mode 100644 index 0000000..9c82310 --- /dev/null +++ b/_service @@ -0,0 +1,15 @@ + + + + + Dockerfile + PKG_VERSION + PKG_RELEASE + REGISTRY + TAGPREFIX + LABELPREFIX + pkg=kubevirt-virt-launcher source /usr/lib/obs/service/kubevirt_containers_meta + 1 + + + diff --git a/virt-launcher-container.changes b/virt-launcher-container.changes new file mode 100644 index 0000000..7bb8f63 --- /dev/null +++ b/virt-launcher-container.changes @@ -0,0 +1,201 @@ +------------------------------------------------------------------- +Mon Jul 15 06:47:42 UTC 2024 - Vasily Ulyanov + +- Install passt package + +------------------------------------------------------------------- +Fri Jun 21 07:38:50 UTC 2024 - Vasily Ulyanov + +- Ensure procps is installed (provides ps for tests) + +------------------------------------------------------------------- +Wed May 22 08:12:59 UTC 2024 - Vasily Ulyanov + +- Add LABEL with source URL + +------------------------------------------------------------------- +Tue Mar 19 16:18:45 UTC 2024 - Vasily Ulyanov + +- Install qemu-hw-usb-host to enable USB passthrough (bsc#1221538) +- Install psmisc (provides killall for tests) + +------------------------------------------------------------------- +Wed Mar 6 08:16:34 UTC 2024 - Vasily Ulyanov + +- Use predefined configuration files for libvirt + +------------------------------------------------------------------- +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 + +- Fix firmware path for aarch64 (/usr/share/AAVMF) + +------------------------------------------------------------------- +Wed Nov 8 14:08:15 UTC 2023 - Vasily Ulyanov + +- Do not chown /var/run + +------------------------------------------------------------------- +Mon Oct 23 12:28:27 UTC 2023 - Vasily Ulyanov + +- Add license header + +------------------------------------------------------------------- +Fri Oct 13 15:27:52 UTC 2023 - Vasily Ulyanov + +- Install qemu-img explicitly + +------------------------------------------------------------------- +Wed Jul 12 06:53:31 UTC 2023 - Vasily Ulyanov + +- Drop TARGETARCH argument (detect arch during build) + +------------------------------------------------------------------- +Thu Jun 15 16:59:48 UTC 2023 - Vasily Ulyanov + +- Install virtiofsd explicitly instead of qemu-tools + +------------------------------------------------------------------- +Thu Mar 2 07:49:24 UTC 2023 - Vasily Ulyanov + +- Update the container image for KubeVirt v0.59.0 + +------------------------------------------------------------------- +Wed Dec 21 08:26:09 UTC 2022 - Vasily Ulyanov + +- Allow qemu/slirp to bind sockets to privileged ports +- Install ncat, curl, ethtool and gawk (required for network tests) + +------------------------------------------------------------------- +Mon Oct 10 13:49:10 UTC 2022 - Vasily Ulyanov + +- Ensure /usr/libexec/virtiofsd is present + +------------------------------------------------------------------- +Thu Sep 1 08:23:01 UTC 2022 - Vasily Ulyanov + +- Install only libvirt-daemon-driver-qemu and do not pull unneeded deps + +------------------------------------------------------------------- +Thu Aug 4 06:27:58 UTC 2022 - Vasily Ulyanov + +- Use standard LABEL directive to add mandatory labels + +------------------------------------------------------------------- +Wed Apr 27 16:30:17 UTC 2022 - Vasily Ulyanov + +- Setup permissions and capabilities for non-root VMIs + +------------------------------------------------------------------- +Fri Apr 15 10:50:30 UTC 2022 - Vasily Ulyanov + +- Install vim-small instread of vim +- Cleanup redundant stuff + +------------------------------------------------------------------- +Sun Mar 6 16:55:26 UTC 2022 - Vasily Ulyanov + +- Add _constraints (storage) + +------------------------------------------------------------------- +Wed Feb 23 13:42:52 UTC 2022 - Vasily Ulyanov + +- Enable USB redirection support for QEMU + +------------------------------------------------------------------- +Tue Feb 22 11:46:38 UTC 2022 - Vasily Ulyanov + +- Fix 'have choice for systemd-container...' build error + +------------------------------------------------------------------- +Wed Jan 19 06:48:50 UTC 2022 - Vasily Ulyanov + +- Set default TARGETARCH=amd64 +- Adjust indent + +------------------------------------------------------------------- +Mon Jan 10 10:56:39 UTC 2022 - Guillaume GARDET + +- Handle aarch64 +- Enable build only on aarch64 and x86_64 + +------------------------------------------------------------------- +Mon Jan 10 09:52:56 UTC 2022 - Vasily Ulyanov + +- Symlink UEFI firmware with AMD SEV support + +------------------------------------------------------------------- +Fri Nov 26 05:42:11 UTC 2021 - Vasily Ulyanov + +- Install tar package to enable kubectl cp ... + +------------------------------------------------------------------- +Wed Sep 29 11:26:27 UTC 2021 - Vasily Ulyanov + +- Install timezone package (bsc#1190587) + +------------------------------------------------------------------- +Wed Sep 29 08:35:32 UTC 2021 - Vasily Ulyanov + +- Send libvirtd debug logs to stderr (bsc#1190839) + +------------------------------------------------------------------- +Tue Aug 3 08:23:50 UTC 2021 - Vasily Ulyanov + +- Reset cgroup_controllers in /etc/libvirt/qemu.conf + +------------------------------------------------------------------- +Mon Jul 12 14:40:33 UTC 2021 - Vasily Ulyanov + +- Install xorriso instead of mkisofs + +------------------------------------------------------------------- +Fri Jun 4 12:20:51 UTC 2021 - Fabian Vogt + +- Include the registry in org.opensuse.reference + +------------------------------------------------------------------- +Fri Apr 23 06:59:34 UTC 2021 - Vasily Ulyanov + +- Tag the image with - +- Create symlinks for OVMF binaries in expected location + +------------------------------------------------------------------- +Sun Apr 18 07:57:40 UTC 2021 - Vasily Ulyanov + +- Run zypper clean after installation +- Sort installed packages alphabetically + +------------------------------------------------------------------- +Wed Mar 17 07:08:54 UTC 2021 - Vasily Ulyanov + +- Add placeholder vars to be replaced during build +- Fix mixed tabs and spaces + +------------------------------------------------------------------- +Tue Nov 17 23:03:31 UTC 2020 - James Fehlig + +- use ARG for defining base image + +------------------------------------------------------------------- +Tue Sep 15 03:21:06 UTC 2020 - James Fehlig + +- Adjust Dockerfile to conform to "Building Official Container + Images" documentation + +------------------------------------------------------------------- +Wed Jul 22 19:59:10 UTC 2020 - James Fehlig + +- Install kubevirt-container-disk package to get the container-disk + binary + +------------------------------------------------------------------- +Mon Jun 22 21:48:23 UTC 2020 - James Fehlig + +- Initial container for virt-launcher