/schema/odf1.3/

4-LTS LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/external/redland/UnpackedTarball_raptor.mk
AgeCommit message (Collapse)Author
7 daysredland: disable all raptor parsers except for "rdfxml"Michael Stahl
It's the only one the unordf component invokes. CVE-2024-57823 CVE-2024-57822 affect the "ntriples" and "turtle" parsers. However it appears that the function raptor_uri_normalize_path() could also be called from raptor_libxml_* functions? Somewhat unclear, let's add the patch just in case. Change-Id: Idd7ebbc29c63e84ca2434b06c26f7aca34bdcaa5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180272 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-11-27tsan: use of freed mutexNoel Grandin
Because the mutex has already been freed because raptor calls xmlCleanupParser I have logged a feature request against raptor for a flag to turn off this behaviour, but until that lands, this will have to do. ----- make CppunitTest_filter_pdf results in WARNING: ThreadSanitizer: use of an invalid mutex (e.g. uninitialized or destroyed) (pid=330602) 0 pthread_mutex_lock /home/noel/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:1371 (discriminator 8) (cppunittester+0x7e1be) 1 xmlDictFree ??:? (libxml2.so.2+0x3404b) (BuildId: 14c9410dbe8278dfa121dabc48c9ae25eac169d1) 2 lt_xml_unref /home/noel/libo-tsan/workdir/UnpackedTarball/liblangtag/liblangtag/lt-xml.c:351 (liblangtag-lo.so.1+0x1fc6a) 3 lt_db_finalize /home/noel/libo-tsan/workdir/UnpackedTarball/liblangtag/liblangtag/lt-database.c:144 (liblangtag-lo.so.1+0xac22) 4 (anonymous namespace)::LiblangtagDataRef::teardown() /home/noel/libo-tsan/i18nlangtag/source/languagetag/languagetag.cxx:219 (libi18nlangtag.so+0x20951) 5 (anonymous namespace)::LiblangtagDataRef::~LiblangtagDataRef() /home/noel/libo-tsan/i18nlangtag/source/languagetag/languagetag.cxx:204 (libi18nlangtag.so+0x20951) 6 cxa_at_exit_callback_installed_at(void*) /home/noel/llvm-project/compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp:445 (cppunittester+0x6e3af) 7 LanguageTagImpl::canonicalize() /home/noel/libo-tsan/i18nlangtag/source/languagetag/languagetag.cxx:190 (libi18nlangtag.so+0xe370) 8 main /home/noel/libo-tsan/sal/cppunittester/cppunittester.cxx:482 (cppunittester+0x10cf6c) Change-Id: I5d9ff1c5667f8e19e5858cd5a408e8f95d2a98e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177320 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-07-09Upgrade raptor to 2.0.16Taichi haradaguchi
- 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
2023-05-24upgrade to libxml2-2.11.4Caolán McNamara
'checked' field removed with: https://gitlab.gnome.org/GNOME/libxml2/-/commit/ce76ebfd1312459951d555ad9d87fb9a89eede55 win32 'run_debug' removed with: https://gitlab.gnome.org/GNOME/libxml2/-/commit/59f2f60e3eff07324f1c7cd861a444d714be750b add libxml2-XMLCALL-redefine.patch.0 to avoid: UnpackedTarball\libxml2\include\libxml/xmlexports.h(41): error C2220: the following warning is treated as an error UnpackedTarball\libxml2\include\libxml/xmlexports.h(41): warning C4005: 'XMLCALL': macro redefinition UnpackedTarball\expat\lib\expat_external.h(69): note: see previous definition of 'XMLCALL' Change-Id: Ia9b1540dc1b4eccf91662c8d995c036f71de6fc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152176 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-01-12Adapt to newer Emscripten SDKTor Lillqvist
The check for platform in raptor's sort_r.h no longer worked with Emscripten 3.1.30. Looking for __EMSCRIPTEN__ explicitly helps. Change-Id: Ieccf723d809b4e90d44a8a510f71e12bd1d2e529 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145408 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2022-08-03external/redland: Fix -Wint-conversionStephan Bergmann
...with recent Clang 16 trunk since <https://github.com/llvm/llvm-project/commit/7068aa98412ade19a34b7ed126f4669f581b2311> "Strengthen -Wint-conversion to default to an error", causing > raptor_parse.c:260:66: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion] > RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); > ^~~~ and > raptor_serialize.c:243:66: error: incompatible pointer to integer conversion returning 'void *' from a function with result type 'int' [-Wint-conversion] > RAPTOR_ASSERT_OBJECT_POINTER_RETURN_VALUE(world, raptor_world, NULL); > ^~~~ Change-Id: I2c1083b78777589b992c180d8759e2313bf2fe42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137756 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-12-03libxml2: use xml2-config dummy for internal buildJan-Marek Glogowski
When building a static LO with --disable-dynloading on Linux, --without-system-libs failed for me. And it left me really puzzled: raptor configure failed and claimed it couldn't link libxml2. raptor's config.log showed missing math functions. xml2-config of LO's build is patched and it includes a -lm. The xml2-config in my chroot doesn't. But we explicitly pass the xml2-config for non-system-libxml2 build. Reading the configure from raptor didn't reveal a way, that it could somehow pick up the xml2-config from the chroot, but that code is autoconf-complex... When running "sh -x configure", it turned out the configure script actually picks up the LIBXML_* flags from the environment, which are set by LO's config_host.mk. These just add -lm for Android. So this adds a xml2-config.in "dummy", which overwrites the one from the libxml2 source and just echos LO's LIBXML_* values and it adds -lm for all DISABLE_DYNLOADING targets. Change-Id: Ia713cf80c8e7dc989cf23c224e7a0f7ea1210a87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116409 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-11-24CVE-2020-25713 raptor2: malformed input file can lead to a segfaultCaolán McNamara
due to an out of bounds array access in raptor_xml_writer_start_element_common use a better fix than the initial suggestion See: https: //bugs.mageia.org/show_bug.cgi?id=27605 https: //www.openwall.com/lists/oss-security/2020/11/13/1 Change-Id: I9203904755b0e4ac98ae1e39942fd6f616c1efff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106488 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-11-23CVE-2020-25713 raptor2: malformed input file can lead to a segfaultCaolán McNamara
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 Change-Id: Ida4783a61412ffce868eacf81310da338d3e2df1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106423 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-03external/redland: Honour LIBXML_CFLAGS/LIBS in raptor's configureStephan Bergmann
I ran into this issue with a somewhat special setup on macOS, with both Xcode 11 and Xcode 12 beta installed, and > xcode-select -s /Applications/Xcode-beta.app/Contents/Developer and > CC/CXX=... -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk ... to make the LO build use the latest SDK from Xcode 12 beta. (And with implicit --with-system-libxml, and with recent Clang 12 trunk.) However, even though raptor's configure receives our LIBXML_CFLAGS/LIBS env vars from config_host.mk, it always overrides them with output from some $XML_CONFIG tool. For whatever reason, in my setup that caused raptor's LIBXML_CFLAGS to be set to > -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include (And a similar reference to that /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk in LIBXML_LIBS. That MacOSX.sdk directory symlinks to some /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk. I don't know about that /Library/Developer/CommandLineTools/SDKs tree, but it smells like it is maintained by Xcode and not properly adapted for my Xcode 12 beta install.) Anyway, that LIBXML_CFLAGS ends up on raptor's compiler command lines, causing them to contain > ... -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk ... -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include ... so that something like > #include <stdio.h> in workdir/UnpackedTarball/raptor/src/raptor_parse.c will include > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h rather than > /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/usr/include/stdio.h and consider the former not to be a system header, and thus emit warnings/errors like > In file included from raptor_parse.c:30: > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdio.h:220:5: error: 'TARGET_OS_EMBEDDED' is not defined, evaluates to 0 [-Werror,-Wundef-prefix=TARGET_OS_] > #if TARGET_OS_EMBEDDED > ^ that it would suppress from system headers. Raptor's configure appears to always override LIBXML_CFLAGS/LIBS since <https://github.com/dajobe/raptor/commit/ 7da03ba5cd6e45ea41afebd4955acf6e96e9d622> "Switch libxml and libcurl to use PKG_PROG_PKG_CONFIG and PKG_CHECK_MODULES", which looks like a bug to me. (Trying to prevent that code from being executed by passing in --without-xml2-config, similar to the existing --without-xslt-config in external/redland/ExternalProject_raptor.mk, would fail with > configure: error: libxml2 is not available - please get it from http://xmlsoft.org/ from raptor's configure, apparently suppressing libxml2 detection altogether.) Change-Id: I5f2813e849bb61c0af48df0579abe87d3671185b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101991 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-08redland: update autoconf configs the gbuild wayDavid Tardon
Change-Id: I8a46a2ee60bb028c7fd9edcfdcd389813498ba9b
2017-06-13iOS, patch redlandjan Iversen
Support for arm64 Change-Id: Id9f89452174bac4acb8d5b7dd3e23d91c2b2acf1
2017-05-02Make some externals' libtool copies cope with -mllvmStephan Bergmann
...as needed e.g. for <https://bugs.llvm.org/show_bug.cgi?id=32349> "r294897 + NewGVN cause build failure with LibreOffice", by applying <http://git.savannah.gnu.org/cgit/libtool.git/commit/ ?id=d9a35fe9d3508b5c0d56e7f2ec80fc05e8415fa3> "libtool: Discard '-mllvm $arg' options when linking." Change-Id: Id2afc3c8af3c6c9595e7cb33cef5084a74f78cb0
2017-04-19redland: add raptor patch to fix some bugsMichael Stahl
Change-Id: I4e3db61fdfe0b984d36b4f67f8e891da48f79ddb
2017-02-10Remove MinGW supportStephan Bergmann
In OOo times, there'd originally been efforts to allow building on Windows with MinGW. Later, in LO times, this has been shifted to an attempt of cross- compiling for Windows on Linux. That attempt can be considered abandoned, and the relevant code rotting. Due to this heritage, there are now three kinds of MinGW-specific code in LO: * Code from the original OOo native Windows effort that is no longer relevant for the LO cross-compilation effort, but has never been removed properly. * Code from the original OOo native Windows effort that is re-purposed for the LO cross-compilation effort. * Code that has been added specifially for the LO cross-compilation effort. All three kinds of code are removed. (An unrelated, remaining use of MinGW is for --enable-build-unowinreg, utilizing --with-mingw-cross-compiler, MINGWCXX, and MINGWSTRIP.) Change-Id: I49daad8669b4cbe49fa923050c4a4a6ff7dda568 Reviewed-on: https://gerrit.libreoffice.org/34127 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-08-26redland: upgrade raptor to 2.0.15, rasqal to 0.9.33, redland to 1.0.17:Michael Stahl
- drop rasqal-pkgconfig.patch.1: merged upstream - drop most of rasqal-msvc.patch.1: merged upstream - drop redland-query-rasqal-avoid-assert.patch.1: merged upstream - drop redland-pkgconfig.patch.1: merged upstream Change-Id: I4f03bed5fc5c4b30151c0c532572e438681da041 Reviewed-on: https://gerrit.libreoffice.org/28416 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-15external/redland: Defend against Yocto's broken xml2-configStephan Bergmann
...which is hard-coded to fail with echo '--should-not-have-used-/usr/bin/xml2-config' exit 1 Change-Id: Ic358e7d494f01f67c1469c4add080d775525ebb6
2015-06-12Fix Linux RPATH of various external modulesStephan Bergmann
...as discussed in 371cc81bd9ccbfbed25f810e70899c044280349e "external/liborcus: Fix Linux RPATH:" * When an external module produces multiple libraries (that we all install) that depend on each other, they need to contain $ORIGIN in RPATH (strictly speaking, those that do not depend on any other libraries from the module would not need that, but it is harmless and easier to do that way). * When an external module's libraries depend on other external modules' libraries, and (at least some of) those other external modules are not configuread as --with-system-*, they need to contain $ORIGIN in RPATH (again, for simplicity, some libraries may get that even if they would not strictly need it). * Try to outsmart the external modules' libtool instances to not add (ultimately bogus) paths to RPATH for dependencies on libraries from external modules (either from the same module, or from anohter module not configured as --with-system-*). The only time we do not outsmart libtool, and instead rely on it (hopefully?) doing the right thing is when a given external modules' libraries depend on libraries from excatly one other external module, and the latter is configured as --with-system-*. * That outsmarting means that if an external library depends both on external libraries provided by modules not configured as --with-system-* (so RPATH contains $ORIGIN, and the outsmarting is not suppressed) and on external libraries provided by modules configured as --with-system-*: Then if the latter are in unusual locations on the system that would require an RPATH entry (which might be provided via the corresponding "pkg-config --libs", say, and presumably would be honoured by libtool if we did not outsmart it), then those paths are now erroneously missing from RPATH. * That outsmarting also causes linking of some utility applications in module redland to fail, but those are ultimately unused, so cut them off by patching their respective sub-directory Makefile.in. Change-Id: Iec05b3568fbcf04987018322c328b769ae4f5dab
2015-01-09external/redland: Work around -fsanitize=nonnull-attributeStephan Bergmann
Change-Id: Ibffc44da6e9d6fb02d43d8a2b7e143ff994d76a8
2013-11-04fdo#70393: move redland to a subdir of externalKhaled Hosny
Change-Id: Ia857f943b8f2915c857ec4c9fa363760699e5206 Reviewed-on: https://gerrit.libreoffice.org/6551 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>