Merge ~paelzer/ubuntu/+source/qemu:bug-1847361-miss-old-so-on-upgrade-UBUNTU into ubuntu/+source/qemu:ubuntu/focal-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: ad0f21064f29657820c35ae301180758afc3ee9e
Merge reported by: Christian Ehrhardt 
Merged at revision: ad0f21064f29657820c35ae301180758afc3ee9e
Proposed branch: ~paelzer/ubuntu/+source/qemu:bug-1847361-miss-old-so-on-upgrade-UBUNTU
Merge into: ubuntu/+source/qemu:ubuntu/focal-devel
Diff against target: 483 lines (+392/-0)
9 files modified
debian/changelog (+14/-0)
debian/patches/series (+2/-0)
debian/patches/ubuntu/lp-1847361-modules-load-upgrade.patch (+125/-0)
debian/patches/ubuntu/lp-1847361-vhost-correctly-turn-on-VIRTIO_F_IOMMU_PLATFORM.patch (+61/-0)
debian/qemu-block-extra.postrm.in (+43/-0)
debian/qemu-block-extra.prerm.in (+45/-0)
debian/qemu-system-gui.postrm.in (+44/-0)
debian/qemu-system-gui.prerm.in (+46/-0)
debian/rules (+12/-0)
Reviewer Review Type Date Requested Status
Rafael David Tinoco (community) Approve
Ubuntu Security Team Pending
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+380467@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

I'll review this one

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

New builds in the PPA following the upstream discussion.
No "major" changes thou, never the less I'll force push the updates to be available here as well.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

From the build log:
base build:
module support yes
alt path mod load yes

static/xen/microvm build:
module support no
alt path mod load no

This is just as I wanted it and shows that it works to build in both cases.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

STATUS: +1 (approved)

# checklist for fixes
----------------------------
 [.] changelog entry correct, targeted to correct codename
 [.] update-maintainer has been run previously
 ----
 [.] changes forwarded upstream/debian (if appropriate)
 [.] patches match what was proposed upstream
 ----
 [.] patches correctly included in debian/patches/series?
 [.] patches have correct DEP3 metadata
 ----
 [.] verified dpkg-buildpackage -S and -b
 [-] autopkgtest against PPA or built package passes
     - relying in upgrade test for this change only
 ----
 [!] testcase provided
     - checking temporary created library dirs ant contents
 [.] was able to reproduce
 [.] fix solved provided testcase
----------------------------
[.] = ok
[x] = not ok
[?] = question
[!] = note
[-] = n/a

# relevant stdout:

(c)rafaeldtinoco@qemudevel:.../Debian_1_4.2-3ubuntu2$ ls -lahtr
total 1.3M
drwxr-xr-x 3 root root 60 Mar 10 20:54 ..
drwxr-xr-x 2 root root 160 Mar 10 20:54 .
-rw-r--r-- 1 root root 591K Mar 10 23:28 ui-gtk.so
-rw-r--r-- 1 root root 73K Mar 10 23:28 audio-pa.so
-rw-r--r-- 1 root root 181K Mar 10 23:28 block-iscsi.so
-rw-r--r-- 1 root root 151K Mar 10 23:28 block-curl.so
-rw-r--r-- 1 root root 155K Mar 10 23:28 block-ssh.so
-rw-r--r-- 1 root root 122K Mar 10 23:28 block-rbd.so
(c)rafaeldtinoco@qemudevel:.../Debian_1_4.2-3ubuntu2$ pwd
/var/run/qemu/Debian_1_4.2-3ubuntu2

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks for this pre-check.
Lets see how the upstream discussion evolves the next few days.

4683e8d... by Christian Ehrhardt 

changelog MEGRE

Signed-off-by: Christian Ehrhardt <email address hidden>

dbe2005... by Christian Ehrhardt 

d/rules: generate maintainer scripts matching package version

Signed-off-by: Christian Ehrhardt <email address hidden>

7d44fb3... by Christian Ehrhardt 

d/rules: enable --enable-module-upgrades where --enable-modules is set

Signed-off-by: Christian Ehrhardt <email address hidden>

2212796... by Christian Ehrhardt 

d/p/ubuntu/lp-1847361-vhost-correctly-turn-on-VIRTIO_F_IOMMU_PLATFORM.patch: avoid unnecessary IOTLB transactions (LP: #1866207)

Signed-off-by: Christian Ehrhardt <email address hidden>

9eea3bd... by Christian Ehrhardt 

cahngelog: avoid unnecessary IOTLB transactions (LP: #1866207)

Signed-off-by: Christian Ehrhardt <email address hidden>

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Another set of pre-builds and checks is good

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/qemu
 * [new tag] upload/1%4.2-3ubuntu2 -> upload/1%4.2-3ubuntu2

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading qemu_4.2-3ubuntu2.dsc: done.
  Uploading qemu_4.2-3ubuntu2.debian.tar.xz: done.
  Uploading qemu_4.2-3ubuntu2_source.buildinfo: done.
  Uploading qemu_4.2-3ubuntu2_source.changes: done.
Successfully uploaded packages.

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 89089bb..d73be7f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,17 @@
1qemu (1:4.2-3ubuntu2) focal; urgency=medium
2
3 * allow qemu to load old modules post upgrade (LP: #1847361)
4 - d/p/ubuntu/lp-1847361-modules-load-upgrade.patch: to fallback module
5 load to a versioned path
6 - d/qemu-block-extra.*.in, d/qemu-system-gui.*.in: save shared objects on
7 upgrade
8 - d/rules: generate maintainer scripts matching package version on build
9 - d/rules: enable --enable-module-upgrades where --enable-modules is set
10 * d/p/ubuntu/lp-1847361-vhost-correctly-turn-on-VIRTIO_F_IOMMU_PLATFORM.patch:
11 avoid unnecessary IOTLB transactions (LP: #1866207)
12
13 -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 02 Mar 2020 15:21:27 +0100
14
1qemu (1:4.2-3ubuntu1) focal; urgency=medium15qemu (1:4.2-3ubuntu1) focal; urgency=medium
216
3 * Merge with Debian testing, remaining changes:17 * Merge with Debian testing, remaining changes:
diff --git a/debian/patches/series b/debian/patches/series
index c9fce99..2371880 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -13,3 +13,5 @@ ubuntu/lp-1857033-i386-Add-macro-for-stibp.patch
13ubuntu/lp-1857033-i386-Add-new-CPU-model-Cooperlake.patch13ubuntu/lp-1857033-i386-Add-new-CPU-model-Cooperlake.patch
14lp-1859527-virtio-blk-fix-out-of-bounds-access-to-bitmap-in-not.patch14lp-1859527-virtio-blk-fix-out-of-bounds-access-to-bitmap-in-not.patch
15ubuntu/vhost-user-gpu-Drop-trailing-json-comma.patch15ubuntu/vhost-user-gpu-Drop-trailing-json-comma.patch
16ubuntu/lp-1847361-modules-load-upgrade.patch
17ubuntu/lp-1847361-vhost-correctly-turn-on-VIRTIO_F_IOMMU_PLATFORM.patch
diff --git a/debian/patches/ubuntu/lp-1847361-modules-load-upgrade.patch b/debian/patches/ubuntu/lp-1847361-modules-load-upgrade.patch
16new file mode 10064418new file mode 100644
index 0000000..056f2e0
--- /dev/null
+++ b/debian/patches/ubuntu/lp-1847361-modules-load-upgrade.patch
@@ -0,0 +1,125 @@
1From ab7e28b0905b1e2daeb5d582cf0f0ce33ea47317 Mon Sep 17 00:00:00 2001
2From: Christian Ehrhardt <christian.ehrhardt@canonical.com>
3Date: Mon, 2 Mar 2020 15:12:53 +0100
4Subject: [PATCH] modules: load modules from versioned /var/run dir
5
6On upgrades the old .so files usually are replaced. But on the other
7hand since a qemu process represents a guest instance it is usually kept
8around.
9
10That makes late addition of dynamic features e.g. 'hot-attach of a ceph
11disk' fail by trying to load a new version of e.f. block-rbd.so into an
12old still running qemu binary.
13
14This adds a fallback to also load modules from a versioned directory in the
15temporary /var/run path. That way qemu is providing a way for packaging
16to store modules of an upgraded qemu package as needed until the next reboot.
17
18Fixes: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1847361
19Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
20
21Forwarded: yes, https://lists.nongnu.org/archive/html/qemu-devel/2020-03/msg01593.html
22Bug-Ubuntu: https://bugs.launchpad.net/bugs/1847361
23Last-Update: 2020-03-02
24
25---
26 configure | 15 +++++++++++++++
27 util/module.c | 14 ++++++++++++++
28 2 files changed, 29 insertions(+)
29
30--- a/configure
31+++ b/configure
32@@ -404,6 +404,7 @@ EXESUF=""
33 DSOSUF=".so"
34 LDFLAGS_SHARED="-shared"
35 modules="no"
36+module_upgrades="no"
37 prefix="/usr/local"
38 mandir="\${prefix}/share/man"
39 datadir="\${prefix}/share"
40@@ -995,6 +996,10 @@ for opt do
41 --disable-modules)
42 modules="no"
43 ;;
44+ --disable-module-upgrades) module_upgrades="no"
45+ ;;
46+ --enable-module-upgrades) module_upgrades="yes"
47+ ;;
48 --cpu=*)
49 ;;
50 --target-list=*) target_list="$optarg"
51@@ -1735,6 +1740,7 @@ disabled with --disable-FEATURE, default
52 guest-agent-msi build guest agent Windows MSI installation package
53 pie Position Independent Executables
54 modules modules support (non-Windows)
55+ module-upgrades try to load modules from alternate paths for upgrades
56 debug-tcg TCG debugging (default is disabled)
57 debug-info debugging information
58 sparse sparse checker
59@@ -1995,6 +2001,11 @@ if test "$modules" = "yes" && test "$min
60 error_exit "Modules are not available for Windows"
61 fi
62
63+# module_upgrades is only reasonable if modules are enabled
64+if test "$modules" = "no" && test "$module_upgrades" = "yes" ; then
65+ error_exit "Can't enable module-upgrades as Modules are not enabled"
66+fi
67+
68 # Static linking is not possible with modules or PIE
69 if test "$static" = "yes" ; then
70 if test "$modules" = "yes" ; then
71@@ -6457,6 +6468,7 @@ if test "$slirp" != "no" ; then
72 echo "smbd $smbd"
73 fi
74 echo "module support $modules"
75+echo "alt path mod load $module_upgrades"
76 echo "host CPU $cpu"
77 echo "host big endian $bigendian"
78 echo "target list $target_list"
79@@ -6814,6 +6826,9 @@ if test "$modules" = "yes"; then
80 echo "CONFIG_STAMP=_$( (echo $qemu_version; echo $pkgversion; cat $0) | $shacmd - | cut -f1 -d\ )" >> $config_host_mak
81 echo "CONFIG_MODULES=y" >> $config_host_mak
82 fi
83+if test "$module_upgrades" = "yes"; then
84+ echo "CONFIG_MODULE_UPGRADES=y" >> $config_host_mak
85+fi
86 if test "$have_x11" = "yes" && test "$need_x11" = "yes"; then
87 echo "CONFIG_X11=y" >> $config_host_mak
88 echo "X11_CFLAGS=$x11_cflags" >> $config_host_mak
89--- a/util/module.c
90+++ b/util/module.c
91@@ -19,6 +19,9 @@
92 #endif
93 #include "qemu/queue.h"
94 #include "qemu/module.h"
95+#ifdef CONFIG_MODULE_UPGRADES
96+#include "qemu-version.h"
97+#endif
98
99 typedef struct ModuleEntry
100 {
101@@ -163,6 +166,9 @@ bool module_load_one(const char *prefix,
102 #ifdef CONFIG_MODULES
103 char *fname = NULL;
104 char *exec_dir;
105+#ifdef CONFIG_MODULE_UPGRADES
106+ char *version_dir;
107+#endif
108 const char *search_dir;
109 char *dirs[4];
110 char *module_name;
111@@ -194,6 +200,14 @@ bool module_load_one(const char *prefix,
112 dirs[n_dirs++] = g_strdup_printf("%s", CONFIG_QEMU_MODDIR);
113 dirs[n_dirs++] = g_strdup_printf("%s/..", exec_dir ? : "");
114 dirs[n_dirs++] = g_strdup_printf("%s", exec_dir ? : "");
115+
116+#ifdef CONFIG_MODULE_UPGRADES
117+ version_dir = g_strcanon(g_strdup(QEMU_PKGVERSION),
118+ G_CSET_A_2_Z G_CSET_a_2_z G_CSET_DIGITS "+-.~",
119+ '_');
120+ dirs[n_dirs++] = g_strdup_printf("/var/run/qemu/%s", version_dir);
121+#endif
122+
123 assert(n_dirs <= ARRAY_SIZE(dirs));
124
125 g_free(exec_dir);
diff --git a/debian/patches/ubuntu/lp-1847361-vhost-correctly-turn-on-VIRTIO_F_IOMMU_PLATFORM.patch b/debian/patches/ubuntu/lp-1847361-vhost-correctly-turn-on-VIRTIO_F_IOMMU_PLATFORM.patch
0new file mode 100644126new file mode 100644
index 0000000..6ef5d49
--- /dev/null
+++ b/debian/patches/ubuntu/lp-1847361-vhost-correctly-turn-on-VIRTIO_F_IOMMU_PLATFORM.patch
@@ -0,0 +1,61 @@
1From f7ef7e6e3ba6e994e070cc609eb154339d1c4a11 Mon Sep 17 00:00:00 2001
2From: Jason Wang <jasowang@redhat.com>
3Date: Mon, 2 Mar 2020 12:24:54 +0800
4Subject: [PATCH] vhost: correctly turn on VIRTIO_F_IOMMU_PLATFORM
5
6We turn on device IOTLB via VIRTIO_F_IOMMU_PLATFORM unconditionally on
7platform without IOMMU support. This can lead unnecessary IOTLB
8transactions which will damage the performance.
9
10Fixing this by check whether the device is backed by IOMMU and disable
11device IOTLB.
12
13Reported-by: Halil Pasic <pasic@linux.ibm.com>
14Tested-by: Halil Pasic <pasic@linux.ibm.com>
15Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
16Signed-off-by: Jason Wang <jasowang@redhat.com>
17Message-Id: <20200302042454.24814-1-jasowang@redhat.com>
18Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
19Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
20
21Origin: upstream, https://git.qemu.org/?p=qemu.git;a=commit;h=f7ef7e6e3ba6e994e070cc609eb154339d1c4a11
22Bug-Ubuntu: https://bugs.launchpad.net/bugs/1847361
23Last-Update: 2020-03-13
24
25---
26 hw/virtio/vhost.c | 12 +++++++++++-
27 1 file changed, 11 insertions(+), 1 deletion(-)
28
29diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
30index 0d226dae10..01ebe12f28 100644
31--- a/hw/virtio/vhost.c
32+++ b/hw/virtio/vhost.c
33@@ -290,7 +290,14 @@ static int vhost_dev_has_iommu(struct vhost_dev *dev)
34 {
35 VirtIODevice *vdev = dev->vdev;
36
37- return virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM);
38+ /*
39+ * For vhost, VIRTIO_F_IOMMU_PLATFORM means the backend support
40+ * incremental memory mapping API via IOTLB API. For platform that
41+ * does not have IOMMU, there's no need to enable this feature
42+ * which may cause unnecessary IOTLB miss/update trnasactions.
43+ */
44+ return vdev->dma_as != &address_space_memory &&
45+ virtio_host_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM);
46 }
47
48 static void *vhost_memory_map(struct vhost_dev *dev, hwaddr addr,
49@@ -765,6 +772,9 @@ static int vhost_dev_set_features(struct vhost_dev *dev,
50 if (enable_log) {
51 features |= 0x1ULL << VHOST_F_LOG_ALL;
52 }
53+ if (!vhost_dev_has_iommu(dev)) {
54+ features &= ~(0x1ULL << VIRTIO_F_IOMMU_PLATFORM);
55+ }
56 r = dev->vhost_ops->vhost_set_features(dev, features);
57 if (r < 0) {
58 VHOST_OPS_DEBUG("vhost_set_features failed");
59--
602.25.1
61
diff --git a/debian/qemu-block-extra.postrm.in b/debian/qemu-block-extra.postrm.in
0new file mode 10064462new file mode 100644
index 0000000..ef2126a
--- /dev/null
+++ b/debian/qemu-block-extra.postrm.in
@@ -0,0 +1,43 @@
1#!/bin/sh
2# postrm script for brrr
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9# * <postrm> `remove'
10# * <postrm> `purge'
11# * <old-postrm> `upgrade' <new-version>
12# * <new-postrm> `failed-upgrade' <old-version>
13# * <new-postrm> `abort-install'
14# * <new-postrm> `abort-install' <old-version>
15# * <new-postrm> `abort-upgrade' <old-version>
16# * <disappearer's-postrm> `disappear' <overwriter>
17# <overwriter-version>
18# for details, see https://www.debian.org/doc/debian-policy/ or
19# the debian-policy package
20
21
22case "$1" in
23 purge|remove)
24 # remove .so files for still running qemu instances in /var/run
25 # for details see bug LP: #1847361
26 rm -f /var/run/qemu/@PKGVERSION@/block-*.so
27 ;;
28
29 upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
30 ;;
31
32 *)
33 echo "postrm called with unknown argument \`$1'" >&2
34 exit 1
35 ;;
36esac
37
38# dh_installdeb will replace this with shell code automatically
39# generated by other debhelper scripts.
40
41#DEBHELPER#
42
43exit 0
diff --git a/debian/qemu-block-extra.prerm.in b/debian/qemu-block-extra.prerm.in
0new file mode 10064444new file mode 100644
index 0000000..dee25a8
--- /dev/null
+++ b/debian/qemu-block-extra.prerm.in
@@ -0,0 +1,45 @@
1#!/bin/sh
2# prerm script for qemu-block-extra
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9# * <prerm> `remove'
10# * <old-prerm> `upgrade' <new-version>
11# * <new-prerm> `failed-upgrade' <old-version>
12# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
13# * <deconfigured's-prerm> `deconfigure' `in-favour'
14# <package-being-installed> <version> `removing'
15# <conflicting-package> <version>
16# for details, see https://www.debian.org/doc/debian-policy/ or
17# the debian-policy package
18
19
20case "$1" in
21 remove)
22 ;;
23
24 upgrade|deconfigure)
25 # retain .so files for still running qemu instances in /var/run
26 # for details see bug LP: #1847361
27 mkdir -p /var/run/qemu/@PKGVERSION@
28 cp /usr/lib/@ARCH@/qemu/block-*.so /var/run/qemu/@PKGVERSION@/
29 ;;
30
31 failed-upgrade)
32 ;;
33
34 *)
35 echo "prerm called with unknown argument \`$1'" >&2
36 exit 1
37 ;;
38esac
39
40# dh_installdeb will replace this with shell code automatically
41# generated by other debhelper scripts.
42
43#DEBHELPER#
44
45exit 0
diff --git a/debian/qemu-system-gui.postrm.in b/debian/qemu-system-gui.postrm.in
0new file mode 10064446new file mode 100644
index 0000000..48c740a
--- /dev/null
+++ b/debian/qemu-system-gui.postrm.in
@@ -0,0 +1,44 @@
1#!/bin/sh
2# postrm script for brrr
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9# * <postrm> `remove'
10# * <postrm> `purge'
11# * <old-postrm> `upgrade' <new-version>
12# * <new-postrm> `failed-upgrade' <old-version>
13# * <new-postrm> `abort-install'
14# * <new-postrm> `abort-install' <old-version>
15# * <new-postrm> `abort-upgrade' <old-version>
16# * <disappearer's-postrm> `disappear' <overwriter>
17# <overwriter-version>
18# for details, see https://www.debian.org/doc/debian-policy/ or
19# the debian-policy package
20
21
22case "$1" in
23 purge|remove)
24 # remove .so files for still running qemu instances in /var/run
25 # for details see bug LP: #1847361
26 rm -f /var/run/qemu/@PKGVERSION@/ui-gtk.so
27 rm -f /var/run/qemu/@PKGVERSION@/audio-*.so
28 ;;
29
30 upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
31 ;;
32
33 *)
34 echo "postrm called with unknown argument \`$1'" >&2
35 exit 1
36 ;;
37esac
38
39# dh_installdeb will replace this with shell code automatically
40# generated by other debhelper scripts.
41
42#DEBHELPER#
43
44exit 0
diff --git a/debian/qemu-system-gui.prerm.in b/debian/qemu-system-gui.prerm.in
0new file mode 10064445new file mode 100644
index 0000000..3624362
--- /dev/null
+++ b/debian/qemu-system-gui.prerm.in
@@ -0,0 +1,46 @@
1#!/bin/sh
2# prerm script for qemu-system-gui
3#
4# see: dh_installdeb(1)
5
6set -e
7
8# summary of how this script can be called:
9# * <prerm> `remove'
10# * <old-prerm> `upgrade' <new-version>
11# * <new-prerm> `failed-upgrade' <old-version>
12# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
13# * <deconfigured's-prerm> `deconfigure' `in-favour'
14# <package-being-installed> <version> `removing'
15# <conflicting-package> <version>
16# for details, see https://www.debian.org/doc/debian-policy/ or
17# the debian-policy package
18
19
20case "$1" in
21 remove)
22 ;;
23
24 upgrade|deconfigure)
25 # retain .so files for still running qemu instances in /var/run
26 # for details see bug LP: #1847361
27 mkdir -p /var/run/qemu/@PKGVERSION@
28 cp /usr/lib/@ARCH@/qemu/ui-gtk.so /var/run/qemu/@PKGVERSION@/
29 cp /usr/lib/@ARCH@/qemu/audio-*.so /var/run/qemu/@PKGVERSION@/
30 ;;
31
32 failed-upgrade)
33 ;;
34
35 *)
36 echo "prerm called with unknown argument \`$1'" >&2
37 exit 1
38 ;;
39esac
40
41# dh_installdeb will replace this with shell code automatically
42# generated by other debhelper scripts.
43
44#DEBHELPER#
45
46exit 0
diff --git a/debian/rules b/debian/rules
index 1604d33..58ed6ea 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,9 @@ else
15VENDOR := DEBIAN15VENDOR := DEBIAN
16endif16endif
1717
18AUTOGENERATED:= qemu-block-extra.prerm qemu-block-extra.postrm qemu-system-gui.prerm qemu-system-gui.postrm
19PKGVERSION := $(shell printf "Debian ${DEB_VERSION}" | tr --complement '[:alnum:]+-.~' '_')
20
18# support parallel build using DEB_BUILD_OPTIONS=parallel=N21# support parallel build using DEB_BUILD_OPTIONS=parallel=N
19ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))22ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
20 MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))23 MAKEFLAGS += -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -103,6 +106,12 @@ endif # enable_linux_user
103b/configure-stamp: configure106b/configure-stamp: configure
104 dh_testdir107 dh_testdir
105108
109 for f in ${AUTOGENERATED} ; do \
110 sed -e 's%@ARCH@%${DEB_HOST_MULTIARCH}%g' \
111 -e 's%@PKGVERSION@%${PKGVERSION}%g' \
112 < debian/$$f.in > debian/$$f ; \
113 done
114
106 # system build115 # system build
107 rm -rf b/qemu; mkdir -p b/qemu116 rm -rf b/qemu; mkdir -p b/qemu
108 cd b/qemu && \117 cd b/qemu && \
@@ -111,6 +120,7 @@ b/configure-stamp: configure
111 --${enable_linux_user}-linux-user \120 --${enable_linux_user}-linux-user \
112 --disable-xen \121 --disable-xen \
113 --enable-modules \122 --enable-modules \
123 --enable-module-upgrades \
114 $(shell sh debian/extract-config-opts \124 $(shell sh debian/extract-config-opts \
115 $(DEB_HOST_ARCH_OS)-$(DEB_HOST_ARCH) debian/control) \125 $(DEB_HOST_ARCH_OS)-$(DEB_HOST_ARCH) debian/control) \
116 $(QEMU_CONFIGURE_OPTIONS) || \126 $(QEMU_CONFIGURE_OPTIONS) || \
@@ -137,6 +147,7 @@ ifneq ($(filter $(DEB_HOST_ARCH),amd64 i386),)
137 --enable-xen \147 --enable-xen \
138 --target-list="aarch64-softmmu arm-softmmu i386-softmmu x86_64-softmmu"148 --target-list="aarch64-softmmu arm-softmmu i386-softmmu x86_64-softmmu"
139 --enable-modules \149 --enable-modules \
150 --enable-module-upgrades \
140 $(shell sh debian/extract-config-opts \151 $(shell sh debian/extract-config-opts \
141 $(DEB_HOST_ARCH_OS)-$(DEB_HOST_ARCH) debian/control) \152 $(DEB_HOST_ARCH_OS)-$(DEB_HOST_ARCH) debian/control) \
142 $(QEMU_CONFIGURE_OPTIONS) || \153 $(QEMU_CONFIGURE_OPTIONS) || \
@@ -489,6 +500,7 @@ clean: debian/control
489 rm -rf b500 rm -rf b
490 find scripts/ -name '*.pyc' -delete || :501 find scripts/ -name '*.pyc' -delete || :
491 rm -f debian/qemu-user.1502 rm -f debian/qemu-user.1
503 rm -f $(patsubst %, debian/%, ${AUTOGENERATED})
492 dh_clean504 dh_clean
493505
494.PHONY: build clean binary-arch binary-indep binary build-arch build-indep build506.PHONY: build clean binary-arch binary-indep binary build-arch build-indep build

Subscribers

People subscribed via source and target branches