diff mbox series

meson.build: Disallow libnfs v6 to fix the broken macOS build

Message ID 20241218065157.209020-1-thuth@redhat.com (mailing list archive)
State New
Headers show
Series meson.build: Disallow libnfs v6 to fix the broken macOS build | expand

Commit Message

Thomas Huth Dec. 18, 2024, 6:51 a.m. UTC
The macOS build in our CI is currently broken since homebrew
updated libnfs to version 6 - and that version apparently comes
with a big API breakage. Disallow that version for now to get the
broken CI job working again. Once somebody had enough time to
adapt our code in block/nfs.c, we can revert this change again.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Dec. 18, 2024, 10:31 a.m. UTC | #1
On 18/12/24 07:51, Thomas Huth wrote:
> The macOS build in our CI is currently broken since homebrew
> updated libnfs to version 6 - and that version apparently comes
> with a big API breakage. Disallow that version for now to get the
> broken CI job working again. Once somebody had enough time to
> adapt our code in block/nfs.c, we can revert this change again.

Correct. Maybe mention:

"v5.0.3 is the final release of the old API." [*]

[*] https://github.com/sahlberg/libnfs/commit/4379837

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   meson.build | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 85f7485473..6149b50db2 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1145,7 +1145,7 @@ endif
>   
>   libnfs = not_found
>   if not get_option('libnfs').auto() or have_block
> -  libnfs = dependency('libnfs', version: '>=1.9.3',
> +  libnfs = dependency('libnfs', version: ['>=1.9.3', '<6.0.0'],
>                         required: get_option('libnfs'),
>                         method: 'pkg-config')
>   endif

Per https://github.com/sahlberg/libnfs/commit/976a9ae we'll
need to check for LIBNFS_API_V2 and adapt API calls...
Daniel P. Berrangé Dec. 18, 2024, 10:40 a.m. UTC | #2
On Wed, Dec 18, 2024 at 07:51:57AM +0100, Thomas Huth wrote:
> The macOS build in our CI is currently broken since homebrew
> updated libnfs to version 6 - and that version apparently comes
> with a big API breakage. Disallow that version for now to get the
> broken CI job working again. Once somebody had enough time to
> adapt our code in block/nfs.c, we can revert this change again.

NB This isn't limited to macOS. We've already been broken by
this in Fedora:

  https://lists.nongnu.org/archive/html/qemu-block/2024-12/msg00151.html

other distros will no doubt break too soon enough.

> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  meson.build | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


> 
> diff --git a/meson.build b/meson.build
> index 85f7485473..6149b50db2 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1145,7 +1145,7 @@ endif
>  
>  libnfs = not_found
>  if not get_option('libnfs').auto() or have_block
> -  libnfs = dependency('libnfs', version: '>=1.9.3',
> +  libnfs = dependency('libnfs', version: ['>=1.9.3', '<6.0.0'],
>                        required: get_option('libnfs'),
>                        method: 'pkg-config')
>  endif
> -- 
> 2.47.1
> 

With regards,
Daniel
Thomas Huth Dec. 18, 2024, 10:45 a.m. UTC | #3
On 18/12/2024 11.40, Daniel P. Berrangé wrote:
> On Wed, Dec 18, 2024 at 07:51:57AM +0100, Thomas Huth wrote:
>> The macOS build in our CI is currently broken since homebrew
>> updated libnfs to version 6 - and that version apparently comes
>> with a big API breakage. Disallow that version for now to get the
>> broken CI job working again. Once somebody had enough time to
>> adapt our code in block/nfs.c, we can revert this change again.
> 
> NB This isn't limited to macOS. We've already been broken by
> this in Fedora:
> 
>    https://lists.nongnu.org/archive/html/qemu-block/2024-12/msg00151.html
> 
> other distros will no doubt break too soon enough.

Ah, that discussion was on qemu-block, not on qemu-devel, that's why I 
didn't notice it :-/ Thanks for the pointer!

  Thomas
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index 85f7485473..6149b50db2 100644
--- a/meson.build
+++ b/meson.build
@@ -1145,7 +1145,7 @@  endif
 
 libnfs = not_found
 if not get_option('libnfs').auto() or have_block
-  libnfs = dependency('libnfs', version: '>=1.9.3',
+  libnfs = dependency('libnfs', version: ['>=1.9.3', '<6.0.0'],
                       required: get_option('libnfs'),
                       method: 'pkg-config')
 endif