From ec8349d854b376585ffd5aca4f09cab7abd048fd Mon Sep 17 00:00:00 2001 From: jmjaffe37 <111303274+jmjaffe37@users.noreply.github.com> Date: Thu, 28 Sep 2023 00:50:42 -0700 Subject: [PATCH 1/3] removed ubuntu 22.10 support due to EoL (#745) removed ubuntu 22.10 support due to EoL bug --- .github/workflows/cacert-publish.yml | 2 +- linux/Jenkinsfile | 1 - linux/README.md | 1 - linux/ca-certificates/debian/build.gradle | 1 - .../org/adoptium/cacertificates/ChangesVerificationTest.java | 1 - .../java/org/adoptium/cacertificates/DebianFlavours.java | 1 - linux/jdk/debian/src/main/packaging/build.sh | 2 +- .../debian/src/packageTest/java/packaging/DebianFlavours.java | 1 - linux/jre/debian/src/main/packaging/build.sh | 2 +- .../debian/src/packageTest/java/packaging/DebianFlavours.java | 1 - 10 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/cacert-publish.yml b/.github/workflows/cacert-publish.yml index 9b7cc825e..c91e1e57c 100644 --- a/.github/workflows/cacert-publish.yml +++ b/.github/workflows/cacert-publish.yml @@ -54,7 +54,7 @@ jobs: - name: Upload deb file to Artifactory if: steps.check-deb.outputs.file_exists == 'false' run: | - debVersionList=("bookworm" "bullseye" "buster" "kinetic" "jammy" "focal" "bionic") + debVersionList=("bookworm" "bullseye" "buster" "jammy" "focal" "bionic") for debVersion in "${debVersionList[@]}"; do distroList+="deb.distribution=${debVersion};" done diff --git a/linux/Jenkinsfile b/linux/Jenkinsfile index 60eb70cfc..26d054842 100644 --- a/linux/Jenkinsfile +++ b/linux/Jenkinsfile @@ -317,7 +317,6 @@ def uploadDebArtifacts(String buildArch) { "bookworm", // Debian/12 "bullseye", // Debian/11 "buster", // Debian/10 - "kinetic", // Ubuntu/22.10 "jammy", // Ubuntu/22.04 (LTS) "focal", // Ubuntu/20.04 (LTS) "bionic", // Ubuntu/18.04 (LTS) diff --git a/linux/README.md b/linux/README.md index 9dd8173ce..d753224c2 100644 --- a/linux/README.md +++ b/linux/README.md @@ -202,7 +202,6 @@ Supported platform amd64, arm64, armhf, ppc64le, s390x (s390x is only available | debian/12 (bookworm/testing) | x86_64 | | | debian/11 (bullseye/stable) | x86_64 | | | debian/10 (buster/oldstable) | x86_64 | | -| ubuntu/22.10 (kinetic) | x86_64 | | | ubuntu/22.04 (jammy) | x86_64 | | | ubuntu/20.04 (focal) | x86_64 | | | ubuntu/18.04 (bionic) | x86_64 | | diff --git a/linux/ca-certificates/debian/build.gradle b/linux/ca-certificates/debian/build.gradle index 2b378c865..c2f6d22aa 100644 --- a/linux/ca-certificates/debian/build.gradle +++ b/linux/ca-certificates/debian/build.gradle @@ -28,7 +28,6 @@ def deb_versions = [ "bookworm", // Debian/12 "bullseye", // Debian/11 "buster", // Debian/10 - "kinetic", // Ubuntu/22.10 "jammy", // Ubuntu/22.04 (LTS) "focal", // Ubuntu/20.04 (LTS) "bionic", // Ubuntu/18.04 (LTS) diff --git a/linux/ca-certificates/debian/src/packageTest/java/org/adoptium/cacertificates/ChangesVerificationTest.java b/linux/ca-certificates/debian/src/packageTest/java/org/adoptium/cacertificates/ChangesVerificationTest.java index 7df49ae78..12c47ada3 100644 --- a/linux/ca-certificates/debian/src/packageTest/java/org/adoptium/cacertificates/ChangesVerificationTest.java +++ b/linux/ca-certificates/debian/src/packageTest/java/org/adoptium/cacertificates/ChangesVerificationTest.java @@ -35,7 +35,6 @@ class ChangesVerificationTest { "bookworm", // Debian/12 "bullseye", // Debian/11 "buster", // Debian/10 - "kinetic", // Ubuntu/22.10 "jammy", // Ubuntu/22.04 (LTS) "focal", // Ubuntu/20.04 (LTS) "bionic", // Ubuntu/18.04 (LTS) diff --git a/linux/ca-certificates/debian/src/packageTest/java/org/adoptium/cacertificates/DebianFlavours.java b/linux/ca-certificates/debian/src/packageTest/java/org/adoptium/cacertificates/DebianFlavours.java index 4682796c7..29c0f9cc1 100644 --- a/linux/ca-certificates/debian/src/packageTest/java/org/adoptium/cacertificates/DebianFlavours.java +++ b/linux/ca-certificates/debian/src/packageTest/java/org/adoptium/cacertificates/DebianFlavours.java @@ -38,7 +38,6 @@ public Stream provideArguments(ExtensionContext context) { Arguments.of("debian", "bookworm"), // Debian/12 (testing) Arguments.of("debian", "bullseye"), // Debian/11 (stable) Arguments.of("debian", "buster"), // Debian/10 (oldstable) - Arguments.of("ubuntu", "kinetic"), // Ubuntu/22.10 Arguments.of("ubuntu", "jammy"), // Ubuntu/22.04 (LTS) Arguments.of("ubuntu", "focal"), // Ubuntu/20.04 (LTS) Arguments.of("ubuntu", "bionic") // Ubuntu/18.04 (LTS) diff --git a/linux/jdk/debian/src/main/packaging/build.sh b/linux/jdk/debian/src/main/packaging/build.sh index ad10260b1..18eaf6d70 100644 --- a/linux/jdk/debian/src/main/packaging/build.sh +++ b/linux/jdk/debian/src/main/packaging/build.sh @@ -27,7 +27,7 @@ if [ "$buildLocalFlag" == "true" ]; then fi # $ and $ARCH are env variables passing in from "docker run" -debVersionList="bookworm bullseye buster kinetic jammy focal bionic" +debVersionList="bookworm bullseye buster jammy focal bionic" # the target package is only based on the host machine's ARCH # ${buildArch} is only used for debug purpose what really matter is the label on the jenkins agent diff --git a/linux/jdk/debian/src/packageTest/java/packaging/DebianFlavours.java b/linux/jdk/debian/src/packageTest/java/packaging/DebianFlavours.java index 379048eba..c96118e66 100644 --- a/linux/jdk/debian/src/packageTest/java/packaging/DebianFlavours.java +++ b/linux/jdk/debian/src/packageTest/java/packaging/DebianFlavours.java @@ -39,7 +39,6 @@ public Stream provideArguments(ExtensionContext context) { Arguments.of("debian", "bookworm"), // Debian/12 (testing) Arguments.of("debian", "bullseye"), // Debian/11 (stable) Arguments.of("debian", "buster"), // Debian/10 (oldstable) - Arguments.of("ubuntu", "kinetic"), // Ubuntu/22.10 Arguments.of("ubuntu", "jammy"), // Ubuntu/22.04 (LTS) Arguments.of("ubuntu", "focal"), // Ubuntu/20.04 (LTS) Arguments.of("ubuntu", "bionic") // Ubuntu/18.04 (LTS) diff --git a/linux/jre/debian/src/main/packaging/build.sh b/linux/jre/debian/src/main/packaging/build.sh index bdf830aba..a5c75aaa9 100644 --- a/linux/jre/debian/src/main/packaging/build.sh +++ b/linux/jre/debian/src/main/packaging/build.sh @@ -27,7 +27,7 @@ if [ "$buildLocalFlag" == "true" ]; then fi # $ and $ARCH are env variables passing in from "docker run" -debVersionList="bookworm bullseye buster kinetic jammy focal bionic" +debVersionList="bookworm bullseye buster jammy focal bionic" # the target package is only based on the host machine's ARCH # ${buildArch} is only used for debug purpose what really matter is the label on the jenkins agent diff --git a/linux/jre/debian/src/packageTest/java/packaging/DebianFlavours.java b/linux/jre/debian/src/packageTest/java/packaging/DebianFlavours.java index 054ef83a5..135351ab1 100644 --- a/linux/jre/debian/src/packageTest/java/packaging/DebianFlavours.java +++ b/linux/jre/debian/src/packageTest/java/packaging/DebianFlavours.java @@ -39,7 +39,6 @@ public Stream provideArguments(ExtensionContext context) { Arguments.of("debian", "bookworm"), // Debian/12 (testing) Arguments.of("debian", "bullseye"), // Debian/11 (stable) Arguments.of("debian", "buster"), // Debian/10 (oldstable) - Arguments.of("ubuntu", "kinetic"), // Ubuntu/22.10 Arguments.of("ubuntu", "jammy"), // Ubuntu/22.04 (LTS) Arguments.of("ubuntu", "focal"), // Ubuntu/20.04 (LTS) Arguments.of("ubuntu", "bionic") // Ubuntu/18.04 (LTS) From f57d30bcb152f638e4c12b3db21325b412500dfc Mon Sep 17 00:00:00 2001 From: jmjaffe37 <111303274+jmjaffe37@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:15:25 -0700 Subject: [PATCH 2/3] Added jdk21 config files for msft linux deb+rpm installers (#742) * Added jdk21 config files for msft linux deb installers * Added jdk21 config files for msft linux rpm installers * updated comments * Update msft jdk21 priority Co-authored-by: Luigi Montoya --------- Co-authored-by: Luigi Montoya --- .../packaging/microsoft/21/debian/changelog | 5 + .../main/packaging/microsoft/21/debian/compat | 1 + .../packaging/microsoft/21/debian/control | 103 ++++++++ .../packaging/microsoft/21/debian/copyright | 5 + .../packaging/microsoft/21/debian/jinfo.in | 36 +++ .../packaging/microsoft/21/debian/postinst.in | 42 ++++ .../packaging/microsoft/21/debian/prerm.in | 28 +++ .../main/packaging/microsoft/21/debian/rules | 75 ++++++ .../packaging/microsoft/21/msopenjdk-21.spec | 226 ++++++++++++++++++ 9 files changed, 521 insertions(+) create mode 100644 linux/jdk/debian/src/main/packaging/microsoft/21/debian/changelog create mode 100644 linux/jdk/debian/src/main/packaging/microsoft/21/debian/compat create mode 100644 linux/jdk/debian/src/main/packaging/microsoft/21/debian/control create mode 100644 linux/jdk/debian/src/main/packaging/microsoft/21/debian/copyright create mode 100644 linux/jdk/debian/src/main/packaging/microsoft/21/debian/jinfo.in create mode 100644 linux/jdk/debian/src/main/packaging/microsoft/21/debian/postinst.in create mode 100644 linux/jdk/debian/src/main/packaging/microsoft/21/debian/prerm.in create mode 100644 linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules create mode 100644 linux/jdk/redhat/src/main/packaging/microsoft/21/msopenjdk-21.spec diff --git a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/changelog b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/changelog new file mode 100644 index 000000000..a63cb3189 --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/changelog @@ -0,0 +1,5 @@ +msopenjdk-21 (21.0.0-1) STABLE; urgency=medium + + * Microsoft 21.0.0-1 release. + + -- Microsoft Package Maintainers Tue, 19 Sep 2023 09:00:00 +0000 diff --git a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/compat b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/compat new file mode 100644 index 000000000..b4de39476 --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/compat @@ -0,0 +1 @@ +11 diff --git a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/control b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/control new file mode 100644 index 000000000..4391e54fa --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/control @@ -0,0 +1,103 @@ +Source: msopenjdk-21 +Section: java +Priority: optional +Maintainer: Microsoft Package Maintainers +Build-Depends: debhelper (>= 11), lsb-release + +Package: msopenjdk-21 +Architecture: amd64 arm64 +Depends: ca-certificates, + java-common, + libc6, + zlib1g +Recommends: libasound2, + libx11-6, + libfontconfig1, + libfreetype6, + libxext6, + libxi6, + libxrender1, + libxtst6, + fonts-dejavu-core, + fonts-dejavu-extra +Provides: java-compiler, + java-sdk, + java-sdk-headless, + java10-sdk, + java11-sdk, + java12-sdk, + java13-sdk, + java14-sdk, + java15-sdk, + java16-sdk, + java17-sdk, + java18-sdk, + java19-sdk, + java20-sdk, + java21-sdk, + java2-sdk, + java5-sdk, + java6-sdk, + java7-sdk, + java8-sdk, + java9-sdk, + java10-sdk-headless, + java11-sdk-headless, + java12-sdk-headless, + java13-sdk-headless, + java14-sdk-headless, + java15-sdk-headless, + java16-sdk-headless, + java17-sdk-headless, + java18-sdk-headless, + java19-sdk-headless, + java2-sdk-headless, + java20-sdk-headless, + java21-sdk-headless, + java5-sdk-headless, + java6-sdk-headless, + java7-sdk-headless, + java8-sdk-headless, + java9-sdk-headless, + java-runtime, + java-runtime-headless, + java10-runtime, + java11-runtime, + java12-runtime, + java13-runtime, + java14-runtime, + java15-runtime, + java16-runtime, + java17-runtime, + java18-runtime, + java19-runtime, + java20-runtime, + java21-runtime, + java2-runtime, + java5-runtime, + java6-runtime, + java7-runtime, + java8-runtime, + java9-runtime, + java10-runtime-headless, + java11-runtime-headless, + java12-runtime-headless, + java13-runtime-headless, + java14-runtime-headless, + java15-runtime-headless, + java16-runtime-headless, + java17-runtime-headless, + java18-runtime-headless, + java19-runtime-headless, + java2-runtime-headless, + java20-runtime-headless, + java21-runtime-headless, + java5-runtime-headless, + java6-runtime-headless, + java7-runtime-headless, + java8-runtime-headless, + java9-runtime-headless +Description: Microsoft Build of OpenJDK 21 + Microsoft Build of OpenJDK is an OpenJDK-based development environment to create + applications and components using the Java programming language. + diff --git a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/copyright b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/copyright new file mode 100644 index 000000000..0a1694bd6 --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/copyright @@ -0,0 +1,5 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: Oracle and/or its affiliates +License: GPL-2.0+CE \ No newline at end of file diff --git a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/jinfo.in b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/jinfo.in new file mode 100644 index 000000000..b538329a2 --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/jinfo.in @@ -0,0 +1,36 @@ +name=@pkg_alias@ +alias=@pkg_alias@ +priority=@priority@ +section=contrib + +jdkhl jar /usr/lib/jvm/@jvm_dir@/bin/jar +jdkhl jarsigner /usr/lib/jvm/@jvm_dir@/bin/jarsigner +hl java /usr/lib/jvm/@jvm_dir@/bin/java +jdkhl javac /usr/lib/jvm/@jvm_dir@/bin/javac +jdkhl javadoc /usr/lib/jvm/@jvm_dir@/bin/javadoc +jdkhl javap /usr/lib/jvm/@jvm_dir@/bin/javap +jdkhl jcmd /usr/lib/jvm/@jvm_dir@/bin/jcmd +jdk jconsole /usr/lib/jvm/@jvm_dir@/bin/jconsole +jdkhl jdb /usr/lib/jvm/@jvm_dir@/bin/jdb +jdkhl jdeprscan /usr/lib/jvm/@jvm_dir@/bin/jdeprscan +jdkhl jdeps /usr/lib/jvm/@jvm_dir@/bin/jdeps +hl jfr /usr/lib/jvm/@jvm_dir@/bin/jfr +jdkhl jhsdb /usr/lib/jvm/@jvm_dir@/bin/jhsdb +jdkhl jimage /usr/lib/jvm/@jvm_dir@/bin/jimage +jdkhl jinfo /usr/lib/jvm/@jvm_dir@/bin/jinfo +jdkhl jlink /usr/lib/jvm/@jvm_dir@/bin/jlink +jdkhl jmap /usr/lib/jvm/@jvm_dir@/bin/jmap +jdkhl jmod /usr/lib/jvm/@jvm_dir@/bin/jmod +jdkhl jpackage /usr/lib/jvm/@jvm_dir@/bin/jpackage +jdkhl jps /usr/lib/jvm/@jvm_dir@/bin/jps +hl jrunscript /usr/lib/jvm/@jvm_dir@/bin/jrunscript +jdkhl jshell /usr/lib/jvm/@jvm_dir@/bin/jshell +jdkhl jstack /usr/lib/jvm/@jvm_dir@/bin/jstack +jdkhl jstat /usr/lib/jvm/@jvm_dir@/bin/jstat +jdkhl jstatd /usr/lib/jvm/@jvm_dir@/bin/jstatd +jdkhl jwebserver /usr/lib/jvm/@jvm_dir@/bin/jwebserver +hl keytool /usr/lib/jvm/@jvm_dir@/bin/keytool +hl rmiregistry /usr/lib/jvm/@jvm_dir@/bin/rmiregistry +jdkhl serialver /usr/lib/jvm/@jvm_dir@/bin/serialver +hl jexec /usr/lib/jvm/@jvm_dir@/lib/jexec +hl jspawnhelper /usr/lib/jvm/@jvm_dir@/lib/jspawnhelper diff --git a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/postinst.in b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/postinst.in new file mode 100644 index 000000000..cc1c4dbcb --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/postinst.in @@ -0,0 +1,42 @@ +#!/bin/sh +set -eu + +priority="@priority@" +jdk_base_dir="/usr/lib/jvm/@jvm_dir@" +tools="@jvm_tools@" + +case "$1" in +configure) + for tool in $tools; do + for tool_path in "$jdk_base_dir/bin/$tool" "$jdk_base_dir/lib/$tool"; do + if [ ! -e "$tool_path" ]; then + continue + fi + + slave="" + tool_man_path="$jdk_base_dir/man/man1/$tool.1" + if [ -e "$tool_man_path" ]; then + slave="--slave /usr/share/man/man1/$tool.1 $tool.1 $tool_man_path" + fi + + update-alternatives \ + --install \ + "/usr/bin/$tool" \ + "$tool" \ + "$tool_path" \ + "$priority" \ + $slave + done + done + ;; + +abort-upgrade | abort-remove | abort-deconfigure) + # Nothing to do + ;; +*) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/prerm.in b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/prerm.in new file mode 100644 index 000000000..85999aefa --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/prerm.in @@ -0,0 +1,28 @@ +#!/bin/sh +set -eu + +jdk_base_dir="/usr/lib/jvm/@jvm_dir@" +tools="@jvm_tools@" + +case "$1" in +purge) + # Nothing to do + ;; +remove | upgrade | failed-upgrade | abort-install | abort-upgrade | disappear | deconfigure) + for tool in $tools; do + for tool_path in "$jdk_base_dir/bin/$tool" "$jdk_base_dir/lib/$tool"; do + if [ ! -e "$tool_path" ]; then + continue + fi + + update-alternatives --remove "$tool" "$tool_path" + done + done + ;; +*) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules new file mode 100644 index 000000000..b06d8a751 --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules @@ -0,0 +1,75 @@ +#!/usr/bin/make -f + +pkg_name = msopenjdk-21 +priority = 2111 +jvm_tools = jar jarsigner 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 jexec jspawnhelper +url_version = 21.0.0 +amd64_tarball_url = https://aka.ms/download-jdk/microsoft-jdk-$(url_version)-linux-x64.tar.gz +amd64_checksum_url = https://aka.ms/download-jdk/microsoft-jdk-$(url_version)-linux-x64.tar.gz.sha256sum.txt +arm64_tarball_url = https://aka.ms/download-jdk/microsoft-jdk-$(url_version)-linux-aarch64.tar.gz +arm64_checksum = https://aka.ms/download-jdk/microsoft-jdk-$(url_version)-linux-aarch64.tar.gz.sha256sum.txt + +d = debian/$(pkg_name) +jvm_home = usr/lib/jvm +jvm_dir = $(pkg_name)-$(DEB_HOST_ARCH) +pkg_alias = $(pkg_name)-$(DEB_HOST_ARCH) + +%: + dh $@ + +override_dh_auto_clean: +override_dh_auto_test: +override_dh_auto_build: +override_dh_strip: +override_dh_auto_install: + # Download JDK if not building locally + if [ ! -f jdk.tar.gz ]; then \ + wget --progress=dot:mega -O jdk.tar.gz $($(DEB_HOST_ARCH)_tarball_url); \ + wget --progress=dot:mega -O jdk.tar.gz.sha256.txt $($(DEB_HOST_ARCH)_checksum_url); \ + sed -i -nE '/(.*) /{s/ .+/ jdk.tar.gz/;p;}' jdk.tar.gz.sha256.txt; \ + fi + # Verify checksum of JDK + sha256sum -c jdk.tar.gz.sha256.txt + + # Substitute variables. + sed \ + -e 's/@pkg_alias@/$(pkg_alias)/g' \ + -e 's/@jvm_dir@/$(jvm_dir)/g' \ + -e 's/@priority@/$(priority)/g' \ + -e 's/@jvm_tools@/$(jvm_tools)/g' \ + debian/jinfo.in > debian/jinfo + + sed \ + -e 's/@pkg_alias@/$(pkg_alias)/g' \ + -e 's/@jvm_dir@/$(jvm_dir)/g' \ + -e 's/@priority@/$(priority)/g' \ + -e 's/@jvm_tools@/$(jvm_tools)/g' \ + debian/postinst.in > debian/postinst + + sed \ + -e 's/@pkg_alias@/$(pkg_alias)/g' \ + -e 's/@jvm_dir@/$(jvm_dir)/g' \ + -e 's/@priority@/$(priority)/g' \ + -e 's/@jvm_tools@/$(jvm_tools)/g' \ + debian/prerm.in > debian/prerm + + # Unpack JDK. + dh_installdirs \ + $(jvm_home) \ + $(jvm_home)/$(jvm_dir) + tar --strip-components=1 -C "$(d)/$(jvm_home)/$(jvm_dir)" -xf jdk.tar.gz + + # Add jinfo file (alternatives support). + cp debian/jinfo "$(d)/$(jvm_home)/.$(pkg_alias).jinfo" + + # Ensure src.zip is present in the root folder of the JDK. + if [ ! -f "$(d)/$(jvm_home)/$(jvm_dir)/src.zip" ]; then \ + if [ ! -f "$(d)/$(jvm_home)/$(jvm_dir)/lib/src.zip" ] ; then \ + echo "Missing src.zip in binary distribution"; \ + exit 1; \ + fi; \ + ln -s lib/src.zip "$(d)/$(jvm_home)/$(jvm_dir)/src.zip"; \ + fi; + +override_dh_gencontrol: + dh_gencontrol -- diff --git a/linux/jdk/redhat/src/main/packaging/microsoft/21/msopenjdk-21.spec b/linux/jdk/redhat/src/main/packaging/microsoft/21/msopenjdk-21.spec new file mode 100644 index 000000000..e19193bbd --- /dev/null +++ b/linux/jdk/redhat/src/main/packaging/microsoft/21/msopenjdk-21.spec @@ -0,0 +1,226 @@ +%global upstream_version 21+35 +# Only [A-Za-z0-9.] allowed in version: +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_uses_invalid_characters_in_the_version +%global spec_version 21.0.0 +%global spec_release 1 +%global priority 1211 + +%global source_url_base https://aka.ms/download-jdk +%global java_provides openjdk + +%global local_build_ %{?local_build}%{!?local_build:0} +%global override_arch_ %{?override_arch}%{!?override_arch:0} +# Above var evaluate to the value held in override_arch if defined, +# else evaluates to 0 (meaning: we will build for the actual system architecture) +# Same explanation for local_build_ + +# Map architecture to the expected value in the download URL; Allow for a +# pre-defined value of vers_arch and use that if it's defined + +%global vers_arch x64 +%global vers_arch2 aarch64 + +# Use override_arch_ if defined with correct value, else use system arch +%if "%{local_build_}" == "true" +%global src_num 4 +%global sha_src_num 5 +%elif "%{override_arch_}" == "aarch64" +%global src_num 2 +%global sha_src_num 3 +%elif "%{override_arch_}" == "x86_64" || "%{override_arch_}" == "x64" +%global src_num 0 +%global sha_src_num 1 +%else +%ifarch x86_64 +%global src_num 0 +%global sha_src_num 1 +%endif +%ifarch aarch64 +%global src_num 2 +%global sha_src_num 3 +%endif +%endif + +Name: msopenjdk-21 +Version: %{spec_version} +Release: %{spec_release} +Summary: Microsoft Build of OpenJDK 21 + +Group: java +License: GPLv2 with Classpath Exception +Vendor: Microsoft +URL: https://www.microsoft.com/openjdk +Packager: Microsoft Package Maintainers + +AutoReqProv: no +Prefix: /usr/lib/jvm/%{name} + +ExclusiveArch: x86_64 aarch64 + +BuildRequires: tar +BuildRequires: wget + +Requires: /bin/sh +Requires: /usr/sbin/alternatives +Requires: ca-certificates +Requires: glibc%{?_isa} +Requires: zlib%{?_isa} + +Recommends: dejavu-sans-fonts +Recommends: alsa-lib%{?_isa} +Recommends: libX11%{?_isa} +Recommends: libXext%{?_isa} +Recommends: libXi%{?_isa} +Recommends: libXrender%{?_isa} +Recommends: libXtst%{?_isa} +Recommends: fontconfig%{?_isa} +Recommends: freetype%{?_isa} +Recommends: libasound%{?_isa} + +Provides: java +Provides: java-21 +Provides: java-21-devel +Provides: java-21-%{java_provides} +Provides: java-21-%{java_provides}-devel +Provides: java-devel +Provides: java-devel-%{java_provides} +Provides: java-%{java_provides} +Provides: java-%{java_provides}-devel +Provides: java-sdk +Provides: java-sdk-21 +Provides: java-sdk-21-%{java_provides} +Provides: java-sdk-%{java_provides} +Provides: jre +Provides: jre-21 +Provides: jre-21-%{java_provides} +Provides: jre-%{java_provides} + +# First architecture (x64) +Source0: %{source_url_base}/microsoft-jdk-%{spec_version}-linux-%{vers_arch}.tar.gz +Source1: %{source_url_base}/microsoft-jdk-%{spec_version}-linux-%{vers_arch}.tar.gz.sha256sum.txt + +# Second architecture (aarch64) +Source2: %{source_url_base}/microsoft-jdk-%{spec_version}-linux-%{vers_arch2}.tar.gz +Source3: %{source_url_base}/microsoft-jdk-%{spec_version}-linux-%{vers_arch2}.tar.gz.sha256sum.txt + +%if "%{local_build_}" == "true" +Source4: local_build_jdk1.tar.gz +Source5: local_build_jdk1.tar.gz.sha256.txt +%endif + +# Set the compression format to xz to be compatible with more Red Hat flavours. Newer versions of Fedora use zstd which +# is not available on CentOS 7, for example. https://github.com/rpm-software-management/rpm/blob/master/macros.in#L353 +# lists the available options. +%define _source_payload w7.xzdio +%define _binary_payload w7.xzdio + +# Avoid build failures on some distros due to missing build-id in binaries. +%global debug_package %{nil} +%global __brp_strip %{nil} + +%description +Microsoft Build of OpenJDK is a development environment to create +applications and components using the programming language Java. + +%prep +pushd "%{_sourcedir}" +sha256sum -c "%{expand:%{SOURCE%{sha_src_num}}}" +popd + +%setup -n jdk-%{upstream_version} -T -b %{src_num} + +%build +# noop + +%install +mkdir -p %{buildroot}%{prefix} +cd %{buildroot}%{prefix} +tar --strip-components=1 -C "%{buildroot}%{prefix}" -xf %{expand:%{SOURCE%{src_num}}} + +# Strip bundled Freetype and use OS package instead. +rm -f "%{buildroot}%{prefix}/lib/libfreetype.so" + +# Ensure systemd-tmpfiles-clean does not remove pid files +# https://bugzilla.redhat.com/show_bug.cgi?id=1704608 +%{__mkdir} -p %{buildroot}/usr/lib/tmpfiles.d +echo 'x /tmp/hsperfdata_*' > "%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf" +echo 'x /tmp/.java_pid*' >> "%{buildroot}/usr/lib/tmpfiles.d/%{name}.conf" + +%post +if [ $1 -ge 1 ] ; then + update-alternatives --install %{_bindir}/java java %{prefix}/bin/java %{priority} \ + --slave %{_bindir}/jfr jfr %{prefix}/bin/jfr \ + --slave %{_bindir}/jrunscript jrunscript %{prefix}/bin/jrunscript \ + --slave %{_bindir}/keytool keytool %{prefix}/bin/keytool \ + --slave %{_bindir}/rmiregistry rmiregistry %{prefix}/bin/rmiregistry \ + --slave %{_bindir}/jexec jexec %{prefix}/lib/jexec \ + --slave %{_bindir}/jspawnhelper jspawnhelper %{prefix}/lib/jspawnhelper \ + --slave %{_mandir}/man1/java.1 java.1 %{prefix}/man/man1/java.1 \ + --slave %{_mandir}/man1/jfr.1 jfr.1 %{prefix}/man/man1/jfr.1 \ + --slave %{_mandir}/man1/jrunscript.1 jrunscript.1 %{prefix}/man/man1/jrunscript.1 \ + --slave %{_mandir}/man1/keytool.1 keytool.1 %{prefix}/man/man1/keytool.1 \ + --slave %{_mandir}/man1/rmiregistry.1 rmiregistry.1 %{prefix}/man/man1/rmiregistry.1 \ + + update-alternatives --install %{_bindir}/javac javac %{prefix}/bin/javac %{priority} \ + --slave %{_bindir}/jar jar %{prefix}/bin/jar \ + --slave %{_bindir}/jarsigner jarsigner %{prefix}/bin/jarsigner \ + --slave %{_bindir}/javadoc javadoc %{prefix}/bin/javadoc \ + --slave %{_bindir}/javap javap %{prefix}/bin/javap \ + --slave %{_bindir}/jcmd jcmd %{prefix}/bin/jcmd \ + --slave %{_bindir}/jconsole jconsole %{prefix}/bin/jconsole \ + --slave %{_bindir}/jdb jdb %{prefix}/bin/jdb \ + --slave %{_bindir}/jdeprscan jdeprscan %{prefix}/bin/jdeprscan \ + --slave %{_bindir}/jdeps jdeps %{prefix}/bin/jdeps \ + --slave %{_bindir}/jhsdb jhsdb %{prefix}/bin/jhsdb \ + --slave %{_bindir}/jimage jimage %{prefix}/bin/jimage \ + --slave %{_bindir}/jinfo jinfo %{prefix}/bin/jinfo \ + --slave %{_bindir}/jlink jlink %{prefix}/bin/jlink \ + --slave %{_bindir}/jmap jmap %{prefix}/bin/jmap \ + --slave %{_bindir}/jmod jmod %{prefix}/bin/jmod \ + --slave %{_bindir}/jpackage jpackage %{prefix}/bin/jpackage \ + --slave %{_bindir}/jps jps %{prefix}/bin/jps \ + --slave %{_bindir}/jshell jshell %{prefix}/bin/jshell \ + --slave %{_bindir}/jstack jstack %{prefix}/bin/jstack \ + --slave %{_bindir}/jstat jstat %{prefix}/bin/jstat \ + --slave %{_bindir}/jstatd jstatd %{prefix}/bin/jstatd \ + --slave %{_bindir}/jwebserver jwebserver %{prefix}/bin/jwebserver \ + --slave %{_bindir}/serialver serialver %{prefix}/bin/serialver \ + --slave %{_mandir}/man1/jar.1 jar.1 %{prefix}/man/man1/jar.1 \ + --slave %{_mandir}/man1/jarsigner.1 jarsigner.1 %{prefix}/man/man1/jarsigner.1 \ + --slave %{_mandir}/man1/javac.1 javac.1 %{prefix}/man/man1/javac.1 \ + --slave %{_mandir}/man1/javadoc.1 javadoc.1 %{prefix}/man/man1/javadoc.1 \ + --slave %{_mandir}/man1/javap.1 javap.1 %{prefix}/man/man1/javap.1 \ + --slave %{_mandir}/man1/jcmd.1 jcmd.1 %{prefix}/man/man1/jcmd.1 \ + --slave %{_mandir}/man1/jconsole.1 jconsole.1 %{prefix}/man/man1/jconsole.1 \ + --slave %{_mandir}/man1/jdb.1 jdb.1 %{prefix}/man/man1/jdb.1 \ + --slave %{_mandir}/man1/jdeprscan.1 jdeprscan.1 %{prefix}/man/man1/jdeprscan.1 \ + --slave %{_mandir}/man1/jdeps.1 jdeps.1 %{prefix}/man/man1/jdeps.1 \ + --slave %{_mandir}/man1/jhsdb.1 jhsdb.1 %{prefix}/man/man1/jhsdb.1 \ + --slave %{_mandir}/man1/jinfo.1 jinfo.1 %{prefix}/man/man1/jinfo.1 \ + --slave %{_mandir}/man1/jlink.1 jlink.1 %{prefix}/man/man1/jlink.1 \ + --slave %{_mandir}/man1/jmap.1 jmap.1 %{prefix}/man/man1/jmap.1 \ + --slave %{_mandir}/man1/jmod.1 jmod.1 %{prefix}/man/man1/jmod.1 \ + --slave %{_mandir}/man1/jpackage.1 jpackage.1 %{prefix}/man/man1/jpackage.1 \ + --slave %{_mandir}/man1/jps.1 jps.1 %{prefix}/man/man1/jps.1 \ + --slave %{_mandir}/man1/jshell.1 jshell.1 %{prefix}/man/man1/jshell.1 \ + --slave %{_mandir}/man1/jstack.1 jstack.1 %{prefix}/man/man1/jstack.1 \ + --slave %{_mandir}/man1/jstat.1 jstat.1 %{prefix}/man/man1/jstat.1 \ + --slave %{_mandir}/man1/jstatd.1 jstatd.1 %{prefix}/man/man1/jstatd.1 \ + --slave %{_mandir}/man1/jwebserver.1 jwebserver.1 %{prefix}/man/man1/jwebserver.1 \ + --slave %{_mandir}/man1/serialver.1 serialver.1 %{prefix}/man/man1/serialver.1 +fi + +%preun +if [ $1 -eq 0 ]; then + update-alternatives --remove java %{prefix}/bin/java + update-alternatives --remove javac %{prefix}/bin/javac +fi + +%files +%defattr(-,root,root) +%{prefix} +/usr/lib/tmpfiles.d/%{name}.conf + +%changelog +* Tue Sep 26 2023 Microsoft Package Maintainers 21.0.0-1 +- Microsoft 21.0.0+35 initial release. \ No newline at end of file From feac3d5bdbe3c332b2c9240b6aa279671a5acbb9 Mon Sep 17 00:00:00 2001 From: jmjaffe37 <111303274+jmjaffe37@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:15:42 -0700 Subject: [PATCH 3/3] Updated msft linux configs for jdk11 and 17 respins (#743) --- .../debian/src/main/packaging/microsoft/11/debian/changelog | 6 ++++++ .../jdk/debian/src/main/packaging/microsoft/11/debian/rules | 2 +- .../debian/src/main/packaging/microsoft/17/debian/changelog | 6 ++++++ .../jdk/debian/src/main/packaging/microsoft/17/debian/rules | 2 +- .../src/main/packaging/microsoft/11/msopenjdk-11.spec | 6 ++++-- .../src/main/packaging/microsoft/17/msopenjdk-17.spec | 6 ++++-- 6 files changed, 22 insertions(+), 6 deletions(-) diff --git a/linux/jdk/debian/src/main/packaging/microsoft/11/debian/changelog b/linux/jdk/debian/src/main/packaging/microsoft/11/debian/changelog index ca62c7e9e..e53820e5e 100644 --- a/linux/jdk/debian/src/main/packaging/microsoft/11/debian/changelog +++ b/linux/jdk/debian/src/main/packaging/microsoft/11/debian/changelog @@ -1,3 +1,9 @@ +msopenjdk-11 (11.0.20.1-1) STABLE; urgency=medium + + * Microsoft 11.0.20.1-1 release. + + -- Microsoft Package Maintainers Wed, 23 Aug 2023 19:29:37 +0000 + msopenjdk-11 (11.0.20-3) STABLE; urgency=medium * Microsoft 11.0.20-3 release. diff --git a/linux/jdk/debian/src/main/packaging/microsoft/11/debian/rules b/linux/jdk/debian/src/main/packaging/microsoft/11/debian/rules index 56d20963f..d56d7b7b8 100755 --- a/linux/jdk/debian/src/main/packaging/microsoft/11/debian/rules +++ b/linux/jdk/debian/src/main/packaging/microsoft/11/debian/rules @@ -3,7 +3,7 @@ pkg_name = msopenjdk-11 priority = 1111 jvm_tools = jaotc jar jarsigner java javac javadoc javap jcmd jconsole jdb jdeprscan jdeps jfr jhsdb jimage jinfo jjs jlink jmap jmod jps jrunscript jshell jstack jstat jstatd keytool pack200 rmic rmid rmiregistry serialver unpack200 jexec jspawnhelper -url_version = 11.0.20 +url_version = 11.0.20.1 amd64_tarball_url = https://aka.ms/download-jdk/microsoft-jdk-$(url_version)-linux-x64.tar.gz amd64_checksum_url = https://aka.ms/download-jdk/microsoft-jdk-$(url_version)-linux-x64.tar.gz.sha256sum.txt arm64_tarball_url = https://aka.ms/download-jdk/microsoft-jdk-$(url_version)-linux-aarch64.tar.gz diff --git a/linux/jdk/debian/src/main/packaging/microsoft/17/debian/changelog b/linux/jdk/debian/src/main/packaging/microsoft/17/debian/changelog index b1e0aae1c..dfef73188 100644 --- a/linux/jdk/debian/src/main/packaging/microsoft/17/debian/changelog +++ b/linux/jdk/debian/src/main/packaging/microsoft/17/debian/changelog @@ -1,3 +1,9 @@ +msopenjdk-17 (17.0.8.1-1) STABLE; urgency=medium + + * Microsoft 17.0.8.1-1 release. + + -- Microsoft Package Maintainers Wed, 23 Aug 2023 19:28:11 +0000 + msopenjdk-17 (17.0.8-3) STABLE; urgency=medium * Microsoft 17.0.8-3 release. diff --git a/linux/jdk/debian/src/main/packaging/microsoft/17/debian/rules b/linux/jdk/debian/src/main/packaging/microsoft/17/debian/rules index a83442894..a02c34ad4 100755 --- a/linux/jdk/debian/src/main/packaging/microsoft/17/debian/rules +++ b/linux/jdk/debian/src/main/packaging/microsoft/17/debian/rules @@ -3,7 +3,7 @@ pkg_name = msopenjdk-17 priority = 1711 jvm_tools = jar jarsigner java javac javadoc javap jcmd jconsole jdb jdeprscan jdeps jfr jhsdb jimage jinfo jlink jmap jmod jpackage jps jrunscript jshell jstack jstat jstatd keytool rmiregistry serialver jexec jspawnhelper -url_version = 17.0.8 +url_version = 17.0.8.1 amd64_tarball_url = https://aka.ms/download-jdk/microsoft-jdk-$(url_version)-linux-x64.tar.gz amd64_checksum_url = https://aka.ms/download-jdk/microsoft-jdk-$(url_version)-linux-x64.tar.gz.sha256sum.txt arm64_tarball_url = https://aka.ms/download-jdk/microsoft-jdk-$(url_version)-linux-aarch64.tar.gz diff --git a/linux/jdk/redhat/src/main/packaging/microsoft/11/msopenjdk-11.spec b/linux/jdk/redhat/src/main/packaging/microsoft/11/msopenjdk-11.spec index 7e8237ae2..94d2cda9c 100644 --- a/linux/jdk/redhat/src/main/packaging/microsoft/11/msopenjdk-11.spec +++ b/linux/jdk/redhat/src/main/packaging/microsoft/11/msopenjdk-11.spec @@ -1,7 +1,7 @@ -%global upstream_version 11.0.20+8 +%global upstream_version 11.0.20.1+1 # Only [A-Za-z0-9.] allowed in version: # https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_uses_invalid_characters_in_the_version -%global spec_version 11.0.20 +%global spec_version 11.0.20.1 %global spec_release 1 %global priority 1111 @@ -228,6 +228,8 @@ fi /usr/lib/tmpfiles.d/%{name}.conf # Make below specific %changelog +* Wed Aug 23 2023 Microsoft Package Maintainers 11.0.20.1-1 +- Microsoft 11.0.20.1+1 initial release. * Fri Jul 07 2023 Microsoft Package Maintainers 11.0.20-1 - Microsoft 11.0.20+8 initial release. * Tue Apr 18 2023 Microsoft Package Maintainers 11.0.19-1 diff --git a/linux/jdk/redhat/src/main/packaging/microsoft/17/msopenjdk-17.spec b/linux/jdk/redhat/src/main/packaging/microsoft/17/msopenjdk-17.spec index c160f5c1e..3fbec78f2 100644 --- a/linux/jdk/redhat/src/main/packaging/microsoft/17/msopenjdk-17.spec +++ b/linux/jdk/redhat/src/main/packaging/microsoft/17/msopenjdk-17.spec @@ -1,7 +1,7 @@ -%global upstream_version 17.0.8+7 +%global upstream_version 17.0.8.1+1 # Only [A-Za-z0-9.] allowed in version: # https://docs.fedoraproject.org/en-US/packaging-guidelines/Versioning/#_upstream_uses_invalid_characters_in_the_version -%global spec_version 17.0.8 +%global spec_version 17.0.8.1 %global spec_release 1 %global priority 1161 @@ -225,6 +225,8 @@ fi /usr/lib/tmpfiles.d/%{name}.conf %changelog +* Wed Aug 23 2023 Microsoft Package Maintainers 17.0.8.1-1 +- Microsoft 17.0.8.1+1 initial release. * Fri Jul 07 2023 Microsoft Package Maintainers 17.0.8-1 - Microsoft 17.0.8+7 initial release. * Tue Apr 18 2023 Microsoft Package Maintainers 17.0.7-1