[libvirt PATCH 1/2] rpc: Drop support for portable-rpcgen

Andrea Bolognani posted 2 patches 2 years, 3 months ago
There is a newer version of this series
[libvirt PATCH 1/2] rpc: Drop support for portable-rpcgen
Posted by Andrea Bolognani 2 years, 3 months ago
We use the native version of rpcgen everywhere.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 meson.build            | 12 +-----------
 src/rpc/genprotocol.pl |  3 ---
 2 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/meson.build b/meson.build
index dc0969abcc..158a7cae01 100644
--- a/meson.build
+++ b/meson.build
@@ -779,14 +779,11 @@ endif
 required_programs = [
   'perl',
   'python3',
+  'rpcgen',
   'xmllint',
   'xsltproc',
 ]
 
-required_programs_groups = [
-  { 'name': 'rpcgen', 'prog': [ 'rpcgen', 'portable-rpcgen' ] },
-]
-
 if host_machine.system() == 'freebsd'
   required_programs += 'ifconfig'
 endif
@@ -798,13 +795,6 @@ foreach name : required_programs
   set_variable('@0@_prog'.format(varname), prog)
 endforeach
 
-foreach item : required_programs_groups
-  prog = find_program(item.get('prog'), dirs: libvirt_sbin_path)
-  varname = item.get('name').underscorify()
-  conf.set_quoted(varname.to_upper(), prog.full_path())
-  set_variable('@0@_prog'.format(varname), prog)
-endforeach
-
 # optional programs
 
 optional_programs = [
diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl
index adf3991d7a..6c664f48e7 100755
--- a/src/rpc/genprotocol.pl
+++ b/src/rpc/genprotocol.pl
@@ -39,9 +39,6 @@ my $target = shift;
 
 unlink $target;
 
-if ($rpcgen =~ /portable-rpcgen/) {
-    $rpcgen = "$rpcgen -o -";
-}
 open RPCGEN, "-|", "$rpcgen $mode $xdrdef"
     or die "cannot run $rpcgen $mode $xdrdef: $!";
 open TARGET, ">$target"
-- 
2.41.0
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [libvirt PATCH 1/2] rpc: Drop support for portable-rpcgen
Posted by Daniel P. Berrangé 2 years, 3 months ago
On Fri, Nov 03, 2023 at 12:37:17AM +0100, Andrea Bolognani wrote:
> We use the native version of rpcgen everywhere.

This is true of our CI systems, but not true of user
environments.

For our Mingw CI we're able to run the Linux native rpcgen
since we're cross compiling.

For someone using MSys to build natively for mingw, only
portablexdr-rpcgen will  be available, so we can't drop
this.

> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  meson.build            | 12 +-----------
>  src/rpc/genprotocol.pl |  3 ---
>  2 files changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index dc0969abcc..158a7cae01 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -779,14 +779,11 @@ endif
>  required_programs = [
>    'perl',
>    'python3',
> +  'rpcgen',
>    'xmllint',
>    'xsltproc',
>  ]
>  
> -required_programs_groups = [
> -  { 'name': 'rpcgen', 'prog': [ 'rpcgen', 'portable-rpcgen' ] },
> -]
> -
>  if host_machine.system() == 'freebsd'
>    required_programs += 'ifconfig'
>  endif
> @@ -798,13 +795,6 @@ foreach name : required_programs
>    set_variable('@0@_prog'.format(varname), prog)
>  endforeach
>  
> -foreach item : required_programs_groups
> -  prog = find_program(item.get('prog'), dirs: libvirt_sbin_path)
> -  varname = item.get('name').underscorify()
> -  conf.set_quoted(varname.to_upper(), prog.full_path())
> -  set_variable('@0@_prog'.format(varname), prog)
> -endforeach
> -
>  # optional programs
>  
>  optional_programs = [
> diff --git a/src/rpc/genprotocol.pl b/src/rpc/genprotocol.pl
> index adf3991d7a..6c664f48e7 100755
> --- a/src/rpc/genprotocol.pl
> +++ b/src/rpc/genprotocol.pl
> @@ -39,9 +39,6 @@ my $target = shift;
>  
>  unlink $target;
>  
> -if ($rpcgen =~ /portable-rpcgen/) {
> -    $rpcgen = "$rpcgen -o -";
> -}
>  open RPCGEN, "-|", "$rpcgen $mode $xdrdef"
>      or die "cannot run $rpcgen $mode $xdrdef: $!";
>  open TARGET, ">$target"
> -- 
> 2.41.0
> _______________________________________________
> Devel mailing list -- devel@lists.libvirt.org
> To unsubscribe send an email to devel-leave@lists.libvirt.org

With regards,
Daniel
-- 
|: 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 :|
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org
Re: [libvirt PATCH 1/2] rpc: Drop support for portable-rpcgen
Posted by Andrea Bolognani 2 years, 3 months ago
On Fri, Nov 03, 2023 at 08:55:27AM +0000, Daniel P. Berrangé wrote:
> On Fri, Nov 03, 2023 at 12:37:17AM +0100, Andrea Bolognani wrote:
> > We use the native version of rpcgen everywhere.
>
> This is true of our CI systems, but not true of user
> environments.
>
> For our Mingw CI we're able to run the Linux native rpcgen
> since we're cross compiling.
>
> For someone using MSys to build natively for mingw, only
> portablexdr-rpcgen will  be available, so we can't drop
> this.

I wonder how broken that setup is, given that it has zero CI
coverage.

Anyway, fair point, let's not go out of our way to break things :)

v2 here:

  https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/MLESRAKGTOW3DO5B3JFKDEYGN4JEFJ4M/

-- 
Andrea Bolognani / Red Hat / Virtualization
_______________________________________________
Devel mailing list -- devel@lists.libvirt.org
To unsubscribe send an email to devel-leave@lists.libvirt.org