Skip to content

d/control-in: avoid version mismatch of installed binaries

Hi, I was pinged about an issue like:

$ qemu-system-x86_64
Failed to open module: /usr/lib/x86_64-linux-gnu/qemu/ui-gtk.so: undefined symbol: get_relocated_path
Unable to init server: Could not connect: Connection refused

It turned out the installed binaries mismatched.

Repro steps:

# Get a system with an older qemu build (I used Ubuntu Groovy, but any should do)
$ apt install qemu-system-x86
$ dpkg -l | grep 'ii\s*qemu'
ii  qemu-block-extra:amd64               1:5.0-5ubuntu9.3                    amd64        extra block backend modules for qemu-system and qemu-utils
ii  qemu-system-common                   1:5.0-5ubuntu9.3                    amd64        QEMU full system emulation binaries (common files)
ii  qemu-system-data                     1:5.0-5ubuntu9.3                    all          QEMU full system emulation (data files)
ii  qemu-system-gui:amd64                1:5.0-5ubuntu9.3                    amd64        QEMU full system emulation binaries (user interface and audio support)
ii  qemu-system-x86                      1:5.0-5ubuntu9.3                    amd64        QEMU full system emulation binaries (x86)
ii  qemu-utils                           1:5.0-5ubuntu9.3                    amd64        QEMU utilities

# Now enable the new versions

$ vim /etc/apt/sources.list
$ apt update
$ apt-cache policy qemu-system-x86 qemu-system-gui

# There is a versioned recommends from  emu-system-x86 -> qemu-system-gui
  Recommends: qemu-system-gui (= 1:5.0-5ubuntu9.3)

# But it is only a Recommend, therefore we can get those out of sync

$ apt install qemu-system-common qemu-system-data qemu-system-gui qemu-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libgdk-pixbuf-2.0-0 libgdk-pixbuf-xlib-2.0-0 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common qemu-block-extra
Suggested packages:
  debootstrap
The following NEW packages will be installed:
  libgdk-pixbuf-2.0-0 libgdk-pixbuf-xlib-2.0-0
The following packages will be upgraded:
  libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common qemu-block-extra qemu-system-common qemu-system-data qemu-system-gui qemu-utils
7 upgraded, 2 newly installed, 0 to remove and 405 not upgraded.
Need to get 4132 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://archive.ubuntu.com/ubuntu hirsute/main amd64 libgdk-pixbuf2.0-0 amd64 2.40.2-2build2 [2628 B]
Get:2 http://archive.ubuntu.com/ubuntu hirsute/main amd64 libgdk-pixbuf-xlib-2.0-0 amd64 2.40.2-2build2 [38.6 kB]
Get:3 http://archive.ubuntu.com/ubuntu hirsute/main amd64 libgdk-pixbuf2.0-common all 2.42.2+dfsg-1 [4888 B]
Get:4 http://archive.ubuntu.com/ubuntu hirsute/main amd64 libgdk-pixbuf-2.0-0 amd64 2.42.2+dfsg-1 [137 kB]
Get:5 http://archive.ubuntu.com/ubuntu hirsute/main amd64 qemu-system-common amd64 1:5.2+dfsg-3ubuntu1 [1611 kB]
Get:6 http://archive.ubuntu.com/ubuntu hirsute/main amd64 qemu-utils amd64 1:5.2+dfsg-3ubuntu1 [1128 kB]
Get:7 http://archive.ubuntu.com/ubuntu hirsute/main amd64 qemu-block-extra amd64 1:5.2+dfsg-3ubuntu1 [55.7 kB]
Get:8 http://archive.ubuntu.com/ubuntu hirsute/main amd64 qemu-system-data all 1:5.2+dfsg-3ubuntu1 [1110 kB]
Get:9 http://archive.ubuntu.com/ubuntu hirsute/main amd64 qemu-system-gui amd64 1:5.2+dfsg-3ubuntu1 [43.8 kB]
Fetched 4132 kB in 2s (2399 kB/s)         
(Reading database ... 47056 files and directories currently installed.)
Preparing to unpack .../0-libgdk-pixbuf2.0-0_2.40.2-2build2_amd64.deb ...
Unpacking libgdk-pixbuf2.0-0:amd64 (2.40.2-2build2) over (2.40.0+dfsg-5ubuntu0.1) ...
Selecting previously unselected package libgdk-pixbuf-xlib-2.0-0:amd64.
Preparing to unpack .../1-libgdk-pixbuf-xlib-2.0-0_2.40.2-2build2_amd64.deb ...
Unpacking libgdk-pixbuf-xlib-2.0-0:amd64 (2.40.2-2build2) ...
Preparing to unpack .../2-libgdk-pixbuf2.0-common_2.42.2+dfsg-1_all.deb ...
Unpacking libgdk-pixbuf2.0-common (2.42.2+dfsg-1) over (2.40.0+dfsg-5ubuntu0.1) ...
Selecting previously unselected package libgdk-pixbuf-2.0-0:amd64.
Preparing to unpack .../3-libgdk-pixbuf-2.0-0_2.42.2+dfsg-1_amd64.deb ...
Unpacking libgdk-pixbuf-2.0-0:amd64 (2.42.2+dfsg-1) ...
Preparing to unpack .../4-qemu-system-common_1%3a5.2+dfsg-3ubuntu1_amd64.deb ...
Unpacking qemu-system-common (1:5.2+dfsg-3ubuntu1) over (1:5.0-5ubuntu9.3) ...
Preparing to unpack .../5-qemu-utils_1%3a5.2+dfsg-3ubuntu1_amd64.deb ...
Unpacking qemu-utils (1:5.2+dfsg-3ubuntu1) over (1:5.0-5ubuntu9.3) ...
Preparing to unpack .../6-qemu-block-extra_1%3a5.2+dfsg-3ubuntu1_amd64.deb ...
Unpacking qemu-block-extra (1:5.2+dfsg-3ubuntu1) over (1:5.0-5ubuntu9.3) ...
Preparing to unpack .../7-qemu-system-data_1%3a5.2+dfsg-3ubuntu1_all.deb ...
Unpacking qemu-system-data (1:5.2+dfsg-3ubuntu1) over (1:5.0-5ubuntu9.3) ...
Preparing to unpack .../8-qemu-system-gui_1%3a5.2+dfsg-3ubuntu1_amd64.deb ...
Unpacking qemu-system-gui:amd64 (1:5.2+dfsg-3ubuntu1) over (1:5.0-5ubuntu9.3) ...
Setting up libgdk-pixbuf2.0-common (2.42.2+dfsg-1) ...
Setting up qemu-system-data (1:5.2+dfsg-3ubuntu1) ...
Setting up libgdk-pixbuf-2.0-0:amd64 (2.42.2+dfsg-1) ...
Setting up qemu-block-extra (1:5.2+dfsg-3ubuntu1) ...
Setting up qemu-system-common (1:5.2+dfsg-3ubuntu1) ...
Setting up libgdk-pixbuf-xlib-2.0-0:amd64 (2.40.2-2build2) ...
Setting up qemu-system-gui:amd64 (1:5.2+dfsg-3ubuntu1) ...
Setting up libgdk-pixbuf2.0-0:amd64 (2.40.2-2build2) ...
Setting up qemu-utils (1:5.2+dfsg-3ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.32-0ubuntu3) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for mime-support (3.64ubuntu1) ...

$ dpkg -l | grep 'ii\s*qemu'
ii  qemu-block-extra                     1:5.2+dfsg-3ubuntu1                 amd64        extra block backend modules for qemu-system and qemu-utils
ii  qemu-system-common                   1:5.2+dfsg-3ubuntu1                 amd64        QEMU full system emulation binaries (common files)
ii  qemu-system-data                     1:5.2+dfsg-3ubuntu1                 all          QEMU full system emulation (data files)
ii  qemu-system-gui:amd64                1:5.2+dfsg-3ubuntu1                 amd64        QEMU full system emulation binaries (user interface and audio support)
ii  qemu-system-x86                      1:5.0-5ubuntu9.3                    amd64        QEMU full system emulation binaries (x86)
ii  qemu-utils                           1:5.2+dfsg-3ubuntu1                 amd64        QEMU utilities

And now things fail:

$ qemu-system-x86_64
Failed to open module: /usr/lib/x86_64-linux-gnu/qemu/ui-gtk.so: undefined symbol: get_relocated_path
Unable to init server: Could not connect: Connection refused

Since qemu-block-extra and qemu-system-gui are only carrying .so files that are not useful on it's own, but could be useful for either qemu-system-. In a similar way - while not containing .so files - qemu-system-common and qemu-system-data still are affected and also should match their qemu-system- counterparts.

qemu-utils also need block-extra, but it already has a hard versioned depends.

We also have an enhances, but that is only informational.

There are two ways to represent that:

  • a) Describe the inability to work with newer versions (not fully correct as older versions would be bad as well). each of qemu-system-<arch> could declare "Breaks >> CURRENTVERSION on each of qemu-system-gui, qemu-block-extra, qemu-system-common and qemu-system-data
  • b) Describe that the qemu-system-gui, qemu-block-extra, qemu-system-common and qemu-system-data packages are useless on their own. But be careful as they don't mind which qemu-sytem-* one fulfills that dependency, so they could all get: Depends: qemu-system-arm | qemu-system-mips | ... qemu-system-s390x all with an =CURRENTVERSION
  • c) another way you suggest?

For now I like (b) the most, so this is what I will initially suggest for discussion.

Merge request reports

Loading