sync master to openEuler-24.03-LTS

This commit is contained in:
佛系少年中二 2024-11-21 17:22:43 +08:00
parent 6d7db04ca9
commit 5ed204e725
9 changed files with 78 additions and 144 deletions

View File

@ -0,0 +1,22 @@
From ba5a4670b8ad86fefb41a939752754bf36aac9dc Mon Sep 17 00:00:00 2001
From: Phil Race <prr@openjdk.org>
Date: Mon, 17 Jun 2024 19:37:32 +0000
Subject: [PATCH] 8332854: Unable to build openjdk with --with-harfbuzz=system
Reviewed-by: jwaters, erikj, jdv, ihse
---
make/modules/java.desktop/lib/ClientLibraries.gmk | 1 +
1 file changed, 1 insertion(+)
diff --git a/make/modules/java.desktop/lib/ClientLibraries.gmk b/make/modules/java.desktop/lib/ClientLibraries.gmk
index 6f3616608ccea..f023969536987 100644
--- a/make/modules/java.desktop/lib/ClientLibraries.gmk
+++ b/make/modules/java.desktop/lib/ClientLibraries.gmk
@@ -281,6 +281,7 @@ endif
ifeq ($(USE_EXTERNAL_HARFBUZZ), true)
LIBFONTMANAGER_EXTRA_SRC =
LIBFONTMANAGER_LIBS += $(HARFBUZZ_LIBS)
+ LIBFONTMANAGER_CFLAGS += $(HARFBUZZ_CFLAGS)
else
LIBFONTMANAGER_EXTRA_SRC = libharfbuzz

View File

@ -5,40 +5,40 @@ Subject: [PATCH] [Huawei] downgrade the glibc symver of memcpy
Signed-off-by: Sun Jianye <sunjianye@huawei.com>
---
make/common/NativeCompilation.gmk | 9 +++++++++
make/common/native/Link.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
diff --git a/make/common/native/Link.gmk b/make/common/native/Link.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
--- a/make/common/native/Link.gmk
+++ b/make/common/native/Link.gmk
@@ -131,6 +131,15 @@ define SetupNativeCompilationBody
$1_CODESIGN_OPTS := -
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) \
$1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) \
$$($1_EXTRA_LDFLAGS) $$($1_LIBS) $$($1_EXTRA_LIBS) \
$$($1_DEBUGINFO_FILES) $$($1_STRIPFLAGS)
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
@@ -204,6 +204,14 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
STATIC_LIB_EXCLUDE_OBJS := $(LIBJVM_STATIC_EXCLUDE_OBJS), \
))
@@ -254,6 +254,14 @@ $(eval $(call SetupJdkLibrary, BUILD_LIBJVM, \
$(BUILD_LIBJVM_TARGET): $(WIN_EXPORT_FILE)
endif
+MEMCPY_OBJECT_FILE := $(JVM_OUTPUTDIR)/objs/memcpy$(OBJ_SUFFIX)
+

View File

@ -154,15 +154,15 @@
# New Version-String scheme-style defines
# If you bump majorver, you must bump also vendor_version_string
%global majorver 22
%global majorver 23
# Used via new version scheme. JDK 19 was
# GA'ed in March 2022 => 22.3
%global vendor_version_string BiSheng
%global securityver 0
%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 22
%global buildjdkver 23
# 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}
@ -178,7 +178,7 @@
%global origin_nice OpenJDK
%global top_level_dir_name %{origin}
%global minorver 0
%global buildver 36
%global buildver 11
%global rpmrelease 1
# 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
@ -542,7 +542,6 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjimage.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjsound.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/liblcms.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/lible.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_agent.so
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/libmanagement_ext.so
@ -601,6 +600,7 @@ exit 0
# these are config templates, thus not config-noreplace
%config %{etcjavadir -- %{?1}}/conf/management/jmxremote.password.template
%config %{etcjavadir -- %{?1}}/conf/sdp/sdp.conf.template
%config %{etcjavadir -- %{?1}}/conf/jaxp-strict.properties.template
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/management.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/net.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/sound.properties
@ -898,7 +898,7 @@ Name: java-latest-%{origin}
Version: %{newjavaver}.%{buildver}
# This package needs `.rolling` as part of Release so as to not conflict on install with
# java-X-openjdk. I.e. when latest rolling release is also an LTS release packaged as
Release: 3
Release: 1
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
@ -927,16 +927,15 @@ Summary: %{origin_nice} Runtime Environment %{majorver}
# The test code includes copies of NSS under the Mozilla Public License v2.0
# The PCSClite headers are under a BSD with advertising license
# The elliptic curve cryptography (ECC) source code is licensed under the LGPLv2.1 or any later version
License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib and ISC and FTL and RSA
License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib and ISC and FTL and RSA-MD
URL: http://openjdk.java.net/
# to regenerate source0 (jdk) and source8 (jdk's taspets) run update_package.sh
# update_package.sh contains hard-coded repos, revisions, tags, and projects to regenerate the source archives
Source0: jdk-updates-jdk%{majorver}u-jdk-%{filever}+%{buildver}.tar.gz
Source1: OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.3_9.tar.gz
Source2: OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz
Source3: https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_riscv64_linux_hotspot_21.0.3_9.tar.gz
Source1: OpenJDK23U-jdk_aarch64_linux_hotspot_23.0.1_11.tar.gz
Source2: OpenJDK23U-jdk_x64_linux_hotspot_23.0.1_11.tar.gz
Source8: systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz
# Desktop files. Adapted from IcedTea
@ -981,6 +980,9 @@ Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_a
Patch7: downgrade-the-glibc-symver-of-memcpy.patch
Patch8: downgrade-the-glibc-symver-of-log2f-posix_spawn.patch
# 23.0.1
Patch9: 8332854-Unable-to-build-openjdk-with-with-harfbuzz=system.patch
############################################
#
# LoongArch64 specific patches
@ -1217,6 +1219,7 @@ pushd %{top_level_dir_name}
%patch3 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
popd # openjdk
%patch1000
@ -1333,13 +1336,12 @@ ARCH=$(uname -m)
BOOTJDKPATH=/usr/lib/jvm/java-%{buildjdkver}-openjdk
if [ "$ARCH" = "x86_64" ]; then
tar -xf %{SOURCE2}
BOOTJDKPATH=$PWD/jdk-21.0.3+9
BOOTJDKPATH=$PWD/jdk-23.0.1+11
elif [ "$ARCH" = "aarch64" ]; then
tar -xf %{SOURCE1}
BOOTJDKPATH=$PWD/jdk-21.0.3+9
BOOTJDKPATH=$PWD/jdk-23.0.1+11
elif [ "$ARCH" = "riscv64" ]; then
tar -xf %{SOURCE3}
BOOTJDKPATH=$PWD/jdk-21.0.3+9
:
elif [ "$ARCH" = "loongarch64" ]; then
:
elif [ "$ARCH" = "ppc64le" ]; then
@ -1448,7 +1450,7 @@ $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
# Check debug symbols are present and can identify code
find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0' lib
do
if [ -f "$lib" ] ; then
if [ ![-f "$lib"] ] ; then
echo "Testing $lib for debug symbols"
# All these tests rely on RPM failing the build if the exit code of any set
# of piped commands is non-zero.
@ -1672,9 +1674,10 @@ else
end
end
-- run content of included file with fake args
arg = nil; -- it is better to null the arg up, no meter if they exists or not, and use cjc as module in unified way, instead of relaying on "main" method during require "copy_jdk_configs.lua"
cjc = require "copy_jdk_configs.lua"
arg = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
cjc.mainProgram(arg)
args = {"--currentjvm", "%{uniquesuffix %{nil}}", "--jvmdir", "%{_jvmdir %{nil}}", "--origname", "%{name}", "--origjavaver", "%{javaver}", "--arch", "%{_arch}", "--temp", "%{rpm_state_dir}/%{name}.%{_arch}"}
cjc.mainProgram(args) -- the returns from copy_jdk_configs.lua should not affect this 'main', so it should run under all circumstances, except fatal error
%post
%{post_script %{nil}}
@ -1799,17 +1802,28 @@ cjc.mainProgram(arg)
%changelog
* Fri Nov 22 2024 Dingli Zhang <dingli@iscas.ac.cn> - 1:23.0.1.11-1
- Modify bootjdk for riscv64
- Backport JDK-8332854
* Tue Nov 19 2024 neu-mobi <liuyulong35@huawei.com> - 1:23.0.1.11-0
- update to jdk23.0.1+11
- remove some redundant patches & fix changelog
* Tue Aug 6 2024 kuenking111 <wangkun49@huawei.com> - 1:22.0.2.9-rolling
- update to jdk22.0.2+9
* Fri Jul 12 2024 Dingli Zhang <dingli@iscas.ac.cn> - 1:22.0.0.36-3
- Remove Backport JDK-8316859 for riscv64
- Fix typo in changelog
- Add bootjdk for riscv64
* Tue Jun 25 2024 panxuefeng <panxuefeng@loongson.cn> - 1:22.0.0.36-2
- update to jdk22+36 for loongarch64
* Tue Jun 25 2024 peng.zou <peng.zou@shingroup.cn> - 1:22.0.0.36-1
* Tue Jun 25 2024 peng.zou <peng.zou@shingroup.cn> - 1:22.0.0.36-2
- Add support for ppc64le
* Fri Jun 21 2024 aoqi <aoqi@loongson.cn> - 1:22.0.0.36-1
- update to jdk22+36 for loongarch64
* Wed Jun 05 2024 Autistic_boyya <wangzhongyi7@huawei.com> - 1:22.0.0.36-rolling
- update to jdk22+36

View File

@ -1,87 +0,0 @@
# HG changeset patch
# User andrew
# Date 1478057514 0
# Node ID 1c4d5cb2096ae55106111da200b0bcad304f650c
# Parent 3d53f19b48384e5252f4ec8891f7a3a82d77af2a
diff -r 3d53f19b4838 -r 1c4d5cb2096a src/java.base/share/classes/java/security/Security.java
--- a/src/java.base/share/classes/java/security/Security.java Wed Oct 26 03:51:39 2016 +0100
+++ b/src/java.base/share/classes/java/security/Security.java Wed Nov 02 03:31:54 2016 +0000
@@ -43,6 +43,9 @@
* implementation-specific location, which is typically the properties file
* {@code conf/security/java.security} in the Java installation directory.
*
+ * <p>Additional default values of security properties are read from a
+ * system-specific location, if available.</p>
+ *
* @author Benjamin Renaud
* @since 1.1
*/
@@ -52,6 +55,10 @@
private static final Debug sdebug =
Debug.getInstance("properties");
+ /* System property file*/
+ private static final String SYSTEM_PROPERTIES =
+ "/etc/crypto-policies/back-ends/java.config";
+
/* The java.security properties */
private static Properties props;
@@ -93,6 +100,7 @@
if (sdebug != null) {
sdebug.println("reading security properties file: " +
propFile);
+ sdebug.println(props.toString());
}
} catch (IOException e) {
if (sdebug != null) {
@@ -114,6 +122,31 @@
}
if ("true".equalsIgnoreCase(props.getProperty
+ ("security.useSystemPropertiesFile"))) {
+
+ // now load the system file, if it exists, so its values
+ // will win if they conflict with the earlier values
+ try (BufferedInputStream bis =
+ new BufferedInputStream(new FileInputStream(SYSTEM_PROPERTIES))) {
+ props.load(bis);
+ loadedProps = true;
+
+ if (sdebug != null) {
+ sdebug.println("reading system security properties file " +
+ SYSTEM_PROPERTIES);
+ sdebug.println(props.toString());
+ }
+ } catch (IOException e) {
+ if (sdebug != null) {
+ sdebug.println
+ ("unable to load security properties from " +
+ SYSTEM_PROPERTIES);
+ e.printStackTrace();
+ }
+ }
+ }
+
+ if ("true".equalsIgnoreCase(props.getProperty
("security.overridePropertiesFile"))) {
String extraPropFile = System.getProperty
diff -r 3d53f19b4838 -r 1c4d5cb2096a src/java.base/share/conf/security/java.security
--- a/src/java.base/share/conf/security/java.security Wed Oct 26 03:51:39 2016 +0100
+++ b/src/java.base/share/conf/security/java.security Wed Nov 02 03:31:54 2016 +0000
@@ -276,6 +276,13 @@
security.overridePropertiesFile=true
#
+# Determines whether this properties file will be appended to
+# using the system properties file stored at
+# /etc/crypto-policies/back-ends/java.config
+#
+security.useSystemPropertiesFile=true
+
+#
# Determines the default key and trust manager factory algorithms for
# the javax.net.ssl package.
#

View File

@ -1,15 +0,0 @@
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 static final String PROP_NAME = "sun.security.smartcardio.library";
- 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() {