From 292215c478c53cae3982d67d8c9593ccda19fec2 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Sun, 19 Oct 2025 16:40:52 +0200 Subject: [PATCH] Moved to 10.0 and made buildable. Runteim tests ahead --- .gitignore | 1 + java-runtime-decompiler.spec | 35 ++++++++----------- removeMultilineSpotbugs.patch | 65 ----------------------------------- rsyntaxVersion.patch | 4 +-- sources | 2 +- systemCfr.patch | 2 +- systemFernflower.patch | 2 +- systemJasm.patch | 2 +- systemJasmG.patch | 2 +- systemJcoder.patch | 2 +- systemJcoderG.patch | 2 +- systemProcyon.patch | 4 +-- systemProcyonAssembler.patch | 4 +-- 13 files changed, 29 insertions(+), 98 deletions(-) delete mode 100644 removeMultilineSpotbugs.patch diff --git a/.gitignore b/.gitignore index c37ccde..b19ba68 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /java-runtime-decompiler-7.3.tar.gz /java-runtime-decompiler-8.0.tar.gz /java-runtime-decompiler-9.1.tar.gz +/java-runtime-decompiler-10.0.tar.gz diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 5b4bc5e..b906b8c 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,8 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 9.1 +Version: 10.0 Release: %autorelease -# Automatically converted from old format: GPLv3 - review is highly recommended. License: GPL-3.0-only URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz @@ -22,7 +21,6 @@ Patch6: systemJcoder.patch Patch61: systemJcoder7.patch Patch62: systemJcoderG.patch Patch63: systemJcoderG7.patch -Patch7: removeMultilineSpotbugs.patch BuildArch: noarch ExclusiveArch: %{java_arches} noarch @@ -31,8 +29,6 @@ BuildRequires: byteman BuildRequires: rsyntaxtextarea BuildRequires: junit5 BuildRequires: ant-junit5 -BuildRequires: junit -BuildRequires: ant-junit BuildRequires: java-diff-utils BuildRequires: maven-surefire-provider-junit BuildRequires: maven-surefire-provider-junit5 @@ -111,22 +107,21 @@ This package provides bindings and requirements to asmtools7 disassembler and as %prep %setup -q -n %{name}-%{name}-%{version} -%patch 1 -p0 -%patch 2 -p0 -%patch 21 -p0 -%patch 3 -p0 -%patch 4 -p0 -%patch 5 -p0 -%patch 51 -p0 -%patch 52 -p0 -%patch 53 -p0 -%patch 6 -p0 -%patch 61 -p0 -%patch 62 -p0 -%patch 63 -p0 -%patch 7 -p1 +%patch -P1 -p0 +%patch -P2 -p0 +%patch -P21 -p0 +%patch -P3 -p0 +%patch -P4 -p0 +%patch -P5 -p0 +%patch -P51 -p0 +%patch -P52 -p0 +%patch -P53 -p0 +%patch -P6 -p0 +%patch -P61 -p0 +%patch -P62 -p0 +%patch -P63 -p0 -%java_remove_annotations decompiler_agent runtime-decompiler -s -n SuppressFBWarnings +jurand -i -s -a -n SuppressFBWarnings decompiler_agent runtime-decompiler %build pushd runtime-decompiler diff --git a/removeMultilineSpotbugs.patch b/removeMultilineSpotbugs.patch deleted file mode 100644 index f8ddbb9..0000000 --- a/removeMultilineSpotbugs.patch +++ /dev/null @@ -1,65 +0,0 @@ ---- a/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java -+++ a/runtime-decompiler/src/main/java/org/jrd/backend/core/XDecompilerRequestReceiver.java -@@ -262,10 +262,6 @@ - private static class ClassesComparator implements Comparator, Serializable { - - @SuppressWarnings({"ReturnCount", "CyclomaticComplexity"}) // comparator syntax -- @SuppressFBWarnings( -- value = "NP_NULL_ON_SOME_PATH_MIGHT_BE_INFEASIBLE", -- justification = "False report of possible NP dereference, despite testing both o1 & o2 for nullness." -- ) - @Override - public int compare(ClassInfo c1, ClassInfo c2) { - if (c1 == null && c2 == null) { ---- a/runtime-decompiler/src/main/java/org/jrd/backend/data/VmInfo.java -+++ a/runtime-decompiler/src/main/java/org/jrd/backend/data/XVmInfo.java -@@ -112,10 +112,6 @@ - this.type = local; - } - -- @SuppressFBWarnings( -- value = "NP_LOAD_OF_KNOWN_NULL_VALUE", -- justification = "Classpath is only used for FS VMs, in other cases getCp() does not get called" -- ) - public void setCp(List cp) { - if (cp == null) { - this.cp = null; ---- a/runtime-decompiler/src/test/java/org/jrd/frontend/frame/plugins/FileSelectorArrayRowTest.java -+++ a/runtime-decompiler/src/test/java/org/jrd/frontend/frame/plugins/XFileSelectorArrayRowTest.java -@@ -11,9 +11,6 @@ - import java.io.File; - import java.nio.file.Paths; - --@SuppressFBWarnings( -- value = "DMI_HARDCODED_ABSOLUTE_FILENAME", justification = "Hardcoded paths aren't used for manipulating with an actual filesystem." --) - class FileSelectorArrayRowTest { - @BeforeAll - static void setup() { ---- a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/utils/CompileArguments.java -+++ a/runtime-decompiler/src/main/java/org/jrd/backend/data/cli/utils/CompileArguments.java -@@ -77,10 +77,6 @@ - return new RuntimeCompilerConnector.JrdClassesProvider(localVmInfo, vmManager); - } - -- @SuppressFBWarnings( -- value = "NP_LOAD_OF_KNOWN_NULL_VALUE", -- justification = "Classpath is only used for FS VMs, in other cases getCp() does not get called" -- ) - /** - * Warning, possibly unused, rotten code. - */ ---- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java -+++ a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java -@@ -103,10 +103,6 @@ - //currently standalone dialog supports only additions - //and additions do not support classlaoder selection (obviously) - //the classlaoder now remain thus unused -- @SuppressFBWarnings( -- value = "SS_SHOULD_BE_STATIC", -- justification = "is really per instance, however will ahve sense, only if standalone dialog will support overwrite, which is unlikely" -- ) - private final boolean overvriteEnabled = false; - //field to hots the target classlaoder if it willbe ever supported - //it is now null, what is waht the only ussage in compiler.compile(toCompile, pluginManager, classloader); needs - diff --git a/rsyntaxVersion.patch b/rsyntaxVersion.patch index cf084ca..c423a28 100644 --- a/rsyntaxVersion.patch +++ b/rsyntaxVersion.patch @@ -4,8 +4,8 @@ com.fifesoft rsyntaxtextarea -- 3.1.2 -+ 3.1.1 +- 3.6.0 ++ 3.6.0 org.jboss.byteman diff --git a/sources b/sources index 639b6d5..1ab8d67 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-9.1.tar.gz) = 9373d08d9482614561726ab82b3f116136c79bf9758950276cf3043c6443425c17b43699d19cd33eb0761e3819795249a304135d64185989dcc1eeb59a9c671d +SHA512 (java-runtime-decompiler-10.0.tar.gz) = b3e3b98e5d9fbb367e43df32a10e9cbed2cfd696109b14f4360f49ddf81eda5214fa425327407392642544602a5699c1b9221a33da9f0e1b0ccd3384b4aa6ead diff --git a/systemCfr.patch b/systemCfr.patch index 2a0a77d..ed64dc4 100644 --- a/systemCfr.patch +++ b/systemCfr.patch @@ -6,7 +6,7 @@ - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/CfrDecompilerWrapper.java", + "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/CfrDecompilerWrapper.java", "DependencyURL": [ -- "file://${HOME}/.m2/repository/org/benf/cfr/0.151/cfr-0.151.jar" +- "file://${HOME}/.m2/repository/org/benf/cfr/0.152/cfr-0.152.jar" + "file:/usr/share/java/CFR/cfr.jar" ], "DecompilerDownloadURL": "https://www.benf.org/other/cfr/faq.html" diff --git a/systemFernflower.patch b/systemFernflower.patch index b179e10..746c176 100644 --- a/systemFernflower.patch +++ b/systemFernflower.patch @@ -6,7 +6,7 @@ - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/FernflowerDecompilerWrapper.java", + "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/FernflowerDecompilerWrapper.java", "DependencyURL": [ -- "file://${HOME}/.m2/repository/org/jboss/windup/decompiler/decompiler-fernflower/5.1.4.Final/decompiler-fernflower-5.1.4.Final.jar", +- "file://${HOME}/.m2/repository/org/jboss/windup/decompiler/decompiler-fernflower/6.3.9.Final/decompiler-fernflower-6.3.9.Final.jar", - "file://${HOME}/.m2/repository/org/jboss/windup/decompiler/fernflower/windup-fernflower/1.0.0.20171018/windup-fernflower-1.0.0.20171018.jar" + "file:///usr/share/java/fernflower.jar" ], diff --git a/systemJasm.patch b/systemJasm.patch index dc2991d..33c2f1d 100644 --- a/systemJasm.patch +++ b/systemJasm.patch @@ -6,7 +6,7 @@ - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JasmDecompilerWrapper.java", + "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JasmDecompilerWrapper.java", "DependencyURL": [ -- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-ea.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/9.0.b12-ea/asmtools-9.0.b12-ea.jar" + "file:/usr/share/java/openjdk-asmtools/asmtools.jar" ], "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" diff --git a/systemJasmG.patch b/systemJasmG.patch index 81b6665..2844626 100644 --- a/systemJasmG.patch +++ b/systemJasmG.patch @@ -6,7 +6,7 @@ - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JasmGDecompilerWrapper.java", + "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JasmGDecompilerWrapper.java", "DependencyURL": [ -- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-ea.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/9.0.b12-ea/asmtools-9.0.b12-ea.jar" + "file:/usr/share/java/openjdk-asmtools/asmtools.jar" ], "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" diff --git a/systemJcoder.patch b/systemJcoder.patch index bd2690a..086e3ac 100644 --- a/systemJcoder.patch +++ b/systemJcoder.patch @@ -6,7 +6,7 @@ - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JcoderDecompilerWrapper.java", + "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JcoderDecompilerWrapper.java", "DependencyURL": [ -- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-ea.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/9.0.b12-ea/asmtools-9.0.b12-ea.jar" + "file:/usr/share/java/openjdk-asmtools/asmtools.jar" ], "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" diff --git a/systemJcoderG.patch b/systemJcoderG.patch index 4e07a9c..61fb2eb 100644 --- a/systemJcoderG.patch +++ b/systemJcoderG.patch @@ -6,7 +6,7 @@ - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JcoderGDecompilerWrapper.java", + "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JcoderGDecompilerWrapper.java", "DependencyURL": [ -- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-ea.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/9.0.b12-ea/asmtools-9.0.b12-ea.jar" + "file:/usr/share/java/openjdk-asmtools/asmtools.jar" ], "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" diff --git a/systemProcyon.patch b/systemProcyon.patch index 4886e80..5870794 100644 --- a/systemProcyon.patch +++ b/systemProcyon.patch @@ -8,13 +8,13 @@ - "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-core/1.0-SNAPSHOT/procyon-core-1.0-SNAPSHOT.jar", - "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-compilertools/1.0-SNAPSHOT/procyon-compilertools-1.0-SNAPSHOT.jar", - "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-decompiler/1.0-SNAPSHOT/procyon-decompiler-1.0-SNAPSHOT.jar", -- "file://${HOME}/.m2/repository/com/beust/jcommander/1.78/jcommander-1.78.jar" +- "file://${HOME}/.m2/repository/com/beust/jcommander/1.82/jcommander-1.82.jar" + "/usr/share/java/procyon/procyon-core.jar", + "/usr/share/java/procyon/procyon-compilertools.jar", + "/usr/share/java/procyon/procyon-decompiler.jar", + "/usr/share/java/beust-jcommander.jar" ], - "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/git " + "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/" } diff --git a/systemProcyonAssembler.patch b/systemProcyonAssembler.patch index d385b99..10a690b 100644 --- a/systemProcyonAssembler.patch +++ b/systemProcyonAssembler.patch @@ -8,13 +8,13 @@ - "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-core/1.0-SNAPSHOT/procyon-core-1.0-SNAPSHOT.jar", - "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-compilertools/1.0-SNAPSHOT/procyon-compilertools-1.0-SNAPSHOT.jar", - "file://${HOME}/.m2/repository/com/github/mstrobel/procyon-decompiler/1.0-SNAPSHOT/procyon-decompiler-1.0-SNAPSHOT.jar", -- "file://${HOME}/.m2/repository/com/beust/jcommander/1.78/jcommander-1.78.jar" +- "file://${HOME}/.m2/repository/com/beust/jcommander/1.82/jcommander-1.82.jar" + "/usr/share/java/procyon/procyon-core.jar", + "/usr/share/java/procyon/procyon-compilertools.jar", + "/usr/share/java/procyon/procyon-decompiler.jar", + "/usr/share/java/beust-jcommander.jar" ], - "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/git " + "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/" }