diff options
| author | Ricardo Wurmus <rekado@elephly.net> | 2021-09-24 23:40:24 +0200 |
|---|---|---|
| committer | Ricardo Wurmus <rekado@elephly.net> | 2021-09-24 23:40:24 +0200 |
| commit | 85bf39702f0246ae3d601ac69f4b7828683a24d5 (patch) | |
| tree | 3e9f4b202ee62c3f44f42fce151969f6b3d32765 | |
| parent | 7f18ba0c2a97b50c9220b9388fca7170bfe38511 (diff) | |
patches: Update rstudio-server-multi-version patches.
The changes have been rebased on top of version 1.4.1717 and include a
bug fix. Previous versions would fail to look up the user's active
sessions (and thus fail to restore a previously set version of R) when
rserver did not run as the same user account as the rsession
process (e.g. root).
7 files changed, 60 insertions, 42 deletions
diff --git a/patches/rstudio-server-multi-version/0001-handleClientInit-Store-R-versions-in-sessionInfo.patch b/patches/rstudio-server-multi-version/0001-handleClientInit-Store-R-versions-in-sessionInfo.patch index 7e64e06..4908ed9 100644 --- a/patches/rstudio-server-multi-version/0001-handleClientInit-Store-R-versions-in-sessionInfo.patch +++ b/patches/rstudio-server-multi-version/0001-handleClientInit-Store-R-versions-in-sessionInfo.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 6a8348988fcd961a67d709aa37c5defd7159b27b Mon Sep 17 00:00:00 2001 | 1 | From 131f634028a572b206742697d5cad2122ca940b1 Mon Sep 17 00:00:00 2001 |
| 2 | From: Ricardo Wurmus <rekado@elephly.net> | 2 | From: Ricardo Wurmus <rekado@elephly.net> |
| 3 | Date: Fri, 18 Dec 2020 10:26:44 +0100 | 3 | Date: Fri, 18 Dec 2020 10:26:44 +0100 |
| 4 | Subject: [PATCH 1/7] handleClientInit: Store R versions in sessionInfo. | 4 | Subject: [PATCH 1/7] handleClientInit: Store R versions in sessionInfo. |
| @@ -15,7 +15,7 @@ r_versions_info->available_r_versions. | |||
| 15 | 1 file changed, 26 insertions(+), 5 deletions(-) | 15 | 1 file changed, 26 insertions(+), 5 deletions(-) |
| 16 | 16 | ||
| 17 | diff --git a/src/cpp/session/SessionClientInit.cpp b/src/cpp/session/SessionClientInit.cpp | 17 | diff --git a/src/cpp/session/SessionClientInit.cpp b/src/cpp/session/SessionClientInit.cpp |
| 18 | index e4b3b7dd71..52523fc896 100644 | 18 | index ab1228096f..6d9e5a064b 100644 |
| 19 | --- a/src/cpp/session/SessionClientInit.cpp | 19 | --- a/src/cpp/session/SessionClientInit.cpp |
| 20 | +++ b/src/cpp/session/SessionClientInit.cpp | 20 | +++ b/src/cpp/session/SessionClientInit.cpp |
| 21 | @@ -2,6 +2,7 @@ | 21 | @@ -2,6 +2,7 @@ |
| @@ -26,7 +26,7 @@ index e4b3b7dd71..52523fc896 100644 | |||
| 26 | * | 26 | * |
| 27 | * Unless you have received this program directly from RStudio pursuant | 27 | * Unless you have received this program directly from RStudio pursuant |
| 28 | * to the terms of a commercial license agreement with RStudio, then | 28 | * to the terms of a commercial license agreement with RStudio, then |
| 29 | @@ -62,6 +63,8 @@ | 29 | @@ -63,6 +64,8 @@ |
| 30 | #include <core/http/CSRFToken.hpp> | 30 | #include <core/http/CSRFToken.hpp> |
| 31 | #include <core/system/Environment.hpp> | 31 | #include <core/system/Environment.hpp> |
| 32 | 32 | ||
| @@ -35,7 +35,7 @@ index e4b3b7dd71..52523fc896 100644 | |||
| 35 | #include <session/SessionConsoleProcess.hpp> | 35 | #include <session/SessionConsoleProcess.hpp> |
| 36 | #include <session/SessionClientEventService.hpp> | 36 | #include <session/SessionClientEventService.hpp> |
| 37 | #include <session/SessionHttpConnection.hpp> | 37 | #include <session/SessionHttpConnection.hpp> |
| 38 | @@ -507,11 +510,29 @@ void handleClientInit(const boost::function<void()>& initFunction, | 38 | @@ -511,11 +514,29 @@ void handleClientInit(const boost::function<void()>& initFunction, |
| 39 | 39 | ||
| 40 | sessionInfo["multi_session"] = options.multiSession(); | 40 | sessionInfo["multi_session"] = options.multiSession(); |
| 41 | 41 | ||
| @@ -71,5 +71,5 @@ index e4b3b7dd71..52523fc896 100644 | |||
| 71 | sessionInfo["show_user_home_page"] = options.showUserHomePage(); | 71 | sessionInfo["show_user_home_page"] = options.showUserHomePage(); |
| 72 | sessionInfo["user_home_page_url"] = json::Value(); | 72 | sessionInfo["user_home_page_url"] = json::Value(); |
| 73 | -- | 73 | -- |
| 74 | 2.31.1 | 74 | 2.33.0 |
| 75 | 75 | ||
diff --git a/patches/rstudio-server-multi-version/0002-sessionProcessConfig-Configure-R-version-from-active.patch b/patches/rstudio-server-multi-version/0002-sessionProcessConfig-Configure-R-version-from-active.patch index 5105001..8b70bd0 100644 --- a/patches/rstudio-server-multi-version/0002-sessionProcessConfig-Configure-R-version-from-active.patch +++ b/patches/rstudio-server-multi-version/0002-sessionProcessConfig-Configure-R-version-from-active.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 6172ab0908e8b80bd5838ed4336335d224b80941 Mon Sep 17 00:00:00 2001 | 1 | From 8202e0ae8276285afcdeee1fbec50a744a7171ff Mon Sep 17 00:00:00 2001 |
| 2 | From: Ricardo Wurmus <rekado@elephly.net> | 2 | From: Ricardo Wurmus <rekado@elephly.net> |
| 3 | Date: Fri, 18 Dec 2020 10:32:01 +0100 | 3 | Date: Fri, 18 Dec 2020 10:32:01 +0100 |
| 4 | Subject: [PATCH 2/7] sessionProcessConfig: Configure R version from active | 4 | Subject: [PATCH 2/7] sessionProcessConfig: Configure R version from active |
| @@ -13,11 +13,11 @@ be used to launch the embedded R. | |||
| 13 | Configure R environment using the R version that has been recorded in | 13 | Configure R environment using the R version that has been recorded in |
| 14 | the active session. | 14 | the active session. |
| 15 | --- | 15 | --- |
| 16 | src/cpp/server/ServerSessionManager.cpp | 26 ++++++++++++++++++++++++- | 16 | src/cpp/server/ServerSessionManager.cpp | 44 ++++++++++++++++++++++++- |
| 17 | 1 file changed, 25 insertions(+), 1 deletion(-) | 17 | 1 file changed, 43 insertions(+), 1 deletion(-) |
| 18 | 18 | ||
| 19 | diff --git a/src/cpp/server/ServerSessionManager.cpp b/src/cpp/server/ServerSessionManager.cpp | 19 | diff --git a/src/cpp/server/ServerSessionManager.cpp b/src/cpp/server/ServerSessionManager.cpp |
| 20 | index 6e37578cab..86d212779a 100644 | 20 | index 22f138a6ad..01be702a83 100644 |
| 21 | --- a/src/cpp/server/ServerSessionManager.cpp | 21 | --- a/src/cpp/server/ServerSessionManager.cpp |
| 22 | +++ b/src/cpp/server/ServerSessionManager.cpp | 22 | +++ b/src/cpp/server/ServerSessionManager.cpp |
| 23 | @@ -2,6 +2,7 @@ | 23 | @@ -2,6 +2,7 @@ |
| @@ -43,20 +43,34 @@ index 6e37578cab..86d212779a 100644 | |||
| 43 | #include <monitor/MonitorClient.hpp> | 43 | #include <monitor/MonitorClient.hpp> |
| 44 | #include <session/SessionConstants.hpp> | 44 | #include <session/SessionConstants.hpp> |
| 45 | 45 | ||
| 46 | @@ -156,7 +161,26 @@ core::system::ProcessConfig sessionProcessConfig( | 46 | @@ -156,7 +161,44 @@ core::system::ProcessConfig sessionProcessConfig( |
| 47 | std::copy(extraArgs.begin(), extraArgs.end(), std::back_inserter(args)); | 47 | std::copy(extraArgs.begin(), extraArgs.end(), std::back_inserter(args)); |
| 48 | 48 | ||
| 49 | // append R environment variables | 49 | // append R environment variables |
| 50 | - r_util::RVersion rVersion = r_environment::rVersion(); | 50 | - r_util::RVersion rVersion = r_environment::rVersion(); |
| 51 | + // Get the active session (e.g. after switching projects) and set R | 51 | + // Get the active session (e.g. after switching projects) and set R |
| 52 | + // variables according to the configured R version. | 52 | + // variables according to the configured R version. |
| 53 | + core::system::User user; | 53 | + |
| 54 | + core::system::User::getUserFromIdentifier(context.username, user); | 54 | + // We cannot use core::system::userHomePath because it always |
| 55 | + FilePath userScratchPath_ = core::system::xdg::userDataDir(context.username); | 55 | + // returns the server user's home directory. This is /root when |
| 56 | + // rserver runs as root. Instead we want to get the home directory | ||
| 57 | + // of the *target* user for which rsession will be run. This is | ||
| 58 | + // why we launch a shell to determine the user's home directory. | ||
| 59 | + core::system::ProcessOptions poptions; | ||
| 60 | + core::system::ProcessResult presult; | ||
| 61 | + Error rError = core::system::runCommand( | ||
| 62 | + "/bin/sh -c 'echo -n ~" + context.username + "'", | ||
| 63 | + poptions, | ||
| 64 | + &presult); | ||
| 65 | + if (rError) | ||
| 66 | + LOG_ERROR(rError); | ||
| 67 | + | ||
| 68 | + FilePath homeDir = FilePath(presult.stdOut); | ||
| 69 | + FilePath userScratchPath_ = core::system::xdg::userDataDir(context.username, homeDir); | ||
| 56 | + | 70 | + |
| 57 | + r_util::ActiveSessions activeSessions(userScratchPath_); | 71 | + r_util::ActiveSessions activeSessions(userScratchPath_); |
| 58 | + std::vector<boost::shared_ptr<r_util::ActiveSession> > sessions = | 72 | + std::vector<boost::shared_ptr<r_util::ActiveSession> > sessions = |
| 59 | + activeSessions.list(user.getHomePath(), false); | 73 | + activeSessions.list(homeDir, false); |
| 60 | + | 74 | + |
| 61 | + r_util::RVersion rVersion; | 75 | + r_util::RVersion rVersion; |
| 62 | + if (sessions.size() > 0) { | 76 | + if (sessions.size() > 0) { |
| @@ -65,6 +79,10 @@ index 6e37578cab..86d212779a 100644 | |||
| 65 | + std::string errorMsg; | 79 | + std::string errorMsg; |
| 66 | + bool success = r_environment::detectRVersion(FilePath((*sessions.front()).rVersionHome()).completePath("bin/R"), | 80 | + bool success = r_environment::detectRVersion(FilePath((*sessions.front()).rVersionHome()).completePath("bin/R"), |
| 67 | + &rVersion, &errorMsg); | 81 | + &rVersion, &errorMsg); |
| 82 | + | ||
| 83 | + if (!success) { | ||
| 84 | + rVersion = r_environment::rVersion(); | ||
| 85 | + } | ||
| 68 | + } else { | 86 | + } else { |
| 69 | + rVersion = r_environment::rVersion(); | 87 | + rVersion = r_environment::rVersion(); |
| 70 | + } | 88 | + } |
| @@ -72,5 +90,5 @@ index 6e37578cab..86d212779a 100644 | |||
| 72 | environment.insert(environment.end(), rEnvVars.begin(), rEnvVars.end()); | 90 | environment.insert(environment.end(), rEnvVars.begin(), rEnvVars.end()); |
| 73 | 91 | ||
| 74 | -- | 92 | -- |
| 75 | 2.31.1 | 93 | 2.33.0 |
| 76 | 94 | ||
diff --git a/patches/rstudio-server-multi-version/0003-NewProjectWizard-Unhide-version-selector-widget.patch b/patches/rstudio-server-multi-version/0003-NewProjectWizard-Unhide-version-selector-widget.patch index c8f78a5..74ddd99 100644 --- a/patches/rstudio-server-multi-version/0003-NewProjectWizard-Unhide-version-selector-widget.patch +++ b/patches/rstudio-server-multi-version/0003-NewProjectWizard-Unhide-version-selector-widget.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 28a8054858657014cb83703be222a06f3aa06119 Mon Sep 17 00:00:00 2001 | 1 | From 4063e89423325632efc734ae3d2e143f354392cf Mon Sep 17 00:00:00 2001 |
| 2 | From: Ricardo Wurmus <rekado@elephly.net> | 2 | From: Ricardo Wurmus <rekado@elephly.net> |
| 3 | Date: Fri, 18 Dec 2020 10:35:39 +0100 | 3 | Date: Fri, 18 Dec 2020 10:35:39 +0100 |
| 4 | Subject: [PATCH 3/7] NewProjectWizard: Unhide version selector widget. | 4 | Subject: [PATCH 3/7] NewProjectWizard: Unhide version selector widget. |
| @@ -11,10 +11,10 @@ Do not hide the widget. | |||
| 11 | 1 file changed, 1 deletion(-) | 11 | 1 file changed, 1 deletion(-) |
| 12 | 12 | ||
| 13 | diff --git a/src/gwt/src/org/rstudio/studio/client/projects/ui/newproject/NewProjectWizard.java b/src/gwt/src/org/rstudio/studio/client/projects/ui/newproject/NewProjectWizard.java | 13 | diff --git a/src/gwt/src/org/rstudio/studio/client/projects/ui/newproject/NewProjectWizard.java b/src/gwt/src/org/rstudio/studio/client/projects/ui/newproject/NewProjectWizard.java |
| 14 | index 08ece8ab26..3a19f4eeab 100644 | 14 | index f386b99af1..d39ef19bf9 100644 |
| 15 | --- a/src/gwt/src/org/rstudio/studio/client/projects/ui/newproject/NewProjectWizard.java | 15 | --- a/src/gwt/src/org/rstudio/studio/client/projects/ui/newproject/NewProjectWizard.java |
| 16 | +++ b/src/gwt/src/org/rstudio/studio/client/projects/ui/newproject/NewProjectWizard.java | 16 | +++ b/src/gwt/src/org/rstudio/studio/client/projects/ui/newproject/NewProjectWizard.java |
| 17 | @@ -70,7 +70,6 @@ public class NewProjectWizard extends Wizard<NewProjectInput,NewProjectResult> | 17 | @@ -71,7 +71,6 @@ public class NewProjectWizard extends Wizard<NewProjectInput,NewProjectResult> |
| 18 | rVersionSelector_.setRVersion(rVersion); | 18 | rVersionSelector_.setRVersion(rVersion); |
| 19 | addLeftWidget(rVersionSelector_); | 19 | addLeftWidget(rVersionSelector_); |
| 20 | rVersionSelector_.getElement().getStyle().setMarginRight(8, Unit.PX); | 20 | rVersionSelector_.getElement().getStyle().setMarginRight(8, Unit.PX); |
| @@ -23,5 +23,5 @@ index 08ece8ab26..3a19f4eeab 100644 | |||
| 23 | 23 | ||
| 24 | openInNewWindow_ = new CheckBox("Open in new session"); | 24 | openInNewWindow_ = new CheckBox("Open in new session"); |
| 25 | -- | 25 | -- |
| 26 | 2.31.1 | 26 | 2.33.0 |
| 27 | 27 | ||
diff --git a/patches/rstudio-server-multi-version/0004-handleConnection-Switch-R-version-when-switching-pro.patch b/patches/rstudio-server-multi-version/0004-handleConnection-Switch-R-version-when-switching-pro.patch index 0fbeb86..0cd1c7c 100644 --- a/patches/rstudio-server-multi-version/0004-handleConnection-Switch-R-version-when-switching-pro.patch +++ b/patches/rstudio-server-multi-version/0004-handleConnection-Switch-R-version-when-switching-pro.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From a41c5e9ce141713b12ad552205c27db41193c477 Mon Sep 17 00:00:00 2001 | 1 | From 54e7fb9c835b3ec8afcb5db55b03a8ead3ff6088 Mon Sep 17 00:00:00 2001 |
| 2 | From: Ricardo Wurmus <rekado@elephly.net> | 2 | From: Ricardo Wurmus <rekado@elephly.net> |
| 3 | Date: Sat, 19 Dec 2020 00:57:26 +0100 | 3 | Date: Sat, 19 Dec 2020 00:57:26 +0100 |
| 4 | Subject: [PATCH 4/7] handleConnection: Switch R version when switching | 4 | Subject: [PATCH 4/7] handleConnection: Switch R version when switching |
| @@ -70,10 +70,10 @@ index 2fd08c028b..3e66f13dd7 100644 | |||
| 70 | module_context::sharedProjectScratchPath(), | 70 | module_context::sharedProjectScratchPath(), |
| 71 | version, | 71 | version, |
| 72 | diff --git a/src/gwt/src/org/rstudio/studio/client/projects/Projects.java b/src/gwt/src/org/rstudio/studio/client/projects/Projects.java | 72 | diff --git a/src/gwt/src/org/rstudio/studio/client/projects/Projects.java b/src/gwt/src/org/rstudio/studio/client/projects/Projects.java |
| 73 | index 89c3eb04b9..4ebeb6881d 100644 | 73 | index 71ce880487..63937c4806 100644 |
| 74 | --- a/src/gwt/src/org/rstudio/studio/client/projects/Projects.java | 74 | --- a/src/gwt/src/org/rstudio/studio/client/projects/Projects.java |
| 75 | +++ b/src/gwt/src/org/rstudio/studio/client/projects/Projects.java | 75 | +++ b/src/gwt/src/org/rstudio/studio/client/projects/Projects.java |
| 76 | @@ -1131,7 +1131,8 @@ public class Projects implements OpenProjectFileHandler, | 76 | @@ -1127,7 +1127,8 @@ public class Projects implements OpenProjectFileEvent.Handler, |
| 77 | { | 77 | { |
| 78 | // perform quit | 78 | // perform quit |
| 79 | applicationQuit_.performQuit(null, saveChanges, | 79 | applicationQuit_.performQuit(null, saveChanges, |
| @@ -84,5 +84,5 @@ index 89c3eb04b9..4ebeb6881d 100644 | |||
| 84 | }; | 84 | }; |
| 85 | 85 | ||
| 86 | -- | 86 | -- |
| 87 | 2.31.1 | 87 | 2.33.0 |
| 88 | 88 | ||
diff --git a/patches/rstudio-server-multi-version/0005-Add-version-switcher-widget-to-toolbar.patch b/patches/rstudio-server-multi-version/0005-Add-version-switcher-widget-to-toolbar.patch index da4f79f..18c1158 100644 --- a/patches/rstudio-server-multi-version/0005-Add-version-switcher-widget-to-toolbar.patch +++ b/patches/rstudio-server-multi-version/0005-Add-version-switcher-widget-to-toolbar.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 3a70a198af9771dc080ab3d790cab38d47196042 Mon Sep 17 00:00:00 2001 | 1 | From 0bf91a24f1d087bc78b501e0493eea7f02a9b9d3 Mon Sep 17 00:00:00 2001 |
| 2 | From: Ricardo Wurmus <rekado@elephly.net> | 2 | From: Ricardo Wurmus <rekado@elephly.net> |
| 3 | Date: Sat, 19 Dec 2020 23:33:16 +0100 | 3 | Date: Sat, 19 Dec 2020 23:33:16 +0100 |
| 4 | Subject: [PATCH 5/7] Add version switcher widget to toolbar. | 4 | Subject: [PATCH 5/7] Add version switcher widget to toolbar. |
| @@ -14,10 +14,10 @@ Subject: [PATCH 5/7] Add version switcher widget to toolbar. | |||
| 14 | create mode 100644 src/gwt/src/org/rstudio/studio/client/application/ui/RVersionPopupMenu.java | 14 | create mode 100644 src/gwt/src/org/rstudio/studio/client/application/ui/RVersionPopupMenu.java |
| 15 | 15 | ||
| 16 | diff --git a/src/gwt/src/org/rstudio/core/client/ElementIds.java b/src/gwt/src/org/rstudio/core/client/ElementIds.java | 16 | diff --git a/src/gwt/src/org/rstudio/core/client/ElementIds.java b/src/gwt/src/org/rstudio/core/client/ElementIds.java |
| 17 | index 9a62c2f5b1..7ef305d552 100644 | 17 | index e47990a68d..eaffa48271 100644 |
| 18 | --- a/src/gwt/src/org/rstudio/core/client/ElementIds.java | 18 | --- a/src/gwt/src/org/rstudio/core/client/ElementIds.java |
| 19 | +++ b/src/gwt/src/org/rstudio/core/client/ElementIds.java | 19 | +++ b/src/gwt/src/org/rstudio/core/client/ElementIds.java |
| 20 | @@ -295,6 +295,8 @@ public class ElementIds | 20 | @@ -321,6 +321,8 @@ public class ElementIds |
| 21 | public final static String PROJECT_MENUBUTTON_TOOLBAR_SUFFIX = "toolbar"; | 21 | public final static String PROJECT_MENUBUTTON_TOOLBAR_SUFFIX = "toolbar"; |
| 22 | public final static String PROJECT_MENUBUTTON_MENUBAR_SUFFIX = "menubar"; | 22 | public final static String PROJECT_MENUBUTTON_MENUBAR_SUFFIX = "menubar"; |
| 23 | 23 | ||
| @@ -27,7 +27,7 @@ index 9a62c2f5b1..7ef305d552 100644 | |||
| 27 | public final static String BUILD_MORE_MENUBUTTON = "build_more_menubutton"; | 27 | public final static String BUILD_MORE_MENUBUTTON = "build_more_menubutton"; |
| 28 | public final static String BUILD_BOOKDOWN_MENUBUTTON = "build_bookdown_menubutton"; | 28 | public final static String BUILD_BOOKDOWN_MENUBUTTON = "build_bookdown_menubutton"; |
| 29 | diff --git a/src/gwt/src/org/rstudio/studio/client/RStudioGinjector.java b/src/gwt/src/org/rstudio/studio/client/RStudioGinjector.java | 29 | diff --git a/src/gwt/src/org/rstudio/studio/client/RStudioGinjector.java b/src/gwt/src/org/rstudio/studio/client/RStudioGinjector.java |
| 30 | index 5ee1e0b025..1517834382 100644 | 30 | index 486146b30e..2bb2acb895 100644 |
| 31 | --- a/src/gwt/src/org/rstudio/studio/client/RStudioGinjector.java | 31 | --- a/src/gwt/src/org/rstudio/studio/client/RStudioGinjector.java |
| 32 | +++ b/src/gwt/src/org/rstudio/studio/client/RStudioGinjector.java | 32 | +++ b/src/gwt/src/org/rstudio/studio/client/RStudioGinjector.java |
| 33 | @@ -41,6 +41,7 @@ import org.rstudio.studio.client.application.AriaLiveService; | 33 | @@ -41,6 +41,7 @@ import org.rstudio.studio.client.application.AriaLiveService; |
| @@ -38,7 +38,7 @@ index 5ee1e0b025..1517834382 100644 | |||
| 38 | import org.rstudio.studio.client.application.ui.addins.AddinsToolbarButton; | 38 | import org.rstudio.studio.client.application.ui.addins.AddinsToolbarButton; |
| 39 | import org.rstudio.studio.client.application.ui.impl.DesktopApplicationHeader; | 39 | import org.rstudio.studio.client.application.ui.impl.DesktopApplicationHeader; |
| 40 | import org.rstudio.studio.client.application.ui.impl.WebApplicationHeader; | 40 | import org.rstudio.studio.client.application.ui.impl.WebApplicationHeader; |
| 41 | @@ -226,6 +227,7 @@ public interface RStudioGinjector extends Ginjector | 41 | @@ -227,6 +228,7 @@ public interface RStudioGinjector extends Ginjector |
| 42 | void injectMembers(CodeFilesList codeFilesList); | 42 | void injectMembers(CodeFilesList codeFilesList); |
| 43 | void injectMembers(ToolbarPopupMenu toolbarPopupMenu); | 43 | void injectMembers(ToolbarPopupMenu toolbarPopupMenu); |
| 44 | void injectMembers(ProjectPopupMenu projectPopupMenu); | 44 | void injectMembers(ProjectPopupMenu projectPopupMenu); |
| @@ -230,10 +230,10 @@ index 0000000000..ca66b2f53f | |||
| 230 | + private EventBus events_; | 230 | + private EventBus events_; |
| 231 | +} | 231 | +} |
| 232 | diff --git a/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.cmd.xml b/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.cmd.xml | 232 | diff --git a/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.cmd.xml b/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.cmd.xml |
| 233 | index 8f53957924..47c5fbb89a 100644 | 233 | index c036e2d519..0ff515aa02 100644 |
| 234 | --- a/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.cmd.xml | 234 | --- a/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.cmd.xml |
| 235 | +++ b/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.cmd.xml | 235 | +++ b/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.cmd.xml |
| 236 | @@ -1312,6 +1312,17 @@ well as menu structures (for main menu and popup menus). | 236 | @@ -1324,6 +1324,17 @@ well as menu structures (for main menu and popup menus). |
| 237 | desc="Edit options for the current project" | 237 | desc="Edit options for the current project" |
| 238 | windowMode="main"/> | 238 | windowMode="main"/> |
| 239 | 239 | ||
| @@ -252,7 +252,7 @@ index 8f53957924..47c5fbb89a 100644 | |||
| 252 | menuLabel="" | 252 | menuLabel="" |
| 253 | buttonLabel="" | 253 | buttonLabel="" |
| 254 | diff --git a/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.java b/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.java | 254 | diff --git a/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.java b/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.java |
| 255 | index 803f79ecc9..1c84e2c039 100644 | 255 | index 37a88a2369..cbe16750f4 100644 |
| 256 | --- a/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.java | 256 | --- a/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.java |
| 257 | +++ b/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.java | 257 | +++ b/src/gwt/src/org/rstudio/studio/client/workbench/commands/Commands.java |
| 258 | @@ -2,6 +2,7 @@ | 258 | @@ -2,6 +2,7 @@ |
| @@ -263,7 +263,7 @@ index 803f79ecc9..1c84e2c039 100644 | |||
| 263 | * | 263 | * |
| 264 | * Unless you have received this program directly from RStudio pursuant | 264 | * Unless you have received this program directly from RStudio pursuant |
| 265 | * to the terms of a commercial license agreement with RStudio, then | 265 | * to the terms of a commercial license agreement with RStudio, then |
| 266 | @@ -231,6 +232,18 @@ public abstract class | 266 | @@ -232,6 +233,18 @@ public abstract class |
| 267 | public abstract AppCommand projectSweaveOptions(); | 267 | public abstract AppCommand projectSweaveOptions(); |
| 268 | public abstract AppCommand setWorkingDirToProjectDir(); | 268 | public abstract AppCommand setWorkingDirToProjectDir(); |
| 269 | 269 | ||
| @@ -283,5 +283,5 @@ index 803f79ecc9..1c84e2c039 100644 | |||
| 283 | public abstract AppCommand consoleClear(); | 283 | public abstract AppCommand consoleClear(); |
| 284 | public abstract AppCommand interruptR(); | 284 | public abstract AppCommand interruptR(); |
| 285 | -- | 285 | -- |
| 286 | 2.31.1 | 286 | 2.33.0 |
| 287 | 287 | ||
diff --git a/patches/rstudio-server-multi-version/0006-Look-at-.local-share-rstudio-r-versions-for-custom-R.patch b/patches/rstudio-server-multi-version/0006-Look-at-.local-share-rstudio-r-versions-for-custom-R.patch index 48150c3..cb5acec 100644 --- a/patches/rstudio-server-multi-version/0006-Look-at-.local-share-rstudio-r-versions-for-custom-R.patch +++ b/patches/rstudio-server-multi-version/0006-Look-at-.local-share-rstudio-r-versions-for-custom-R.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From e309b35a2f59a268442de8e1684ddd72fc9e5166 Mon Sep 17 00:00:00 2001 | 1 | From b5f4604100d06bc52b31a5e661bc8d4f3cef3259 Mon Sep 17 00:00:00 2001 |
| 2 | From: Ricardo Wurmus <rekado@elephly.net> | 2 | From: Ricardo Wurmus <rekado@elephly.net> |
| 3 | Date: Sun, 20 Dec 2020 00:25:42 +0100 | 3 | Date: Sun, 20 Dec 2020 00:25:42 +0100 |
| 4 | Subject: [PATCH 6/7] Look at ~/.local/share/rstudio/r-versions for custom R | 4 | Subject: [PATCH 6/7] Look at ~/.local/share/rstudio/r-versions for custom R |
| @@ -68,10 +68,10 @@ index 840429edf5..3cf9b7d79e 100644 | |||
| 68 | bool detectRVersion(const core::FilePath& rScriptPath, | 68 | bool detectRVersion(const core::FilePath& rScriptPath, |
| 69 | core::r_util::RVersion* pVersion, | 69 | core::r_util::RVersion* pVersion, |
| 70 | diff --git a/src/cpp/session/SessionClientInit.cpp b/src/cpp/session/SessionClientInit.cpp | 70 | diff --git a/src/cpp/session/SessionClientInit.cpp b/src/cpp/session/SessionClientInit.cpp |
| 71 | index 52523fc896..34dad727c4 100644 | 71 | index 6d9e5a064b..52bf324cb2 100644 |
| 72 | --- a/src/cpp/session/SessionClientInit.cpp | 72 | --- a/src/cpp/session/SessionClientInit.cpp |
| 73 | +++ b/src/cpp/session/SessionClientInit.cpp | 73 | +++ b/src/cpp/session/SessionClientInit.cpp |
| 74 | @@ -511,8 +511,14 @@ void handleClientInit(const boost::function<void()>& initFunction, | 74 | @@ -515,8 +515,14 @@ void handleClientInit(const boost::function<void()>& initFunction, |
| 75 | sessionInfo["multi_session"] = options.multiSession(); | 75 | sessionInfo["multi_session"] = options.multiSession(); |
| 76 | 76 | ||
| 77 | // Read versions from /etc/rstudio/r-versions | 77 | // Read versions from /etc/rstudio/r-versions |
| @@ -88,5 +88,5 @@ index 52523fc896..34dad727c4 100644 | |||
| 88 | { | 88 | { |
| 89 | json::Object rVersionJson; | 89 | json::Object rVersionJson; |
| 90 | -- | 90 | -- |
| 91 | 2.31.1 | 91 | 2.33.0 |
| 92 | 92 | ||
diff --git a/patches/rstudio-server-multi-version/0007-detectRLocationsUsingR-Restore-R_HOME-at-the-end.patch b/patches/rstudio-server-multi-version/0007-detectRLocationsUsingR-Restore-R_HOME-at-the-end.patch index 96eb6aa..7f61e9c 100644 --- a/patches/rstudio-server-multi-version/0007-detectRLocationsUsingR-Restore-R_HOME-at-the-end.patch +++ b/patches/rstudio-server-multi-version/0007-detectRLocationsUsingR-Restore-R_HOME-at-the-end.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 36ed7d1c0036d40798a3ab5045f365e8e33692f3 Mon Sep 17 00:00:00 2001 | 1 | From 4834bd54840c7df650b10222597f06a312ce24c6 Mon Sep 17 00:00:00 2001 |
| 2 | From: Ricardo Wurmus <rekado@elephly.net> | 2 | From: Ricardo Wurmus <rekado@elephly.net> |
| 3 | Date: Sun, 20 Dec 2020 14:49:51 +0100 | 3 | Date: Sun, 20 Dec 2020 14:49:51 +0100 |
| 4 | Subject: [PATCH 7/7] detectRLocationsUsingR: Restore R_HOME at the end. | 4 | Subject: [PATCH 7/7] detectRLocationsUsingR: Restore R_HOME at the end. |
| @@ -11,10 +11,10 @@ process is calling it, and its R_HOME may not be unset. | |||
| 11 | 1 file changed, 3 insertions(+) | 11 | 1 file changed, 3 insertions(+) |
| 12 | 12 | ||
| 13 | diff --git a/src/cpp/core/r_util/REnvironmentPosix.cpp b/src/cpp/core/r_util/REnvironmentPosix.cpp | 13 | diff --git a/src/cpp/core/r_util/REnvironmentPosix.cpp b/src/cpp/core/r_util/REnvironmentPosix.cpp |
| 14 | index 83b60d7a1b..a909631e25 100644 | 14 | index dbc9a9a1af..8ec66fd840 100644 |
| 15 | --- a/src/cpp/core/r_util/REnvironmentPosix.cpp | 15 | --- a/src/cpp/core/r_util/REnvironmentPosix.cpp |
| 16 | +++ b/src/cpp/core/r_util/REnvironmentPosix.cpp | 16 | +++ b/src/cpp/core/r_util/REnvironmentPosix.cpp |
| 17 | @@ -489,6 +489,7 @@ bool detectRLocationsUsingR(const std::string& rScriptPath, | 17 | @@ -492,6 +492,7 @@ bool detectRLocationsUsingR(const std::string& rScriptPath, |
| 18 | // (the normal semantics of invoking the R script are that it overwrites | 18 | // (the normal semantics of invoking the R script are that it overwrites |
| 19 | // R_HOME and prints a warning -- this warning is co-mingled with the | 19 | // R_HOME and prints a warning -- this warning is co-mingled with the |
| 20 | // output of R and messes up our parsing) | 20 | // output of R and messes up our parsing) |
| @@ -22,7 +22,7 @@ index 83b60d7a1b..a909631e25 100644 | |||
| 22 | core::system::setenv("R_HOME", ""); | 22 | core::system::setenv("R_HOME", ""); |
| 23 | 23 | ||
| 24 | // if no R path was specified for a module, the module binary path MUST be specified | 24 | // if no R path was specified for a module, the module binary path MUST be specified |
| 25 | @@ -598,6 +599,8 @@ bool detectRLocationsUsingR(const std::string& rScriptPath, | 25 | @@ -601,6 +602,8 @@ bool detectRLocationsUsingR(const std::string& rScriptPath, |
| 26 | return false; | 26 | return false; |
| 27 | } | 27 | } |
| 28 | 28 | ||
| @@ -32,5 +32,5 @@ index 83b60d7a1b..a909631e25 100644 | |||
| 32 | } | 32 | } |
| 33 | #endif | 33 | #endif |
| 34 | -- | 34 | -- |
| 35 | 2.31.1 | 35 | 2.33.0 |
| 36 | 36 | ||
