- Upstream bug fixes from Fabiano Fidêncio <fabiano@fidencio.org>

0001-media-Fix-usage-of-application-id.patch
  0002-loader-Properly-load-the-arch-value-for-images.patch

OBS-URL: https://build.opensuse.org/package/show/hardware/libosinfo?expand=0&rev=71
This commit is contained in:
Charles Arnold 2019-04-10 15:48:40 +00:00 committed by Git OBS Bridge
parent 05490673dd
commit 8c04afdc05
4 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From 2626058a7921749387f8d3107241af7507f48c65 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
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 <fidencio@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
---
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

View File

@ -0,0 +1,37 @@
From 1940739805409af9e39c61dbfe238e6c9b1519b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
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 <fidencio@redhat.com>
---
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

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Apr 10 09:18:39 MDT 2019 - carnold@suse.com
- Upstream bug fixes from Fabiano Fidêncio <fabiano@fidencio.org>
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

View File

@ -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 \