diff --git a/1001-remove-unused-global-variable-missing-extern.patch b/1001-remove-unused-global-variable-missing-extern.patch new file mode 100644 index 0000000000000000000000000000000000000000..ff808dfb5c814f16ae0daed43b823d35eb5720ae --- /dev/null +++ b/1001-remove-unused-global-variable-missing-extern.patch @@ -0,0 +1,29 @@ +From 3237f44ba7e4712653b64b36cc58b74d2d56d14f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= +Date: Wed, 29 Jan 2020 09:08:34 +0100 +Subject: [PATCH] Remove unused global variable UnfoObjListIt (RhBug:1793424) + +This global header file variable wasn't declared using extern keyword +which was causing problems with gcc 10 (gcc 10 no longer ignores this +error). + +https://bugzilla.redhat.com/show_bug.cgi?id=1793424 +--- + libcomps/src/comps_objlist.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcomps/src/comps_objlist.h b/libcomps/src/comps_objlist.h +index 0fcd48b..1d19167 100644 +--- a/libcomps/src/comps_objlist.h ++++ b/libcomps/src/comps_objlist.h +@@ -34,7 +34,7 @@ typedef struct COMPS_ObjListIt COMPS_ObjListIt; + struct COMPS_ObjListIt { + COMPS_Object *comps_obj; + COMPS_ObjListIt *next; +-} UnfoObjListIt; ++}; + + + /** COMPS_Object derivate representing category element in comps.xml structure*/ +-- +2.25.0 diff --git a/1002-Make-inline-function-__comps_objmrtree_all-also-stat.patch b/1002-Make-inline-function-__comps_objmrtree_all-also-stat.patch new file mode 100644 index 0000000000000000000000000000000000000000..6f1b4da35c22a32c9d0be54879b71c7d1eb33b36 --- /dev/null +++ b/1002-Make-inline-function-__comps_objmrtree_all-also-stat.patch @@ -0,0 +1,30 @@ +From 18f52cb30d577d519190076ab14ff599a6e4a6c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= +Date: Wed, 29 Jan 2020 09:27:27 +0100 +Subject: [PATCH] Make inline function __comps_objmrtree_all also static + (RhBug:1793424) + +The function isn't used anywhere else and doesn't have any other +external definition present in any other translation unit (which is +causing a compiler error). + +https://bugzilla.redhat.com/show_bug.cgi?id=1793424 +--- + libcomps/src/comps_objmradix.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libcomps/src/comps_objmradix.c b/libcomps/src/comps_objmradix.c +index 22ad262..509457a 100644 +--- a/libcomps/src/comps_objmradix.c ++++ b/libcomps/src/comps_objmradix.c +@@ -605,7 +605,7 @@ inline void comps_objmrtree_pair_destroy_v(void * pair) { + free(pair); + } + +-inline COMPS_HSList* __comps_objmrtree_all(COMPS_ObjMRTree * rt, char keyvalpair) { ++static inline COMPS_HSList* __comps_objmrtree_all(COMPS_ObjMRTree * rt, char keyvalpair) { + COMPS_HSList *to_process, *ret; + COMPS_HSListItem *hsit, *oldit; + size_t x; +-- +1.8.3.1 diff --git a/libcomps.spec b/libcomps.spec index 281f2c3cc1e3beeea113b6c9a02f127d834f0b36..2dbc28457aef6f3483db62fcb56e068e326994c5 100644 --- a/libcomps.spec +++ b/libcomps.spec @@ -1,8 +1,9 @@ +%define anolis_release .0.1 %define __cmake_in_source_build 1 Name: libcomps Version: 0.1.16 -Release: 2%{?dist} +Release: 2%{anolis_release}%{?dist} Summary: Comps XML file manipulation library License: GPLv2+ @@ -10,6 +11,12 @@ URL: https://github.com/rpm-software-management/libcomps Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz Patch1: 0001-Dont-print-empty-requires.patch +# Begin: Anolis customized patches +# backport patch from upstream +Patch1001: 1001-remove-unused-global-variable-missing-extern.patch +Patch1002: 1002-Make-inline-function-__comps_objmrtree_all-also-stat.patch +# End: Anolis customized patches + BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: gcc @@ -115,6 +122,9 @@ popd %{python3_sitearch}/%{name}-%{version}-py%{python3_version}.egg-info %changelog +* Thu Jan 20 2022 Weitao Zhou - 0.1.16-2.0.1 +- Fix gcc10 build issue + * Fri May 21 2021 Pavla Kratochvilova - 0.1.16-2 - Backport patch: Don't print empty requires