Merge ~paelzer/ubuntu/+source/qemu:bug-1840956-fix-binfmt-usage-in-container-disco into ubuntu/+source/qemu:ubuntu/disco-devel

Proposed by Christian Ehrhardt  on 2019-09-13
Status: Merged
Approved by: Christian Ehrhardt  on 2019-09-17
Approved revision: cc130229c29e3b4573b3af1f8789297d30466fb7
Merged at revision: cc130229c29e3b4573b3af1f8789297d30466fb7
Proposed branch: ~paelzer/ubuntu/+source/qemu:bug-1840956-fix-binfmt-usage-in-container-disco
Merge into: ubuntu/+source/qemu:ubuntu/disco-devel
Diff against target: 40 lines (+12/-6)
2 files modified
debian/binfmt-update-in (+6/-6)
debian/changelog (+6/-0)
Reviewer Review Type Date Requested Status
Rafael David Tinoco 2019-09-13 Approve on 2019-09-17
Canonical Server Team 2019-09-13 Pending
Ubuntu Server Dev import team 2019-09-13 Pending
Review via email:
To post a comment you must log in.
Christian Ehrhardt  (paelzer) wrote :

Same change as in Eoan applies to Disco.
Since Eoan is fixed, lets do the SRU now.
Test build in PPA:

Rafael David Tinoco (rafaeldtinoco) wrote :

# regular installation attempt

Setting up qemu-user-static (1:3.1+dfsg-2ubuntu3.4) ...
update-binfmts: warning: unable to close /proc/sys/fs/binfmt_misc/register: Invalid argument
update-binfmts: warning: unable to enable binary format qemu-aarch64
update-binfmts: exiting due to previous errors
dpkg: error processing package qemu-user-static (--configure):
 installed qemu-user-static package post-installation script subprocess returned error exit status 2
Setting up binfmt-support (2.2.0-2) ...


# using the PPA

Preparing to unpack .../0-qemu-user-static_1%3a3.1+dfsg-2ubuntu3.5_amd64.deb ...
Unpacking qemu-user-static (1:3.1+dfsg-2ubuntu3.5) over (1:3.1+dfsg-2ubuntu3.4) ...
Preparing to unpack .../1-qemu-utils_1%3a3.1+dfsg-2ubuntu3.5_amd64.deb ...
Unpacking qemu-utils (1:3.1+dfsg-2ubuntu3.5) over (1:3.1+dfsg-2ubuntu3.4) ...
Preparing to unpack .../2-qemu-system-common_1%3a3.1+dfsg-2ubuntu3.5_amd64.deb ...
Unpacking qemu-system-common (1:3.1+dfsg-2ubuntu3.5) over (1:3.1+dfsg-2ubuntu3.4) ...
Preparing to unpack .../3-qemu-block-extra_1%3a3.1+dfsg-2ubuntu3.5_amd64.deb ...
Unpacking qemu-block-extra:amd64 (1:3.1+dfsg-2ubuntu3.5) over (1:3.1+dfsg-2ubuntu3.4) ...
Preparing to unpack .../4-qemu-system-data_1%3a3.1+dfsg-2ubuntu3.5_all.deb ...
Unpacking qemu-system-data (1:3.1+dfsg-2ubuntu3.5) over (1:3.1+dfsg-2ubuntu3.4) ...
Preparing to unpack .../5-qemu-system-arm_1%3a3.1+dfsg-2ubuntu3.5_amd64.deb ...
Unpacking qemu-system-arm (1:3.1+dfsg-2ubuntu3.5) over (1:3.1+dfsg-2ubuntu3.4) ...
Preparing to unpack .../6-qemu-system-gui_1%3a3.1+dfsg-2ubuntu3.5_amd64.deb ...
Unpacking qemu-system-gui (1:3.1+dfsg-2ubuntu3.5) over (1:3.1+dfsg-2ubuntu3.4) ...
Setting up qemu-system-gui (1:3.1+dfsg-2ubuntu3.5) ...
Setting up qemu-user-static (1:3.1+dfsg-2ubuntu3.5) ...
System has not been booted with systemd as init system (PID 1). Can't operate.
Failed to connect to bus: Host is down
Setting up qemu-system-data (1:3.1+dfsg-2ubuntu3.5) ...
Setting up qemu-block-extra:amd64 (1:3.1+dfsg-2ubuntu3.5) ...
Setting up qemu-system-common (1:3.1+dfsg-2ubuntu3.5) ...
Setting up qemu-system-arm (1:3.1+dfsg-2ubuntu3.5) ...
Setting up qemu-utils (1:3.1+dfsg-2ubuntu3.5) ...
Processing triggers for man-db (2.8.5-2) ...

Rafael David Tinoco (rafaeldtinoco) wrote :

The change works, just like in Eoan, and qemu-user-static is able to install in a WSL1 environment. +1 on this merge.

review: Approve
Christian Ehrhardt  (paelzer) wrote :

Thanks, tagged pushed and uploaded

Christian Ehrhardt  (paelzer) wrote :

FYI - still waiting for review by SRU Team

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/binfmt-update-in b/debian/binfmt-update-in
2index dd312ab..dc6fa04 100644
3--- a/debian/binfmt-update-in
4+++ b/debian/binfmt-update-in
5@@ -1,9 +1,10 @@
6-# check if we're running inside an (lxc) container
7-# (we may copy or move this to the postinst script too, to skip installing it)
8-grep -zqs ^container= /proc/1/environ && exit 0
10 # == binfmt registration/deregistration ==
11-if command -v update-binfmts > /dev/null ; then
12+# Checks if binfmt-support is installed. In certain environments the binfmt_misc
13+# feature still might be unusable. The old check for containers wasn't covering
14+# all containertypes and they could be set up privileged to have binfmt working.
15+if ! command -v update-binfmts > /dev/null || ! systemctl --quiet is-active binfmt-support.service; then
16+ exit 0
19 fmts="aarch64 alpha arm armeb cris hppa i386 m68k microblaze mips mipsel mipsn32 mipsn32el mips64 mips64el ppc ppc64 ppc64abi32 ppc64le riscv32 riscv64 s390x sh4 sh4eb sparc sparc32plus sparc64 x86_64 xtensa xtensaeb"
21@@ -112,5 +113,4 @@ case "$DPKG_MAINTSCRIPT_NAME:$1" in
23 esac
26 # == binfmt registration/deregistration ==
27diff --git a/debian/changelog b/debian/changelog
28index 6b9e8ec..b39b112 100644
29--- a/debian/changelog
30+++ b/debian/changelog
31@@ -1,3 +1,9 @@
32+qemu (1:3.1+dfsg-2ubuntu3.5) disco; urgency=medium
34+ * d/binfmt-update-in: fix binfmt usage in some containers (LP: #1840956)
36+ -- Christian Ehrhardt <> Mon, 09 Sep 2019 10:59:15 +0200
38 qemu (1:3.1+dfsg-2ubuntu3.4) disco; urgency=medium
40 * d/p/ubuntu/lp-1832622-*: count cache flush Spectre v2 mitigation for ppc64


People subscribed via source and target branches