diff --git a/build/debian-base/Makefile b/build/debian-base/Makefile index cdeac1dc64..bae4fd25f1 100755 --- a/build/debian-base/Makefile +++ b/build/debian-base/Makefile @@ -57,9 +57,11 @@ ifeq ($(ARCH),amd64) sed "/CROSS_BUILD_/d" $(TEMP_DIR)/Dockerfile.build > $(TEMP_DIR)/Dockerfile.build.tmp else # When cross-building, only the placeholder "CROSS_BUILD_" should be removed - # Register /usr/bin/qemu-ARCH-static as the handler for ARM binaries in the kernel + # Register /usr/bin/qemu-ARCH-static as the handler for non-x86 binaries in the kernel docker run --rm --privileged multiarch/qemu-user-static:register --reset curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/$(QEMUVERSION)/x86_64_qemu-$(QEMUARCH)-static.tar.gz | tar -xz -C $(TEMP_DIR) + # Ensure we don't get surprised by umask settings + chmod 0755 qemu-$(QEMUARCH)-static sed "s/CROSS_BUILD_//g" $(TEMP_DIR)/Dockerfile.build > $(TEMP_DIR)/Dockerfile.build.tmp endif mv $(TEMP_DIR)/Dockerfile.build.tmp $(TEMP_DIR)/Dockerfile.build diff --git a/test/images/image-util.sh b/test/images/image-util.sh index fdd0f0105b..0c645c42e0 100755 --- a/test/images/image-util.sh +++ b/test/images/image-util.sh @@ -82,6 +82,8 @@ build() { # Register qemu-*-static for all supported processors except the current one docker run --rm --privileged multiarch/qemu-user-static:register --reset curl -sSL https://github.com/multiarch/qemu-user-static/releases/download/${QEMUVERSION}/x86_64_qemu-${QEMUARCHS[$arch]}-static.tar.gz | tar -xz -C ${temp_dir} + # Ensure we don't get surprised by umask settings + chmod 0755 "${temp_dir}/qemu-${QEMUARCHS[$arch]}-static" ${SED} -i "s/CROSS_BUILD_//g" Dockerfile fi fi