Merge ~ahasenack/ubuntu/+source/qemu:noble-qemu-gluster-universe into ubuntu/+source/qemu:ubuntu/devel

Proposed by Andreas Hasenack
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: da9b553a24a78c213b08659518a477af684d86b3
Proposed branch: ~ahasenack/ubuntu/+source/qemu:noble-qemu-gluster-universe
Merge into: ubuntu/+source/qemu:ubuntu/devel
Diff against target: 145 lines (+84/-2)
4 files modified
debian/changelog (+12/-0)
debian/control (+25/-0)
debian/control-in (+25/-0)
debian/rules (+22/-2)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Sergio Durigan Junior (community) Approve
Canonical Server Reporter Pending
Review via email: mp+459962@code.launchpad.net

This proposal supersedes a proposal from 2024-01-16.

Description of the change

This branch moves the glusterfs block module from bin:qemu-block-extra to a new package called bin:qemu-block-supplemental. This is case #8 of the package transition guide[1], and appropriate breaks/replaces have been added.

The reason for this move is the glusterfs demotion[2] to universe. We want to keep shipping the glusterfs block module, but it must be in universe from now on.

This change also requires a change in the ubuntu release upgrader, which is being tracked in the glusterfs demotion bug[2]. Without it, systems who upgrade to noble and rely on the glusterfs block module will not have it installed anymore after the upgrade.

The extra Depends on bin:qemu-block-extra comes automatically via "Depends: ${misc:Depends}" due to the use of "dh_installdocs --link-doc" in d/rules to link the docs from bin:qemu-block-supplemental to bin:qemu-block-extra, but we also need that Depends because of bin:qemu-block-extra's run-qemu.mount systemd unit.

I didn't add any specific new documentation to bin:qemu-block-supplemental, as it's just another set of modules (but only contains glusterfs for now). Maybe in the future we will want to move other modules there, like ceph/rbd.

Note that glusterfs is not available in 32bit platforms, so currently the bin:qemu-block-supplemental package won't exist there. If it ever ships another module, one that builds in 32bit platforms, then the Architecture line of bin:qemu-block-supplemental will have to be adjusted. THe PPA has an armhf build exactly to exercise this specific condition.

PPA: https://launchpad.net/~ahasenack/+archive/ubuntu/qemu-gluster-universe/

1. https://wiki.debian.org/PackageTransition
2. https://bugs.launchpad.net/ubuntu/+source/glusterfs/+bug/2045063

To post a comment you must log in.
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote : Posted in a previous version of this proposal

I'll take a look at this one.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote : Posted in a previous version of this proposal

Thanks, Andreas.

This looks good. I'm leaving a few minor comments below, but otherwise it LGTM.

Let me know when you update the MP and I'll review it again.

review: Needs Fixing
Revision history for this message
Andreas Hasenack (ahasenack) : Posted in a previous version of this proposal
Revision history for this message
Andreas Hasenack (ahasenack) : Posted in a previous version of this proposal
Revision history for this message
Andreas Hasenack (ahasenack) : Posted in a previous version of this proposal
Revision history for this message
Andreas Hasenack (ahasenack) : Posted in a previous version of this proposal
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Posted in a previous version of this proposal

Thanks for the review, I pushed the updates on top, and can squash before upload.

There is one more change I'm investigating, and that's the qemu-block-extra.prerm and postrm maintainer scripts generated dynamically via d/rules. I'm investigating if I have to handle something like that in the new qemu-block-supplemental package as well. While I do that, I'll mark this MP as "work in progress".

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote : Posted in a previous version of this proposal

ACK, thanks for the heads up.

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Posted in a previous version of this proposal

I think I won't need anything else, but just to be sure I prepared another ppa where I uploaded a dummy rebuild of qemu at a higher version just to test an upgrade scenario.

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Posted in a previous version of this proposal

Reopening this MP after some larger changes to d/rules because of the maintainer scripts that are generated dynamically at build time from d/rules for qemu-block-extra. I had to do something similar for the new qemu-block-supplemental package.

My testing consisted of installing qemu-block-extra and iterating over upgrades, to see what ended up in /run/qemu. I did it for armhf and amd64. I'll post my results in separate follow-up comments.

As to the method I chose to implement this, I wanted to avoid a hardcoded list of modules that go into -extra and into -supplemental, but this was hard to generate dynamically because when the maintainer script is created, the build isn't separated yet into packages, everything is still in debian/tmp/* (instead of debian/<pkg>/). So I resorted to only hardcoding what goes into -supplemental, and used grep to separate it from what goes into -extra.

Another option would be to run "dpkg -L <pkg>" in the maintainer script, to see what files this package owns, but I feared running into issues like "which package is installed now", "is it fully installed, or just unpacked", etc. But let me know if you know of a cleaner way to know at maintainer-script execution time which modules should be copied over to /run/qemu.

Revision history for this message
Andreas Hasenack (ahasenack) wrote (last edit ): Posted in a previous version of this proposal

For all these tests, I used two ppas:

https://launchpad.net/~ahasenack/+archive/ubuntu/qemu-gluster-universe/: corresponding to this MP

https://launchpad.net/~ahasenack/+archive/ubuntu/qemu-upgrade-test/: same, just with a version bump

Note these builds no longer have the set -x debugging in them.

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Posted in a previous version of this proposal
Download full text (6.7 KiB)

qemu-armhf:
Installing qemu-block-extra 1:8.1.3+ds-1ubuntu2 (from noble)
$ find /usr/lib/arm-linux-gnueabihf/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
ad4108b6463fadb3aa895010990656cb /usr/lib/arm-linux-gnueabihf/qemu/block-ssh.so
d1440a2853b8abe6aad26f6c12fe6129 /usr/lib/arm-linux-gnueabihf/qemu/block-curl.so
28b501db5fab82a82ae0b12f99eb231e /usr/lib/arm-linux-gnueabihf/qemu/block-dmg-bz2.so
118a68317ad6db37a07e1eb9fd0fde98 /usr/lib/arm-linux-gnueabihf/qemu/block-nfs.so
a9f794a1924f12bfa22dcbd41c843e90 /usr/lib/arm-linux-gnueabihf/qemu/block-iscsi.so

$ find /run/qemu -type f -exec md5sum {} \;
$

Upgrading to qemu-block-extra 1:8.2.0+ds-4ubuntu1 from noble-proposed
$ find /usr/lib/arm-linux-gnueabihf/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
ae307dbd7751317bbacb39957b51b264 /usr/lib/arm-linux-gnueabihf/qemu/block-ssh.so
e31c70d020d4574a4badfc5b9b26840b /usr/lib/arm-linux-gnueabihf/qemu/block-curl.so
4a7e0839dcc4856bbd1d474d8a0a5cf3 /usr/lib/arm-linux-gnueabihf/qemu/block-dmg-bz2.so
d903bbf2ad848788bb117a6b2d7c9c23 /usr/lib/arm-linux-gnueabihf/qemu/block-nfs.so
3a01cf0904d723337c3aa477509f3ab0 /usr/lib/arm-linux-gnueabihf/qemu/block-iscsi.so

$ find /run/qemu -type f -exec md5sum {} \;
ad4108b6463fadb3aa895010990656cb /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-ssh.so
118a68317ad6db37a07e1eb9fd0fde98 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-nfs.so
a9f794a1924f12bfa22dcbd41c843e90 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-iscsi.so
28b501db5fab82a82ae0b12f99eb231e /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-dmg-bz2.so
d1440a2853b8abe6aad26f6c12fe6129 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-curl.so

Upgrading qemu-block-extra to 1:8.2.0+ds-4ubuntu2~ppa3
Note there is no qemu-block-supplemental build for armhf (correctly)

$ find /usr/lib/arm-linux-gnueabihf/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
e5e15e9bb1fac63e24992af80fc8185f /usr/lib/arm-linux-gnueabihf/qemu/block-ssh.so
b444b18859ea1b858b723c745a5e62ed /usr/lib/arm-linux-gnueabihf/qemu/block-curl.so
22719c368a9873aeef7721d519d1070d /usr/lib/arm-linux-gnueabihf/qemu/block-dmg-bz2.so
982d0426f653e979b606a0faf467e7df /usr/lib/arm-linux-gnueabihf/qemu/block-nfs.so
7008feee4d0a24797efff4b761e7a94c /usr/lib/arm-linux-gnueabihf/qemu/block-iscsi.so

$ find /run/qemu -type f -exec md5sum {} \;
ae307dbd7751317bbacb39957b51b264 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-ssh.so
d903bbf2ad848788bb117a6b2d7c9c23 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-nfs.so
3a01cf0904d723337c3aa477509f3ab0 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-iscsi.so
4a7e0839dcc4856bbd1d474d8a0a5cf3 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-dmg-bz2.so
e31c70d020d4574a4badfc5b9b26840b /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-curl.so
ad4108b6463fadb3aa895010990656cb /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-ssh.so
118a68317ad6db37a07e1eb9fd0fde98 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-nfs.so
a9f794a1924f12bfa22dcbd41c843e90 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-iscsi.so
28b501db5fab82a82ae0b12f99eb231e /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-dmg-bz2.so
d1440a2853b8abe6aad26f6c12fe6129 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-curl.so

Upgradin...

Read more...

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Posted in a previous version of this proposal
Download full text (5.9 KiB)

qemu-upgrade-block-extra-only:
Fresh install qemu-block-extra 1:8.1.3+ds-1ubuntu2
- /run/qemu mounted, but empty

# find /usr/lib/x86_64-linux-gnu/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
ea85112425d80673f14ca16254f5f4c8 /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
b02200dc12983d810efaf818a5ad536e /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
65fd58cb9b7fd8f00f48b6ab746ce0b6 /usr/lib/x86_64-linux-gnu/qemu/block-gluster.so
f7b96879e0552edf7d826df039522830 /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
90adce8c351799d24797a23baa0f6d1a /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
0d8772bd35d5e94473da576798b83c02 /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
fe4a3b0fb69409a0ab41642b6d0d5143 /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so

Upgade to qemu-block-extra 1:8.2.0+ds-4ubuntu2~ppa3
# find /run/qemu/ -type f -exec md5sum {} \;
fe4a3b0fb69409a0ab41642b6d0d5143 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-ssh.so
0d8772bd35d5e94473da576798b83c02 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-rbd.so
90adce8c351799d24797a23baa0f6d1a /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-nfs.so
f7b96879e0552edf7d826df039522830 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-iscsi.so
65fd58cb9b7fd8f00f48b6ab746ce0b6 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-gluster.so
b02200dc12983d810efaf818a5ad536e /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-dmg-bz2.so
ea85112425d80673f14ca16254f5f4c8 /run/qemu/Debian_1_8.1.3+ds-1ubuntu2/block-curl.so

# find /usr/lib/x86_64-linux-gnu/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
85c89d0929b49c18baf0f5c75c397f1c /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
84e80259582bd660c025aef37abadf83 /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
acdc8b828598b24ff4a6824397f75b96 /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
f2097835d6e56f83b707012307051414 /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
bd63ae325c4f1b70f20cf54d82136ac6 /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
9855847010ba141c918ad5e8d328f606 /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so

only set -x output:
Setting up qemu-block-extra (1:8.2.0+ds-4ubuntu2~ppa3) ...
+ set -e
+ [ configure = configure ]
+ [ -d /run/systemd/system ]
+ dpkg --compare-versions 1:8.1.3+ds-1ubuntu2 lt 1:6.0+dfsg-1~ubuntu1~
+ [ -d /run/systemd/system ]
+ systemctl --system daemon-reload
+ deb-systemd-invoke start run-qemu.mount
+ exit 0

Upgrade to qemu-block-extra 1:8.2.0+ds-4ubuntu3~ppa3
set -x outputs:
Preparing to unpack .../3-qemu-block-extra_1%3a8.2.0+ds-4ubuntu3~ppa3_amd64.deb ...
+ [ -d /run/qemu ]
+ findmnt --noheadings --target /run/qemu/
+ grep -q noexec
+ mkdir -p /run/qemu/Debian_1_8.2.0+ds-4ubuntu2~ppa3
+ echo block-gluster.so
+ basename /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
+ grep -qF block-curl.so
+ cp -p /usr/lib/x86_64-linux-gnu/qemu/block-curl.so /run/qemu/Debian_1_8.2.0+ds-4ubuntu2~ppa3/
+ echo block-gluster.so
+ basename /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
+ grep -qF block-dmg-bz2.so
+ cp -p /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so /run/qemu/Debian_1_8.2.0+ds-4ubuntu2~ppa3/
+ echo block-gluster.so
+ basename /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
+ grep -qF block-iscsi.so
+ cp -p /usr/lib/x86_64-linux-gnu/qemu/block-isc...

Read more...

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Posted in a previous version of this proposal
Download full text (10.5 KiB)

qemu-upgrade-block-extra-and-supplemental:
Fresh install of qemu-block-extra 1:8.2.0+ds-4ubuntu1
# find /usr/lib/x86_64-linux-gnu/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
0803f89eccacddcc8c77ad4a33868a0d /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
a8378e4dc52e331be3b9b53053d44794 /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
0dcb383eecf5f75c4ca34ee6a46f659a /usr/lib/x86_64-linux-gnu/qemu/block-gluster.so
f7fa07b9951df26d18f3026a73b564ca /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
97745997a602cff58e492611e7a61920 /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
801719053ad0f1b54de277583e6d03fc /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
527c297bc4be684cdcb0a7de9afd3e2b /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so

/run/mount empty

Install qemu-block-supplemental 1:8.2.0+ds-4ubuntu2~ppa3
(pulls in qemu-block-extra same version)

maintainer script output:
Selecting previously unselected package qemu-block-supplemental.
Preparing to unpack .../8-qemu-block-supplemental_1%3a8.2.0+ds-4ubuntu2~ppa3_amd64.deb ...
Unpacking qemu-block-supplemental (1:8.2.0+ds-4ubuntu2~ppa3) ...
Setting up qemu-system-common (1:8.2.0+ds-4ubuntu2~ppa3) ...
Setting up qemu-system-data (1:8.2.0+ds-4ubuntu2~ppa3) ...
Setting up qemu-utils (1:8.2.0+ds-4ubuntu2~ppa3) ...
Setting up qemu-system-s390x (1:8.2.0+ds-4ubuntu2~ppa3) ...
Setting up qemu-block-extra (1:8.2.0+ds-4ubuntu2~ppa3) ...
+ set -e
+ [ configure = configure ]
+ [ -d /run/systemd/system ]
+ dpkg --compare-versions 1:8.2.0+ds-4ubuntu1 lt 1:6.0+dfsg-1~ubuntu1~
+ [ -d /run/systemd/system ]
+ systemctl --system daemon-reload
+ deb-systemd-invoke start run-qemu.mount
+ exit 0
Setting up qemu-system-modules-opengl (1:8.2.0+ds-4ubuntu2~ppa3) ...
Setting up qemu-block-supplemental (1:8.2.0+ds-4ubuntu2~ppa3) ...
Setting up qemu-system-gui (1:8.2.0+ds-4ubuntu2~ppa3) ...
Setting up qemu-system-modules-spice (1:8.2.0+ds-4ubuntu2~ppa3) ...

# find /usr/lib/x86_64-linux-gnu/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
85c89d0929b49c18baf0f5c75c397f1c /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
84e80259582bd660c025aef37abadf83 /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
acdc8b828598b24ff4a6824397f75b96 /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
f2097835d6e56f83b707012307051414 /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
bd63ae325c4f1b70f20cf54d82136ac6 /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
9855847010ba141c918ad5e8d328f606 /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so
b48098a3dc21443e7a96a84c1f9054c9 /usr/lib/x86_64-linux-gnu/qemu/block-gluster.so

# find /run/qemu/ -type f -exec md5sum {} \;
527c297bc4be684cdcb0a7de9afd3e2b /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-ssh.so
801719053ad0f1b54de277583e6d03fc /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-rbd.so
97745997a602cff58e492611e7a61920 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-nfs.so
f7fa07b9951df26d18f3026a73b564ca /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-iscsi.so
0dcb383eecf5f75c4ca34ee6a46f659a /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-gluster.so
a8378e4dc52e331be3b9b53053d44794 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-dmg-bz2.so
0803f89eccacddcc8c77ad4a33868a0d /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-curl.so

...

Revision history for this message
Andreas Hasenack (ahasenack) wrote : Posted in a previous version of this proposal

This is what the rendered maintainer scripts looks like:

$ cat qemu-block-extra.prerm
#!/bin/sh
set -e
case $1 in (upgrade|deconfigure) [ -d /run/qemu ] || exit 0; ! findmnt --noheadings --target /run/qemu/ | grep -q noexec || exit 0; mkdir -p /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3; for m in /usr/lib/x86_64-linux-gnu/qemu/block-*.so; do if echo "block-gluster.so" | grep -qF `basename "$m"`; then continue; else cp -p $m /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3/; fi; done;; esac

$ cat qemu-block-extra.postrm
#!/bin/sh
set -e
case $1 in (remove) for m in /usr/lib/x86_64-linux-gnu/qemu/block-*.so; do if echo "block-gluster.so" | grep -qF `basename "$m"`; then continue; else rm -f /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3/`basename $m`; fi; done;; esac
case $1 in (purge) if systemctl is-active -q run-qemu.mount; then systemctl stop run-qemu.mount || true; fi; rm -rf "/run/qemu";; esac

$ cat qemu-block-supplemental.prerm
#!/bin/sh
set -e
case $1 in (upgrade|deconfigure) [ -d /run/qemu ] || exit 0; ! findmnt --noheadings --target /run/qemu/ | grep -q noexec || exit 0; mkdir -p /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3; for m in block-gluster.so; do cp -p /usr/lib/x86_64-linux-gnu/qemu/$m /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3/; done;; esac

$ cat qemu-block-supplemental.postrm
#!/bin/sh
set -e
case $1 in (remove) for m in block-gluster.so; do rm -f /run/qemu/Debian_1_8.2.0+ds-4ubuntu3~ppa3/$m; done;; esac

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I pushed a new change that adds an explicit Depends from qemu-block-supplemental to qemu-block-extra, because of the mount unit. We already had this in practice, due to

  dh_installdocs -p qemu-block-supplemental --link-doc=qemu-block-extra

in the qemu-block-supplemental package, but I rather bake it explicit in d/control and with the reasoning behind it.

I ran the manual checks again, from the previous comments, and didn't see any difference (as expected). I'll paste them again, with some comments.

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Download full text (7.6 KiB)

qemu-amd64-block-extra-only.txt
Installing fresh qemu-block-extra 1:8.2.0+ds-4ubuntu1
$ find /usr/lib/x86_64-linux-gnu/qemu/ -name 'block-*.so' -exec md5sum {} \;
0803f89eccacddcc8c77ad4a33868a0d /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
a8378e4dc52e331be3b9b53053d44794 /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
0dcb383eecf5f75c4ca34ee6a46f659a /usr/lib/x86_64-linux-gnu/qemu/block-gluster.so
f7fa07b9951df26d18f3026a73b564ca /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
97745997a602cff58e492611e7a61920 /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
801719053ad0f1b54de277583e6d03fc /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
527c297bc4be684cdcb0a7de9afd3e2b /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so

$ find /run/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
$

Upgrading to qemu-block-extra 1:8.2.0+ds-4ubuntu2~ppa5
$ find /usr/lib/x86_64-linux-gnu/qemu/ -name 'block-*.so' -exec md5sum {} \;
aa6fafc7e2c16859cb63758776545285 /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
e105e7859f9cb0fedc1398703b15162b /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
f745fa1959b51f995a7dd0b42d802c1e /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
008e00f454a668e1881a33a698651075 /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
5c0d605aa07aa3fc0fe29610d145cf8b /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
71bdbbeecb3fd5b768a886198c216975 /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so

$ find /run/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
527c297bc4be684cdcb0a7de9afd3e2b /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-ssh.so
801719053ad0f1b54de277583e6d03fc /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-rbd.so
97745997a602cff58e492611e7a61920 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-nfs.so
f7fa07b9951df26d18f3026a73b564ca /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-iscsi.so
0dcb383eecf5f75c4ca34ee6a46f659a /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-gluster.so
a8378e4dc52e331be3b9b53053d44794 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-dmg-bz2.so
0803f89eccacddcc8c77ad4a33868a0d /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-curl.so

Upgrading to qemu-block-extra 1:8.2.0+ds-4ubuntu3~ppa5
$ find /usr/lib/x86_64-linux-gnu/qemu/ -name 'block-*.so' -exec md5sum {} \;
9220b566485b42976d64e6cba6219915 /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
3dd4d675fa5e1385cc9761743235668d /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
ee5d2eb371769082bf2da5893489c2ba /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
aaa653ddfe204e5473fd1d1d1b9da86f /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
cfa95525f005f866b4a876f6d863e8e7 /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
5c3297af66f82374b40e4d27be53743b /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so

$ find /run/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
71bdbbeecb3fd5b768a886198c216975 /run/qemu/Debian_1_8.2.0+ds-4ubuntu2~ppa5/block-ssh.so
5c0d605aa07aa3fc0fe29610d145cf8b /run/qemu/Debian_1_8.2.0+ds-4ubuntu2~ppa5/block-rbd.so
008e00f454a668e1881a33a698651075 /run/qemu/Debian_1_8.2.0+ds-4ubuntu2~ppa5/block-nfs.so
f745fa1959b51f995a7dd0b42d802c1e /run/qemu/Debian_1_8.2.0+ds-4ubuntu2~ppa5/block-iscsi.so
e105e7859f9cb0fedc1398703b15162b /run/qemu/Debian_1_8.2.0+ds-4ubuntu2~ppa5/block-dmg-bz2.so
aa6fafc7e2c168...

Read more...

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Download full text (7.0 KiB)

qemu-amd64-block-extra-and-supplemental.txt
Fresh install of qemu-block-extra 1:8.2.0+ds-4ubuntu1
$ find /usr/lib/x86_64-linux-gnu/qemu/ -name 'block-*.so' -exec md5sum {} \;
0803f89eccacddcc8c77ad4a33868a0d /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
a8378e4dc52e331be3b9b53053d44794 /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
0dcb383eecf5f75c4ca34ee6a46f659a /usr/lib/x86_64-linux-gnu/qemu/block-gluster.so
f7fa07b9951df26d18f3026a73b564ca /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
97745997a602cff58e492611e7a61920 /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
801719053ad0f1b54de277583e6d03fc /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
527c297bc4be684cdcb0a7de9afd3e2b /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so

Mount dir mounted, but empty:
$ find /run/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
$

Installing qemu-block-supplemental 1:8.2.0+ds-4ubuntu2~ppa5:
$ find /usr/lib/x86_64-linux-gnu/qemu/ -name 'block-*.so' -exec md5sum {} \;
aa6fafc7e2c16859cb63758776545285 /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
e105e7859f9cb0fedc1398703b15162b /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
f745fa1959b51f995a7dd0b42d802c1e /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
008e00f454a668e1881a33a698651075 /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
5c0d605aa07aa3fc0fe29610d145cf8b /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
71bdbbeecb3fd5b768a886198c216975 /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so
fae53b01d85c97b9eaec0942c2fe40b6 /usr/lib/x86_64-linux-gnu/qemu/block-gluster.so

mount dir contains backup of previous modules, including gluster (which was in -extra back then):
$ find /run/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
527c297bc4be684cdcb0a7de9afd3e2b /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-ssh.so
801719053ad0f1b54de277583e6d03fc /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-rbd.so
97745997a602cff58e492611e7a61920 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-nfs.so
f7fa07b9951df26d18f3026a73b564ca /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-iscsi.so
0dcb383eecf5f75c4ca34ee6a46f659a /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-gluster.so
a8378e4dc52e331be3b9b53053d44794 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-dmg-bz2.so
0803f89eccacddcc8c77ad4a33868a0d /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-curl.so

Upgrading to qemu-block-supplemental 1:8.2.0+ds-4ubuntu3~ppa5:
$ find /usr/lib/x86_64-linux-gnu/qemu/ -name 'block-*.so' -exec md5sum {} \;
a603df1ea6af2ddd52154c11198110aa /usr/lib/x86_64-linux-gnu/qemu/block-gluster.so
9220b566485b42976d64e6cba6219915 /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
3dd4d675fa5e1385cc9761743235668d /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
ee5d2eb371769082bf2da5893489c2ba /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
aaa653ddfe204e5473fd1d1d1b9da86f /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
cfa95525f005f866b4a876f6d863e8e7 /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
5c3297af66f82374b40e4d27be53743b /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so

mount dir now has new backup of the 4ubuntu2 modules:
$ find /run/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
71bdbbeecb3fd5b768a886198c216975 /run/qemu/Debian_1_8.2.0+ds-4ubuntu2~ppa5/block-ssh.so
5c0d...

Read more...

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Download full text (5.5 KiB)

qemu-amd64-block-extra-then-supplemental.txt
Fresh install of qemu-block-extra 1:8.2.0+ds-4ubuntu1
$ find /usr/lib/x86_64-linux-gnu/qemu/ -name 'block-*.so' -exec md5sum {} \;
0803f89eccacddcc8c77ad4a33868a0d /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
a8378e4dc52e331be3b9b53053d44794 /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
0dcb383eecf5f75c4ca34ee6a46f659a /usr/lib/x86_64-linux-gnu/qemu/block-gluster.so
f7fa07b9951df26d18f3026a73b564ca /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
97745997a602cff58e492611e7a61920 /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
801719053ad0f1b54de277583e6d03fc /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
527c297bc4be684cdcb0a7de9afd3e2b /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so

No backups yet:
$ find /run/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
$

Upgrade to qemu-block-extra 1:8.2.0+ds-4ubuntu2~ppa5:
$ find /usr/lib/x86_64-linux-gnu/qemu/ -name 'block-*.so' -exec md5sum {} \;
aa6fafc7e2c16859cb63758776545285 /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
e105e7859f9cb0fedc1398703b15162b /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
f745fa1959b51f995a7dd0b42d802c1e /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
008e00f454a668e1881a33a698651075 /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
5c0d605aa07aa3fc0fe29610d145cf8b /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
71bdbbeecb3fd5b768a886198c216975 /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so

We now have backup for 1:8.2.0+ds-4ubuntu1:
$ find /run/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
527c297bc4be684cdcb0a7de9afd3e2b /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-ssh.so
801719053ad0f1b54de277583e6d03fc /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-rbd.so
97745997a602cff58e492611e7a61920 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-nfs.so
f7fa07b9951df26d18f3026a73b564ca /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-iscsi.so
0dcb383eecf5f75c4ca34ee6a46f659a /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-gluster.so
a8378e4dc52e331be3b9b53053d44794 /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-dmg-bz2.so
0803f89eccacddcc8c77ad4a33868a0d /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-curl.so

Let's now install qemu-block-supplemental 1:8.2.0+ds-4ubuntu2~ppa5 :

We get a new block-gluster.so in /usr/lib:
$ find /usr/lib/x86_64-linux-gnu/qemu/ -name 'block-*.so' -exec md5sum {} \;
aa6fafc7e2c16859cb63758776545285 /usr/lib/x86_64-linux-gnu/qemu/block-curl.so
e105e7859f9cb0fedc1398703b15162b /usr/lib/x86_64-linux-gnu/qemu/block-dmg-bz2.so
f745fa1959b51f995a7dd0b42d802c1e /usr/lib/x86_64-linux-gnu/qemu/block-iscsi.so
008e00f454a668e1881a33a698651075 /usr/lib/x86_64-linux-gnu/qemu/block-nfs.so
5c0d605aa07aa3fc0fe29610d145cf8b /usr/lib/x86_64-linux-gnu/qemu/block-rbd.so
71bdbbeecb3fd5b768a886198c216975 /usr/lib/x86_64-linux-gnu/qemu/block-ssh.so
fae53b01d85c97b9eaec0942c2fe40b6 /usr/lib/x86_64-linux-gnu/qemu/block-gluster.so

And mount didn't change:
$ find /run/qemu/ -type f -name 'block-*.so' -exec md5sum {} \;
527c297bc4be684cdcb0a7de9afd3e2b /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-ssh.so
801719053ad0f1b54de277583e6d03fc /run/qemu/Debian_1_8.2.0+ds-4ubuntu1/block-rbd.so
97745997a602cff58e492611e7a61920 /run/qemu/Debian_1_8.2.0+ds...

Read more...

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

I guess the only final question/point I have is:

should we backup block-gluster.so (from bin:qemu-block-supplemental) if just that package is removed?

The scenario is:
- you have qemu-block-supplemental installed
- you have a running VM using block-gluster.so
- you remove qemu-block-supplemental. The block-gluster.so module is gone
- if you restart that vm, it won't find the module and fail

This is different from an upgrade scenario, because you could just reinstall qemu-block-supplemental. It's still in the archive, no upgrade superseeded it. Just do "sudo apt install qemu-block-supplemental", you don't even need to know the version.

This scenario never showed up before because all block modules were in qemu-block-extra, and you can't just remove that package, it will remove most of your qemu installation with it.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

I'm taking another look.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, Andreas.

I think the way you solved the problem of listing the supplemental modules in the {post,pre}rm scripts is the best one. I wouldn't worry too much about having to manually list the modules on d/rules; there are worse problems than that (for example, dynamically generating maintscripts... ugh).

As for your question about whether we should backup block-gluster.so. I tend to believe that if the user removes qemu-block-supplemental, they know what they're doing because they actively need to issue the removal command themselves. For that reason, I suggested that we should explicitly include the list of supplemental modules being shipped in the new binary package. I think it will make things clearer for the users.

Other than that, I really don't have much else to say. Your investigative work is amazing and I think you covered every corner case I could think of.

LGTM, +1.

review: Approve
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Sorry if it wasn't clear: my answer to your question is "I don't think we need to backup the block-gluster.so module".

Revision history for this message
Andreas Hasenack (ahasenack) :
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, Andreas. +1

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: ahasenack, sergiodj
Uploaders: ahasenack, sergiodj
MP auto-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index dbafc80..d4215fa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,15 @@
1qemu (1:8.2.0+ds-4ubuntu2) noble; urgency=medium
2
3 * Move glusterfs storage driver to Universe in a new package
4 (LP: #2045063):
5 - d/control{,-in}: new package qemu-block-supplemental for drivers
6 we want in Universe
7 - d/rules: we only want block-gluster.so in the new
8 qemu-block-supplemental package. Adjust dynamically-created
9 maintainer scripts for qemu-block-extra and -supplemental.
10
11 -- Andreas Hasenack <andreas@canonical.com> Fri, 02 Feb 2024 14:07:00 -0300
12
1qemu (1:8.2.0+ds-4ubuntu1) noble; urgency=medium13qemu (1:8.2.0+ds-4ubuntu1) noble; urgency=medium
214
3 * Merge with Debian unstable (LP: #2048802, #2048776). Remaining changes:15 * Merge with Debian unstable (LP: #2048802, #2048776). Remaining changes:
diff --git a/debian/control b/debian/control
index 9b9fd93..8383fe5 100644
--- a/debian/control
+++ b/debian/control
@@ -197,6 +197,31 @@ Description: extra block backend modules for qemu-system and qemu-utils
197 emulation and qemu-img from qemu-utils package, which are rarely used and197 emulation and qemu-img from qemu-utils package, which are rarely used and
198 has extra dependencies.198 has extra dependencies.
199199
200Package: qemu-block-supplemental
201# For now, this package only ships glusterfs, which does not build in 32bit architectures
202Architecture: amd64 arm64 ppc64el riscv64 s390x
203Multi-Arch: no
204Depends: ${misc:Depends}, ${shlibs:Depends},
205# qemu-block-extra has the run-qemu.mount unit which we need
206 qemu-block-extra (= ${binary:Version}),
207# we need to ensure qemu-block-supplemental is upgraded with qemu-system-* or qemu-utils
208 qemu-system-any (= ${binary:Version}) [amd64 arm64 armhf ppc64el riscv64 s390x] | qemu-utils (= ${binary:Version}),
209Enhances: qemu-utils, qemu-system-misc,
210 qemu-system-arm, qemu-system-mips, qemu-system-sparc, qemu-system-x86,
211Breaks: qemu-block-extra (<< 1:8.2.0+ds-4ubuntu2~)
212Replaces: qemu-block-extra (<< 1:8.2.0+ds-4ubuntu2)
213Description: supplemental block backend modules for qemu-system and qemu-utils
214 QEMU is a fast processor emulator: currently the package supports Alpha, ARM,
215 CRIS, i386, LoongArch, M68k (ColdFire), MicroBlaze, MIPS, PowerPC, RISC-V,
216 S390x, SH4, SPARC, x86-64, Xtensa and other emulations. By using dynamic
217 translation it achieves reasonable speed while being easy to port on new host
218 CPUs.
219 .
220 This package provides supplemental block device backend modules for qemu-system
221 emulation and qemu-img from qemu-utils package.
222 .
223 Currently, the following module is shipped in this package: block-glusterfs
224
200Package: qemu-system-data225Package: qemu-system-data
201Architecture: all226Architecture: all
202Multi-Arch: foreign227Multi-Arch: foreign
diff --git a/debian/control-in b/debian/control-in
index 201f4bf..f24a39a 100644
--- a/debian/control-in
+++ b/debian/control-in
@@ -202,6 +202,31 @@ Description: extra block backend modules for qemu-system and qemu-utils
202 This package provides extra block device backend modules for qemu-system202 This package provides extra block device backend modules for qemu-system
203 emulation and qemu-img from qemu-utils package, which are rarely used and203 emulation and qemu-img from qemu-utils package, which are rarely used and
204 has extra dependencies.204 has extra dependencies.
205:ubuntu:
206:ubuntu:Package: qemu-block-supplemental
207:ubuntu:# For now, this package only ships glusterfs, which does not build in 32bit architectures
208:ubuntu:Architecture: amd64 arm64 ppc64el riscv64 s390x
209:ubuntu:Multi-Arch: no
210:ubuntu:Depends: ${misc:Depends}, ${shlibs:Depends},
211:ubuntu:# qemu-block-extra has the run-qemu.mount unit which we need
212:ubuntu: qemu-block-extra (= ${binary:Version}),
213:ubuntu:# we need to ensure qemu-block-supplemental is upgraded with qemu-system-* or qemu-utils
214:ubuntu: qemu-system-any (= ${binary:Version}) [amd64 arm64 armhf ppc64el riscv64 s390x] | qemu-utils (= ${binary:Version}),
215:ubuntu:Enhances: qemu-utils, qemu-system-misc,
216:ubuntu: qemu-system-arm, qemu-system-mips, qemu-system-sparc, qemu-system-x86,
217:ubuntu:Breaks: qemu-block-extra (<< 1:8.2.0+ds-4ubuntu2~)
218:ubuntu:Replaces: qemu-block-extra (<< 1:8.2.0+ds-4ubuntu2)
219:ubuntu:Description: supplemental block backend modules for qemu-system and qemu-utils
220:ubuntu: QEMU is a fast processor emulator: currently the package supports Alpha, ARM,
221:ubuntu: CRIS, i386, LoongArch, M68k (ColdFire), MicroBlaze, MIPS, PowerPC, RISC-V,
222:ubuntu: S390x, SH4, SPARC, x86-64, Xtensa and other emulations. By using dynamic
223:ubuntu: translation it achieves reasonable speed while being easy to port on new host
224:ubuntu: CPUs.
225:ubuntu: .
226:ubuntu: This package provides supplemental block device backend modules for qemu-system
227:ubuntu: emulation and qemu-img from qemu-utils package.
228:ubuntu: .
229:ubuntu: Currently, the following module is shipped in this package: block-glusterfs
205230
206Package: qemu-system-data231Package: qemu-system-data
207Architecture: all232Architecture: all
diff --git a/debian/rules b/debian/rules
index 38e6b72..485e01f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -69,6 +69,11 @@ enable-user-static = $(if $(filter qemu-user-static,${BUILD_PACKAGES}),y)
69QEMU_XEN = /usr/libexec/xen-qemu-system-i38669QEMU_XEN = /usr/libexec/xen-qemu-system-i386
70PKGVERSION = Debian ${DEB_VERSION}70PKGVERSION = Debian ${DEB_VERSION}
71SAVEMODDIR = /run/qemu/$(shell echo -n "${PKGVERSION}" | tr --complement '[:alnum:]+-.~' '_')71SAVEMODDIR = /run/qemu/$(shell echo -n "${PKGVERSION}" | tr --complement '[:alnum:]+-.~' '_')
72# New Ubuntu package qemu-block-supplemental to hold modules we want in Universe
73# glusterfs is in universe, see LP: #2045063
74# This variable specifies a space-separated list of module filenames
75# If altering this list, please also update the package description in d/control*
76BLOCK_SUPPLEMENTAL_MODULES = block-gluster.so
72sysdataidir = debian/qemu-system-data/usr/share/qemu77sysdataidir = debian/qemu-system-data/usr/share/qemu
73libdir = /usr/lib/${DEB_HOST_MULTIARCH}78libdir = /usr/lib/${DEB_HOST_MULTIARCH}
74FIRMWAREPATH = /usr/share/qemu:/usr/share/seabios:/usr/lib/ipxe/qemu79FIRMWAREPATH = /usr/share/qemu:/usr/share/seabios:/usr/lib/ipxe/qemu
@@ -281,12 +286,19 @@ endif # ubuntu
281# save block-extra loadable modules on upgrades286# save block-extra loadable modules on upgrades
282# other module types for now (5.0) can't be loaded at runtime, only at startup287# other module types for now (5.0) can't be loaded at runtime, only at startup
283# the maintscript fragments include version string so we have to generate them288# the maintscript fragments include version string so we have to generate them
284 echo 'case $$1 in (upgrade|deconfigure) [ -d /run/qemu ] || exit 0; ! findmnt --noheadings --target /run/qemu/ | grep -q noexec || exit 0; mkdir -p ${SAVEMODDIR}; cp -p ${libdir}/qemu/block-*.so ${SAVEMODDIR}/;; esac' \289 echo 'case $$1 in (upgrade|deconfigure) [ -d /run/qemu ] || exit 0; ! findmnt --noheadings --target /run/qemu/ | grep -q noexec || exit 0; mkdir -p ${SAVEMODDIR}; for m in ${libdir}/qemu/block-*.so; do if echo "${BLOCK_SUPPLEMENTAL_MODULES}" | grep -qF `basename "$$m"`; then continue; else cp -p $$m ${SAVEMODDIR}/; fi; done;; esac' \
285 >> debian/qemu-block-extra.prerm.debhelper290 >> debian/qemu-block-extra.prerm.debhelper
286 echo 'case $$1 in (remove) rm -f ${SAVEMODDIR}/block-*.so;; esac' \291 echo 'case $$1 in (remove) for m in ${libdir}/qemu/block-*.so; do if echo "${BLOCK_SUPPLEMENTAL_MODULES}" | grep -qF `basename "$$m"`; then continue; else rm -f ${SAVEMODDIR}/`basename $$m`; fi; done;; esac' \
287 >> debian/qemu-block-extra.postrm.debhelper292 >> debian/qemu-block-extra.postrm.debhelper
288 echo 'case $$1 in (purge) if systemctl is-active -q run-qemu.mount; then systemctl stop run-qemu.mount || true; fi; rm -rf "/run/qemu";; esac' \293 echo 'case $$1 in (purge) if systemctl is-active -q run-qemu.mount; then systemctl stop run-qemu.mount || true; fi; rm -rf "/run/qemu";; esac' \
289 >> debian/qemu-block-extra.postrm.debhelper294 >> debian/qemu-block-extra.postrm.debhelper
295# do mostly the same for qemu-block-supplemental
296ifneq (,$(filter qemu-block-supplemental,${BUILD_PACKAGES}))
297 echo 'case $$1 in (upgrade|deconfigure) [ -d /run/qemu ] || exit 0; ! findmnt --noheadings --target /run/qemu/ | grep -q noexec || exit 0; mkdir -p ${SAVEMODDIR}; for m in ${BLOCK_SUPPLEMENTAL_MODULES}; do cp -p ${libdir}/qemu/$$m ${SAVEMODDIR}/; done;; esac' \
298 >> debian/qemu-block-supplemental.prerm.debhelper
299 echo 'case $$1 in (remove) for m in ${BLOCK_SUPPLEMENTAL_MODULES}; do rm -f ${SAVEMODDIR}/$$m; done;; esac' \
300 >> debian/qemu-block-supplemental.postrm.debhelper
301endif
290302
291endif # linux303endif # linux
292304
@@ -494,6 +506,14 @@ pre-install-arch:
494 dh_installdirs -a506 dh_installdirs -a
495install-arch: pre-install-arch $(addprefix install-, ${qemu-builds})507install-arch: pre-install-arch $(addprefix install-, ${qemu-builds})
496 dh_install -a508 dh_install -a
509ifneq (,$(filter qemu-block-supplemental,${BUILD_PACKAGES}))
510 # block-gluster.so should only be in qemu-block-supplemental, if it's built (it doesn't build on 32bit architectures)
511 dh_installdirs -p qemu-block-supplemental usr/lib/${DEB_HOST_MULTIARCH}/qemu
512 for m in ${BLOCK_SUPPLEMENTAL_MODULES}; do mv debian/qemu-block-extra/usr/lib/${DEB_HOST_MULTIARCH}/qemu/$$m debian/qemu-block-supplemental/usr/lib/${DEB_HOST_MULTIARCH}/qemu/; done
513 # This also introduces a "Depends: qemu-block-extra" to qemu-block-supplemental, which
514 # we want also because of the run-qemu.mount unit shipped there.
515 dh_installdocs -p qemu-block-supplemental --link-doc=qemu-block-extra
516endif
497 dh_missing -a517 dh_missing -a
498 dh_installdocs -a518 dh_installdocs -a
499 dh_installchangelogs -a519 dh_installchangelogs -a

Subscribers

People subscribed via source and target branches