From 21840d924585c645ac466f546d48198e04a8caea Mon Sep 17 00:00:00 2001 From: Gergely Imreh Date: Wed, 1 May 2019 18:12:36 +0100 Subject: [PATCH] qemu: use v4.0.0-balena Also append the QEMU version to the locally cached copy, so the CLI can correctly bump version whenever QEMU_VERSION is bumped in the future. Change-type: minor Signed-off-by: Gergely Imreh --- lib/utils/qemu.coffee | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/qemu.coffee b/lib/utils/qemu.coffee index 89ff6ff0..11b31b14 100644 --- a/lib/utils/qemu.coffee +++ b/lib/utils/qemu.coffee @@ -1,6 +1,6 @@ Promise = require('bluebird') -exports.QEMU_VERSION = QEMU_VERSION = 'v3.0.0+resin' +exports.QEMU_VERSION = QEMU_VERSION = 'v4.0.0-balena' exports.QEMU_BIN_NAME = QEMU_BIN_NAME = 'qemu-execve' exports.installQemuIfNeeded = Promise.method (emulated, logger, arch) -> @@ -63,7 +63,7 @@ getQemuPath = (arch) -> Promise.resolve(fs.mkdir(binDir)) .catch(code: 'EEXIST', ->) .then -> - path.join(binDir, "#{QEMU_BIN_NAME}-#{arch}") + path.join(binDir, "#{QEMU_BIN_NAME}-#{arch}-#{QEMU_VERSION}") platformNeedsQemu = -> os = require('os') @@ -81,7 +81,7 @@ installQemu = (arch) -> installStream = fs.createWriteStream(qemuPath) qemuArch = balenaArchToQemuArch(arch) - downloadArchiveName = "qemu-3.0.0+resin-#{qemuArch}.tar.gz" + downloadArchiveName = "qemu-#{QEMU_VERSION.replace(/^v/, '')}-#{qemuArch}.tar.gz" qemuUrl = "https://github.com/balena-io/qemu/releases/download/#{QEMU_VERSION}/#{downloadArchiveName}" extract = tar.extract()