# # spec file for package uriparser # # Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %bcond_with googletest %define so_ver 1 Name: uriparser Version: 0.9.4 Release: 1.2 Summary: A strictly RFC 3986 compliant URI parsing library License: BSD-3-Clause AND LGPL-2.1-or-later Group: Development/Libraries/C and C++ URL: https://uriparser.github.io Source: https://github.com/uriparser/uriparser/releases/download/uriparser-%{version}/uriparser-%{version}.tar.bz2 Source1: baselibs.conf BuildRequires: cmake BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: graphviz BuildRequires: libqt5-qttools BuildRequires: pkgconf-pkg-config BuildRequires: pkgconfig(libxdot) %if %{with googletest} BuildRequires: gtest >= 1.8.1 %endif Provides: uriparse = %{version}-%{release} Obsoletes: uriparse < %{version}-%{release} %description uriparser is a strictly RFC 3986 compliant URI parsing library and supports Unicode. There is a command line tool, uriparse, which allows parsing URIs and show how the liburiparser splits it into components. %package -n liburiparser%{so_ver} Summary: A strictly RFC 3986 compliant URI parsing library License: BSD-3-Clause Group: System/Libraries %description -n liburiparser%{so_ver} uriparser is a strictly RFC 3986 compliant URI parsing library and supports Unicode. This package contains the shared library for %{name}. %package devel Summary: Development files for the uriparser URL parsing library License: BSD-3-Clause Group: Development/Libraries/C and C++ Requires: glibc-devel Requires: liburiparser%{so_ver} = %{version} Provides: liburiparser-devel = %{version}-%{release} Obsoletes: liburiparser-devel < %{version}-%{release} %description devel uriparser is a strictly RFC 3986 compliant URI parsing library and supports Unicode. This subpackage contains the headers and other developments files needed to build packagesfor that depend on %{name}. %package doc Summary: Documentation files for the uriparser URI parsing library License: BSD-3-Clause Group: Documentation/Other %description doc uriparser is a strictly RFC 3986 compliant URI parsing library and supports Unicode. This subpackage contains the documentation for %{name}. %prep %setup -q -n %{name}-%{version} %build %cmake \ -DCMAKE_INSTALL_DOCDIR:PATH=%{_docdir}/%{name} \ -DBUILD_SHARED_LIBS:BOOL=ON \ -DURIPARSER_BUILD_CHAR:BOOL=ON \ -DURIPARSER_BUILD_DOCS:BOOL=ON \ %if %{with googletest} -DURIPARSER_BUILD_TESTS:BOOL=ON \ %else -DURIPARSER_BUILD_TESTS:BOOL=OFF \ %endif -DURIPARSER_BUILD_TOOLS:BOOL=ON \ -DURIPARSER_BUILD_WCHAR:BOOL=ON \ %make_jobs %install %cmake_install %fdupes %{buildroot}%{_docdir}/%{name}/html/ %if %{with googletest} %check export MALLOC_CHECK_=2 MALLOC_PERTURB_=$((${RANDOM:-256} % 256)) make %{?_smp_mflags} check unset MALLOC_CHECK_ MALLOC_PERTURB_ %endif %post -n liburiparser%{so_ver} -p /sbin/ldconfig %postun -n liburiparser%{so_ver} -p /sbin/ldconfig %files %license COPYING %{_bindir}/uriparse %files -n liburiparser%{so_ver} %license COPYING %{_libdir}/liburiparser.so.%{so_ver} %{_libdir}/liburiparser.so.%{so_ver}.* %files devel %license COPYING %doc ChangeLog THANKS AUTHORS %{_includedir}/%{name}/ %{_libdir}/liburiparser.so %{_libdir}/cmake/uriparser-%{version}/ %{_libdir}/pkgconfig/liburiparser.pc %files doc %license COPYING %doc doc/Mainpage.txt %dir %{_docdir}/%{name}/ %{_docdir}/%{name}/html/ #\%{_docdir}/\%{name}/uriparser-\%{version}.qch %changelog * Tue Jul 28 2020 Martin Rey - Update to version 0.9.4 * Fixed: testrunner: No longer crashes when compiled with NDEBUG (GitHub #67) * Fixed: CMake: Support GTest 1.8.0 (GitHub #68) Thanks to Ryan Schmidt for the related report! * Fixed: CMake: Use variable GTEST_INCLUDE_DIRS (with plural "S") rather than GTEST_INCLUDE_DIR (GitHub #79, #81) Thanks to Wouter Beek for the related report! * Improved: CMake: Send config summary to stdout, not stderr (GitHub #72) Thanks to Scott Donelan for the patch! * Improved: Make -DURIPARSER_BUILD_TESTS=OFF unlock compilation without a C++ compiler; thanks to Fabrice Fontaine for the patch! (GitHub #69) * Added: Functions to make UriUri[AW] instances independent of the original URI string (GitHub #77 and #78) New functions: uriMakeOwner[AW] uriMakeOwnerMm[AW] * Added: CMake option URIPARSER_ENABLE_INSTALL to toggle installation of files, defaults to "ON" (GitHub #74, #75) Thanks to Scott Donelan for the patch! * Soname: 1:26:0 * Mon Jul 22 2019 Todd R - Update to version 0.9.3 * Fixed: pkg-config: Fix version line in liburiparser.pc (GitHub #65) * Changed: MinGW: Add library version suffix to DLL name Thanks to Sandro Mani for the patch! (GitHub #63, #64) * Soname: 1:26:0 - Update to version 0.9.2 * Fixed: Add missing extern "C" wrapper to UriIp4.h for use from C++ * Fixed: Linking error for symbol defaultMemoryManager from mixing C and C++ Thanks to Jørgen Ibsen for the report! (GitHub #52) * Fixed: Link errors on Haiku regarding function inet_ntop (GitHub #45) Thanks to Schrijvers Luc for the patch! * Fixed: Mark API functions with __declspec(dllexport) and __declspec(dllimport) in *.h files for Visual Studio (GitHub #60) * Improved: Use -fvisibility=hidden by default with supporting compilers, e.g. GCC and Clang (GitHub #60) * Changed: Migrated from GNU Autotools to CMake (GitHub #17, #47, #56, #59) Thanks for their support with the CMake migration to: - David Demelier - Jørgen Ibsen - KangLin - Kouhei Sutou - myd7349 - Richard Hodges - Zachary Lund * Removed: All Windows-related build systems other than CMake * Soname: 1:25:0 - Switch to cmake build - Split docs into own subpackage * Wed Jan 16 2019 adam.majer@suse.de - Update to version 0.9.1 * Fixed Out-of-bounds read in uriParse*Ex* for incomplete URIs with IPv6 addresses with embedded IPv4 address, e.g. "//[::44.1" mitigated if passed parameter points to readable memory containing a '\0' byte. (bsc#1122193, CVE-2018-20721) * Fixed: When parsing a malformed URI with an IPvFuture address (e.g. "http://[vA.123456" missing "]"), errorPos would point to the first character after "v" than the actual position of the error (here: the end of the string) * Fixed: uriToStringCharsRequired* reported 1 more byte than needed for IPv4 address URIs (GitHub #41); * Improved: For parse errors, waterproof errorPos <= afterLast * Soname: 1:24:0 * Fri Nov 16 2018 adam.majer@suse.de - Update to version 0.9.0 * Fixed: Out-of-bounds write in uriComposeQuery* and uriComposeQueryEx* (bsc#1115722, CVE-2018-19198) * Fixed: Detect integer overflow in uriComposeQuery* and uriComposeQueryEx* (bsc#1115723, CVE-2018-19199) * Fixed: Protect uriResetUri* against acting on NULL input (bsc#1115724, CVE-2018-19200) * Changed: Marked as deprecated: Deprecated functions: uriNormalizeSyntaxMaskRequired[AW] uriParseUri[AW] uriParseUriEx[AW] Added: Add convenience functions to ease user code to parse a single URI New functions: uriParseSingleUri[AW] uriParseSingleUriEx[AW] uriParseSingleUriExMm[AW] Added: Support for custom memory managers (GitHub #26, #35), see Doxygen New functions (as extension of existing ones): uriAddBaseUriExMm[AW] uriComposeQueryMallocExMm[AW] uriDissectQueryMallocExMm[AW] uriFreeQueryListMm[AW] uriFreeUriMembersMm[AW] uriNormalizeSyntaxExMm[AW] uriParseSingleUriExMm[AW] uriRemoveBaseUriMm[AW] New functions (for convenience): uriCompleteMemoryManager uriEmulateCalloc uriEmulateReallocarray uriTestMemoryManager New error codes: URI_ERROR_MEMORY_MANAGER_FAULTY URI_ERROR_MEMORY_MANAGER_INCOMPLETE New types: UriFuncCalloc UriFuncFree UriFuncMalloc UriFuncRealloc UriFuncReallocarray UriMemoryManager * Added: Add non-void versions of uriNormalizeSyntaxMaskRequired* * Changed: Migrate test suite from CppTest to GoogleTest * Improved: Make test suite free of memory leaks * Removed: Support for pointless define URI_SIZEDOWN * Soname: 1:23:0 - Changes in version 0.8.6 * Fixed: Bad/NULL .hostText.afterLast when parsing certain rather pathologic but well-formed URIs with empty host * Fixed: Fix uriRemoveBaseUri for case where scheme, host name, IPvFuture address or path segments of the source address were string prefixes of the related counterpart in the base URI. * Fixed: Make UriStringToUnixFilename and UriStringToWindowsFilename support minimal representation a la RFC 8089, e.g. file:/bin/bash * Soname: 1:22:0 - uriparser-doxygen.patch: dropped, not needed - package documentation * Thu Mar 1 2018 adam.majer@suse.de - Fix unit test building when cpptest is available. * Mon Feb 26 2018 adam.majer@suse.de - Fix License - the source code contains LGPL licensed test suite. The library itself is licensed under BSD license. Use SPDX v3 - Test suite requires cpptest, which we don't have at the moment. - spec-cleaner cleanup. * Wed Feb 21 2018 adam.majer@suse.de - Package COPYING and other basic documentation - Drop HTML documentation, for now, since it has no content. * Wed Feb 21 2018 adam.majer@suse.de - Fix Group of the library subpackage * Tue Feb 20 2018 jengelh@inai.de - Merge subpackage uriparse into uriparser main package, and rename liburiparser-devel to uriparser-devel. * Tue Feb 20 2018 adam.majer@suse.de - Rename package to comply with openSUSE packaging guidelines (bnc#1081686, sr#577196) - Rename changes and spec file and drop usage of pkg_name * Tue Feb 13 2018 jengelh@inai.de - Remove pointless --with-pic (no effect with --disable-static) - Ensure neutrality of description. * Thu Feb 8 2018 aloisio@gmx.com - Update to version 0.8.5 * Changed: The uriparser project has moved from SourceForge to GitHub: Code + issue tracker: https://github.com/uriparser/uriparser New website: https://uriparser.github.io/ Please update any links of yours, accordingly. Thank you! * Fixed: Memleak in out-of-memory clean-up code of URI normalization, related to SF.net bug #28. Thanks to Chris Hills for the report! * Fixed: Fix compilation of uriparse(1) on FreeBSD Thanks to Ed Schouten for the patch! * Fixed: Fix C90 compilation errors Thanks to Joel Cunningham for the patches! * Fixed: Space requirements documented for uriWindowsFilenameToUriStringA given URI "file://server1/file1.txt" (SF.net bug #31) Thanks to threedyd for the report! * Fixed: Compiler warnings Thanks to Joel Cunningham for the patches! * Fixed: Stop exporting internal function RemoveBaseUriImpl Thanks to Joel Cunningham for the report! * Fixed: API documentation front page no longer empty with Doxygen 1.8.13 * Fixed: "make -C doc install" fixed for lack of .map files * Improved: Communicate that absolutePath is always URI_FALSE for URIs with a host in uriparse CLI tool output and Uri.h header (GitHub #2, SF.net #30) * Soname: 1:21:0 version 0.8.4 * Fixed: Stack overflow on parsing malformed IPv6 addresses with more than eigtht quads. Thanks to Alexander Klink for the report! * Soname: 1:20:0 version 0.8.3 * Fixed: uriCompareRange reported NULL pointer and range of length zero as equal, by mistake. Thanks to Robert Kausch and his Coverity report. * Fixed: Use-after-free in out-of-memory code of uriMakeOwner. Thanks to Chris Hills and his Klocwork-based report (SF.net bug #28) * Soname: 1:19:0 version 0.8.2 * Fixed: Broken conversion from/to Windows network shares (SF.net bug #21) Thanks to Adam Gross and Dmitry Repkin! * Fixed: Limit uriCompareRange return values to -1/0/1 (SF.net bug #24) As a side effect, this fixes the test suite for AArch64. Thanks to Marcin Juszkiewicz for the patch! * Fixed: MinGW Makefile: LIB_DIR fixed from ../../lib leftover to ../../src (SF.net bug #27) Thanks to Dmytro Zagashev for the report! * Fixed: Add missing NULL checks to UriStringToFilename (SF.net bug #25) Thanks to Jerome Custodio for the report! * Changed: Leave inlining decisions to GCC * Soname: 1:18:0 - Refreshed uriparser-doxygen.patch - Spec cleanup * Thu Feb 19 2015 p.drouand@gmail.com - Update to version 0.8.1 * Fixed: Sync URI_VER_* preprocessor defines (were at 0.7.6, bug #23) * Fixed: Bug in internal function that may flip uriEqualsUri results around * Added: Function uriAddBaseUriEx allowing to resolve URIs with a scheme identical to that of the base URI to resolve against as if the URI to resolve had no scheme specified, when flag URI_RESOLVE_IDENTICAL_SCHEME_COMPAT is specified (feature request #4) * Soname: 1:17:0 - Update uriparser-0.7.5-doxygen.patch > uriparser-doxygen.patch - Add pkgconfig(libxdot) require; new upstream dependency - Update download source Url to current sourceforge location - Split out uriparse binary into his own package * Tue May 27 2014 crrodriguez@opensuse.org - Extend uriparser-0.7.5-doxygen.patch so doxygen does not generate timestamped files. * Sun Feb 3 2013 coolo@suse.com - update license to new format * Mon Jan 30 2012 jengelh@medozas.de - Remove redundant tags/sections per specfile guideline suggestions - Parallel building using %%_smp_mflags * Sun May 1 2011 toddrme2178@gmail.com - Added 32bit compatibility libraries * Mon Sep 6 2010 coolo@novell.com - fix compile, newer doxygen does not use .gif anymore * Fri Apr 9 2010 davejplater@gmail.com - Update to version 0.7.5 fixed doxygen build with uriparser-0.7.5-doxygen.patch - Upstream changes :- * Added: pkg-config file * Fixed: File Doxyfile.in was missing from release archives Thanks to Rakesh Pandit for reporting! * Fixed: Doc generation troubles * Changed: No longer shipping bundled libcpptest * Changed: New dependencies: - libcpptest 1.1.0 or later - pkg-config (for libcpptest detection) Both dependencies can be disable through configuring with --disable-test, which excludes the test suite from compilation. * Soname: 1:10:0 * Sun Sep 6 2009 meissner@suse.de - use correct version in .spec file, removed unnecessary CFLAGS/CXXFLAGS stuff now default. * Tue Dec 23 2008 pascal.bleser@opensuse.org - update to version 0.7.4: * fixes null pointer de-referencing and memory leaks in two places - changes from 0.7.3: * fixes a small bug with parsing * Sun Sep 7 2008 schwab@suse.de - Remove conflicting libtool macros. * Tue Sep 2 2008 crrodriguez@suse.de - update to version 0.7.2 Fixed: Bad cleanup logic in functions uriAddBaseUri(..) uriRemoveBaseUri(..) Previously you needed to call uriFreeUriMembers on return code URI_ERROR_MALLOC and only then. So that's why these functions now take cleanup off your shoulders. An extra call to uriFreeUriMembers from your side is still needed in case of success. * Soname: 1:7:0 * Mon Apr 28 2008 crrodriguez@suse.de - update to version 0.7.1 * Fixed: Bogus syntax error when parsing URIs with port-like passwords, e.g. "http://user:21@host/" (#1948038) Thanks to Friedrich Delgado Friedrichs for reporting! * Fixed: Parser did not handle trailing slashes correctly in some cases, which also made the structures produced from parsing "http://e.com/" and "http://e.com" indistinguishable. (#1950126) Thanks to Edward Z. Yang for reporting! * Fri Apr 4 2008 crrodriguez@suse.de - update to version 0.7.0 * Added: Dissection and composition of query strings * Added: Documentation improvements (in|out|inout indicators, addition of \since and \see) * Changed: Code::Blocks project files updated from file format version 1.4 to 1.6, which is produced by Code::Blocks 8.02 * Added: Code::Blocks workspace file * Changed: Soname set to 1:5:0 * Tue Mar 11 2008 crrodriguez@suse.de - fix buildRequires * Mon Feb 25 2008 crrodriguez@suse.de - version 0.6.4 * Added: Syntax-based normalization can now handle relative URIs, e.g. "../../a/b/.././c" is normalized to "../../a/c" * Fixed: Normalization code could free foreign memory * Fixed: Normalization processed the path segment even when asked not to * Fixed: Documentation bug not requiring enough memory for the output buffer when converting a relative file URI back to a filename * Changed: Soname set to 1:4:0 * Mon Feb 11 2008 crrodriguez@suse.de - version 0.6.3 - Fixed: Two major crash bugs in normalization code - Added: Brief usage tutorial - Changed: Soname set to 1:3:0 * Mon Feb 4 2008 crrodriguez@suse.de - version 0.6.1 * Thu Oct 18 2007 crrodriguez@suse.de - update to version 0.6.0 , liburiparse1 * Wed Aug 15 2007 crrodriguez@suse.de - first package for the OBS