Skip to content

Commit

Permalink
snap: Update for QEMU 5.2.0
Browse files Browse the repository at this point in the history
QEMU 5.2.0 needs ninja-build package installed on the build environment.

The default-configs were copied to $QEMU_SRC/default-configs but that does
take any effect, so instead it is now copied to $QEMU_SRC/default-configs/devices
and the configs for i386 were updated.

Also it had to change some arguments being passed to configure as Meson was failing
due inconsistent paths:

  ./meson.build:1:0: ERROR: The value of the 'libdir' option is '/usr/lib/qemu' which must be a subdir of the prefix '/snap/kata-containers/current/usr'.
  Note that if you pass a relative path, it is assumed to be a subdir of prefix.

Depends-on: github.com/kata-containers/tests#3276
Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
  • Loading branch information
wainersm committed Feb 25, 2021
1 parent 5655c7c commit 8b9751e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 5 additions & 6 deletions snap/snapcraft.yaml
Expand Up @@ -228,6 +228,7 @@ parts:
- libffi-dev
- libmount-dev
- libselinux1-dev
- ninja-build
override-build: |
yq=${SNAPCRAFT_STAGE}/yq
export GOPATH=${SNAPCRAFT_STAGE}/gopath
Expand Down Expand Up @@ -275,16 +276,14 @@ parts:
configure_hypervisor=${kata_dir}/tools/packaging/scripts/configure-hypervisor.sh
chmod +x ${configure_hypervisor}
# static build
echo "$(${configure_hypervisor} -s qemu) \
# static build. The --prefix, --libdir, --libexecdir, --datadir arguments are
# based on PREFIX and set by configure-hypervisor.sh
echo "$(PREFIX=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr ${configure_hypervisor} -s qemu) \
--disable-rbd
--prefix=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr \
--datadir=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr/share \
--libexecdir=/snap/${SNAPCRAFT_PROJECT_NAME}/current/usr/libexec/qemu" \
| xargs ./configure
# Copy QEMU configurations (Kconfigs)
cp -a ${kata_dir}/tools/packaging/qemu/default-configs/* default-configs/
cp -a ${kata_dir}/tools/packaging/qemu/default-configs/* default-configs/devices/
# build and install
make -j $(($(nproc)-1))
Expand Down
2 changes: 2 additions & 0 deletions tools/packaging/qemu/default-configs/i386-softmmu.mak
Expand Up @@ -24,6 +24,7 @@ CONFIG_SD=n

# Automotive
CONFIG_CAN_BUS=n
CONFIG_CAN_CTUCANFD=n
CONFIG_CAN_PCI=n
CONFIG_CAN_SJA1000=n

Expand Down Expand Up @@ -56,6 +57,7 @@ CONFIG_USB_TABLET_WACOM=n
CONFIG_USB_UHCI=n
CONFIG_USB_XHCI=n
CONFIG_USB_XHCI_NEC=n
CONFIG_USB_XHCI_PCI=n

# ISA
CONFIG_IDE_ISA=n
Expand Down

0 comments on commit 8b9751e

Please sign in to comment.