Merge ~paelzer/ubuntu/+source/libguestfs:lp-1766534-1782138-bionic into ubuntu/+source/libguestfs:ubuntu/bionic-devel

Proposed by Christian Ehrhardt 
Status: Merged
Merge reported by: Christian Ehrhardt 
Merged at revision: f0b12cc38501a53038db25cab94a6ad82daa3049
Proposed branch: ~paelzer/ubuntu/+source/libguestfs:lp-1766534-1782138-bionic
Merge into: ubuntu/+source/libguestfs:ubuntu/bionic-devel
Diff against target: 555 lines (+497/-0)
9 files modified
debian/changelog (+9/-0)
debian/patches/lp-1766534-s390x-1-6-launch-libvirt-Use-console-device-sclp-for-app.patch (+55/-0)
debian/patches/lp-1766534-s390x-2-6-launch-direct-Use-sclp-as-serial-console-on-th.patch (+43/-0)
debian/patches/lp-1766534-s390x-3-6-appliance-Use-dev-ttysclp0-for-serial-console.patch (+30/-0)
debian/patches/lp-1766534-s390x-4-6-launch-direct-Use-virtio-ccw-on-this-architect.patch (+83/-0)
debian/patches/lp-1766534-s390x-5-6-tests-regressions-Skip-IDE-tests-on-S-390.patch (+44/-0)
debian/patches/lp-1766534-s390x-6-6-lib-Add-VIRTIO_DEVICE_NAME-macro-to-handle-virtio-mm.patch (+143/-0)
debian/patches/lp-1782138-java-support-OpenJDK-10.patch (+83/-0)
debian/patches/series (+7/-0)
Reviewer Review Type Date Requested Status
Andreas Hasenack (community) Approve
Canonical Server packageset reviewers Pending
git-ubuntu developers Pending
Review via email: mp+349757@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Backport of fixes for bug 1766534 and to get that building for 1782138
Backports are from Upstream and/or RHEL-7.5 which already have done the backport to a 1.36 version.

Builds are ready for testing in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3323

I have no SRU template and similar processing yet as I wait for IBM to per-qualify it fromt he ppa.
That also is the reason this MP is not yet in needs-review.

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

dep3 header for the java patch

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

Ack

f0b12cc... by Christian Ehrhardt 

add DEP3 Header to d/p/lp-1782138-java-support-OpenJDK-10.patch

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

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

Fixup created and pushed, ready for re-review

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

+1

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

FYI - sponsoring this waits for the Bug reporter to confirm from the PPA that this is sufficient for him.

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

Fixes are released

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 3de4360..02df5bd 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+libguestfs (1:1.36.13-1ubuntu3.1) bionic; urgency=medium
7+
8+ * d/p/lp-1766534-s390x-*: backport s390x/CCW support from 1.37.22 to Bionic
9+ (LP: #1766534)
10+ * d/p/lp-1782138-java-support-OpenJDK-10.patch: Fix FTBFS due to newer
11+ jdk >=10 being in Bionic (LP: #1782138)
12+
13+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 17 Jul 2018 10:34:31 +0200
14+
15 libguestfs (1:1.36.13-1ubuntu3) bionic; urgency=high
16
17 * No change rebuild against ruby-defaults without ruby2.3 support.
18diff --git a/debian/patches/lp-1766534-s390x-1-6-launch-libvirt-Use-console-device-sclp-for-app.patch b/debian/patches/lp-1766534-s390x-1-6-launch-libvirt-Use-console-device-sclp-for-app.patch
19new file mode 100644
20index 0000000..4335f65
21--- /dev/null
22+++ b/debian/patches/lp-1766534-s390x-1-6-launch-libvirt-Use-console-device-sclp-for-app.patch
23@@ -0,0 +1,55 @@
24+From 6328f332361675abb0233db890d2bfe0d9a5092a Mon Sep 17 00:00:00 2001
25+From: "Richard W.M. Jones" <rjones@redhat.com>
26+Date: Tue, 16 May 2017 20:12:54 +0200
27+Subject: [PATCH] s390x: launch: libvirt: Use <console> device sclp for
28+ appliance debug messages (RHBZ#1376547).
29+
30+Thanks: Cole Robinson, Dan Horak, Thomas Huth.
31+
32+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
33+Original-Author: "Richard W.M. Jones" <rjones@redhat.com>
34+Origin: backport, https://github.com/libguestfs/libguestfs/commit/6328f332361675abb0233db890d2bfe0d9a5092a
35+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1766534
36+Last-Update: 2018-06-17
37+---
38+ lib/launch-libvirt.c | 17 +++++++++++++++++
39+ 1 file changed, 17 insertions(+)
40+
41+diff --git a/lib/launch-libvirt.c b/lib/launch-libvirt.c
42+index f66c8e0ef..4adb2cfb3 100644
43+--- a/lib/launch-libvirt.c
44++++ b/lib/launch-libvirt.c
45+@@ -1359,6 +1359,7 @@ construct_libvirt_xml_devices (guestfs_h *g,
46+ return -1;
47+ }
48+
49++#ifndef __s390x__
50+ /* Console. */
51+ start_element ("serial") {
52+ attribute ("type", "unix");
53+@@ -1370,6 +1371,22 @@ construct_libvirt_xml_devices (guestfs_h *g,
54+ attribute ("port", "0");
55+ } end_element ();
56+ } end_element ();
57++#else
58++ /* https://bugzilla.redhat.com/show_bug.cgi?id=1376547#c14
59++ * and https://libvirt.org/formatdomain.html#elementCharConsole
60++ */
61++ start_element ("console") {
62++ attribute ("type", "unix");
63++ start_element ("source") {
64++ attribute ("mode", "connect");
65++ attribute ("path", params->data->console_path);
66++ } end_element ();
67++ start_element ("target") {
68++ attribute ("type", "sclp");
69++ attribute ("port", "0");
70++ } end_element ();
71++ } end_element ();
72++#endif
73+
74+ /* Virtio-serial for guestfsd communication. */
75+ start_element ("channel") {
76+--
77+2.17.1
78+
79diff --git a/debian/patches/lp-1766534-s390x-2-6-launch-direct-Use-sclp-as-serial-console-on-th.patch b/debian/patches/lp-1766534-s390x-2-6-launch-direct-Use-sclp-as-serial-console-on-th.patch
80new file mode 100644
81index 0000000..c9300c7
82--- /dev/null
83+++ b/debian/patches/lp-1766534-s390x-2-6-launch-direct-Use-sclp-as-serial-console-on-th.patch
84@@ -0,0 +1,43 @@
85+From f774a2efed860774ba3a8e47e8ac81eeed2508fa Mon Sep 17 00:00:00 2001
86+From: "Richard W.M. Jones" <rjones@redhat.com>
87+Date: Wed, 17 May 2017 12:16:07 +0200
88+Subject: [PATCH] s390x: launch: direct: Use sclp as serial console on this
89+ architecture.
90+
91+The same change to the direct backend as made to the libvirt backend
92+in the previous commit.
93+
94+(cherry picked from commit ade2652bdac16656ba4ed821d74528a6de188fa0)
95+
96+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
97+Original-Author: "Richard W.M. Jones" <rjones@redhat.com>
98+Origin: backport, https://github.com/libguestfs/libguestfs/commit/f774a2ef
99+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1766534
100+Last-Update: 2018-06-17
101+---
102+ lib/launch-direct.c | 7 +++++++
103+ 1 file changed, 7 insertions(+)
104+
105+diff --git a/lib/launch-direct.c b/lib/launch-direct.c
106+index 9cc153b21..147e158de 100644
107+--- a/lib/launch-direct.c
108++++ b/lib/launch-direct.c
109+@@ -592,8 +592,15 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
110+ ADD_CMDLINE (VIRTIO_SERIAL);
111+
112+ /* Create the serial console. */
113++#ifndef __s390x__
114+ ADD_CMDLINE ("-serial");
115+ ADD_CMDLINE ("stdio");
116++#else
117++ ADD_CMDLINE ("-chardev");
118++ ADD_CMDLINE ("stdio,id=charconsole0");
119++ ADD_CMDLINE ("-device");
120++ ADD_CMDLINE ("sclpconsole,chardev=charconsole0");
121++#endif
122+
123+ if (g->verbose &&
124+ guestfs_int_qemu_supports_device (g, data->qemu_data,
125+--
126+2.17.1
127+
128diff --git a/debian/patches/lp-1766534-s390x-3-6-appliance-Use-dev-ttysclp0-for-serial-console.patch b/debian/patches/lp-1766534-s390x-3-6-appliance-Use-dev-ttysclp0-for-serial-console.patch
129new file mode 100644
130index 0000000..97cf56f
131--- /dev/null
132+++ b/debian/patches/lp-1766534-s390x-3-6-appliance-Use-dev-ttysclp0-for-serial-console.patch
133@@ -0,0 +1,30 @@
134+From 5fc76d6d10a1095c9301edbf4716114e4e94882c Mon Sep 17 00:00:00 2001
135+From: "Richard W.M. Jones" <rjones@redhat.com>
136+Date: Wed, 17 May 2017 11:24:39 +0200
137+Subject: [PATCH] s390x: appliance: Use /dev/ttysclp0 for serial console.
138+
139+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
140+Original-Author: "Richard W.M. Jones" <rjones@redhat.com>
141+Origin: backport, https://github.com/libguestfs/libguestfs/commit/5fc76d6d10a1095c9301edbf4716114e4e94882c
142+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1766534
143+Last-Update: 2018-06-17
144+---
145+ lib/appliance-kcmdline.c | 2 ++
146+ 1 file changed, 2 insertions(+)
147+
148+diff --git a/lib/appliance-kcmdline.c b/lib/appliance-kcmdline.c
149+index 4dde7a865..ff7bda494 100644
150+--- a/lib/appliance-kcmdline.c
151++++ b/lib/appliance-kcmdline.c
152+@@ -44,6 +44,8 @@
153+ #define SERIAL_CONSOLE "console=hvc0 console=ttyS0"
154+ #elif defined(__arm__) || defined(__aarch64__)
155+ #define SERIAL_CONSOLE "console=ttyAMA0"
156++#elif defined(__s390x__)
157++#define SERIAL_CONSOLE "console=ttysclp0"
158+ #else
159+ #define SERIAL_CONSOLE "console=ttyS0"
160+ #endif
161+--
162+2.17.1
163+
164diff --git a/debian/patches/lp-1766534-s390x-4-6-launch-direct-Use-virtio-ccw-on-this-architect.patch b/debian/patches/lp-1766534-s390x-4-6-launch-direct-Use-virtio-ccw-on-this-architect.patch
165new file mode 100644
166index 0000000..fdfc90a
167--- /dev/null
168+++ b/debian/patches/lp-1766534-s390x-4-6-launch-direct-Use-virtio-ccw-on-this-architect.patch
169@@ -0,0 +1,83 @@
170+From 516f008f29e77d676907208e51e2f57bb73888aa Mon Sep 17 00:00:00 2001
171+From: "Richard W.M. Jones" <rjones@redhat.com>
172+Date: Tue, 16 May 2017 19:58:59 +0200
173+Subject: [PATCH] s390x: launch: direct: Use virtio-*-ccw on this architecture.
174+
175+PCI devices don't exist/work. You would see errors such as:
176+
177+qemu-system-s390x: -device virtio-rng-pci,rng=rng0: MSI-X support is mandatory in the S390 architecture
178+(cherry picked from commit ddde6f9e2f14ccf8d91a8587052d0abcfb6496f1)
179+
180+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
181+Original-Author: "Richard W.M. Jones" <rjones@redhat.com>
182+Origin: backport, https://github.com/libguestfs/libguestfs/commit/516f008f29e77d676907208e51e2f57bb73888aa
183+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1766534
184+Last-Update: 2018-06-17
185+---
186+ lib/guestfs-internal.h | 26 +++++++++++++++++---------
187+ lib/launch-direct.c | 4 ++--
188+ 2 files changed, 19 insertions(+), 11 deletions(-)
189+
190+diff --git a/lib/guestfs-internal.h b/lib/guestfs-internal.h
191+index 949cacfef..f035e0931 100644
192+--- a/lib/guestfs-internal.h
193++++ b/lib/guestfs-internal.h
194+@@ -142,20 +142,28 @@
195+ /* Maximum size of Windows explorer.exe. 2.6MB on Windows 7. */
196+ #define MAX_WINDOWS_EXPLORER_SIZE (4 * 1000 * 1000)
197+
198+-/* Differences in device names on ARM (virtio-mmio) vs normal
199+- * hardware with PCI.
200++/* Differences in device names on ARMv7 (virtio-mmio), s/390x (CCW) vs
201++ * normal hardware with PCI.
202+ */
203+-#if !defined(__arm__)
204+-#define VIRTIO_BLK "virtio-blk-pci"
205+-#define VIRTIO_SCSI "virtio-scsi-pci"
206+-#define VIRTIO_SERIAL "virtio-serial-pci"
207+-#define VIRTIO_NET "virtio-net-pci"
208+-#else /* ARMv7 */
209++#if defined(__arm__)
210+ #define VIRTIO_BLK "virtio-blk-device"
211+ #define VIRTIO_SCSI "virtio-scsi-device"
212+ #define VIRTIO_SERIAL "virtio-serial-device"
213+ #define VIRTIO_NET "virtio-net-device"
214+-#endif /* ARMv7 */
215++#define VIRTIO_RNG "virtio-rng-device"
216++#elif defined(__s390x__)
217++#define VIRTIO_BLK "virtio-blk-ccw"
218++#define VIRTIO_SCSI "virtio-scsi-ccw"
219++#define VIRTIO_SERIAL "virtio-serial-ccw"
220++#define VIRTIO_NET "virtio-net-ccw"
221++#define VIRTIO_RNG "virtio-rng-ccw"
222++#else
223++#define VIRTIO_BLK "virtio-blk-pci"
224++#define VIRTIO_SCSI "virtio-scsi-pci"
225++#define VIRTIO_SERIAL "virtio-serial-pci"
226++#define VIRTIO_NET "virtio-net-pci"
227++#define VIRTIO_RNG "virtio-rng-pci"
228++#endif
229+
230+ /* Machine types. */
231+ #ifdef __arm__
232+diff --git a/lib/launch-direct.c b/lib/launch-direct.c
233+index 147e158de..c8841bfe4 100644
234+--- a/lib/launch-direct.c
235++++ b/lib/launch-direct.c
236+@@ -463,11 +463,11 @@ launch_direct (guestfs_h *g, void *datav, const char *arg)
237+ * when needing entropy.
238+ */
239+ if (guestfs_int_qemu_supports_device (g, data->qemu_data,
240+- "virtio-rng-pci")) {
241++ VIRTIO_RNG)) {
242+ ADD_CMDLINE ("-object");
243+ ADD_CMDLINE ("rng-random,filename=/dev/urandom,id=rng0");
244+ ADD_CMDLINE ("-device");
245+- ADD_CMDLINE ("virtio-rng-pci,rng=rng0");
246++ ADD_CMDLINE (VIRTIO_RNG ",rng=rng0");
247+ }
248+
249+ /* Add drives */
250+--
251+2.17.1
252+
253diff --git a/debian/patches/lp-1766534-s390x-5-6-tests-regressions-Skip-IDE-tests-on-S-390.patch b/debian/patches/lp-1766534-s390x-5-6-tests-regressions-Skip-IDE-tests-on-S-390.patch
254new file mode 100644
255index 0000000..deb7456
256--- /dev/null
257+++ b/debian/patches/lp-1766534-s390x-5-6-tests-regressions-Skip-IDE-tests-on-S-390.patch
258@@ -0,0 +1,44 @@
259+From 93af83de853b87c555624227741bdf8af1918703 Mon Sep 17 00:00:00 2001
260+From: "Richard W.M. Jones" <rjones@redhat.com>
261+Date: Wed, 17 May 2017 13:38:43 +0200
262+Subject: [PATCH] s390x: tests: regressions: Skip IDE tests on S/390.
263+
264+IDE interface is not supported.
265+
266+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
267+Original-Author: "Richard W.M. Jones" <rjones@redhat.com>
268+Origin: backport, https://github.com/libguestfs/libguestfs/commit/93af83de853b87c555624227741bdf8af1918703
269+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1766534
270+Last-Update: 2018-06-17
271+---
272+ tests/regressions/rhbz690819.sh | 1 +
273+ tests/regressions/rhbz975797.sh | 1 +
274+ 2 files changed, 2 insertions(+)
275+
276+diff --git a/tests/regressions/rhbz690819.sh b/tests/regressions/rhbz690819.sh
277+index d18b4d81a..0b790862d 100755
278+--- a/tests/regressions/rhbz690819.sh
279++++ b/tests/regressions/rhbz690819.sh
280+@@ -29,6 +29,7 @@ skip_if_arch arm
281+ skip_if_arch aarch64
282+ skip_if_arch ppc64
283+ skip_if_arch ppc64le
284++skip_if_arch s390x
285+ skip_if_backend libvirt
286+ # UML doesn't support the 'iface' parameter.
287+ skip_if_backend uml
288+diff --git a/tests/regressions/rhbz975797.sh b/tests/regressions/rhbz975797.sh
289+index bc6a1c63f..04e8d23de 100755
290+--- a/tests/regressions/rhbz975797.sh
291++++ b/tests/regressions/rhbz975797.sh
292+@@ -29,6 +29,7 @@ skip_if_arch arm
293+ skip_if_arch aarch64
294+ skip_if_arch ppc64
295+ skip_if_arch ppc64le
296++skip_if_arch s390x
297+ skip_if_backend libvirt
298+ # UML doesn't support the 'iface' parameter.
299+ skip_if_backend uml
300+--
301+2.17.1
302+
303diff --git a/debian/patches/lp-1766534-s390x-6-6-lib-Add-VIRTIO_DEVICE_NAME-macro-to-handle-virtio-mm.patch b/debian/patches/lp-1766534-s390x-6-6-lib-Add-VIRTIO_DEVICE_NAME-macro-to-handle-virtio-mm.patch
304new file mode 100644
305index 0000000..f1b6371
306--- /dev/null
307+++ b/debian/patches/lp-1766534-s390x-6-6-lib-Add-VIRTIO_DEVICE_NAME-macro-to-handle-virtio-mm.patch
308@@ -0,0 +1,143 @@
309+From eddfb0a765e0246d0fb397414f32403f055488a3 Mon Sep 17 00:00:00 2001
310+From: "Richard W.M. Jones" <rjones@redhat.com>
311+Date: Thu, 18 May 2017 15:59:38 +0100
312+Subject: [PATCH] lib: Add VIRTIO_DEVICE_NAME macro to handle virtio-mmio vs
313+ CCW vs virtio-PCI.
314+
315+(cherry picked from commit a5bd493e3f90945cb8e913f9c680bedbdf26aaaa)
316+
317+PT: the VIRTIO_DEVICE_NAME macros are left in guestfs-internal.h, since
318+the VIRTIO_* macros were used in other places than launch-direct.c.
319+
320+Backport-Note: Ubuntu has not reverted 224de20, therefore we use only parts of
321+the Backport and other parts of the upstream-master change adapted to
322+our source
323+
324+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
325+Original-Author: "Richard W.M. Jones" <rjones@redhat.com>
326+Origin: backport, https://github.com/libguestfs/libguestfs/commit/eddfb0a765e0246d0fb397414f32403f055488a3
327+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1766534
328+Last-Update: 2018-06-17
329+---
330+ lib/guestfs-internal.h | 22 +++++-----------------
331+ lib/launch-direct.c | 16 ++++++++--------
332+ lib/launch-libvirt.c | 2 +-
333+ lib/qemu.c | 2 +-
334+ 4 files changed, 15 insertions(+), 27 deletions(-)
335+
336+--- a/lib/guestfs-internal.h
337++++ b/lib/guestfs-internal.h
338+@@ -142,27 +142,15 @@
339+ /* Maximum size of Windows explorer.exe. 2.6MB on Windows 7. */
340+ #define MAX_WINDOWS_EXPLORER_SIZE (4 * 1000 * 1000)
341+
342+-/* Differences in device names on ARMv7 (virtio-mmio), s/390x (CCW) vs
343+- * normal hardware with PCI.
344++/* Differences in qemu device names on ARMv7 (virtio-mmio), s/390x
345++ * (CCW) vs normal hardware with PCI.
346+ */
347+ #if defined(__arm__)
348+-#define VIRTIO_BLK "virtio-blk-device"
349+-#define VIRTIO_SCSI "virtio-scsi-device"
350+-#define VIRTIO_SERIAL "virtio-serial-device"
351+-#define VIRTIO_NET "virtio-net-device"
352+-#define VIRTIO_RNG "virtio-rng-device"
353++#define VIRTIO_DEVICE_NAME(type) type "-device"
354+ #elif defined(__s390x__)
355+-#define VIRTIO_BLK "virtio-blk-ccw"
356+-#define VIRTIO_SCSI "virtio-scsi-ccw"
357+-#define VIRTIO_SERIAL "virtio-serial-ccw"
358+-#define VIRTIO_NET "virtio-net-ccw"
359+-#define VIRTIO_RNG "virtio-rng-ccw"
360++#define VIRTIO_DEVICE_NAME(type) type "-ccw"
361+ #else
362+-#define VIRTIO_BLK "virtio-blk-pci"
363+-#define VIRTIO_SCSI "virtio-scsi-pci"
364+-#define VIRTIO_SERIAL "virtio-serial-pci"
365+-#define VIRTIO_NET "virtio-net-pci"
366+-#define VIRTIO_RNG "virtio-rng-pci"
367++#define VIRTIO_DEVICE_NAME(type) type "-pci"
368+ #endif
369+
370+ /* Machine types. */
371+--- a/lib/launch-direct.c
372++++ b/lib/launch-direct.c
373+@@ -349,7 +349,7 @@ launch_direct (guestfs_h *g, void *datav
374+ */
375+ if (guestfs_int_qemu_supports (g, data->qemu_data, "-global")) {
376+ ADD_CMDLINE ("-global");
377+- ADD_CMDLINE (VIRTIO_BLK ".scsi=off");
378++ ADD_CMDLINE (VIRTIO_DEVICE_NAME ("virtio-blk") ".scsi=off");
379+ }
380+
381+ if (guestfs_int_qemu_supports (g, data->qemu_data, "-nodefconfig"))
382+@@ -463,11 +463,11 @@ launch_direct (guestfs_h *g, void *datav
383+ * when needing entropy.
384+ */
385+ if (guestfs_int_qemu_supports_device (g, data->qemu_data,
386+- VIRTIO_RNG)) {
387++ VIRTIO_DEVICE_NAME ("virtio-rng"))) {
388+ ADD_CMDLINE ("-object");
389+ ADD_CMDLINE ("rng-random,filename=/dev/urandom,id=rng0");
390+ ADD_CMDLINE ("-device");
391+- ADD_CMDLINE (VIRTIO_RNG ",rng=rng0");
392++ ADD_CMDLINE (VIRTIO_DEVICE_NAME ("virtio-rng") ",rng=rng0");
393+ }
394+
395+ /* Add drives */
396+@@ -477,7 +477,7 @@ launch_direct (guestfs_h *g, void *datav
397+ if (virtio_scsi) {
398+ /* Create the virtio-scsi bus. */
399+ ADD_CMDLINE ("-device");
400+- ADD_CMDLINE (VIRTIO_SCSI ",id=scsi");
401++ ADD_CMDLINE (VIRTIO_DEVICE_NAME ("virtio-scsi") ",id=scsi");
402+ }
403+
404+ ITER_DRIVES (g, i, drv) {
405+@@ -582,7 +582,7 @@ launch_direct (guestfs_h *g, void *datav
406+ ADD_CMDLINE ("-drive");
407+ ADD_CMDLINE_PRINTF ("%s,if=none" /* sic */, param);
408+ ADD_CMDLINE ("-device");
409+- ADD_CMDLINE_PRINTF (VIRTIO_BLK ",drive=hd%zu", i);
410++ ADD_CMDLINE_PRINTF (VIRTIO_DEVICE_NAME ("virtio-blk") ",drive=hd%zu", i);
411+ }
412+ }
413+
414+@@ -599,7 +599,7 @@ launch_direct (guestfs_h *g, void *datav
415+ }
416+ else {
417+ ADD_CMDLINE ("-device");
418+- ADD_CMDLINE (VIRTIO_BLK ",drive=appliance");
419++ ADD_CMDLINE (VIRTIO_DEVICE_NAME ("virtio-blk") ",drive=appliance");
420+ }
421+
422+ appliance_dev = make_appliance_dev (g, virtio_scsi);
423+@@ -607,7 +607,7 @@ launch_direct (guestfs_h *g, void *datav
424+
425+ /* Create the virtio serial bus. */
426+ ADD_CMDLINE ("-device");
427+- ADD_CMDLINE (VIRTIO_SERIAL);
428++ ADD_CMDLINE (VIRTIO_DEVICE_NAME ("virtio-serial"));
429+
430+ /* Create the serial console. */
431+ #ifndef __s390x__
432+@@ -644,7 +644,7 @@ launch_direct (guestfs_h *g, void *datav
433+ ADD_CMDLINE ("-netdev");
434+ ADD_CMDLINE ("user,id=usernet,net=169.254.0.0/16");
435+ ADD_CMDLINE ("-device");
436+- ADD_CMDLINE (VIRTIO_NET ",netdev=usernet");
437++ ADD_CMDLINE (VIRTIO_DEVICE_NAME ("virtio-net") ",netdev=usernet");
438+ }
439+
440+ ADD_CMDLINE ("-append");
441+--- a/lib/qemu.c
442++++ b/lib/qemu.c
443+@@ -619,7 +619,7 @@ guestfs_int_qemu_supports_virtio_scsi (g
444+ if (old_or_broken_virtio_scsi (qemu_version))
445+ data->virtio_scsi = 2;
446+ else {
447+- r = guestfs_int_qemu_supports_device (g, data, VIRTIO_SCSI);
448++ r = guestfs_int_qemu_supports_device (g, data, VIRTIO_DEVICE_NAME ("virtio-scsi"));
449+ if (r > 0)
450+ data->virtio_scsi = 1;
451+ else if (r == 0)
452diff --git a/debian/patches/lp-1782138-java-support-OpenJDK-10.patch b/debian/patches/lp-1782138-java-support-OpenJDK-10.patch
453new file mode 100644
454index 0000000..86a0d40
455--- /dev/null
456+++ b/debian/patches/lp-1782138-java-support-OpenJDK-10.patch
457@@ -0,0 +1,83 @@
458+From 662dc5d0bf65e72dab11aa58d4bc373b5a3b7e75 Mon Sep 17 00:00:00 2001
459+From: Pino Toscano <ptoscano@redhat.com>
460+Date: Fri, 4 May 2018 17:04:42 +0200
461+Subject: [PATCH] java: support OpenJDK 10+
462+
463+Starting OpenJDK 10, the 'javah' utility is no more provided [1], and
464+its functionality is provided by 'javac' itself. Hence, do not error
465+out on missing 'javah', and store whether it was found; in case it is
466+not, then:
467+1) assume 'javac' has the -h parameter to generate the C header, and
468+ make use of it
469+2) tell the buildsystem that com_redhat_et_libguestfs_GuestFS.h depends
470+ on the JAR, since the the header is generated at the step (1)
471+
472+[1] https://bugs.java.com/view_bug.do?bug_id=JDK-8182758
473+
474+Author: Christian Ehrhardt <christian.ehrhardt@canonical.com>
475+Original-Author: Pino Toscano <ptoscano@redhat.com>
476+Origin: backport, https://github.com/libguestfs/libguestfs/commit/662dc5d0bf65e72dab11aa58d4bc373b5a3b7e75
477+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1782138
478+Last-Update: 2018-06-18
479+---
480+ java/Makefile.am | 11 +++++++++++
481+ m4/guestfs-java.m4 | 5 ++---
482+ 2 files changed, 13 insertions(+), 3 deletions(-)
483+
484+diff --git a/java/Makefile.am b/java/Makefile.am
485+index 376d89d17..81c20f266 100644
486+--- a/java/Makefile.am
487++++ b/java/Makefile.am
488+@@ -77,6 +77,9 @@ if HAVE_JAVA
489+
490+ JAVAC_FLAGS = $(EXTRA_JAVAC_FLAGS) -encoding utf-8
491+ JAVADOC_FLAGS = -encoding utf-8
492++if !HAVE_JAVAH
493++JAVAC_FLAGS += -h .
494++endif
495+
496+ # Java source.
497+
498+@@ -125,10 +128,18 @@ libguestfs_jni_la_LDFLAGS = -version-info $(JNI_VERSION_INFO) -shared
499+
500+ BUILT_SOURCES = com_redhat_et_libguestfs_GuestFS.h
501+
502++if HAVE_JAVAH
503++
504+ com_redhat_et_libguestfs_GuestFS.h: $(java_prefix)/GuestFS.class
505+ rm -f $@
506+ $(JAVAH) -classpath $(srcdir):. com.redhat.et.libguestfs.GuestFS
507+
508++else
509++
510++com_redhat_et_libguestfs_GuestFS.h: libguestfs-${VERSION}.jar
511++
512++endif
513++
514+ # Documentation.
515+
516+ noinst_SCRIPTS = doc-stamp
517+diff --git a/m4/guestfs-java.m4 b/m4/guestfs-java.m4
518+index 9d0f948b6..daa5af32d 100644
519+--- a/m4/guestfs_java.m4
520++++ b/m4/guestfs_java.m4
521+@@ -73,9 +73,7 @@ if test "x$with_java" != "xno"; then
522+ else
523+ JAVAC="$JAVA/bin/javac"
524+ fi
525+- if test ! -x "$JAVA/bin/javah"; then
526+- AC_MSG_ERROR([missing $JAVA/bin/javah binary])
527+- else
528++ if test -x "$JAVA/bin/javah"; then
529+ JAVAH="$JAVA/bin/javah"
530+ fi
531+ if test ! -x "$JAVA/bin/javadoc"; then
532+@@ -165,4 +163,5 @@ if test "x$with_java" != "xno"; then
533+ AC_SUBST(JNI_VERSION_INFO)
534+ fi
535+
536++AM_CONDITIONAL([HAVE_JAVAH],[test -n "$JAVAH"])
537+ AM_CONDITIONAL([HAVE_JAVA],[test "x$with_java" != "xno" && test -n "$JAVAC"])
538+--
539+2.17.1
540+
541diff --git a/debian/patches/series b/debian/patches/series
542index e483a1c..ab5fdde 100644
543--- a/debian/patches/series
544+++ b/debian/patches/series
545@@ -8,3 +8,10 @@
546 0008-po-Don-t-fail-installation-if-parts-of-translated-do.patch
547 0009-Fix-sbin-reboot-requirements.patch
548 0010-Add-fdisk-to-appliance-list.patch
549+lp-1766534-s390x-1-6-launch-libvirt-Use-console-device-sclp-for-app.patch
550+lp-1766534-s390x-2-6-launch-direct-Use-sclp-as-serial-console-on-th.patch
551+lp-1766534-s390x-3-6-appliance-Use-dev-ttysclp0-for-serial-console.patch
552+lp-1766534-s390x-4-6-launch-direct-Use-virtio-ccw-on-this-architect.patch
553+lp-1766534-s390x-5-6-tests-regressions-Skip-IDE-tests-on-S-390.patch
554+lp-1766534-s390x-6-6-lib-Add-VIRTIO_DEVICE_NAME-macro-to-handle-virtio-mm.patch
555+lp-1782138-java-support-OpenJDK-10.patch

Subscribers

People subscribed via source and target branches