mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
work
This commit is contained in:
@@ -1,14 +1,16 @@
|
||||
from ssh_lib.utils import (
|
||||
from ssh_lib.apt import (
|
||||
apt_get_install,
|
||||
apt_get_purge,
|
||||
apt_get_update,
|
||||
put_str,
|
||||
sudo_cmd,
|
||||
setup_apt_repository,
|
||||
)
|
||||
from ssh_lib.utils import (
|
||||
ubuntu_codename,
|
||||
)
|
||||
|
||||
|
||||
JAVA_VER = 24
|
||||
ADOPTIUM_REPO_NAME = 'adoptium'
|
||||
|
||||
|
||||
def java(c):
|
||||
@@ -16,25 +18,17 @@ def java(c):
|
||||
# remove old Ubuntu version of OpenJDK
|
||||
apt_get_purge(c, 'openjdk* temurin*')
|
||||
|
||||
# Download and install the Eclipse Adoptium GPG key
|
||||
sudo_cmd(
|
||||
c,
|
||||
'wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public '
|
||||
'| gpg --dearmor '
|
||||
'| tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null',
|
||||
)
|
||||
|
||||
# Get the Ubuntu codename
|
||||
codename = ubuntu_codename(c)
|
||||
|
||||
# Configure the Eclipse Adoptium apt repository
|
||||
put_str(
|
||||
setup_apt_repository(
|
||||
c,
|
||||
'/etc/apt/sources.list.d/adoptium.list',
|
||||
f'deb https://packages.adoptium.net/artifactory/deb {codename} main',
|
||||
repo_name=ADOPTIUM_REPO_NAME,
|
||||
key_url='https://packages.adoptium.net/artifactory/api/gpg/key/public',
|
||||
repo_url='https://packages.adoptium.net/artifactory/deb',
|
||||
suite=codename,
|
||||
component='main',
|
||||
)
|
||||
|
||||
# Update package list and install Temurin JDK
|
||||
apt_get_update(c)
|
||||
apt_get_install(c, f'temurin-{JAVA_VER}-jdk')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user