Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d62d686

Browse files
committed
Merge remote-tracking branch 'origin/main' into feature/sidebar
2 parents 0c1dba1 + 4ebf907 commit d62d686

File tree

9 files changed

+413
-352
lines changed

9 files changed

+413
-352
lines changed

docs/news/index.qmd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ This page provides the release notes associated with each release of RStudio and
3030
- Fixed an issue where audited jobs would fail if the user's Workbench username differs from their posix username (rstudio-pro#8129)
3131
- Fixed an issue where the session init container was being added to containerized sessions and jobs on clusters that did not support them (rstudio-pro#8009)
3232
- Fixed an issue where Shiny for Python and other applications would reguarly experience websocket failures in VS Code and Positron sessions (rstudio-pro#7368)
33+
- Fixed an issue where the positron-settings.json example in the Admin guide had an extra comma (rstudio-pro#8853) <i class="bi bi-info-circle-fill" title="Documentation change since last release/patch."></i>
3334

3435
### Dependencies
3536

jenkins/Jenkinsfile.linux

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,17 @@ pipeline {
200200

201201
steps {
202202
dir('package/linux') {
203-
withAWS(role: 'build', roleAccount: AWS_ACCOUNT_ID) {
203+
if (params.DAILY) {
204204
sh "PACKAGE_OS='${package_os[env.OS]}' ${ENV} ./make-${FLAVOR.toLowerCase()}-package ${ext_map[env.OS].toUpperCase()} clean"
205+
} else {
206+
withAWS(role: 'build', roleAccount: AWS_ACCOUNT_ID) {
207+
sh "PACKAGE_OS='${package_os[env.OS]}' ${ENV} ./make-${FLAVOR.toLowerCase()}-package ${ext_map[env.OS].toUpperCase()} clean"
208+
}
209+
}
210+
if (env.WORKSPACE != "pull-requests") {
211+
withAWS(role: 'build', roleAccount: AWS_ACCOUNT_ID) {
212+
sh "PACKAGE_OS='${package_os[env.OS]}' ${ENV} ./scripts/upload-debug-symbols ${FLAVOR.toLowerCase()} ${ext_map[env.OS].toUpperCase()} ${ARCH}"
213+
}
205214
}
206215
sh '../../docker/jenkins/sign-release.sh ${BUILD_LOCATION}/rstudio-*.${PKG_EXTENSION} ${CODESIGN_KEY} ${CODESIGN_PASS}'
207216
}

package/linux/make-package

Lines changed: 12 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ PREV_WD=$(pwd)
3131
# raise the limit on number of open files
3232
ulimit -n 2048
3333

34+
HELP_TARGETS='One of "Electron" or "Server"'
35+
3436
function help() {
3537
cat <<EOF
3638
usage: make-package target package [clean]
@@ -44,7 +46,7 @@ Examples
4446
4547
Positional Arguments
4648
target -- build target
47-
One of "Electron" or "Server"
49+
$HELP_TARGETS
4850
4951
package
5052
One of "DEB" or "RPM"
@@ -113,6 +115,15 @@ RSTUDIO_TARGET=$1
113115
PACKAGE_TARGET=$2
114116
CLEAN=$3
115117

118+
# This script populates BUILD_DIR, CMAKE_BUILD_TYPE, and RSTUDIO_VERSION_FULL,
119+
# as well as filling in RSTUDIO_VERSION_MAJOR/MINOR/PATCH with defaults if not
120+
# specified.
121+
source "${PKG_DIR}/scripts/vars.sh"
122+
123+
if [ -f "${PKG_DIR}/scripts/overlay.sh" ]; then
124+
source "${PKG_DIR}/scripts/overlay.sh"
125+
fi
126+
116127
if [ "$RSTUDIO_TARGET" != "Desktop" ] && [ "$RSTUDIO_TARGET" != "Electron" ] && [ "$RSTUDIO_TARGET" != "Server" ]
117128
then
118129
help
@@ -139,21 +150,6 @@ else
139150
fi
140151
export GWT_MAIN_MODULE
141152

142-
if test -z "$BUILD_DIR"
143-
then
144-
# set build type( if necessary) and build dir
145-
if test -z "$CMAKE_BUILD_TYPE"
146-
then
147-
CMAKE_BUILD_TYPE=RelWithDebInfo
148-
BUILD_DIR=build-$RSTUDIO_TARGET-$PACKAGE_TARGET
149-
else
150-
BUILD_DIR=build-$RSTUDIO_TARGET-$PACKAGE_TARGET-$CMAKE_BUILD_TYPE
151-
fi
152-
fi
153-
154-
# make build directory absolute
155-
BUILD_DIR=$(readlink -f "$BUILD_DIR")
156-
157153
# clean if requested
158154
if [ "$CLEAN" == "clean" ]
159155
then
@@ -315,32 +311,5 @@ if [ "${RSTUDIO_BUILD_PACKAGE:-1}" = "1" ]; then
315311
cpack --verbose --debug -G "$PACKAGE_TARGET"
316312
fi
317313

318-
# For Jenkins builds, upload debug symbols to S3.
319-
upload-debug-symbols () {
320-
321-
# Validate that the requisite environment variables are defined.
322-
if ! all-defined JENKINS_URL PRODUCT OS ARCH; then
323-
echo "-- skipping debug symbol upload; non-production build"
324-
return 0
325-
fi
326-
327-
# Don't upload debug symbols for builds triggered by pull requests.
328-
if [[ "${WORKSPACE}" =~ "pull-requests" ]]; then
329-
echo "-- skipping debug symbol upload; build triggered via pull request"
330-
return 0
331-
fi
332-
333-
# Preflight checks passed; upload debug symbols.
334-
"${PKG_DIR}/scripts/upload-debug-symbols" \
335-
"${BUILD_DIR}" \
336-
"${PRODUCT}" \
337-
"${OS}" \
338-
"${ARCH}" \
339-
"${RSTUDIO_VERSION_FULL}"
340-
341-
}
342-
343-
upload-debug-symbols
344-
345314
cd "$PREV_WD"
346315

package/linux/scripts/upload-debug-symbols

Lines changed: 36 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,54 @@
1414
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
1515
#
1616

17+
set -e
18+
19+
PKG_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
20+
source "${PKG_DIR}/../../dependencies/tools/rstudio-tools.sh"
21+
1722
AWS_BUCKET="s3://rstudio-debug-symbols"
1823

1924
usage () {
2025

2126
cat <<- EOF
2227
23-
Usage: $0 [build-directory] [product] [os] [arch] [version]
28+
Usage: $0 <product> <os> <arch>
2429
2530
Automatically discover all debug symbols within a particular
2631
build directory, and then upload those symbols to AWS S3.
2732
33+
Required environment variables:
34+
RSTUDIO_VERSION_MAJOR
35+
RSTUDIO_VERSION_MINOR
36+
RSTUDIO_VERSION_PATCH
37+
38+
Optional environment variables:
39+
RSTUDIO_VERSION_SUFFIX
40+
2841
EOF
2942

3043
}
3144

32-
if [ "$1" = "" ] || [ "$1" = "--help" ]; then
45+
if [ "$3" = "" ] || [ "$1" = "--help" ] || [[ -z "$RSTUDIO_VERSION_MAJOR" ]] || [[ -z "$RSTUDIO_VERSION_MINOR" ]] || [[ -z "$RSTUDIO_VERSION_PATCH" ]]; then
3346
usage
3447
exit 1
3548
fi
3649

3750
# Read params into named variables
38-
builddir="$1"
39-
product="$2"
40-
os="$3"
41-
arch="$4"
42-
version="$5"
51+
product="$1"
52+
os="$2"
53+
arch="$3"
54+
55+
PACKAGE_DIR=`pwd`
56+
RSTUDIO_TARGET="$product"
57+
PACKAGE_TARGET="$os"
58+
59+
# This script populates BUILD_DIR and RSTUDIO_VERSION_FULL
60+
source "${PKG_DIR}/scripts/vars.sh"
61+
62+
builddir="$BUILD_DIR"
63+
version="$RSTUDIO_VERSION_FULL"
64+
4365

4466
ensure-aws-cli () {
4567

@@ -49,19 +71,19 @@ ensure-aws-cli () {
4971
fi
5072

5173
# Try to look for an aws-cli installation in the home directory.
52-
PATH="${HOME}/aws-cli/bin:${PATH}"
53-
hash -r
74+
PATH="${HOME}/aws-cli/bin:${PATH}"
75+
hash -r
5476

5577
if command -v aws &> /dev/null; then
5678
return 0
5779
fi
5880

5981
# The aws-cli is not installed; try to install it now.
60-
pushd "$(mktemp -d)"
61-
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
62-
unzip -q awscliv2.zip
63-
./aws/install -i ~/aws-cli -b ~/aws-cli/bin
64-
popd
82+
pushd "$(mktemp -d)"
83+
curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o "awscliv2.zip"
84+
unzip -q awscliv2.zip
85+
./aws/install -i ~/aws-cli -b ~/aws-cli/bin
86+
popd
6587

6688
# Check once more for the aws-cli.
6789
hash -r

package/linux/scripts/vars.sh

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env bash
2+
3+
#
4+
# vars.sh -- shared code to define environment variables for Linux builds
5+
#
6+
# Copyright (C) 2025 by Posit Software, PBC
7+
#
8+
# Unless you have received this program directly from Posit Software pursuant
9+
# to the terms of a commercial license agreement with Posit Software, then
10+
# this program is licensed to you under the terms of version 3 of the
11+
# GNU Affero General Public License. This program is distributed WITHOUT
12+
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
13+
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
14+
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
15+
#
16+
#
17+
18+
if test -z "$BUILD_DIR"
19+
then
20+
# set build type (if necessary) and build dir
21+
if test -z "$CMAKE_BUILD_TYPE"
22+
then
23+
CMAKE_BUILD_TYPE=RelWithDebInfo
24+
BUILD_DIR=build-$RSTUDIO_TARGET-$PACKAGE_TARGET
25+
else
26+
BUILD_DIR=build-$RSTUDIO_TARGET-$PACKAGE_TARGET-$CMAKE_BUILD_TYPE
27+
fi
28+
fi
29+
30+
# make build directory absolute
31+
BUILD_DIR=$(readlink -f "$BUILD_DIR")
32+
33+
# build RStudio version suffix
34+
RSTUDIO_VERSION_ARRAY=(
35+
"${RSTUDIO_VERSION_MAJOR-99}"
36+
"${RSTUDIO_VERSION_MINOR-9}"
37+
"${RSTUDIO_VERSION_PATCH-9}"
38+
)
39+
40+
RSTUDIO_VERSION_FULL=$(IFS="."; echo "${RSTUDIO_VERSION_ARRAY[*]}")"${RSTUDIO_VERSION_SUFFIX}"
41+

0 commit comments

Comments
 (0)