configure.ac | 2 download.lst | 4 external/redland/ExternalProject_raptor.mk | 17 ++- external/redland/ExternalProject_redland.mk | 6 - external/redland/Library_raptor.mk | 2 external/redland/README | 2 external/redland/UnpackedTarball_raptor.mk | 5 - external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1 | 33 ------- external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 | 43 --------- external/redland/raptor/Wint-conversion.patch | 22 ---- external/redland/raptor/libtool.patch | 27 ----- external/redland/raptor/raptor-android.patch.1 | 10 +- external/redland/raptor/raptor-bundled-soname.patch.1 | 12 +- external/redland/raptor/raptor-emscripten.patch.1 | 8 - external/redland/raptor/raptor-freebsd.patch.1 | 31 ++---- external/redland/raptor/raptor-icu.patch | 11 ++ external/redland/raptor/raptor-msvc.patch.1 | 10 -- external/redland/raptor/raptor2.h | 32 +++++- external/redland/raptor/raptor_config.h | 46 ++++------ external/redland/raptor/ubsan.patch | 14 --- external/redland/raptor/xml2-config.patch | 6 - external/redland/rasqal/rasqal-pkgconfig.patch.1 | 3 22 files changed, 106 insertions(+), 240 deletions(-)
New commits: commit ae7972baa8847712fcfde97cced2bb4791b793d9 Author: Taichi haradaguchi <20001...@ymail.ne.jp> AuthorDate: Sat Jan 6 14:49:07 2024 +0900 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Feb 3 16:40:49 2025 +0100 Upgrade raptor to 2.0.16 - Fixes CVE-2017-18926 and CVE-2020-25713. - drop 0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1: merged upstream - drop 0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1: merged upstream - drop libtool.patch: merged upstream - drop most of raptor-freebsd.patch.1: merged upstream - drop most of raptor-msvc.patch.1: merged upsttream - drop most of ubsan.patch: merged upstream - drop Wint-conversion.patch: merged upstream depend on package icu_ure to have libicuuc delivered and add corresponding directory to rpath-link to make sure the right copy is picked up use $(strip ...) in LDFLAGS to avoid having to escape , with $(COMMA) (cherry-picked from c75c21eef670fce33eb5a501357935dbd25be923) Change-Id: Ic05269ade5dae3761d98432ee504a51434a4c753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161704 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181057 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/configure.ac b/configure.ac index 34af474b0046..85a8476948ca 100644 --- a/configure.ac +++ b/configure.ac @@ -10921,7 +10921,7 @@ dnl =================================================================== ICU_MAJOR=73 ICU_MINOR=2 ICU_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common" -ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib" +ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib -licuuc" libo_CHECK_SYSTEM_MODULE([icu],[ICU],[icu-i18n >= 66]) if test "$SYSTEM_ICU" = TRUE; then AC_LANG_PUSH([C++]) diff --git a/download.lst b/download.lst index feb268db4e5a..0c4679e5b4ac 100644 --- a/download.lst +++ b/download.lst @@ -668,8 +668,8 @@ QXP_TARBALL := libqxp-0.0.2.tar.xz # three static lines # so that git cherry-pick # will not run into conflicts -RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed -RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz +RAPTOR_SHA256SUM := 089db78d7ac982354bdbf39d973baf09581e6904ac4c92a98c5caadb3de44680 +RAPTOR_TARBALL := raptor2-2.0.16.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/redland/ExternalProject_raptor.mk b/external/redland/ExternalProject_raptor.mk index 2cf4c30cface..31face289f6d 100644 --- a/external/redland/ExternalProject_raptor.mk +++ b/external/redland/ExternalProject_raptor.mk @@ -9,7 +9,12 @@ $(eval $(call gb_ExternalProject_ExternalProject,raptor)) -$(eval $(call gb_ExternalProject_use_external,raptor,libxml2)) +$(eval $(call gb_ExternalProject_use_externals,raptor,\ + icu \ + libxml2 \ +)) + +$(eval $(call gb_ExternalProject_use_package,raptor,icu_ure)) $(eval $(call gb_ExternalProject_register_targets,raptor,\ build \ @@ -24,9 +29,9 @@ $(call gb_ExternalProject_get_state_target,raptor,build): $(call gb_ExternalProject_get_build_flags,raptor) \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden) \ $(if $(filter GCCLINUXPOWERPC64,$(COM)$(OS)$(CPUNAME)),-mminimal-toc)" \ - LDFLAGS=" \ - $(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\"\$$\$$ORIGIN") \ - $(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl))" \ + LDFLAGS='$(strip \ + $(if $(filter LINUX FREEBSD,$(OS)),$(strip -Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN -Wl,-rpath-link,$(INSTROOT)/$(LIBO_URE_LIB_FOLDER))) \ + $(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl)))' \ CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) $(gb_EMSCRIPTEN_CPPFLAGS)" \ $(gb_RUN_CONFIGURE) ./configure --disable-gtk-doc \ --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \ diff --git a/external/redland/ExternalProject_redland.mk b/external/redland/ExternalProject_redland.mk index 0f7afa6d8182..238384a1a545 100644 --- a/external/redland/ExternalProject_redland.mk +++ b/external/redland/ExternalProject_redland.mk @@ -25,9 +25,9 @@ $(call gb_ExternalProject_get_state_target,redland,build): $(call gb_ExternalProject_run,build,\ $(if $(filter -fsanitize=undefined,$(CC)),CC='$(CC) -fno-sanitize=function') \ CFLAGS="$(CFLAGS) $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden) $(call gb_ExternalProject_get_build_flags,redland) $(gb_EMSCRIPTEN_CPPFLAGS)" \ - LDFLAGS=" \ - $(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\"\$$\$$ORIGIN") \ - $(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl))" \ + LDFLAGS='$(strip \ + $(if $(filter LINUX FREEBSD,$(OS)),$(strip -Wl,-z,origin -Wl,-rpath,\$$$$ORIGIN -Wl,-rpath-link,$(INSTROOT)/$(LIBO_URE_LIB_FOLDER))) \ + $(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl)))' \ CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include)" \ PKG_CONFIG="" \ RAPTOR2_CFLAGS="-I$(call gb_UnpackedTarball_get_dir,raptor)/src" \ diff --git a/external/redland/Library_raptor.mk b/external/redland/Library_raptor.mk index b2779f7dec17..9cfc4aeb36fc 100644 --- a/external/redland/Library_raptor.mk +++ b/external/redland/Library_raptor.mk @@ -17,6 +17,8 @@ $(eval $(call gb_Library_set_include,raptor2, \ $(eval $(call gb_Library_use_unpacked,raptor2,raptor)) $(eval $(call gb_Library_use_externals,raptor2,\ + icu_headers \ + icuuc \ libxml2 \ libxslt \ )) diff --git a/external/redland/README b/external/redland/README index 591e93398726..efa6f45d71ba 100644 --- a/external/redland/README +++ b/external/redland/README @@ -1,4 +1,4 @@ -Redland RDF library (librdf) from [http://librdf.org/] +Redland RDF library (librdf) from [https://librdf.org/] == License == [git:redland/LICENSE.txt] diff --git a/external/redland/UnpackedTarball_raptor.mk b/external/redland/UnpackedTarball_raptor.mk index ae61e9e4f3dd..6dc6491132df 100644 --- a/external/redland/UnpackedTarball_raptor.mk +++ b/external/redland/UnpackedTarball_raptor.mk @@ -28,11 +28,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\ external/redland/raptor/ubsan.patch \ $(if $(SYSTEM_LIBXML),,external/redland/raptor/rpath.patch) \ external/redland/raptor/xml2-config.patch \ - external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 \ - external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1 \ - external/redland/raptor/libtool.patch \ - external/redland/raptor/Wint-conversion.patch \ external/redland/raptor/raptor-libxml2-11.patch.1 \ + $(if $(SYSTEM_ICU),,external/redland/raptor/raptor-icu.patch) \ )) # vim: set noet sw=4 ts=4: diff --git a/external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1 b/external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1 deleted file mode 100644 index 1fb279df3e4d..000000000000 --- a/external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1 +++ /dev/null @@ -1,33 +0,0 @@ -From a549457461874157c8c8e8e8a6e0eec06da4fbd0 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caol...@redhat.com> -Date: Tue, 24 Nov 2020 10:30:20 +0000 -Subject: [PATCH] CVE-2020-25713 raptor2: malformed input file can lead to a - segfault - -due to an out of bounds array access in -raptor_xml_writer_start_element_common - -See: -https://bugs.mageia.org/show_bug.cgi?id=27605 -https://www.openwall.com/lists/oss-security/2020/11/13/1 -https://gerrit.libreoffice.org/c/core/+/106249 ---- - src/raptor_xml_writer.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c -index 56993dc3..4426d38c 100644 ---- a/src/raptor_xml_writer.c -+++ b/src/raptor_xml_writer.c -@@ -227,7 +227,7 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer, - - /* check it wasn't an earlier declaration too */ - for(j = 0; j < nspace_declarations_count; j++) -- if(nspace_declarations[j].nspace == element->attributes[j]->nspace) { -+ if(nspace_declarations[j].nspace == element->attributes[i]->nspace) { - declare_me = 0; - break; - } --- -2.28.0 - diff --git a/external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 b/external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 deleted file mode 100644 index 6fa726cae6da..000000000000 --- a/external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1 +++ /dev/null @@ -1,43 +0,0 @@ -From 590681e546cd9aa18d57dc2ea1858cb734a3863f Mon Sep 17 00:00:00 2001 -From: Dave Beckett <d...@dajobe.org> -Date: Sun, 16 Apr 2017 23:15:12 +0100 -Subject: [PATCH] Calcualte max nspace declarations correctly for XML writer - -(raptor_xml_writer_start_element_common): Calculate max including for -each attribute a potential name and value. - -Fixes Issues #0000617 http://bugs.librdf.org/mantis/view.php?id=617 -and #0000618 http://bugs.librdf.org/mantis/view.php?id=618 ---- - src/raptor_xml_writer.c | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/src/raptor_xml_writer.c b/src/raptor_xml_writer.c -index 693b946..0d3a36a 100644 ---- a/src/raptor_xml_writer.c -+++ b/src/raptor_xml_writer.c -@@ -181,9 +181,10 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer, - size_t nspace_declarations_count = 0; - unsigned int i; - -- /* max is 1 per element and 1 for each attribute + size of declared */ - if(nstack) { -- int nspace_max_count = element->attribute_count+1; -+ int nspace_max_count = element->attribute_count * 2; /* attr and value */ -+ if(element->name->nspace) -+ nspace_max_count++; - if(element->declared_nspaces) - nspace_max_count += raptor_sequence_size(element->declared_nspaces); - if(element->xml_language) -@@ -237,7 +238,7 @@ raptor_xml_writer_start_element_common(raptor_xml_writer* xml_writer, - } - } - -- /* Add the attribute + value */ -+ /* Add the attribute's value */ - nspace_declarations[nspace_declarations_count].declaration= - raptor_qname_format_as_xml(element->attributes[i], - &nspace_declarations[nspace_declarations_count].length); --- -2.9.3 - diff --git a/external/redland/raptor/Wint-conversion.patch b/external/redland/raptor/Wint-conversion.patch deleted file mode 100644 index fb85f4f13518..000000000000 --- a/external/redland/raptor/Wint-conversion.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- src/raptor_parse.c -+++ src/raptor_parse.c -@@ -257,7 +257,7 @@ - int - raptor_world_get_parsers_count(raptor_world* world) - { -- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); -+ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, 0); - - raptor_world_open(world); - ---- src/raptor_serialize.c -+++ src/raptor_serialize.c -@@ -240,7 +240,7 @@ - int - raptor_world_get_serializers_count(raptor_world* world) - { -- RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); -+ RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, 0); - - raptor_world_open(world); - diff --git a/external/redland/raptor/libtool.patch b/external/redland/raptor/libtool.patch deleted file mode 100644 index b0baae661bab..000000000000 --- a/external/redland/raptor/libtool.patch +++ /dev/null @@ -1,27 +0,0 @@ ---- build/ltmain.sh -+++ build/ltmain.sh -@@ -5301,6 +5301,12 @@ - prev= - continue - ;; -+ mllvm) -+ # Clang does not use LLVM to link, so we can simply discard any -+ # '-mllvm $arg' options when doing the link step. -+ prev= -+ continue -+ ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg -@@ -5639,6 +5645,11 @@ - continue - ;; - -+ -mllvm) -+ prev=mllvm -+ continue -+ ;; -+ - -module) - module=yes - continue diff --git a/external/redland/raptor/raptor-android.patch.1 b/external/redland/raptor/raptor-android.patch.1 index cb843839c848..854f1c6b3932 100644 --- a/external/redland/raptor/raptor-android.patch.1 +++ b/external/redland/raptor/raptor-android.patch.1 @@ -1,13 +1,13 @@ No sonames on Android ---- a/configure 2013-03-29 19:46:34.922901756 +0100 -+++ b/configure 2013-03-29 19:46:56.051901574 +0100 -@@ -9866,7 +9866,7 @@ +--- a/configure 2023-03-02 02:58:10.000000000 +0900 ++++ b/configure 2024-03-07 21:32:06.394607400 +0900 +@@ -11165,7 +11165,7 @@ *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac -- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' +- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' + archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags -o $lib' - if test "x$supports_anon_versioning" = xyes; then + if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ diff --git a/external/redland/raptor/raptor-bundled-soname.patch.1 b/external/redland/raptor/raptor-bundled-soname.patch.1 index cce2482d147f..5e3eef560542 100644 --- a/external/redland/raptor/raptor-bundled-soname.patch.1 +++ b/external/redland/raptor/raptor-bundled-soname.patch.1 @@ -1,11 +1,11 @@ rhbz#809466 change soname of bundled redland libs ---- a/src/Makefile.in 2013-03-29 19:11:27.944919859 +0100 -+++ b/src/Makefile.in 2013-03-29 19:17:42.173916644 +0100 -@@ -507,7 +507,7 @@ - $(am__append_21) $(am__append_22) $(am__append_23) \ - $(am__append_24) $(am__append_25) $(am__append_26) - libraptor2_la_LIBADD = $(am__append_29) @LTLIBOBJS@ +--- a/src/Makefile.in 2023-03-02 02:58:09.000000000 +0900 ++++ b/src/Makefile.in 2024-01-06 13:59:13.424477428 +0900 +@@ -783,7 +783,7 @@ + $(am__append_24) $(am__append_25) $(am__append_26) \ + $(am__append_27) $(am__append_28) + libraptor2_la_LIBADD = $(am__append_31) @LTLIBOBJS@ -libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \ +libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ -release lo \ @RAPTOR_LDFLAGS@ $(MEM_LIBS) diff --git a/external/redland/raptor/raptor-emscripten.patch.1 b/external/redland/raptor/raptor-emscripten.patch.1 index e3c53b35b7b0..847ccfe8341b 100644 --- a/external/redland/raptor/raptor-emscripten.patch.1 +++ b/external/redland/raptor/raptor-emscripten.patch.1 @@ -1,12 +1,12 @@ -*- Mode: Diff -*- --- raptor/src/sort_r.h +++ raptor/src/sort_r.h -@@ -27,7 +27,7 @@ - defined AMIGA) +@@ -28,7 +28,7 @@ # define _SORT_R_BSD #elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \ -- defined __linux__ || defined __MINGW32__ || defined __GLIBC__) -+ defined __linux__ || defined __MINGW32__ || defined __GLIBC__ || defined __EMSCRIPTEN__) + defined __linux__ || defined __MINGW32__ || defined __GLIBC__ || \ +- defined __CYGWIN__) ++ defined __CYGWIN__ || defined __EMSCRIPTEN__) # define _SORT_R_LINUX #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__) # define _SORT_R_WINDOWS diff --git a/external/redland/raptor/raptor-freebsd.patch.1 b/external/redland/raptor/raptor-freebsd.patch.1 index 349f3a197b8a..3909ada0a335 100644 --- a/external/redland/raptor/raptor-freebsd.patch.1 +++ b/external/redland/raptor/raptor-freebsd.patch.1 @@ -1,28 +1,17 @@ Usual patch to produce Linux-like .so files on FreeBSD ---- a/build/ltmain.sh 2008-02-02 22:28:24.000000000 +0900 -+++ b/build/ltmain.sh 2008-07-08 11:58:42.000000000 +0900 -@@ -7341,9 +7341,9 @@ - revision="$number_revision" +--- a/build/ltmain.sh 2023-02-24 11:51:18.000000000 +0900 ++++ b/build/ltmain.sh 2024-01-06 13:46:15.460224000 +0900 +@@ -9107,9 +9107,9 @@ + revision=$number_revision ;; - freebsd-aout|freebsd-elf|qnx|sunos) -- current="$number_major" -- revision="$number_minor" -- age="0" + freebsd-aout|qnx|sunos) +- current=$number_major +- revision=$number_minor +- age=0 + current=`expr $number_major + $number_minor` -+ age="$number_minor" -+ revision="$number_revision" ++ age=$number_minor ++ revision=$number_revision ;; irix|nonstopux) func_arith $number_major + $number_minor -@@ -7420,8 +7420,8 @@ - ;; - - freebsd-elf) -- major=".$current" -- versuffix=".$current" -+ major=.`expr $current - $age` -+ versuffix="$major.$age.$revision" - ;; - - irix | nonstopux) diff --git a/external/redland/raptor/raptor-icu.patch b/external/redland/raptor/raptor-icu.patch new file mode 100644 index 000000000000..227392dc5539 --- /dev/null +++ b/external/redland/raptor/raptor-icu.patch @@ -0,0 +1,11 @@ +--- configure 2023-03-02 02:58:10.000000000 +0900 ++++ configure 2024-05-11 16:19:06.843539720 +0900 +@@ -16583,7 +16583,7 @@ + printf "%s " "yes" >&6; } + + have_icu=yes +- ICU_UC_VERSION=`$PKG_CONFIG icu-uc --modversion` ++ ICU_UC_VERSION="$ICU_MAJOR.$ICU_MINOR" + + fi + ICU_UC_MAJOR_VERSION=`echo "$ICU_UC_VERSION" | sed -e 's/\..*$//'` diff --git a/external/redland/raptor/raptor-msvc.patch.1 b/external/redland/raptor/raptor-msvc.patch.1 index 245b19bdca70..7bf9c76d01e8 100644 --- a/external/redland/raptor/raptor-msvc.patch.1 +++ b/external/redland/raptor/raptor-msvc.patch.1 @@ -1,13 +1,3 @@ ---- raptor/src/raptor2.h.in.orig 2016-08-26 23:45:34.543400074 +0200 -+++ raptor/src/raptor2.h.in 2016-08-26 23:45:40.479399614 +0200 -@@ -2176,6 +2176,7 @@ - void* raptor_avltree_iterator_get(raptor_avltree_iterator* iterator); - - /* utility methods */ -+RAPTOR_API - void raptor_sort_r(void *base, size_t nel, size_t width, raptor_data_compare_arg_handler compar, void *user_data); - - --- raptor/src/raptor_uri.c 2016-08-26 23:45:34.543400074 +0200 +++ raptor/src/raptor_uri.c 2016-08-26 23:45:40.479399614 +0200 @@ -51,6 +51,10 @@ diff --git a/external/redland/raptor/raptor2.h b/external/redland/raptor/raptor2.h index 4929117e772e..72935aa73a29 100644 --- a/external/redland/raptor/raptor2.h +++ b/external/redland/raptor/raptor2.h @@ -53,14 +53,14 @@ extern "C" { * * Format: major * 10000 + minor * 100 + release */ -#define RAPTOR_VERSION 20015 +#define RAPTOR_VERSION 20016 /** * RAPTOR_VERSION_STRING: * * Raptor library version string */ -#define RAPTOR_VERSION_STRING "2.0.15" +#define RAPTOR_VERSION_STRING "2.0.16" /** * RAPTOR_VERSION_MAJOR: @@ -81,7 +81,7 @@ extern "C" { * * Raptor library release */ -#define RAPTOR_VERSION_RELEASE 15 +#define RAPTOR_VERSION_RELEASE 16 /** * RAPTOR_API: @@ -251,6 +251,14 @@ extern const unsigned int raptor_rdf_namespace_uri_len; RAPTOR_API extern const unsigned char * const raptor_rdf_schema_namespace_uri; +/** + * raptor_rdf_schenma_namespace_uri_len: + * + * Length of #raptor_rdf_schenma_namespace_uri string + */ +RAPTOR_API +extern const unsigned int raptor_rdf_schema_namespace_uri_len; + /** * raptor_xmlschema_datatypes_namespace_uri: * @@ -1433,10 +1441,16 @@ int raptor_www_set_ssl_cert_options(raptor_www* www, const char* cert_filename, RAPTOR_API int raptor_www_set_ssl_verify_options(raptor_www* www, int verify_peer, int verify_host); RAPTOR_API +int raptor_www_set_user_agent2(raptor_www *www, const char *user_agent, size_t user_agent_len); +RAPTOR_API RAPTOR_DEPRECATED void raptor_www_set_user_agent(raptor_www *www, const char *user_agent); RAPTOR_API +int raptor_www_set_proxy2(raptor_www *www, const char *proxy, size_t proxy_len); +RAPTOR_API RAPTOR_DEPRECATED void raptor_www_set_proxy(raptor_www *www, const char *proxy); RAPTOR_API +int raptor_www_set_http_accept2(raptor_www *www, const char *value, size_t value_len); +RAPTOR_API RAPTOR_DEPRECATED void raptor_www_set_http_accept(raptor_www *www, const char *value); RAPTOR_API void raptor_www_set_write_bytes_handler(raptor_www *www, raptor_www_write_bytes_handler handler, void *user_data); @@ -1812,8 +1826,8 @@ int raptor_iostream_read_eof(raptor_iostream *iostr); /** * raptor_escaped_write_bitflags: * @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF : Allow , - * @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU : ALlow \u - * @RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8 : Allow UTF-8 for printable U * + * @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU : Allow \u \U + * @RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8 : Use UTF-8 instead of \u \U for U+0080 or larger (will always use \u for U+0000..U+001F and U+007F) * @RAPTOR_ESCAPED_WRITE_BITFLAG_SPARQL_URI_ESCAPES: Must escape #x00-#x20<>\"{}|^` in URIs * @RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL: N-Triples literal * @RAPTOR_ESCAPED_WRITE_NTRIPLES_URI: N-Triples URI @@ -1823,7 +1837,7 @@ int raptor_iostream_read_eof(raptor_iostream *iostr); * @RAPTOR_ESCAPED_WRITE_TURTLE_URI: Turtle 2013 URIs (like SPARQL) * @RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL: Turtle 2013 literals (like SPARQL) * @RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL: Turtle 2013 long literals (like SPARQL) - * @RAPTOR_ESCAPED_WRITE_JSON_LITERAL: JSON literals: and \u \U + * @RAPTOR_ESCAPED_WRITE_JSON_LITERAL: JSON literals: UTF-8 plus , \uXXXX only, no \U * * Bit flags for raptor_string_escaped_write() and friends. */ @@ -1851,8 +1865,8 @@ typedef enum { RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL = RAPTOR_ESCAPED_WRITE_SPARQL_LITERAL, RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL = RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL, - /* JSON literals: and \u \U */ - RAPTOR_ESCAPED_WRITE_JSON_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU | RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF + /* JSON literals: UTF-8 plus \uXXXX */ + RAPTOR_ESCAPED_WRITE_JSON_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU | RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF | RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8 } raptor_escaped_write_bitflags; @@ -2153,6 +2167,8 @@ void* raptor_avltree_remove(raptor_avltree* tree, void* p_data); RAPTOR_API int raptor_avltree_delete(raptor_avltree* tree, void* p_data); RAPTOR_API +void raptor_avltree_trim(raptor_avltree* tree); +RAPTOR_API void* raptor_avltree_search(raptor_avltree* tree, const void* p_data); RAPTOR_API int raptor_avltree_visit(raptor_avltree* tree, raptor_avltree_visit_handler visit_handler, void* user_data); diff --git a/external/redland/raptor/raptor_config.h b/external/redland/raptor/raptor_config.h index 74f58de95e94..b1e663519eee 100644 --- a/external/redland/raptor/raptor_config.h +++ b/external/redland/raptor/raptor_config.h @@ -66,12 +66,6 @@ /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 -/* Define to 1 if you have the <math.h> header file. */ -#define HAVE_MATH_H 1 - -/* Define to 1 if you have the <memory.h> header file. */ -#undef HAVE_MEMORY_H - /* Define to 1 if you have the `qsort_r' function. */ #undef HAVE_QSORT_R @@ -99,6 +93,9 @@ /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H +/* Define to 1 if you have the <stdio.h> header file. */ +#define HAVE_STDIO_H 1 + /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 @@ -114,7 +111,7 @@ /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 -/* Define to 1 if you have the `strtok_r' function. */ +/* have the strtok_r function */ #undef HAVE_STRTOK_R /* Define to 1 if you have the <sys/param.h> header file. */ @@ -129,6 +126,9 @@ /* Define to 1 if you have the <sys/types.h> header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H @@ -156,8 +156,10 @@ /* Is __FUNCTION__ available */ #define HAVE___FUNCTION__ 1 -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ +/* ICU UC major version */ +#define ICU_UC_MAJOR_VERSION ICU_MAJOR + +/* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if maintainer mode is enabled. */ @@ -166,9 +168,6 @@ /* need 'extern int optind' declaration? */ #undef NEED_OPTIND_DECLARATION -/* Define to 1 if your C compiler doesn't accept -c and -o together. */ -#undef NO_MINUS_C_MINUS_O - /* Name of package */ #undef PACKAGE @@ -194,7 +193,7 @@ #undef RAPTOR_DEBUG /* Use ICU for Unicode NFC check */ -#undef RAPTOR_ICU_NFC +#define RAPTOR_ICU_NFC 1 /* does libxml struct xmlEntity have a field etype */ #define RAPTOR_LIBXML_ENTITY_ETYPE 1 @@ -259,6 +258,9 @@ /* Building JSON serializer */ #undef RAPTOR_SERIALIZER_JSON +/* Building mKR serializer */ +#undef RAPTOR_SERIALIZER_MKR + /* Building N-Quads serializer */ #undef RAPTOR_SERIALIZER_NQUADS @@ -278,7 +280,7 @@ #undef RAPTOR_SERIALIZER_TURTLE /* Release version as a decimal */ -#define RAPTOR_VERSION_DECIMAL 20015 +#define RAPTOR_VERSION_DECIMAL 20016 /* Major version number */ #define RAPTOR_VERSION_MAJOR 2 @@ -287,7 +289,7 @@ #define RAPTOR_VERSION_MINOR 0 /* Release version number */ -#define RAPTOR_VERSION_RELEASE 15 +#define RAPTOR_VERSION_RELEASE 16 /* Have libcurl WWW library */ #undef RAPTOR_WWW_LIBCURL @@ -307,14 +309,13 @@ /* Use libxml XML parser */ #define RAPTOR_XML_LIBXML 1 -/* Define to 1 if you have the ANSI C header files. */ +/* Define to 1 if all of the C90 standard headers exist (not just the ones + required in a freestanding environment). This macro is provided for + backward compatibility; new code need not use it. */ #undef STDC_HEADERS -/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ -#undef TIME_WITH_SYS_TIME - /* Version number of package */ -#define VERSION "2.0.15" +#define VERSION "2.0.16" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ @@ -332,11 +333,6 @@ `char[]'. */ #undef YYTEXT_POINTER -/* Enable large inode numbers on macOS 10.5. */ -#ifndef _DARWIN_USE_64_BIT_INODE -# define _DARWIN_USE_64_BIT_INODE 1 -#endif - /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff --git a/external/redland/raptor/ubsan.patch b/external/redland/raptor/ubsan.patch index 641d60bb7b49..54b041e80f1f 100644 --- a/external/redland/raptor/ubsan.patch +++ b/external/redland/raptor/ubsan.patch @@ -9,17 +9,3 @@ /* Remove <component>/.. at the end of the path */ *prev = ' path_len -= (s-prev); ---- src/raptor_uri.c -+++ src/raptor_uri.c -@@ -1336,9 +1336,9 @@ - !strncmp((const char*)base_detail->scheme, - (const char*)reference_detail->scheme, - base_detail->scheme_len) && -- !strncmp((const char*)base_detail->authority, -+ (base_detail->authority_len == 0 || !strncmp((const char*)base_detail->authority, - (const char*)reference_detail->authority, -- base_detail->authority_len)) { -+ base_detail->authority_len))) { - - if(!base_detail->path) { - if(reference_detail->path) { diff --git a/external/redland/raptor/xml2-config.patch b/external/redland/raptor/xml2-config.patch index 2550acee044a..41f338eccb66 100644 --- a/external/redland/raptor/xml2-config.patch +++ b/external/redland/raptor/xml2-config.patch @@ -1,6 +1,6 @@ --- configure +++ configure -@@ -14197,6 +14197,11 @@ +@@ -16004,6 +16004,11 @@ test -n "$XML_CONFIG" && break done @@ -12,11 +12,11 @@ fi fi -@@ -14481,6 +14481,7 @@ +@@ -16104,6 +16109,7 @@ LIBXML_VERSION=`$PKG_CONFIG libxml-2.0 --modversion` libxml_source="pkg-config" + XML_CONFIG="$PKG_CONFIG libxml-2.0" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml via pkg-config" >&5 + { printf "%s " "$as_me:${as_lineno-$LINENO}: checking for libxml via pkg-config" >&5 diff --git a/external/redland/rasqal/rasqal-pkgconfig.patch.1 b/external/redland/rasqal/rasqal-pkgconfig.patch.1 index ac3eab07c4e4..0db4c993d256 100644 --- a/external/redland/rasqal/rasqal-pkgconfig.patch.1 +++ b/external/redland/rasqal/rasqal-pkgconfig.patch.1 @@ -7,8 +7,7 @@ Let the pkg-config stuff be overridden by variables $as_echo "yes" >&6; } - RAPTOR_VERSION=`$PKG_CONFIG raptor2 --modversion 2>/dev/null` -+ RAPTOR_VERSION=2.0.15 ++ RAPTOR_VERSION=2.0.16 raptor_too_old=0 as_arg_v1=$RAPTOR_VERSION as_arg_v2=$RAPTOR_MIN_VERSION - commit 10ed2ac15c6c14c08aef6917b3389e20d4f9b9d7 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Jul 3 14:08:47 2024 +0200 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Feb 3 16:40:39 2025 +0100 raptor: Use --without-www it seems not used. Besides, it fails when upgrading to libxml2 2.13. See https://gerrit.libreoffice.org/c/core/+/169327 Change-Id: If383130eac3b5d6de911c4c273c8e371a4980f23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169933 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> (cherry picked from commit 25b37b4c8c8c5aef7cd530d919258bd8e5dce068) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181056 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Andras Timar <andras.ti...@collabora.com> diff --git a/external/redland/ExternalProject_raptor.mk b/external/redland/ExternalProject_raptor.mk index 74759c65be31..2cf4c30cface 100644 --- a/external/redland/ExternalProject_raptor.mk +++ b/external/redland/ExternalProject_raptor.mk @@ -29,8 +29,8 @@ $(call gb_ExternalProject_get_state_target,raptor,build): $(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl))" \ CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) $(gb_EMSCRIPTEN_CPPFLAGS)" \ $(gb_RUN_CONFIGURE) ./configure --disable-gtk-doc \ - --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \ - --with-www=xml \ + --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \ + --without-www \ --without-xslt-config \ $(gb_CONFIGURE_PLATFORMS) \ $(if $(CROSS_COMPILING),$(if $(filter INTEL ARM,$(CPUNAME)),ac_cv_c_bigendian=no)) \