Compare commits

...

No commits in common. "c8" and "33a7444562cb9a9f217351d3f0e1d4526d7d75a6" have entirely different histories.

9 changed files with 1 additions and 856 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
SOURCES/etrunko-57E1C130.keyring
SOURCES/libgovirt-0.3.7.tar.xz

View File

@ -1,2 +0,0 @@
02aa42ef9a871442537195bc02cf9a6bf318e41d SOURCES/etrunko-57E1C130.keyring
330fc329c88d034bf9134538f9d89c9be8110d52 SOURCES/libgovirt-0.3.7.tar.xz

View File

@ -1,406 +0,0 @@
From 91089ba30f2345ee14be676ca8b7465d6f29871a Mon Sep 17 00:00:00 2001
From: "Eduardo Lima (Etrunko)" <etrunko@redhat.com>
Date: Tue, 16 Jun 2020 13:37:36 -0300
Subject: [PATCH] Initial support for Disks
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
---
govirt/Makefile.am | 3 +
govirt/govirt-private.h | 1 +
govirt/govirt.h | 1 +
govirt/govirt.sym | 6 ++
govirt/meson.build | 3 +
govirt/ovirt-disk-private.h | 37 +++++++++
govirt/ovirt-disk.c | 144 ++++++++++++++++++++++++++++++++++++
govirt/ovirt-disk.h | 76 +++++++++++++++++++
govirt/ovirt-types.h | 1 +
9 files changed, 272 insertions(+)
create mode 100644 govirt/ovirt-disk-private.h
create mode 100644 govirt/ovirt-disk.c
create mode 100644 govirt/ovirt-disk.h
diff --git a/govirt/Makefile.am b/govirt/Makefile.am
index 0ce276d..f7ab835 100644
--- a/govirt/Makefile.am
+++ b/govirt/Makefile.am
@@ -21,6 +21,7 @@ libgovirt_la_HEADERS = \
ovirt-cluster.h \
ovirt-collection.h \
ovirt-data-center.h \
+ ovirt-disk.h \
ovirt-error.h \
ovirt-host.h \
ovirt-options.h \
@@ -41,6 +42,7 @@ noinst_HEADERS = \
ovirt-cluster-private.h \
ovirt-collection-private.h \
ovirt-data-center-private.h \
+ ovirt-disk-private.h \
ovirt-host-private.h \
ovirt-proxy-private.h \
ovirt-resource-private.h \
@@ -58,6 +60,7 @@ libgovirt_la_SOURCES = \
ovirt-cluster.c \
ovirt-collection.c \
ovirt-data-center.c \
+ ovirt-disk.c \
ovirt-error.c \
ovirt-host.c \
ovirt-options.c \
diff --git a/govirt/govirt-private.h b/govirt/govirt-private.h
index 2c0e30f..f5cf721 100644
--- a/govirt/govirt-private.h
+++ b/govirt/govirt-private.h
@@ -27,6 +27,7 @@
#include <govirt/ovirt-cluster-private.h>
#include <govirt/ovirt-collection-private.h>
#include <govirt/ovirt-data-center-private.h>
+#include <govirt/ovirt-disk-private.h>
#include <govirt/ovirt-enum-types-private.h>
#include <govirt/ovirt-host-private.h>
#include <govirt/ovirt-proxy-private.h>
diff --git a/govirt/govirt.h b/govirt/govirt.h
index 9c92318..8eab984 100644
--- a/govirt/govirt.h
+++ b/govirt/govirt.h
@@ -28,6 +28,7 @@
#include <govirt/ovirt-cluster.h>
#include <govirt/ovirt-collection.h>
#include <govirt/ovirt-data-center.h>
+#include <govirt/ovirt-disk.h>
#include <govirt/ovirt-error.h>
#include <govirt/ovirt-host.h>
#include <govirt/ovirt-options.h>
diff --git a/govirt/govirt.sym b/govirt/govirt.sym
index 0d488e6..1cc2a8e 100644
--- a/govirt/govirt.sym
+++ b/govirt/govirt.sym
@@ -141,4 +141,10 @@ GOVIRT_0.4.0 {
ovirt_vm_get_host;
ovirt_vm_get_cluster;
} GOVIRT_0.3.4;
+
+GOVIRT_0.4.1 {
+ ovirt_disk_get_type;
+ ovirt_disk_content_type_get_type;
+ ovirt_disk_new;
+} GOVIRT_0.4.0;
# .... define new API here using predicted next version number ....
diff --git a/govirt/meson.build b/govirt/meson.build
index bec7781..778e5c0 100644
--- a/govirt/meson.build
+++ b/govirt/meson.build
@@ -7,6 +7,7 @@ govirt_headers = [
'ovirt-cluster.h',
'ovirt-collection.h',
'ovirt-data-center.h',
+ 'ovirt-disk.h',
'ovirt-error.h',
'ovirt-host.h',
'ovirt-options.h',
@@ -34,6 +35,7 @@ govirt_private_headers = [
'ovirt-cluster-private.h',
'ovirt-collection-private.h',
'ovirt-data-center-private.h',
+ 'ovirt-disk-private.h',
'ovirt-host-private.h',
'ovirt-proxy-private.h',
'ovirt-resource-private.h',
@@ -58,6 +60,7 @@ govirt_sources = [
'ovirt-cluster.c',
'ovirt-collection.c',
'ovirt-data-center.c',
+ 'ovirt-disk.c',
'ovirt-error.c',
'ovirt-host.c',
'ovirt-options.c',
diff --git a/govirt/ovirt-disk-private.h b/govirt/ovirt-disk-private.h
new file mode 100644
index 0000000..d9fff3f
--- /dev/null
+++ b/govirt/ovirt-disk-private.h
@@ -0,0 +1,37 @@
+/*
+ * ovirt-disk-private.h: oVirt disk resource
+ *
+ * Copyright (C) 2020 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Author: Eduardo Lima (Etrunko) <etrunko@redhat.com>
+ */
+#ifndef __OVIRT_DISK_PRIVATE_H__
+#define __OVIRT_DISK_PRIVATE_H__
+
+#include <govirt/ovirt-disk.h>
+#include <rest/rest-xml-node.h>
+
+G_BEGIN_DECLS
+
+OvirtDisk *ovirt_disk_new_from_id(const char *id,
+ const char *href);
+OvirtDisk *ovirt_disk_new_from_xml(RestXmlNode *node,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* __OVIRT_DISK_PRIVATE_H__ */
diff --git a/govirt/ovirt-disk.c b/govirt/ovirt-disk.c
new file mode 100644
index 0000000..9242c4c
--- /dev/null
+++ b/govirt/ovirt-disk.c
@@ -0,0 +1,144 @@
+/*
+ * ovirt-disk.c: oVirt disk handling
+ *
+ * Copyright (C) 2020 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Author: Eduardo Lima (Etrunko) <etrunko@redhat.com>
+ */
+
+#include <config.h>
+#include "ovirt-enum-types.h"
+#include "ovirt-disk.h"
+#include "govirt-private.h"
+
+struct _OvirtDiskPrivate {
+ OvirtDiskContentType content_type;
+};
+
+G_DEFINE_TYPE_WITH_PRIVATE(OvirtDisk, ovirt_disk, OVIRT_TYPE_RESOURCE);
+
+enum {
+ PROP_0,
+ PROP_CONTENT_TYPE,
+};
+
+static void ovirt_disk_get_property(GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ OvirtDisk *disk = OVIRT_DISK(object);
+
+ switch (prop_id) {
+ case PROP_CONTENT_TYPE:
+ g_value_set_enum(value, disk->priv->content_type);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
+}
+
+static void ovirt_disk_set_property(GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ OvirtDisk *disk = OVIRT_DISK(object);
+
+ switch (prop_id) {
+ case PROP_CONTENT_TYPE:
+ disk->priv->content_type = g_value_get_enum(value);
+ break;
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
+ break;
+ }
+}
+
+static gboolean ovirt_disk_init_from_xml(OvirtResource *resource,
+ RestXmlNode *node,
+ GError **error)
+{
+ gboolean parsed_ok;
+ OvirtResourceClass *parent_class;
+ OvirtXmlElement disk_elements[] = {
+ { .prop_name = "content_type",
+ .xml_path = "content_type",
+ },
+ { NULL , }
+ };
+
+ parsed_ok = ovirt_rest_xml_node_parse(node, G_OBJECT(resource), disk_elements);
+ if (!parsed_ok) {
+ return FALSE;
+ }
+ parent_class = OVIRT_RESOURCE_CLASS(ovirt_disk_parent_class);
+
+ return parent_class->init_from_xml(resource, node, error);
+}
+
+static void ovirt_disk_class_init(OvirtDiskClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS(klass);
+ OvirtResourceClass *resource_class = OVIRT_RESOURCE_CLASS(klass);
+ GParamSpec *param_spec;
+
+ resource_class->init_from_xml = ovirt_disk_init_from_xml;
+
+ object_class->get_property = ovirt_disk_get_property;
+ object_class->set_property = ovirt_disk_set_property;
+
+ param_spec = g_param_spec_enum("type",
+ "Content Type",
+ "The actual content residing on the disk",
+ OVIRT_TYPE_DISK_CONTENT_TYPE,
+ OVIRT_DISK_CONTENT_TYPE_DATA,
+ G_PARAM_READWRITE |
+ G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property(object_class,
+ PROP_CONTENT_TYPE,
+ param_spec);
+}
+
+
+static void ovirt_disk_init(OvirtDisk *disk)
+{
+ disk->priv = ovirt_disk_get_instance_private(disk);
+}
+
+G_GNUC_INTERNAL
+OvirtDisk *ovirt_disk_new_from_id(const char *id,
+ const char *href)
+{
+ OvirtResource *disk = ovirt_resource_new_from_id(OVIRT_TYPE_DISK, id, href);
+ return OVIRT_DISK(disk);
+}
+
+G_GNUC_INTERNAL
+OvirtDisk *ovirt_disk_new_from_xml(RestXmlNode *node,
+ GError **error)
+{
+ OvirtResource *disk = ovirt_resource_new_from_xml(OVIRT_TYPE_DISK, node, error);
+ return OVIRT_DISK(disk);
+}
+
+OvirtDisk *ovirt_disk_new(void)
+{
+ OvirtResource *disk = ovirt_resource_new(OVIRT_TYPE_DISK);
+ return OVIRT_DISK(disk);
+}
diff --git a/govirt/ovirt-disk.h b/govirt/ovirt-disk.h
new file mode 100644
index 0000000..a0bdd5a
--- /dev/null
+++ b/govirt/ovirt-disk.h
@@ -0,0 +1,76 @@
+/*
+ * ovirt-disk.h: oVirt disk resource
+ *
+ * Copyright (C) 2020 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Author: Eduardo Lima (Etrunko) <etrunko@redhat.com>
+ */
+#ifndef __OVIRT_DISK_H__
+#define __OVIRT_DISK_H__
+
+#include <gio/gio.h>
+#include <glib-object.h>
+#include <govirt/ovirt-resource.h>
+#include <govirt/ovirt-types.h>
+
+G_BEGIN_DECLS
+
+#define OVIRT_TYPE_DISK (ovirt_disk_get_type ())
+#define OVIRT_DISK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), OVIRT_TYPE_DISK, OvirtDisk))
+#define OVIRT_DISK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), OVIRT_TYPE_DISK, OvirtDiskClass))
+#define OVIRT_IS_DISK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OVIRT_TYPE_DISK))
+#define OVIRT_IS_DISK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), OVIRT_TYPE_DISK))
+#define OVIRT_DISK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), OVIRT_TYPE_DISK, OvirtDiskClass))
+
+typedef enum {
+ OVIRT_DISK_CONTENT_TYPE_DATA,
+ OVIRT_DISK_CONTENT_TYPE_HOSTED_ENGINE,
+ OVIRT_DISK_CONTENT_TYPE_HOSTED_ENGINE_CONFIGURATION,
+ OVIRT_DISK_CONTENT_TYPE_HOSTED_ENGINE_METADATA,
+ OVIRT_DISK_CONTENT_TYPE_HOSTED_ENGINE_SANLOCK,
+ OVIRT_DISK_CONTENT_TYPE_ISO,
+ OVIRT_DISK_CONTENT_TYPE_MEMORY_DUMP_VOLUME,
+ OVIRT_DISK_CONTENT_TYPE_METADATA_VOLUME,
+ OVIRT_DISK_CONTENT_TYPE_OVF_STORE,
+} OvirtDiskContentType;
+
+typedef struct _OvirtDiskPrivate OvirtDiskPrivate;
+typedef struct _OvirtDiskClass OvirtDiskClass;
+
+struct _OvirtDisk
+{
+ OvirtResource parent;
+
+ OvirtDiskPrivate *priv;
+
+ /* Do not add fields to this struct */
+};
+
+struct _OvirtDiskClass
+{
+ OvirtResourceClass parent_class;
+
+ gpointer padding[20];
+};
+
+GType ovirt_disk_get_type(void);
+
+OvirtDisk *ovirt_disk_new(void);
+
+G_END_DECLS
+
+#endif /* __OVIRT_DISK_H__ */
diff --git a/govirt/ovirt-types.h b/govirt/ovirt-types.h
index eb85fd6..3c05d36 100644
--- a/govirt/ovirt-types.h
+++ b/govirt/ovirt-types.h
@@ -29,6 +29,7 @@ typedef struct _OvirtApi OvirtApi;
typedef struct _OvirtCdrom OvirtCdrom;
typedef struct _OvirtCluster OvirtCluster;
typedef struct _OvirtCollection OvirtCollection;
+typedef struct _OvirtDisk OvirtDisk;
typedef struct _OvirtDataCenter OvirtDataCenter;
typedef struct _OvirtHost OvirtHost;
typedef struct _OvirtProxy OvirtProxy;
--
2.26.2

View File

@ -1,93 +0,0 @@
From 8ab1be89c70d0f6454e74442d382b9ea55f1df58 Mon Sep 17 00:00:00 2001
From: "Eduardo Lima (Etrunko)" <etrunko@redhat.com>
Date: Tue, 16 Jun 2020 10:07:49 -0300
Subject: [PATCH] ovirt-storage-domain: Introduce
ovirt_storage_domain_get_disks()
This function is used to return the list of disks in a given storage
domain with DATA type.
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
---
govirt/govirt.sym | 2 ++
govirt/ovirt-storage-domain.c | 28 ++++++++++++++++++++++++++++
govirt/ovirt-storage-domain.h | 1 +
3 files changed, 31 insertions(+)
diff --git a/govirt/govirt.sym b/govirt/govirt.sym
index 1cc2a8e..4cd6bb8 100644
--- a/govirt/govirt.sym
+++ b/govirt/govirt.sym
@@ -146,5 +146,7 @@ GOVIRT_0.4.1 {
ovirt_disk_get_type;
ovirt_disk_content_type_get_type;
ovirt_disk_new;
+
+ ovirt_storage_domain_get_disks;
} GOVIRT_0.4.0;
# .... define new API here using predicted next version number ....
diff --git a/govirt/ovirt-storage-domain.c b/govirt/ovirt-storage-domain.c
index a713d89..d02c3d5 100644
--- a/govirt/ovirt-storage-domain.c
+++ b/govirt/ovirt-storage-domain.c
@@ -27,6 +27,7 @@
struct _OvirtStorageDomainPrivate {
OvirtCollection *files;
+ OvirtCollection *disks;
GStrv data_center_ids;
gchar *data_center_href;
@@ -172,6 +173,7 @@ ovirt_storage_domain_dispose(GObject *obj)
OvirtStorageDomain *domain = OVIRT_STORAGE_DOMAIN(obj);
g_clear_object(&domain->priv->files);
+ g_clear_object(&domain->priv->disks);
g_clear_pointer(&domain->priv->data_center_ids, g_strfreev);
g_clear_pointer(&domain->priv->data_center_href, g_free);
g_clear_pointer(&domain->priv->data_center_id, g_free);
@@ -399,3 +401,29 @@ OvirtCollection *ovirt_storage_domain_get_files(OvirtStorageDomain *domain)
return domain->priv->files;
}
+
+/**
+ * ovirt_storage_domain_get_disks:
+ * @domain: a #OvirtStorageDomain
+ *
+ * Gets a #OvirtCollection representing the list of remote disks from a
+ * storage domain object. This method does not initiate any network
+ * activity, the remote file list must be then be fetched using
+ * ovirt_collection_fetch() or ovirt_collection_fetch_async().
+ *
+ * Return value: (transfer none): a #OvirtCollection representing the list
+ * of disks associated with @domain.
+ */
+OvirtCollection *ovirt_storage_domain_get_disks(OvirtStorageDomain *domain)
+{
+ g_return_val_if_fail(OVIRT_IS_STORAGE_DOMAIN(domain), NULL);
+
+ if (domain->priv->disks == NULL)
+ domain->priv->disks = ovirt_sub_collection_new_from_resource(OVIRT_RESOURCE(domain),
+ "disks",
+ "disks",
+ OVIRT_TYPE_DISK,
+ "disk");
+
+ return domain->priv->disks;
+}
diff --git a/govirt/ovirt-storage-domain.h b/govirt/ovirt-storage-domain.h
index f122e27..97cfb06 100644
--- a/govirt/ovirt-storage-domain.h
+++ b/govirt/ovirt-storage-domain.h
@@ -86,6 +86,7 @@ GType ovirt_storage_domain_get_type(void);
OvirtStorageDomain *ovirt_storage_domain_new(void);
OvirtCollection *ovirt_storage_domain_get_files(OvirtStorageDomain *domain);
+OvirtCollection *ovirt_storage_domain_get_disks(OvirtStorageDomain *domain);
G_END_DECLS
--
2.26.2

View File

@ -1,40 +0,0 @@
From f49fb13abcc7d0c2fb8a2551913d9d5997997487 Mon Sep 17 00:00:00 2001
From: "Eduardo Lima (Etrunko)" <etrunko@redhat.com>
Date: Thu, 25 Jun 2020 13:39:50 -0300
Subject: [PATCH] ovirt-disk: Fix content type property name
Instead of using underscore, which is not accepted, make use of a dash,
avoiding error messages like the following:
GLib-CRITICAL **: g_param_spec_internal: assertion '!(flags & G_PARAM_STATIC_NAME) || is_canonical (name)' failed
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
---
govirt/ovirt-disk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/govirt/ovirt-disk.c b/govirt/ovirt-disk.c
index 9242c4c..4772002 100644
--- a/govirt/ovirt-disk.c
+++ b/govirt/ovirt-disk.c
@@ -77,7 +77,7 @@ static gboolean ovirt_disk_init_from_xml(OvirtResource *resource,
gboolean parsed_ok;
OvirtResourceClass *parent_class;
OvirtXmlElement disk_elements[] = {
- { .prop_name = "content_type",
+ { .prop_name = "content-type",
.xml_path = "content_type",
},
{ NULL , }
@@ -103,7 +103,7 @@ static void ovirt_disk_class_init(OvirtDiskClass *klass)
object_class->get_property = ovirt_disk_get_property;
object_class->set_property = ovirt_disk_set_property;
- param_spec = g_param_spec_enum("type",
+ param_spec = g_param_spec_enum("content-type",
"Content Type",
"The actual content residing on the disk",
OVIRT_TYPE_DISK_CONTENT_TYPE,
--
2.26.2

View File

@ -1,77 +0,0 @@
From cb052b5df117e4d3d90fd0f7ee70d0e428d46250 Mon Sep 17 00:00:00 2001
From: "Eduardo Lima (Etrunko)" <etrunko@redhat.com>
Date: Tue, 22 Dec 2020 08:53:16 -0300
Subject: [PATCH] proxy: Fix error handling
Error returned by the task must be freed by the caller of the function.
This avoids a double-free scenario, as reported by valgrind:
Invalid free() / delete / delete[] / realloc()
at 0x483A9F5: free (vg_replace_malloc.c:538)
by 0x5A4C45C: g_free (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x5A6673F: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x5A2CC09: g_clear_error (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x56F43B7: rest_call_async_set_error (ovirt-proxy.c:245)
by 0x56F451A: call_async_cb (ovirt-proxy.c:265)
by 0x571AFC3: ??? (in /usr/lib64/librest-0.7.so.0.0.0)
by 0x5789593: ??? (in /usr/lib64/libsoup-2.4.so.1.11.0)
by 0x5789B82: ??? (in /usr/lib64/libsoup-2.4.so.1.11.0)
by 0x5789CD5: ??? (in /usr/lib64/libsoup-2.4.so.1.11.0)
by 0x5A468AA: ??? (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x5A477EE: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.6600.3)
Address 0x17d731b0 is 0 bytes inside a block of size 16 free'd
at 0x483A9F5: free (vg_replace_malloc.c:538)
by 0x5A4C45C: g_free (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x5A6673F: g_slice_free1 (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x5A2CC09: g_clear_error (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x43115A: ovirt_foreign_menu_iso_name_changed (remote-viewer-iso-list-dialog.c:358)
by 0x587A349: ??? (in /usr/lib64/libgio-2.0.so.0.6600.3)
by 0x587A58A: ??? (in /usr/lib64/libgio-2.0.so.0.6600.3)
by 0x4302F7: iso_name_set_cb (ovirt-foreign-menu.c:423)
by 0x587A349: ??? (in /usr/lib64/libgio-2.0.so.0.6600.3)
by 0x587A58A: ??? (in /usr/lib64/libgio-2.0.so.0.6600.3)
by 0x56F43AF: rest_call_async_set_error (ovirt-proxy.c:244)
by 0x56F451A: call_async_cb (ovirt-proxy.c:265)
Block was alloc'd at
at 0x4839809: malloc (vg_replace_malloc.c:307)
by 0x5A4F908: g_malloc (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x5A671C1: g_slice_alloc (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x5A33286: g_error_new_valist (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x5A3348E: g_set_error (in /usr/lib64/libglib-2.0.so.0.6600.3)
by 0x56FB4D5: ovirt_utils_gerror_from_xml_fault (ovirt-utils.c:368)
by 0x56F4356: rest_call_async_set_error (ovirt-proxy.c:242)
by 0x56F451A: call_async_cb (ovirt-proxy.c:265)
by 0x571AFC3: ??? (in /usr/lib64/librest-0.7.so.0.0.0)
by 0x5789593: ??? (in /usr/lib64/libsoup-2.4.so.1.11.0)
by 0x5789B82: ??? (in /usr/lib64/libsoup-2.4.so.1.11.0)
by 0x5789CD5: ??? (in /usr/lib64/libsoup-2.4.so.1.11.0)
Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
---
govirt/ovirt-proxy.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/govirt/ovirt-proxy.c b/govirt/ovirt-proxy.c
index e2d2e5c..1cf1ebf 100644
--- a/govirt/ovirt-proxy.c
+++ b/govirt/ovirt-proxy.c
@@ -242,7 +242,6 @@ static void rest_call_async_set_error(RestProxyCall *call, GTask *task, const GE
if (root != NULL && ovirt_utils_gerror_from_xml_fault(root, &local_error)) {
g_debug("ovirt_rest_call_async(): %s", local_error->message);
g_task_return_error(task, local_error);
- g_clear_error(&local_error);
} else {
g_task_return_error(task, (GError *) error);
}
@@ -272,7 +271,7 @@ call_async_cb(RestProxyCall *call, const GError *error,
data->call_user_data,
&call_error);
if (call_error != NULL) {
- rest_call_async_set_error(call, task, error);
+ rest_call_async_set_error(call, task, call_error);
goto exit;
}
}
--
2.29.2

View File

@ -1,16 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE4xpvoP+E+QECAZoTZjjqrFfhwTAFAl40aXYACgkQZjjqrFfh
wTDMEw//e+DcgiVmPjEPgDlTwbLDLfCFfPwT9T58/M4fOMiYjaaoIjzlVAz7YsKd
Vh9KXtAKruw6hDGC25JmhP0x3HWP1DK78lhs0LEWNwKtwFV5L2D2c94p8VxGyM6j
ZW2UHKwrYMjVvzSgoiz/n9HdVi8Rz9UzShi9KYx7ZbH3gkGMOBlAua1y2Qk9HAS6
MiI9pLkMU8tcXiBf8OlYoVj/m8H1bodvkhUO5fUEkRCns23C5okl4lWbCZZdZSgc
Pj8KLj1dLLFfdjMK3VYESwfsF7A+mgKr+hiEk1NH3F+TueSMZCkzI8Vhv8q0jZKf
qNv114Ab1XfEUk0Mi3p1I6+uhqMgy516vrH+KEku+6TjCzy2tflI+amezV6Sot/r
OgKGeV3qUYjTpV/j3TLPrfJORg3zVVTBa5DyMONQ9snZAer/PI+7/dykjgichd43
9CcLgKZHZxItE6xdmlVuFcrLvzcAkAV8NYV1STvrInCF8BCkrDkDWbFUo6/Ny+1E
8oUVgLykZil35DgRGqILgw3+zr5Gy1NIguHhJXvQ0VPCMIk+CSUvRtZ89Gokk4Yf
dICXT0tuyjmTWybIB1Em6AWyxLSUWQr7WcOji3tQdIUbb1N7yBVLMMnZocfpCb9m
FuikXxl9PK+e3UzK91Z1RW8Fkihax7FC6bOddd5TjbSDLCCEGaE=
=QkZp
-----END PGP SIGNATURE-----

View File

@ -1,220 +0,0 @@
# -*- rpm-spec -*-
%global with_gir 0
# Default to skipping autoreconf. Distros can change just this one line
# (or provide a command-line override) if they backport any patches that
# touch configure.ac or Makefile.am.
# Force running autoreconf because data center patches touch Makefile.am.
# To disable autoreconf, change the value to 0.
%{!?enable_autotools:%global enable_autotools 1}
%if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
%global with_gir 1
%endif
Summary: A GObject library for interacting with oVirt REST API
Name: libgovirt
Version: 0.3.7
Release: 4%{?dist}%{?extra_release}
License: LGPLv2+
Group: Development/Libraries
Source0: http://ftp.gnome.org/pub/GNOME/sources/libgovirt/0.3/%{name}-%{version}.tar.xz
Source1: http://ftp.gnome.org/pub/GNOME/sources/libgovirt/0.3/%{name}-%{version}.tar.xz.sig
Source2: etrunko-57E1C130.keyring
URL: https://gitlab.gnome.org/GNOME/libgovirt
Patch0001: 0001-Initial-support-for-Disks.patch
Patch0002: 0002-ovirt-storage-domain-Introduce-ovirt_storage_domain_.patch
Patch0003: 0003-ovirt-disk-Fix-content-type-property-name.patch
Patch0004: 0004-proxy-Fix-error-handling.patch
%if 0%{?enable_autotools}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gettext-devel
BuildRequires: libtool
%endif
BuildRequires: git-core
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: intltool
BuildRequires: rest-devel >= 0.7.92
%if %{with_gir}
BuildRequires: gobject-introspection-devel
%endif
#needed for make check
BuildRequires: glib-networking
BuildRequires: dconf
#needed for GPG signature checek
BuildRequires: gnupg2
%description
libgovirt is a library that allows applications to use oVirt REST API
to list VMs managed by an oVirt instance, and to get the connection
parameters needed to make a SPICE/VNC connection to them.
%package devel
Summary: Libraries, includes, etc. to compile with the libgovirt library
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: pkgconfig
Requires: glib2-devel
%description devel
libgovirt is a library that allows applications to use oVirt REST API
to list VMs managed by an oVirt instance, and to get the connection
parameters needed to make a SPICE/VNC connection to them.
Libraries, includes, etc. to compile with the libgovirt library
%prep
gpgv2 --quiet --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0}
%autosetup -S git_am
%build
%if 0%{?enable_autotools}
autoreconf -if
%endif
%if %{with_gir}
%global gir_arg --enable-introspection=yes
%else
%global gir_arg --enable-introspection=no
%endif
%configure %{gir_arg}
%__make %{?_smp_mflags} V=1
%install
%__make install DESTDIR=%{buildroot}
rm -f %{buildroot}%{_libdir}/*.a
rm -f %{buildroot}%{_libdir}/*.la
%find_lang %{name} --with-gnome
%check
make check
%ldconfig_scriptlets
%files -f %{name}.lang
%doc AUTHORS COPYING MAINTAINERS README
%{_libdir}/%{name}.so.2*
%if %{with_gir}
%{_libdir}/girepository-1.0/GoVirt-1.0.typelib
%endif
%files devel
%{_libdir}/%{name}.so
%dir %{_includedir}/govirt-1.0/
%dir %{_includedir}/govirt-1.0/govirt/
%{_includedir}/govirt-1.0/govirt/*.h
%{_libdir}/pkgconfig/govirt-1.0.pc
%if %{with_gir}
%{_datadir}/gir-1.0/GoVirt-1.0.gir
%endif
%changelog
* Tue Dec 22 2020 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 0.3.7-4
- Fix error handling in ovirt-proxy.c
Resolves: rhbz#1910033
* Tue Jun 16 2020 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 0.3.7-3
- Fix content-type property name
Resolves: rhbz#1847223
* Tue Jun 16 2020 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 0.3.7-2
- Add support for storage domains 'disks' query
Resolves: rhbz#1847223
* Fri May 08 2020 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 0.3.7-1
- Rebase to latest upstream version
Resolves: rhbz#1801226
* Mon Mar 16 2020 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 0.3.4-11
- Bumped version and rebuild to trigger gating for 8.2.0.z properly
Resolves: rhbz#1813962
* Mon Mar 16 2020 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 0.3.4-10
- Update to RHV REST API version 4
Resolves: rhbz#1813962
* Mon Aug 2 2019 Eduardo Lima (Etrunko) <etrunko@redhat.com> - 0.3.4-9
- Sync with the rhel 7.7 package
Related: rhbz#1717900
* Mon Jun 11 2018 Christophe Fergeau <cfergeau@redhat.com> - 0.3.4-8
- Sync with the rhel 7.6 package
Resolves: rhbz#1584506
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.4-7
- Escape macros in %%changelog
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Feb 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.3.4-5
- Switch to %%ldconfig_scriptlets
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Apr 13 2016 Christophe Fergeau <cfergeau@redhat.com> 0.3.4-1
- Update to libgovirt 0.3.4
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Wed Apr 08 2015 Christophe Fergeau <cfergeau@redhat.com> 0.3.3-1
- Update to upstream release 0.3.3
* Thu Oct 09 2014 Christophe Fergeau <cfergeau@redhat.com> 0.3.2-1
- Update to upstream release 0.3.2
* Wed Sep 03 2014 Christophe Fergeau <cfergeau@redhat.com> 0.3.1-1
- Update to upstream release 0.3.1
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Aug 02 2014 Richard Jones <rjones@redhat.com> - 0.3.0-6
- Force rebuild for aarch64.
* Tue Jul 22 2014 Kalev Lember <kalevlember@gmail.com> - 0.3.0-5
- Rebuilt for gobject-introspection 1.41.4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Tue Nov 26 2013 Christophe Fergeau <cfergeau@redhat.com> 0.3.0-3
- Actually apply Patch0 /o\
* Tue Nov 26 2013 Christophe Fergeau <cfergeau@redhat.com> 0.3.0-2
- Add patch to fix a memory corruption issue when librest does not have the
RestProxy::ssl-ca-file property (which is currently the case in Fedora)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Jun 11 2013 Christophe Fergeau <cfergeau@redhat.com> 0.1.0-1
- Update to upstream release 0.1.0
* Mon Mar 11 2013 Christophe Fergeau <cfergeau@redhat.com> 0.0.3-2
- Removed definition of BuildRoot and cleanup of BuildRoot in %%clean
- Added missing arch to versioned Requires: %%{name} in the -devel package
- Don't include empty NEWS and ChangeLog in built RPM
* Wed Feb 20 2013 Christophe Fergeau <cfergeau@redhat.com> 0.0.3-1
- Initial import of libgovirt 0.0.3

1
dead.package Normal file
View File

@ -0,0 +1 @@
libgovirt package is retired on c9s for CS-390