Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove devscripts expect the checkbashisms script, and remove lsb-release from rocker/r-ver #511

Merged
merged 5 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/r-build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
needs: build
runs-on: ubuntu-latest
strategy:
fail-fast: true
fail-fast: false
matrix:
tag:
- "4.0.0"
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# News

## 2022-11

### Changes in pre-built images

- `lsb-release` and `python3` (a dependency of `lsb-release`), are no longer included in `rocker/r-ver`.
([#511](https://github.com/rocker-org/rocker-versioned2/pull/511))

## 2022-10

### Changes in pre-built images
Expand Down
15 changes: 10 additions & 5 deletions scripts/install_R_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ set -e

R_VERSION=${1:-${R_VERSION:-"latest"}}

# shellcheck source=/dev/null
source /etc/os-release

apt-get update
apt-get -y install locales lsb-release
apt-get -y install locales

## Configure default locale
LANG=${LANG:-"en_US.UTF-8"}
/usr/sbin/locale-gen --lang "${LANG}"
/usr/sbin/update-locale --reset LANG="${LANG}"

UBUNTU_VERSION=$(lsb_release -sc)

export DEBIAN_FRONTEND=noninteractive

R_HOME=${R_HOME:-"/usr/local/lib/R"}

READLINE_VERSION=8
if [ "${UBUNTU_VERSION}" == "bionic" ]; then
if [ "${UBUNTU_CODENAME}" == "bionic" ]; then
READLINE_VERSION=7
fi

apt-get install -y --no-install-recommends \
bash-completion \
ca-certificates \
devscripts \
file \
fonts-texgyre \
g++ \
Expand All @@ -60,6 +60,7 @@ apt-get install -y --no-install-recommends \

BUILDDEPS="curl \
default-jdk \
devscripts \
libbz2-dev \
libcairo2-dev \
libcurl4-openssl-dev \
Expand Down Expand Up @@ -151,6 +152,10 @@ rm -rf /tmp/*
rm -rf R-*/
rm -rf "R.tar.gz"

## Copy the checkbashisms script to local before remove devscripts package.
## https://github.com/rocker-org/rocker-versioned2/issues/510
cp /usr/bin/checkbashisms /usr/local/bin/checkbashisms

# shellcheck disable=SC2086
apt-get remove --purge -y ${BUILDDEPS}
apt-get autoremove -y
Expand Down
1 change: 0 additions & 1 deletion scripts/install_geospatial.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ apt_install \
libsqlite3-dev \
libssl-dev \
libudunits2-dev \
lsb-release \
netcdf-bin \
postgis \
protobuf-compiler \
Expand Down
15 changes: 8 additions & 7 deletions scripts/install_rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ set -e
RSTUDIO_VERSION=${1:-${RSTUDIO_VERSION:-"stable"}}
DEFAULT_USER=${DEFAULT_USER:-"rstudio"}

# shellcheck source=/dev/null
source /etc/os-release

# a function to install apt packages only if they are not installed
function apt_install() {
if ! dpkg -s "$@" >/dev/null 2>&1; then
Expand All @@ -32,7 +35,6 @@ apt_install \
libobjc4 \
libssl-dev \
libpq5 \
lsb-release \
psmisc \
procps \
python-setuptools \
Expand All @@ -41,7 +43,6 @@ apt_install \
wget

ARCH=$(dpkg --print-architecture)
UBUNTU_VERSION=$(lsb_release -sc)

# install s6 supervisor
/rocker_scripts/install_s6init.sh
Expand All @@ -53,15 +54,15 @@ if [ "$RSTUDIO_VERSION" = "latest" ]; then
RSTUDIO_VERSION="stable"
fi

if [ "$UBUNTU_VERSION" = "focal" ]; then
UBUNTU_VERSION="bionic"
if [ "$UBUNTU_CODENAME" = "focal" ]; then
UBUNTU_CODENAME="bionic"
fi

if [ "$RSTUDIO_VERSION" = "stable" ] || [ "$RSTUDIO_VERSION" = "preview" ] || [ "$RSTUDIO_VERSION" = "daily" ]; then
wget "https://rstudio.org/download/latest/${RSTUDIO_VERSION}/server/${UBUNTU_VERSION}/rstudio-server-latest-${ARCH}.deb" -O "$DOWNLOAD_FILE"
wget "https://rstudio.org/download/latest/${RSTUDIO_VERSION}/server/${UBUNTU_CODENAME}/rstudio-server-latest-${ARCH}.deb" -O "$DOWNLOAD_FILE"
else
wget "https://download2.rstudio.org/server/${UBUNTU_VERSION}/${ARCH}/rstudio-server-${RSTUDIO_VERSION/"+"/"-"}-${ARCH}.deb" -O "$DOWNLOAD_FILE" ||
wget "https://s3.amazonaws.com/rstudio-ide-build/server/${UBUNTU_VERSION}/${ARCH}/rstudio-server-${RSTUDIO_VERSION/"+"/"-"}-${ARCH}.deb" -O "$DOWNLOAD_FILE"
wget "https://download2.rstudio.org/server/${UBUNTU_CODENAME}/${ARCH}/rstudio-server-${RSTUDIO_VERSION/"+"/"-"}-${ARCH}.deb" -O "$DOWNLOAD_FILE" ||
wget "https://s3.amazonaws.com/rstudio-ide-build/server/${UBUNTU_CODENAME}/${ARCH}/rstudio-server-${RSTUDIO_VERSION/"+"/"-"}-${ARCH}.deb" -O "$DOWNLOAD_FILE"
fi

dpkg -i "$DOWNLOAD_FILE"
Expand Down
7 changes: 4 additions & 3 deletions scripts/install_verse.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -e
## build ARGs
NCPUS=${NCPUS:--1}

# shellcheck source=/dev/null
source /etc/os-release

# always set this for scripts but don't declare as ENV..
export DEBIAN_FRONTEND=noninteractive

Expand Down Expand Up @@ -41,7 +44,6 @@ apt_install \
libxml2-dev \
libxslt1-dev \
libzmq3-dev \
lsb-release \
qpdf \
texinfo \
software-properties-common \
Expand All @@ -50,8 +52,7 @@ apt_install \

# libgit2-dev also depends on the libcurl4-gnutils in bionic but not on focal
# cran PPA is a super-stable solution to this
UBUNTU_VERSION=$(lsb_release -sc)
if [ "${UBUNTU_VERSION}" == "bionic" ]; then
if [ "${UBUNTU_CODENAME}" == "bionic" ]; then
add-apt-repository -y ppa:cran/travis
fi

Expand Down
8 changes: 4 additions & 4 deletions scripts/setup_R.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ CRAN=${1:-${CRAN:-"https://cran.r-project.org"}}

ARCH=$(uname -m)

# shellcheck source=/dev/null
source /etc/os-release

# a function to install apt packages only if they are not installed
function apt_install() {
if ! dpkg -s "$@" >/dev/null 2>&1; then
Expand All @@ -23,11 +26,8 @@ function apt_install() {
fi
}

apt_install lsb-release

## mechanism to force source installs if we're using RSPM
UBUNTU_VERSION=$(lsb_release -sc)
CRAN_SOURCE=${CRAN/"__linux__/$UBUNTU_VERSION/"/""}
CRAN_SOURCE=${CRAN/"__linux__/${UBUNTU_CODENAME}/"/""}

## source install if using RSPM and arm64 image
if [ "$ARCH" = "aarch64" ]; then
Expand Down