Hello community, here is the log from the commit of package rstudio for openSUSE:Factory checked in at 2020-09-21 17:18:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rstudio (Old) and /work/SRC/openSUSE:Factory/.rstudio.new.4249 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rstudio" Mon Sep 21 17:18:23 2020 rev:14 rq:835196 version:1.3.1073 Changes: -------- --- /work/SRC/openSUSE:Factory/rstudio/rstudio.changes 2020-09-02 15:56:10.079473515 +0200 +++ /work/SRC/openSUSE:Factory/.rstudio.new.4249/rstudio.changes 2020-09-21 17:20:34.083796592 +0200 @@ -1,0 +2,60 @@ +Thu Sep 10 13:09:02 UTC 2020 - Dan Čermák <[email protected]> + +- Allow to build on Leap 15.2 + + Upstream allows to override the required boost version, which we utilize on + Leap 15.2. + + Added patch: + * 0008-Add-support-for-RapidJSON-1.1.0-in-Leap-15.2.patch + + Rebase patches: + * 0001-Unbundle-mathjax-and-pandoc.patch + * 0002-Don-t-install-pandoc-and-mathjax.patch + * 0003-Fix-rstudio-exec-path.patch + * 0004-add-support-for-boost-1.73.patch + * 0005-Add-additional-includes-for-aarch64.patch + * 0006-Use-system-hunspell.patch + * 0007-Fix-libclang-usage.patch + +------------------------------------------------------------------- +Mon Sep 7 09:33:10 UTC 2020 - Dan Čermák <[email protected]> + +- Remove bundled provides and integrate patches into git + + Rebase patches: + * 0001-Unbundle-mathjax-and-pandoc.patch + * 0002-Don-t-install-pandoc-and-mathjax.patch + * 0003-Fix-rstudio-exec-path.patch + * 0004-add-support-for-boost-1.73.patch + * 0005-Add-additional-includes-for-aarch64.patch + + Remove patches: (integrated into git) + * use-system-hunspell.patch + * fix-libclang-usage.patch + + Add patches: + * 0006-Use-system-hunspell.patch + * 0007-Fix-libclang-usage.patch + + * Remove the no longer applicable Provides: bundled(hunspell) + * Fix lib -> libexec in rstudio-rpmlintrc + +------------------------------------------------------------------- +Thu Sep 3 22:41:58 UTC 2020 - Aaron Puchert <[email protected]> + +- Add use-system-hunspell.patch to make compatible with newer + versions of hunspell, replace bundled version by system library. +- Add fix-libclang-usage.patch to make compatible with newer + versions, unbundle clang-c headers and use system headers + instead. Also make sure we find the library and the required + builtin headers. +- Most users won't need pandoc and mathjax, and since they have + quite some dependencies of their own, we only recommend them. +- Remove bundled zlib files that we don't need. +- Put executables specific to -desktop and -server into the + subpackages to reduce the number of dependencies if only one of + them is needed. (Most notably users installing the server variant + won't need Qt libraries.) + +------------------------------------------------------------------- New: ---- 0006-Use-system-hunspell.patch 0007-Fix-libclang-usage.patch 0008-Add-support-for-RapidJSON-1.1.0-in-Leap-15.2.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rstudio.spec ++++++ --- /var/tmp/diff_new_pack.AbeiMQ/_old 2020-09-21 17:20:38.283799833 +0200 +++ /var/tmp/diff_new_pack.AbeiMQ/_new 2020-09-21 17:20:38.287799836 +0200 @@ -37,8 +37,7 @@ %global bundled_jsbn_version 1.1 # - tree.hh => bundled in ./src/cpp/core/include/core/collection/Tree.hpp, version 2.81, license is GPL-3.0-only %global bundled_treehh_version 2.81 -# - Hunspell (MPL) => bundled in ./src/cpp/core/spelling/hunspell, version 1.3, license is (MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later) -%global bundled_hunspell_version 1.3 +# - Hunspell (MPL) => unbundled # - Chromium Hunspell Dictionaries (MPL) # - pdf.js => bundled in ./src/cpp/session/resources/pdfjs/build/pdf.js %global bundled_pdfjs_version 1.3.158 @@ -83,6 +82,13 @@ # missing from NOTICE: # - Google Closure Compiler => bundled in ./src/gwt/tools/compiler/ but AFAIK only used for building, version is "compiler-latest.zip as of July 9, 2019", license is Apache-2.0 with bundled dependencies under (NPL-1.1 AND (MPL-1.1 OR GPL-2.0-or-later)) AND MIT AND CPL-1.0 AND BSD-3-Clause AND Apache-2.0: +# override upstream's choice for the boost version on Leap 15.2, +# but not on Tumbleweed +%if 0%{?sle_version} == 150200 +%global rstudio_boost_requested_version 1.66 +%endif +%define boost_version %{?rstudio_boost_requested_version}%{?!rstudio_boost_requested_version:1.69} + %global rstudio_version_major 1 %global rstudio_version_minor 3 %global rstudio_version_patch 1073 @@ -100,10 +106,9 @@ # BSL or MIT: rapidxml # Public Domain: AOP Alliance # GPL-3.0-only: tree.hh -# (MPL-1.1 or GPL-2.0-or-later or LGPL-2.1-or-later): hunspell # ISC: sundown # dictionaries: see below -License: AGPL-3.0-only AND Apache-2.0 AND MPL-1.1 AND LGPL-2.1-or-later AND GPL-2.0-only AND MIT AND W3C-20150513 AND BSD-3-Clause AND (BSL-1.0 OR MIT) AND GPL-3.0-only AND (MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later) AND ISC AND OFL-1.1 AND Zlib AND NPL-1.1 AND CC-BY-4.0 +License: AGPL-3.0-only AND Apache-2.0 AND MPL-1.1 AND LGPL-2.1-or-later AND GPL-2.0-only AND MIT AND W3C-20150513 AND BSD-3-Clause AND (BSL-1.0 OR MIT) AND GPL-3.0-only AND ISC AND OFL-1.1 AND Zlib AND NPL-1.1 AND CC-BY-4.0 URL: https://github.com/%{name}/ Source0: %{URL}/%{name}/archive/v%{version}.tar.gz # these appear to have been taken from Chromium's source code, see: @@ -123,11 +128,17 @@ # https://github.com/rstudio/rstudio/pull/7011 Patch3: 0004-add-support-for-boost-1.73.patch Patch4: 0005-Add-additional-includes-for-aarch64.patch +# Make compatible with hunspell 1.4.0 or later, use system hunspell. +Patch5: 0006-Use-system-hunspell.patch +# Make sure we find the right libclang.so and builtin headers, make compatible with newer versions. +Patch6: 0007-Fix-libclang-usage.patch +# Leap 15.2 only patch +Patch7: 0008-Add-support-for-RapidJSON-1.1.0-in-Leap-15.2.patch BuildRequires: Mesa-devel BuildRequires: R-core-devel BuildRequires: ant -BuildRequires: clang +BuildRequires: clang-devel BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc @@ -138,17 +149,17 @@ # for dir ownership of /usr/share/icons/hicolor/* BuildRequires: hicolor-icon-theme BuildRequires: java -BuildRequires: libboost_atomic-devel >= 1.69 -BuildRequires: libboost_chrono-devel >= 1.69 -BuildRequires: libboost_date_time-devel >= 1.69 -BuildRequires: libboost_filesystem-devel >= 1.69 -BuildRequires: libboost_headers-devel >= 1.69 -BuildRequires: libboost_iostreams-devel >= 1.69 -BuildRequires: libboost_program_options-devel >= 1.69 -BuildRequires: libboost_random-devel >= 1.69 -BuildRequires: libboost_regex-devel >= 1.69 -BuildRequires: libboost_system-devel >= 1.69 -BuildRequires: libboost_thread-devel >= 1.69 +BuildRequires: libboost_atomic-devel >= %{boost_version} +BuildRequires: libboost_chrono-devel >= %{boost_version} +BuildRequires: libboost_date_time-devel >= %{boost_version} +BuildRequires: libboost_filesystem-devel >= %{boost_version} +BuildRequires: libboost_headers-devel >= %{boost_version} +BuildRequires: libboost_iostreams-devel >= %{boost_version} +BuildRequires: libboost_program_options-devel >= %{boost_version} +BuildRequires: libboost_random-devel >= %{boost_version} +BuildRequires: libboost_regex-devel >= %{boost_version} +BuildRequires: libboost_system-devel >= %{boost_version} +BuildRequires: libboost_thread-devel >= %{boost_version} BuildRequires: libqt5-qtbase-devel BuildRequires: make BuildRequires: mathjax @@ -179,6 +190,7 @@ BuildRequires: pkgconfig(Qt5XmlPatterns) BuildRequires: pkgconfig(RapidJSON) BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(hunspell) BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(pango) @@ -187,9 +199,10 @@ BuildRequires: pkgconfig(zlib) Requires: R-base Requires: R-core-libs -Requires: ghc-pandoc-citeproc -Requires: mathjax -Requires: pandoc +Recommends: ghc-pandoc-citeproc +Recommends: libclang%{_llvm_sonum} +Recommends: mathjax +Recommends: pandoc Recommends: git Recommends: gcc Recommends: gcc-c++ @@ -207,7 +220,6 @@ Provides: bundled(gwt-rstudio) = %{bundled_gwt_rstudio_version} Provides: bundled(gwt-websockets) = %{bundled_gwt_websockets_version} Provides: bundled(highlight.js) = %{bundled_highlightjs_version} -Provides: bundled(hunspell) = %{bundled_hunspell_version} Provides: bundled(inert-polyfill.js) = %{bundled_intert_polyfill_js_version} Provides: bundled(jquery.js) = %{bundled_jquery_version} Provides: bundled(jsbn) = %{bundled_jsbn_version} @@ -255,10 +267,20 @@ supporting libraries %prep +%if 0%{?sle_version} == 150200 %autosetup -p1 +%else +%autosetup -N +%autopatch -p1 -M 6 +%endif # use system libraries when available -rm -rf src/cpp/ext/websocketpp src/cpp/shared_core/include/shared_core/json/rapidjson/ +rm -r \ + src/cpp/core/include/core/libclang/clang-c/ \ + src/cpp/core/spelling/hunspell/ \ + src/cpp/ext/websocketpp \ + src/cpp/shared_core/include/shared_core/json/rapidjson/ +find src/cpp/core/zlib -type f -not -name '*.cpp' -delete ln -sf %{_includedir}/websocketpp src/cpp/ext/websocketpp ln -sf %{_includedir}/rapidjson src/cpp/shared_core/include/shared_core/json/rapidjson @@ -271,6 +293,9 @@ # it manually sed -i 's@gwt_build ALL@gwt_build@g' src/gwt/CMakeLists.txt +# The unversioned libclang.so is only part of clang-devel, so we use the versioned so instead. +sed -i 's#LIBCLANG_PLACEHOLDER#%{_libdir}/libclang.so.%{_llvm_sonum}#' src/cpp/core/libclang/LibClang.cpp + %build %sysusers_generate_pre %{SOURCE4} %{name}-server @@ -284,6 +309,7 @@ -DRSTUDIO_USE_SYSTEM_BOOST=TRUE \ -DRSTUDIO_BOOST_SIGNALS_VERSION=2 \ -DBOOST_ROOT=%{_prefix} -DBOOST_LIBRARYDIR=%{_lib} \ + %{?rstudio_boost_requested_version:-DRSTUDIO_BOOST_REQUESTED_VERSION=%{rstudio_boost_requested_version}} \ -DQT_QMAKE_EXECUTABLE=%{_bindir}/qmake-qt5 %make_build @@ -367,9 +393,13 @@ %license COPYING NOTICE %doc README.md %{_libexecdir}/rstudio +%exclude %{_libexecdir}/rstudio/bin/rserver +%exclude %{_libexecdir}/rstudio/bin/rserver-pam +%exclude %{_libexecdir}/rstudio/bin/%{name} %files desktop %{_bindir}/%{name} +%{_libexecdir}/rstudio/bin/%{name} %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/*/apps/* %{_datadir}/icons/hicolor/*/mimetypes/* @@ -379,6 +409,8 @@ %files server %{_bindir}/rserver %{_bindir}/rserver-pam +%{_libexecdir}/rstudio/bin/rserver +%{_libexecdir}/rstudio/bin/rserver-pam %dir %{_localstatedir}/log/%{name}-server %dir %{_localstatedir}/lib/%{name}-server %{_unitdir}/%{rserver_service} ++++++ 0001-Unbundle-mathjax-and-pandoc.patch ++++++ --- /var/tmp/diff_new_pack.AbeiMQ/_old 2020-09-21 17:20:38.303799849 +0200 +++ /var/tmp/diff_new_pack.AbeiMQ/_new 2020-09-21 17:20:38.307799852 +0200 @@ -1,7 +1,7 @@ From 04766193f0582261cb2cb849e3be0caea7d7a88e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <[email protected]> Date: Mon, 13 Jan 2020 11:27:06 +0100 -Subject: [PATCH 1/5] Unbundle mathjax and pandoc +Subject: [PATCH 1/8] Unbundle mathjax and pandoc Use find_file() & find_program() functions to find the dependencies in the dependencies/ subdirectory first. If they are not there, use the system paths ++++++ 0002-Don-t-install-pandoc-and-mathjax.patch ++++++ --- /var/tmp/diff_new_pack.AbeiMQ/_old 2020-09-21 17:20:38.311799855 +0200 +++ /var/tmp/diff_new_pack.AbeiMQ/_new 2020-09-21 17:20:38.315799858 +0200 @@ -1,7 +1,7 @@ From df0ce1039f881c35bdc78ce91d1944be5384b593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <[email protected]> Date: Tue, 14 Jan 2020 14:20:40 +0100 -Subject: [PATCH 2/5] Don't install pandoc and mathjax +Subject: [PATCH 2/8] Don't install pandoc and mathjax Because we use the system wide version, there's no need to waste time installing the files. ++++++ 0003-Fix-rstudio-exec-path.patch ++++++ --- /var/tmp/diff_new_pack.AbeiMQ/_old 2020-09-21 17:20:38.323799864 +0200 +++ /var/tmp/diff_new_pack.AbeiMQ/_new 2020-09-21 17:20:38.323799864 +0200 @@ -1,7 +1,7 @@ From 173105fc0f0df38596135a2e3522ee0359bde603 Mon Sep 17 00:00:00 2001 From: Marco Varlese <[email protected]> Date: Mon, 27 Jan 2020 14:29:40 +0100 -Subject: [PATCH 3/5] Fix rstudio exec path +Subject: [PATCH 3/8] Fix rstudio exec path Fix the path to the rstudio executable in the rstudio.desktop file. --- ++++++ 0004-add-support-for-boost-1.73.patch ++++++ --- /var/tmp/diff_new_pack.AbeiMQ/_old 2020-09-21 17:20:38.331799870 +0200 +++ /var/tmp/diff_new_pack.AbeiMQ/_new 2020-09-21 17:20:38.331799870 +0200 @@ -1,7 +1,7 @@ From eccc7e7627caf33c4226d987d8ff9c7494646cf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20=C3=9Acar?= <[email protected]> Date: Sat, 30 May 2020 16:34:46 +0200 -Subject: [PATCH 4/5] add support for boost 1.73 +Subject: [PATCH 4/8] add support for boost 1.73 * enable BOOST_BIND_GLOBAL_PLACEHOLDERS to retain placeholders in the global namespace ++++++ 0005-Add-additional-includes-for-aarch64.patch ++++++ --- /var/tmp/diff_new_pack.AbeiMQ/_old 2020-09-21 17:20:38.339799876 +0200 +++ /var/tmp/diff_new_pack.AbeiMQ/_new 2020-09-21 17:20:38.343799879 +0200 @@ -1,7 +1,7 @@ From f2f23822915d220b425e779f226206b9f1f9f780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= <[email protected]> Date: Wed, 2 Sep 2020 13:47:59 +0200 -Subject: [PATCH 5/5] Add additional includes for aarch64 +Subject: [PATCH 5/8] Add additional includes for aarch64 --- src/cpp/core/HtmlUtils.cpp | 1 + ++++++ 0006-Use-system-hunspell.patch ++++++ >From 3ab89e66aedbd071fa89af603754a31f1e2f051a Mon Sep 17 00:00:00 2001 From: Aaron Puchert <[email protected]> Date: Mon, 7 Sep 2020 11:09:01 +0200 Subject: [PATCH 6/8] Use system hunspell --- src/cpp/core/CMakeLists.txt | 6 +++++- src/cpp/core/spelling/HunspellSpellingEngine.cpp | 7 +++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cpp/core/CMakeLists.txt b/src/cpp/core/CMakeLists.txt index 05f5ad67b4..47b6662ff4 100644 --- a/src/cpp/core/CMakeLists.txt +++ b/src/cpp/core/CMakeLists.txt @@ -15,7 +15,11 @@ project (CORE) -add_subdirectory(spelling/hunspell) +add_library(rstudio-core-hunspell SHARED IMPORTED GLOBAL) +find_library(HUNSPELL_LIB NAMES hunspell REQUIRED) +set_target_properties(rstudio-core-hunspell PROPERTIES + IMPORTED_LOCATION "${HUNSPELL_LIB}") + add_subdirectory(tex/synctex) # include files diff --git a/src/cpp/core/spelling/HunspellSpellingEngine.cpp b/src/cpp/core/spelling/HunspellSpellingEngine.cpp index 6cc1315c9d..9c8a61e098 100644 --- a/src/cpp/core/spelling/HunspellSpellingEngine.cpp +++ b/src/cpp/core/spelling/HunspellSpellingEngine.cpp @@ -195,11 +195,10 @@ public: Error wordChars(std::wstring *pWordChars) { - int len; - unsigned short *pChars = pHunspell_->get_wordchars_utf16(&len); + const std::vector<w_char> &pChars = pHunspell_->get_wordchars_utf16(); - for (int i = 0; i < len; i++) - pWordChars->push_back(pChars[i]); + for (w_char pChar : pChars) + pWordChars->push_back((pChar.h << 8) + pChar.l); return Success(); } -- 2.28.0 ++++++ 0007-Fix-libclang-usage.patch ++++++ >From 42fe2eb6367c27a912a2edcd13bc1f1a1a44338a Mon Sep 17 00:00:00 2001 From: Aaron Puchert <[email protected]> Date: Mon, 7 Sep 2020 11:12:26 +0200 Subject: [PATCH 7/8] Fix libclang usage --- src/cpp/core/include/core/libclang/LibClang.hpp | 1 + src/cpp/core/libclang/LibClang.cpp | 14 +++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/cpp/core/include/core/libclang/LibClang.hpp b/src/cpp/core/include/core/libclang/LibClang.hpp index b67a53ee50..63c5a906be 100644 --- a/src/cpp/core/include/core/libclang/LibClang.hpp +++ b/src/cpp/core/include/core/libclang/LibClang.hpp @@ -35,6 +35,7 @@ #include "clang-c/Index.h" #include "clang-c/CXCompilationDatabase.h" +#include "clang-c/Documentation.h" namespace rstudio { namespace core { diff --git a/src/cpp/core/libclang/LibClang.cpp b/src/cpp/core/libclang/LibClang.cpp index 33f113f2f1..f1100b0422 100644 --- a/src/cpp/core/libclang/LibClang.cpp +++ b/src/cpp/core/libclang/LibClang.cpp @@ -58,12 +58,11 @@ std::vector<std::string> defaultCompileArgs(LibraryVersion version) // we need to add in the associated libclang headers as // they are not discovered / used by default during compilation - FilePath llvmPath = s_libraryPath.getParent().getParent(); - boost::format fmt("%1%/lib/clang/%2%/include"); + FilePath llvmPath = s_libraryPath.getParent(); + boost::format fmt("%1%/clang/%2%/include"); fmt % llvmPath.getAbsolutePath() % version.asString(); std::string includePath = fmt.str(); - if (FilePath(includePath).exists()) - compileArgs.push_back(std::string("-I") + includePath); + compileArgs.push_back(std::string("-I") + includePath); return compileArgs; } @@ -85,12 +84,9 @@ std::vector<std::string> systemClangVersions() #elif defined(__unix__) // default set of versions clangVersions = { - "/usr/lib/libclang.so", - "/usr/lib/llvm/libclang.so", - "/usr/lib64/libclang.so", - "/usr/lib64/llvm/libclang.so", + "LIBCLANG_PLACEHOLDER", }; - +#elif 0 // iterate through the set of available 'llvm' directories for (const char* prefix : {"/usr/lib", "/usr/lib64"}) { -- 2.28.0 ++++++ 0008-Add-support-for-RapidJSON-1.1.0-in-Leap-15.2.patch ++++++ >From dfaa947fc5e3969f2bce910281e5fc25f096b344 Mon Sep 17 00:00:00 2001 From: Adam Majer <[email protected]> Date: Thu, 10 Sep 2020 14:56:17 +0200 Subject: [PATCH 8/8] Add support for RapidJSON 1.1.0 in Leap 15.2 --- src/cpp/shared_core/json/Json.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/shared_core/json/Json.cpp b/src/cpp/shared_core/json/Json.cpp index aaac8a3f66..d4149c5c51 100644 --- a/src/cpp/shared_core/json/Json.cpp +++ b/src/cpp/shared_core/json/Json.cpp @@ -746,7 +746,7 @@ std::string Value::write() const rapidjson::Writer<rapidjson::StringBuffer> writer(buffer); m_impl->Document->Accept(writer); - return std::string(buffer.GetString(), buffer.GetLength()); + return std::string(buffer.GetString(), buffer.GetSize() / sizeof(rapidjson::StringBuffer::Ch)); } void Value::write(std::ostream& os) const @@ -760,7 +760,7 @@ std::string Value::writeFormatted() const rapidjson::PrettyWriter<rapidjson::StringBuffer> writer(buffer); m_impl->Document->Accept(writer); - return std::string(buffer.GetString(), buffer.GetLength()); + return std::string(buffer.GetString(), buffer.GetSize() / sizeof(rapidjson::StringBuffer::Ch)); } void Value::writeFormatted(std::ostream& os) const -- 2.28.0 ++++++ rstudio-rpmlintrc ++++++ --- /var/tmp/diff_new_pack.AbeiMQ/_old 2020-09-21 17:20:38.415799935 +0200 +++ /var/tmp/diff_new_pack.AbeiMQ/_new 2020-09-21 17:20:38.415799935 +0200 @@ -1,5 +1,5 @@ # this is a template and can stay in the main package -addFilter(".*devel-file-in-non-devel-package.*/usr/lib/rstudio/resources/templates/rcpp.cpp") +addFilter(".*devel-file-in-non-devel-package.*/usr/libexec/rstudio/resources/templates/rcpp.cpp") addFilter("name-repeated-in-summary.*") # R-core-libs must be explicitly added as rpm doesn't pick it up
