From eaeb75d858f45447c4b3d17f33b6183f95b98466 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Tue, 2 Feb 2021 10:42:07 +0100 Subject: [qemu] Rename 'qemukvm' core module to 'qemu' --- core/modules/qemu/module.build | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 core/modules/qemu/module.build (limited to 'core/modules/qemu/module.build') diff --git a/core/modules/qemu/module.build b/core/modules/qemu/module.build new file mode 100644 index 00000000..f2a0df9e --- /dev/null +++ b/core/modules/qemu/module.build @@ -0,0 +1,18 @@ +#!/bin/bash +fetch_source() { + : +} + +build() { + COPYLIST="list_dpkg_output" + [ -e "$COPYLIST" ] && rm "$COPYLIST" + list_packet_files >> "$COPYLIST" + + + tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}" +} + +post_copy() { + # qemu-bridge-helper needs suid to be called within run-virt + find ${TARGET_BUILD_DIR} -type f -executable -name "*qemu-bridge-helper*" -exec chmod u+s {} \; +} -- cgit v1.2.3-55-g7522 From f0668d5ff2cffc92d1226be4605f46b1aa4deb26 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Thu, 4 Feb 2021 14:26:39 +0100 Subject: [qemu] Fix installation of package files --- core/modules/qemu/module.build | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'core/modules/qemu/module.build') diff --git a/core/modules/qemu/module.build b/core/modules/qemu/module.build index f2a0df9e..fc1bc074 100644 --- a/core/modules/qemu/module.build +++ b/core/modules/qemu/module.build @@ -5,14 +5,11 @@ fetch_source() { build() { COPYLIST="list_dpkg_output" - [ -e "$COPYLIST" ] && rm "$COPYLIST" - list_packet_files >> "$COPYLIST" - - + [ -e "${COPYLIST}" ] && rm "${COPYLIST}" + list_packet_files >> "${COPYLIST}" tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}" } post_copy() { - # qemu-bridge-helper needs suid to be called within run-virt - find ${TARGET_BUILD_DIR} -type f -executable -name "*qemu-bridge-helper*" -exec chmod u+s {} \; + : } -- cgit v1.2.3-55-g7522 From b2dcc3e01cb2de8a3665c55f731e8a2dd97eff40 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Fri, 5 Feb 2021 14:33:56 +0100 Subject: [qemu] Add support to build the qemu runvirt plugin --- core/modules/qemu/module.build | 19 ++++++++++++++++++- core/modules/qemu/module.conf | 36 +++++++++++++++++++++++++++++++++++- core/modules/qemu/module.conf.debian | 20 -------------------- core/modules/qemu/module.conf.ubuntu | 5 ++--- 4 files changed, 55 insertions(+), 25 deletions(-) delete mode 100644 core/modules/qemu/module.conf.debian (limited to 'core/modules/qemu/module.build') diff --git a/core/modules/qemu/module.build b/core/modules/qemu/module.build index fc1bc074..d1d9a691 100644 --- a/core/modules/qemu/module.build +++ b/core/modules/qemu/module.build @@ -1,13 +1,30 @@ #!/bin/bash + fetch_source() { - : + # copy qemu runvirt plugin source to working directory + local src_dir="${MODULE_DIR}/runvirt-plugin-qemu" + local dst_dir="${MODULE_WORK_DIR}/src" + mkdir -p "${dst_dir}" || perror "Could not create source folder for qemu runvirt plugin!" + cp -r "${src_dir}" "${dst_dir}" || perror "Could not copy source files for qemu runvirt plugin!" } build() { + # copy mandatory system packages COPYLIST="list_dpkg_output" [ -e "${COPYLIST}" ] && rm "${COPYLIST}" list_packet_files >> "${COPYLIST}" tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}" + + # build qemu runvirt plugin + local build_dir="${MODULE_WORK_DIR}/src/runvirt-plugin-qemu" + mvn -f "${build_dir}" clean package || perror "Could not build runvirt-plugin-qemu with Maven!" + + # install qemu runvirt plugin + local build_artifact_filename="runvirt-plugin-qemu-1.0-SNAPSHOT.jar" + local install_dir="${MODULE_BUILD_DIR}/opt/openslx/share/java" + local install_filename="runvirt-plugin-qemu.jar" + mkdir -p "${install_dir}" + cp "${build_dir}/target/${build_artifact_filename}" "${install_dir}/${install_filename}" || perror "Could not install runvirt-plugin-qemu!" } post_copy() { diff --git a/core/modules/qemu/module.conf b/core/modules/qemu/module.conf index 61069809..def35459 100644 --- a/core/modules/qemu/module.conf +++ b/core/modules/qemu/module.conf @@ -1,2 +1,36 @@ #!/bin/bash -REQUIRED_MODULES="libvirt" + +REQUIRED_MODULES=" + libvirt + openjdk-8-jre-headless +" + +REQUIRED_BINARIES=" + ivshmem-client + ivshmem-server + kvm + qemu-img + qemu-io + qemu-nbd + qemu-pr-helper + qemu-system-aarch64 + qemu-system-arm + qemu-system-i386 + qemu-system-x86_64 + virtfs-proxy-helper + qemu-make-debian-root + qemu-bridge-helper + vhost-user-gpu +" + +REQUIRED_DIRECTORIES=" + /etc + /usr/share/ovmf + /usr/share/OVMF + /usr/share/qemu + /usr/share/seabios +" + +REQUIRED_FILES=" + /opt/openslx/share/java/runvirt-plugin-qemu.jar +" diff --git a/core/modules/qemu/module.conf.debian b/core/modules/qemu/module.conf.debian deleted file mode 100644 index f4892d81..00000000 --- a/core/modules/qemu/module.conf.debian +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -REQUIRED_INSTALLED_PACKAGES=" - qemu - qemu-kvm - mvn - openjdk-11-jdk-headless - openjdk-11-jre -" - -REQUIRED_CONTENT_PACKAGES=" - qemu - qemu-kvm - qemu-system-common - qemu-system-arm - qemu-system-x86 - qemu-utils - seabios - ovmf - openjdk-11-jre -" diff --git a/core/modules/qemu/module.conf.ubuntu b/core/modules/qemu/module.conf.ubuntu index 651d7a37..5f9bc981 100644 --- a/core/modules/qemu/module.conf.ubuntu +++ b/core/modules/qemu/module.conf.ubuntu @@ -1,10 +1,10 @@ #!/bin/bash + REQUIRED_INSTALLED_PACKAGES=" qemu qemu-kvm - mvn + maven openjdk-8-jdk-headless - openjdk-8-jre " REQUIRED_CONTENT_PACKAGES=" @@ -16,5 +16,4 @@ REQUIRED_CONTENT_PACKAGES=" qemu-utils seabios ovmf - openjdk-8-jre " -- cgit v1.2.3-55-g7522 From ab828877dc37ba012fc1264d6b0ef30f4665acaf Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Fri, 25 Jun 2021 12:03:47 +0200 Subject: [qemu] Remove build support for MiniLinux --- core/modules/qemu/module.build | 6 ------ core/modules/qemu/module.conf | 32 +++----------------------------- core/modules/qemu/module.conf.ubuntu | 2 -- 3 files changed, 3 insertions(+), 37 deletions(-) (limited to 'core/modules/qemu/module.build') diff --git a/core/modules/qemu/module.build b/core/modules/qemu/module.build index d1d9a691..4d86de96 100644 --- a/core/modules/qemu/module.build +++ b/core/modules/qemu/module.build @@ -9,12 +9,6 @@ fetch_source() { } build() { - # copy mandatory system packages - COPYLIST="list_dpkg_output" - [ -e "${COPYLIST}" ] && rm "${COPYLIST}" - list_packet_files >> "${COPYLIST}" - tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}" - # build qemu runvirt plugin local build_dir="${MODULE_WORK_DIR}/src/runvirt-plugin-qemu" mvn -f "${build_dir}" clean package || perror "Could not build runvirt-plugin-qemu with Maven!" diff --git a/core/modules/qemu/module.conf b/core/modules/qemu/module.conf index def35459..c1cdf05d 100644 --- a/core/modules/qemu/module.conf +++ b/core/modules/qemu/module.conf @@ -5,32 +5,6 @@ REQUIRED_MODULES=" openjdk-8-jre-headless " -REQUIRED_BINARIES=" - ivshmem-client - ivshmem-server - kvm - qemu-img - qemu-io - qemu-nbd - qemu-pr-helper - qemu-system-aarch64 - qemu-system-arm - qemu-system-i386 - qemu-system-x86_64 - virtfs-proxy-helper - qemu-make-debian-root - qemu-bridge-helper - vhost-user-gpu -" - -REQUIRED_DIRECTORIES=" - /etc - /usr/share/ovmf - /usr/share/OVMF - /usr/share/qemu - /usr/share/seabios -" - -REQUIRED_FILES=" - /opt/openslx/share/java/runvirt-plugin-qemu.jar -" +REQUIRED_BINARIES="" +REQUIRED_LIBRARIES="" +REQUIRED_DIRECTORIES="" diff --git a/core/modules/qemu/module.conf.ubuntu b/core/modules/qemu/module.conf.ubuntu index 5f9bc981..3b1089e0 100644 --- a/core/modules/qemu/module.conf.ubuntu +++ b/core/modules/qemu/module.conf.ubuntu @@ -1,8 +1,6 @@ #!/bin/bash REQUIRED_INSTALLED_PACKAGES=" - qemu - qemu-kvm maven openjdk-8-jdk-headless " -- cgit v1.2.3-55-g7522