Hello community, here is the log from the commit of package libvirt-glib for openSUSE:Factory checked in at 2014-06-05 10:50:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libvirt-glib (Old) and /work/SRC/openSUSE:Factory/.libvirt-glib.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "libvirt-glib" Changes: -------- --- /work/SRC/openSUSE:Factory/libvirt-glib/libvirt-glib.changes 2013-07-12 20:48:35.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.libvirt-glib.new/libvirt-glib.changes 2014-06-05 10:50:14.000000000 +0200 @@ -1,0 +2,30 @@ +Wed Jun 4 10:04:39 UTC 2014 - cbosdonnat@suse.com + +- Extended API to provide host supported security models. + bnc#878048. secmodel-caps.patch + +------------------------------------------------------------------- +Wed Jun 4 08:42:52 UTC 2014 - cbosdonnat@suse.com + +- Update to version 0.1.8: + + Add getter/setter for UUID in domain config + + Remove dead code / unused variables + + Add missing symbol exports + + Add support for setting nwfilters in domain config + + Switch to standard gobject introspection autotools macros + + Fix typo preventing removal of clock config + + Add getter/setters for disk driver type + + Add unit tests based on glib tap harness + + Add test for validating symbol file exports + + Add getters for domain graphics config params + + Add more getters for domain timer config + + Add support for hpet timer type + + Fix event loop impl on win32 + + Fix parent class/object of pit timer class + + Fix misc API doc bugs + + Add more getters for domain clock config + + Fix removal of domain CPU feature flags + + Fix removal of capabilities CPU topology + + Misc fixes to glib event loop integration + +------------------------------------------------------------------- Old: ---- libvirt-glib-0.1.7.tar.gz New: ---- libvirt-glib-0.1.8.tar.gz secmodel-caps.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvirt-glib.spec ++++++ --- /var/tmp/diff_new_pack.vpWQCh/_old 2014-06-05 10:50:16.000000000 +0200 +++ /var/tmp/diff_new_pack.vpWQCh/_new 2014-06-05 10:50:16.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package libvirt-glib # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2011 Dominique Leuenberger, Amsterdam, The Netherlands. # # All modifications and additions to the file contributed by third parties @@ -18,13 +18,17 @@ Name: libvirt-glib -Version: 0.1.7 +Version: 0.1.8 Release: 0 Summary: GLib and GObject mapping of libvirt License: LGPL-2.1+ Group: System/Libraries Url: http://libvirt.org Source: http://libvirt.org/sources/glib/%{name}-%{version}.tar.gz + +# Patches pending upstreaming +Patch0: secmodel-caps.patch + BuildRequires: intltool >= 0.35.0 BuildRequires: libtool BuildRequires: vala @@ -122,6 +126,7 @@ %prep %setup -q +%patch0 -p1 %build %configure --disable-static @@ -132,12 +137,13 @@ %install %make_install find %{buildroot} -type f -name "*.la" -delete -print +%find_lang %{name} %post -n libvirt-glib-1_0-0 -p /sbin/ldconfig %postun -n libvirt-glib-1_0-0 -p /sbin/ldconfig -%files -n libvirt-glib-1_0-0 +%files -n libvirt-glib-1_0-0 -f %{name}.lang %defattr(-, root, root) %doc COPYING README ChangeLog %{_libdir}/libvirt-gconfig-1.0.so.* ++++++ libvirt-glib-0.1.7.tar.gz -> libvirt-glib-0.1.8.tar.gz ++++++ ++++ 19484 lines of diff (skipped) ++++++ secmodel-caps.patch ++++++
From 5fef62b343e574010aee37ebc43ee79d72a17d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?=
Date: Tue, 3 Jun 2014 16:25:14 +0200 Subject: [PATCH] Add API to get security models from host capabilities
---
libvirt-gconfig/Makefile.am | 2 +
.../libvirt-gconfig-capabilities-host.c | 51 +++++++++++++++++
.../libvirt-gconfig-capabilities-host.h | 3 +
.../libvirt-gconfig-capabilities-secmodel.c | 55 ++++++++++++++++++
.../libvirt-gconfig-capabilities-secmodel.h | 66 ++++++++++++++++++++++
libvirt-gconfig/libvirt-gconfig.h | 1 +
libvirt-gconfig/libvirt-gconfig.sym | 5 ++
libvirt-gconfig/tests/test-capabilities-parse.c | 14 ++++-
libvirt-gconfig/tests/test-capabilities-parse.xml | 4 ++
9 files changed, 200 insertions(+), 1 deletion(-)
create mode 100644 libvirt-gconfig/libvirt-gconfig-capabilities-secmodel.c
create mode 100644 libvirt-gconfig/libvirt-gconfig-capabilities-secmodel.h
Index: libvirt-glib-0.1.8/libvirt-gconfig/Makefile.am
===================================================================
--- libvirt-glib-0.1.8.orig/libvirt-gconfig/Makefile.am
+++ libvirt-glib-0.1.8/libvirt-gconfig/Makefile.am
@@ -20,6 +20,7 @@ GCONFIG_HEADER_FILES = \
libvirt-gconfig-capabilities-guest-arch.h \
libvirt-gconfig-capabilities-guest-domain.h \
libvirt-gconfig-capabilities-guest-feature.h \
+ libvirt-gconfig-capabilities-secmodel.h \
libvirt-gconfig-domain.h \
libvirt-gconfig-domain-address.h \
libvirt-gconfig-domain-address-pci.h \
@@ -106,6 +107,7 @@ GCONFIG_SOURCE_FILES = \
libvirt-gconfig-capabilities-guest-arch.c \
libvirt-gconfig-capabilities-guest-domain.c \
libvirt-gconfig-capabilities-guest-feature.c \
+ libvirt-gconfig-capabilities-secmodel.c \
libvirt-gconfig-domain.c \
libvirt-gconfig-domain-address.c \
libvirt-gconfig-domain-address-pci.c \
Index: libvirt-glib-0.1.8/libvirt-gconfig/libvirt-gconfig-capabilities-host.c
===================================================================
--- libvirt-glib-0.1.8.orig/libvirt-gconfig/libvirt-gconfig-capabilities-host.c
+++ libvirt-glib-0.1.8/libvirt-gconfig/libvirt-gconfig-capabilities-host.c
@@ -77,3 +77,54 @@ gvir_config_capabilities_host_get_cpu(GV
return GVIR_CONFIG_CAPABILITIES_CPU(object);
}
+
+struct GetSecModelData {
+ GVirConfigXmlDoc *doc;
+ const gchar *schema;
+ GList *secmodels;
+ GType type;
+};
+
+static gboolean add_secmodel(xmlNodePtr node, gpointer opaque)
+{
+ struct GetSecModelData* data = (struct GetSecModelData*)opaque;
+ GVirConfigObject *secmodel;
+
+ if (g_strcmp0((const gchar *)node->name, "secmodel") != 0)
+ return TRUE;
+
+ secmodel = gvir_config_object_new_from_tree
+ (data->type,
+ data->doc,
+ data->schema,
+ node);
+ if (secmodel != NULL)
+ data->secmodels = g_list_append(data->secmodels, secmodel);
+ else
+ g_debug("Failed to parse %s node", node->name);
+
+ return TRUE;
+}
+
+GList *
+gvir_config_capabilities_host_get_secmodels(GVirConfigCapabilitiesHost *host)
+{
+ struct GetSecModelData data;
+
+ g_return_val_if_fail(GVIR_CONFIG_IS_CAPABILITIES_HOST(host), NULL);
+
+ data.schema = gvir_config_object_get_schema(GVIR_CONFIG_OBJECT(host));
+ g_object_get(G_OBJECT(host), "doc", &data.doc, NULL);
+ g_return_val_if_fail(data.doc != NULL, NULL);
+ data.secmodels = NULL;
+ data.type = GVIR_CONFIG_TYPE_CAPABILITIES_SECMODEL;
+
+ gvir_config_object_foreach_child(GVIR_CONFIG_OBJECT(host),
+ NULL,
+ add_secmodel,
+ &data);
+
+ g_clear_object(&data.doc);
+
+ return data.secmodels;
+}
Index: libvirt-glib-0.1.8/libvirt-gconfig/libvirt-gconfig-capabilities-host.h
===================================================================
--- libvirt-glib-0.1.8.orig/libvirt-gconfig/libvirt-gconfig-capabilities-host.h
+++ libvirt-glib-0.1.8/libvirt-gconfig/libvirt-gconfig-capabilities-host.h
@@ -67,6 +67,9 @@ gvir_config_capabilities_host_get_uuid(G
GVirConfigCapabilitiesCpu *
gvir_config_capabilities_host_get_cpu(GVirConfigCapabilitiesHost *host);
+GList *
+gvir_config_capabilities_host_get_secmodels(GVirConfigCapabilitiesHost *host);
+
G_END_DECLS
#endif /* __LIBVIRT_GCONFIG_CAPABILITIES_HOST_H__ */
Index: libvirt-glib-0.1.8/libvirt-gconfig/libvirt-gconfig-capabilities-secmodel.c
===================================================================
--- /dev/null
+++ libvirt-glib-0.1.8/libvirt-gconfig/libvirt-gconfig-capabilities-secmodel.c
@@ -0,0 +1,55 @@
+/*
+ * libvirt-gconfig-capabilities-secmodel.c: libvirt security model capabilities
+ *
+ * Copyright (C) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+ *
+ * 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/.
+ *
+ * Authors: Cédric Bosdonnat