balena build/deploy: Update QEMU version to support newer balenalib images

Change-type: patch
This commit is contained in:
Paulo Castro 2020-04-29 11:33:41 +01:00
parent 6b33f95661
commit 6d95c5bad5

View File

@ -17,7 +17,7 @@
import * as Promise from 'bluebird';
import { getBalenaSdk } from './lazy';
export const QEMU_VERSION = 'v4.0.0-balena';
export const QEMU_VERSION = 'v4.0.0+balena2';
export const QEMU_BIN_NAME = 'qemu-execve';
export function qemuPathInContext(context) {
@ -84,11 +84,12 @@ export function installQemu(arch) {
const installStream = fs.createWriteStream(qemuPath);
const qemuArch = balenaArchToQemuArch(arch);
const downloadArchiveName = `qemu-${QEMU_VERSION.replace(
/^v/,
'',
)}-${qemuArch}.tar.gz`;
const qemuUrl = `https://github.com/balena-io/qemu/releases/download/${QEMU_VERSION}/${downloadArchiveName}`;
const fileVersion = QEMU_VERSION.replace(/^v/, '').replace('+', '.');
const urlFile = encodeURIComponent(
`qemu-${fileVersion}-${qemuArch}.tar.gz`,
);
const urlVersion = encodeURIComponent(QEMU_VERSION);
const qemuUrl = `https://github.com/balena-io/qemu/releases/download/${urlVersion}/${urlFile}`;
const extract = tar.extract();
extract.on('entry', function(header, stream, next) {