diff --git a/OpenJDK8U-jdk_aarch64_linux_hotspot_8u382b05.tar.gz b/OpenJDK8U-jdk_aarch64_linux_hotspot_8u382b05.tar.gz new file mode 100755 index 0000000000000000000000000000000000000000..47535a2f0e77fcc9f08412364454cd3c3a8115f4 Binary files /dev/null and b/OpenJDK8U-jdk_aarch64_linux_hotspot_8u382b05.tar.gz differ diff --git a/OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tar.gz b/OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tar.gz new file mode 100755 index 0000000000000000000000000000000000000000..2fe42e862727c971449db1d5602cb13cec94f869 Binary files /dev/null and b/OpenJDK8U-jdk_x64_linux_hotspot_8u382b05.tar.gz differ diff --git a/openjdk-1.8.0.spec b/openjdk-1.8.0.spec index 2ba3fd282819eca1e0966d11fd2dfc6600690a2c..45695da3a3dd74f9c860a7570ab6673cc913edf6 100644 --- a/openjdk-1.8.0.spec +++ b/openjdk-1.8.0.spec @@ -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}} diff --git a/repackReproduciblePolycies.sh b/repackReproduciblePolycies.sh index f356bd3984d511edc787bed4b743d325c98acd5a..4cc638e8c9f9b2123b4476c344b74263436a6981 100644 --- a/repackReproduciblePolycies.sh +++ b/repackReproduciblePolycies.sh @@ -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