From 40ee07f795ab502836b73872545cbbe0744b1640 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 27 Sep 2023 11:49:58 -0700 Subject: [PATCH 1/4] Added jdk21 config files for msft linux deb installers --- .../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 | 74 +++++++++++++ 8 files changed, 294 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 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..935737f2b --- /dev/null +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules @@ -0,0 +1,74 @@ +#!/usr/bin/make -f + +pkg_name = msopenjdk-21 +priority = 1911 +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 and verify checksum of JDK + 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 + 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 -- From 0432c21421bc1161c7d87cf05dfc97a6f992887a Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 27 Sep 2023 11:53:23 -0700 Subject: [PATCH 2/4] Added jdk21 config files for msft linux rpm installers --- .../packaging/microsoft/21/msopenjdk-21.spec | 226 ++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 linux/jdk/redhat/src/main/packaging/microsoft/21/msopenjdk-21.spec 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 23a9b4d86b1a73ccc8c365819a8fef6415c56576 Mon Sep 17 00:00:00 2001 From: JoshMJ Date: Wed, 27 Sep 2023 13:58:41 -0700 Subject: [PATCH 3/4] updated comments --- linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules index 935737f2b..4aec71b9b 100644 --- a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules @@ -22,12 +22,13 @@ override_dh_auto_test: override_dh_auto_build: override_dh_strip: override_dh_auto_install: - # # Download and verify checksum of JDK + # 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. From e2336ace347b1ba3bd09b2e650a8d227b1ac7209 Mon Sep 17 00:00:00 2001 From: jmjaffe37 <111303274+jmjaffe37@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:01:20 -0700 Subject: [PATCH 4/4] Update msft jdk21 priority Co-authored-by: Luigi Montoya --- linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules index 4aec71b9b..b06d8a751 100644 --- a/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules +++ b/linux/jdk/debian/src/main/packaging/microsoft/21/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f pkg_name = msopenjdk-21 -priority = 1911 +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