[virt-tools-list] [PATCH virt-viewer 1/3] build: Update govirt and rest requirements

Christophe Fergeau cfergeau at redhat.com
Tue Jul 17 14:14:00 UTC 2018


On Fri, Jul 06, 2018 at 09:59:21AM -0300, Eduardo Lima (Etrunko) wrote:
> With these new values, 0.3.3 for libgovirt and 0.8 for librest, we can
> remove checks for OVIRT_REST_CALL_ERROR_CANCELLED and correspondent
> rest_proxy_auth_cancel().

With such commits, it's always useful to mention the versions used by
various distros. In that case, all supported fedoras have these, rhel
7.5/7.4 have these too. Ubuntu 16.04 LTS only has librest 0.7.93 though
(17.10 has 0.8.0), but I would say that's ok if we don't get libgovirt
support there. Did not check other distros..

Acked-by: Christophe Fergeau <cfergeau at redhat.com>

> 
> Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
> ---
>  configure.ac        | 11 ++++-------
>  src/remote-viewer.c |  4 ----
>  2 files changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index e262e31..8c334b5 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -26,7 +26,8 @@ LIBVIRT_GLIB_REQUIRED="0.1.8"
>  GTK_VNC_REQUIRED="0.4.0"
>  SPICE_GTK_REQUIRED="0.33"
>  SPICE_PROTOCOL_REQUIRED="0.12.7"
> -GOVIRT_REQUIRED="0.3.2"
> +GOVIRT_REQUIRED="0.3.3"
> +REST_REQUIRED="0.8"
>  
>  AC_SUBST([GLIB2_REQUIRED])
>  AC_SUBST([LIBXML2_REQUIRED])
> @@ -37,6 +38,7 @@ AC_SUBST([GTK_VNC_REQUIRED])
>  AC_SUBST([SPICE_GTK_REQUIRED])
>  AC_SUBST([SPICE_PROTOCOL_REQUIRED])
>  AC_SUBST([GOVIRT_REQUIRED])
> +AC_SUBST([REST_REQUIRED])
>  
>  AC_MSG_CHECKING([for native Win32])
>  case "$host_os" in
> @@ -178,17 +180,12 @@ AS_IF([test "x$with_ovirt" != "xno" && test "x$with_ovirt" != "xyes"],
>                          [with_ovirt=yes], [with_ovirt=no])])
>  
>  AS_IF([test "x$with_ovirt" = "xyes"],
> -      [PKG_CHECK_MODULES([OVIRT], [govirt-1.0 >= $GOVIRT_REQUIRED])]
> +      [PKG_CHECK_MODULES([OVIRT], [govirt-1.0 >= $GOVIRT_REQUIRED rest-0.7 >= REST_REQUIRED])]
>        [AC_DEFINE([HAVE_OVIRT], 1, [Have libgovirt?])]
>        [SAVED_CFLAGS="$CFLAGS"
>         SAVED_LIBS="$LIBS"
>         CFLAGS="$OVIRT_CFLAGS"
>         LIBS="$OVIRT_LIBS"
> -       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <govirt/govirt.h>]],
> -        [static int err = OVIRT_REST_CALL_ERROR_CANCELLED;
> -         void *fun = rest_proxy_auth_cancel;])],
> -        [AC_DEFINE([HAVE_OVIRT_CANCEL], 1, [Have rest_proxy_auth_cancel and OVIRT_REST_CALL_ERROR_CANCELLED?])],
> -        [])
>         AC_CHECK_FUNCS([ovirt_api_search_vms ovirt_vm_get_host ovirt_host_get_cluster ovirt_cluster_get_data_center],
>                        [AC_DEFINE([HAVE_OVIRT_DATA_CENTER], 1, [Have support for data center])],
>                        []
> diff --git a/src/remote-viewer.c b/src/remote-viewer.c
> index c52d20f..4e1021b 100644
> --- a/src/remote-viewer.c
> +++ b/src/remote-viewer.c
> @@ -345,10 +345,8 @@ authenticate_cb(RestProxy *proxy, G_GNUC_UNUSED RestProxyAuth *auth,
>                       "username", username,
>                       "password", password,
>                       NULL);
> -#ifdef HAVE_OVIRT_CANCEL
>      } else {
>          rest_proxy_auth_cancel(auth);
> -#endif
>      }
>  
>      g_free(username);
> @@ -447,14 +445,12 @@ create_ovirt_session(VirtViewerApp *app, const char *uri, GError **err)
>      api = ovirt_proxy_fetch_api(proxy, &error);
>      if (error != NULL) {
>          g_debug("failed to get oVirt 'api' collection: %s", error->message);
> -#ifdef HAVE_OVIRT_CANCEL
>          if (g_error_matches(error, OVIRT_REST_CALL_ERROR, OVIRT_REST_CALL_ERROR_CANCELLED)) {
>              g_clear_error(&error);
>              g_set_error_literal(&error,
>                                  VIRT_VIEWER_ERROR, VIRT_VIEWER_ERROR_CANCELLED,
>                                  _("Authentication was cancelled"));
>          }
> -#endif
>          goto error;
>      }
>      vms = ovirt_api_get_vms(api);
> -- 
> 2.14.4
> 
> _______________________________________________
> virt-tools-list mailing list
> virt-tools-list at redhat.com
> https://www.redhat.com/mailman/listinfo/virt-tools-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20180717/442fac75/attachment.sig>


More information about the virt-tools-list mailing list