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)

Change-Id: Ic05269ade5dae3761d98432ee504a51434a4c753
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161704
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
This commit is contained in:
Taichi haradaguchi 2024-01-06 14:49:07 +09:00 committed by Christian Lohmaier
parent f8fdd226f5
commit c75c21eef6
22 changed files with 104 additions and 238 deletions

View File

@ -11106,7 +11106,7 @@ dnl ===================================================================
ICU_MAJOR=74 ICU_MAJOR=74
ICU_MINOR=2 ICU_MINOR=2
ICU_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common" 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]) libo_CHECK_SYSTEM_MODULE([icu],[ICU],[icu-i18n >= 66])
if test "$SYSTEM_ICU" = TRUE; then if test "$SYSTEM_ICU" = TRUE; then
AC_LANG_PUSH([C++]) AC_LANG_PUSH([C++])

View File

@ -600,8 +600,8 @@ QXP_TARBALL := libqxp-0.0.2.tar.xz
# three static lines # three static lines
# so that git cherry-pick # so that git cherry-pick
# will not run into conflicts # will not run into conflicts
RAPTOR_SHA256SUM := ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed RAPTOR_SHA256SUM := 089db78d7ac982354bdbf39d973baf09581e6904ac4c92a98c5caadb3de44680
RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz RAPTOR_TARBALL := raptor2-2.0.16.tar.gz
# three static lines # three static lines
# so that git cherry-pick # so that git cherry-pick
# will not run into conflicts # will not run into conflicts

View File

@ -9,7 +9,12 @@
$(eval $(call gb_ExternalProject_ExternalProject,raptor)) $(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,\ $(eval $(call gb_ExternalProject_register_targets,raptor,\
build \ build \
@ -24,9 +29,9 @@ $(call gb_ExternalProject_get_state_target,raptor,build):
$(call gb_ExternalProject_get_build_flags,raptor) \ $(call gb_ExternalProject_get_build_flags,raptor) \
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden) \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden) \
$(if $(filter GCCLINUXPOWERPC64,$(COM)$(OS)$(CPUNAME)),-mminimal-toc)" \ $(if $(filter GCCLINUXPOWERPC64,$(COM)$(OS)$(CPUNAME)),-mminimal-toc)" \
LDFLAGS=" \ LDFLAGS='$(strip \
$(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN") \ $(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))" \ $(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)" \ CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) $(gb_EMSCRIPTEN_CPPFLAGS)" \
$(gb_RUN_CONFIGURE) ./configure --disable-gtk-doc \ $(gb_RUN_CONFIGURE) ./configure --disable-gtk-doc \
--enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \ --enable-parsers="rdfxml ntriples turtle trig guess rss-tag-soup" \

View File

@ -25,9 +25,9 @@ $(call gb_ExternalProject_get_state_target,redland,build):
$(call gb_ExternalProject_run,build,\ $(call gb_ExternalProject_run,build,\
$(if $(filter -fsanitize=undefined,$(CC)),CC='$(CC) -fno-sanitize=function') \ $(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)" \ CFLAGS="$(CFLAGS) $(if $(filter TRUE,$(DISABLE_DYNLOADING)),-fvisibility=hidden) $(call gb_ExternalProject_get_build_flags,redland) $(gb_EMSCRIPTEN_CPPFLAGS)" \
LDFLAGS=" \ LDFLAGS='$(strip \
$(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN") \ $(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))" \ $(if $(SYSBASE),$(if $(filter LINUX SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl)))' \
CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include)" \ CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include)" \
PKG_CONFIG="" \ PKG_CONFIG="" \
RAPTOR2_CFLAGS="-I$(gb_UnpackedTarball_workdir)/raptor/src" \ RAPTOR2_CFLAGS="-I$(gb_UnpackedTarball_workdir)/raptor/src" \

View File

@ -17,6 +17,8 @@ $(eval $(call gb_Library_set_include,raptor2, \
$(eval $(call gb_Library_use_unpacked,raptor2,raptor)) $(eval $(call gb_Library_use_unpacked,raptor2,raptor))
$(eval $(call gb_Library_use_externals,raptor2,\ $(eval $(call gb_Library_use_externals,raptor2,\
icu_headers \
icuuc \
libxml2 \ libxml2 \
libxslt \ libxslt \
)) ))

View File

@ -1,4 +1,4 @@
Redland RDF library (librdf) from [http://librdf.org/] Redland RDF library (librdf) from [https://librdf.org/]
== License == == License ==
[git:redland/LICENSE.txt] [git:redland/LICENSE.txt]

View File

@ -28,11 +28,8 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\
external/redland/raptor/ubsan.patch \ external/redland/raptor/ubsan.patch \
$(if $(SYSTEM_LIBXML),,external/redland/raptor/rpath.patch) \ $(if $(SYSTEM_LIBXML),,external/redland/raptor/rpath.patch) \
external/redland/raptor/xml2-config.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 \ external/redland/raptor/raptor-libxml2-11.patch.1 \
$(if $(SYSTEM_ICU),,external/redland/raptor/raptor-icu.patch) \
)) ))
# vim: set noet sw=4 ts=4: # vim: set noet sw=4 ts=4:

View File

@ -1,33 +0,0 @@
From a549457461874157c8c8e8e8a6e0eec06da4fbd0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@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

View File

@ -1,43 +0,0 @@
From 590681e546cd9aa18d57dc2ea1858cb734a3863f Mon Sep 17 00:00:00 2001
From: Dave Beckett <dave@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

View File

@ -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);

View File

@ -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

View File

@ -1,13 +1,13 @@
No sonames on Android No sonames on Android
--- a/configure 2013-03-29 19:46:34.922901756 +0100 --- a/configure 2023-03-02 02:58:10.000000000 +0900
+++ b/configure 2013-03-29 19:46:56.051901574 +0100 +++ b/configure 2024-03-07 21:32:06.394607400 +0900
@@ -9866,7 +9866,7 @@ @@ -11165,7 +11165,7 @@
*Sun\ F*) # Sun Fortran 8.3 *Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;; tmp_sharedflag='-G' ;;
esac 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' + 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~ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~

View File

@ -1,11 +1,11 @@
rhbz#809466 change soname of bundled redland libs rhbz#809466 change soname of bundled redland libs
--- a/src/Makefile.in 2013-03-29 19:11:27.944919859 +0100 --- a/src/Makefile.in 2023-03-02 02:58:09.000000000 +0900
+++ b/src/Makefile.in 2013-03-29 19:17:42.173916644 +0100 +++ b/src/Makefile.in 2024-01-06 13:59:13.424477428 +0900
@@ -507,7 +507,7 @@ @@ -783,7 +783,7 @@
$(am__append_21) $(am__append_22) $(am__append_23) \ $(am__append_24) $(am__append_25) $(am__append_26) \
$(am__append_24) $(am__append_25) $(am__append_26) $(am__append_27) $(am__append_28)
libraptor2_la_LIBADD = $(am__append_29) @LTLIBOBJS@ libraptor2_la_LIBADD = $(am__append_31) @LTLIBOBJS@
-libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \ -libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ \
+libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ -release lo \ +libraptor2_la_LDFLAGS = -version-info @RAPTOR_LIBTOOL_VERSION@ -release lo \
@RAPTOR_LDFLAGS@ $(MEM_LIBS) @RAPTOR_LDFLAGS@ $(MEM_LIBS)

View File

@ -1,12 +1,12 @@
-*- Mode: Diff -*- -*- Mode: Diff -*-
--- raptor/src/sort_r.h --- raptor/src/sort_r.h
+++ raptor/src/sort_r.h +++ raptor/src/sort_r.h
@@ -27,7 +27,7 @@ @@ -28,7 +28,7 @@
defined AMIGA)
# define _SORT_R_BSD # define _SORT_R_BSD
#elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \ #elif (defined _GNU_SOURCE || defined __gnu_hurd__ || defined __GNU__ || \
- defined __linux__ || defined __MINGW32__ || defined __GLIBC__) defined __linux__ || defined __MINGW32__ || defined __GLIBC__ || \
+ defined __linux__ || defined __MINGW32__ || defined __GLIBC__ || defined __EMSCRIPTEN__) - defined __CYGWIN__)
+ defined __CYGWIN__ || defined __EMSCRIPTEN__)
# define _SORT_R_LINUX # define _SORT_R_LINUX
#elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__) #elif (defined _WIN32 || defined _WIN64 || defined __WINDOWS__)
# define _SORT_R_WINDOWS # define _SORT_R_WINDOWS

View File

@ -1,28 +1,17 @@
Usual patch to produce Linux-like .so files on FreeBSD Usual patch to produce Linux-like .so files on FreeBSD
--- a/build/ltmain.sh 2008-02-02 22:28:24.000000000 +0900 --- a/build/ltmain.sh 2023-02-24 11:51:18.000000000 +0900
+++ b/build/ltmain.sh 2008-07-08 11:58:42.000000000 +0900 +++ b/build/ltmain.sh 2024-01-06 13:46:15.460224000 +0900
@@ -7341,9 +7341,9 @@ @@ -9107,9 +9107,9 @@
revision="$number_revision" revision=$number_revision
;; ;;
freebsd-aout|freebsd-elf|qnx|sunos) freebsd-aout|qnx|sunos)
- current="$number_major" - current=$number_major
- revision="$number_minor" - revision=$number_minor
- age="0" - age=0
+ current=`expr $number_major + $number_minor` + current=`expr $number_major + $number_minor`
+ age="$number_minor" + age=$number_minor
+ revision="$number_revision" + revision=$number_revision
;; ;;
irix|nonstopux) irix|nonstopux)
func_arith $number_major + $number_minor 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)

View File

@ -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\n" "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/\..*$//'`

View File

@ -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:34.543400074 +0200
+++ raptor/src/raptor_uri.c 2016-08-26 23:45:40.479399614 +0200 +++ raptor/src/raptor_uri.c 2016-08-26 23:45:40.479399614 +0200
@@ -51,6 +51,10 @@ @@ -51,6 +51,10 @@

View File

@ -53,14 +53,14 @@ extern "C" {
* *
* Format: major * 10000 + minor * 100 + release * Format: major * 10000 + minor * 100 + release
*/ */
#define RAPTOR_VERSION 20015 #define RAPTOR_VERSION 20016
/** /**
* RAPTOR_VERSION_STRING: * RAPTOR_VERSION_STRING:
* *
* Raptor library version string * Raptor library version string
*/ */
#define RAPTOR_VERSION_STRING "2.0.15" #define RAPTOR_VERSION_STRING "2.0.16"
/** /**
* RAPTOR_VERSION_MAJOR: * RAPTOR_VERSION_MAJOR:
@ -81,7 +81,7 @@ extern "C" {
* *
* Raptor library release * Raptor library release
*/ */
#define RAPTOR_VERSION_RELEASE 15 #define RAPTOR_VERSION_RELEASE 16
/** /**
* RAPTOR_API: * RAPTOR_API:
@ -251,6 +251,14 @@ extern const unsigned int raptor_rdf_namespace_uri_len;
RAPTOR_API RAPTOR_API
extern const unsigned char * const raptor_rdf_schema_namespace_uri; 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: * 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 RAPTOR_API
int raptor_www_set_ssl_verify_options(raptor_www* www, int verify_peer, int verify_host); int raptor_www_set_ssl_verify_options(raptor_www* www, int verify_peer, int verify_host);
RAPTOR_API 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); void raptor_www_set_user_agent(raptor_www *www, const char *user_agent);
RAPTOR_API 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); void raptor_www_set_proxy(raptor_www *www, const char *proxy);
RAPTOR_API 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); void raptor_www_set_http_accept(raptor_www *www, const char *value);
RAPTOR_API RAPTOR_API
void raptor_www_set_write_bytes_handler(raptor_www *www, raptor_www_write_bytes_handler handler, void *user_data); 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_bitflags:
* @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF : Allow \b \f, * @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF : Allow \b \f,
* @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU : ALlow \t \n \r \u * @RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU : Allow \t \n \r \u \U
* @RAPTOR_ESCAPED_WRITE_BITFLAG_UTF8 : Allow UTF-8 for printable 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_BITFLAG_SPARQL_URI_ESCAPES: Must escape #x00-#x20<>\"{}|^` in URIs
* @RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL: N-Triples literal * @RAPTOR_ESCAPED_WRITE_NTRIPLES_LITERAL: N-Triples literal
* @RAPTOR_ESCAPED_WRITE_NTRIPLES_URI: N-Triples URI * @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_URI: Turtle 2013 URIs (like SPARQL)
* @RAPTOR_ESCAPED_WRITE_TURTLE_LITERAL: Turtle 2013 literals (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_TURTLE_LONG_LITERAL: Turtle 2013 long literals (like SPARQL)
* @RAPTOR_ESCAPED_WRITE_JSON_LITERAL: JSON literals: \b \f \t \r \n and \u \U * @RAPTOR_ESCAPED_WRITE_JSON_LITERAL: JSON literals: UTF-8 plus \b \f \t \r \n, \uXXXX only, no \U
* *
* Bit flags for raptor_string_escaped_write() and friends. * 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_LITERAL = RAPTOR_ESCAPED_WRITE_SPARQL_LITERAL,
RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL = RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL, RAPTOR_ESCAPED_WRITE_TURTLE_LONG_LITERAL = RAPTOR_ESCAPED_WRITE_SPARQL_LONG_LITERAL,
/* JSON literals: \b \f \t \r \n and \u \U */ /* JSON literals: UTF-8 plus \b \f \t \r \n \uXXXX */
RAPTOR_ESCAPED_WRITE_JSON_LITERAL = RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_TNRU | RAPTOR_ESCAPED_WRITE_BITFLAG_BS_ESCAPES_BF 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; } raptor_escaped_write_bitflags;
@ -2153,6 +2167,8 @@ void* raptor_avltree_remove(raptor_avltree* tree, void* p_data);
RAPTOR_API RAPTOR_API
int raptor_avltree_delete(raptor_avltree* tree, void* p_data); int raptor_avltree_delete(raptor_avltree* tree, void* p_data);
RAPTOR_API RAPTOR_API
void raptor_avltree_trim(raptor_avltree* tree);
RAPTOR_API
void* raptor_avltree_search(raptor_avltree* tree, const void* p_data); void* raptor_avltree_search(raptor_avltree* tree, const void* p_data);
RAPTOR_API RAPTOR_API
int raptor_avltree_visit(raptor_avltree* tree, raptor_avltree_visit_handler visit_handler, void* user_data); int raptor_avltree_visit(raptor_avltree* tree, raptor_avltree_visit_handler visit_handler, void* user_data);

View File

@ -66,12 +66,6 @@
/* Define to 1 if you have the <limits.h> header file. */ /* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1 #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. */ /* Define to 1 if you have the `qsort_r' function. */
#undef HAVE_QSORT_R #undef HAVE_QSORT_R
@ -99,6 +93,9 @@
/* Define to 1 if you have the <stdint.h> header file. */ /* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H #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 to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1 #define HAVE_STDLIB_H 1
@ -114,7 +111,7 @@
/* Define to 1 if you have the <string.h> header file. */ /* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1 #define HAVE_STRING_H 1
/* Define to 1 if you have the `strtok_r' function. */ /* have the strtok_r function */
#undef HAVE_STRTOK_R #undef HAVE_STRTOK_R
/* Define to 1 if you have the <sys/param.h> header file. */ /* 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. */ /* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H #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. */ /* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H #undef HAVE_UNISTD_H
@ -156,8 +156,10 @@
/* Is __FUNCTION__ available */ /* Is __FUNCTION__ available */
#define HAVE___FUNCTION__ 1 #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 #undef LT_OBJDIR
/* Define to 1 if maintainer mode is enabled. */ /* Define to 1 if maintainer mode is enabled. */
@ -166,9 +168,6 @@
/* need 'extern int optind' declaration? */ /* need 'extern int optind' declaration? */
#undef NEED_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 */ /* Name of package */
#undef PACKAGE #undef PACKAGE
@ -194,7 +193,7 @@
#undef RAPTOR_DEBUG #undef RAPTOR_DEBUG
/* Use ICU for Unicode NFC check */ /* Use ICU for Unicode NFC check */
#undef RAPTOR_ICU_NFC #define RAPTOR_ICU_NFC 1
/* does libxml struct xmlEntity have a field etype */ /* does libxml struct xmlEntity have a field etype */
#define RAPTOR_LIBXML_ENTITY_ETYPE 1 #define RAPTOR_LIBXML_ENTITY_ETYPE 1
@ -259,6 +258,9 @@
/* Building JSON serializer */ /* Building JSON serializer */
#undef RAPTOR_SERIALIZER_JSON #undef RAPTOR_SERIALIZER_JSON
/* Building mKR serializer */
#undef RAPTOR_SERIALIZER_MKR
/* Building N-Quads serializer */ /* Building N-Quads serializer */
#undef RAPTOR_SERIALIZER_NQUADS #undef RAPTOR_SERIALIZER_NQUADS
@ -278,7 +280,7 @@
#undef RAPTOR_SERIALIZER_TURTLE #undef RAPTOR_SERIALIZER_TURTLE
/* Release version as a decimal */ /* Release version as a decimal */
#define RAPTOR_VERSION_DECIMAL 20015 #define RAPTOR_VERSION_DECIMAL 20016
/* Major version number */ /* Major version number */
#define RAPTOR_VERSION_MAJOR 2 #define RAPTOR_VERSION_MAJOR 2
@ -287,7 +289,7 @@
#define RAPTOR_VERSION_MINOR 0 #define RAPTOR_VERSION_MINOR 0
/* Release version number */ /* Release version number */
#define RAPTOR_VERSION_RELEASE 15 #define RAPTOR_VERSION_RELEASE 16
/* Have libcurl WWW library */ /* Have libcurl WWW library */
#undef RAPTOR_WWW_LIBCURL #undef RAPTOR_WWW_LIBCURL
@ -307,14 +309,13 @@
/* Use libxml XML parser */ /* Use libxml XML parser */
#define RAPTOR_XML_LIBXML 1 #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 #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 */ /* 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 /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */ significant byte first (like Motorola and SPARC, unlike Intel). */
@ -332,11 +333,6 @@
`char[]'. */ `char[]'. */
#undef YYTEXT_POINTER #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. */ /* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS #undef _FILE_OFFSET_BITS

View File

@ -9,17 +9,3 @@
/* Remove <component>/.. at the end of the path */ /* Remove <component>/.. at the end of the path */
*prev = '\0'; *prev = '\0';
path_len -= (s-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) {

View File

@ -1,6 +1,6 @@
--- configure --- configure
+++ configure +++ configure
@@ -14197,6 +14197,11 @@ @@ -16004,6 +16004,11 @@
test -n "$XML_CONFIG" && break test -n "$XML_CONFIG" && break
done done
@ -12,11 +12,11 @@
fi fi
fi fi
@@ -14481,6 +14481,7 @@ @@ -16104,6 +16109,7 @@
LIBXML_VERSION=`$PKG_CONFIG libxml-2.0 --modversion` LIBXML_VERSION=`$PKG_CONFIG libxml-2.0 --modversion`
libxml_source="pkg-config" libxml_source="pkg-config"
+ XML_CONFIG="$PKG_CONFIG libxml-2.0" + XML_CONFIG="$PKG_CONFIG libxml-2.0"
fi fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml via pkg-config" >&5 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxml via pkg-config" >&5

View File

@ -7,8 +7,7 @@ Let the pkg-config stuff be overridden by variables
$as_echo "yes" >&6; } $as_echo "yes" >&6; }
- RAPTOR_VERSION=`$PKG_CONFIG raptor2 --modversion 2>/dev/null` - RAPTOR_VERSION=`$PKG_CONFIG raptor2 --modversion 2>/dev/null`
+ RAPTOR_VERSION=2.0.15 + RAPTOR_VERSION=2.0.16
raptor_too_old=0 raptor_too_old=0
as_arg_v1=$RAPTOR_VERSION as_arg_v1=$RAPTOR_VERSION
as_arg_v2=$RAPTOR_MIN_VERSION as_arg_v2=$RAPTOR_MIN_VERSION