diff --git a/0001-media-Fix-usage-of-application-id.patch b/0001-media-Fix-usage-of-application-id.patch new file mode 100644 index 0000000..3caa421 --- /dev/null +++ b/0001-media-Fix-usage-of-application-id.patch @@ -0,0 +1,38 @@ +From 2626058a7921749387f8d3107241af7507f48c65 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Mon, 1 Apr 2019 22:40:48 +0200 +Subject: [PATCH] media: Fix usage of application id +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Christophe Fergeau pointed this issue out during the review of 6d789033e +and, even though, the bogus code ended up merged (sorry, mea culpa +here!). + +Signed-off-by: Fabiano FidĂȘncio +Reviewed-by: Cole Robinson +--- + osinfo/osinfo_media.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/osinfo/osinfo_media.c b/osinfo/osinfo_media.c +index b16fcf6..4f86c2b 100644 +--- a/osinfo/osinfo_media.c ++++ b/osinfo/osinfo_media.c +@@ -830,10 +830,10 @@ create_from_location_async_data(CreateFromLocationAsyncData *data) + osinfo_entity_set_param(OSINFO_ENTITY(media), + OSINFO_MEDIA_PROP_PUBLISHER_ID, + data->publisher); +- if (!is_str_empty(data->pvd.application)) ++ if (!is_str_empty(data->application)) + osinfo_entity_set_param(OSINFO_ENTITY(media), + OSINFO_MEDIA_PROP_APPLICATION_ID, +- data->pvd.application); ++ data->application); + + index = (G_BYTE_ORDER == G_LITTLE_ENDIAN) ? 0 : 1; + vol_size = ((gint64) data->pvd.volume_space_size[index]) * +-- +2.20.1 + diff --git a/0002-loader-Properly-load-the-arch-value-for-images.patch b/0002-loader-Properly-load-the-arch-value-for-images.patch new file mode 100644 index 0000000..29bcbac --- /dev/null +++ b/0002-loader-Properly-load-the-arch-value-for-images.patch @@ -0,0 +1,37 @@ +From 1940739805409af9e39c61dbfe238e6c9b1519b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= +Date: Wed, 10 Apr 2019 13:45:14 +0200 +Subject: [PATCH] loader: Properly load the arch value for images +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +osinfo_loader_image() has been considering the XML tag for the +images' architecture was "architecture", while it actually is "arch". + +By trying to read the wrong tag, no arch was loaded, causing then any +image load to fail with: +CRITICAL **: 13:30:06.539: osinfo_entity_set_param: assertion 'value != NULL' failed + +Signed-off-by: Fabiano FidĂȘncio +--- + osinfo/osinfo_loader.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/osinfo/osinfo_loader.c b/osinfo/osinfo_loader.c +index e30148b..84c25e5 100644 +--- a/osinfo/osinfo_loader.c ++++ b/osinfo/osinfo_loader.c +@@ -1297,8 +1297,7 @@ static OsinfoImage *osinfo_loader_image(OsinfoLoader *loader, + { NULL, G_TYPE_INVALID } + }; + +- gchar *arch = (gchar *)xmlGetProp(root, +- BAD_CAST OSINFO_IMAGE_PROP_ARCHITECTURE); ++ gchar *arch = (gchar *)xmlGetProp(root, BAD_CAST "arch"); + gchar *format = (gchar *)xmlGetProp(root, + BAD_CAST OSINFO_IMAGE_PROP_FORMAT); + gchar *cloud_init = (gchar *)xmlGetProp(root, +-- +2.20.1 + diff --git a/libosinfo.changes b/libosinfo.changes index fd22033..34622be 100644 --- a/libosinfo.changes +++ b/libosinfo.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Apr 10 09:18:39 MDT 2019 - carnold@suse.com + +- Upstream bug fixes from Fabiano FidĂȘncio + 0001-media-Fix-usage-of-application-id.patch + 0002-loader-Properly-load-the-arch-value-for-images.patch + ------------------------------------------------------------------- Fri Mar 1 12:50:15 MST 2019 - carnold@suse.com diff --git a/libosinfo.spec b/libosinfo.spec index 7a1c2bd..158f8b3 100644 --- a/libosinfo.spec +++ b/libosinfo.spec @@ -28,6 +28,8 @@ Group: Development/Libraries/C and C++ Url: https://releases.pagure.org/libosinfo/ Source0: https://releases.pagure.org/libosinfo/%{name}-%{version}.tar.gz Source1: ids.tar.bz2 +Patch1: 0001-media-Fix-usage-of-application-id.patch +Patch2: 0002-loader-Properly-load-the-arch-value-for-images.patch BuildRequires: libcurl-devel BuildRequires: vala BuildRequires: pkgconfig(check) @@ -85,6 +87,8 @@ as well as Vala bindings for the libosinfo library. %endif %prep %setup -q -a 1 +%patch1 -p1 +%patch2 -p1 %build %configure \