diff --git a/downgrade-the-glibc-symver-of-log2f-posix_spawn.patch b/downgrade-the-glibc-symver-of-log2f-posix_spawn.patch new file mode 100644 index 0000000000000000000000000000000000000000..ef48f54409855387d97403d372b33007be4ab89f --- /dev/null +++ b/downgrade-the-glibc-symver-of-log2f-posix_spawn.patch @@ -0,0 +1,47 @@ +From f03f70daa59157adcab807b393db21d57da33e23 Mon Sep 17 00:00:00 2001 +From: sunjianye +Date: Tue, 26 Oct 2021 15:49:42 +0800 +Subject: [PATCH] downgrade the glibc symver of log2f & posix_spawn + +--- + src/hotspot/share/opto/parse2.cpp | 8 ++++++++ + src/java.base/unix/native/libjava/ProcessImpl_md.c | 4 ++++ + 2 files changed, 12 insertions(+) + +diff --git a/src/hotspot/share/opto/parse2.cpp b/src/hotspot/share/opto/parse2.cpp +index becd187..9bbcb0c 100644 +--- a/src/hotspot/share/opto/parse2.cpp ++++ b/src/hotspot/share/opto/parse2.cpp +@@ -45,6 +45,14 @@ + #include "runtime/deoptimization.hpp" + #include "runtime/sharedRuntime.hpp" + ++#ifdef AARCH64 ++ __asm__(".symver log2f,log2f@GLIBC_2.17"); ++#endif ++ ++#ifdef AMD64 ++ __asm__(".symver log2f,log2f@GLIBC_2.2.5"); ++#endif ++ + #ifndef PRODUCT + extern int explicit_null_checks_inserted, + explicit_null_checks_elided; +diff --git a/src/java.base/unix/native/libjava/ProcessImpl_md.c b/src/java.base/unix/native/libjava/ProcessImpl_md.c +index 3854f36..26cf41c 100644 +--- a/src/java.base/unix/native/libjava/ProcessImpl_md.c ++++ b/src/java.base/unix/native/libjava/ProcessImpl_md.c +@@ -48,6 +48,10 @@ + + #include "childproc.h" + ++#if defined(amd64) ++ __asm__(".symver posix_spawn,posix_spawn@GLIBC_2.2.5"); ++#endif ++ + /* + * + * When starting a child on Unix, we need to do three things: +-- +1.8.3.1 + diff --git a/downgrade-the-glibc-symver-of-memcpy.patch b/downgrade-the-glibc-symver-of-memcpy.patch new file mode 100644 index 0000000000000000000000000000000000000000..8bdc71ea17137d71c7f1ef1697a7838c38fc65e6 --- /dev/null +++ b/downgrade-the-glibc-symver-of-memcpy.patch @@ -0,0 +1,96 @@ +From 2e5e3cc58933e166cba5a3f0e3c59d0ca3849196 Mon Sep 17 00:00:00 2001 +From: zhangyipeng +Date: Thu, 24 Mar 2022 11:12:46 +0800 +Subject: [PATCH] [Huawei] downgrade the glibc symver of memcpy + +Signed-off-by: Sun Jianye +--- + make/common/NativeCompilation.gmk | 9 +++++++++ + make/hotspot/lib/CompileJvm.gmk | 8 ++++++++ + src/hotspot/share/runtime/memcpy.cpp | 20 ++++++++++++++++++++ + .../linux/native/applauncher/LinuxPackage.c | 3 +++ + 4 files changed, 40 insertions(+) + create mode 100644 src/hotspot/share/runtime/memcpy.cpp + +diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk +index 1e2b170..4f22e2d 100644 +--- a/make/common/NativeCompilation.gmk ++++ b/make/common/NativeCompilation.gmk +@@ -1102,6 +1102,15 @@ define SetupNativeCompilationBody + endif + endif + ++ # if ldflags contain --wrap=memcpy, add memcpy.o to OBJS ++ ifneq ($$(findstring wrap=memcpy, $$($1_LDFLAGS)$$($1_EXTRA_LDFLAGS)),) ++ ifeq ($$(findstring memcpy$(OBJ_SUFFIX), $$($1_ALL_OBJS)),) ++ $$($1_BUILD_INFO): ++ $(ECHO) 'Adding $(SUPPORT_OUTPUTDIR)/memcpy/memcpy$(OBJ_SUFFIX) to $1_ALL_OBJS' ++ $1_ALL_OBJS += $(SUPPORT_OUTPUTDIR)/memcpy/memcpy$(OBJ_SUFFIX) ++ endif ++ endif ++ + $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \ + $$($1_LIBS) $$($1_EXTRA_LIBS) $$($1_MT) \ + $$($1_CREATE_DEBUGINFO_CMDS) $$($1_MANIFEST_VERSION) \ +diff --git a/make/hotspot/lib/CompileJvm.gmk b/make/hotspot/lib/CompileJvm.gmk +index 65edd04..d5b689e 100644 +--- a/make/hotspot/lib/CompileJvm.gmk ++++ b/make/hotspot/lib/CompileJvm.gmk +@@ -167,6 +167,14 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \ + PRECOMPILED_HEADER_EXCLUDE := $(JVM_PRECOMPILED_HEADER_EXCLUDE), \ + )) + ++MEMCPY_OBJECT_FILE := $(JVM_OUTPUTDIR)/objs/memcpy$(OBJ_SUFFIX) ++ ++$(eval $(call SetupCopyFiles, COPY_MEMCPY_OBJECT_FILE, \ ++ DEST := $(SUPPORT_OUTPUTDIR)/memcpy, \ ++ FILES :=$(MEMCPY_OBJECT_FILE), \ ++)) ++TARGETS += $(COPY_MEMCPY_OBJECT_FILE) ++ + # Always recompile abstract_vm_version.cpp if libjvm needs to be relinked. This ensures + # that the internal vm version is updated as it relies on __DATE__ and __TIME__ + # macros. +diff --git a/src/hotspot/share/runtime/memcpy.cpp b/src/hotspot/share/runtime/memcpy.cpp +new file mode 100644 +index 0000000..6ab4ddb +--- /dev/null ++++ b/src/hotspot/share/runtime/memcpy.cpp +@@ -0,0 +1,20 @@ ++/* ++ * Copyright (c) Huawei Technologies Co., Ltd. 2018-2021. All rights reserved. ++ */ ++ ++#if defined( __GNUC__ ) && \ ++(__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) ++#include ++ ++#if (defined AMD64) || (defined amd64) ++/* some systems do not have newest memcpy@@GLIBC_2.14 - stay with old good one */ ++asm (".symver memcpy, memcpy@GLIBC_2.2.5"); ++ ++extern "C"{ ++ void *__wrap_memcpy(void *dest, const void *src, size_t n) ++ { ++ return memcpy(dest, src, n); ++ } ++} ++#endif ++#endif +diff --git a/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c b/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c +index 5e3ef36..55a7e9c 100644 +--- a/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c ++++ b/src/jdk.jpackage/linux/native/applauncher/LinuxPackage.c +@@ -33,6 +33,9 @@ + #include "JvmLauncher.h" + #include "LinuxPackage.h" + ++#if (defined AMD64) || (defined amd64) ++__asm__(".symver memcpy, memcpy@GLIBC_2.2.5"); ++#endif + + static char* getModulePath(void) { + char modulePath[PATH_MAX] = { 0 }; +-- +1.8.3.1 + diff --git a/jdk-updates-jdk17u-jdk-17.0.2+9.tar.gz b/jdk-updates-jdk17u-jdk-17.0.2+9.tar.gz deleted file mode 100644 index b765814e4bd84807e8f5573d71695b2b40dc579d..0000000000000000000000000000000000000000 Binary files a/jdk-updates-jdk17u-jdk-17.0.2+9.tar.gz and /dev/null differ diff --git a/jdk-updates-jdk18u-jdk-18.0.1+10.tar.gz b/jdk-updates-jdk18u-jdk-18.0.1+10.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e754e114d32cff1b4a283cc02aa8fdf6b3198cd1 Binary files /dev/null and b/jdk-updates-jdk18u-jdk-18.0.1+10.tar.gz differ diff --git a/openjdk-latest.spec b/openjdk-latest.spec index 1816c9f481db0ed06d3462ad5708cf446f80f977..8668c5e701fba2ed1efa5fb5fa85e1ce227d0885 100644 --- a/openjdk-latest.spec +++ b/openjdk-latest.spec @@ -151,15 +151,15 @@ # New Version-String scheme-style defines # If you bump majorver, you must bump also vendor_version_string -%global majorver 17 -# Used via new version scheme. JDK 17 was -# GA'ed in March 2021 => 21.9 -%global vendor_version_string 21.9 -%global securityver 2 +%global majorver 18 +# Used via new version scheme. JDK 18 was +# GA'ed in March 2022 => 22.3 +%global vendor_version_string 22.3 +%global securityver 1 # buildjdkver is usually same as %%{majorver}, # but in time of bootstrap of next jdk, it is majorver-1, # and this it is better to change it here, on single place -%global buildjdkver 17 +%global buildjdkver 18 # We don't add any LTS designator for STS packages (Fedora and EPEL). # We need to explicitly exclude EPEL as it would have the %%{rhel} macro defined. %if 0%{?rhel} && !0%{?epel} @@ -175,7 +175,7 @@ %global origin_nice OpenJDK %global top_level_dir_name %{origin} %global minorver 0 -%global buildver 9 +%global buildver 10 %global rpmrelease 0 # priority must be 8 digits in total; up to openjdk 1.8, we were using 18..... so when we moved to 11, we had to add another digit %if %is_system_jdk @@ -380,6 +380,7 @@ alternatives \\ --slave %{_bindir}/jstack jstack %{sdkbindir -- %{?1}}/jstack \\ --slave %{_bindir}/jstat jstat %{sdkbindir -- %{?1}}/jstat \\ --slave %{_bindir}/jstatd jstatd %{sdkbindir -- %{?1}}/jstatd \\ + --slave %{_bindir}/jwebserver jwebserver %{sdkbindir -- %{?1}}/jwebserver \\ --slave %{_bindir}/serialver serialver %{sdkbindir -- %{?1}}/serialver \\ --slave %{_mandir}/man1/jar.1$ext jar.1$ext \\ %{_mandir}/man1/jar-%{uniquesuffix -- %{?1}}.1$ext \\ @@ -415,6 +416,8 @@ alternatives \\ %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1$ext \\ --slave %{_mandir}/man1/jstatd.1$ext jstatd.1$ext \\ %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1$ext \\ + --slave %{_mandir}/man1/jwebserver.1$ext jwebserver.1$ext \\ + %{_mandir}/man1/jwebserver-%{uniquesuffix -- %{?1}}.1$ext \\ --slave %{_mandir}/man1/serialver.1$ext serialver.1$ext \\ %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1$ext @@ -643,6 +646,7 @@ exit 0 %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstack %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstat %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jstatd +%{_jvmdir}/%{sdkdir -- %{?1}}/bin/jwebserver %{_jvmdir}/%{sdkdir -- %{?1}}/bin/serialver %{_jvmdir}/%{sdkdir -- %{?1}}/include %{_jvmdir}/%{sdkdir -- %{?1}}/lib/ct.sym @@ -667,6 +671,7 @@ exit 0 %{_mandir}/man1/jstack-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/jstat-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/jstatd-%{uniquesuffix -- %{?1}}.1* +%{_mandir}/man1/jwebserver-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/serialver-%{uniquesuffix -- %{?1}}.1* %{_mandir}/man1/jdeprscan-%{uniquesuffix -- %{?1}}.1.gz %{_mandir}/man1/jlink-%{uniquesuffix -- %{?1}}.1.gz @@ -967,6 +972,9 @@ Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-d # ############################################# +# 17.0.2 +Patch7: downgrade-the-glibc-symver-of-memcpy.patch +Patch8: downgrade-the-glibc-symver-of-log2f-posix_spawn.patch BuildRequires: autoconf BuildRequires: automake @@ -1193,6 +1201,8 @@ pushd %{top_level_dir_name} %patch3 -p1 %patch4 -p1 %patch6 -p1 +%patch7 -p1 +%patch8 -p1 popd # openjdk %patch1000 @@ -1744,6 +1754,22 @@ cjc.mainProgram(arg) %changelog +* Sat May 7 2022 noah - 1:18.0.1.10-0-rolling +- Update to jdk-18.0.1+10 + +* Thu May 5 2022 noah - 1:18.0.0.37-1.rolling +- set build jdk to 18 + +* Tue Apr 26 2022 noah - 1:18.0.0.37-0.0.ea.rolling +- Update to jdk-18.0.0.0+37 +- adjust rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch + +* Tue Mar 29 2022 eapen - 1:17.0.2.9-2.rolling +- Downgrade symbols to provide compalibility to lower glibc + +* Tue Mar 29 2022 eapen - 1:17.0.2.9-1.rolling +- add openjdk-latest.yaml + * Fri Feb 11 2022 kuenking111 - 1:17.0.2.9-0.rolling - Update to jdk-17.0.2+9-ga diff --git a/openjdk-latest.yaml b/openjdk-latest.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4752ae4c76ff844ffe0fcd6c4338d7099a04fbe3 --- /dev/null +++ b/openjdk-latest.yaml @@ -0,0 +1,5 @@ +--- +version_control: git +src_repo: https://github.com/openjdk/jdk17u +tag_prefix: jdk- +seperator: "." diff --git a/rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch b/rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch index 5e2b2540557e1ad3d190d151b67031d390c25c02..4c1476fe29737d9ec41aa1558ae634ac89967408 100644 --- a/rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch +++ b/rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch @@ -1,13 +1,15 @@ ---- openjdk/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java 2013-03-01 10:48:12.038189968 +0100 -+++ openjdk/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java 2013-03-01 10:48:11.913188505 +0100 -@@ -48,8 +48,8 @@ +diff --git a/openjdk/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java b/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java +index bacff32efbc..ff7b3dcc81c 100644 +--- openjdk/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java ++++ openjdk/src/java.smartcardio/unix/classes/sun/security/smartcardio/PlatformPCSC.java +@@ -46,8 +46,8 @@ class PlatformPCSC { - private final static String PROP_NAME = "sun.security.smartcardio.library"; + private static final String PROP_NAME = "sun.security.smartcardio.library"; -- private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so"; -- private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so"; -+ private final static String LIB1 = "/usr/$LIBISA/libpcsclite.so.1"; -+ private final static String LIB2 = "/usr/local/$LIBISA/libpcsclite.so.1"; - private final static String PCSC_FRAMEWORK = "/System/Library/Frameworks/PCSC.framework/Versions/Current/PCSC"; +- private static final String LIB1 = "/usr/$LIBISA/libpcsclite.so"; +- private static final String LIB2 = "/usr/local/$LIBISA/libpcsclite.so"; ++ private static final String LIB1 = "/usr/$LIBISA/libpcsclite.so.1"; ++ private static final String LIB2 = "/usr/local/$LIBISA/libpcsclite.so.1"; + private static final String PCSC_FRAMEWORK = "/System/Library/Frameworks/PCSC.framework/Versions/Current/PCSC"; PlatformPCSC() {