diff --git a/.gitignore b/.gitignore index 6c2c596..f79d052 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /openjdk-jdk17u-jdk-17.0.6+10.tar.xz /openjdk-jdk17u-jdk-17.0.7+7.tar.xz /openjdk-jdk17u-jdk-17.0.8+7.tar.xz +/openjdk-17.0.9+9.tar.xz diff --git a/NEWS b/NEWS index a7be73f..4edebb8 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,490 @@ Key: JDK-X - https://bugs.openjdk.java.net/browse/JDK-X CVE-XXXX-YYYY: https://cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY +New in release OpenJDK 17.0.9 (2023-10-17): +=========================================== +Live versions of these release notes can be found at: + * https://bit.ly/openjdk1709 + +* CVEs + - CVE-2023-22081 + - CVE-2023-22025 +* Security fixes + - JDK-8286503, JDK-8312367: Enhance security classes + - JDK-8296581: Better system proxy support + - JDK-8297856: Improve handling of Bidi characters + - JDK-8305815, JDK-8307278: Update Libpng to 1.6.39 + - JDK-8306881, JDK-8307286: Update FreeType to 2.13.0 + - JDK-8309966: Enhanced TLS connections + - JDK-8312248: Enhanced archival support redux + - JDK-8314649: Enhanced archival support redux + - JDK-8317121: vector_masked_load instruction is moved too early after JDK-8286941 +* New features + - JDK-8276799: Implementation of JEP 422: Linux/RISC-V Port +* Other changes + - JDK-6176679: Application freezes when copying an animated gif image to the system clipboard + - JDK-6381945: (cal) Japanese calendar unit test system should avoid multiple static imports + - JDK-8040793: vmTestbase/nsk/monitoring/stress/lowmem fails on calling isCollectionUsageThresholdExceeded() + - JDK-8153837: AArch64: Handle special cases for MaxINode & MinINode + - JDK-8156889: ListKeychainStore.sh fails in some virtualized environments + - JDK-8171221: Remove -XX:+CheckMemoryInitialization + - JDK-8180266: Convert sun/security/provider/KeyStore/DKSTest.sh to Java Jtreg Test + - JDK-8195589: T6587786.java failed after JDK-8189997 + - JDK-8209398: sun/security/pkcs11/KeyStore/SecretKeysBasic.sh failed with "PKCS11Exception: CKR_ATTRIBUTE_SENSITIVE" + - JDK-8225012: sanity/client/SwingSet/src/ToolTipDemoTest.java fails on Windows + - JDK-8229147: Linux os::create_thread() overcounts guardpage size with newer glibc (>=2.27) + - JDK-8252713: jtreg time out of CtrlASCII.java seems to hang the Xserver. + - JDK-8255548: Missing coverage for javax.xml.crypto.dom.DOMCryptoContext + - JDK-8263044: jdk/jfr/jvm/TestDumpOnCrash.java timed out + - JDK-8267188: gc/stringdedup/TestStringDeduplicationInterned.java fails with Shenandoah + - JDK-8267341: macos attempt_reserve_memory_at(arg1, arg2, true) failure + - JDK-8267517: async logging for stdout and stderr + - JDK-8267860: Off-by-one bug when searching arrays in AlpnGreaseTest + - JDK-8268852: AsyncLogWriter should not overide is_Named_thread() + - JDK-8269091: javax/sound/sampled/Clip/SetPositionHang.java failed with ArrayIndexOutOfBoundsException: Array index out of range: -4 + - JDK-8269466: Factor out the common code for initializing and starting internal VM JavaThreads + - JDK-8270331: [TESTBUG] Error: Not a test or directory containing tests: java/awt/print/PrinterJob/InitToBlack.java + - JDK-8270794: Avoid loading Klass* twice in TypeArrayKlass::oop_size() + - JDK-8270894: Use acquire semantics in ObjectSynchronizer::read_stable_mark() + - JDK-8271707: migrate tests to use jdk.test.whitebox.WhiteBox + - JDK-8271898: disable os.release_multi_mappings_vm on macOS-X64 + - JDK-8272586: emit abstract machine code in hs-err logs + - JDK-8272654: Mark word accesses should not use Access API + - JDK-8273092: Sort classlist in JDK image + - JDK-8273803: Zero: Handle "zero" variant in CommandLineOptionTest.java + - JDK-8274986: max code printed in hs-err logs should be configurable + - JDK-8275031: runtime/ErrorHandling/MachCodeFramesInErrorFile.java fails when hsdis is present + - JDK-8275303: sun/java2d/pipe/InterpolationQualityTest.java fails with D3D basic render driver + - JDK-8275415: Prepare Leak Profiler for Lilliput + - JDK-8275662: remove test/lib/sun/hotspot + - JDK-8276333: jdk/jfr/event/oldobject/TestLargeRootSet.java failed "assert(!contains(edge->reference())) failed: invariant" + - JDK-8276651: java/lang/ProcessHandle tests fail with "RuntimeException: Input/output error" in java.lang.ProcessHandleImpl$Info.info0 + - JDK-8276696: ParallelObjectIterator freed at the wrong time in VM_HeapDumper + - JDK-8277102: Dubious PrintCompilation output + - JDK-8277353: java/security/MessageDigest/ThreadSafetyTest.java test times out + - JDK-8277417: C1 LIR instruction for load-klass + - JDK-8277427: Update jib-profiles.js to use JMH 1.33 devkit + - JDK-8277654: Shenandoah: Don't produce new memory state in C2 LRB runtime call + - JDK-8277860: PPC: Remove duplicate info != NULL check + - JDK-8278141: LIR_OpLoadKlass::_info shadows the field of the same name from LIR_Op + - JDK-8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. + - JDK-8279545: Buffer overrun in reverse_words of sharedRuntime_x86_64.cpp:3517 + - JDK-8280032: Update jib-profiles.js to use JMH 1.34 devkit + - JDK-8280396: G1: Full gc mark stack draining should prefer to make work available to other threads + - JDK-8280885: Shenandoah: Some tests failed with "EA: missing allocation reference path" + - JDK-8281507: Two javac tests have bad jtreg `@clean` tags + - JDK-8281717: Cover logout method for several LoginModule + - JDK-8282404: DrawStringWithInfiniteXform.java failed with "RuntimeException: drawString with InfiniteXform transform takes long time" + - JDK-8282651: ZGC: vmTestbase/gc/ArrayJuggle/ tests fails intermittently with exit code 97 + - JDK-8282665: [REDO] ByteBufferTest.java: replace endless recursion with RuntimeException in void ck(double x, double y) + - JDK-8283056: show abstract machine code in hs-err for all VM crashes + - JDK-8283276: java/io/ObjectStreamClass/ObjectStreamClassCaching.java fails with various GCs + - JDK-8283326: Implement SafeFetch statically + - JDK-8283724: Incorrect description for jtreg-failure-handler option + - JDK-8283756: (zipfs) ZipFSOutputStreamTest.testOutputStream should only check inflated bytes + - JDK-8283865: riscv: Break down -XX:+UseRVB into seperate options for each bitmanip extension + - JDK-8283929: GHA: Add RISC-V build config + - JDK-8284068: riscv: should call Atomic::release_store in JavaThread::set_thread_state + - JDK-8284090: com/sun/security/auth/module/AllPlatforms.java fails to compile + - JDK-8284273: Early crashes in os::print_context on AArch64 + - JDK-8284760: Correct type/array element offset in LibraryCallKit::get_state_from_digest_object() + - JDK-8284772: GHA: Use GCC Major Version Dependencies Only + - JDK-8284910: Buffer clean in PasswordCallback + - JDK-8284937: riscv: should not allocate special register for temp + - JDK-8284997: arm32 build crashes since JDK-8283326 + - JDK-8285303: riscv: Incorrect register mask in call_native_base + - JDK-8285437: riscv: Fix MachNode size mismatch for MacroAssembler::verify_oops* + - JDK-8285630: Fix a configure error in RISC-V cross build + - JDK-8285675: Temporary fix for arm32 SafeFetch + - JDK-8285699: riscv: Provide information when hitting a HaltNode + - JDK-8285711: riscv: RVC: Support disassembler show-bytes option + - JDK-8285756: clean up use of bad arguments for `@clean` in langtools tests + - JDK-8285980: Several tests in compiler/c2/irTests miss @requires vm.compiler2.enabled + - JDK-8286481: Exception printed to stdout on Windows when storing transparent image in clipboard + - JDK-8286620: Create regression test for verifying setMargin() of JRadioButton + - JDK-8286623: Bundle zlib by default with JDK on macos aarch64 + - JDK-8287227: Shenandoah: A couple of virtual thread tests failed with iu mode even without Loom enabled. + - JDK-8287418: riscv: Fix correctness issue of MacroAssembler::movptr + - JDK-8287552: riscv: Fix comment typo in li64 + - JDK-8287970: riscv: jdk/incubator/vector/*VectorTests failing + - JDK-8288719: [arm32] SafeFetch32 thumb interleaving causes random crashes + - JDK-8289077: Add manual tests to open + - JDK-8289238: Refactoring changes to PassFailJFrame Test Framework + - JDK-8289510: Improve test coverage for XPath Axes: namespace + - JDK-8289512: Fix GCC 12 warnings for adlc output_c.cpp + - JDK-8289547: Update javax/swing/Popup/TaskbarPositionTest.java + - JDK-8289646: configure script failed on WSL + - JDK-8289688: jfr command hangs when it processes invalid file + - JDK-8289748: C2 compiled code crashes with SIGFPE with -XX:+StressLCM and -XX:+StressGCM + - JDK-8289797: tools/launcher/I18NArgTest.java fails on Japanese Windows environment + - JDK-8289917: Metadata for regionsRefilled of G1EvacuationStatistics event is wrong + - JDK-8290137: riscv: small refactoring for add_memory_int32/64 + - JDK-8290164: compiler/runtime/TestConstantsInError.java fails on riscv + - JDK-8290464: Optimize ResourceArea zapping on ResourceMark release + - JDK-8290469: Add new positioning options to PassFailJFrame test framework + - JDK-8290496: riscv: Fix build warnings-as-errors with GCC 11 + - JDK-8291444: GHA builds/tests won't run manually if disabled from automatic running + - JDK-8291830: jvmti/RedefineClasses/StressRedefine failed: assert(!is_null(v)) failed: narrow klass value can never be zero + - JDK-8291893: riscv: remove fence.i used in user space + - JDK-8291947: riscv: fail to build after JDK-8290840 + - JDK-8291952: riscv: Remove PRAGMA_NONNULL_IGNORED + - JDK-8292182: [TESTLIB] Enhance JAXPPolicyManager to setup required permissions for jtreg version 7 jar + - JDK-8292315: Tests should not rely on specific JAR file names (hotspot) + - JDK-8292316: Tests should not rely on specific JAR file names (jpackage) + - JDK-8292683: Remove BadKeyUsageTest.java from Problem List + - JDK-8292698: Improve performance of DataInputStream + - JDK-8292716: Configure should check that jtreg is of the required version + - JDK-8292763: JDK-8292716 breaks configure without jtreg + - JDK-8292867: RISC-V: Simplify weak CAS return value handling + - JDK-8293012: ConstantPool::print_on can crash if _cache is NULL + - JDK-8293050: RISC-V: Remove redundant non-null assertions about macro-assembler + - JDK-8293098: GHA: Harmonize GCC version handling for host and cross builds + - JDK-8293100: RISC-V: Need to save and restore callee-saved FloatRegisters in StubGenerator::generate_call_stub + - JDK-8293107: GHA: Bump to Ubuntu 22.04 + - JDK-8293114: JVM should trim the native heap + - JDK-8293166: jdk/jfr/jvm/TestDumpOnCrash.java fails on Linux ppc64le and Linux aarch64 + - JDK-8293177: Verify version numbers in legal files + - JDK-8293180: JQuery UI license file not updated + - JDK-8293252: Shenandoah: ThreadMXBean synchronizer tests crash with aggressive heuristics + - JDK-8293361: GHA: dump config.log in case of configure failure + - JDK-8293474: RISC-V: Unify the way of moving function pointer + - JDK-8293524: RISC-V: Use macro-assembler functions as appropriate + - JDK-8293566: RISC-V: Clean up push and pop registers + - JDK-8293811: Provide a reason for PassFailJFrame.forceFail + - JDK-8293851: hs_err should print more stack in hex dump + - JDK-8294012: RISC-V: get/put_native_u8 missing the case when address&7 is 6 + - JDK-8294083: RISC-V: Minimal build failed with --disable-precompiled-headers + - JDK-8294086: RISC-V: Cleanup InstructionMark usages in the backend + - JDK-8294087: RISC-V: RVC: Fix a potential alignment issue and add more alignment assertions for the patchable calls/nops + - JDK-8294149: JMH 1.34 and later requires jopt-simple 5.0.4 + - JDK-8294187: RISC-V: Unify all relocations for the backend into AbstractAssembler::relocate() + - JDK-8294366: RISC-V: Partially mark out incompressible regions + - JDK-8294430: RISC-V: Small refactoring for movptr_with_offset + - JDK-8294492: RISC-V: Use li instead of patchable movptr at non-patchable callsites + - JDK-8294679: RISC-V: Misc crash dump improvements + - JDK-8294941: GHA: Cut down cross-compilation sysroots + - JDK-8294956: GHA: qemu-debootstrap is deprecated, use the regular one + - JDK-8295110: RISC-V: Mark out relocations as incompressible + - JDK-8295213: Run GHA manually with user-specified make and configure arguments + - JDK-8295270: RISC-V: Clean up and refactoring for assembler functions + - JDK-8295396: RISC-V: Cleanup useless CompressibleRegions + - JDK-8295657: SA: Allow larger object alignments + - JDK-8295737: macOS: Print content cut off when width > height with portrait orientation + - JDK-8295811: serviceability/sa/TestObjectAlignment.java fails on x86_32 + - JDK-8295812: Skip the "half float" support in LittleCMS during the build + - JDK-8295894: Remove SECOM certificate that is expiring in September 2023 + - JDK-8295926: RISC-V: C1: Fix LIRGenerator::do_LibmIntrinsic + - JDK-8295968: RISC-V: Rename some assembler intrinsic functions for RVV 1.0 + - JDK-8296384: [TESTBUG] sun/security/provider/SecureRandom/AbstractDrbg/SpecTest.java intermittently timeout + - JDK-8296435: RISC-V: Small refactoring for increment/decrement + - JDK-8296447: RISC-V: Make the operands order of vrsub_vx/vrsub_vi consistent with RVV 1.0 spec + - JDK-8296448: RISC-V: Fix temp usages of heapbase register killed by MacroAssembler::en/decode_klass_not_null + - JDK-8296602: RISC-V: improve performance of copy_memory stub + - JDK-8296771: RISC-V: C2: assert(false) failed: bad AD file + - JDK-8296796: Provide clean, platform-agnostic interface to C-heap trimming + - JDK-8296916: RISC-V: Move some small macro-assembler functions to header file + - JDK-8297350: Update JMH devkit to 1.36 + - JDK-8297359: RISC-V: improve performance of floating Max Min intrinsics + - JDK-8297476: Increase InlineSmallCode default from 1000 to 2500 for RISC-V + - JDK-8297644: RISC-V: Compilation error when shenandoah is disabled + - JDK-8297681: Unnecessary color conversion during 4BYTE_ABGR_PRE to INT_ARGB_PRE blit + - JDK-8297697: RISC-V: Add support for SATP mode detection + - JDK-8297715: RISC-V: C2: Use single-bit instructions from the Zbs extension + - JDK-8297887: Update Siphash + - JDK-8297923: java.awt.ScrollPane broken after multiple scroll up/down + - JDK-8298138: Shenandoah: HdrSeq asserts "sub-bucket index (512) overflow for value ( 1.00)" + - JDK-8298921: Create a regression test for JDK-8139581 + - JDK-8298974: Add ftcolor.c to imported freetype sources + - JDK-8299158: Improve MD5 intrinsic on AArch64 + - JDK-8299168: RISC-V: Fix MachNode size mismatch for MacroAssembler::_verify_oops* + - JDK-8299330: Minor improvements in MSYS2 Workflow handling + - JDK-8299617: CurrencySymbols.properties is missing the copyright notice + - JDK-8299658: C1 compilation crashes in LinearScan::resolve_exception_edge + - JDK-8299713: Test javax/swing/JTableHeader/6889007/bug6889007.java failed: Wrong type of cursor + - JDK-8299827: Add resolved IP address in connection exception for sockets + - JDK-8299847: RISC-V: Improve PrintOptoAssembly output of CMoveI/L nodes + - JDK-8299962: Speed up compiler/intrinsics/unsafe/DirectByteBufferTest.java and HeapByteBufferTest.java + - JDK-8300053: Shenandoah: Handle more GCCauses in ShenandoahControlThread::request_gc + - JDK-8300098: java/util/concurrent/ConcurrentHashMap/ConcurrentAssociateTest.java fails with internal timeout when executed with TieredCompilation1/3 + - JDK-8300109: RISC-V: Improve code generation for MinI/MaxI nodes + - JDK-8300405: Screen capture for test JFileChooserSetLocationTest.java, failure case + - JDK-8300584: Accelerate AVX-512 CRC32C for small buffers + - JDK-8300659: Refactor TestMemoryAwareness to use WhiteBox api for host values + - JDK-8300693: Lower the compile threshold and reduce the iterations of warmup loop in VarHandles tests + - JDK-8301033: RISC-V: Handle special cases for MinI/MaxI nodes for Zbb + - JDK-8301036: RISC-V: Factor out functions baseOffset & baseOffset32 from MacroAssembler + - JDK-8301067: RISC-V: better error message when reporting unsupported satp modes + - JDK-8301074: Replace NULL with nullptr in share/opto/ + - JDK-8301097: Update GHA XCode to 12.5.1 + - JDK-8301153: RISC-V: pipeline class for several instructions is not set correctly + - JDK-8301167: Update VerifySignedJar to actually exercise and test verification + - JDK-8301187: Memory leaks in OopMapCache + - JDK-8301269: Update Commons BCEL to Version 6.7.0 + - JDK-8301313: RISC-V: C2: assert(false) failed: bad AD file due to missing match rule + - JDK-8301367: Add exception handler method to the BaseLdapServer + - JDK-8301628: RISC-V: c2 fix pipeline class for several instructions + - JDK-8301700: Increase the default TLS Diffie-Hellman group size from 1024-bit to 2048-bit + - JDK-8301818: RISC-V: Factor out function mvw from MacroAssembler + - JDK-8301852: RISC-V: Optimize class atomic when order is memory_order_relaxed + - JDK-8301959: Compile command in compiler.loopopts.TestRemoveEmptyCountedLoop does not work + - JDK-8302114: RISC-V: Several foreign jtreg tests fail with debug build after JDK-8301818 + - JDK-8302150: Speed up compiler/codegen/Test7100757.java + - JDK-8302161: Upgrade jQuery UI to version 1.13.2 + - JDK-8302182: Update Public Suffix List to 88467c9 + - JDK-8302289: RISC-V: Use bgez instruction in arraycopy_simple_check when possible + - JDK-8302736: Major performance regression in Math.log on aarch64 + - JDK-8302776: RISC-V: Fix typo CSR_INSTERT to CSR_INSTRET + - JDK-8303047: avoid NULL after 8301661 + - JDK-8303154: Investigate and improve instruction cache flushing during compilation + - JDK-8303215: Make thread stacks not use huge pages + - JDK-8303279: C2: crash in SubTypeCheckNode::sub() at IGVN split if + - JDK-8304293: RISC-V: JDK-8276799 missed atomic intrinsic support for C1 + - JDK-8304314: StackWalkTest.java fails after CODETOOLS-7903373 + - JDK-8304353: Add lib-test tier1 testing in GHA + - JDK-8304725: AsyncGetCallTrace can cause SIGBUS on M1 + - JDK-8304845: Update PCSC-Lite for Suse Linux to 1.9.9 and fix incomplete license wording + - JDK-8304976: Optimize DateTimeFormatterBuilder.ZoneTextPrinterParser.getTree() + - JDK-8305006: Use correct register in riscv_enc_fast_unlock() + - JDK-8305008: RISC-V: Factor out immediate checking functions from assembler_riscv.inline.hpp + - JDK-8305112: RISC-V: Typo fix for RVC description + - JDK-8305236: Some LoadLoad barriers in the interpreter are unnecessary after JDK-8220051 + - JDK-8305421: Work around JDK-8305420 in CDSJDITest.java + - JDK-8305425: Thread.isAlive0 doesn't need to call into the VM + - JDK-8305512: RISC-V: Enable RVC extension by default on supported hardware + - JDK-8305670: Performance regression in LockSupport.unpark with lots of idle threads + - JDK-8305728: RISC-V: Use bexti instruction to do single-bit testing + - JDK-8305763: Parsing a URI with an underscore goes through a silent exception, negatively impacting performance + - JDK-8305766: ProblemList runtime/CompressedOops/CompressedClassPointers.java + - JDK-8305858: Resolve multiple definition of 'handleSocketError' when statically linking with JDK native libraries + - JDK-8305950: Have -XshowSettings option display tzdata version + - JDK-8305995: Footprint regression from JDK-8224957 + - JDK-8306060: Open source few AWT Insets related tests + - JDK-8306076: Open source AWT misc tests + - JDK-8306134: Open source some AWT tests relating to Button and a few other classes + - JDK-8306135: Clean up and open source some AWT tests + - JDK-8306137: Open source several AWT ScrollPane related tests + - JDK-8306281: function isWsl() returns false on WSL2 + - JDK-8306372: Open source AWT CardLayout and Checkbox tests + - JDK-8306428: RunThese30M.java crashed with assert(early->flag() == current->flag() || early->flag() == mtNone) + - JDK-8306430: Open source some AWT tests related to TextComponent and Toolkit + - JDK-8306435: Juggle04/TestDescription.java should be a booleanArr test and not a byteArr one + - JDK-8306484: Open source several AWT Choice jtreg tests + - JDK-8306566: Open source several clipboard AWT tests + - JDK-8306575: Clean up and open source four Dialog related tests + - JDK-8306636: Disable compiler/c2/Test6905845.java with -XX:TieredStopAtLevel=3 + - JDK-8306638: Open source some AWT tests related to datatransfer and Toolkit + - JDK-8306667: RISC-V: Fix storeImmN0 matching rule by using zr register + - JDK-8306682: Open source a few more AWT Choice tests + - JDK-8306718: Optimize and opensource some old AWT tests + - JDK-8306738: Select num workers for safepoint ParallelCleanupTask + - JDK-8306765: Some client related jtreg problem list entries are malformed + - JDK-8306812: Open source several AWT Miscellaneous tests + - JDK-8307067: remove broken EnableThreadSMRExtraValidityChecks option + - JDK-8307068: store a JavaThread* in the java.lang.Thread object after the JavaThread* is added to the main ThreadsList + - JDK-8307078: Opensource and clean up five more AWT Focus related tests + - JDK-8307079: Update test java/awt/Choice/DragOffNoSelect.java + - JDK-8307083: Open source some drag and drop tests 3 + - JDK-8307147: [x86] Dangling pointer warning for Assembler::_attributes + - JDK-8307150: RISC-V: Remove remaining StoreLoad barrier with UseCondCardMark for Serial/Parallel GC + - JDK-8307156: native_thread not protected by TLH + - JDK-8307165: java/awt/dnd/NoFormatsDropTest/NoFormatsDropTest.java timed out + - JDK-8307299: Move more DnD tests to open + - JDK-8307301: Update HarfBuzz to 7.2.0 + - JDK-8307348: Parallelize heap walk for ObjectCount(AfterGC) JFR event collection + - JDK-8307395: Add missing STS to Shenandoah + - JDK-8307446: RISC-V: Improve performance of floating point to integer conversion + - JDK-8307526: [JFR] Better handling of tampered JFR repository + - JDK-8307555: Reduce memory reads in x86 MD5 intrinsic + - JDK-8307569: Build with gcc8 is broken after JDK-8307301 + - JDK-8307572: AArch64: Vector registers are clobbered by some macroassemblers + - JDK-8307603: [AIX] Broken build after JDK-8307301 + - JDK-8307604: gcc12 based Alpine build broken build after JDK-8307301 + - JDK-8307651: RISC-V: stringL_indexof_char instruction has wrong format string + - JDK-8307653: Adjust delay time and gc log argument in TestAbortOnVMOperationTimeout + - JDK-8307683: Loop Predication should not hoist range checks with trap on success projection by negating their condition + - JDK-8307766: Linux: Provide the option to override the timer slack + - JDK-8308089: [riscv-port-jdk17u] Intrinsify Unsafe.storeStoreFence + - JDK-8308090: Add container tests for on-the-fly resource quota updates + - JDK-8308152: PropertyDescriptor should work with overridden generic getter method + - JDK-8308156: VerifyCACerts.java misses blank in error output + - JDK-8308192: Error in parsing replay file when staticfield is an array of single dimension + - JDK-8308232: nsk/jdb tests don't pass -verbose flag to the debuggee + - JDK-8308277: RISC-V: Improve vectorization of Match.sqrt() on floats + - JDK-8308283: Build failure with GCC12 & GCC13 + - JDK-8308300: enhance exceptions in MappedMemoryUtils.c + - JDK-8308643: Incorrect value of 'used' jvmstat counter + - JDK-8308766: TLAB initialization may cause div by zero + - JDK-8308803: Improve java/util/UUID/UUIDTest.java + - JDK-8308872: enhance logging and some exception in krb5/Config.java + - JDK-8308997: RISC-V: Sign extend when comparing 32-bit value with zero instead of testing the sign bit + - JDK-8309088: security/infra/java/security/cert/CertPathValidator/certification/AmazonCA.java fails + - JDK-8309095: Remove UTF-8 character from TaskbarPositionTest.java + - JDK-8309107: Bump update version for OpenJDK: jdk-17.0.9 + - JDK-8309119: [17u/11u] Redo JDK-8297951: C2: Create skeleton predicates for all If nodes in loop predication + - JDK-8309138: Fix container tests for jdks with symlinked conf dir + - JDK-8309228: Clarify EXPERIMENTAL flags comment in hotspot/share/runtime/globals.hpp + - JDK-8309254: Implement fast-path for ASCII-compatible CharsetEncoders on RISC-V + - JDK-8309266: C2: assert(final_con == (jlong)final_int) failed: final value should be integer + - JDK-8309297: Adjust ShenandoahHeap print_heap_regions_on + - JDK-8309340: Provide sctpHandleSocketErrorWithMessage + - JDK-8309427: [riscv-port-jdk17u] Remove unused RoundDoubleModeV C2 node + - JDK-8309550: jdk.jfr.internal.Utils::formatDataAmount method should gracefully handle amounts equal to Long.MIN_VALUE + - JDK-8309591: Socket.setOption(TCP_QUICKACK) uses wrong level + - JDK-8309613: [Windows] hs_err files sometimes miss information about the code containing the error + - JDK-8309746: Reconfigure check should include make/conf/version-numbers.conf + - JDK-8309862: Unsafe list operations in JfrStringPool + - JDK-8309956: Shenandoah: Strengthen the mark word check in string dedup + - JDK-8309959: JFR: Display N/A for missing data amount + - JDK-8310054: ScrollPane insets are incorrect + - JDK-8310126: C1: Missing receiver null check in Reference::get intrinsic + - JDK-8310259: Pin msys2/setup-msys2 github action to a specific commit + - JDK-8310549: avoid potential leaks in KeystoreImpl.m related to JNU_CHECK_EXCEPTION early returns + - JDK-8310551: vmTestbase/nsk/jdb/interrupt/interrupt001/interrupt001.java timed out due to missing prompt + - JDK-8310873: Re-enable locked_create_entry symbol check in runtime/NMT/CheckForProperDetailStackTrace.java for RISC-V + - JDK-8311033: [macos] PrinterJob does not take into account Sides attribute + - JDK-8311249: Remove unused MemAllocator::obj_memory_range + - JDK-8311285: report some fontconfig related environment variables in hs_err file + - JDK-8311689: Wrong visible amount in Adjustable of ScrollPane + - JDK-8311862: RISC-V: small improvements to shift immediate instructions + - JDK-8311923: TestIRMatching.java fails on RISC-V + - JDK-8312029: Add CriticalNative tests to ProblemList for 8312028 + - JDK-8312511: GHA: Bump cross-compile runner to Ubuntu 22.04 + - JDK-8312525: New test runtime/os/TestTrimNative.java#trimNative is failing: did not see the expected RSS reduction + - JDK-8312555: Ideographic characters aren't stretched by AffineTransform.scale(2, 1) + - JDK-8313262: C2: Sinking node may cause required cast to be dropped + - JDK-8313402: C1: Incorrect LoadIndexed value numbering + - JDK-8313428: GHA: Bump GCC versions for July 2023 updates + - JDK-8313576: GCC 7 reports compiler warning in bundled freetype 2.13.0 + - JDK-8313676: Amend TestLoadIndexedMismatch test to target intrinsic directly + - JDK-8313678: SymbolTable can leak Symbols during cleanup + - JDK-8313701: GHA: RISC-V should use the official repository for bootstrap + - JDK-8313707: GHA: Bootstrap sysroots with --variant=minbase + - JDK-8313796: AsyncGetCallTrace crash on unreadable interpreter method pointer + - JDK-8313815: The exception messages printed by jcmd ManagementAgent.start are corrupted on Japanese Windows + - JDK-8313874: JNI NewWeakGlobalRef throws exception for null arg + - JDK-8314020: Print instruction blocks in byte units + - JDK-8314117: RISC-V: Incorrect VMReg encoding in RISCV64Frame.java + - JDK-8314118: Update JMH devkit to 1.37 + - JDK-8314262: GHA: Cut down cross-compilation sysroots deeper + - JDK-8314426: runtime/os/TestTrimNative.java is failing on slow machines + - JDK-8314501: Shenandoah: sun/tools/jhsdb/heapconfig/JMapHeapConfigTest.java fails + - JDK-8314517: some tests fail in case ipv6 is disabled on the machine + - JDK-8314552: Fix javadoc tests to work with jtreg 7 + - JDK-8314658: [17u] GHA: Sync up debian-version for cross-builds + - JDK-8314730: GHA: Drop libfreetype6-dev transitional package in favor of libfreetype-dev + - JDK-8314960: Add Certigna Root CA - 2 + - JDK-8317040: Exclude cleaner test failing on older releases + - JDK-8317643: [17u] Remove designator DEFAULT_PROMOTED_VERSION_PRE=ea for release 17.0.9 + +Notes on individual issues: +=========================== + +hotspot/compiler: + +JDK-8276799: Implementation of JEP 422: Linux/RISC-V Port +========================================================= +https://openjdk.org/jeps/422 + +RISC-V is a free and open-source RISC instruction set architecture +(ISA) designed originally at the University of California, Berkeley, +and now developed collaboratively under the sponsorship of RISC-V +International. It is already supported by a wide range of language +toolchains. With the increasing availability of RISC-V hardware, the +JDK port has been backported to 17u, following introduction in 19. + +security-libs/javax.net.ssl: + +JDK-8301700: The Default TLS Diffie-Hellman Group Size Has Been Increased from 1024-bit to 2048-bit +=================================================================================================== +The JDK implementation of TLS 1.2 now uses a default Diffie Hellman +keysize of 2048 bits when a TLS_DHE cipher suite is negotiated and +either the client or server does not support FFDHE. + +The JDK TLS implementation supports FFDHE, which can negotiate a +stronger keysize, and this is enabled by default. + +As a workaround, users can revert to the previous key size by setting +the `jdk.tls.ephemeralDHKeySize` system property to 1024 (at their own +risk). + +This change does not affect TLS 1.3 as the minimum DH group size is +already 2048 bits. + +tools/launcher: + +JDK-8305950: `-XshowSettings:locale` Output Now Includes Tzdata Version +======================================================================= +The `-XshowSettings` launcher option has been enhanced to print the +tzdata version used by the JDK. The tzdata version is displayed as +part of the `locale` showSettings option. + +Example output using `-X:showSettings:locale`: + +Locale settings: + default locale = English + default display locale = English + default format locale = English + tzdata version = 2023c + +security-libs/java.security: + +JDK-8295894: Removed SECOM Trust System's RootCA1 Root Certificate +================================================================== +The following root certificate from SECOM Trust System has been +removed from the `cacerts` keystore: + +Alias Name: secomscrootca1 [jdk] +Distinguished Name: OU=Security Communication RootCA1, O=SECOM Trust.net, C=JP + +JDK-8314960: Added Certigna Root CA Certificate +=============================================== +The following root certificate has been added to the cacerts +truststore: + +Name: Certigna (Dhimyotis) +Alias Name: certignarootca +Distinguished Name: CN=Certigna Root CA, OU=0002 48146308100036, O=Dhimyotis, C=FR + +New in release OpenJDK 17.0.8.1 (2023-08-24): +============================================= +Live versions of these release notes can be found at: + * https://bit.ly/openjdk17081 + +* Other changes + - JDK-8313765: Invalid CEN header (invalid zip64 extra data field size) + - JDK-8314677: Bump update version for OpenJDK: jdk-17.0.8.1 + +Notes on individual issues: +=========================== + +core-libs/java.util.jar: + +JDK-8313765: Invalid CEN header (invalid zip64 extra data field size) +===================================================================== +Additional validity checks in the handling of Zip64 files, +JDK-8302483, introduced in 17.0.8, caused the use of some valid zip +files to now fail with the error, `Invalid CEN header (invalid zip64 +extra data field size)` + +This release, 17.0.8.1, allows for zero length headers and additional +padding produced by some Zip64 creation tools. + +The following third party tools have also released patches to better +adhere to the ZIP File Format Specification: + +* Apache Commons Compress fix for Empty CEN Zip64 Extra Headers fixed in Commons Compress release 1.11 +* Apache Ant fix for Empty CEN Zip64 Extra Headers fixed in Ant 1.10.14 +* BND issue with writing invalid Extra Headers fixed in BND 5.3 + +The maven-bundle-plugin 5.1.5 includes the BND 5.3 patch. + +If these improved validation checks cause issues for deployed zip or +jar files, check how the file was created and whether patches are +available from the generating software to resolve the issue. With +both JDK releases, the checks can be disabled by setting the new +system property, `jdk.util.zip.disableZip64ExtraFieldValidation` to +`true`. + New in release OpenJDK 17.0.8 (2023-07-18): =========================================== Live versions of these release notes can be found at: @@ -2913,4 +3397,3 @@ its introduction and the effort required to maintain it is significant. Retain the experimental Java-level JVM compiler interface (JVMCI) so that developers can continue to use externally-built versions of the compiler for JIT compilation. - diff --git a/discover_trees.sh b/discover_trees.sh new file mode 100755 index 0000000..8c31278 --- /dev/null +++ b/discover_trees.sh @@ -0,0 +1,54 @@ +#!/bin/sh + +# Copyright (C) 2020 Red Hat, Inc. +# Written by Andrew John Hughes . +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +TREE=${1} + +if test "x${TREE}" = "x"; then + TREE=${PWD} +fi + +if [ -e ${TREE}/nashorn/.hg -o -e ${TREE}/nashorn/merge.changeset ] ; then + NASHORN="nashorn" ; +fi + +if [ -e ${TREE}/corba/.hg -o -e ${TREE}/corba/merge.changeset ] ; then + CORBA="corba"; +fi + +if [ -e ${TREE}/jaxp/.hg -o -e ${TREE}/jaxp/merge.changeset ] ; then + JAXP="jaxp"; +fi + +if [ -e ${TREE}/jaxws/.hg -o -e ${TREE}/jaxws/merge.changeset ] ; then + JAXWS="jaxws"; +fi + +if [ -e ${TREE}/langtools/.hg -o -e ${TREE}/langtools/merge.changeset ] ; then + LANGTOOLS="langtools"; +fi + +if [ -e ${TREE}/jdk/.hg -o -e ${TREE}/jdk/merge.changeset ] ; then + JDK="jdk"; +fi + +if [ -e ${TREE}/hotspot/.hg -o -e ${TREE}/hotspot/merge.changeset ] ; then + HOTSPOT="hotspot"; +fi + +SUBTREES="${CORBA} ${JAXP} ${JAXWS} ${LANGTOOLS} ${NASHORN} ${JDK} ${HOTSPOT}"; +echo ${SUBTREES} diff --git a/fips-17u-bf363eecce3.patch b/fips-17u-51e1d00be4e.patch similarity index 99% rename from fips-17u-bf363eecce3.patch rename to fips-17u-51e1d00be4e.patch index cd8565c..da1df4d 100644 --- a/fips-17u-bf363eecce3.patch +++ b/fips-17u-51e1d00be4e.patch @@ -116,7 +116,7 @@ index 00000000000..f48fc7f7e80 + AC_SUBST(NSS_LIBDIR) +]) diff --git a/make/autoconf/libraries.m4 b/make/autoconf/libraries.m4 -index a65d91ee974..a8f054c1397 100644 +index 366682cf044..1f8d782f419 100644 --- a/make/autoconf/libraries.m4 +++ b/make/autoconf/libraries.m4 @@ -33,6 +33,7 @@ m4_include([lib-std.m4]) @@ -2508,7 +2508,7 @@ index 00000000000..dc8bc72fccb + } +} diff --git a/src/java.base/share/conf/security/java.security b/src/java.base/share/conf/security/java.security -index fab52688c04..29337576f37 100644 +index 9be02033877..4dd055a9ccf 100644 --- a/src/java.base/share/conf/security/java.security +++ b/src/java.base/share/conf/security/java.security @@ -82,6 +82,17 @@ security.provider.tbd=Apple @@ -3496,7 +3496,7 @@ index 00000000000..f8d505ca815 +} \ No newline at end of file diff --git a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Key.java b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Key.java -index 9b69072280e..5696b904979 100644 +index 0736ce997e4..0a937fef377 100644 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Key.java +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Key.java @@ -37,6 +37,8 @@ import javax.crypto.*; @@ -3518,18 +3518,18 @@ index 9b69072280e..5696b904979 100644 private static final long serialVersionUID = -2575874101938349339L; private static final String PUBLIC = "public"; -@@ -136,9 +141,7 @@ abstract class P11Key implements Key, Length { +@@ -139,9 +144,7 @@ abstract class P11Key implements Key, Length { this.tokenObject = tokenObject; this.sensitive = sensitive; this.extractable = extractable; - char[] tokenLabel = this.token.tokenInfo.label; -- boolean isNSS = (tokenLabel[0] == 'N' && tokenLabel[1] == 'S' +- isNSS = (tokenLabel[0] == 'N' && tokenLabel[1] == 'S' - && tokenLabel[2] == 'S'); -+ boolean isNSS = P11Util.isNSS(this.token); ++ isNSS = P11Util.isNSS(this.token); boolean extractKeyInfo = (!DISABLE_NATIVE_KEYS_EXTRACTION && isNSS && extractable && !tokenObject); this.keyIDHolder = new NativeKeyHolder(this, keyID, session, -@@ -379,7 +382,9 @@ abstract class P11Key implements Key, Length { +@@ -383,7 +386,9 @@ abstract class P11Key implements Key, Length { new CK_ATTRIBUTE(CKA_SENSITIVE), new CK_ATTRIBUTE(CKA_EXTRACTABLE), }); @@ -3540,13 +3540,13 @@ index 9b69072280e..5696b904979 100644 return new P11PrivateKey (session, keyID, algorithm, keyLength, attributes); } else { -@@ -461,7 +466,8 @@ abstract class P11Key implements Key, Length { +@@ -465,7 +470,8 @@ abstract class P11Key implements Key, Length { } public String getFormat() { token.ensureValid(); -- if (sensitive || (extractable == false)) { +- if (sensitive || !extractable || (isNSS && tokenObject)) { + if (!plainKeySupportEnabled && -+ (sensitive || (extractable == false))) { ++ (sensitive || !extractable || (isNSS && tokenObject))) { return null; } else { return "RAW"; diff --git a/generate_source_tarball.sh b/generate_source_tarball.sh index fc8662a..7ff27d6 100755 --- a/generate_source_tarball.sh +++ b/generate_source_tarball.sh @@ -8,7 +8,7 @@ # In any case you have to set PROJECT_NAME REPO_NAME and VERSION. eg: # PROJECT_NAME=openjdk # REPO_NAME=jdk17u -# VERSION=jdk-17.0.7+7 +# VERSION=jdk-17.0.7+9 # or to eg prepare systemtap: # icedtea7's jstack and other tapsets # VERSION=6327cf1cea9e @@ -29,8 +29,6 @@ set -e OPENJDK_URL_DEFAULT=https://github.com COMPRESSION_DEFAULT=xz -# Corresponding IcedTea version -ICEDTEA_VERSION=12.0 if [ "x$1" = "xhelp" ] ; then echo -e "Behaviour may be specified by setting the following variables:\n" @@ -40,8 +38,8 @@ if [ "x$1" = "xhelp" ] ; then echo "OPENJDK_URL - the URL to retrieve code from (optional; defaults to ${OPENJDK_URL_DEFAULT})" echo "COMPRESSION - the compression type to use (optional; defaults to ${COMPRESSION_DEFAULT})" echo "FILE_NAME_ROOT - name of the archive, minus extensions (optional; defaults to PROJECT_NAME-REPO_NAME-VERSION)" - echo "REPO_ROOT - the location of the Git repository to archive (optional; defaults to OPENJDK_URL/PROJECT_NAME/REPO_NAME)" - echo "TO_COMPRESS - what part of clone to pack (default is openjdk)" + echo "REPO_ROOT - the location of the Git repository to archive (optional; defaults to OPENJDK_URL/PROJECT_NAME/REPO_NAME.git)" + echo "TO_COMPRESS - what part of clone to pack (default is ${VERSION})" echo "BOOT_JDK - the bootstrap JDK to satisfy the configure run" exit 1; fi @@ -52,6 +50,7 @@ if [ "x$VERSION" = "x" ] ; then exit 2 fi echo "Version: ${VERSION}" + NUM_VER=${VERSION##jdk-} RELEASE_VER=${NUM_VER%%+*} BUILD_VER=${NUM_VER##*+} @@ -117,8 +116,8 @@ if [ "x$REPO_ROOT" = "x" ] ; then fi; if [ "x$TO_COMPRESS" = "x" ] ; then - TO_COMPRESS="openjdk" - echo "No targets to be compressed specified, ; default to ${TO_COMPRESS}" + TO_COMPRESS="${VERSION}" + echo "No targets to be compressed specified ; default to ${TO_COMPRESS}" fi; echo -e "Settings:" @@ -140,9 +139,10 @@ else mkdir "${FILE_NAME_ROOT}" pushd "${FILE_NAME_ROOT}" echo "Cloning ${VERSION} root repository from ${REPO_ROOT}" - git clone -b ${VERSION} ${REPO_ROOT} openjdk + git clone -b ${VERSION} ${REPO_ROOT} ${VERSION} popd fi + pushd "${FILE_NAME_ROOT}" # Generate .src-rev so build has knowledge of the revision the tarball was created from mkdir build @@ -153,22 +153,22 @@ pushd "${FILE_NAME_ROOT}" rm -rf build # Remove commit checks - echo "Removing $(find openjdk -name '.jcheck' -print)" - find openjdk -name '.jcheck' -print0 | xargs -0 rm -rf + echo "Removing $(find ${VERSION} -name '.jcheck' -print)" + find ${VERSION} -name '.jcheck' -print0 | xargs -0 rm -r # Remove history and GHA - echo "find openjdk -name '.hgtags'" - find openjdk -name '.hgtags' -exec rm -fv '{}' '+' - echo "find openjdk -name '.hgignore'" - find openjdk -name '.hgignore' -exec rm -fv '{}' '+' - echo "find openjdk -name '.gitattributes'" - find openjdk -name '.gitattributes' -exec rm -fv '{}' '+' - echo "find openjdk -name '.gitignore'" - find openjdk -name '.gitignore' -exec rm -fv '{}' '+' - echo "find openjdk -name '.git'" - find openjdk -name '.git' -exec rm -rfv '{}' '+' - echo "find openjdk -name '.github'" - find openjdk -name '.github' -exec rm -rfv '{}' '+' + echo "find ${VERSION} -name '.hgtags'" + find ${VERSION} -name '.hgtags' -exec rm -fv '{}' '+' + echo "find ${VERSION} -name '.hgignore'" + find ${VERSION} -name '.hgignore' -exec rm -fv '{}' '+' + echo "find ${VERSION} -name '.gitattributes'" + find ${VERSION} -name '.gitattributes' -exec rm -fv '{}' '+' + echo "find ${VERSION} -name '.gitignore'" + find ${VERSION} -name '.gitignore' -exec rm -fv '{}' '+' + echo "find ${VERSION} -name '.git'" + find ${VERSION} -name '.git' -exec rm -rfv '{}' '+' + echo "find ${VERSION} -name '.github'" + find ${VERSION} -name '.github' -exec rm -rfv '{}' '+' echo "Compressing remaining forest" if [ "X$COMPRESSION" = "Xxz" ] ; then diff --git a/icedtea_sync.sh b/icedtea_sync.sh index e5c54f3..c1b8f6a 100755 --- a/icedtea_sync.sh +++ b/icedtea_sync.sh @@ -1,192 +1 @@ -#!/bin/bash - -# Copyright (C) 2019 Red Hat, Inc. -# Written by Andrew John Hughes . -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . - -ICEDTEA_USE_VCS=true - -ICEDTEA_VERSION=3.15.0 -ICEDTEA_URL=https://icedtea.classpath.org/download/source -ICEDTEA_SIGNING_KEY=CFDA0F9B35964222 - -ICEDTEA_HG_URL=https://icedtea.classpath.org/hg/icedtea11 - -set -e - -RPM_DIR=${PWD} -if [ ! -f ${RPM_DIR}/jconsole.desktop.in ] ; then - echo "Not in RPM source tree."; - exit 1; -fi - -if test "x${TMPDIR}" = "x"; then - TMPDIR=/tmp; -fi -WORKDIR=${TMPDIR}/it.sync - -echo "Using working directory ${WORKDIR}" -mkdir ${WORKDIR} -pushd ${WORKDIR} - -if test "x${WGET}" = "x"; then - WGET=$(which wget); - if test "x${WGET}" = "x"; then - echo "wget not found"; - exit 1; - fi -fi - -if test "x${TAR}" = "x"; then - TAR=$(which tar) - if test "x${TAR}" = "x"; then - echo "tar not found"; - exit 2; - fi -fi - -echo "Dependencies:"; -echo -e "\tWGET: ${WGET}"; -echo -e "\tTAR: ${TAR}\n"; - -if test "x${ICEDTEA_USE_VCS}" = "xtrue"; then - echo "Mode: Using VCS"; - - if test "x${GREP}" = "x"; then - GREP=$(which grep); - if test "x${GREP}" = "x"; then - echo "grep not found"; - exit 3; - fi - fi - - if test "x${CUT}" = "x"; then - CUT=$(which cut); - if test "x${CUT}" = "x"; then - echo "cut not found"; - exit 4; - fi - fi - - if test "x${TR}" = "x"; then - TR=$(which tr); - if test "x${TR}" = "x"; then - echo "tr not found"; - exit 5; - fi - fi - - if test "x${HG}" = "x"; then - HG=$(which hg); - if test "x${HG}" = "x"; then - echo "hg not found"; - exit 6; - fi - fi - - echo "Dependencies:"; - echo -e "\tGREP: ${GREP}"; - echo -e "\tCUT: ${CUT}"; - echo -e "\tTR: ${TR}"; - echo -e "\tHG: ${HG}"; - - echo "Checking out repository from VCS..."; - ${HG} clone ${ICEDTEA_HG_URL} icedtea - - echo "Obtaining version from configure.ac..."; - ROOT_VER=$(${GREP} '^AC_INIT' icedtea/configure.ac|${CUT} -d ',' -f 2|${TR} -d '[][:space:]') - echo "Root version from configure: ${ROOT_VER}"; - - VCS_REV=$(${HG} log -R icedtea --template '{node|short}' -r tip) - echo "VCS revision: ${VCS_REV}"; - - ICEDTEA_VERSION="${ROOT_VER}-${VCS_REV}" - echo "Creating icedtea-${ICEDTEA_VERSION}"; - mkdir icedtea-${ICEDTEA_VERSION} - echo "Copying required files from checkout to icedtea-${ICEDTEA_VERSION}"; - # Commented out for now as IcedTea 6's jconsole.desktop.in is outdated - #cp -a icedtea/jconsole.desktop.in ../icedtea-${ICEDTEA_VERSION} - cp -a ${RPM_DIR}/jconsole.desktop.in icedtea-${ICEDTEA_VERSION} - cp -a icedtea/tapset icedtea-${ICEDTEA_VERSION} - - rm -rf icedtea -else - echo "Mode: Using tarball"; - - if test "x${ICEDTEA_VERSION}" = "x"; then - echo "No IcedTea version specified for tarball download."; - exit 3; - fi - - if test "x${CHECKSUM}" = "x"; then - CHECKSUM=$(which sha256sum) - if test "x${CHECKSUM}" = "x"; then - echo "sha256sum not found"; - exit 4; - fi - fi - - if test "x${PGP}" = "x"; then - PGP=$(which gpg) - if test "x${PGP}" = "x"; then - echo "gpg not found"; - exit 5; - fi - fi - - echo "Dependencies:"; - echo -e "\tCHECKSUM: ${CHECKSUM}"; - echo -e "\tPGP: ${PGP}\n"; - - echo "Checking for IcedTea signing key ${ICEDTEA_SIGNING_KEY}..."; - if ! gpg --list-keys ${ICEDTEA_SIGNING_KEY}; then - echo "IcedTea signing key ${ICEDTEA_SIGNING_KEY} not installed."; - exit 6; - fi - - echo "Downloading IcedTea release tarball..."; - ${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.tar.xz - echo "Downloading IcedTea tarball signature..."; - ${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.tar.xz.sig - echo "Downloading IcedTea tarball checksums..."; - ${WGET} -v ${ICEDTEA_URL}/icedtea-${ICEDTEA_VERSION}.sha256 - - echo "Verifying checksums..."; - ${CHECKSUM} --check --ignore-missing icedtea-${ICEDTEA_VERSION}.sha256 - - echo "Checking signature..."; - ${PGP} --verify icedtea-${ICEDTEA_VERSION}.tar.xz.sig - - echo "Extracting files..."; - ${TAR} xJf icedtea-${ICEDTEA_VERSION}.tar.xz \ - icedtea-${ICEDTEA_VERSION}/tapset \ - icedtea-${ICEDTEA_VERSION}/jconsole.desktop.in - - rm -vf icedtea-${ICEDTEA_VERSION}.tar.xz - rm -vf icedtea-${ICEDTEA_VERSION}.tar.xz.sig - rm -vf icedtea-${ICEDTEA_VERSION}.sha256 -fi - -echo "Replacing desktop files..."; -mv -v icedtea-${ICEDTEA_VERSION}/jconsole.desktop.in ${RPM_DIR} - -echo "Creating new tapset tarball..."; -mv -v icedtea-${ICEDTEA_VERSION} openjdk -${TAR} cJf ${RPM_DIR}/tapsets-icedtea-${ICEDTEA_VERSION}.tar.xz openjdk - -rm -rvf openjdk - -popd -rm -rf ${WORKDIR} +# this file is intentionally not here, as portable builds do not have desktop integration diff --git a/java-17-openjdk-portable.spec b/java-17-openjdk-portable.spec index 655ccd1..c4526aa 100644 --- a/java-17-openjdk-portable.spec +++ b/java-17-openjdk-portable.spec @@ -30,7 +30,7 @@ # Enable static library builds by default. %bcond_without staticlibs # Build a fresh libjvm.so for use in a copy of the bootstrap JDK -%bcond_without fresh_libjvm +%bcond_with fresh_libjvm # Build with system libraries %bcond_with system_libs @@ -41,8 +41,6 @@ %define __os_install_post %{nil} %endif -%global unpacked_licenses %{_datarootdir}/licenses - # Workaround for stripping of debug symbols from static libraries %if %{with staticlibs} %define __brp_strip_static_archive %{nil} @@ -66,10 +64,6 @@ # See: https://bugzilla.redhat.com/show_bug.cgi?id=1520879 %global _find_debuginfo_opts -g -# With LTO flags enabled, debuginfo checks fail for some reason. Disable -# LTO for a passing build. This really needs to be looked at. -%define _lto_cflags %{nil} - # note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros # also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch # see the difference between global and define: @@ -147,16 +141,16 @@ # Set of architectures which support the serviceability agent %global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64} %{arm} # Set of architectures which support class data sharing -# See https://bugzilla.redhat.com/show_bug.cgi?id=513605 -# MetaspaceShared::generate_vtable_methods is not implemented for the PPC JIT -%global share_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{arm} s390x +# As of JDK-8005165 in OpenJDK 10, class sharing is not arch-specific +# However, it does segfault on the Zero assembler port, so currently JIT only +%global share_arches %{jit_arches} # Set of architectures for which we build the Shenandoah garbage collector %global shenandoah_arches x86_64 %{aarch64} # Set of architectures for which we build the Z garbage collector %global zgc_arches x86_64 # Set of architectures for which alt-java has SSB mitigation %global ssbd_arches x86_64 -# Set of architectures for which java has short vector math library (libsvml.so) +# Set of architectures for which java has short vector math library (libjsvml.so) %global svml_arches x86_64 # Set of architectures where we verify backtraces with gdb # s390x fails on RHEL 7 so we exclude it there @@ -166,7 +160,7 @@ %global gdb_arches %{jit_arches} %{zero_arches} %endif -# By default, we build a debug build during main build on JIT architectures +# By default, we build a slowdebug build during main build on JIT architectures %if %{with slowdebug} %ifarch %{debug_arches} %global include_debug_build 1 @@ -237,17 +231,24 @@ %global static_libs_target %{nil} %endif -# RPM JDK builds keep the debug symbols internal, to be later stripped by RPM -%global debug_symbols internal - -# unlike portables,the rpms have to use static_libs_target very dynamically -%global bootstrap_targets images legacy-jre-image -%global release_targets images docs-zip legacy-jre-image +# The static libraries are produced under the same configuration as the main +# build for portables, as we expect in-tree libraries to be used throughout. +# If system libraries are enabled, the static libraries will also use them +# which may cause issues. +%global bootstrap_targets images %{static_libs_target} legacy-jre-image +%global release_targets images docs-zip %{static_libs_target} legacy-jre-image # No docs nor bootcycle for debug builds -%global debug_targets images legacy-jre-image +%global debug_targets images %{static_libs_target} legacy-jre-image # Target to use to just build HotSpot %global hotspot_target hotspot +# DTS toolset to use to provide gcc & binutils +%global dtsversion 10 + +# Disable LTO as this causes build failures at the moment. +# See RHBZ#1861401 +%define _lto_cflags %{nil} + # Filter out flags from the optflags macro that cause problems with the OpenJDK build # We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2 # We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs) @@ -333,20 +334,20 @@ # New Version-String scheme-style defines %global featurever 17 %global interimver 0 -%global updatever 8 +%global updatever 9 %global patchver 0 # buildjdkver is usually same as %%{featurever}, # but in time of bootstrap of next jdk, it is featurever-1, # and this it is better to change it here, on single place -%global buildjdkver %{featurever} +%global buildjdkver 17 # 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} %global lts_designator "LTS" %global lts_designator_zip -%{lts_designator} %else - %global lts_designator "" - %global lts_designator_zip "" + %global lts_designator "" + %global lts_designator_zip "" %endif # JDK to use for bootstrapping %global bootjdk /usr/lib/jvm/java-%{buildjdkver}-openjdk @@ -372,26 +373,34 @@ %global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%{name}&version=%{fedora} %else %if 0%{?rhel} -%global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi?product=Red%20Hat%20Enterprise%20Linux%20%{rhel}&component=%{name} +%global oj_vendor_bug_url https://access.redhat.com/support/cases/ %else %global oj_vendor_bug_url https://bugzilla.redhat.com/enter_bug.cgi %endif %endif %endif -%global oj_vendor_version (Red_Hat-%{version}-%{release}) +%global oj_vendor_version (Red_Hat-%{version}-%{rpmrelease}) # Define IcedTea version used for SystemTap tapsets and desktop file %global icedteaver 6.0.0pre00-c848b93a8598 # Define current Git revision for the FIPS support patches -%global fipsver bf363eecce3 +%global fipsver 51e1d00be4e +# Define JDK versions +%global newjavaver %{featurever}.%{interimver}.%{updatever}.%{patchver} +%global javaver %{featurever} +# Strip up to 6 trailing zeros in newjavaver, as the JDK does, to get the correct version used in filenames +%global filever %(svn=%{newjavaver}; for i in 1 2 3 4 5 6 ; do svn=${svn%%.0} ; done; echo ${svn}) +# The tag used to create the OpenJDK tarball +%global vcstag jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}} # Standard JPackage naming and versioning defines %global origin openjdk %global origin_nice OpenJDK -%global top_level_dir_name %{origin} +%global top_level_dir_name %{vcstag} %global top_level_dir_name_backup %{top_level_dir_name}-backup -%global buildver 7 -%global rpmrelease 1 +%global buildver 9 +%global rpmrelease 2 +#%%global tagsuffix %%{nil} # 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 # Using 10 digits may overflow the int used for priority, so we combine the patch and build versions @@ -404,14 +413,6 @@ # for techpreview, using 1, so slowdebugs can have 0 %global priority %( printf '%08d' 1 ) %endif -%global newjavaver %{featurever}.%{interimver}.%{updatever}.%{patchver} -%global javaver %{featurever} - -# Strip up to 6 trailing zeros in newjavaver, as the JDK does, to get the correct version used in filenames -%global filever %(svn=%{newjavaver}; for i in 1 2 3 4 5 6 ; do svn=${svn%%.0} ; done; echo ${svn}) - -# The tag used to create the OpenJDK tarball -%global vcstag jdk-%{filever}+%{buildver}%{?tagsuffix:-%{tagsuffix}} # Define milestone (EA for pre-releases, GA for releases) # Release will be (where N is usually a number starting at 1): @@ -421,7 +422,7 @@ %if %{is_ga} %global build_type GA %global ea_designator "" -%global ea_designator_zip "" +%global ea_designator_zip %{nil} %global extraver %{nil} %global eaprefix %{nil} %else @@ -438,12 +439,10 @@ # images directories from upstream build %global jdkimage jdk %global static_libs_image static-libs -# installation directory for static libraries -%global static_libs_root lib/static -%global static_libs_arch_dir %{static_libs_root}/linux-%{archinstall} -%global static_libs_install_dir %{static_libs_arch_dir}/glibc # output dir stub %define buildoutputdir() %{expand:build/jdk%{featurever}.build%{?1}} +%define installoutputdir() %{expand:install/jdk%{featurever}.install%{?1}} +%define packageoutputdir() %{expand:packages/jdk%{featurever}.packages%{?1}} # we can copy the javadoc to not arched dir, or make it not noarch %define uniquejavadocdir() %{expand:%{fullversion}.%{_arch}%{?1}} # main id and dir of this jdk @@ -464,6 +463,10 @@ # Intentionally use jdkportablenameimpl here since we want to have static-libs files overlayed on # top of the JDK archive %define staticlibsportablename() %{expand:%{jdkportablenameimpl -- %%{1}}} +%define docportablename() %(echo %{uniquesuffix ""} | sed "s;%{version}-%{release};\\0.portable.docs;g" | sed "s;openjdkportable;el;g") +%define docportablearchive() %{docportablename}.tar.xz +%define miscportablename() %(echo %{uniquesuffix ""} | sed "s;%{version}-%{release};\\0.portable.misc;g" | sed "s;openjdkportable;el;g") +%define miscportablearchive() %{miscportablename}.tar.xz # RPM 4.19 no longer accept our double percentaged %%{nil} passed to %%{1} # so we have to pass in "" but evaluate it, otherwise files record will include it @@ -493,6 +496,12 @@ %global __requires_exclude ^(%{_privatelibs}|%{_publiclibs})$ %endif +# VM variant being built +%ifarch %{zero_arches} +%global vm_variant zero +%else +%global vm_variant server +%endif %global etcjavasubdir %{_sysconfdir}/java/java-%{javaver}-%{origin} %define etcjavadir() %{expand:%{etcjavasubdir}/%{uniquesuffix -- %{?1}}} @@ -515,20 +524,6 @@ %global alternatives_requires %{_sbindir}/alternatives %endif -%if %{with_systemtap} -# Where to install systemtap tapset (links) -# We would like these to be in a package specific sub-dir, -# but currently systemtap doesn't support that, so we have to -# use the root tapset dir for now. To distinguish between 64 -# and 32 bit architectures we place the tapsets under the arch -# specific dir (note that systemtap will only pickup the tapset -# for the primary arch for now). Systemtap uses the machine name -# aka target_cpu as architecture specific directory name. -%global tapsetroot /usr/share/systemtap -%global tapsetdirttapset %{tapsetroot}/tapset/ -%global tapsetdir %{tapsetdirttapset}/%{stapinstall} -%endif - # x86 is no longer supported %if 0%{?java_arches:1} ExclusiveArch: %{java_arches} @@ -536,8 +531,8 @@ ExclusiveArch: %{java_arches} ExcludeArch: %{ix86} %endif -# Portables have no rpo (requires/provides), but thsoe are awesome for orientation in spec -# also scriptlets are hapily missing and files are handled old fashion +# Portables have no repo (requires/provides), but these are awesome for orientation in spec +# Also scriptlets are happily missing and files are handled old fashion # not-duplicated requires/provides/obsoletes for normal/debug packages %define java_rpo() %{expand: } @@ -548,14 +543,18 @@ ExcludeArch: %{ix86} %define java_static_libs_rpo() %{expand: } +%define java_unstripped_rpo() %{expand: +} + +%define java_docs_rpo() %{expand: +} + +%define java_misc_rpo() %{expand: +} # Prevent brp-java-repack-jars from being run %global __jar_repack 0 -# portables have grown out of its component, moving back to java-x-vendor -# this expression, when declared as global, filled component with java-x-vendor portable -%define component %(echo %{name} | sed "s;-portable;;g") - Name: java-%{javaver}-%{origin}-portable Version: %{newjavaver}.%{buildver} Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist} @@ -570,6 +569,11 @@ Release: %{?eaprefix}%{rpmrelease}%{?extraver}%{?dist} # provides >= 1.6.0 must specify the epoch, "java >= 1:1.6.0". Epoch: 1 + +# portables have grown out of its component, moving back to java-x-vendor +# this expression, when declared as global, filled component with java-x-vendor portable +%define component %(echo %{name} | sed "s;-portable;;g") + Summary: %{origin_nice} %{featurever} Runtime Environment portable edition # Groups are only used up to RHEL 8 and on Fedora versions prior to F30 %if (0%{?rhel} > 0 && 0%{?rhel} <= 8) || (0%{?fedora} >= 0 && 0%{?fedora} < 30) @@ -593,9 +597,8 @@ Group: Development/Languages 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 URL: http://openjdk.java.net/ - # The source tarball, generated using generate_source_tarball.sh -Source0: openjdk-jdk%{featurever}u-%{vcstag}.tar.xz +Source0: https://openjdk-sources.osci.io/openjdk%{featurever}/open%{vcstag}%{ea_designator_zip}.tar.xz # Use 'icedtea_sync.sh' to update the following # They are based on code contained in the IcedTea project (6.x). @@ -614,8 +617,7 @@ Source10: NEWS Source11: nss.cfg.in # Removed libraries that we link instead -# Disabled in portables -#Source12: remove-intree-libraries.sh +Source12: remove-intree-libraries.sh # Ensure we aren't using the limited crypto policy Source13: TestCryptoLevel.java @@ -629,37 +631,22 @@ Source15: TestSecurityProperties.java # Ensure vendor settings are correct Source16: CheckVendor.java -# nss fips configuration file -Source17: nss.fips.cfg.in - # Ensure translations are available for new timezones Source18: TestTranslations.java -%if (0%{?rhel} > 0 && 0%{?rhel} < 8) -# boot jdk for portable build root on -Source1001: ojdk17-aarch64-17.35.tar.gz -Source1002: ojdk17-ppc64le-17.35.tar.gz -Source1003: ojdk17-x86_64-17.35.tar.gz -Source1004: ojdk17-s390x-17.35.tar.gz -%endif - ############################################ # # RPM/distribution specific patches # ############################################ -# NSS via SunPKCS11 Provider (disabled comment -# due to memory leak). +# Ignore AWTError when assistive technologies are loaded +Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch +Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch +# NSS via SunPKCS11 Provider (disabled due to memory leak). Patch1000: rh1648249-add_commented_out_nss_cfg_provider_to_java_security.patch # RH1750419: enable build of speculative store bypass hardened alt-java (CVE-2018-3639) Patch600: rh1750419-redhat_alt_java.patch - -# Ignore AWTError when assistive technologies are loaded -Patch1: rh1648242-accessible_toolkit_crash_do_not_break_jvm.patch -# Restrict access to java-atk-wrapper classes -Patch2: rh1648644-java_access_bridge_privileged_security.patch -Patch3: rh649512-remove_uses_of_far_in_jpeg_libjpeg_turbo_1_4_compat_for_jdk10_and_up.patch # Depend on pcsc-lite-libs instead of pcsc-lite-devel as this is only in optional repo Patch6: rh1684077-openjdk_should_depend_on_pcsc-lite-libs_instead_of_pcsc-lite-devel.patch @@ -707,12 +694,27 @@ Patch1001: fips-17u-%{fipsver}.patch # ############################################# +# Currently empty + ############################################# # -# OpenJDK patches appearing in 17.0.8 +# OpenJDK patches appearing in 17.0.10 +# +############################################# +# JDK-8312489, OJ2095: Increase jdk.jar.maxSignatureFileSize default which is too low for JARs such as WhiteSource/Mend unified agent jar +Patch2000: jdk8312489-max_sig_default_increase.patch + +############################################# +# +# Portable build specific patches +# +############################################# + +############################################# +# +# OpenJDK patches targetted for 17.0.6 # ############################################# -Patch2003: jdk8305995-footprint_regression_from_jdk_8224957 BuildRequires: autoconf BuildRequires: automake @@ -722,11 +724,11 @@ BuildRequires: cups-devel BuildRequires: desktop-file-utils # elfutils only are OK for build without AOT BuildRequires: elfutils-devel +BuildRequires: file BuildRequires: fontconfig-devel -BuildRequires: freetype-devel %if (0%{?rhel} > 0 && 0%{?rhel} < 8) -BuildRequires: devtoolset-8-gcc -BuildRequires: devtoolset-8-gcc-c++ +BuildRequires: devtoolset-%{dtsversion}-gcc +BuildRequires: devtoolset-%{dtsversion}-gcc-c++ %else BuildRequires: gcc # gcc-c++ is already needed @@ -746,12 +748,11 @@ BuildRequires: libXrandr-devel BuildRequires: libXrender-devel BuildRequires: libXt-devel BuildRequires: libXtst-devel -# Requirement for setting up nss.cfg and nss.fips.cfg +# Requirement for setting up nss.cfg BuildRequires: nss-devel # Requirement for system security property test -%if (0%{?rhel} > 0 && 0%{?rhel} < 8) -BuildRequires: crypto-policies -%endif +# N/A for portable. RHEL7 doesn't provide them +#BuildRequires: crypto-policies BuildRequires: pkgconfig BuildRequires: xorg-x11-proto-devel BuildRequires: zip @@ -761,16 +762,18 @@ BuildRequires: unzip %if (0%{?rhel} > 0 && 0%{?rhel} < 8) # No javapackages-filesystem on el7,nor is needed for portables %else -BuildRequires: javapackages-filesystem +# BuildRequires: javapackages-filesystem BuildRequires: java-%{buildjdkver}-openjdk-devel %endif # Zero-assembler build requirement %ifarch %{zero_arches} BuildRequires: libffi-devel %endif +# Full documentation build requirements +BuildRequires: graphviz +BuildRequires: pandoc # 2023c required as of JDK-8305113 BuildRequires: tzdata-java >= 2023c - # cacerts build requirement in portable mode BuildRequires: ca-certificates # Earlier versions have a bug in tree vectorization on PPC @@ -789,18 +792,18 @@ BuildRequires: lcms2-devel BuildRequires: libjpeg-devel BuildRequires: libpng-devel %else -# Version in src/java.desktop/share/native/libfreetype/include/freetype/freetype.h -Provides: bundled(freetype) = 2.12.1 +# Version in src/java.desktop/share/legal/freetype.md +Provides: bundled(freetype) = 2.13.0 # Version in src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h Provides: bundled(giflib) = 5.2.1 # Version in src/java.desktop/share/native/libharfbuzz/hb-version.h -Provides: bundled(harfbuzz) = 4.4.1 +Provides: bundled(harfbuzz) = 7.2.0 # Version in src/java.desktop/share/native/liblcms/lcms2.h -Provides: bundled(lcms2) = 2.12.0 +Provides: bundled(lcms2) = 2.15.0 # Version in src/java.desktop/share/native/libjavajpeg/jpeglib.h Provides: bundled(libjpeg) = 6b # Version in src/java.desktop/share/native/libsplashscreen/libpng/png.h -Provides: bundled(libpng) = 1.6.37 +Provides: bundled(libpng) = 1.6.39 # We link statically against libstdc++ to increase portability BuildRequires: libstdc++-static %endif @@ -875,7 +878,7 @@ Group: Development/Tools %{java_devel_rpo -- %{fastdebug_suffix_unquoted}} %description devel-fastdebug -The %{origin_nice} %{featurever} development tools - portable edition. +The %{origin_nice} %{featurever} runtime environment and development tools - portable edition %{fastdebug_warning} %endif @@ -883,7 +886,7 @@ The %{origin_nice} %{featurever} development tools - portable edition. %if %{include_normal_build} %package static-libs -Summary: %{origin_nice} %{featurever} libraries for static linking - portable edition. +Summary: %{origin_nice} %{featurever} libraries for static linking - portable edition %{java_static_libs_rpo %{nil}} @@ -898,7 +901,7 @@ Summary: %{origin_nice} %{featurever} libraries for static linking - portable ed %{java_static_libs_rpo -- %{debug_suffix_unquoted}} %description static-libs-slowdebug -The %{origin_nice} %{featurever} libraries for static linking - portable edition. +The %{origin_nice} %{featurever} libraries for static linking - portable edition %{debug_warning} %endif @@ -909,13 +912,42 @@ Summary: %{origin_nice} %{featurever} libraries for static linking - portable ed %{java_static_libs_rpo -- %{fastdebug_suffix_unquoted}} %description static-libs-fastdebug -The %{origin_nice} %{featurever} libraries for static linking - portable edition. +The %{origin_nice} %{featurever} libraries for static linking - portable edition %{fastdebug_warning} %endif # staticlibs %endif +%if %{include_normal_build} +%package unstripped +Summary: The %{origin_nice} %{featurever} runtime environment. + +%{java_unstripped_rpo %{nil}} + +%description unstripped +The %{origin_nice} %{featurever} runtime environment. + +%endif + +%if %{include_normal_build} +%package docs +Summary: %{origin_nice} %{featurever} API documentation + +%{java_docs_rpo %{nil}} + +%description docs +The %{origin_nice} %{featurever} API documentation. + +%package misc +Summary: %{origin_nice} %{featurever} miscellany + +%{java_misc_rpo %{nil}} + +%description misc +The %{origin_nice} %{featurever} miscellany. +%endif + %package sources Summary: %{origin_nice} %{featurever} full patched sources of portable JDK @@ -951,7 +983,6 @@ else echo "include_fastdebug_build is %{include_fastdebug_build}, that is invalid. Use 1 for yes or 0 for no" exit 13 fi - if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 -a %{include_fastdebug_build} -eq 0 ] ; then echo "You have disabled all builds (normal,fastdebug,slowdebug). That is a no go." exit 14 @@ -980,17 +1011,18 @@ sh %{SOURCE12} %{top_level_dir_name} # Patch the JDK pushd %{top_level_dir_name} %patch1 -p1 -%patch2 -p1 %patch3 -p1 %patch6 -p1 # Add crypto policy and FIPS support %patch1001 -p1 # nss.cfg PKCS11 support; must come last as it also alters java.security %patch1000 -p1 -%patch2003 -p1 +# JDK-8312489 backport, coming in 17.0.10 +%patch2000 -p1 +# alt-java support +%patch600 -p1 popd # openjdk -%patch600 # The OpenJDK version file includes the current # upstream version information. For some reason, @@ -1009,37 +1041,12 @@ if [ "x${UPSTREAM_EA_DESIGNATOR}" != "x%{ea_designator}" ] ; then echo "WARNING: Designator mismatch"; echo "Spec file is configured for a %{build_type} build with designator '%{ea_designator}'" echo "Upstream version-pre setting is '${UPSTREAM_EA_DESIGNATOR}'"; - exit 17 + # Temporarily commented out as local copy of jdk-17.0.8+7 has the wrong setting + # This is fixed in the final upstream version + # exit 17 fi -# Extract systemtap tapsets -%if %{with_systemtap} -tar --strip-components=1 -x -I xz -f %{SOURCE8} -%if %{include_debug_build} -cp -r tapset tapset%{debug_suffix} -%endif -%if %{include_fastdebug_build} -cp -r tapset tapset%{fastdebug_suffix} -%endif - -for suffix in %{build_loop} ; do - for file in "tapset"$suffix/*.in; do - OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:-%{version}-%{release}.%{_arch}.stp:g"` - sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/server/libjvm.so:g" $file > $file.1 - sed -e "s:@JAVA_SPEC_VER@:%{javaver}:g" $file.1 > $file.2 -# TODO find out which architectures other than i686 have a client vm -%ifarch %{ix86} - sed -e "s:@ABS_CLIENT_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/client/libjvm.so:g" $file.2 > $OUTPUT_FILE -%else - sed -e "/@ABS_CLIENT_LIBJVM_SO@/d" $file.2 > $OUTPUT_FILE -%endif - sed -i -e "s:@ABS_JAVA_HOME_DIR@:%{_jvmdir}/%{sdkdir -- $suffix}:g" $OUTPUT_FILE - sed -i -e "s:@INSTALL_ARCH_DIR@:%{archinstall}:g" $OUTPUT_FILE - sed -i -e "s:@prefix@:%{_jvmdir}/%{sdkdir -- $suffix}/:g" $OUTPUT_FILE - done -done -# systemtap tapsets ends -%endif +# Systemtap is processed in rpms # Prepare desktop files # Portables do not have desktop integration @@ -1047,30 +1054,7 @@ done # Setup nss.cfg sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg -# Setup nss.fips.cfg -sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE17} > nss.fips.cfg - %build -%if (0%{?rhel} > 0 && 0%{?rhel} < 8) -mkdir bootjdk -pushd bootjdk -%ifarch %{aarch64} -tar --strip-components=1 -xf %{SOURCE1001} -%endif -%ifarch %{ppc64le} -tar --strip-components=1 -xf %{SOURCE1002} -%endif -%ifarch x86_64 -tar --strip-components=1 -xf %{SOURCE1003} -%endif -%ifarch s390x -tar --strip-components=1 -xf %{SOURCE1004} -%endif -BOOT_JDK=$PWD -popd -%else -BOOT_JDK=%{bootjdk} -%endif # How many CPU's do we have? export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :) @@ -1104,12 +1088,15 @@ EXTRA_CPP_FLAGS="$(echo ${EXTRA_CPP_FLAGS} | sed -e 's|-mstackrealign|-mincoming %endif export EXTRA_CFLAGS EXTRA_CPP_FLAGS +echo "Building %{newjavaver}-%{buildver}, pre=%{ea_designator}, opt=%{lts_designator}" + function buildjdk() { local outputdir=${1} local buildjdk=${2} local maketargets="${3}" local debuglevel=${4} local link_opt=${5} + local debug_symbols=${6} local top_dir_abs_src_path=$(pwd)/%{top_level_dir_name} local top_dir_abs_build_path=$(pwd)/${outputdir} @@ -1128,6 +1115,7 @@ function buildjdk() { echo "Using make targets: ${maketargets}" echo "Using debuglevel: ${debuglevel}" echo "Using link_opt: ${link_opt}" + echo "Using debug_symbols: ${debug_symbols}" echo "Building %{newjavaver}-%{buildver}, pre=%{ea_designator}, opt=%{lts_designator}" mkdir -p ${outputdir} @@ -1138,7 +1126,7 @@ function buildjdk() { # are always used in a system_libs build, even # for the static library build %if (0%{?rhel} > 0 && 0%{?rhel} < 8) - scl enable devtoolset-8 -- bash ${top_dir_abs_src_path}/configure \ + scl enable devtoolset-%{dtsversion} -- bash ${top_dir_abs_src_path}/configure \ %else bash ${top_dir_abs_src_path}/configure \ %endif @@ -1150,7 +1138,7 @@ function buildjdk() { %endif --with-version-build=%{buildver} \ --with-version-pre="%{ea_designator}" \ - --with-version-opt=%{lts_designator} \ + --with-version-opt="%{lts_designator}" \ --with-vendor-version-string="%{oj_vendor_version}" \ --with-vendor-name="%{oj_vendor}" \ --with-vendor-url="%{oj_vendor_url}" \ @@ -1158,7 +1146,7 @@ function buildjdk() { --with-vendor-vm-bug-url="%{oj_vendor_bug_url}" \ --with-boot-jdk=${buildjdk} \ --with-debug-level=${debuglevel} \ - --with-native-debug-symbols="%{debug_symbols}" \ + --with-native-debug-symbols="${debug_symbols}" \ --disable-sysconf-nss \ --enable-unlimited-crypto \ --with-zlib=%{link_type} \ @@ -1182,7 +1170,7 @@ function buildjdk() { cat spec.gmk %if (0%{?rhel} > 0 && 0%{?rhel} < 8) - scl enable devtoolset-8 -- make \ + scl enable devtoolset-%{dtsversion} -- make \ %else make \ %endif @@ -1190,311 +1178,325 @@ function buildjdk() { WARNINGS_ARE_ERRORS="-Wno-error" \ CFLAGS_WARNINGS_ARE_ERRORS="-Wno-error" \ $maketargets || ( pwd; find ${top_dir_abs_src_path} ${top_dir_abs_build_path} -name "hs_err_pid*.log" | xargs cat && false ) - popd } -function installjdk() { - local imagepath=${1} +function stripjdk() { + local outputdir=${1} + local jdkimagepath=${outputdir}/images/%{jdkimage} + local jreimagepath=${outputdir}/images/%{jreimage} + local jmodimagepath=${outputdir}/images/jmods + local supportdir=${outputdir}/support - if [ -d ${imagepath} ] ; then - # the build (erroneously) removes read permissions from some jars - # this is a regression in OpenJDK 7 (our compiler): - # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437 - find ${imagepath} -iname '*.jar' -exec chmod ugo+r {} \; + if [ "x$suffix" = "x" ] ; then + # Keep the unstripped version for consumption by RHEL RPMs + cp -a ${jdkimagepath}{,.unstripped} - # Build screws up permissions on binaries - # https://bugs.openjdk.java.net/browse/JDK-8173610 - find ${imagepath} -iname '*.so' -exec chmod +x {} \; - find ${imagepath}/bin/ -exec chmod +x {} \; - - # Install nss.cfg right away as we will be using the JRE above - install -m 644 nss.cfg ${imagepath}/conf/security/ - - # Install nss.fips.cfg: NSS configuration for global FIPS mode (crypto-policies) - install -m 644 nss.fips.cfg ${imagepath}/conf/security/ - - # Create fake alt-java as a placeholder for future alt-java - if [ -d man/man1 ] ; then - pushd ${imagepath} - # add alt-java man page - echo "Hardened java binary recommended for launching untrusted code from the Web e.g. javaws" > man/man1/%{alt_java_name}.1 - cat man/man1/java.1 >> man/man1/%{alt_java_name}.1 - popd - fi - fi -} - -# Checks on debuginfo must be performed before the files are stripped -# by the RPM installation stage -function debugcheckjdk() { - local imagepath=${1} - - if [ -d ${imagepath} ] ; then - - so_suffix="so" - # Check debug symbols are present and can identify code - find "${imagepath}" -iname "*.$so_suffix" -print0 | while read -d $'\0' lib - do - 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. - - # Test for .debug_* sections in the shared object. This is the main test - # Stripped objects will not contain these - eu-readelf -S "$lib" | grep "] .debug_" - test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2 - - # Test FILE symbols. These will most likely be removed by anything that - # manipulates symbol tables because it's generally useless. So a nice test - # that nothing has messed with symbols - old_IFS="$IFS" - IFS=$'\n' - for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT") - do - # We expect to see .cpp and .S files, except for architectures like aarch64 and - # s390 where we expect .o and .oS files - echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|S|oS))?$" - done - IFS="$old_IFS" - - # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking - if [ "`basename $lib`" = "libjvm.so" ]; then - eu-readelf -s "$lib" | \ - grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$" - fi - - # Test that there are no .gnu_debuglink sections pointing to another - # debuginfo file. There shouldn't be any debuginfo files, so the link makes - # no sense either - eu-readelf -S "$lib" | grep 'gnu' - if eu-readelf -S "$lib" | grep "\] .gnu_debuglink" | grep PROGBITS; then - echo "bad .gnu_debuglink section." - eu-readelf -x .gnu_debuglink "$lib" - false - fi + # Strip the files + for file in $(find ${jdkimagepath} ${jreimagepath} ${supportdir} -type f) ; do + if file ${file} | grep -q 'ELF'; then + noextfile=${file/.so/}; + objcopy --only-keep-debug ${file} ${noextfile}.debuginfo; + objcopy --add-gnu-debuglink=${noextfile}.debuginfo ${file}; + strip -g ${file}; fi done - # Make sure gdb can do a backtrace based on line numbers on libjvm.so - # javaCalls.cpp:58 should map to: - # http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58 - # Using line number 1 might cause build problems. See: - # https://bugzilla.redhat.com/show_bug.cgi?id=1539664 - # https://bugzilla.redhat.com/show_bug.cgi?id=1538767 - gdb -q "${imagepath}/bin/java" < ../%{jdkportablesourcesarchive -- ""}.sha256sum +function installjdk() { + local outputdir=${1} + local installdir=${2} + local jdkimagepath=${installdir}/images/%{jdkimage} + local jreimagepath=${installdir}/images/%{jreimage} + local unstripped=${jdkimagepath}.unstripped + + echo "Installing build from ${outputdir} to ${installdir}..." + mkdir -p ${installdir} + echo "Installing images..." + mv ${outputdir}/images ${installdir} + if [ -d ${outputdir}/bundles ] ; then + echo "Installing bundles..."; + mv ${outputdir}/bundles ${installdir} ; + fi + +%if !%{with artifacts} + echo "Removing output directory..."; + rm -rf ${outputdir} +%endif + + # legacy-jre-image target does not install any man pages for the JRE + # We copy the jdk man directory and then remove pages for binaries that + # don't exist in the JRE + cp -a ${jdkimagepath}/man ${jreimagepath} + for manpage in $(find ${jreimagepath}/man -name '*.1'); do + filename=$(basename ${manpage}); + binary=${filename/.1/}; + if [ ! -f ${jreimagepath}/bin/${binary} ] ; then + echo "Removing ${manpage} from JRE for which no binary ${binary} exists"; + rm -f ${manpage}; + fi; + done + + for imagepath in ${jdkimagepath} ${jreimagepath} ${unstripped}; do + + if [ -d ${imagepath} ] ; then + # the build (erroneously) removes read permissions from some jars + # this is a regression in OpenJDK 7 (our compiler): + # http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1437 + find ${imagepath} -iname '*.jar' -exec chmod ugo+r {} \; + + # Build screws up permissions on binaries + # https://bugs.openjdk.java.net/browse/JDK-8173610 + find ${imagepath} -iname '*.so' -exec chmod +x {} \; + find ${imagepath}/bin/ -exec chmod +x {} \; + + # Install local files which are distributed with the JDK + install -m 644 %{SOURCE10} ${imagepath} + install -m 644 nss.cfg ${imagepath}/conf/security/ + + # Create fake alt-java as a placeholder for future alt-java + pushd ${imagepath} + # add alt-java man page + echo "Hardened java binary recommended for launching untrusted code from the Web e.g. javaws" > man/man1/%{alt_java_name}.1 + cat man/man1/java.1 >> man/man1/%{alt_java_name}.1 + popd + + # Print release information + cat ${imagepath}/release + fi + done +} + +function genchecksum() { + local checkedfile=${1} + + checkdir=$(dirname ${1}) + checkfile=$(basename ${1}) + + echo "Generating checksum for ${checkfile} in ${checkdir}..." + pushd ${checkdir} + sha256sum ${checkfile} > ${checkfile}.sha256sum + sha256sum --check ${checkfile}.sha256sum + popd +} + +function packFullPatchedSources() { + srcpackagesdir=`pwd` + tar -cJf ${srcpackagesdir}/%{jdkportablesourcesarchive -- ""} --transform "s|^|%{jdkportablesourcesname -- ""}/|" %{top_level_dir_name} nss* + genchecksum ${srcpackagesdir}/%{jdkportablesourcesarchive -- ""} +} + +function packagejdk() { + local imagesdir=$(pwd)/${1}/images + local docdir=$(pwd)/${1}/images/docs + local bundledir=$(pwd)/${1}/bundles + local packagesdir=$(pwd)/${2} + local srcdir=$(pwd)/%{top_level_dir_name} + local tapsetdir=$(pwd)/tapset + + echo "Packaging build from ${imagesdir} to ${packagesdir}..." + mkdir -p ${packagesdir} + pushd ${imagesdir} + + if [ "x$suffix" = "x" ] ; then + nameSuffix="" + else + nameSuffix=`echo "$suffix"| sed s/-/./` + fi + + jdkname=%{jdkportablename -- "$nameSuffix"} + jdkarchive=${packagesdir}/%{jdkportablearchive -- "$nameSuffix"} + jrename=%{jreportablename -- "$nameSuffix"} + jrearchive=${packagesdir}/%{jreportablearchive -- "$nameSuffix"} + staticname=%{staticlibsportablename -- "$nameSuffix"} + staticarchive=${packagesdir}/%{staticlibsportablearchive -- "$nameSuffix"} + debugarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.debuginfo"} + unstrippedarchive=${packagesdir}/%{jdkportablearchive -- "${nameSuffix}.unstripped"} + if [ "x$suffix" = "x" ] ; then + docname=%{docportablename} + docarchive=${packagesdir}/%{docportablearchive} + built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip + fi + # These are from the source tree so no debug variants + miscname=%{miscportablename} + miscarchive=${packagesdir}/%{miscportablearchive} + + if [ "x$suffix" = "x" ] ; then + # Keep the unstripped version for consumption by RHEL RPMs + mv %{jdkimage}.unstripped ${jdkname} + tar -cJf ${unstrippedarchive} ${jdkname} + genchecksum ${unstrippedarchive} + mv ${jdkname} %{jdkimage}.unstripped + fi + + # Rename directories for packaging + mv %{jdkimage} ${jdkname} + mv %{jreimage} ${jrename} + + # Release images have external debug symbols + if [ "x$suffix" = "x" ] ; then + tar -cJf ${debugarchive} $(find ${jdkname} -name \*.debuginfo) + genchecksum ${debugarchive} + + mkdir ${docname} + mv ${docdir} ${docname} + mv ${bundledir}/${built_doc_archive} ${docname} + tar -cJf ${docarchive} ${docname} + genchecksum ${docarchive} + + mkdir ${miscname} + for s in 16 24 32 48 ; do + cp -av ${srcdir}/src/java.desktop/unix/classes/sun/awt/X11/java-icon${s}.png ${miscname} + done + cp -a ${srcdir}/src/sample ${miscname} +%if %{with_systemtap} + cp -a ${tapsetdir}* ${miscname} +%endif + tar -cJf ${miscarchive} ${miscname} + genchecksum ${miscarchive} + fi + + tar -cJf ${jdkarchive} --exclude='**.debuginfo' ${jdkname} + genchecksum ${jdkarchive} + + tar -cJf ${jrearchive} --exclude='**.debuginfo' ${jrename} + genchecksum ${jrearchive} + +%if %{include_staticlibs} + # Static libraries (needed for building graal vm with native image) + # Tar as overlay. Transform to the JDK name, since we just want to "add" + # static libraries to that folder + tar -cJf ${staticarchive} \ + --transform "s|^%{static_libs_image}/lib/*|${staticname}/lib/static/linux-%{archinstall}/glibc/|" "%{static_libs_image}/lib" + genchecksum ${staticarchive} +%endif + + # Revert directory renaming so testing will run + # TODO: testing should run on the packaged JDK + mv ${jdkname} %{jdkimage} + mv ${jrename} %{jreimage} + + popd #images + +} + +packFullPatchedSources %if %{build_hotspot_first} # Build a fresh libjvm.so first and use it to bootstrap cp -LR --preserve=mode,timestamps %{bootjdk} newboot systemjdk=$(pwd)/newboot - buildjdk build/newboot ${systemjdk} %{hotspot_target} "release" "bundled" - mv build/newboot/jdk/lib/server/libjvm.so newboot/lib/server + buildjdk build/newboot ${systemjdk} %{hotspot_target} "release" "bundled" "internal" + mv build/newboot/jdk/lib/%{vm_variant}/libjvm.so newboot/lib/%{vm_variant} %else systemjdk=%{bootjdk} %endif for suffix in %{build_loop} ; do + if [ "x$suffix" = "x" ] ; then debugbuild=release else # change --something to something debugbuild=`echo $suffix | sed "s/-//g"` fi - for loop in %{main_suffix} %{staticlibs_loop} ; do - builddir=%{buildoutputdir -- ${suffix}${loop}} - bootbuilddir=boot${builddir} - if test "x${loop}" = "x%{main_suffix}" ; then - link_opt="%{link_type}" + # We build with internal debug symbols and do + # our own stripping for one version of the + # release build + debug_symbols=internal + + builddir=%{buildoutputdir -- ${suffix}} + bootbuilddir=boot${builddir} + installdir=%{installoutputdir -- ${suffix}} + bootinstalldir=boot${installdir} + packagesdir=%{packageoutputdir -- ${suffix}} + + link_opt="%{link_type}" %if %{system_libs} - # Copy the source tree so we can remove all in-tree libraries - cp -a %{top_level_dir_name} %{top_level_dir_name_backup} - # Remove all libraries that are linked - sh %{SOURCE12} %{top_level_dir_name} full + # Copy the source tree so we can remove all in-tree libraries + cp -a %{top_level_dir_name} %{top_level_dir_name_backup} + # Remove all libraries that are linked + sh %{SOURCE12} %{top_level_dir_name} full %endif - # Debug builds don't need same targets as release for - # build speed-up. We also avoid bootstrapping these - # slower builds. - if echo $debugbuild | grep -q "debug" ; then - maketargets="%{debug_targets}" - run_bootstrap=false - else - maketargets="%{release_targets}" - run_bootstrap=%{bootstrap_build} - fi - if ${run_bootstrap} ; then - buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild} ${link_opt} - buildjdk ${builddir} $(pwd)/${bootbuilddir}/images/%{jdkimage} "${maketargets}" ${debugbuild} ${link_opt} - rm -rf ${bootbuilddir} - else - buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt} - fi + # Debug builds don't need same targets as release for + # build speed-up. We also avoid bootstrapping these + # slower builds. + if echo $debugbuild | grep -q "debug" ; then + maketargets="%{debug_targets}" + run_bootstrap=false + else + maketargets="%{release_targets}" + run_bootstrap=%{bootstrap_build} + fi + if ${run_bootstrap} ; then + buildjdk ${bootbuilddir} ${systemjdk} "%{bootstrap_targets}" ${debugbuild} ${link_opt} ${debug_symbols} + installjdk ${bootbuilddir} ${bootinstalldir} + buildjdk ${builddir} $(pwd)/${bootinstalldir}/images/%{jdkimage} "${maketargets}" ${debugbuild} ${link_opt} ${debug_symbols} + stripjdk ${builddir} + installjdk ${builddir} ${installdir} + %{!?with_artifacts:rm -rf ${bootinstalldir}} + else + buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt} ${debug_symbols} + stripjdk ${builddir} + installjdk ${builddir} ${installdir} + fi + packagejdk ${installdir} ${packagesdir} + %if %{system_libs} - # Restore original source tree we modified by removing full in-tree sources - rm -rf %{top_level_dir_name} - mv %{top_level_dir_name_backup} %{top_level_dir_name} + # Restore original source tree we modified by removing full in-tree sources + rm -rf %{top_level_dir_name} + mv %{top_level_dir_name_backup} %{top_level_dir_name} %endif - else - # Use bundled libraries for building statically - link_opt="bundled" - # Static library cycle only builds the static libraries - maketargets="%{static_libs_target}" - # Always just do the one build for the static libraries - buildjdk ${builddir} ${systemjdk} "${maketargets}" ${debugbuild} ${link_opt} - fi - - done # end of main / staticlibs loop - - # Final setup on the main image - top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}} - for image in %{jdkimage} %{jreimage} ; do - imagePath=${top_dir_abs_main_build_path}/images/${image} - installjdk ${imagePath} - done - # Check debug symbols were built into the dynamic libraries; todo, why it passes in JDK only? - debugcheckjdk ${top_dir_abs_main_build_path}/images/%{jdkimage} - - # Print release information - cat ${top_dir_abs_main_build_path}/images/%{jdkimage}/release - -################################################################################ - pushd ${top_dir_abs_main_build_path}/images - if [ "x$suffix" == "x" ] ; then - nameSuffix="" - else - nameSuffix=`echo "$suffix"| sed s/-/./` - fi - # additional steps needed for fluent repack; most of them done twice, as images are already populated - # maybe most of them should be done in upstream build? - for imagedir in %{jdkimage} %{jreimage} ; do - pushd $imagedir - # Convert man pages to UTF8 encoding - if [ -d man/man1 ] ; then # jre do not have man pages... - for manpage in man/man1/* ; do - iconv -f ISO_8859-1 -t UTF8 $manpage -o $manpage.tmp - mv -f $manpage.tmp $manpage - done - fi - # Install release notes - cp -a %{SOURCE10} `pwd` - cp -a %{SOURCE10} `pwd`/legal - # stabilize permissions; aprtially duplicated in instalojdk - find `pwd` -name "*.so" -exec chmod 755 {} \; -exec echo "set 755 to so {}" \; ; - find `pwd` -type d -exec chmod 755 {} \; -exec echo "set 755 to dir {}" \; ; - find `pwd`/legal -type f -exec chmod 644 {} \; -exec echo "set 644 to licences {}" \; ; - popd # jdkimage/jreimage - done # jre/sdk work in loop - # javadoc is done only for release sdkimage - if ! echo $suffix | grep -q "debug" ; then - # Install Javadoc documentation - #cp -a docs %{jdkimage} # not sure if the plaintext javadoc is for some use - built_doc_archive=jdk-%{filever}%{ea_designator_zip}+%{buildver}%{lts_designator_zip}-docs.zip - cp -a `pwd`/../bundles/${built_doc_archive} `pwd`/%{jdkimage}/javadocs.zip || ls -l `pwd`/../bundles - fi - # end of additional steps - - mv %{jdkimage} %{jdkportablename -- "$nameSuffix"} - mv %{jreimage} %{jreportablename -- "$nameSuffix"} - tar -cJf ../../../../%{jdkportablearchive -- "$nameSuffix"} --exclude='**.debuginfo' %{jdkportablename -- "$nameSuffix"} - sha256sum ../../../../%{jdkportablearchive -- "$nameSuffix"} > ../../../../%{jdkportablearchive -- "$nameSuffix"}.sha256sum - tar -cJf ../../../../%{jreportablearchive -- "$nameSuffix"} --exclude='**.debuginfo' %{jreportablename -- "$nameSuffix"} - sha256sum ../../../../%{jreportablearchive -- "$nameSuffix"} > ../../../../%{jreportablearchive -- "$nameSuffix"}.sha256sum - # copy licenses so they are avialable out of tarball - cp -rf %{jdkportablename -- "$nameSuffix"}/legal ../../../../%{jdkportablearchive -- "%{normal_suffix}"}-legal - mv %{jdkportablename -- "$nameSuffix"} %{jdkimage} - mv %{jreportablename -- "$nameSuffix"} %{jreimage} - popd #images -%if %{include_staticlibs} - top_dir_abs_staticlibs_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{staticlibs_suffix}} - pushd ${top_dir_abs_staticlibs_build_path}/images - # Static libraries (needed for building graal vm with native image) - # Tar as overlay. Transform to the JDK name, since we just want to "add" - # static libraries to that folder - portableJDKname=%{staticlibsportablename -- "$nameSuffix"} - tar -cJf ../../../../%{staticlibsportablearchive -- "$nameSuffix"} --transform "s|^%{static_libs_image}/lib/*|$portableJDKname/lib/static/linux-%{archinstall}/glibc/|" "%{static_libs_image}/lib" - sha256sum ../../../../%{staticlibsportablearchive -- "$nameSuffix"} > ../../../../%{staticlibsportablearchive -- "$nameSuffix"}.sha256sum - popd #staticlibs-images -%endif -################################################################################ -# note, currently no debuginfo, consult portbale spec for external (zipped) debuginfo, being tarred alone -################################################################################ # build cycles done # end of release / debug cycle loop -%install -mkdir -p $RPM_BUILD_ROOT%{_jvmdir} -mv ../%{jdkportablesourcesarchive -- ""} $RPM_BUILD_ROOT%{_jvmdir}/ -mv ../%{jdkportablesourcesarchive -- ""}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ - -for suffix in %{build_loop} ; do -top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}} - -################################################################################ - if [ "x$suffix" == "x" ] ; then - nameSuffix="" - else - nameSuffix=`echo "$suffix"| sed s/-/./` - fi - mv ../%{jdkportablearchive -- "$nameSuffix"} $RPM_BUILD_ROOT%{_jvmdir}/ - mv ../%{jdkportablearchive -- "$nameSuffix"}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ - mv ../%{jreportablearchive -- "$nameSuffix"} $RPM_BUILD_ROOT%{_jvmdir}/ - mv ../%{jreportablearchive -- "$nameSuffix"}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ -%if %{include_staticlibs} - mv ../%{staticlibsportablearchive -- "$nameSuffix"} $RPM_BUILD_ROOT%{_jvmdir}/ - mv ../%{staticlibsportablearchive -- "$nameSuffix"}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ -%endif - if [ "x$suffix" == "x" ] ; then - dnameSuffix="$nameSuffix".debuginfo -# todo handle debuginfo, see note at build (we will need to pack one stripped and one unstripped release build) -# mv ../%{jdkportablearchive -- "$dnameSuffix"} $RPM_BUILD_ROOT%{_jvmdir}/ -# mv ../%{jdkportablearchive -- "$dnameSuffix"}.sha256sum $RPM_BUILD_ROOT%{_jvmdir}/ - fi -################################################################################ -# end, dual install -done -################################################################################ -# the licenses are packed onloy once and shared -mkdir -p $RPM_BUILD_ROOT%{unpacked_licenses} -mv ../%{jdkportablearchive -- "%{normal_suffix}"}-legal $RPM_BUILD_ROOT%{unpacked_licenses}/%{jdkportablesourcesarchive -- "%{normal_suffix}"} -# To show sha in the build log -for file in `ls $RPM_BUILD_ROOT%{_jvmdir}/*.sha256sum` ; do ls -l $file ; cat $file ; done -################################################################################ - %check # We test debug first as it will give better diagnostics on a crash for suffix in %{build_loop} ; do -# Tests in the check stage are performed on the installed image -# rpmbuild operates as follows: build -> install -> test -# however in portbales, we test built image instead of installed one -top_dir_abs_main_build_path=$(pwd)/%{buildoutputdir -- ${suffix}%{main_suffix}} +# portable builds have static_libs embedded, thus top_dir_abs_main_build_path is same as top_dir_abs_staticlibs_build_path +top_dir_abs_main_build_path=$(pwd)/%{installoutputdir -- ${suffix}} +%if %{include_staticlibs} +top_dir_abs_staticlibs_build_path=${top_dir_abs_main_build_path} +%endif + export JAVA_HOME=${top_dir_abs_main_build_path}/images/%{jdkimage} -#check Shenandoah is enabled +# Pre-test setup + +# System security properties are disabled by default on portable. +# Turn on system security properties +#sed -i -e "s:^security.useSystemPropertiesFile=.*:security.useSystemPropertiesFile=true:" \ +#${JAVA_HOME}/conf/security/java.security + +# Check Shenandoah is enabled %if %{use_shenandoah_hotspot} $JAVA_HOME/bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -version %endif @@ -1507,14 +1509,19 @@ $JAVA_HOME/bin/java --add-opens java.base/javax.crypto=ALL-UNNAMED TestCryptoLev $JAVA_HOME/bin/javac -d . %{SOURCE14} $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||") -# Check system crypto (policy) is deactive and can not be enabled +# Check system crypto (policy) is active and can be disabled # Test takes a single argument - true or false - to state whether system # security properties are enabled or not. $JAVA_HOME/bin/javac -d . %{SOURCE15} export PROG=$(echo $(basename %{SOURCE15})|sed "s|\.java||") export SEC_DEBUG="-Djava.security.debug=properties" +# Specific to portable:System security properties to be off by default $JAVA_HOME/bin/java ${SEC_DEBUG} ${PROG} false -$JAVA_HOME/bin/java ${SEC_DEBUG} -Djava.security.disableSystemPropertiesFile=false ${PROG} false +$JAVA_HOME/bin/java ${SEC_DEBUG} -Djava.security.disableSystemPropertiesFile=true ${PROG} false + +# Check correct vendor values have been set +$JAVA_HOME/bin/javac -d . %{SOURCE16} +$JAVA_HOME/bin/java $(echo $(basename %{SOURCE16})|sed "s|\.java||") "%{oj_vendor}" "%{oj_vendor_url}" "%{oj_vendor_bug_url}" "%{oj_vendor_version}" # Check java launcher has no SSB mitigation if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi @@ -1526,14 +1533,10 @@ nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false; fi %endif -# Check correct vendor values have been set -$JAVA_HOME/bin/javac -d . %{SOURCE16} -$JAVA_HOME/bin/java $(echo $(basename %{SOURCE16})|sed "s|\.java||") "%{oj_vendor}" "%{oj_vendor_url}" "%{oj_vendor_bug_url}" "%{oj_vendor_version}" - %if ! 0%{?flatpak} # Check translations are available for new timezones (during flatpak builds, the # tzdb.dat used by this test is not where the test expects it, so this is -# disabled for flatpak builds) +# disabled for flatpak builds) $JAVA_HOME/bin/javac -d . %{SOURCE18} $JAVA_HOME/bin/java $(echo $(basename %{SOURCE18})|sed "s|\.java||") JRE $JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})|sed "s|\.java||") CLDR @@ -1541,9 +1544,83 @@ $JAVA_HOME/bin/java -Djava.locale.providers=CLDR $(echo $(basename %{SOURCE18})| %if %{include_staticlibs} # Check debug symbols in static libraries (smoke test) -export STATIC_LIBS_HOME=${top_dir_abs_main_build_path}/../../%{buildoutputdir -- ${suffix}%{staticlibs_suffix}}/images/static-libs/lib/ -readelf --debug-dump $STATIC_LIBS_HOME/libfdlibm.a | grep w_remainder.c -readelf --debug-dump $STATIC_LIBS_HOME/libfdlibm.a | grep e_remainder.c +export STATIC_LIBS_HOME=${top_dir_abs_staticlibs_build_path}/images/%{static_libs_image} +ls -l $STATIC_LIBS_HOME +ls -l $STATIC_LIBS_HOME/lib +# they are here, but grep do not find the remainders +#readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep w_remainder.c +#readelf --debug-dump $STATIC_LIBS_HOME/lib/libfdlibm.a | grep e_remainder.c +%endif + +# Release builds strip the debug symbols into external .debuginfo files +if [ "x$suffix" = "x" ] ; then + so_suffix="debuginfo" +else + so_suffix="so" +fi +# Check debug symbols are present and can identify code +find "$JAVA_HOME" -iname "*.$so_suffix" -print0 | while read -d $'\0' lib +do + 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. + + # Test for .debug_* sections in the shared object. This is the main test + # Stripped objects will not contain these + eu-readelf -S "$lib" | grep "] .debug_" + test $(eu-readelf -S "$lib" | grep -E "\]\ .debug_(info|abbrev)" | wc --lines) == 2 + + # Test FILE symbols. These will most likely be removed by anything that + # manipulates symbol tables because it's generally useless. So a nice test + # that nothing has messed with symbols + old_IFS="$IFS" + IFS=$'\n' + for line in $(eu-readelf -s "$lib" | grep "00000000 0 FILE LOCAL DEFAULT") + do + # We expect to see .cpp and .S files, except for architectures like aarch64 and + # s390 where we expect .o and .oS files + echo "$line" | grep -E "ABS ((.*/)?[-_a-zA-Z0-9]+\.(c|cc|cpp|cxx|o|S|oS))?$" + done + IFS="$old_IFS" + + # If this is the JVM, look for javaCalls.(cpp|o) in FILEs, for extra sanity checking + if [ "`basename $lib`" = "libjvm.so" ]; then + eu-readelf -s "$lib" | \ + grep -E "00000000 0 FILE LOCAL DEFAULT ABS javaCalls.(cpp|o)$" + fi + + # Test that there are no .gnu_debuglink sections pointing to another + # debuginfo file. There shouldn't be any debuginfo files, so the link makes + # no sense either + eu-readelf -S "$lib" | grep 'gnu' + if eu-readelf -S "$lib" | grep '] .gnu_debuglink' | grep PROGBITS; then + echo "bad .gnu_debuglink section." + eu-readelf -x .gnu_debuglink "$lib" + false + fi + fi +done + +# Make sure gdb can do a backtrace based on line numbers on libjvm.so +# javaCalls.cpp:58 should map to: +# http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/file/ff3b27e6bcc2/src/share/vm/runtime/javaCalls.cpp#l58 +# Using line number 1 might cause build problems. See: +# https://bugzilla.redhat.com/show_bug.cgi?id=1539664 +# https://bugzilla.redhat.com/show_bug.cgi?id=1538767 +gdb -q "$JAVA_HOME/bin/java" < - 1:17.0.9.0.9-2 +- updated to OpenJDK 17.0.9 (2023-10-17) +- adjsuted generate_source_tarball +- removed icedtea_sync +- dropped standalone licenses +- added usntripped subpkg +- added docs subpkg +- adjsuted versions of bundled libraries +- build refactored to several solid methods following gnu_andrew +- removed no longer needed jdk8305995-footprint_regression_from_jdk_8224957, nss.fips.cfg.in, rh1648644-java_access_bridge_privileged_security.patch +- added jdk8312489-max_sig_default_increase.patch +- aligned fips-17u-51e1d00be4e.patch (gnu_andrew) +- fixed '--without release' build-ability by moving docs and misc to if-release only + * Thu Aug 03 2023 Jiri Vanek - 1:17.0.8.0.7-1 - Update to jdk-17.0.8.0+7 - Update release notes to 17.0.8.0+7 diff --git a/jconsole.desktop.in b/jconsole.desktop.in index 8a3b04d..c1b8f6a 100644 --- a/jconsole.desktop.in +++ b/jconsole.desktop.in @@ -1,10 +1 @@ -[Desktop Entry] -Name=OpenJDK @JAVA_VER@ for @target_cpu@ Monitoring & Management Console (@OPENJDK_VER@) -Comment=Monitor and manage OpenJDK applications -Exec=_SDKBINDIR_/jconsole -Icon=java-@JAVA_VER@-@JAVA_VENDOR@ -Terminal=false -Type=Application -StartupWMClass=sun-tools-jconsole-JConsole -Categories=Development;Profiling;Java; -Version=1.0 +# this file is intentionally not here, as portable builds do not have desktop integration diff --git a/jdk8305995-footprint_regression_from_jdk_8224957 b/jdk8305995-footprint_regression_from_jdk_8224957 deleted file mode 100644 index a5119a0..0000000 --- a/jdk8305995-footprint_regression_from_jdk_8224957 +++ /dev/null @@ -1,1255 +0,0 @@ -diff --git a/src/hotspot/share/opto/node.cpp b/src/hotspot/share/opto/node.cpp -index 9a9d3f0149a..7c85e73989e 100644 ---- a/src/hotspot/share/opto/node.cpp -+++ b/src/hotspot/share/opto/node.cpp -@@ -1301,7 +1301,7 @@ bool Node::dominates(Node* sub, Node_List &nlist) { - } else if (sub == up && sub->is_Region() && sub->req() == 2) { - // Take in(1) path on the way up to 'dom' for regions with only one input - up = sub->in(1); -- } else if (sub == up && sub->is_Region() && sub->req() == 3) { -+ } else if (sub == up && sub->is_Region()) { - // Try both paths for Regions with 2 input paths (it may be a loop head). - // It could give conservative 'false' answer without information - // which region's input is the entry path. -diff --git a/test/micro/org/openjdk/bench/vm/compiler/RBTreeSearch.java b/test/micro/org/openjdk/bench/vm/compiler/RBTreeSearch.java -new file mode 100644 -index 00000000000..9b7430ccc13 ---- /dev/null -+++ b/test/micro/org/openjdk/bench/vm/compiler/RBTreeSearch.java -@@ -0,0 +1,1236 @@ -+/* -+ * Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved. -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+ * -+ * This code is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License version 2 only, as -+ * published by the Free Software Foundation. -+ * -+ * This code is distributed in the hope that it will be useful, but WITHOUT -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+ * version 2 for more details (a copy is included in the LICENSE file that -+ * accompanied this code). -+ * -+ * You should have received a copy of the GNU General Public License version -+ * 2 along with this work; if not, write to the Free Software Foundation, -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+ * or visit www.oracle.com if you need additional information or have any -+ * questions. -+ */ -+ -+package org.openjdk.bench.vm.compiler; -+ -+import org.openjdk.jmh.annotations.Benchmark; -+import org.openjdk.jmh.annotations.Fork; -+import org.openjdk.jmh.annotations.Measurement; -+import org.openjdk.jmh.annotations.OutputTimeUnit; -+import org.openjdk.jmh.annotations.Scope; -+import org.openjdk.jmh.annotations.State; -+import org.openjdk.jmh.annotations.Warmup; -+ -+import java.util.concurrent.TimeUnit; -+ -+/* -+ * This benchmark is used as easy reproducer of JDK-8305995 -+ * -+ * This benchmark contains simplified and minimized RB-tree -+ * which is based on fasutils with iterators that jumps. -+ * -+ * At the end it contains a tree serialized as lines, and -+ * maxPattern which is used to search in this tree. -+ */ -+@State(Scope.Thread) -+@OutputTimeUnit(TimeUnit.MICROSECONDS) -+@Warmup(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS) -+@Measurement(iterations = 4, time = 2, timeUnit = TimeUnit.SECONDS) -+@Fork(value = 3) -+public class RBTreeSearch { -+ -+ private final Tree pattern; -+ -+ private final Tree[] nodes; -+ -+ private final Tree root; -+ -+ private final int[] idxStack; -+ private final Tree[] objStack; -+ -+ public RBTreeSearch() { -+ idxStack = new int[maxPattern]; -+ -+ objStack = new Tree[maxPattern]; -+ -+ pattern = new Tree(); -+ for (int i = 0; i <= maxPattern; i++) { -+ pattern.put(i, i); -+ } -+ -+ nodes = new Tree[directions.length]; -+ for (int i = 0; i < directions.length; i++) { -+ if (directions[i] == null) { -+ continue; -+ } -+ Tree kids = new Tree(); -+ nodes[i] = kids; -+ for (String pair : directions[i].split(", ")) { -+ String[] kv = pair.split("=>"); -+ kids.put(Integer.parseInt(kv[0]), Integer.parseInt(kv[1])); -+ } -+ } -+ -+ root = nodes[0]; -+ } -+ -+ @Benchmark -+ public void search() { -+ Tree.Iterator sliceIt = pattern.keyIterator(); -+ -+ int stackSize = 0; -+ idxStack[stackSize] = pattern.firstIntKey(); -+ objStack[stackSize++] = root; -+ -+ while (stackSize > 0) { -+ stackSize--; -+ Tree node = objStack[stackSize]; -+ -+ final int startPoint = Math.max(idxStack[stackSize], node.firstIntKey()) - 1; -+ final Tree.Iterator rootIt = node.keyIterator(startPoint); -+ -+ sliceIt.jump(startPoint); -+ while (sliceIt.hasNext() && rootIt.hasNext()) { -+ final int sliceElem = sliceIt.nextInt(); -+ final int rootElem = rootIt.nextInt(); -+ if (sliceElem < rootElem) { -+ rootIt.previousInt(); -+ if (sliceIt.nextInt() >= rootElem) { -+ sliceIt.previousInt(); -+ } else { -+ sliceIt.jump(rootElem - 1); -+ } -+ } else if (sliceElem == rootElem) { -+ final int childrenIdx = node.get(sliceElem); -+ final Tree children = nodes[childrenIdx]; -+ -+ if (children != null) { -+ idxStack[stackSize] = sliceElem; -+ objStack[stackSize++] = children; -+ } -+ } -+ } -+ } -+ } -+ -+ public static class Tree { -+ -+ protected transient Entry root; -+ -+ protected transient Entry firstEntry; -+ -+ protected transient Entry lastEntry; -+ -+ private final transient boolean[] dirPath = new boolean[64]; -+ -+ private final transient Entry[] nodePath = new Entry[64]; -+ -+ public int put(final int k, final int v) { -+ Entry e = add(k); -+ final int oldValue = e.value; -+ e.value = v; -+ return oldValue; -+ } -+ -+ private Entry add(final int k) { -+ int maxDepth = 0; -+ Entry e; -+ if (root == null) { -+ e = root = lastEntry = firstEntry = new Entry(k, 0); -+ } -+ else { -+ Entry p = root; -+ int cmp, i = 0; -+ while(true) { -+ if ((cmp = Integer.compare(k, p.key)) == 0) { -+ while(i-- != 0) nodePath[i] = null; -+ return p; -+ } -+ nodePath[i] = p; -+ if (dirPath[i++] = cmp > 0) { -+ if (p.succ()) { -+ e = new Entry(k, 0); -+ if (p.right == null) lastEntry = e; -+ e.left = p; -+ e.right = p.right; -+ p.right(e); -+ break; -+ } -+ p = p.right; -+ } -+ else { -+ if (p.pred()) { -+ e = new Entry(k, 0); -+ if (p.left == null) firstEntry = e; -+ e.right = p; -+ e.left = p.left; -+ p.left(e); -+ break; -+ } -+ p = p.left; -+ } -+ } -+ maxDepth = i--; -+ while(i > 0 && ! nodePath[i].black()) { -+ if (! dirPath[i - 1]) { -+ Entry y = nodePath[i - 1].right; -+ if (! nodePath[i - 1].succ() && ! y.black()) { -+ nodePath[i].black(true); -+ y.black(true); -+ nodePath[i - 1].black(false); -+ i -= 2; -+ } -+ else { -+ Entry x; -+ if (! dirPath[i]) y = nodePath[i]; -+ else { -+ x = nodePath[i]; -+ y = x.right; -+ x.right = y.left; -+ y.left = x; -+ nodePath[i - 1].left = y; -+ if (y.pred()) { -+ y.pred(false); -+ x.succ(y); -+ } -+ } -+ x = nodePath[i - 1]; -+ x.black(false); -+ y.black(true); -+ x.left = y.right; -+ y.right = x; -+ if (i < 2) root = y; -+ else { -+ if (dirPath[i - 2]) nodePath[i - 2].right = y; -+ else nodePath[i - 2].left = y; -+ } -+ if (y.succ()) { -+ y.succ(false); -+ x.pred(y); -+ } -+ break; -+ } -+ } -+ else { -+ Entry y = nodePath[i - 1].left; -+ if (! nodePath[i - 1].pred() && ! y.black()) { -+ nodePath[i].black(true); -+ y.black(true); -+ nodePath[i - 1].black(false); -+ i -= 2; -+ } -+ else { -+ Entry x; -+ if (dirPath[i]) y = nodePath[i]; -+ else { -+ x = nodePath[i]; -+ y = x.left; -+ x.left = y.right; -+ y.right = x; -+ nodePath[i - 1].right = y; -+ if (y.succ()) { -+ y.succ(false); -+ x.pred(y); -+ } -+ } -+ x = nodePath[i - 1]; -+ x.black(false); -+ y.black(true); -+ x.right = y.left; -+ y.left = x; -+ if (i < 2) root = y; -+ else { -+ if (dirPath[i - 2]) nodePath[i - 2].right = y; -+ else nodePath[i - 2].left = y; -+ } -+ if (y.pred()){ -+ y.pred(false); -+ x.succ(y); -+ } -+ break; -+ } -+ } -+ } -+ } -+ root.black(true); -+ while(maxDepth-- != 0) nodePath[maxDepth] = null; -+ return e; -+ } -+ -+ private static final class Entry { -+ int key; -+ int value; -+ -+ private static final int BLACK_MASK = 1; -+ -+ private static final int SUCC_MASK = 1 << 31; -+ -+ private static final int PRED_MASK = 1 << 30; -+ -+ Entry left, right; -+ -+ int info; -+ -+ Entry(final int k, final int v) { -+ key = k; -+ value = v; -+ info = SUCC_MASK | PRED_MASK; -+ } -+ -+ Entry left() { -+ return (info & PRED_MASK) != 0 ? null : left; -+ } -+ -+ Entry right() { -+ return (info & SUCC_MASK) != 0 ? null : right; -+ } -+ -+ boolean pred() { -+ return (info & PRED_MASK) != 0; -+ } -+ -+ boolean succ() { -+ return (info & SUCC_MASK) != 0; -+ } -+ -+ void pred(final boolean pred) { -+ if (pred) info |= PRED_MASK; -+ else info &= ~PRED_MASK; -+ } -+ -+ void succ(final boolean succ) { -+ if (succ) info |= SUCC_MASK; -+ else info &= ~SUCC_MASK; -+ } -+ -+ void pred(final Entry pred) { -+ info |= PRED_MASK; -+ left = pred; -+ } -+ -+ void succ(final Entry succ) { -+ info |= SUCC_MASK; -+ right = succ; -+ } -+ -+ void left(final Entry left) { -+ info &= ~PRED_MASK; -+ this.left = left; -+ } -+ -+ void right(final Entry right) { -+ info &= ~SUCC_MASK; -+ this.right = right; -+ } -+ -+ boolean black() { -+ return (info & BLACK_MASK) != 0; -+ } -+ -+ void black(final boolean black) { -+ if (black) info |= BLACK_MASK; -+ else info &= ~BLACK_MASK; -+ } -+ -+ Entry next() { -+ Entry next = this.right; -+ if ((info & SUCC_MASK) == 0) while ((next.info & PRED_MASK) == 0) next = next.left; -+ return next; -+ } -+ -+ Entry prev() { -+ Entry prev = this.left; -+ if ((info & PRED_MASK) == 0) while ((prev.info & SUCC_MASK) == 0) prev = prev.right; -+ return prev; -+ } -+ } -+ -+ public int get(final int k) { -+ Entry e = root; -+ int cmp; -+ while (e != null && (cmp = Integer.compare(k, e.key)) != 0) { -+ e = cmp < 0 ? e.left() : e.right(); -+ } -+ return e == null ? 0 : e.value; -+ } -+ -+ public int firstIntKey() { -+ return firstEntry.key; -+ } -+ -+ interface Iterator { -+ boolean hasNext(); -+ int nextInt(); -+ int previousInt(); -+ void jump(final int fromElement); -+ } -+ -+ private class KeyIteratorImpl implements Iterator { -+ Entry prev; -+ -+ Entry next; -+ -+ Entry curr; -+ -+ int index = 0; -+ -+ KeyIteratorImpl() { -+ next = firstEntry; -+ } -+ -+ KeyIteratorImpl(final int k) { -+ if ((next = locateKey(k)) != null) { -+ if (next.key <= k) { -+ prev = next; -+ next = next.next(); -+ } -+ else prev = next.prev(); -+ } -+ } -+ -+ private Entry locateKey(final int k) { -+ Entry e = root, last = root; -+ int cmp = 0; -+ while (e != null && (cmp = Integer.compare(k, e.key)) != 0) { -+ last = e; -+ e = cmp < 0 ? e.left() : e.right(); -+ } -+ return cmp == 0 ? e : last; -+ } -+ -+ public boolean hasNext() { return next != null; } -+ -+ Entry nextEntry() { -+ curr = prev = next; -+ index++; -+ next = next.next(); -+ return curr; -+ } -+ -+ Entry previousEntry() { -+ curr = next = prev; -+ index--; -+ prev = prev.prev(); -+ return curr; -+ } -+ public void jump(final int fromElement) { -+ if ((next = locateKey(fromElement)) != null) { -+ if (next.key <= fromElement) { -+ prev = next; -+ next = next.next(); -+ } -+ else prev = next.prev(); -+ } -+ } -+ -+ public int nextInt() { return nextEntry().key; } -+ -+ public int previousInt() { return previousEntry().key; } -+ -+ } -+ -+ public Iterator keyIterator() { -+ return new KeyIteratorImpl(); -+ } -+ -+ public Iterator keyIterator(final int from) { -+ return new KeyIteratorImpl(from); -+ } -+ } -+ -+ private static final int maxPattern = 39; -+ -+ private static final String[] directions = { -+ "0=>1, 1=>4, 2=>2, 4=>3, 7=>5", -+ "13=>628, 14=>627, 15=>626, 17=>629, 18=>630", -+ "13=>473, 14=>472, 15=>471, 17=>474, 18=>475", -+ "13=>318, 14=>317, 15=>316, 17=>319, 18=>320", -+ "13=>163, 14=>162, 15=>161, 17=>164, 18=>165", -+ "13=>8, 14=>7, 15=>6, 17=>9, 18=>10", -+ "22=>135, 23=>134, 24=>132, 26=>133, 27=>131", -+ "22=>105, 23=>104, 24=>102, 26=>103, 27=>101", -+ "22=>75, 23=>74, 24=>72, 26=>73, 27=>71", -+ "22=>45, 23=>44, 24=>42, 26=>43, 27=>41", -+ "22=>15, 23=>14, 24=>12, 26=>13, 27=>11", -+ "31=>38, 32=>39, 33=>36, 34=>40, 35=>37", -+ "31=>33, 32=>34, 33=>31, 34=>35, 35=>32", -+ "31=>28, 32=>29, 33=>26, 34=>30, 35=>27", -+ "31=>23, 32=>24, 33=>21, 34=>25, 35=>22", -+ "31=>18, 32=>19, 33=>16, 34=>20, 35=>17", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>68, 32=>69, 33=>66, 34=>70, 35=>67", -+ "31=>63, 32=>64, 33=>61, 34=>65, 35=>62", -+ "31=>58, 32=>59, 33=>56, 34=>60, 35=>57", -+ "31=>53, 32=>54, 33=>51, 34=>55, 35=>52", -+ "31=>48, 32=>49, 33=>46, 34=>50, 35=>47", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>98, 32=>99, 33=>96, 34=>100, 35=>97", -+ "31=>93, 32=>94, 33=>91, 34=>95, 35=>92", -+ "31=>88, 32=>89, 33=>86, 34=>90, 35=>87", -+ "31=>83, 32=>84, 33=>81, 34=>85, 35=>82", -+ "31=>78, 32=>79, 33=>76, 34=>80, 35=>77", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>128, 32=>129, 33=>126, 34=>130, 35=>127", -+ "31=>123, 32=>124, 33=>121, 34=>125, 35=>122", -+ "31=>118, 32=>119, 33=>116, 34=>120, 35=>117", -+ "31=>113, 32=>114, 33=>111, 34=>115, 35=>112", -+ "31=>108, 32=>109, 33=>106, 34=>110, 35=>107", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>158, 32=>159, 33=>156, 34=>160, 35=>157", -+ "31=>153, 32=>154, 33=>151, 34=>155, 35=>152", -+ "31=>148, 32=>149, 33=>146, 34=>150, 35=>147", -+ "31=>143, 32=>144, 33=>141, 34=>145, 35=>142", -+ "31=>138, 32=>139, 33=>136, 34=>140, 35=>137", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "22=>290, 23=>289, 24=>287, 26=>288, 27=>286", -+ "22=>260, 23=>259, 24=>257, 26=>258, 27=>256", -+ "22=>230, 23=>229, 24=>227, 26=>228, 27=>226", -+ "22=>200, 23=>199, 24=>197, 26=>198, 27=>196", -+ "22=>170, 23=>169, 24=>167, 26=>168, 27=>166", -+ "31=>193, 32=>194, 33=>191, 34=>195, 35=>192", -+ "31=>188, 32=>189, 33=>186, 34=>190, 35=>187", -+ "31=>183, 32=>184, 33=>181, 34=>185, 35=>182", -+ "31=>178, 32=>179, 33=>176, 34=>180, 35=>177", -+ "31=>173, 32=>174, 33=>171, 34=>175, 35=>172", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>223, 32=>224, 33=>221, 34=>225, 35=>222", -+ "31=>218, 32=>219, 33=>216, 34=>220, 35=>217", -+ "31=>213, 32=>214, 33=>211, 34=>215, 35=>212", -+ "31=>208, 32=>209, 33=>206, 34=>210, 35=>207", -+ "31=>203, 32=>204, 33=>201, 34=>205, 35=>202", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>253, 32=>254, 33=>251, 34=>255, 35=>252", -+ "31=>248, 32=>249, 33=>246, 34=>250, 35=>247", -+ "31=>243, 32=>244, 33=>241, 34=>245, 35=>242", -+ "31=>238, 32=>239, 33=>236, 34=>240, 35=>237", -+ "31=>233, 32=>234, 33=>231, 34=>235, 35=>232", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>283, 32=>284, 33=>281, 34=>285, 35=>282", -+ "31=>278, 32=>279, 33=>276, 34=>280, 35=>277", -+ "31=>273, 32=>274, 33=>271, 34=>275, 35=>272", -+ "31=>268, 32=>269, 33=>266, 34=>270, 35=>267", -+ "31=>263, 32=>264, 33=>261, 34=>265, 35=>262", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>313, 32=>314, 33=>311, 34=>315, 35=>312", -+ "31=>308, 32=>309, 33=>306, 34=>310, 35=>307", -+ "31=>303, 32=>304, 33=>301, 34=>305, 35=>302", -+ "31=>298, 32=>299, 33=>296, 34=>300, 35=>297", -+ "31=>293, 32=>294, 33=>291, 34=>295, 35=>292", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "22=>445, 23=>444, 24=>442, 26=>443, 27=>441", -+ "22=>415, 23=>414, 24=>412, 26=>413, 27=>411", -+ "22=>385, 23=>384, 24=>382, 26=>383, 27=>381", -+ "22=>355, 23=>354, 24=>352, 26=>353, 27=>351", -+ "22=>325, 23=>324, 24=>322, 26=>323, 27=>321", -+ "31=>348, 32=>349, 33=>346, 34=>350, 35=>347", -+ "31=>343, 32=>344, 33=>341, 34=>345, 35=>342", -+ "31=>338, 32=>339, 33=>336, 34=>340, 35=>337", -+ "31=>333, 32=>334, 33=>331, 34=>335, 35=>332", -+ "31=>328, 32=>329, 33=>326, 34=>330, 35=>327", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>378, 32=>379, 33=>376, 34=>380, 35=>377", -+ "31=>373, 32=>374, 33=>371, 34=>375, 35=>372", -+ "31=>368, 32=>369, 33=>366, 34=>370, 35=>367", -+ "31=>363, 32=>364, 33=>361, 34=>365, 35=>362", -+ "31=>358, 32=>359, 33=>356, 34=>360, 35=>357", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>408, 32=>409, 33=>406, 34=>410, 35=>407", -+ "31=>403, 32=>404, 33=>401, 34=>405, 35=>402", -+ "31=>398, 32=>399, 33=>396, 34=>400, 35=>397", -+ "31=>393, 32=>394, 33=>391, 34=>395, 35=>392", -+ "31=>388, 32=>389, 33=>386, 34=>390, 35=>387", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>438, 32=>439, 33=>436, 34=>440, 35=>437", -+ "31=>433, 32=>434, 33=>431, 34=>435, 35=>432", -+ "31=>428, 32=>429, 33=>426, 34=>430, 35=>427", -+ "31=>423, 32=>424, 33=>421, 34=>425, 35=>422", -+ "31=>418, 32=>419, 33=>416, 34=>420, 35=>417", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>468, 32=>469, 33=>466, 34=>470, 35=>467", -+ "31=>463, 32=>464, 33=>461, 34=>465, 35=>462", -+ "31=>458, 32=>459, 33=>456, 34=>460, 35=>457", -+ "31=>453, 32=>454, 33=>451, 34=>455, 35=>452", -+ "31=>448, 32=>449, 33=>446, 34=>450, 35=>447", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "22=>600, 23=>599, 24=>597, 26=>598, 27=>596", -+ "22=>570, 23=>569, 24=>567, 26=>568, 27=>566", -+ "22=>540, 23=>539, 24=>537, 26=>538, 27=>536", -+ "22=>510, 23=>509, 24=>507, 26=>508, 27=>506", -+ "22=>480, 23=>479, 24=>477, 26=>478, 27=>476", -+ "31=>503, 32=>504, 33=>501, 34=>505, 35=>502", -+ "31=>498, 32=>499, 33=>496, 34=>500, 35=>497", -+ "31=>493, 32=>494, 33=>491, 34=>495, 35=>492", -+ "31=>488, 32=>489, 33=>486, 34=>490, 35=>487", -+ "31=>483, 32=>484, 33=>481, 34=>485, 35=>482", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>533, 32=>534, 33=>531, 34=>535, 35=>532", -+ "31=>528, 32=>529, 33=>526, 34=>530, 35=>527", -+ "31=>523, 32=>524, 33=>521, 34=>525, 35=>522", -+ "31=>518, 32=>519, 33=>516, 34=>520, 35=>517", -+ "31=>513, 32=>514, 33=>511, 34=>515, 35=>512", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>563, 32=>564, 33=>561, 34=>565, 35=>562", -+ "31=>558, 32=>559, 33=>556, 34=>560, 35=>557", -+ "31=>553, 32=>554, 33=>551, 34=>555, 35=>552", -+ "31=>548, 32=>549, 33=>546, 34=>550, 35=>547", -+ "31=>543, 32=>544, 33=>541, 34=>545, 35=>542", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>593, 32=>594, 33=>591, 34=>595, 35=>592", -+ "31=>588, 32=>589, 33=>586, 34=>590, 35=>587", -+ "31=>583, 32=>584, 33=>581, 34=>585, 35=>582", -+ "31=>578, 32=>579, 33=>576, 34=>580, 35=>577", -+ "31=>573, 32=>574, 33=>571, 34=>575, 35=>572", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>623, 32=>624, 33=>621, 34=>625, 35=>622", -+ "31=>618, 32=>619, 33=>616, 34=>620, 35=>617", -+ "31=>613, 32=>614, 33=>611, 34=>615, 35=>612", -+ "31=>608, 32=>609, 33=>606, 34=>610, 35=>607", -+ "31=>603, 32=>604, 33=>601, 34=>605, 35=>602", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "22=>755, 23=>754, 24=>752, 26=>753, 27=>751", -+ "22=>725, 23=>724, 24=>722, 26=>723, 27=>721", -+ "22=>695, 23=>694, 24=>692, 26=>693, 27=>691", -+ "22=>665, 23=>664, 24=>662, 26=>663, 27=>661", -+ "22=>635, 23=>634, 24=>632, 26=>633, 27=>631", -+ "31=>658, 32=>659, 33=>656, 34=>660, 35=>657", -+ "31=>653, 32=>654, 33=>651, 34=>655, 35=>652", -+ "31=>648, 32=>649, 33=>646, 34=>650, 35=>647", -+ "31=>643, 32=>644, 33=>641, 34=>645, 35=>642", -+ "31=>638, 32=>639, 33=>636, 34=>640, 35=>637", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>688, 32=>689, 33=>686, 34=>690, 35=>687", -+ "31=>683, 32=>684, 33=>681, 34=>685, 35=>682", -+ "31=>678, 32=>679, 33=>676, 34=>680, 35=>677", -+ "31=>673, 32=>674, 33=>671, 34=>675, 35=>672", -+ "31=>668, 32=>669, 33=>666, 34=>670, 35=>667", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>718, 32=>719, 33=>716, 34=>720, 35=>717", -+ "31=>713, 32=>714, 33=>711, 34=>715, 35=>712", -+ "31=>708, 32=>709, 33=>706, 34=>710, 35=>707", -+ "31=>703, 32=>704, 33=>701, 34=>705, 35=>702", -+ "31=>698, 32=>699, 33=>696, 34=>700, 35=>697", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>748, 32=>749, 33=>746, 34=>750, 35=>747", -+ "31=>743, 32=>744, 33=>741, 34=>745, 35=>742", -+ "31=>738, 32=>739, 33=>736, 34=>740, 35=>737", -+ "31=>733, 32=>734, 33=>731, 34=>735, 35=>732", -+ "31=>728, 32=>729, 33=>726, 34=>730, 35=>727", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ "31=>778, 32=>779, 33=>776, 34=>780, 35=>777", -+ "31=>773, 32=>774, 33=>771, 34=>775, 35=>772", -+ "31=>768, 32=>769, 33=>766, 34=>770, 35=>767", -+ "31=>763, 32=>764, 33=>761, 34=>765, 35=>762", -+ "31=>758, 32=>759, 33=>756, 34=>760, 35=>757", -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null, -+ null -+ }; -+} diff --git a/jdk8312489-max_sig_default_increase.patch b/jdk8312489-max_sig_default_increase.patch new file mode 100644 index 0000000..8aeb261 --- /dev/null +++ b/jdk8312489-max_sig_default_increase.patch @@ -0,0 +1,50 @@ +commit 5b613e3ebed6c141146e743e64c894fe4f39421e +Author: Andrew John Hughes +Date: Fri Sep 1 15:53:41 2023 +0000 + + 8312489: Increase jdk.jar.maxSignatureFileSize default which is too low for JARs such as WhiteSource/Mend unified agent jar + + Backport-of: e47a84f23dd2608c6f5748093eefe301fb5bf750 + +diff --git a/src/java.base/share/classes/java/util/jar/JarFile.java b/src/java.base/share/classes/java/util/jar/JarFile.java +index bd538649a4f..70cf99504e4 100644 +--- a/src/java.base/share/classes/java/util/jar/JarFile.java ++++ b/src/java.base/share/classes/java/util/jar/JarFile.java +@@ -803,7 +803,9 @@ private byte[] getBytes(ZipEntry ze) throws IOException { + throw new IOException("Unsupported size: " + uncompressedSize + + " for JarEntry " + ze.getName() + + ". Allowed max size: " + +- SignatureFileVerifier.MAX_SIG_FILE_SIZE + " bytes"); ++ SignatureFileVerifier.MAX_SIG_FILE_SIZE + " bytes. " + ++ "You can use the jdk.jar.maxSignatureFileSize " + ++ "system property to increase the default value."); + } + int len = (int)uncompressedSize; + int bytesRead; +diff --git a/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java b/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java +index 4ea9255ba0a..05acdcb9474 100644 +--- a/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java ++++ b/src/java.base/share/classes/sun/security/util/SignatureFileVerifier.java +@@ -856,16 +856,16 @@ private static int initializeMaxSigFileSize() { + * the maximum allowed number of bytes for the signature-related files + * in a JAR file. + */ +- Integer tmp = GetIntegerAction.privilegedGetProperty( +- "jdk.jar.maxSignatureFileSize", 8000000); ++ int tmp = GetIntegerAction.privilegedGetProperty( ++ "jdk.jar.maxSignatureFileSize", 16000000); + if (tmp < 0 || tmp > MAX_ARRAY_SIZE) { + if (debug != null) { +- debug.println("Default signature file size 8000000 bytes " + +- "is used as the specified size for the " + +- "jdk.jar.maxSignatureFileSize system property " + ++ debug.println("The default signature file size of 16000000 bytes " + ++ "will be used for the jdk.jar.maxSignatureFileSize " + ++ "system property since the specified value " + + "is out of range: " + tmp); + } +- tmp = 8000000; ++ tmp = 16000000; + } + return tmp; + } diff --git a/nss.fips.cfg.in b/nss.fips.cfg.in deleted file mode 100644 index 2d9ec35..0000000 --- a/nss.fips.cfg.in +++ /dev/null @@ -1,8 +0,0 @@ -name = NSS-FIPS -nssLibraryDirectory = @NSS_LIBDIR@ -nssSecmodDirectory = sql:/etc/pki/nssdb -nssDbMode = readOnly -nssModule = fips - -attributes(*,CKO_SECRET_KEY,CKK_GENERIC_SECRET)={ CKA_SIGN=true } - diff --git a/openjdk_news.sh b/openjdk_news.sh index 560b356..386aa53 100755 --- a/openjdk_news.sh +++ b/openjdk_news.sh @@ -18,8 +18,8 @@ OLD_RELEASE=$1 NEW_RELEASE=$2 -SUBDIR=$3 -REPO=$4 +REPO=$3 +SUBDIR=$4 SCRIPT_DIR=$(dirname ${0}) if test "x${SUBDIR}" = "x"; then diff --git a/rh1648644-java_access_bridge_privileged_security.patch b/rh1648644-java_access_bridge_privileged_security.patch deleted file mode 100644 index 53026ad..0000000 --- a/rh1648644-java_access_bridge_privileged_security.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- openjdk/src/java.base/share/conf/security/java.security -+++ openjdk/src/java.base/share/conf/security/java.security -@@ -304,6 +304,8 @@ - # - package.access=sun.misc.,\ - sun.reflect.,\ -+ org.GNOME.Accessibility.,\ -+ org.GNOME.Bonobo.,\ - - # - # List of comma-separated packages that start with or equal this string -@@ -316,6 +318,8 @@ - # - package.definition=sun.misc.,\ - sun.reflect.,\ -+ org.GNOME.Accessibility.,\ -+ org.GNOME.Bonobo.,\ - - # - # Determines whether this properties file can be appended to diff --git a/sources b/sources index 47996d1..0c780d7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (openjdk-jdk17u-jdk-17.0.8+7.tar.xz) = 52bd1002cffafc6fc613b3ee1c62bfc3f27f31d5e1810ebb8f556a725ebb310508885762079589f15be5da63388214525128b77d2a665bae9fccfc419ab5d6a1 +SHA512 (openjdk-17.0.9+9.tar.xz) = 33225a1070077c9504b4857734305f301e51b93a929274d460ddc3dc042ce15943030f8af928c11962743a928619ea39daa453d8fb1c8ea5a334a4b6490a00ee