Skip to contentSkip to conversation

meson: Propagate gnutls dependency to migration

PATCH Superseded Jessica Clarke 4 participants 7 messages Mar 20, 2021 – Mar 24, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 meson: Propagate gnutls dependency to migration

Commit 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2 neglected to fix this for softmmu configs, which pull in migration's use of gnutls.

---
 migration/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/meson.build +1 -1
index 9645f44005..6fa2f8745d 100644
@@ -24,7 +24,7 @@ softmmu_ss.add(files(
   'savevm.c',
   'socket.c',
   'tls.c',
-))
+), gnutls)
 
 softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c'))
 softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c'))
Signature · 1 line
2.31.0
#1 lore raw
Quoted 14 lines · Jessica Clarke

Commit 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2 neglected to fix this for softmmu configs, which pull in migration's use of gnutls.

---
  migration/meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
migration/meson.build +0 -0
index 9645f44005..6fa2f8745d 100644

migration/meson.build softmmu_ss.add(files( · line 30

Quoted 8 lines
migration/meson.build +1 -1
@@ -24,7 +24,7 @@ softmmu_ss.add(files(
    'savevm.c',
    'socket.c',
    'tls.c',
-))
+), gnutls)
 
  softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c'))
  softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c'))

Hi, can you explain in the commit message the compilation failure that is being fixed here?

Paolo

#2 lore raw
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Jessica Clarke

Commit 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2 neglected to fix this for softmmu configs, which pull in migration's use of gnutls.

---
  migration/meson.build | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines

migration/meson.build softmmu_ss.add(files( · line 30

Quoted 13 lines
migration/meson.build +1 -1
index 9645f44005..6fa2f8745d 100644
@@ -24,7 +24,7 @@ softmmu_ss.add(files(
     'savevm.c',
     'socket.c',
     'tls.c',
-))
+), gnutls)
   softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c'))
   softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c'))
 

Hi, can you explain in the commit message the compilation failure that is being fixed here?

I suppose it's migration/tls.c?

Paolo

#3 lore raw

PATCH v2 1/1 meson: Propagate gnutls dependency to migration

In reply to Jessica Clarke

Commit 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2 neglected to fix this for softmmu configs, which pull in migration's use of gnutls.

This fixes the following compilation failure on Arm-based Macs:

In file included from migration/multifd.c:23:
In file included from migration/tls.h:25:
In file included from include/io/channel-tls.h:26:
In file included from include/crypto/tlssession.h:24:
include/crypto/tlscreds.h:28:10: fatal error: 'gnutls/gnutls.h' file not found

  #include <gnutls/gnutls.h>
           ^~~~~~~~~~~~~~~~~

1 error generated.

(as well as for channel.c and tls.c)

---
Changes in v2:
* Added error to commit message

 migration/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
migration/meson.build +1 -1
index 9645f44005..6fa2f8745d 100644
@@ -24,7 +24,7 @@ softmmu_ss.add(files(
   'savevm.c',
   'socket.c',
   'tls.c',
-))
+), gnutls)
 
 softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c'))
 softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c'))
Signature · 1 line
2.31.0
Reviewed-by on v2 1/1
#4 lore raw
Quoted 10 lines · Jessica Clarke

Commit 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2 neglected to fix this for softmmu configs, which pull in migration's use of gnutls.

This fixes the following compilation failure on Arm-based Macs:

In file included from migration/multifd.c:23:
In file included from migration/tls.h:25:
In file included from include/io/channel-tls.h:26:
In file included from include/crypto/tlssession.h:24:
include/crypto/tlscreds.h:28:10: fatal error: 'gnutls/gnutls.h' file not found

Quoted 7 lines
  #include <gnutls/gnutls.h>
           ^~~~~~~~~~~~~~~~~

1 error generated.

(as well as for channel.c and tls.c)

I would preffer to be the other way around, i.e. modularize tls out of migration, but a fast look at it shows it as a big job. As said on the commint message, channel.c & tls.c both use tls not conditionally. Once there, multifd.c also requires tls compiled in.
Can we realistically build qemu without tls nowadays?

Later, Juan.

#5 lore raw
Quoted 19 lines · Juan Quintela
Quoted 10 lines · Jessica Clarke

Commit 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2 neglected to fix this for softmmu configs, which pull in migration's use of gnutls.

This fixes the following compilation failure on Arm-based Macs:

In file included from migration/multifd.c:23:
In file included from migration/tls.h:25:
In file included from include/io/channel-tls.h:26:
In file included from include/crypto/tlssession.h:24:
include/crypto/tlscreds.h:28:10: fatal error: 'gnutls/gnutls.h' file not found

Quoted 7 lines
  #include <gnutls/gnutls.h>
           ^~~~~~~~~~~~~~~~~

1 error generated.

(as well as for channel.c and tls.c)

Quoted 7 lines

I would preffer to be the other way around, i.e. modularize tls out of migration, but a fast look at it shows it as a big job. As said on the commint message, channel.c & tls.c both use tls not conditionally. Once there, multifd.c also requires tls compiled in.
Can we realistically build qemu without tls nowadays?

The intention is that use of TLS is conditionalized *only* in the crypto/tls*.c and include/crypto/tls*.h files.

The rest of QEMU is supposed to use TLS unconditionally, and will simply get an error message at runtime if it was unavailable. This is precisely to avoid littering the whole codebase in QEMU with conditionals on GNUTLS.

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 :|
#6 lore raw
In reply to Jessica Clarke
Quoted 30 lines · Jessica Clarke

Commit 3eacf70bb5a83e4775ad8003cbca63a40f70c8c2 neglected to fix this for softmmu configs, which pull in migration's use of gnutls.

This fixes the following compilation failure on Arm-based Macs:

In file included from migration/multifd.c:23:
In file included from migration/tls.h:25:
In file included from include/io/channel-tls.h:26:
In file included from include/crypto/tlssession.h:24:
include/crypto/tlscreds.h:28:10: fatal error: 'gnutls/gnutls.h' file not found

   #include <gnutls/gnutls.h>
            ^~~~~~~~~~~~~~~~~

1 error generated.

(as well as for channel.c and tls.c)

---
Changes in v2:
* Added error to commit message

  migration/meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
migration/meson.build +0 -0
index 9645f44005..6fa2f8745d 100644

migration/meson.build softmmu_ss.add(files( · line 30

Quoted 8 lines
migration/meson.build +1 -1
@@ -24,7 +24,7 @@ softmmu_ss.add(files(
    'savevm.c',
    'socket.c',
    'tls.c',
-))
+), gnutls)
 
  softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c'))
  softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c'))

Queued, thanks.

Paolo