From 52651331d5617a7d661f57d3f72a86e3542741a4 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 17:59:20 +0000 Subject: [PATCH] import UBI osinfo-db-tools-1.11.0-8.el10 --- .gitignore | 2 +- .osinfo-db-tools.metadata | 1 - 80.patch | 85 ++++++++++++++++++++ SPECS/osinfo-db-tools.spec | 101 ----------------------- osinfo-db-tools.spec | 160 +++++++++++++++++++++++++++++++++++++ sources | 1 + 6 files changed, 247 insertions(+), 103 deletions(-) delete mode 100644 .osinfo-db-tools.metadata create mode 100644 80.patch delete mode 100644 SPECS/osinfo-db-tools.spec create mode 100644 osinfo-db-tools.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index 369d3da..562a793 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/osinfo-db-tools-1.9.0.tar.xz +osinfo-db-tools-1.11.0.tar.xz diff --git a/.osinfo-db-tools.metadata b/.osinfo-db-tools.metadata deleted file mode 100644 index a3cb4d2..0000000 --- a/.osinfo-db-tools.metadata +++ /dev/null @@ -1 +0,0 @@ -6da132d05d355c4e55f018fb79db756b6a6f8292 SOURCES/osinfo-db-tools-1.9.0.tar.xz diff --git a/80.patch b/80.patch new file mode 100644 index 0000000..af42e41 --- /dev/null +++ b/80.patch @@ -0,0 +1,85 @@ +From 34378a4ac257f2f5fcf364786d1634a8c36b304f Mon Sep 17 00:00:00 2001 +From: Michal Privoznik +Date: Mon, 27 Nov 2023 15:04:43 +0100 +Subject: [PATCH 1/2] Make xmlError structs constant + +In libxml2 commits v2.12.0~14 and v2.12.0~77 the API changed so +that: + +1) xmlGetLastError() returns pointer to a constant xmlError + struct, and + +2) xmlSetStructuredErrorFunc() changed the signature of callback + (validate_structured_error_nop()), it too is passed pointer to + a constant xmlError struct. + +But of course, older libxml2 expects different callback +signature. Therefore, we need to typecast it anyway. + +Also, drop obviously incorrect @error annotation in +validate_structured_error_nop; the variable is used. + +Signed-off-by: Michal Privoznik +--- + tools/osinfo-db-validate.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c +index a721b4d..b1434a6 100644 +--- a/tools/osinfo-db-validate.c ++++ b/tools/osinfo-db-validate.c +@@ -35,7 +35,7 @@ static void validate_generic_error_nop(void *userData G_GNUC_UNUSED, + } + + static void validate_structured_error_nop(void *userData G_GNUC_UNUSED, +- xmlErrorPtr error G_GNUC_UNUSED) ++ const xmlError *error) + { + if (error->file) + g_printerr("%s:%d %s", error->file, error->line, error->message); +@@ -173,7 +173,8 @@ static gboolean validate_files(GFile *schema, gsize nfiles, GFile **files, GErro + g_autofree gchar *schemapath = NULL; + + xmlSetGenericErrorFunc(NULL, validate_generic_error_nop); +- xmlSetStructuredErrorFunc(NULL, validate_structured_error_nop); ++ /* Drop this typecast when >=libxml2-2.12.0 is required */ ++ xmlSetStructuredErrorFunc(NULL, (xmlStructuredErrorFunc) validate_structured_error_nop); + + schemapath = g_file_get_path(schema); + rngParser = xmlRelaxNGNewParserCtxt(schemapath); +-- +GitLab + + +From 019487cbc79925e49988789bf533c78dab7e1842 Mon Sep 17 00:00:00 2001 +From: Michal Privoznik +Date: Mon, 27 Nov 2023 15:06:04 +0100 +Subject: [PATCH 2/2] osinfo-db-validate: Add more libxml/ includes + +In its 2.12.0 release, libxml reworked their header files (some +might even call it cleaning up, I call it API incompatible +change) and now we don't get all declarations we need by just +including one file. Add missing includes. + +Signed-off-by: Michal Privoznik +--- + tools/osinfo-db-validate.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tools/osinfo-db-validate.c b/tools/osinfo-db-validate.c +index b1434a6..f3275db 100644 +--- a/tools/osinfo-db-validate.c ++++ b/tools/osinfo-db-validate.c +@@ -20,7 +20,9 @@ + * Daniel P. Berrange + */ + ++#include + #include ++#include + #include + #include + +-- +GitLab + diff --git a/SPECS/osinfo-db-tools.spec b/SPECS/osinfo-db-tools.spec deleted file mode 100644 index d72412d..0000000 --- a/SPECS/osinfo-db-tools.spec +++ /dev/null @@ -1,101 +0,0 @@ -# -*- rpm-spec -*- - -Summary: Tools for managing the osinfo database -Name: osinfo-db-tools -Version: 1.9.0 -Release: 1%{?dist} -License: GPLv2+ -Source: https://releases.pagure.io/libosinfo/%{name}-%{version}.tar.xz -URL: http://libosinfo.org/ - -### Patches ### - -BuildRequires: meson -BuildRequires: gcc -BuildRequires: gettext-devel -BuildRequires: git -BuildRequires: glib2-devel -BuildRequires: libxml2-devel >= 2.6.0 -BuildRequires: libxslt-devel >= 1.0.0 -BuildRequires: libarchive-devel -BuildRequires: libsoup-devel -BuildRequires: json-glib-devel -BuildRequires: /usr/bin/pod2man -BuildRequires: python3 -BuildRequires: python3-pytest -BuildRequires: python3-requests - -%description -This package provides tools for managing the osinfo database of -information about operating systems for use with virtualization - -%prep -%autosetup -S git - -%build -%meson -%meson_build - -%check -%meson_test - -%install -%meson_install - -%find_lang %{name} - -%files -f %{name}.lang -%doc NEWS README -%license COPYING -%{_bindir}/osinfo-db-export -%{_bindir}/osinfo-db-import -%{_bindir}/osinfo-db-path -%{_bindir}/osinfo-db-validate -%{_mandir}/man1/osinfo-db-export.1* -%{_mandir}/man1/osinfo-db-import.1* -%{_mandir}/man1/osinfo-db-path.1* -%{_mandir}/man1/osinfo-db-validate.1* - -%changelog -* Thu Feb 04 2021 Danilo C. L. de Paula - 1.9.0-1 -- Resolves: rhbz#1903301 - rebase osinfo-db-tools to latest fedora's - -* Sun May 31 2020 Fabiano Fidêncio - 1.8.0-1 -- Resolves: rhbz#1842019 - Rebase to the latest upstream release - -* Wed May 22 2019 Fabiano Fidêncio - 1.5.0-4 -- Related: rhbz#1712426 - New defects found in - osinfo-db-tools-1.5.0-2.el8 - -* Wed May 22 2019 Fabiano Fidêncio - 1.5.0-3 -- Resolves: rhbz#1712426 - New defects found in - osinfo-db-tools-1.5.0-2.el8 - -* Mon May 20 2019 Fabiano Fidêncio - 1.5.0-2 -- Resolves: rhbz#1681879 - osinfo-db-tools changes blocked until gating - tests are added - -* Fri May 10 2019 Fabiano Fidêncio - 1.5.0-1 -- Update to 1.3.0 release -- Resolves: rhbz#1699989 - Rebase to the latest upstream release - -* Wed Jun 20 2018 Daniel P. Berrangé - 1.2.0-1 -- Update to 1.2.0 release - -* Thu Feb 08 2018 Fedora Release Engineering - 1.1.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Aug 03 2017 Fedora Release Engineering - 1.1.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 1.1.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 1.1.0-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Oct 26 2016 Daniel P. Berrange - 1.1.0-1 -- Update to 1.1.0 release - -* Fri Jul 29 2016 Daniel P. Berrange - 1.0.0-1 -- Initial package after split from libosinfo (rhbz #1361594) diff --git a/osinfo-db-tools.spec b/osinfo-db-tools.spec new file mode 100644 index 0000000..7042b9b --- /dev/null +++ b/osinfo-db-tools.spec @@ -0,0 +1,160 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.6.5) +## RPMAUTOSPEC: autorelease +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 8; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +# -*- rpm-spec -*- + +%define with_mingw 0 +%if 0%{?fedora} + %define with_mingw 0%{!?_without_mingw:1} +%endif + +Summary: Tools for managing the osinfo database +Name: osinfo-db-tools +Version: 1.11.0 +Release: %autorelease +License: GPL-2.0-or-later +Source: https://releases.pagure.org/libosinfo/%{name}-%{version}.tar.xz +URL: https://libosinfo.org + +# Fix build for libxml2-2.12 +Patch: https://gitlab.com/libosinfo/osinfo-db-tools/-/merge_requests/80.patch + +BuildRequires: meson +BuildRequires: gcc +BuildRequires: gettext-devel +BuildRequires: git +BuildRequires: glib2-devel +BuildRequires: libxml2-devel >= 2.6.0 +BuildRequires: libxslt-devel >= 1.0.0 +%if 0%{?fedora} > 36 || 0%{?rhel} > 9 +BuildRequires: libsoup3-devel +%else +BuildRequires: libsoup-devel +%endif +BuildRequires: libarchive-devel +BuildRequires: json-glib-devel +BuildRequires: /usr/bin/pod2man + +#Required for testing purposes +BuildRequires: python3 +BuildRequires: python3-pytest +BuildRequires: python3-requests + +%if %{with_mingw} +BuildRequires: mingw32-filesystem +BuildRequires: mingw32-gcc +BuildRequires: mingw32-binutils +BuildRequires: mingw32-glib2 +BuildRequires: mingw32-json-glib +BuildRequires: mingw32-libxml2 +BuildRequires: mingw32-libxslt +BuildRequires: mingw32-libarchive +BuildRequires: mingw32-libsoup + +BuildRequires: mingw64-filesystem +BuildRequires: mingw64-gcc +BuildRequires: mingw64-binutils +BuildRequires: mingw64-glib2 +BuildRequires: mingw64-json-glib +BuildRequires: mingw64-libxml2 +BuildRequires: mingw64-libxslt +BuildRequires: mingw64-libarchive +BuildRequires: mingw64-libsoup +%endif + +%description +This package provides tools for managing the osinfo database of +information about operating systems for use with virtualization + +%if %{with_mingw} +%package -n mingw32-osinfo-db-tools +Summary: %{summary} +BuildArch: noarch +Requires: pkgconfig + +%description -n mingw32-osinfo-db-tools +This package provides tools for managing the osinfo database of +information about operating systems for use with virtualization + +%package -n mingw64-osinfo-db-tools +Summary: %{summary} +BuildArch: noarch +Requires: pkgconfig + +%description -n mingw64-osinfo-db-tools +This package provides tools for managing the osinfo database of +information about operating systems for use with virtualization + +%{?mingw_debug_package} +%endif + +%prep +%autosetup -S git + +%build +%meson +%meson_build + +%if %{with_mingw} +%mingw_meson +%mingw_ninja +%endif + +%check +%meson_test + +%install +%meson_install + +%find_lang %{name} + +%if %{with_mingw} +%mingw_ninja_install + +# Manpages don't need to be bundled +rm -rf $RPM_BUILD_ROOT%{mingw32_datadir}/man +rm -rf $RPM_BUILD_ROOT%{mingw64_datadir}/man + +%mingw_debug_install_post + +%mingw_find_lang osinfo-db-tools +%endif + +%files -f %{name}.lang +%doc NEWS README +%license COPYING +%{_bindir}/osinfo-db-export +%{_bindir}/osinfo-db-import +%{_bindir}/osinfo-db-path +%{_bindir}/osinfo-db-validate +%{_mandir}/man1/osinfo-db-export.1* +%{_mandir}/man1/osinfo-db-import.1* +%{_mandir}/man1/osinfo-db-path.1* +%{_mandir}/man1/osinfo-db-validate.1* + +%if %{with_mingw} +%files -n mingw32-osinfo-db-tools -f mingw32-osinfo-db-tools.lang +%doc NEWS README +%license COPYING +%{mingw32_bindir}/osinfo-db-export.exe +%{mingw32_bindir}/osinfo-db-import.exe +%{mingw32_bindir}/osinfo-db-path.exe +%{mingw32_bindir}/osinfo-db-validate.exe + +%files -n mingw64-osinfo-db-tools -f mingw64-osinfo-db-tools.lang +%doc NEWS README +%license COPYING +%{mingw64_bindir}/osinfo-db-export.exe +%{mingw64_bindir}/osinfo-db-import.exe +%{mingw64_bindir}/osinfo-db-path.exe +%{mingw64_bindir}/osinfo-db-validate.exe +%endif + +%changelog diff --git a/sources b/sources new file mode 100644 index 0000000..b0e13dd --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (osinfo-db-tools-1.11.0.tar.xz) = adab5b16d8fcbae89619eb12f669fa4c7765a65af54a864995e3a9131bb18ee62568c8f7ed166f0400e5e622f56844ba53ed9ef5c2322e33acb9ef1cf0c94701