Skip to contentSkip to conversation

meson: Build qemu-nbd on macOS again

PATCH In review Thomas Huth 4 participants 4 messages Aug 23, 2020 – Aug 24, 2020 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: Build qemu-nbd on macOS again

Before switching to the meson build system, we used to compile qemu-nbd for macOS, too, which is especially important for running the iotests there. Commit b7c70bf2c5 disabled it by accident, since it did not take into consideration that the $bsd variable in the configure script was also set to "yes" on macOS. Fix it by enabling qemu-nbd on all systems but Windows now instead (which was likely the original intention of the old code in the configure script).

Fixes b7c70bf2c5 ("meson: qemu-{img,io,nbd}")
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -1
index df5bf728b5..d79f849768 100644
@@ -1075,7 +1075,7 @@ if have_tools
   qemu_io = executable('qemu-io', files('qemu-io.c'),
              dependencies: [block, qemuutil], install: true)
   qemu_block_tools += [qemu_img, qemu_io]
-  if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd')
+  if targetos != 'windows'
     qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
                dependencies: [block, qemuutil], install: true)
     qemu_block_tools += [qemu_nbd]
Signature · 1 line
2.18.2
Reviewed-by on v1 1/1
#1 lore raw

Hi

Quoted 11 lines · Thomas Huth

Before switching to the meson build system, we used to compile qemu-nbd for macOS, too, which is especially important for running the iotests there. Commit b7c70bf2c5 disabled it by accident, since it did not take into consideration that the $bsd variable in the configure script was also set to "yes" on macOS. Fix it by enabling qemu-nbd on all systems but Windows now instead (which was likely the original intention of the old code in the configure script).

Fixes b7c70bf2c5 ("meson: qemu-{img,io,nbd}")

lgtm

Quoted 20 lines
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meson.build +1 -2
index df5bf728b5..d79f849768 100644
@@ -1075,7 +1075,7 @@ if have_tools
   qemu_io = executable('qemu-io', files('qemu-io.c'),
              dependencies: [block, qemuutil], install: true)
   qemu_block_tools += [qemu_img, qemu_io]
-  if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd')
+  if targetos != 'windows'
     qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
                dependencies: [block, qemuutil], install: true)
     qemu_block_tools += [qemu_nbd]
--

2.18.2

Acked-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 8 lines · Thomas Huth

Before switching to the meson build system, we used to compile qemu-nbd for macOS, too, which is especially important for running the iotests there. Commit b7c70bf2c5 disabled it by accident, since it did not take into consideration that the $bsd variable in the configure script was also set to "yes" on macOS. Fix it by enabling qemu-nbd on all systems but Windows now instead (which was likely the original intention of the old code in the configure script).

Quoted 5 lines
Fixes b7c70bf2c5 ("meson: qemu-{img,io,nbd}")
---
  meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

I can queue this through my NBD tree, although if there is a batch of meson fixes going in sooner than that, I don't mind if it goes there.

Quoted 15 lines
meson.build +1 -1
index df5bf728b5..d79f849768 100644
@@ -1075,7 +1075,7 @@ if have_tools
    qemu_io = executable('qemu-io', files('qemu-io.c'),
               dependencies: [block, qemuutil], install: true)
    qemu_block_tools += [qemu_img, qemu_io]
-  if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd')
+  if targetos != 'windows'
      qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
                 dependencies: [block, qemuutil], install: true)
      qemu_block_tools += [qemu_nbd]
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org
#3 lore raw
Quoted 15 lines · Eric Blake
Quoted 8 lines · Thomas Huth

Before switching to the meson build system, we used to compile qemu-nbd for macOS, too, which is especially important for running the iotests there. Commit b7c70bf2c5 disabled it by accident, since it did not take into consideration that the $bsd variable in the configure script was also set to "yes" on macOS. Fix it by enabling qemu-nbd on all systems but Windows now instead (which was likely the original intention of the old code in the configure script).

Quoted 5 lines
Fixes b7c70bf2c5 ("meson: qemu-{img,io,nbd}")
---
  meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 4 lines

I can queue this through my NBD tree, although if there is a batch of meson fixes going in sooner than that, I don't mind if it goes there.

FYI, it is pretty trivial to enable building of qemu-nbd.exe on Windows, which eanbles the conditional to be removed from meson entirely. I've just CC you a series todo that.

Quoted 23 lines
Quoted 16 lines
meson.build +1 -1
index df5bf728b5..d79f849768 100644
@@ -1075,7 +1075,7 @@ if have_tools
    qemu_io = executable('qemu-io', files('qemu-io.c'),
               dependencies: [block, qemuutil], install: true)
    qemu_block_tools += [qemu_img, qemu_io]
-  if targetos == 'linux' or targetos == 'sunos' or targetos.endswith('bsd')
+  if targetos != 'windows'
      qemu_nbd = executable('qemu-nbd', files('qemu-nbd.c'),
                 dependencies: [block, qemuutil], install: true)
      qemu_block_tools += [qemu_nbd]
Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|