From c2550c0c3a0de877efef19f7f8a6f3e2091bbd66 Mon Sep 17 00:00:00 2001 From: cherry530 <707078654@qq.com> Date: Thu, 10 Aug 2023 17:00:43 +0800 Subject: [PATCH] fix build error due to libxml2 upgrade Signed-off-by: cherry530 <707078654@qq.com> --- ...ed-private-symbol-for-libxml2-2.11.0.patch | 31 +++++++++++++++++++ raptor2.spec | 9 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Remove-the-access-to-entities-checked-private-symbol-for-libxml2-2.11.0.patch diff --git a/Remove-the-access-to-entities-checked-private-symbol-for-libxml2-2.11.0.patch b/Remove-the-access-to-entities-checked-private-symbol-for-libxml2-2.11.0.patch new file mode 100644 index 0000000..1c71887 --- /dev/null +++ b/Remove-the-access-to-entities-checked-private-symbol-for-libxml2-2.11.0.patch @@ -0,0 +1,31 @@ +From 4dbc4c1da2a033c497d84a1291c46f416a9cac51 Mon Sep 17 00:00:00 2001 +From: David Anes +Date: Thu, 4 May 2023 11:54:02 +0200 +Subject: [PATCH] Remove the access to entities 'checked' private symbol for + libxml2 2.11.0 + +Since version 2.11.0, some private symbols that were never intended +as public API/ABI have been removed from libxml2, therefore the field +'checked' is no longer present and raptor fails to build in this +scenario. +--- + src/raptor_libxml.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/raptor_libxml.c b/src/raptor_libxml.c +index 538c2c8e..8bcee139 100644 +--- a/src/raptor_libxml.c ++++ b/src/raptor_libxml.c +@@ -246,10 +246,11 @@ raptor_libxml_getEntity(void* user_data, const xmlChar *name) + + ret->owner = 1; + +-#if LIBXML_VERSION >= 20627 ++#if LIBXML_VERSION >= 20627 && LIBXML_VERSION < 21100 + /* Checked field was released in 2.6.27 on 2006-10-25 + * http://git.gnome.org/browse/libxml2/commit/?id=a37a6ad91a61d168ecc4b29263def3363fff4da6 + * ++ * and was later removed in version 2.11.0 + */ + + /* Mark this entity as having been checked - never do this again */ diff --git a/raptor2.spec b/raptor2.spec index c8a67b4..ae85858 100644 --- a/raptor2.spec +++ b/raptor2.spec @@ -1,11 +1,15 @@ Name: raptor2 Version: 2.0.15 -Release: 18 +Release: 19 Summary: Raptor RDF parsing and serializing utility License: GPLv2+ or LGPLv2+ or ASL 2.0 URL: http://librdf.org/raptor/ Source: http://download.librdf.org/source/raptor2-%{version}.tar.gz + Patch0: CVE-2020-25713.patch +#upstream https://github.com/dajobe/raptor/commit/4dbc4c1da2a033c497d84a1291c46f416a9cac51 +Patch1: Remove-the-access-to-entities-checked-private-symbol-for-libxml2-2.11.0.patch + BuildRequires: gcc-c++ curl-devel gtk-doc libicu-devel pkgconfig(libxslt) yajl-devel Conflicts: raptor < 1.4.21-10 @@ -68,6 +72,9 @@ make check %{_mandir}/man3/libraptor2* %changelog +* Thu Aug 10 2023 xu_ping <707078654@qq.com> - 2.0.15-19 +- fix build error due to libxml2 upgrade + * Wed Jul 20 2022 liangqifeng - 2.0.15-18 - Fix CVE-2020-25713 -- Gitee