scripts(setup-ubuntu.sh): install openjdk-17 from ppa repo

This is necessary if we are to build openjdk-17 after update of docker
image to ubuntu 22.04.
This commit is contained in:
Henrik Grimler 2022-07-23 22:07:45 +02:00
parent d3b2ac380c
commit 9d695d6f4b
No known key found for this signature in database
GPG Key ID: B0076E490B71616B
3 changed files with 7 additions and 1 deletions

View File

@ -10,7 +10,7 @@ FROM ubuntu:22.04
ENV LANG en_US.UTF-8
# Needed for setup:
COPY ./setup-ubuntu.sh ./setup-android-sdk.sh ./properties.sh /tmp/
COPY ./setup-ubuntu.sh ./setup-android-sdk.sh ./properties.sh ./openjdk-r-ppa.gpg /tmp/
RUN mkdir /tmp/build
COPY ./build/termux_download.sh /tmp/build/

BIN
scripts/openjdk-r-ppa.gpg Normal file

Binary file not shown.

View File

@ -249,6 +249,9 @@ PACKAGES+=" jq"
# Required by txikijs's hostbuild step
PACKAGES+=" libcurl4-openssl-dev"
# Required by openjdk-17
PACKAGES+=" openjdk-17-jre openjdk-17-jdk"
# Do not require sudo if already running as root.
if [ "$(id -u)" = "0" ]; then
SUDO=""
@ -258,6 +261,9 @@ fi
# Allow 32-bit packages.
$SUDO dpkg --add-architecture i386
# Add ppa repo to be able to get openjdk-17 on ubuntu 22.04
$SUDO cp $(dirname "$(realpath "$0")")/openjdk-r-ppa.gpg /etc/apt/trusted.gpg.d/
echo "deb https://ppa.launchpadcontent.net/openjdk-r/ppa/ubuntu/ jammy main" | $SUDO tee /etc/apt/sources.list.d/openjdk-r-ubuntu-ppa-jammy.list > /dev/null
$SUDO apt-get -yq update
$SUDO env DEBIAN_FRONTEND=noninteractive \