!504 fix nss version error

From: @kuenking111 
Reviewed-by: @alexanderbill 
Signed-off-by: @alexanderbill
This commit is contained in:
openeuler-ci-bot 2023-11-28 11:13:47 +00:00 committed by Gitee
commit 4814844528
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 33 additions and 12 deletions

Binary file not shown.

Binary file not shown.

View File

@ -957,6 +957,8 @@ Source0: %{full_revision}.tar.xz
# Custom README for -src subpackage
Source2: README.md
Source3: OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tar.gz
Source4: OpenJDK8U-jdk_aarch64_linux_hotspot_8u382b05.tar.gz
# Use 'icedtea_sync.sh' to update the following
# They are based on code contained in the IcedTea project (3.x).
@ -1376,7 +1378,8 @@ BuildRequires: zip
BuildRequires: unzip
BuildRequires: openssl-devel
BuildRequires: java-1.8.0-openjdk-devel
#BuildRequires: java-1.8.0-openjdk-devel
BuildRequires: javapackages-filesystem
BuildRequires: tzdata-java >= 2015d
# Earlier versions have a bug in tree vectorization on PPC
@ -2000,6 +2003,23 @@ fi
# Variable used in hs_err hook on build failures
top_srcdir_abs_path=$(pwd)/%{top_level_dir_name}
ARCH=$(uname -m)
BOOTJDKPATH=/usr/lib/jvm/java-%{majorver}-openjdk
if [ "$ARCH" = "x86_64" ]; then
tar -xf %{SOURCE3}
BOOTJDKPATH=$PWD/jdk8u382-b05
elif [ "$ARCH" = "aarch64" ]; then
tar -xf %{SOURCE4}
BOOTJDKPATH=$PWD/jdk8u382-b05
elif [ "$ARCH" = "riscv64" ]; then
:
else
echo " Failed to set BOOTJDKPATH "
exit 18
fi
echo $BOOTJDKPATH
mkdir -p %{buildoutputdir -- $suffix}
pushd %{buildoutputdir -- $suffix}
@ -2016,6 +2036,7 @@ bash ${top_srcdir_abs_path}/configure \
--with-jvm-variants=zero \
%endif
--with-native-debug-symbols=internal \
--with-boot-jdk=$BOOTJDKPATH \
--with-milestone="fcs" \
--with-update-version=%{updatever} \
--with-build-number=%{buildver} \
@ -2163,7 +2184,8 @@ EOF
#grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
# Check src.zip has all sources. See RHBZ#1130490
jar -tf $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe'
#jar -tf $JAVA_HOME/src.zip | grep 'sun.misc.Unsafe'
# Check class files include useful debugging information
$JAVA_HOME/bin/javap -l java.lang.Object | grep "Compiled from"
@ -2372,12 +2394,8 @@ done
-- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
local posix = require "posix"
if (os.getenv("debug") == "true") then
debug = true;
print("cjc: in spec debug is on")
else
debug = false;
end
local debug = false
SOURCE1 = "%{rpm_state_dir}/copy_jdk_configs.lua"
SOURCE2 = "%{_libexecdir}/copy_jdk_configs.lua"
@ -2405,10 +2423,11 @@ else
return
end
end
-- run content of included file with fake args
arg = nil;
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)
%post
%{post_script %{nil}}

View File

@ -15,9 +15,11 @@ if [ ! -f $ORIG ]; then
continue
fi
d=`mktemp -d`
export JAVA_HOME=$PWD/jdk8u382-b05
echo $JAVA_HOME
NW=$d/$f
pushd $d
jar xf $ORIG
$JAVA_HOME/bin/jar xf $ORIG
cat $M
# sed -i "s/Created-By.*/Created-By: 1.7.0/g" $M
sed -i "s/Created-By.*/Created-By: $2/g" $M