make-jpkg support for Oracle JDK-20

Bug #2024298 reported by Stephen Crowley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
java-package (Ubuntu)
New
Undecided
Unassigned

Bug Description

I'm not sure why this package is still here if no one maintains it but I took the liberty of making a patch to add JDK-20 support, it probably works on jdk-19 and others as well

diff -Naur java-package-0.62/lib/oracle-jdk.sh java-package-0.62-jdk20/lib/oracle-jdk.sh
--- java-package-0.62/lib/oracle-jdk.sh 2016-09-10 19:24:08.000000000 -0500
+++ java-package-0.62-jdk20/lib/oracle-jdk.sh 2023-06-17 13:43:06.404063214 -0500
@@ -3,6 +3,15 @@
 oracle_j2sdk_detect() {
   j2se_release=0

+ # Update or GA release (jdk-20_linux-x64_bin.tar.gz)
+ if [[ $archive_name =~ jdk-([0-9]+)(_linux-(x64|amd64))?(.bin|.tar\.gz) ]]
+ then
+ j2se_release=${BASH_REMATCH[1]}
+ j2se_arch=${BASH_REMATCH[3]}
+ j2se_version_name="$j2se_release GA"
+ j2se_version=${j2se_release}${revision}
+ fi
+
   # Update or GA release (jdk-7u15-linux-i586.tar.gz)
   if [[ $archive_name =~ jdk-([0-9]+)(u([0-9]+))?-linux-(i586|x64|amd64|arm-vfp-hflt)\.(bin|tar\.gz) ]]
   then
@@ -105,7 +114,7 @@
         oracle_no_man_jre_bin_jre="ControlPanel jcontrol"
       fi
       oracle_jre_lib_hl="jexec"
- oracle_bin_jdk="appletviewer extcheck idlj jar jarsigner javac javadoc javah javap jcmd jconsole jdb jdeps jhat jinfo jmap jmc jps jrunscript jsadebugd jstack jstat jstatd jvisualvm native2ascii rmic schemagen serialver wsgen wsimport xjc"
+ oracle_bin_jdk="jar jarsignern java javac javadoc javap jcmd jconsole jdb jdeprscan jdeps jfr jhsdb jimage jinfo jlink jmap jmod jpackage jps jrunscript jshell jstack jstat jstatd jwebserver keytool rmiregistry serialver"
       j2se_package="$j2se_vendor-java$j2se_release-jdk"
       j2se_run
     fi
diff -Naur java-package-0.62/make-jpkg java-package-0.62-jdk20/make-jpkg
--- java-package-0.62/make-jpkg 2016-09-10 18:45:54.000000000 -0500
+++ java-package-0.62-jdk20/make-jpkg 2023-06-17 13:19:07.751594963 -0500
@@ -62,7 +62,6 @@
     exit 1
 fi

-
 ### Parse options

 print_usage() {
@@ -73,9 +72,9 @@

 Supported java binary distributions currently include:
   * Oracle (http://www.oracle.com/technetwork/java/javase/downloads) :
- - The Java Development Kit (JDK), version 6, 7 and 8
- - The Java Runtime Environment (JRE), version 6, 7 and 8
- - The Java API Javadoc, version 6, 7 and 8
+ - The Java Development Kit (JDK), versions 6, 7, 8, and 20
+ - The Java Runtime Environment (JRE), versions 6, 7, 8, and 20
+ - The Java API Javadoc, versions 6, 7, 8, and 20
   (Choose tar.gz archives or self-extracting archives, do _not_ choose the RPM!)

 The following options are recognized:
@@ -218,8 +217,6 @@
     exit 1
 }

-
-
 # The environment variable tmp points to a secure temporary directory.
 # There should be enough free disk space.
 echo -n "Creating temporary directory: "
@@ -265,7 +262,8 @@
     echo "Please make sure you are using a tar.gz or a self-extracting archive"
 fi

-
+# The Java Development Kit (JDK), version 20
+# (Choose tar.gz archives or self-extracting archives, do _not_ choose the RPM!)

 ### exit
 success=true

ProblemType: Bug
DistroRelease: Ubuntu 23.04
Package: java-package 0.62
ProcVersionSignature: Ubuntu 6.2.0-23.23-generic 6.2.12
Uname: Linux 6.2.0-23-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.26.1-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: GNOME-Flashback:GNOME
Date: Sat Jun 17 13:44:37 2023
InstallationDate: Installed on 2022-09-30 (259 days ago)
InstallationMedia: Ubuntu 22.04.1 LTS "Jammy Jellyfish" - Release amd64 (20220809.1)
PackageArchitecture: all
ProcEnviron:
 LANG=en_US.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: java-package
UpgradeStatus: Upgraded to lunar on 2023-06-03 (14 days ago)

Revision history for this message
Stephen Crowley (crowlogic) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.