Merge ~paelzer/ubuntu/+source/qemu:lp-1913421-exec-run-1936894-microvm-HIRSUTE into ubuntu/+source/qemu:ubuntu/hirsute-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 48a2837da092a0fe3d4dd038ad9608c5c9c47122
Merged at revision: 127c1c28d2ef94122a0a26568e84996c46742249
Proposed branch: ~paelzer/ubuntu/+source/qemu:lp-1913421-exec-run-1936894-microvm-HIRSUTE
Merge into: ubuntu/+source/qemu:ubuntu/hirsute-devel
Diff against target: 77 lines (+30/-6)
2 files modified
debian/changelog (+10/-0)
debian/rules (+20/-6)
Reviewer Review Type Date Requested Status
Utkarsh Gupta (community) Approve
Dan Streetman (community) Abstain
Ubuntu Stable Release Updates Team Pending
Canonical Server packageset reviewers Pending
Canonical Server Pending
Review via email: mp+407766@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

PPA: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/4653/+packages

Please review these MPs in depth as the maintscript and edge-case magic has bitten me enough on this :-/

Revision history for this message
Dan Streetman (ddstreet) wrote :

abstaining from review per bug 1913421 comment 41

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

The discussion between Dan and me continued on the bug, I'd ask (and therefore assign for pre-unapproved-review) the SRU-Team to help us by adding a third opinion.

Dan and I are not even battling with strong opposing opinions - there are just multiple ways to do things and it isn't clear how to best-continue so we'd need a tie breaker.

I'd ask/recommend to read comment 41 and all that followed on the bug, if needed to go deeper also the rest of the bug comments and the related Debian PR.
Then adding a 3rd voice/opinion here would really help us.

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

Re-worked according to the bug discussion - thanks to everyone that participated!
Thereby ready for re-review.

Revision history for this message
Utkarsh Gupta (utkarsh) wrote (last edit ):

ba555de08dde5914737f891cadb4e4fc52240639
-> makes sense; all good. +1.

4861307062bc61d42f842575031f45b27fbbd358
-> just a d/ch entry; not a lot can go wrong there, can it? :P

70f2c06bd5ef444232efa8cc3cf8467ae50bfde0
-> fair, we split the `remove` and `purge` actions and the extended
   commit message helps in making things clearer. Whilst purging, we
   remove anything and everything that was there under /run/qemu;
   okay, +1.

f98fb144c9ab8fcdca277d1f8f004f77439fe185
-> Hunk 1: looks good; we're just simply splitting the SAVEMODDIR into
   two bits so as to leverage the latter in the next hunk. +1.
-> Hunk 2: it, afaiui, follows https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1913421/comments/47.
   Also, the manual tests passed (as noted in the last 2 comments by
   Christian), so +1.

658d3e70f006249e56636fc4cd291e8f596d2817
-> just a d/ch entry; not a lot can go wrong there, can it? :P

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

Here I did the same path unification that was requested in other MPs.

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

All re-verified and uploading to -unapproved now.
Thanks everyone involved.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index d33c1fb..f7983b9 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,13 @@
6+qemu (1:5.2+dfsg-9ubuntu3.2) hirsute; urgency=medium
7+
8+ * d/rules fix microvm default machine type for a new build system
9+ (LP: #1936894) - Thanks to Michael Tokarev for the fix.
10+ * enhance loading of old modules post upgrade (LP: #1913421)
11+ - d/rules: clear all (current and former) modules on purge
12+ - d/rules: test for exec and prepare /var/run/qemu if needed
13+
14+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Thu, 19 Aug 2021 11:25:17 +0200
15+
16 qemu (1:5.2+dfsg-9ubuntu3.1) hirsute-security; urgency=medium
17
18 * SECURITY UPDATE: NULL pointer dereference in MemoryRegionOps object
19diff --git a/debian/rules b/debian/rules
20index eb8f821..791b0c5 100755
21--- a/debian/rules
22+++ b/debian/rules
23@@ -38,7 +38,8 @@ enable_linux_user = $(if $(filter qemu-user,${BUILD_PACKAGES}),enable,disable)
24
25 FIRMWAREPATH = /usr/share/qemu:/usr/share/seabios:/usr/lib/ipxe/qemu
26 PKGVERSION = Debian ${DEB_VERSION}
27-SAVEMODDIR = /run/qemu/$(shell echo -n "${PKGVERSION}" | tr --complement '[:alnum:]+-.~' '_')
28+SAVEMODBASE = /var/run/qemu
29+SAVEMODDIR = ${SAVEMODBASE}/$(shell echo -n "${PKGVERSION}" | tr --complement '[:alnum:]+-.~' '_')
30 sysdatadir = debian/qemu-system-data/usr/share/qemu
31
32 ALPHAEV67_CROSSPFX = alpha-linux-gnu-
33@@ -128,8 +129,9 @@ ifneq ($(filter $(DEB_HOST_ARCH),amd64),)
34 # microvm system
35 rm -rf b/qemu-microvm; mkdir -p b/qemu-microvm
36 cd b/qemu-microvm && \
37- ../../configure ${common_configure_opts} --disable-user \
38- --enable-system --enable-kvm \
39+ ../../configure ${common_configure_opts} \
40+ --extra-cflags="$(CFLAGS) $(CPPFLAGS) -DCONFIG_MICROVM_DEFAULT=1" \
41+ --disable-user --enable-system --enable-kvm \
42 --disable-linux-user --disable-modules --disable-docs \
43 --disable-libssh --disable-tcmalloc --disable-glusterfs \
44 --disable-seccomp --disable-bzip2 --disable-slirp --disable-vde \
45@@ -155,7 +157,6 @@ ifneq ($(filter $(DEB_HOST_ARCH),amd64),)
46 --without-default-devices \
47 $(QEMU_CONFIGURE_OPTIONS) || \
48 { echo ===== CONFIGURE FAILED ===; tail -n 50 config.log; exit 1; }
49- echo "#define CONFIG_MICROVM_DEFAULT 1" >> b/qemu-microvm/x86_64-softmmu/config-target.h
50 endif
51
52 ifeq ($(VENDOR),UBUNTU)
53@@ -268,9 +269,22 @@ binary-arch:
54
55 # save block-extra loadable modules on upgrades
56 # other module types for now (5.0) can't be loaded at runtime, only at startup
57- echo 'case $$1 in (upgrade|deconfigure) mkdir -p ${SAVEMODDIR}; cp -p ${libdir}/qemu/block-*.so ${SAVEMODDIR}/;; esac' \
58+ echo 'case $$1 in (upgrade|deconfigure)' \
59+ 'mkdir -p ${SAVEMODBASE};' \
60+ 'printf "#!/bin/sh\nexit 0\n" > ${SAVEMODBASE}/exec;' \
61+ 'chmod +x ${SAVEMODBASE}/exec || true;' \
62+ 'if ! ${SAVEMODBASE}/exec 1>/dev/null 2>&1 && ! findmnt --mountpoint ${SAVEMODBASE} 1>/dev/null; then' \
63+ ' mount -t tmpfs --source none --target ${SAVEMODBASE} --options defaults,nosuid,nodev,exec,mode=755 || true; ' \
64+ 'fi;' \
65+ 'echo "/var/run/qemu is a mountpoint to allow still running qemu binaries of former builds (after package upgrades) to fallback-load modules from there" > ${SAVEMODBASE}/README || true;' \
66+ 'mkdir -p ${SAVEMODDIR};' \
67+ 'cp -p ${libdir}/qemu/block-*.so ${SAVEMODDIR}/;;' \
68+ 'esac' \
69 >> debian/qemu-block-extra.prerm.debhelper
70- echo 'case $$1 in (purge|remove) rm -f ${SAVEMODDIR}/block-*.so;; esac' \
71+
72+ echo 'case $$1 in (remove) rm -f ${SAVEMODDIR}/block-*.so;; esac' \
73+ >> debian/qemu-block-extra.postrm.debhelper
74+ echo 'case $$1 in (purge) umount --quiet ${SAVEMODBASE} 1>/dev/null 2>&1 || true; rm -rf "${SAVEMODBASE}" 1>/dev/null 2>&1 || true;; esac' \
75 >> debian/qemu-block-extra.postrm.debhelper
76
77 ifeq (${enable_system},enable)

Subscribers

People subscribed via source and target branches