Update to new release (v1.7.0)
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
parent
86f8b9e50e
commit
b40c8fb33c
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,3 +4,5 @@
|
|||||||
x86_64
|
x86_64
|
||||||
/libosinfo-1.5.0.tar.gz.asc
|
/libosinfo-1.5.0.tar.gz.asc
|
||||||
/libosinfo-1.6.0.tar.gz.asc
|
/libosinfo-1.6.0.tar.gz.asc
|
||||||
|
/libosinfo-1.7.0.tar.xz
|
||||||
|
/libosinfo-1.7.0.tar.xz.asc
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
From 71cf18b07b830f7966dbd6b6705c0f9cddb5c587 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= <fidencio@redhat.com>
|
|
||||||
Date: Tue, 5 Nov 2019 15:56:28 +0100
|
|
||||||
Subject: [PATCH] db: Take the media's volume size into account when sorting
|
|
||||||
the medias
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
If volume-size is not taken into account, when dealing with identical
|
|
||||||
ISOs, we may end up wrongly matching an entry that has its volume-size
|
|
||||||
with one which doesn't have the value, simply because the one which does
|
|
||||||
not have the value may be declared first the in XML entry.
|
|
||||||
|
|
||||||
Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
|
|
||||||
Reviewed-by; Daniel P. Berrangé <berrange@redhat.com>
|
|
||||||
---
|
|
||||||
osinfo/osinfo_db.c | 14 ++++++++++++--
|
|
||||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/osinfo/osinfo_db.c b/osinfo/osinfo_db.c
|
|
||||||
index 328b251a..e2845df2 100644
|
|
||||||
--- a/osinfo/osinfo_db.c
|
|
||||||
+++ b/osinfo/osinfo_db.c
|
|
||||||
@@ -538,11 +538,21 @@ static gint media_volume_compare(gconstpointer a, gconstpointer b)
|
|
||||||
/* Order doesn't matter then */
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
- if (strstr(volume_a, volume_b) != NULL)
|
|
||||||
+ if (strstr(volume_a, volume_b) != NULL) {
|
|
||||||
+ gint64 volume_size_a = osinfo_media_get_volume_size(media_a);
|
|
||||||
+ gint64 volume_size_b = osinfo_media_get_volume_size(media_b);
|
|
||||||
+
|
|
||||||
+ if (volume_size_a != -1 && volume_size_b == -1)
|
|
||||||
+ return -1;
|
|
||||||
+
|
|
||||||
+ if (volume_size_b != -1 && volume_size_a == -1)
|
|
||||||
+ return 1;
|
|
||||||
+
|
|
||||||
return -1;
|
|
||||||
- else
|
|
||||||
+ } else {
|
|
||||||
/* Sub-string comes later */
|
|
||||||
return 1;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean compare_media(OsinfoMedia *media,
|
|
||||||
--
|
|
||||||
2.23.0
|
|
||||||
|
|
@ -2,15 +2,17 @@
|
|||||||
|
|
||||||
Summary: A library for managing OS information for virtualization
|
Summary: A library for managing OS information for virtualization
|
||||||
Name: libosinfo
|
Name: libosinfo
|
||||||
Version: 1.6.0
|
Version: 1.7.0
|
||||||
Release: 2%{?dist}%{?extra_release}
|
Release: 1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Source: https://releases.pagure.io/%{name}/%{name}-%{version}.tar.gz
|
Source: https://releases.pagure.io/%{name}/%{name}-%{version}.tar.xz
|
||||||
URL: https://libosinfo.org/
|
URL: https://libosinfo.org/
|
||||||
|
|
||||||
### Patches ###
|
### Patches ###
|
||||||
Patch0001: 0001-db-Take-the-media-s-volume-size-into-account-when-so.patch
|
|
||||||
|
|
||||||
|
BuildRequires: meson
|
||||||
|
BuildRequires: gcc
|
||||||
|
BuildRequires: gtk-doc
|
||||||
BuildRequires: gettext-devel
|
BuildRequires: gettext-devel
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
BuildRequires: libxml2-devel >= 2.6.0
|
BuildRequires: libxml2-devel >= 2.6.0
|
||||||
@ -51,25 +53,19 @@ Libraries, includes, etc. to compile with the libosinfo library
|
|||||||
%autosetup -S git
|
%autosetup -S git
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --enable-introspection=yes --enable-vala=yes
|
%meson \
|
||||||
%__make %{?_smp_mflags} V=1
|
-Denable-gtk-doc=true \
|
||||||
|
-Denable-tests=true \
|
||||||
chmod a-x examples/*.js examples/*.py
|
-Denable-introspection=enabled \
|
||||||
|
-Denable-vala=enabled
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -fr %{buildroot}
|
%meson_install
|
||||||
%__make install DESTDIR=%{buildroot}
|
|
||||||
rm -f %{buildroot}%{_libdir}/*.a
|
|
||||||
rm -f %{buildroot}%{_libdir}/*.la
|
|
||||||
|
|
||||||
%find_lang %{name}
|
%find_lang %{name}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
if ! make check
|
%meson_test
|
||||||
then
|
|
||||||
cat tests/test-suite.log || true
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
%ldconfig_scriptlets
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
@ -85,8 +81,6 @@ fi
|
|||||||
%{_libdir}/girepository-1.0/Libosinfo-1.0.typelib
|
%{_libdir}/girepository-1.0/Libosinfo-1.0.typelib
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc examples/demo.js
|
|
||||||
%doc examples/demo.py
|
|
||||||
%{_libdir}/%{name}-1.0.so
|
%{_libdir}/%{name}-1.0.so
|
||||||
%dir %{_includedir}/%{name}-1.0/
|
%dir %{_includedir}/%{name}-1.0/
|
||||||
%dir %{_includedir}/%{name}-1.0/osinfo/
|
%dir %{_includedir}/%{name}-1.0/osinfo/
|
||||||
@ -94,11 +88,16 @@ fi
|
|||||||
%{_libdir}/pkgconfig/%{name}-1.0.pc
|
%{_libdir}/pkgconfig/%{name}-1.0.pc
|
||||||
%{_datadir}/gir-1.0/Libosinfo-1.0.gir
|
%{_datadir}/gir-1.0/Libosinfo-1.0.gir
|
||||||
%{_datadir}/gtk-doc/html/Libosinfo
|
%{_datadir}/gtk-doc/html/Libosinfo
|
||||||
|
|
||||||
%dir %{_datadir}/vala
|
%dir %{_datadir}/vala
|
||||||
%dir %{_datadir}/vala/vapi
|
%dir %{_datadir}/vala/vapi
|
||||||
|
%{_datadir}/vala/vapi/libosinfo-1.0.deps
|
||||||
%{_datadir}/vala/vapi/libosinfo-1.0.vapi
|
%{_datadir}/vala/vapi/libosinfo-1.0.vapi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 29 2019 Fabiano Fidêncio <fidencio@redhat.com> - 1.7.0-1
|
||||||
|
- Update to 1.7.0 release
|
||||||
|
|
||||||
* Fri Nov 08 2019 Fabiano Fidêncio <fidencio@redhat.com> - 1.6.0-2
|
* Fri Nov 08 2019 Fabiano Fidêncio <fidencio@redhat.com> - 1.6.0-2
|
||||||
- Improve ISO detection mechanism
|
- Improve ISO detection mechanism
|
||||||
|
|
||||||
|
4
sources
4
sources
@ -1,2 +1,2 @@
|
|||||||
SHA512 (libosinfo-1.6.0.tar.gz) = 53359095e40ef12e0cc142ddc92119b4a753bb47a728f13a8ff500a19108a44eb1f6ebe4ed67b04347a707dd0c0d55bcfe6815b57d187237dddd7376ebe9cf5e
|
SHA512 (libosinfo-1.7.0.tar.xz) = 973fdf1c6183881a721ccb355732bf570200694b77903a4c77dadd5c91669a3cc00463443153f185c127653d74cba295eec3bfa99827259a6061e9d70db0ecbd
|
||||||
SHA512 (libosinfo-1.6.0.tar.gz.asc) = 5658faaf53881aaf94fa1ed510cb6f1332ad6e5e288c1b9f7c60a82ee9b28e4124966333a9a1d4fa59a646a96fe0ef7e7e05c525b2b67edde0797c159edc5e03
|
SHA512 (libosinfo-1.7.0.tar.xz.asc) = 6a589ce18571773f153066a32bf328e33e8d88b5b5b3aee14348fc76d180029800f8e26b6e27c0a51642bbc2a93c7f80b93df7f058a7eb604fba0a4ce7ad9a26
|
||||||
|
Loading…
Reference in New Issue
Block a user