From 1ef24c1d6860abc38f28416a2d8465fb15b52e36 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Mon, 26 Aug 2019 19:04:29 +0200 Subject: [PATCH 01/73] moved to usptream version 3.0 - adjusted configs, removed lambda patch --- .gitignore | 1 + includeLambdas.patch | 58 ------------------------------------ java-runtime-decompiler.1 | 8 ++++- java-runtime-decompiler.spec | 14 +++++---- sources | 2 +- systemFernflower.patch | 9 ++++-- systemProcyon.patch | 9 ++++-- 7 files changed, 29 insertions(+), 72 deletions(-) delete mode 100644 includeLambdas.patch diff --git a/.gitignore b/.gitignore index 7e75df4..f4ee33b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /java-runtime-decompiler-2.0.tar.gz +/java-runtime-decompiler-3.0.tar.gz diff --git a/includeLambdas.patch b/includeLambdas.patch deleted file mode 100644 index 2fc9fee..0000000 --- a/includeLambdas.patch +++ /dev/null @@ -1,58 +0,0 @@ -commit fd66fd3a37cc899b11d97a13e0e23319d86f39c3 -Author: Jiri Vanek -Date: Wed Jan 16 18:03:43 2019 +0100 - - Showing Lambdas again, but sorting them to the end. - -diff --git a/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java b/runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java -index b7fddea..603c26d 100644 ---- runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java -+++ runtime-decompiler/src/main/java/org/jrd/backend/core/DecompilerRequestReceiver.java -@@ -8,6 +8,7 @@ import org.jrd.backend.data.VmManager; - - import java.util.ArrayList; - import java.util.Arrays; -+import java.util.Comparator; - import java.util.List; - - /** -@@ -146,6 +147,29 @@ public class DecompilerRequestReceiver { - return ERROR_RESPONSE; - } - String[] arrayOfClasses = parseClasses(classes); -+ if (arrayOfClasses != null){ -+ Arrays.sort(arrayOfClasses, new Comparator() { -+ @Override -+ public int compare(String o1, String o2) { -+ if (o1 == null && o2 == null) { -+ return 0; -+ } -+ if (o1 == null && o2 != null) { -+ return 1; -+ } -+ if (o1 != null && o2 == null) { -+ return -1; -+ } -+ if (o1.startsWith("[") && !o2.startsWith("[")) { -+ return 1; -+ } -+ if (!o1.startsWith("[") && o2.startsWith("[")) { -+ return -1; -+ } -+ return o1.compareTo(o2); -+ } -+ }); -+ } - VmDecompilerStatus status = new VmDecompilerStatus(); - status.setHostname(hostname); - status.setListenPort(actualListenPort); -@@ -214,9 +238,7 @@ public class DecompilerRequestReceiver { - list.removeAll(Arrays.asList("", null)); - List list1 = new ArrayList<>(); - for (String s : list) { -- if (!(s.contains("Lambda") | s.startsWith("["))){ - list1.add(s); -- } - } - java.util.Collections.sort(list1); - return list1.toArray(new String[]{}); diff --git a/java-runtime-decompiler.1 b/java-runtime-decompiler.1 index 5aa7e3c..eb2cddd 100644 --- a/java-runtime-decompiler.1 +++ b/java-runtime-decompiler.1 @@ -1,4 +1,4 @@ -.TH java-runtime-decompiler 1 "05 September 2018" "version 2.0" +.TH java-runtime-decompiler 1 "26 August 2019" "version 3.0" .SH NAME java-runtime-decompiler \- launch java-runtime decompiler GUI .SH SYNOPSIS @@ -22,5 +22,11 @@ Print on stdout binary form of given class loaded in JVM with given PID/URL. Print on stdout binary form encoded in base64 of given class loaded in JVM with given PID/URL. .IP "-decompile pid-xor-url class-name config-file" Print on stdout decompiled class, needs PID/URL of JVM, class name and name/file with decompiler configuration, can use javap disassembler. To pass arguments to the disassembler, add them to javap without spaces (e.g. javap-v). +.IP "-overwrite pid/urlOfJVM classToOverwrite fileWithNewBytecode" +three args - pid or url of JVM and class to overwrite and file with new bytecode .SH AUTHOR Petra Alice Mikova (petra.alice.mikova@gmail.com) +Jiri Vanek (judovana@email.com) +Radek Manak (Radek.Manak@protonmail.com) +Ondrej Hrdlicka (ondra.ondrah@seznam.cz) + diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index e0d503a..0f9f4eb 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 2.0 -Release: 7%{?dist} +Version: 3.0 +Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -10,7 +10,6 @@ Source2: java-runtime-decompiler.1 Source3: jrd.desktop Patch1: systemFernflower.patch Patch2: systemProcyon.patch -Patch3: includeLambdas.patch BuildArch: noarch BuildRequires: maven-local BuildRequires: byteman @@ -35,9 +34,8 @@ This package contains the API documentation for %{name}. %prep %setup -q -n %{name}-%{name}-%{version} -%patch1 -%patch2 -%patch3 +%patch1 -p0 +%patch2 -p0 %build pushd runtime-decompiler @@ -81,6 +79,10 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Mon Aug 26 2019 Jiri Vanek - 3.0-0 +- moved to usptream version 3.0 +- adjusted configs, removed lambda patch + * Thu Jul 25 2019 Fedora Release Engineering - 2.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/sources b/sources index bbb57cd..d54d342 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-2.0.tar.gz) = dc7c1e9c785539ef464d18d039403b677476e34ba54cc3717552c59a2e405b550c86b40607cc77efafdfdd0b3ce1f6813a7532915bbfabffc0e46023bb85ed95 +SHA512 (java-runtime-decompiler-3.0.tar.gz) = 329184689763b7777ef0bad1c0f787aa649f855692b52bd843cacd424d5d2c0caadad328f80cd7f229031a151b6414c712bd770abd285412055c5d34d932875c diff --git a/systemFernflower.patch b/systemFernflower.patch index ab707cd..ecb8d07 100644 --- a/systemFernflower.patch +++ b/systemFernflower.patch @@ -1,10 +1,13 @@ --- runtime-decompiler/src/plugins/FernflowerDecompilerWrapper.json +++ runtime-decompiler/src/plugins/FernflowerDecompilerWrapper.json -@@ -2,7 +2,7 @@ +@@ -1,9 +1,8 @@ + { "Name": "Fernflower", - "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/FernflowerDecompilerWrapper.java", +- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/FernflowerDecompilerWrapper.java", ++ "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/FernflowerDecompilerWrapper.java", "DependencyURL": [ -- "file://${HOME}/IdeaProjects/fernflower/build/libs/fernflower.jar" +- "file://${HOME}/.m2/repository/org/jboss/windup/decompiler/decompiler-fernflower/4.2.1.Final/decompiler-fernflower-4.2.1.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" ], "DecompilerDownloadURL": "https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine" diff --git a/systemProcyon.patch b/systemProcyon.patch index 91e2c7b..1581df9 100644 --- a/systemProcyon.patch +++ b/systemProcyon.patch @@ -1,10 +1,13 @@ --- runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 +++ runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 -@@ -2,7 +2,9 @@ +@@ -1,9 +1,10 @@ + { "Name": "Procyon", - "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/ProcyonDecompilerWrapper.java", +- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonDecompilerWrapper.java", ++ "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/ProcyonDecompilerWrapper.java", "DependencyURL": [ -- "file:///usr/share/java/procyon-decompiler.jar" +- "file://${HOME}/.m2/repository/org/bitbucket/mstrobel/procyon-core/0.5.35/procyon-core-0.5.35.jar", +- "file://${HOME}/.m2/repository/org/bitbucket/mstrobel/procyon-compilertools/0.5.35/procyon-compilertools-0.5.35.jar" + "/usr/share/java/procyon/procyon-core.jar", + "/usr/share/java/procyon/procyon-compilertools.jar", + "/usr/share/java/procyon/procyon-decompiler.jar" From d173ffdba6504b9cdfee8fbdef037df8d5003845 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 27 Aug 2019 09:36:59 +0200 Subject: [PATCH 02/73] Adde explicit test requirements --- java-runtime-decompiler.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 0f9f4eb..b4de824 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 3.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -14,6 +14,11 @@ BuildArch: noarch BuildRequires: maven-local BuildRequires: byteman BuildRequires: rsyntaxtextarea +BuildRequires: junit +BuildRequires: ant-junit +BuildRequires: maven-surefire-provider-junit +BuildRequires: maven-surefire +BuildRequires: maven-surefire-plugin # depends on devel, not runtime (needs tools.jar) BuildRequires: java-devel = 1:1.8.0 BuildRequires: google-gson From d413bdc7d97b762c29adca90e556d9b6ee6f5523 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 27 Aug 2019 09:42:11 +0200 Subject: [PATCH 03/73] Retured junit5 requirements --- java-runtime-decompiler.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index b4de824..c6983f3 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -14,9 +14,12 @@ BuildArch: noarch BuildRequires: maven-local BuildRequires: byteman BuildRequires: rsyntaxtextarea +BuildRequires: junit5 +BuildRequires: ant-junit5 BuildRequires: junit BuildRequires: ant-junit BuildRequires: maven-surefire-provider-junit +BuildRequires: maven-surefire-provider-junit5 BuildRequires: maven-surefire BuildRequires: maven-surefire-plugin # depends on devel, not runtime (needs tools.jar) From 4fafab3f9754c5f4b23f771dbdd1eb95aefd0442 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 27 Aug 2019 10:29:49 +0200 Subject: [PATCH 04/73] All debu outputs moved to stderr. It was killing headless mode --- java-runtime-decompiler | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/java-runtime-decompiler b/java-runtime-decompiler index f7da489..9dda23a 100644 --- a/java-runtime-decompiler +++ b/java-runtime-decompiler @@ -58,7 +58,7 @@ for cpfile in $CP_FILES; do then cp $cpfile $PLUGIN_HOME else - echo "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten." + echo "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten." >&2 fi done @@ -69,17 +69,17 @@ if [ -e $AGENT ] then if grep -Fxq $AGENT_STRING $CONFIG_FILE then - echo "Default agent path is already set in $CONFIG_FILE. Skipping agent path setting." + echo "Default agent path is already set in $CONFIG_FILE. Skipping agent path setting." >&2 elif grep -rq $AGENT_PREFIX $CONFIG_FILE then RESULT_OF_GREP="$(grep -rq $AGENT_PREFIX $CONFIG_FILE)" - echo "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting." + echo "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting." >&2 else - echo $AGENT_STRING >> $CONFIG_FILE + echo $AGENT_STRING >> $CONFIG_FILE >&2 fi else - echo "Agent was not found and agent path was not set correctly. This has to be done manually in the decompiler GUI, or set AGENT_PATH===path_to_agent_jar in the configuration file: $CONFIG_FILE" + echo "Agent was not found and agent path was not set correctly. This has to be done manually in the decompiler GUI, or set AGENT_PATH===path_to_agent_jar in the configuration file: $CONFIG_FILE" >&2 fi run "$@" From 228d2bda929d26f672a05fa2d090a44aef8016f1 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 27 Aug 2019 10:36:44 +0200 Subject: [PATCH 05/73] all stdouts from customlauncher moved to stderr --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index c6983f3..9eecdc0 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 3.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -87,6 +87,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Tue Aug 24 2019 Jiri Vanek - 3.0-3 +- all stdouts from customlauncher moved to stderr + * Mon Aug 26 2019 Jiri Vanek - 3.0-0 - moved to usptream version 3.0 - adjusted configs, removed lambda patch From 49651531bcd3edfde19b57d4fe047efa04ee53aa Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 27 Aug 2019 10:40:28 +0200 Subject: [PATCH 06/73] Fixed date --- java-runtime-decompiler.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 9eecdc0..ce775b5 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -87,7 +87,7 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog -* Tue Aug 24 2019 Jiri Vanek - 3.0-3 +* Tue Aug 27 2019 Jiri Vanek - 3.0-3 - all stdouts from customlauncher moved to stderr * Mon Aug 26 2019 Jiri Vanek - 3.0-0 From 0e3b21d94a4aed1d9ee5629ebb863dc6e68f8d46 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Tue, 27 Aug 2019 17:17:17 +0200 Subject: [PATCH 07/73] Fixed generation of default agent --- java-runtime-decompiler | 2 +- java-runtime-decompiler.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java-runtime-decompiler b/java-runtime-decompiler index 9dda23a..e2b83b0 100644 --- a/java-runtime-decompiler +++ b/java-runtime-decompiler @@ -75,7 +75,7 @@ then RESULT_OF_GREP="$(grep -rq $AGENT_PREFIX $CONFIG_FILE)" echo "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting." >&2 else - echo $AGENT_STRING >> $CONFIG_FILE >&2 + echo $AGENT_STRING >> $CONFIG_FILE fi else diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index ce775b5..3198a16 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 3.0 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz From 87b7fa02c478c8d291d0e45a1196757cd49addc0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 05:55:58 +0000 Subject: [PATCH 08/73] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 3198a16..2f51aac 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 3.0 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -87,6 +87,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 3.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Tue Aug 27 2019 Jiri Vanek - 3.0-3 - all stdouts from customlauncher moved to stderr From 2b5472d1483bf0b7c0662abf5f3715f56a0b4c76 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 17 Mar 2020 17:00:53 +0100 Subject: [PATCH 09/73] changed jdk8 requirement --- java-runtime-decompiler.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 2f51aac..56c033b 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 3.0 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -23,10 +23,10 @@ BuildRequires: maven-surefire-provider-junit5 BuildRequires: maven-surefire BuildRequires: maven-surefire-plugin # depends on devel, not runtime (needs tools.jar) -BuildRequires: java-devel = 1:1.8.0 +BuildRequires: java-1.8.0-devel BuildRequires: google-gson BuildRequires: desktop-file-utils -Requires: java-devel = 1:1.8.0 +Requires: java-1.8.0-devel Recommends: fernflower Recommends: procyon-decompiler @@ -87,6 +87,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Tue Aug 27 2019 Jiri Vanek - 3.0-4 +- changed jdk8 requirement + * Wed Jan 29 2020 Fedora Release Engineering - 3.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From a0fea8a64fb1ed9cfa67f0a616a3e345b433d618 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 17 Mar 2020 17:02:28 +0100 Subject: [PATCH 10/73] Fixed date --- java-runtime-decompiler.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 56c033b..7a9b31f 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -87,7 +87,7 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog -* Tue Aug 27 2019 Jiri Vanek - 3.0-4 +* Tue Mar 17 2020 Jiri Vanek - 3.0-6 - changed jdk8 requirement * Wed Jan 29 2020 Fedora Release Engineering - 3.0-5 From e41eeb2395fd90beb2903d818be317d7257f8428 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 9 Jun 2020 18:22:03 +0200 Subject: [PATCH 11/73] aligned rsyntaxtextarea version, fixed javadoc generation --- java-runtime-decompiler.spec | 9 +++++++-- rsyntaxVersion.patch | 12 ++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 rsyntaxVersion.patch diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 7a9b31f..a376afa 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 3.0 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -10,6 +10,7 @@ Source2: java-runtime-decompiler.1 Source3: jrd.desktop Patch1: systemFernflower.patch Patch2: systemProcyon.patch +Patch3: rsyntaxVersion.patch BuildArch: noarch BuildRequires: maven-local BuildRequires: byteman @@ -44,6 +45,7 @@ This package contains the API documentation for %{name}. %setup -q -n %{name}-%{name}-%{version} %patch1 -p0 %patch2 -p0 +%patch3 -p0 %build pushd runtime-decompiler @@ -51,7 +53,7 @@ pushd runtime-decompiler %pom_add_dep com.sun:tools %pom_remove_plugin :maven-jar-plugin popd -%mvn_build +%mvn_build --xmvn-javadoc %install %mvn_install @@ -87,6 +89,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Tue Mar 17 2020 Jiri Vanek - 3.0-7 +- aligned rsyntaxtextarea version, fixed javadoc generation + * Tue Mar 17 2020 Jiri Vanek - 3.0-6 - changed jdk8 requirement diff --git a/rsyntaxVersion.patch b/rsyntaxVersion.patch new file mode 100644 index 0000000..a681d71 --- /dev/null +++ b/rsyntaxVersion.patch @@ -0,0 +1,12 @@ +--- runtime-decompiler/pom.xml ++++ runtime-decompiler/pom.xml +@@ -134,7 +134,7 @@ + + com.fifesoft + rsyntaxtextarea +- 2.6.1 ++ 3.1.1 + + + org.jboss.byteman + From 32f469a3d760ace11b7f6a0ca5516f5e1fdeb983 Mon Sep 17 00:00:00 2001 From: Jiri Date: Fri, 10 Jul 2020 22:35:59 +0200 Subject: [PATCH 12/73] Rebuilt for JDK-11 --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index a376afa..0340ba2 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 3.0 -Release: 7%{?dist} +Release: 8%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -89,6 +89,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Fri Jul 10 2020 Jiri Vanek - 3.0-8 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + * Tue Mar 17 2020 Jiri Vanek - 3.0-7 - aligned rsyntaxtextarea version, fixed javadoc generation From 3215257a08d7e3db1113f66f86501a6703a05013 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 02:11:25 +0000 Subject: [PATCH 13/73] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 0340ba2..ab60218 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 3.0 -Release: 8%{?dist} +Release: 9%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -89,6 +89,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 3.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Fri Jul 10 2020 Jiri Vanek - 3.0-8 - Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 From 729c553ab5a148f949ae3f5ebb7687a9f527deb4 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 8 Dec 2020 13:55:50 +0100 Subject: [PATCH 14/73] Moved to jdk11 --- .gitignore | 1 + java-runtime-decompiler | 4 ++-- java-runtime-decompiler.spec | 18 ++++++++++++------ sources | 2 +- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index f4ee33b..ec0247b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /java-runtime-decompiler-2.0.tar.gz /java-runtime-decompiler-3.0.tar.gz +/java-runtime-decompiler-4.0.tar.gz diff --git a/java-runtime-decompiler b/java-runtime-decompiler index e2b83b0..56fd9ab 100644 --- a/java-runtime-decompiler +++ b/java-runtime-decompiler @@ -82,5 +82,5 @@ else echo "Agent was not found and agent path was not set correctly. This has to be done manually in the decompiler GUI, or set AGENT_PATH===path_to_agent_jar in the configuration file: $CONFIG_FILE" >&2 fi -run "$@" - +export FLAGS="$FLAGS -Djdk.attach.allowAttachSelf=true" +run "$@" diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index ab60218..450a4b4 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 3.0 -Release: 9%{?dist} +Version: 4.0 +Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -24,10 +24,10 @@ BuildRequires: maven-surefire-provider-junit5 BuildRequires: maven-surefire BuildRequires: maven-surefire-plugin # depends on devel, not runtime (needs tools.jar) -BuildRequires: java-1.8.0-devel +BuildRequires: java-11-devel BuildRequires: google-gson BuildRequires: desktop-file-utils -Requires: java-1.8.0-devel +Requires: java-11-devel Recommends: fernflower Recommends: procyon-decompiler @@ -49,10 +49,13 @@ This package contains the API documentation for %{name}. %build pushd runtime-decompiler -%pom_remove_dep com.sun:tools -%pom_add_dep com.sun:tools +# not manipuling com.sun:tools in jdk11 phases +#%%pom_remove_dep com.sun:tools +#%%pom_add_dep com.sun:tools %pom_remove_plugin :maven-jar-plugin popd +# seting up build jdk, as most likely we will build separate binary by jdk8 +export JAVA_HOME=/usr/lib/jvm/java-11-openjdk %mvn_build --xmvn-javadoc %install @@ -89,6 +92,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Tue Dec 08 2020 Jiri Vanek - 4.0-1 +- built by jdk11 + * Tue Jul 28 2020 Fedora Release Engineering - 3.0-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index d54d342..6cd7ade 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-3.0.tar.gz) = 329184689763b7777ef0bad1c0f787aa649f855692b52bd843cacd424d5d2c0caadad328f80cd7f229031a151b6414c712bd770abd285412055c5d34d932875c +SHA512 (java-runtime-decompiler-4.0.tar.gz) = 073c3f2868ad82feee407626ed8a9962ff76ee49dc5feecd253a572d507c10c814112faeee8e1d3bf0007f8a95d7750ab6eadd845e54174e5695ca68df622764 From 628b22e7d5efaac1842bb1758cd05a22e1f10e88 Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 8 Dec 2020 18:54:53 +0100 Subject: [PATCH 15/73] Added subpackage built by jdk8 to allow looking into jdk8 apps - for some reason, jdk8 vm can not look into jdk11 vm, even if agent is correctly jdk8 version - the config is still share, which is stupid, but I doubt there is another target audeince then me --- java-runtime-decompiler.spec | 70 +++++++++++++++++++++++---- java-runtime-decompiler8 | 94 ++++++++++++++++++++++++++++++++++++ remove_rsyntaxtextarea.patch | 87 +++++++++++++++++++++++++++++++++ 3 files changed, 241 insertions(+), 10 deletions(-) create mode 100644 java-runtime-decompiler8 create mode 100644 remove_rsyntaxtextarea.patch diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 450a4b4..5f7bfd3 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,13 +1,15 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 4.0 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz Source1: java-runtime-decompiler Source2: java-runtime-decompiler.1 Source3: jrd.desktop +Source4: java-runtime-decompiler8 +Patch0: remove_rsyntaxtextarea.patch Patch1: systemFernflower.patch Patch2: systemProcyon.patch Patch3: rsyntaxVersion.patch @@ -23,8 +25,10 @@ BuildRequires: maven-surefire-provider-junit BuildRequires: maven-surefire-provider-junit5 BuildRequires: maven-surefire BuildRequires: maven-surefire-plugin -# depends on devel, not runtime (needs tools.jar) +BuildRequires: maven-clean-plugin +# depends on devel, not runtime (needs tools.jar, javap attach and manyn others) BuildRequires: java-11-devel +BuildRequires: java-1.8.0-devel BuildRequires: google-gson BuildRequires: desktop-file-utils Requires: java-11-devel @@ -34,28 +38,50 @@ Recommends: procyon-decompiler %description This application can access JVM memory at runtime, extract byte code from the JVM and decompile it. + %package javadoc Summary: Javadoc for %{name} -Requires: %{name} = %{version}-%{release} %description javadoc This package contains the API documentation for %{name}. +%package jdk8 +Summary: jdk8 comaptible version of %{name}, may miss sme features +Requires: java-1.8.0-devel +Recommends: fernflower +Recommends: procyon-decompiler + +%description jdk8 +jdk8 comaptible version of %{name}, may miss sme features. +Eg rich text area is missng or the agent need to be adjusted manually + %prep %setup -q -n %{name}-%{name}-%{version} +%patch0 -p1 %patch1 -p0 %patch2 -p0 -%patch3 -p0 %build pushd runtime-decompiler -# not manipuling com.sun:tools in jdk11 phases -#%%pom_remove_dep com.sun:tools -#%%pom_add_dep com.sun:tools %pom_remove_plugin :maven-jar-plugin popd -# seting up build jdk, as most likely we will build separate binary by jdk8 + +export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk +pushd runtime-decompiler +%pom_add_dep com.sun:tools +popd +%mvn_build --xmvn-javadoc --skip-javadoc --skip-install -- -Plegacy +find | grep .jar$ +mv -v ./decompiler_agent/target/decompiler-agent-%{version}.0-SNAPSHOT.jar ../decompiler-agent8.jarx #to avoid being mvn installed +mv -v ./runtime-decompiler/target/runtime-decompiler-%{version}.0-SNAPSHOT.jar ../runtime-decompiler8.jarx #to avoid being mvn installed +xmvn clean + export JAVA_HOME=/usr/lib/jvm/java-11-openjdk +patch -p1 -R < %{PATCH0} +patch -p0 < %{PATCH3} +pushd runtime-decompiler +%pom_remove_dep com.sun:tools +popd %mvn_build --xmvn-javadoc %install @@ -65,6 +91,7 @@ install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1/ install -d -m 755 $RPM_BUILD_ROOT%{_bindir} install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ +install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/ install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ cp -r %{_builddir}/%{name}-%{name}-%{version}/runtime-decompiler/src/plugins/ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ @@ -72,11 +99,15 @@ install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/applications desktop-file-install --vendor="fedora" \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE3} +mkdir -p $RPM_BUILD_ROOT%{_datadir}/java/%{name}-jdk8 +cp -v %{_builddir}/decompiler-agent8.jarx $RPM_BUILD_ROOT%{_datadir}/java/%{name}-jdk8/decompiler-agent8.jar +cp -v %{_builddir}/runtime-decompiler8.jarx $RPM_BUILD_ROOT%{_datadir}/java/%{name}-jdk8/runtime-decompiler8.jar + + %files -f .mfiles %attr(755, root, -) %{_bindir}/java-runtime-decompiler %{_mandir}/man1/java-runtime-decompiler.1* - -# wrappers for decompilers +# wrappers for decompilers shared with jdk8 subpackage %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/plugins %config %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.java @@ -91,7 +122,26 @@ desktop-file-install --vendor="fedora" \ %files javadoc -f .mfiles-javadoc %license LICENSE +%files jdk8 +%attr(755, root, -) %{_bindir}/java-runtime-decompiler8 +%dir %{_datadir}/java/%{name}-jdk8 +%{_datadir}/java/%{name}-jdk8/runtime-decompiler8.jar +%{_datadir}/java/%{name}-jdk8/decompiler-agent8.jar +# wrappers for decompilers shared with main +%dir %{_sysconfdir}/%{name} +%dir %{_sysconfdir}/%{name}/plugins +%config %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.json +%license LICENSE + %changelog +* Tue Dec 08 2020 Jiri Vanek - 4.0-2 +- Added subpackage built by jdk8 to allow looking into jdk8 apps +- for some reason, jdk8 vm can not look into jdk11 vm, even if agent is correctly jdk8 version +- the config is still share, which is stupid, but I doubt there is another target audeince then me + * Tue Dec 08 2020 Jiri Vanek - 4.0-1 - built by jdk11 diff --git a/java-runtime-decompiler8 b/java-runtime-decompiler8 new file mode 100644 index 0000000..0a31c1e --- /dev/null +++ b/java-runtime-decompiler8 @@ -0,0 +1,94 @@ +#!/usr/bin/bash + +# java runtime decompiler launch script + +# JPackage Project +# Source functions library +echo "Special jdk8 build of JRD. " +echo "You will most likely set agent manually to java-runtime-decompiler-jdk8/decompiler-agent8.jar" +echo "Normal, jdk11 JRD should be able to reuse jdk8 agent, but not the oposite" +echo "No one can guarantee the bytecode level of decompilers. You may need to download older versions from somewhere" + +if [ "x$JAVA_HOME" = "x" ] ; then + export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk +fi + +. /usr/share/java-utils/java-functions + +# identify directory tree +JRD=`java-runtime-decompiler` +CONF_HOME=$XDG_CONFIG_HOME + + +if [ "$CONF_HOME" = "" ] ; then + CONF_HOME=$HOME/.config/$JRD + +else + CONF_HOME=$CONF_HOME/$JRD + +fi + +LOG_DIR=$CONF_HOME/logs + +CONF_DIR=$CONF_HOME/conf + +# create directory tree +PLUGIN_HOME=$CONF_HOME/plugins + +mkdir -p $LOG_DIR + +mkdir -p $CONF_DIR + +mkdir -p $PLUGIN_HOME + +: ${MAIN_CLASS:=org.jrd.backend.data.Main} + +# set java and jvm arguments +export _prefer_jre=false +_set_java_home +set_jvm + +# all dependencies must be on classpath +set_classpath byteman google-gson +CLASSPATH=$CLASSPATH:${JAVA_HOME}/lib/tools.jar:/usr/share/java/java-runtime-decompiler-jdk8/runtime-decompiler8.jar:/usr/share/java/java-runtime-decompiler-jdk8/decompiler-agent8.jar + +# set path to agent automatically +AGENT="/usr/share/java/java-runtime-decompiler/decompiler-agent8.jar" +CONFIG_FILE=$CONF_DIR/config.cfg +AGENT_PREFIX="AGENT_PATH===" +AGENT_STRING=$AGENT_PREFIX$AGENT + +# copy json wrappers information to home so the users can edit +CP_FILES="$(ls /etc/$JRD/plugins/*.json)" +for cpfile in $CP_FILES; do + FILE_NAME="$(basename -- $cpfile)" + if [ ! -e "$PLUGIN_HOME/$FILE_NAME" ] + then + cp $cpfile $PLUGIN_HOME + else + echo "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten." >&2 + fi +done + +# create config file and add agent default path +touch $CONFIG_FILE + +if [ -e $AGENT ] +then + if grep -Fxq $AGENT_STRING $CONFIG_FILE + then + echo "Default agent path is already set in $CONFIG_FILE. Skipping agent path setting." >&2 + elif grep -rq $AGENT_PREFIX $CONFIG_FILE + then + RESULT_OF_GREP="$(grep -rq $AGENT_PREFIX $CONFIG_FILE)" + echo "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting." >&2 + else + echo $AGENT_STRING >> $CONFIG_FILE + + fi +else + echo "Agent was not found and agent path was not set correctly. This has to be done manually in the decompiler GUI, or set AGENT_PATH===path_to_agent_jar in the configuration file: $CONFIG_FILE" >&2 +fi + +export FLAGS="$FLAGS -Djdk.attach.allowAttachSelf=true" +run "$@" diff --git a/remove_rsyntaxtextarea.patch b/remove_rsyntaxtextarea.patch new file mode 100644 index 0000000..9b89d1b --- /dev/null +++ b/remove_rsyntaxtextarea.patch @@ -0,0 +1,87 @@ +diff --git a/runtime-decompiler/pom.xml b/runtime-decompiler/pom.xml +index 26a416e..e6e2425 100644 +--- a/runtime-decompiler/pom.xml ++++ b/runtime-decompiler/pom.xml +@@ -135,11 +135,6 @@ + directories + 10 + --> +- +- com.fifesoft +- rsyntaxtextarea +- 2.6.1 +- + + org.jboss.byteman + byteman-install +diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/BytecodeDecompilerView.java b/runtime-decompiler/src/main/java/org/jrd/frontend/BytecodeDecompilerView.java +index 9c19e2c..8d17775 100644 +--- a/runtime-decompiler/src/main/java/org/jrd/frontend/MainFrame/BytecodeDecompilerView.java ++++ b/runtime-decompiler/src/main/java/org/jrd/frontend/MainFrame/BytecodeDecompilerView.java +@@ -1,11 +1,11 @@ + package org.jrd.frontend.MainFrame; + +-import org.fife.ui.rsyntaxtextarea.*; +-import org.fife.ui.rtextarea.SearchContext; +-import org.fife.ui.rtextarea.SearchEngine; ++//import org.fife.ui.rsyntaxtextarea.*; ++//import org.fife.ui.rtextarea.SearchContext; ++//import org.fife.ui.rtextarea.SearchEngine; + import org.jrd.backend.core.OutputController; + import org.jrd.backend.decompiling.DecompilerWrapperInformation; +-import org.fife.ui.rtextarea.RTextScrollPane; ++//import org.fife.ui.rtextarea.RTextScrollPane; + + import javax.swing.*; + import javax.swing.border.EtchedBorder; +@@ -30,8 +30,8 @@ public class BytecodeDecompilerView { + private JPanel rightMainPanel; + private JScrollPane leftScrollPanel; + private JList filteredClassesJlist; +- private RTextScrollPane bytecodeScrollPane; +- private RSyntaxTextArea bytecodeSyntaxTextArea; ++ private JScrollPane bytecodeScrollPane; ++ private JTextArea bytecodeSyntaxTextArea; + private ActionListener bytesActionListener; + private ActionListener classesActionListener; + private ActionListener rewriteActionListener; +@@ -147,10 +147,10 @@ public class BytecodeDecompilerView { + } + }); + +- bytecodeSyntaxTextArea = new RSyntaxTextArea(); +- bytecodeSyntaxTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA); +- bytecodeSyntaxTextArea.setCodeFoldingEnabled(true); +- bytecodeScrollPane = new RTextScrollPane(bytecodeSyntaxTextArea); ++ bytecodeSyntaxTextArea = new JTextArea(); ++ //bytecodeSyntaxTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA); ++ //bytecodeSyntaxTextArea.setCodeFoldingEnabled(true); ++ bytecodeScrollPane = new JScrollPane(bytecodeSyntaxTextArea); + + leftMainPanel = new JPanel(); + leftMainPanel.setLayout(new BorderLayout()); +@@ -297,14 +297,14 @@ + Search string in decompiled code + */ + private void searchCode() { +- SearchContext context = new SearchContext(); +- String match = searchCodeField.getText(); +- context.setSearchFor(match); +- context.setWholeWord(false); +- SearchEngine.markAll(bytecodeSyntaxTextArea, context); +- int line = SearchEngine.getNextMatchPos(match, bytecodeSyntaxTextArea.getText(), true, true, false); +- if(line >= 0) { +- bytecodeSyntaxTextArea.setCaretPosition(line); +- } ++ //SearchContext context = new SearchContext(); ++ //String match = searchCodeField.getText(); ++ //context.setSearchFor(match); ++ //context.setWholeWord(false); ++ //SearchEngine.markAll(bytecodeSyntaxTextArea, context); ++ //int line = SearchEngine.getNextMatchPos(match, bytecodeSyntaxTextArea.getText(), true, true, false); ++ //if(line >= 0) { ++ //bytecodeSyntaxTextArea.setCaretPosition(line); ++ //} + } + } + From bb68dd54adc2dca2cb11f97d48acd53e8e6aa123 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 14:43:38 +0000 Subject: [PATCH 16/73] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 5f7bfd3..e01f50f 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 4.0 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -137,6 +137,9 @@ cp -v %{_builddir}/runtime-decompiler8.jarx $RPM_BUILD_ROOT%{_datadir}/java/%{n %license LICENSE %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Dec 08 2020 Jiri Vanek - 4.0-2 - Added subpackage built by jdk8 to allow looking into jdk8 apps - for some reason, jdk8 vm can not look into jdk11 vm, even if agent is correctly jdk8 version From 2b7694119f01525a3b66c4465fc210b53f1479a7 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 08:58:05 +0000 Subject: [PATCH 17/73] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index e01f50f..3272efd 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 4.0 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -137,6 +137,9 @@ cp -v %{_builddir}/runtime-decompiler8.jarx $RPM_BUILD_ROOT%{_datadir}/java/%{n %license LICENSE %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 4.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Jan 26 2021 Fedora Release Engineering - 4.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From b89613b4072247cace78a3742960f2fb5a82104c Mon Sep 17 00:00:00 2001 From: Jiri Date: Mon, 2 Aug 2021 19:59:20 +0200 Subject: [PATCH 18/73] Initial bump to 5.0 --- .gitignore | 1 + java-runtime-decompiler | 2 +- java-runtime-decompiler.spec | 67 +++++-------------------- java-runtime-decompiler8 | 94 ------------------------------------ rsyntaxVersion.patch | 2 +- sources | 2 +- systemFernflower.patch | 9 ++-- systemProcyon.patch | 9 ++-- 8 files changed, 25 insertions(+), 161 deletions(-) delete mode 100644 java-runtime-decompiler8 diff --git a/.gitignore b/.gitignore index ec0247b..4b41dde 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /java-runtime-decompiler-2.0.tar.gz /java-runtime-decompiler-3.0.tar.gz /java-runtime-decompiler-4.0.tar.gz +/java-runtime-decompiler-5.0.beta2.tar.gz diff --git a/java-runtime-decompiler b/java-runtime-decompiler index 56fd9ab..4357d7c 100644 --- a/java-runtime-decompiler +++ b/java-runtime-decompiler @@ -41,7 +41,7 @@ _set_java_home set_jvm # all dependencies must be on classpath -set_classpath java-runtime-decompiler rsyntaxtextarea byteman google-gson +set_classpath java-runtime-decompiler rsyntaxtextarea byteman google-gson classpathless-compiler CLASSPATH=$CLASSPATH:${JAVA_HOME}/lib/tools.jar # set path to agent automatically diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 3272efd..d5c5b8f 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,15 +1,13 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 4.0 -Release: 4%{?dist} +Version: 5.0.beta2 +Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz Source1: java-runtime-decompiler Source2: java-runtime-decompiler.1 Source3: jrd.desktop -Source4: java-runtime-decompiler8 -Patch0: remove_rsyntaxtextarea.patch Patch1: systemFernflower.patch Patch2: systemProcyon.patch Patch3: rsyntaxVersion.patch @@ -26,14 +24,16 @@ BuildRequires: maven-surefire-provider-junit5 BuildRequires: maven-surefire BuildRequires: maven-surefire-plugin BuildRequires: maven-clean-plugin -# depends on devel, not runtime (needs tools.jar, javap attach and manyn others) BuildRequires: java-11-devel -BuildRequires: java-1.8.0-devel BuildRequires: google-gson BuildRequires: desktop-file-utils -Requires: java-11-devel +BuildRequires: classpathless-compiler +Requires: java +Requires: classpathless-compiler Recommends: fernflower Recommends: procyon-decompiler +Recommends: CFR +Recommends: openjdk-asmtools %description This application can access JVM memory at runtime, @@ -45,43 +45,17 @@ Summary: Javadoc for %{name} %description javadoc This package contains the API documentation for %{name}. -%package jdk8 -Summary: jdk8 comaptible version of %{name}, may miss sme features -Requires: java-1.8.0-devel -Recommends: fernflower -Recommends: procyon-decompiler - -%description jdk8 -jdk8 comaptible version of %{name}, may miss sme features. -Eg rich text area is missng or the agent need to be adjusted manually - %prep %setup -q -n %{name}-%{name}-%{version} -%patch0 -p1 %patch1 -p0 %patch2 -p0 +%patch3 -p0 %build pushd runtime-decompiler %pom_remove_plugin :maven-jar-plugin popd -export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk -pushd runtime-decompiler -%pom_add_dep com.sun:tools -popd -%mvn_build --xmvn-javadoc --skip-javadoc --skip-install -- -Plegacy -find | grep .jar$ -mv -v ./decompiler_agent/target/decompiler-agent-%{version}.0-SNAPSHOT.jar ../decompiler-agent8.jarx #to avoid being mvn installed -mv -v ./runtime-decompiler/target/runtime-decompiler-%{version}.0-SNAPSHOT.jar ../runtime-decompiler8.jarx #to avoid being mvn installed -xmvn clean - -export JAVA_HOME=/usr/lib/jvm/java-11-openjdk -patch -p1 -R < %{PATCH0} -patch -p0 < %{PATCH3} -pushd runtime-decompiler -%pom_remove_dep com.sun:tools -popd %mvn_build --xmvn-javadoc %install @@ -91,7 +65,6 @@ install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1/ install -d -m 755 $RPM_BUILD_ROOT%{_bindir} install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ -install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}/ install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ cp -r %{_builddir}/%{name}-%{name}-%{version}/runtime-decompiler/src/plugins/ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ @@ -99,11 +72,6 @@ install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/applications desktop-file-install --vendor="fedora" \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE3} -mkdir -p $RPM_BUILD_ROOT%{_datadir}/java/%{name}-jdk8 -cp -v %{_builddir}/decompiler-agent8.jarx $RPM_BUILD_ROOT%{_datadir}/java/%{name}-jdk8/decompiler-agent8.jar -cp -v %{_builddir}/runtime-decompiler8.jarx $RPM_BUILD_ROOT%{_datadir}/java/%{name}-jdk8/runtime-decompiler8.jar - - %files -f .mfiles %attr(755, root, -) %{_bindir}/java-runtime-decompiler %{_mandir}/man1/java-runtime-decompiler.1* @@ -122,21 +90,12 @@ cp -v %{_builddir}/runtime-decompiler8.jarx $RPM_BUILD_ROOT%{_datadir}/java/%{n %files javadoc -f .mfiles-javadoc %license LICENSE -%files jdk8 -%attr(755, root, -) %{_bindir}/java-runtime-decompiler8 -%dir %{_datadir}/java/%{name}-jdk8 -%{_datadir}/java/%{name}-jdk8/runtime-decompiler8.jar -%{_datadir}/java/%{name}-jdk8/decompiler-agent8.jar -# wrappers for decompilers shared with main -%dir %{_sysconfdir}/%{name} -%dir %{_sysconfdir}/%{name}/plugins -%config %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.java -%config(noreplace) %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.json -%config %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.java -%config(noreplace) %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.json -%license LICENSE - %changelog +* Thu Aug 02 2021 Fedora Release Engineering - 5.0.beta2-1 +- updated to 5.0 +- removed jdk8 subpkg due to compiler api +- todo: Cfr and asmtools plugins, man page + * Thu Jul 22 2021 Fedora Release Engineering - 4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/java-runtime-decompiler8 b/java-runtime-decompiler8 deleted file mode 100644 index 0a31c1e..0000000 --- a/java-runtime-decompiler8 +++ /dev/null @@ -1,94 +0,0 @@ -#!/usr/bin/bash - -# java runtime decompiler launch script - -# JPackage Project -# Source functions library -echo "Special jdk8 build of JRD. " -echo "You will most likely set agent manually to java-runtime-decompiler-jdk8/decompiler-agent8.jar" -echo "Normal, jdk11 JRD should be able to reuse jdk8 agent, but not the oposite" -echo "No one can guarantee the bytecode level of decompilers. You may need to download older versions from somewhere" - -if [ "x$JAVA_HOME" = "x" ] ; then - export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk -fi - -. /usr/share/java-utils/java-functions - -# identify directory tree -JRD=`java-runtime-decompiler` -CONF_HOME=$XDG_CONFIG_HOME - - -if [ "$CONF_HOME" = "" ] ; then - CONF_HOME=$HOME/.config/$JRD - -else - CONF_HOME=$CONF_HOME/$JRD - -fi - -LOG_DIR=$CONF_HOME/logs - -CONF_DIR=$CONF_HOME/conf - -# create directory tree -PLUGIN_HOME=$CONF_HOME/plugins - -mkdir -p $LOG_DIR - -mkdir -p $CONF_DIR - -mkdir -p $PLUGIN_HOME - -: ${MAIN_CLASS:=org.jrd.backend.data.Main} - -# set java and jvm arguments -export _prefer_jre=false -_set_java_home -set_jvm - -# all dependencies must be on classpath -set_classpath byteman google-gson -CLASSPATH=$CLASSPATH:${JAVA_HOME}/lib/tools.jar:/usr/share/java/java-runtime-decompiler-jdk8/runtime-decompiler8.jar:/usr/share/java/java-runtime-decompiler-jdk8/decompiler-agent8.jar - -# set path to agent automatically -AGENT="/usr/share/java/java-runtime-decompiler/decompiler-agent8.jar" -CONFIG_FILE=$CONF_DIR/config.cfg -AGENT_PREFIX="AGENT_PATH===" -AGENT_STRING=$AGENT_PREFIX$AGENT - -# copy json wrappers information to home so the users can edit -CP_FILES="$(ls /etc/$JRD/plugins/*.json)" -for cpfile in $CP_FILES; do - FILE_NAME="$(basename -- $cpfile)" - if [ ! -e "$PLUGIN_HOME/$FILE_NAME" ] - then - cp $cpfile $PLUGIN_HOME - else - echo "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten." >&2 - fi -done - -# create config file and add agent default path -touch $CONFIG_FILE - -if [ -e $AGENT ] -then - if grep -Fxq $AGENT_STRING $CONFIG_FILE - then - echo "Default agent path is already set in $CONFIG_FILE. Skipping agent path setting." >&2 - elif grep -rq $AGENT_PREFIX $CONFIG_FILE - then - RESULT_OF_GREP="$(grep -rq $AGENT_PREFIX $CONFIG_FILE)" - echo "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting." >&2 - else - echo $AGENT_STRING >> $CONFIG_FILE - - fi -else - echo "Agent was not found and agent path was not set correctly. This has to be done manually in the decompiler GUI, or set AGENT_PATH===path_to_agent_jar in the configuration file: $CONFIG_FILE" >&2 -fi - -export FLAGS="$FLAGS -Djdk.attach.allowAttachSelf=true" -run "$@" diff --git a/rsyntaxVersion.patch b/rsyntaxVersion.patch index a681d71..cf084ca 100644 --- a/rsyntaxVersion.patch +++ b/rsyntaxVersion.patch @@ -4,7 +4,7 @@ com.fifesoft rsyntaxtextarea -- 2.6.1 +- 3.1.2 + 3.1.1 diff --git a/sources b/sources index 6cd7ade..4b08845 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-4.0.tar.gz) = 073c3f2868ad82feee407626ed8a9962ff76ee49dc5feecd253a572d507c10c814112faeee8e1d3bf0007f8a95d7750ab6eadd845e54174e5695ca68df622764 +SHA512 (java-runtime-decompiler-5.0.beta2.tar.gz) = 81269e4885f34227ea832c29fdc646a25f65e292ed72783c40b65ba59a1937daf021eac6c3cf2176b8b3b511e62c2ecbf5d72fb4b5f512b99ce4124d0749ba02 diff --git a/systemFernflower.patch b/systemFernflower.patch index ecb8d07..b179e10 100644 --- a/systemFernflower.patch +++ b/systemFernflower.patch @@ -4,13 +4,12 @@ { "Name": "Fernflower", - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/FernflowerDecompilerWrapper.java", -+ "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/FernflowerDecompilerWrapper.java", ++ "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/FernflowerDecompilerWrapper.java", "DependencyURL": [ -- "file://${HOME}/.m2/repository/org/jboss/windup/decompiler/decompiler-fernflower/4.2.1.Final/decompiler-fernflower-4.2.1.Final.jar", +- "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/fernflower/windup-fernflower/1.0.0.20171018/windup-fernflower-1.0.0.20171018.jar" + "file:///usr/share/java/fernflower.jar" ], "DecompilerDownloadURL": "https://github.com/JetBrains/intellij-community/tree/master/plugins/java-decompiler/engine" --} -\ No newline at end of file -+} + } + diff --git a/systemProcyon.patch b/systemProcyon.patch index 1581df9..342a998 100644 --- a/systemProcyon.patch +++ b/systemProcyon.patch @@ -6,13 +6,12 @@ - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonDecompilerWrapper.java", + "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/ProcyonDecompilerWrapper.java", "DependencyURL": [ -- "file://${HOME}/.m2/repository/org/bitbucket/mstrobel/procyon-core/0.5.35/procyon-core-0.5.35.jar", -- "file://${HOME}/.m2/repository/org/bitbucket/mstrobel/procyon-compilertools/0.5.35/procyon-compilertools-0.5.35.jar" +- "file://${HOME}/.m2/repository/org/bitbucket/mstrobel/procyon-core/0.5.36/procyon-core-0.5.36.jar", +- "file://${HOME}/.m2/repository/org/bitbucket/mstrobel/procyon-compilertools/0.5.36/procyon-compilertools-0.5.36.jar" + "/usr/share/java/procyon/procyon-core.jar", + "/usr/share/java/procyon/procyon-compilertools.jar", + "/usr/share/java/procyon/procyon-decompiler.jar" ], "DecompilerDownloadURL": "https://bitbucket.org/mstrobel/procyon/downloads/" --} -\ No newline at end of file -+} + } + From 82c25ec80a14a0a95eeaab00913ea9e7c10b206f Mon Sep 17 00:00:00 2001 From: Jiri Date: Thu, 5 Aug 2021 15:29:26 +0200 Subject: [PATCH 19/73] Patched cfr and asmtools plugins to use system libraries --- java-runtime-decompiler.spec | 17 ++++++++++++++++- systemCfr.patch | 14 ++++++++++++++ systemJasm.patch | 14 ++++++++++++++ systemJcoder.patch | 14 ++++++++++++++ 4 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 systemCfr.patch create mode 100644 systemJasm.patch create mode 100644 systemJcoder.patch diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index d5c5b8f..a605191 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -11,6 +11,11 @@ Source3: jrd.desktop Patch1: systemFernflower.patch Patch2: systemProcyon.patch Patch3: rsyntaxVersion.patch +Patch4: systemCfr.patch +Patch5: systemJasm.patch +Patch6: systemJcoder.patch + + BuildArch: noarch BuildRequires: maven-local BuildRequires: byteman @@ -50,6 +55,9 @@ This package contains the API documentation for %{name}. %patch1 -p0 %patch2 -p0 %patch3 -p0 +%patch4 -p0 +%patch5 -p0 +%patch6 -p0 %build pushd runtime-decompiler @@ -82,6 +90,12 @@ desktop-file-install --vendor="fedora" \ %config(noreplace) %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/CfrDecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/CfrDecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/JasmDecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmDecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/JcoderDecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/JcoderDecompilerWrapper.json %license LICENSE %dir %{_datadir}/applications @@ -94,7 +108,8 @@ desktop-file-install --vendor="fedora" \ * Thu Aug 02 2021 Fedora Release Engineering - 5.0.beta2-1 - updated to 5.0 - removed jdk8 subpkg due to compiler api -- todo: Cfr and asmtools plugins, man page +- added Cfr and asmtools plugins +- todo man page * Thu Jul 22 2021 Fedora Release Engineering - 4.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/systemCfr.patch b/systemCfr.patch new file mode 100644 index 0000000..2a0a77d --- /dev/null +++ b/systemCfr.patch @@ -0,0 +1,14 @@ +--- runtime-decompiler/src/plugins/CfrDecompilerWrapper.json ++++ runtime-decompiler/src/plugins/CfrDecompilerWrapper.json +@@ -1,8 +1,8 @@ + { + "Name": "Cfr", +- "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:/usr/share/java/CFR/cfr.jar" + ], + "DecompilerDownloadURL": "https://www.benf.org/other/cfr/faq.html" + } + diff --git a/systemJasm.patch b/systemJasm.patch new file mode 100644 index 0000000..b5099af --- /dev/null +++ b/systemJasm.patch @@ -0,0 +1,14 @@ +--- runtime-decompiler/src/plugins/JasmDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 ++++ runtime-decompiler/src/plugins/JasmDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 +@@ -1,8 +1,8 @@ + { + "Name": "jasm", +- "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/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar" ++ "file:/usr/share/java/openjdk-asmtools/asmtools-core.jar" + ], + "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" + } + diff --git a/systemJcoder.patch b/systemJcoder.patch new file mode 100644 index 0000000..1454b9e --- /dev/null +++ b/systemJcoder.patch @@ -0,0 +1,14 @@ +--- runtime-decompiler/src/plugins/JcoderDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 ++++ runtime-decompiler/src/plugins/JcoderDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 +@@ -1,8 +1,8 @@ + { + "Name": "jcoder", +- "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/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar" ++ "file:/usr/share/java/openjdk-asmtools/asmtools-core.jar" + ], + "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" + } + From aa22c8057ca7f57bbbd80283949b71dd2f688c57 Mon Sep 17 00:00:00 2001 From: Jiri Date: Mon, 9 Aug 2021 17:37:22 +0200 Subject: [PATCH 20/73] Bumped to rc1, fixed man page --- .gitignore | 1 + java-runtime-decompiler.1 | 32 -------------------------------- java-runtime-decompiler.spec | 11 +++++++---- sources | 2 +- 4 files changed, 9 insertions(+), 37 deletions(-) delete mode 100644 java-runtime-decompiler.1 diff --git a/.gitignore b/.gitignore index 4b41dde..caba84a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /java-runtime-decompiler-3.0.tar.gz /java-runtime-decompiler-4.0.tar.gz /java-runtime-decompiler-5.0.beta2.tar.gz +/java-runtime-decompiler-5.0.rc1.tar.gz diff --git a/java-runtime-decompiler.1 b/java-runtime-decompiler.1 deleted file mode 100644 index eb2cddd..0000000 --- a/java-runtime-decompiler.1 +++ /dev/null @@ -1,32 +0,0 @@ -.TH java-runtime-decompiler 1 "26 August 2019" "version 3.0" -.SH NAME -java-runtime-decompiler \- launch java-runtime decompiler GUI -.SH SYNOPSIS -java-runtime-decompiler -.SH DESCRIPTION -It is used for extraction of bytecode from running JVM and decompilation of the bytecode with an external decompiler. Paths to the decompiler need to be specified in .json configuration file located in /etc/java-runtime-decompiler -.SH OPTIONS -.IP -verbose -Print out all exceptions and debugging strings in stdout. -.IP -help -Print out help and exits. -.IP -listjvms -List available local JVMs. -.IP -listplugins -List currently configured plugins with their status. -.IP "-listclasses pid-xor-url" -List loaded classes from JVM with given PID/URL. -.IP "-bytes pid class-name" -Print on stdout binary form of given class loaded in JVM with given PID/URL. -.IP "-base64bytes pid-xor-url class-name" -Print on stdout binary form encoded in base64 of given class loaded in JVM with given PID/URL. -.IP "-decompile pid-xor-url class-name config-file" -Print on stdout decompiled class, needs PID/URL of JVM, class name and name/file with decompiler configuration, can use javap disassembler. To pass arguments to the disassembler, add them to javap without spaces (e.g. javap-v). -.IP "-overwrite pid/urlOfJVM classToOverwrite fileWithNewBytecode" -three args - pid or url of JVM and class to overwrite and file with new bytecode -.SH AUTHOR -Petra Alice Mikova (petra.alice.mikova@gmail.com) -Jiri Vanek (judovana@email.com) -Radek Manak (Radek.Manak@protonmail.com) -Ondrej Hrdlicka (ondra.ondrah@seznam.cz) - diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index a605191..6317955 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,12 +1,11 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 5.0.beta2 +Version: 5.0.rc1 Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz Source1: java-runtime-decompiler -Source2: java-runtime-decompiler.1 Source3: jrd.desktop Patch1: systemFernflower.patch Patch2: systemProcyon.patch @@ -65,11 +64,12 @@ pushd runtime-decompiler popd %mvn_build --xmvn-javadoc +java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-5.0-SNAPSHOT.jar org.jrd.backend.data.Help > %{name}.1 %install %mvn_install install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1/ -install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1/ +install -m 644 %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/ install -d -m 755 $RPM_BUILD_ROOT%{_bindir} install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ @@ -105,7 +105,10 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog -* Thu Aug 02 2021 Fedora Release Engineering - 5.0.beta2-1 +* Mon Aug 09 2021 Fedora Release Engineering - 5.0.rc1-1 +- adapted manpage + +* Mon Aug 02 2021 Fedora Release Engineering - 5.0.beta2-1 - updated to 5.0 - removed jdk8 subpkg due to compiler api - added Cfr and asmtools plugins diff --git a/sources b/sources index 4b08845..0958208 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-5.0.beta2.tar.gz) = 81269e4885f34227ea832c29fdc646a25f65e292ed72783c40b65ba59a1937daf021eac6c3cf2176b8b3b511e62c2ecbf5d72fb4b5f512b99ce4124d0749ba02 +SHA512 (java-runtime-decompiler-5.0.rc1.tar.gz) = c864e4847d83a25d241811cec9afe26b7c600e7f57f7c141ce85490936f414385d11334f20fb787fe32e65edb6e6fbf8028e2ca346f00ac6bfd716d6b4328576 From 735b10593d508b0a1fe20db890610bc6e56fceea Mon Sep 17 00:00:00 2001 From: Jiri Date: Mon, 9 Aug 2021 18:18:37 +0200 Subject: [PATCH 21/73] Minor tweaks --- java-runtime-decompiler.spec | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 6317955..d13b718 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 5.0.rc1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -32,7 +32,8 @@ BuildRequires: java-11-devel BuildRequires: google-gson BuildRequires: desktop-file-utils BuildRequires: classpathless-compiler -Requires: java +Requires: java-headless +Recommends: java Requires: classpathless-compiler Recommends: fernflower Recommends: procyon-decompiler @@ -45,6 +46,7 @@ extract byte code from the JVM and decompile it. %package javadoc Summary: Javadoc for %{name} +Requires: %{name} = %{version}-%{release} %description javadoc This package contains the API documentation for %{name}. @@ -83,7 +85,7 @@ desktop-file-install --vendor="fedora" \ %files -f .mfiles %attr(755, root, -) %{_bindir}/java-runtime-decompiler %{_mandir}/man1/java-runtime-decompiler.1* -# wrappers for decompilers shared with jdk8 subpackage +# wrappers for decompilers %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/plugins %config %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.java From 07fa5fc747a62e28a294b5ce72e2dd9560ba582f Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Thu, 12 Aug 2021 17:20:01 +0200 Subject: [PATCH 22/73] bumped to final sources --- .gitignore | 1 + java-runtime-decompiler.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index caba84a..1bb0ab1 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /java-runtime-decompiler-4.0.tar.gz /java-runtime-decompiler-5.0.beta2.tar.gz /java-runtime-decompiler-5.0.rc1.tar.gz +/java-runtime-decompiler-5.1.tar.gz diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index d13b718..4c9de0c 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 5.0.rc1 -Release: 2%{?dist} +Version: 5.1 +Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -66,7 +66,7 @@ pushd runtime-decompiler popd %mvn_build --xmvn-javadoc -java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-5.0-SNAPSHOT.jar org.jrd.backend.data.Help > %{name}.1 +java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-%{version}.jar org.jrd.backend.data.Help > %{name}.1 %install %mvn_install @@ -107,6 +107,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Thu Aug 12 2021 Fedora Release Engineering - 5.1-1 +- bumped to final sources + * Mon Aug 09 2021 Fedora Release Engineering - 5.0.rc1-1 - adapted manpage diff --git a/sources b/sources index 0958208..12c4568 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-5.0.rc1.tar.gz) = c864e4847d83a25d241811cec9afe26b7c600e7f57f7c141ce85490936f414385d11334f20fb787fe32e65edb6e6fbf8028e2ca346f00ac6bfd716d6b4328576 +SHA512 (java-runtime-decompiler-5.1.tar.gz) = 0a1e644696c7fc0595a9b4ca05ef1f392a78e5a6bb6e9631ede8a93776740ae8cf65ced0cfaacd7890985ee659e41947bcf17a87d7bc3ba5958ae84a943b64d9 From 665ff59e12335bc28d74a814baa31cd5b839ab72 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Thu, 12 Aug 2021 17:28:16 +0200 Subject: [PATCH 23/73] removed unused remove_rsyntaxtextarea.patch --- remove_rsyntaxtextarea.patch | 87 ------------------------------------ 1 file changed, 87 deletions(-) delete mode 100644 remove_rsyntaxtextarea.patch diff --git a/remove_rsyntaxtextarea.patch b/remove_rsyntaxtextarea.patch deleted file mode 100644 index 9b89d1b..0000000 --- a/remove_rsyntaxtextarea.patch +++ /dev/null @@ -1,87 +0,0 @@ -diff --git a/runtime-decompiler/pom.xml b/runtime-decompiler/pom.xml -index 26a416e..e6e2425 100644 ---- a/runtime-decompiler/pom.xml -+++ b/runtime-decompiler/pom.xml -@@ -135,11 +135,6 @@ - directories - 10 - --> -- -- com.fifesoft -- rsyntaxtextarea -- 2.6.1 -- - - org.jboss.byteman - byteman-install -diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/BytecodeDecompilerView.java b/runtime-decompiler/src/main/java/org/jrd/frontend/BytecodeDecompilerView.java -index 9c19e2c..8d17775 100644 ---- a/runtime-decompiler/src/main/java/org/jrd/frontend/MainFrame/BytecodeDecompilerView.java -+++ b/runtime-decompiler/src/main/java/org/jrd/frontend/MainFrame/BytecodeDecompilerView.java -@@ -1,11 +1,11 @@ - package org.jrd.frontend.MainFrame; - --import org.fife.ui.rsyntaxtextarea.*; --import org.fife.ui.rtextarea.SearchContext; --import org.fife.ui.rtextarea.SearchEngine; -+//import org.fife.ui.rsyntaxtextarea.*; -+//import org.fife.ui.rtextarea.SearchContext; -+//import org.fife.ui.rtextarea.SearchEngine; - import org.jrd.backend.core.OutputController; - import org.jrd.backend.decompiling.DecompilerWrapperInformation; --import org.fife.ui.rtextarea.RTextScrollPane; -+//import org.fife.ui.rtextarea.RTextScrollPane; - - import javax.swing.*; - import javax.swing.border.EtchedBorder; -@@ -30,8 +30,8 @@ public class BytecodeDecompilerView { - private JPanel rightMainPanel; - private JScrollPane leftScrollPanel; - private JList filteredClassesJlist; -- private RTextScrollPane bytecodeScrollPane; -- private RSyntaxTextArea bytecodeSyntaxTextArea; -+ private JScrollPane bytecodeScrollPane; -+ private JTextArea bytecodeSyntaxTextArea; - private ActionListener bytesActionListener; - private ActionListener classesActionListener; - private ActionListener rewriteActionListener; -@@ -147,10 +147,10 @@ public class BytecodeDecompilerView { - } - }); - -- bytecodeSyntaxTextArea = new RSyntaxTextArea(); -- bytecodeSyntaxTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA); -- bytecodeSyntaxTextArea.setCodeFoldingEnabled(true); -- bytecodeScrollPane = new RTextScrollPane(bytecodeSyntaxTextArea); -+ bytecodeSyntaxTextArea = new JTextArea(); -+ //bytecodeSyntaxTextArea.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA); -+ //bytecodeSyntaxTextArea.setCodeFoldingEnabled(true); -+ bytecodeScrollPane = new JScrollPane(bytecodeSyntaxTextArea); - - leftMainPanel = new JPanel(); - leftMainPanel.setLayout(new BorderLayout()); -@@ -297,14 +297,14 @@ - Search string in decompiled code - */ - private void searchCode() { -- SearchContext context = new SearchContext(); -- String match = searchCodeField.getText(); -- context.setSearchFor(match); -- context.setWholeWord(false); -- SearchEngine.markAll(bytecodeSyntaxTextArea, context); -- int line = SearchEngine.getNextMatchPos(match, bytecodeSyntaxTextArea.getText(), true, true, false); -- if(line >= 0) { -- bytecodeSyntaxTextArea.setCaretPosition(line); -- } -+ //SearchContext context = new SearchContext(); -+ //String match = searchCodeField.getText(); -+ //context.setSearchFor(match); -+ //context.setWholeWord(false); -+ //SearchEngine.markAll(bytecodeSyntaxTextArea, context); -+ //int line = SearchEngine.getNextMatchPos(match, bytecodeSyntaxTextArea.getText(), true, true, false); -+ //if(line >= 0) { -+ //bytecodeSyntaxTextArea.setCaretPosition(line); -+ //} - } - } - From 89e93ebbcad36dd2e6ac83bdfbb8f3e0198d3030 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Wed, 1 Dec 2021 18:53:17 +0100 Subject: [PATCH 24/73] Bumped to 1. prerelase od 6.0 --- .gitignore | 1 + java-runtime-decompiler.spec | 14 +++++++++++--- sources | 2 +- systemJcoder.patch | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 1bb0ab1..c3dfe80 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /java-runtime-decompiler-5.0.beta2.tar.gz /java-runtime-decompiler-5.0.rc1.tar.gz /java-runtime-decompiler-5.1.tar.gz +/java-runtime-decompiler-6.0.0.pre.1.tar.gz diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 4c9de0c..eee1535 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,6 +1,6 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 5.1 +Version: 6.0.0.pre.1 Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler @@ -28,7 +28,7 @@ BuildRequires: maven-surefire-provider-junit5 BuildRequires: maven-surefire BuildRequires: maven-surefire-plugin BuildRequires: maven-clean-plugin -BuildRequires: java-11-devel +BuildRequires: java-devel BuildRequires: google-gson BuildRequires: desktop-file-utils BuildRequires: classpathless-compiler @@ -64,8 +64,11 @@ This package contains the API documentation for %{name}. pushd runtime-decompiler %pom_remove_plugin :maven-jar-plugin popd +%pom_remove_plugin :spotbugs-maven-plugin +%pom_remove_plugin :maven-checkstyle-plugin +%pom_remove_dep :spotbugs-annotations -%mvn_build --xmvn-javadoc +%mvn_build --xmvn-javadoc -- -Plegacy java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-%{version}.jar org.jrd.backend.data.Help > %{name}.1 %install @@ -107,6 +110,11 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Thu Aug 12 2021 Fedora Release Engineering - 6.0.0.pre.1-1 +- umped sources to upstream pre release +- adapted jcoder plugin +- todo, patch for removed plugins + * Thu Aug 12 2021 Fedora Release Engineering - 5.1-1 - bumped to final sources diff --git a/sources b/sources index 12c4568..52a8086 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-5.1.tar.gz) = 0a1e644696c7fc0595a9b4ca05ef1f392a78e5a6bb6e9631ede8a93776740ae8cf65ced0cfaacd7890985ee659e41947bcf17a87d7bc3ba5958ae84a943b64d9 +SHA512 (java-runtime-decompiler-6.0.0.pre.1.tar.gz) = a6d3525f36b2a529fe57cea03131d8b112ca17f90a31356ae8bddcc20b852b17663763baf62d88aed1778148f235c12fc923377d62c0e5fd66d6fadb79d502ce diff --git a/systemJcoder.patch b/systemJcoder.patch index 1454b9e..bdbacc7 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/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar" + "file:/usr/share/java/openjdk-asmtools/asmtools-core.jar" ], "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" From 28ef89d33d63d8c59b4727d82f6dcf45c96b1d29 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Wed, 1 Dec 2021 19:08:39 +0100 Subject: [PATCH 25/73] Removed also formater plugin --- java-runtime-decompiler.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index eee1535..34aee33 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -66,6 +66,7 @@ pushd runtime-decompiler popd %pom_remove_plugin :spotbugs-maven-plugin %pom_remove_plugin :maven-checkstyle-plugin +%pom_remove_plugin :formatter-maven-plugin %pom_remove_dep :spotbugs-annotations %mvn_build --xmvn-javadoc -- -Plegacy From bfa609e149f7641bc628b3d5a926c795caed96c1 Mon Sep 17 00:00:00 2001 From: Jiri Date: Wed, 1 Dec 2021 22:55:21 +0100 Subject: [PATCH 26/73] Removed spotbugs in code --- java-runtime-decompiler.spec | 8 ++++++- removeMultilineSpotbugs.patch | 39 +++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 removeMultilineSpotbugs.patch diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 34aee33..0aaba92 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -13,7 +13,7 @@ Patch3: rsyntaxVersion.patch Patch4: systemCfr.patch Patch5: systemJasm.patch Patch6: systemJcoder.patch - +Patch7: removeMultilineSpotbugs.patch BuildArch: noarch BuildRequires: maven-local @@ -59,6 +59,7 @@ This package contains the API documentation for %{name}. %patch4 -p0 %patch5 -p0 %patch6 -p0 +%patch7 -p1 %build pushd runtime-decompiler @@ -68,6 +69,11 @@ popd %pom_remove_plugin :maven-checkstyle-plugin %pom_remove_plugin :formatter-maven-plugin %pom_remove_dep :spotbugs-annotations +a=`find | grep ".*\.java$"` +for x in $a ; do + #grep -e ".*SuppressFBWarnings.*" $x && echo "^ $x ^" + sed "s/.*SuppressFBWarnings.*//g" $x -i +done %mvn_build --xmvn-javadoc -- -Plegacy java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-%{version}.jar org.jrd.backend.data.Help > %{name}.1 diff --git a/removeMultilineSpotbugs.patch b/removeMultilineSpotbugs.patch new file mode 100644 index 0000000..51763b5 --- /dev/null +++ b/removeMultilineSpotbugs.patch @@ -0,0 +1,39 @@ +--- 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() { + From b62f1000e039dbad79460538d66c6177ff50ae02 Mon Sep 17 00:00:00 2001 From: Jiri Date: Wed, 1 Dec 2021 23:04:12 +0100 Subject: [PATCH 27/73] Temporarily changed version for target --- java-runtime-decompiler.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 0aaba92..1488b1a 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,5 +1,6 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler +%global tmpVersion 6.0-0.pre.1 Version: 6.0.0.pre.1 Release: 1%{?dist} License: GPLv3 @@ -75,8 +76,8 @@ for x in $a ; do sed "s/.*SuppressFBWarnings.*//g" $x -i done -%mvn_build --xmvn-javadoc -- -Plegacy -java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-%{version}.jar org.jrd.backend.data.Help > %{name}.1 +%mvn_build -f --xmvn-javadoc -- -Plegacy +java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-%{tmpVersion}.jar org.jrd.backend.data.Help > %{name}.1 %install %mvn_install From f875dd3df660726f44cfbf8be813abad2a14d2cf Mon Sep 17 00:00:00 2001 From: Jiri Date: Sun, 26 Dec 2021 12:14:52 +0100 Subject: [PATCH 28/73] bumped sources to upstream pre release --- .gitignore | 1 + java-runtime-decompiler.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index c3dfe80..0d06bbc 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /java-runtime-decompiler-5.0.rc1.tar.gz /java-runtime-decompiler-5.1.tar.gz /java-runtime-decompiler-6.0.0.pre.1.tar.gz +/java-runtime-decompiler-6.0.0.pre.2.tar.gz diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 1488b1a..66c32c2 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -%global tmpVersion 6.0-0.pre.1 -Version: 6.0.0.pre.1 +%global tmpVersion 6.0-0.pre.2 +Version: 6.0.0.pre.2 Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler @@ -118,6 +118,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Sun Dec 26 2021 Fedora Release Engineering - 6.0.0.pre.2-1 +- bumped sources to upstream pre release + * Thu Aug 12 2021 Fedora Release Engineering - 6.0.0.pre.1-1 - umped sources to upstream pre release - adapted jcoder plugin diff --git a/sources b/sources index 52a8086..2bf644c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-6.0.0.pre.1.tar.gz) = a6d3525f36b2a529fe57cea03131d8b112ca17f90a31356ae8bddcc20b852b17663763baf62d88aed1778148f235c12fc923377d62c0e5fd66d6fadb79d502ce +SHA512 (java-runtime-decompiler-6.0.0.pre.2.tar.gz) = 731260187f6166df5840fd0f0d671cb37a15d8dd21391363563a96c8d3bdade6f25e5a07111b5ddf6114ddd21d3fe669c358fce9bfd66de621de6bc5b42af574 From fcf89fc6437965265c9a5af86fe165faf018d81a Mon Sep 17 00:00:00 2001 From: Jiri Date: Sun, 26 Dec 2021 12:16:42 +0100 Subject: [PATCH 29/73] Added opens of javap for jdk17+ --- java-runtime-decompiler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-runtime-decompiler b/java-runtime-decompiler index 4357d7c..b765d90 100644 --- a/java-runtime-decompiler +++ b/java-runtime-decompiler @@ -82,5 +82,5 @@ else echo "Agent was not found and agent path was not set correctly. This has to be done manually in the decompiler GUI, or set AGENT_PATH===path_to_agent_jar in the configuration file: $CONFIG_FILE" >&2 fi -export FLAGS="$FLAGS -Djdk.attach.allowAttachSelf=true" +export FLAGS="$FLAGS -Djdk.attach.allowAttachSelf=true --add-exports jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED" # jdk11+ do not allow attach by default; jdk17 is hiding javap api run "$@" From 8ed7ace80f4af387eecfefea1ac1d81068656b32 Mon Sep 17 00:00:00 2001 From: Jiri Date: Sun, 26 Dec 2021 12:20:45 +0100 Subject: [PATCH 30/73] made launcehr ab it more verbose by default --- java-runtime-decompiler | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/java-runtime-decompiler b/java-runtime-decompiler index b765d90..9bc7c0a 100644 --- a/java-runtime-decompiler +++ b/java-runtime-decompiler @@ -7,6 +7,15 @@ . /usr/share/java-utils/java-functions +echo $@ | grep -q -e "-verbose" +verbose=$? + +function warning() { + if [ $verbose -eq 0 ] ; then + echo ${1} >&2 + fi +} + # identify directory tree JRD=`basename $0` CONF_HOME=$XDG_CONFIG_HOME @@ -58,7 +67,7 @@ for cpfile in $CP_FILES; do then cp $cpfile $PLUGIN_HOME else - echo "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten." >&2 + warning "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten." fi done @@ -69,11 +78,11 @@ if [ -e $AGENT ] then if grep -Fxq $AGENT_STRING $CONFIG_FILE then - echo "Default agent path is already set in $CONFIG_FILE. Skipping agent path setting." >&2 + warning "Default agent path is already set in $CONFIG_FILE. Skipping agent path setting." elif grep -rq $AGENT_PREFIX $CONFIG_FILE then RESULT_OF_GREP="$(grep -rq $AGENT_PREFIX $CONFIG_FILE)" - echo "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting." >&2 + warning "Agent path is already set in $CONFIG_FILE as ${RESULT_OF_GREP}. Skipping agent path setting." else echo $AGENT_STRING >> $CONFIG_FILE From 59edadc76271b77818843550c382575b38925c8c Mon Sep 17 00:00:00 2001 From: Jiri Date: Sun, 26 Dec 2021 12:29:32 +0100 Subject: [PATCH 31/73] Fixed runtime claspath for objectweb-asmtools now mandatory for everything --- java-runtime-decompiler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-runtime-decompiler b/java-runtime-decompiler index 9bc7c0a..8d2082d 100644 --- a/java-runtime-decompiler +++ b/java-runtime-decompiler @@ -50,7 +50,7 @@ _set_java_home set_jvm # all dependencies must be on classpath -set_classpath java-runtime-decompiler rsyntaxtextarea byteman google-gson classpathless-compiler +set_classpath java-runtime-decompiler rsyntaxtextarea byteman google-gson classpathless-compiler objectweb-asm CLASSPATH=$CLASSPATH:${JAVA_HOME}/lib/tools.jar # set path to agent automatically From 99db0d5e5ff772895bc7f50ee8e12dd68dc56631 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Wed, 5 Jan 2022 14:41:07 +0100 Subject: [PATCH 32/73] bumped sources to upstream rc candidate --- .gitignore | 1 + java-runtime-decompiler.spec | 7 +++++-- sources | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 0d06bbc..390a511 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ /java-runtime-decompiler-5.1.tar.gz /java-runtime-decompiler-6.0.0.pre.1.tar.gz /java-runtime-decompiler-6.0.0.pre.2.tar.gz +/java-runtime-decompiler-6.0.0.pre.3.tar.gz diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 66c32c2..80ba867 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -%global tmpVersion 6.0-0.pre.2 -Version: 6.0.0.pre.2 +%global tmpVersion 6.0-0.pre.3 +Version: 6.0.0.pre.3 Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler @@ -118,6 +118,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Sun Dec 26 2021 Fedora Release Engineering - 6.0.0.pre.3-1 +- bumped sources to upstream rc candidate + * Sun Dec 26 2021 Fedora Release Engineering - 6.0.0.pre.2-1 - bumped sources to upstream pre release diff --git a/sources b/sources index 2bf644c..da829a4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-6.0.0.pre.2.tar.gz) = 731260187f6166df5840fd0f0d671cb37a15d8dd21391363563a96c8d3bdade6f25e5a07111b5ddf6114ddd21d3fe669c358fce9bfd66de621de6bc5b42af574 +SHA512 (java-runtime-decompiler-6.0.0.pre.3.tar.gz) = 425573d32646d9d6c4f71568c44b73977bea346835344dcbeeb1a3f3e39a7f0ddb48c7790f0576385615bad95a571d660f13698fe62ca3ccd186f0e3669300e2 From 2f17132bf967c493c54d5df9c33d44eafc791d44 Mon Sep 17 00:00:00 2001 From: Jiri Date: Fri, 7 Jan 2022 17:09:06 +0100 Subject: [PATCH 33/73] Moved to pstream 6.1 --- .gitignore | 1 + java-runtime-decompiler.spec | 5 ++--- sources | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 390a511..c014da0 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /java-runtime-decompiler-6.0.0.pre.1.tar.gz /java-runtime-decompiler-6.0.0.pre.2.tar.gz /java-runtime-decompiler-6.0.0.pre.3.tar.gz +/java-runtime-decompiler-6.1.tar.gz diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 80ba867..f732b91 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,6 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -%global tmpVersion 6.0-0.pre.3 -Version: 6.0.0.pre.3 +Version: 6.1 Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler @@ -77,7 +76,7 @@ for x in $a ; do done %mvn_build -f --xmvn-javadoc -- -Plegacy -java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-%{tmpVersion}.jar org.jrd.backend.data.Help > %{name}.1 +java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-%{version}.jar org.jrd.backend.data.Help > %{name}.1 %install %mvn_install diff --git a/sources b/sources index da829a4..2c65d53 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-6.0.0.pre.3.tar.gz) = 425573d32646d9d6c4f71568c44b73977bea346835344dcbeeb1a3f3e39a7f0ddb48c7790f0576385615bad95a571d660f13698fe62ca3ccd186f0e3669300e2 +SHA512 (java-runtime-decompiler-6.1.tar.gz) = 41bd87f0311d47819107fbd34173e4e1cebef71eb8651a337fb71a30947ffbb6bcaea6877508e0a02b0b2fcead7fe51497ed6251329a0254a8ee48220275e86f From 2090da310d7dcc53c16eddc0af9aa26eed07e2f9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 13:41:04 +0000 Subject: [PATCH 34/73] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index f732b91..5ecc78a 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 6.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -117,6 +117,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Sun Dec 26 2021 Fedora Release Engineering - 6.0.0.pre.3-1 - bumped sources to upstream rc candidate From e100240af47a3f6d254539908e3a04b7e21a64b8 Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 5 Feb 2022 21:25:40 +0100 Subject: [PATCH 35/73] Rebuilt for java-17-openjdk as system jdk https://fedoraproject.org/wiki/Changes/Java17 --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 5ecc78a..732473b 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 6.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -117,6 +117,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Sat Feb 05 2022 Jiri Vanek - 6.1-3 +- Rebuilt for java-17-openjdk as system jdk + * Thu Jan 20 2022 Fedora Release Engineering - 6.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 5b71d03411f7f3e764f56337106ffe1c358680dc Mon Sep 17 00:00:00 2001 From: Jiri Date: Fri, 8 Jul 2022 15:38:22 +0200 Subject: [PATCH 36/73] Rebuilt for Drop i686 JDKs https://fedoraproject.org/wiki/Changes/Drop_i686_JDKs --- java-runtime-decompiler.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 732473b..1a87cbb 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 6.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -16,6 +16,7 @@ Patch6: systemJcoder.patch Patch7: removeMultilineSpotbugs.patch BuildArch: noarch +ExclusiveArch: %{java_arches} noarch BuildRequires: maven-local BuildRequires: byteman BuildRequires: rsyntaxtextarea @@ -117,6 +118,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Fri Jul 08 2022 Jiri Vanek - 6.1-4 +- Rebuilt for Drop i686 JDKs + * Sat Feb 05 2022 Jiri Vanek - 6.1-3 - Rebuilt for java-17-openjdk as system jdk From 0ba44203745691ef7d23d9bd07ae65af90a47b87 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 15:07:04 +0000 Subject: [PATCH 37/73] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 1a87cbb..4726063 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 6.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -118,6 +118,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 6.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Fri Jul 08 2022 Jiri Vanek - 6.1-4 - Rebuilt for Drop i686 JDKs From bca7c96f93d08ee65263d7f2b4c38a20e2e1a71e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 13:36:46 +0000 Subject: [PATCH 38/73] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 4726063..2bb7dcb 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 6.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -118,6 +118,9 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 6.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 4bf0872e616d19ed594256afdb477fa6af4226f5 Mon Sep 17 00:00:00 2001 From: Jiri Date: Wed, 15 Mar 2023 10:33:27 +0100 Subject: [PATCH 39/73] moved to jrd 7.1 todo: asm7/g/procyonassembler wrappers new launchers new classpath (diff, cplc api...) ? --- .gitignore | 1 + java-runtime-decompiler.spec | 26 ++++++++++++++++++-------- removeMultilineSpotbugs.patch | 13 +++++++++++++ sources | 2 +- systemJasm.patch | 5 ++--- systemJcoder.patch | 4 ++-- systemProcyon.patch | 14 +++++++------- 7 files changed, 44 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index c014da0..741bd3d 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /java-runtime-decompiler-6.0.0.pre.2.tar.gz /java-runtime-decompiler-6.0.0.pre.3.tar.gz /java-runtime-decompiler-6.1.tar.gz +/java-runtime-decompiler-7.1.tar.gz diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 2bb7dcb..45a3fa2 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 6.1 -Release: 6%{?dist} +Version: 7.1 +Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -24,6 +24,7 @@ BuildRequires: junit5 BuildRequires: ant-junit5 BuildRequires: junit BuildRequires: ant-junit +BuildRequires: java-diff-utils BuildRequires: maven-surefire-provider-junit BuildRequires: maven-surefire-provider-junit5 BuildRequires: maven-surefire @@ -36,14 +37,17 @@ BuildRequires: classpathless-compiler Requires: java-headless Recommends: java Requires: classpathless-compiler +Requires: java-diff-utils Recommends: fernflower -Recommends: procyon-decompiler +Recommends: procyon-decompiler >= 0.6 Recommends: CFR -Recommends: openjdk-asmtools +Recommends: openjdk-asmtools >= 8.0 +Recommends: openjdk-asmtools7 %description This application can access JVM memory at runtime, extract byte code from the JVM and decompile it. +In addition, it can modify the obtained code and comple it back %package javadoc Summary: Javadoc for %{name} @@ -75,9 +79,13 @@ for x in $a ; do #grep -e ".*SuppressFBWarnings.*" $x && echo "^ $x ^" sed "s/.*SuppressFBWarnings.*//g" $x -i done - +xmvn --version +echo $JAVA_HOME +export JAVA_HOME=/usr/lib/jvm/java-17-openjdk #why? +xmvn --version %mvn_build -f --xmvn-javadoc -- -Plegacy -java -cp /usr/share/java/classpathless-compiler/classpathless-compiler.jar:runtime-decompiler/target/runtime-decompiler-%{version}.jar org.jrd.backend.data.Help > %{name}.1 +CPLC=/usr/share/java/classpathless-compiler +java -cp $CPLC/classpathless-compiler.jar:$CPLC/classpathless-compiler-api.jar:$CPLC/classpathless-compiler-util.jar:runtime-decompiler/target/runtime-decompiler-%{version}.jar org.jrd.backend.data.cli.Help > %{name}.1 %install %mvn_install @@ -118,8 +126,10 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog -* Thu Jan 19 2023 Fedora Release Engineering - 6.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild +* Thu Mar 15 2023 Fedora Release Engineering - 7.1-1 +- moved to jrd 7.1 +- todo:asm7/g/procyonassembler wrappers, new launchers, new classpath (diff, cplc api...) +- verify current wrappers * Thu Jul 21 2022 Fedora Release Engineering - 6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/removeMultilineSpotbugs.patch b/removeMultilineSpotbugs.patch index 51763b5..e612855 100644 --- a/removeMultilineSpotbugs.patch +++ b/removeMultilineSpotbugs.patch @@ -36,4 +36,17 @@ 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. + */ diff --git a/sources b/sources index 2c65d53..2d86801 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-6.1.tar.gz) = 41bd87f0311d47819107fbd34173e4e1cebef71eb8651a337fb71a30947ffbb6bcaea6877508e0a02b0b2fcead7fe51497ed6251329a0254a8ee48220275e86f +SHA512 (java-runtime-decompiler-7.1.tar.gz) = 09f76e0f82823089ce122a02b66664535afba3a5bbd30a48f2cf1ba505647d75ba67b2c361eadd084d025ff77298f6973c9eaaef970ff5a83d69573c3ab5fd7b diff --git a/systemJasm.patch b/systemJasm.patch index b5099af..eff068f 100644 --- a/systemJasm.patch +++ b/systemJasm.patch @@ -6,9 +6,8 @@ - "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/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar" -+ "file:/usr/share/java/openjdk-asmtools/asmtools-core.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b02-ea/asmtools-8.0.b02-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 bdbacc7..cf6ce68 100644 --- a/systemJcoder.patch +++ b/systemJcoder.patch @@ -6,8 +6,8 @@ - "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/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar" -+ "file:/usr/share/java/openjdk-asmtools/asmtools-core.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b02-ea/asmtools-8.0.b02-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 342a998..74bf4e5 100644 --- a/systemProcyon.patch +++ b/systemProcyon.patch @@ -1,17 +1,17 @@ --- runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 +++ runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 -@@ -1,9 +1,10 @@ - { +@@ -2,9 +2,9 @@ "Name": "Procyon", -- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonDecompilerWrapper.java", -+ "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/ProcyonDecompilerWrapper.java", + "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonDecompilerWrapper.java", "DependencyURL": [ -- "file://${HOME}/.m2/repository/org/bitbucket/mstrobel/procyon-core/0.5.36/procyon-core-0.5.36.jar", -- "file://${HOME}/.m2/repository/org/bitbucket/mstrobel/procyon-compilertools/0.5.36/procyon-compilertools-0.5.36.jar" +- "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" + "/usr/share/java/procyon/procyon-core.jar", + "/usr/share/java/procyon/procyon-compilertools.jar", + "/usr/share/java/procyon/procyon-decompiler.jar" ], - "DecompilerDownloadURL": "https://bitbucket.org/mstrobel/procyon/downloads/" + "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/git " } + From ff42bdeea2045bc3834f249016f8397ae746dab5 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Fri, 17 Mar 2023 16:31:01 +0100 Subject: [PATCH 40/73] Adapted decompiler plugins todo, test them (and a bit more) --- java-runtime-decompiler.spec | 41 +++++++++++++++++++++++++++++++++--- systemJasm7.patch | 13 ++++++++++++ systemJasmG.patch | 13 ++++++++++++ systemJasmG7.patch | 13 ++++++++++++ systemJcoder7.patch | 14 ++++++++++++ systemJcoderG.patch | 14 ++++++++++++ systemJcoderG7.patch | 14 ++++++++++++ systemProcyon.patch | 3 ++- systemProcyonAssembler.patch | 18 ++++++++++++++++ 9 files changed, 139 insertions(+), 4 deletions(-) create mode 100644 systemJasm7.patch create mode 100644 systemJasmG.patch create mode 100644 systemJasmG7.patch create mode 100644 systemJcoder7.patch create mode 100644 systemJcoderG.patch create mode 100644 systemJcoderG7.patch create mode 100644 systemProcyonAssembler.patch diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 45a3fa2..373f868 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -9,10 +9,17 @@ Source1: java-runtime-decompiler Source3: jrd.desktop Patch1: systemFernflower.patch Patch2: systemProcyon.patch +Patch21: systemProcyonAssembler.patch Patch3: rsyntaxVersion.patch Patch4: systemCfr.patch Patch5: systemJasm.patch +Patch51: systemJasm7.patch +Patch52: systemJasmG.patch +Patch53: systemJasmG7.patch Patch6: systemJcoder.patch +Patch61: systemJcoder7.patch +Patch62: systemJcoderG.patch +Patch63: systemJcoderG7.patch Patch7: removeMultilineSpotbugs.patch BuildArch: noarch @@ -60,10 +67,17 @@ This package contains the API documentation for %{name}. %setup -q -n %{name}-%{name}-%{version} %patch1 -p0 %patch2 -p0 +%patch21 -p0 %patch3 -p0 %patch4 -p0 %patch5 -p0 +%patch51 -p0 +%patch52 -p0 +%patch53 -p0 %patch6 -p0 +%patch61 -p0 +%patch62 -p0 +%patch63 -p0 %patch7 -p1 %build @@ -101,6 +115,11 @@ install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/applications desktop-file-install --vendor="fedora" \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE3} +#jd is not yet packed and sucks anyway +rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.java +rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json + + %files -f .mfiles %attr(755, root, -) %{_bindir}/java-runtime-decompiler %{_mandir}/man1/java-runtime-decompiler.1* @@ -111,12 +130,26 @@ desktop-file-install --vendor="fedora" \ %config(noreplace) %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/ProcyonAssemblerDecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/ProcyonAssemblerDecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/CfrDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/CfrDecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/JasmDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmDecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/JasmGDecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmGDecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/Jasm7DecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/Jasm7DecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/JasmG7DecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmG7DecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/JcoderDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/JcoderDecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/JcoderGDecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/JcoderGDecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/Jcoder7DecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/Jcoder7DecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/JcoderG7DecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/JcoderG7DecompilerWrapper.json %license LICENSE %dir %{_datadir}/applications @@ -126,10 +159,12 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog -* Thu Mar 15 2023 Fedora Release Engineering - 7.1-1 +* Wed Mar 15 2023 Fedora Release Engineering - 7.1-1 - moved to jrd 7.1 -- todo:asm7/g/procyonassembler wrappers, new launchers, new classpath (diff, cplc api...) -- verify current wrappers +- todo: new launchers, new classpath (diff, cplc api...) +- verify current wrappers +- fixed procyon wrapper +- removed jd wrapper (was new in 7.1) * Thu Jul 21 2022 Fedora Release Engineering - 6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/systemJasm7.patch b/systemJasm7.patch new file mode 100644 index 0000000..5b4da96 --- /dev/null +++ b/systemJasm7.patch @@ -0,0 +1,13 @@ +--- runtime-decompiler/src/plugins/Jasm7DecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 ++++ runtime-decompiler/src/plugins/Jasm7DecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 +@@ -1,8 +1,8 @@ + { + "Name": "jasm7", +- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/Jasm7DecompilerWrapper.java", ++ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/Jasm7DecompilerWrapper.java", + "DependencyURL": [ +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar" ++ "file:/usr/share/java/openjdk-asmtools7/asmtools-core.jar" + ], + "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" + } diff --git a/systemJasmG.patch b/systemJasmG.patch new file mode 100644 index 0000000..0171e99 --- /dev/null +++ b/systemJasmG.patch @@ -0,0 +1,13 @@ +--- runtime-decompiler/src/plugins/JasmGDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 ++++ runtime-decompiler/src/plugins/JasmGDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 +@@ -1,8 +1,8 @@ + { + "Name": "jasmG", +- "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.b02-ea/asmtools-8.0.b02-ea.jar" ++ "file:/usr/share/java/openjdk-asmtools/asmtools.jar" + ], + "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" + } diff --git a/systemJasmG7.patch b/systemJasmG7.patch new file mode 100644 index 0000000..f0f0e55 --- /dev/null +++ b/systemJasmG7.patch @@ -0,0 +1,13 @@ +--- runtime-decompiler/src/plugins/JasmG7DecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 ++++ runtime-decompiler/src/plugins/JasmG7DecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 +@@ -1,8 +1,8 @@ + { + "Name": "jasmG7", +- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JasmG7DecompilerWrapper.java", ++ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JasmG7DecompilerWrapper.java", + "DependencyURL": [ +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar" ++ "file:/usr/share/java/openjdk-asmtools7/asmtools-core.jar" + ], + "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" + } diff --git a/systemJcoder7.patch b/systemJcoder7.patch new file mode 100644 index 0000000..d39c0ce --- /dev/null +++ b/systemJcoder7.patch @@ -0,0 +1,14 @@ +--- runtime-decompiler/src/plugins/Jcoder7DecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 ++++ runtime-decompiler/src/plugins/Jcoder7DecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 +@@ -1,8 +1,8 @@ + { + "Name": "jcoder7", +- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/Jcoder7DecompilerWrapper.java", ++ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/Jcoder7DecompilerWrapper.java", + "DependencyURL": [ +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar" ++ "file:/usr/share/java/openjdk-asmtools7/asmtools-core.jar" + ], + "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" + } + diff --git a/systemJcoderG.patch b/systemJcoderG.patch new file mode 100644 index 0000000..85d8a63 --- /dev/null +++ b/systemJcoderG.patch @@ -0,0 +1,14 @@ +--- runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 ++++ runtime-decompiler/src/plugins/JcoderGDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 +@@ -1,8 +1,8 @@ + { + "Name": "jcoderG", +- "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.b02-ea/asmtools-8.0.b02-ea.jar" ++ "file:/usr/share/java/openjdk-asmtools/asmtools.jar" + ], + "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" + } + diff --git a/systemJcoderG7.patch b/systemJcoderG7.patch new file mode 100644 index 0000000..832113b --- /dev/null +++ b/systemJcoderG7.patch @@ -0,0 +1,14 @@ +--- runtime-decompiler/src/plugins/JcoderG7DecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 ++++ runtime-decompiler/src/plugins/JcoderG7DecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 +@@ -1,8 +1,8 @@ + { + "Name": "jcoderG7", +- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JcoderG7DecompilerWrapper.java", ++ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JcoderG7DecompilerWrapper.java", + "DependencyURL": [ +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/asmtools-core/7.0.b10-ea/asmtools-core-7.0.b10-ea.jar" ++ "file:/usr/share/java/openjdk-asmtools7/asmtools-core.jar" + ], + "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" + } + diff --git a/systemProcyon.patch b/systemProcyon.patch index 74bf4e5..35e93a2 100644 --- a/systemProcyon.patch +++ b/systemProcyon.patch @@ -2,7 +2,8 @@ +++ runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 @@ -2,9 +2,9 @@ "Name": "Procyon", - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonDecompilerWrapper.java", +- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonDecompilerWrapper.java", ++ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/ProcyonDecompilerWrapper.java", "DependencyURL": [ - "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", diff --git a/systemProcyonAssembler.patch b/systemProcyonAssembler.patch new file mode 100644 index 0000000..e53372b --- /dev/null +++ b/systemProcyonAssembler.patch @@ -0,0 +1,18 @@ +--- runtime-decompiler/src/plugins/ProcyonAssemblerDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 ++++ runtime-decompiler/src/plugins/ProcyonAssemblerDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 +@@ -2,9 +2,9 @@ + "Name": "Procyon-Assembler", +- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonAssemblerDecompilerWrapper.java", ++ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/ProcyonAssemblerDecompilerWrapper.java", + "DependencyURL": [ +- "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" ++ "/usr/share/java/procyon/procyon-core.jar", ++ "/usr/share/java/procyon/procyon-compilertools.jar", ++ "/usr/share/java/procyon/procyon-decompiler.jar" + ], + "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/git " + } + + From 3ddebd05088166cd139008ad1967ead38f7e0ebd Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 18 Mar 2023 09:19:14 +0100 Subject: [PATCH 41/73] split plugins to subpkgs and adapted launchers procyon crashes without warning, asmtool8 packed in bad, old version --- java-runtime-decompiler | 41 ++++++------ java-runtime-decompiler.spec | 124 ++++++++++++++++++++++++++++------- jrd-hex.desktop | 9 +++ jrd.desktop | 1 + 4 files changed, 128 insertions(+), 47 deletions(-) create mode 100644 jrd-hex.desktop diff --git a/java-runtime-decompiler b/java-runtime-decompiler index 8d2082d..331de22 100644 --- a/java-runtime-decompiler +++ b/java-runtime-decompiler @@ -16,41 +16,35 @@ function warning() { fi } -# identify directory tree -JRD=`basename $0` +# the launcher is reused uder different name, hardcoding name +JRD=java-runtime-decompiler CONF_HOME=$XDG_CONFIG_HOME if [ "$CONF_HOME" = "" ] ; then CONF_HOME=$HOME/.config/$JRD - else CONF_HOME=$CONF_HOME/$JRD - fi LOG_DIR=$CONF_HOME/logs - CONF_DIR=$CONF_HOME/conf - -# create directory tree PLUGIN_HOME=$CONF_HOME/plugins +PLUGIN_HOME_LEGACY=$CONF_HOME/plugins-legacy mkdir -p $LOG_DIR - mkdir -p $CONF_DIR - mkdir -p $PLUGIN_HOME : ${MAIN_CLASS:=org.jrd.backend.data.Main} # set java and jvm arguments -export _prefer_jre=false +export _prefer_jre=false #although java moved compiler classes to jre, PREFERING jdk should not hurt _set_java_home set_jvm # all dependencies must be on classpath -set_classpath java-runtime-decompiler rsyntaxtextarea byteman google-gson classpathless-compiler objectweb-asm +set_classpath java-runtime-decompiler rsyntaxtextarea byteman google-gson classpathless-compiler objectweb-asm java-diff-utils CLASSPATH=$CLASSPATH:${JAVA_HOME}/lib/tools.jar # set path to agent automatically @@ -60,16 +54,19 @@ AGENT_PREFIX="AGENT_PATH===" AGENT_STRING=$AGENT_PREFIX$AGENT # copy json wrappers information to home so the users can edit -CP_FILES="$(ls /etc/$JRD/plugins/*.json)" -for cpfile in $CP_FILES; do - FILE_NAME="$(basename -- $cpfile)" - if [ ! -e "$PLUGIN_HOME/$FILE_NAME" ] - then - cp $cpfile $PLUGIN_HOME - else - warning "Configuration files were not copied for $FILE_NAME - the existing configuration would be overwritten." - fi -done +if [ ! -e "$PLUGIN_HOME_LEGACY" -a -e "$PLUGIN_HOME" ] ; then + mv "$PLUGIN_HOME" "$PLUGIN_HOME_LEGACY" + echo "jrd no longer handles custom plugins for you. Your's " + echo "$PLUGIN_HOME was moved to $PLUGIN_HOME_LEGACY" + echo "You can play with custom plugins in $PLUGIN_HOME" + echo "but keep $PLUGIN_HOME_LEGACY created, so it is not renamed again" +fi +mkdir -p $PLUGIN_HOME_LEGACY + +warning "jrd no longer handles custom plugins for you. Your's " +warning echo "$PLUGIN_HOME was moved to $PLUGIN_HOME_LEGACY" +warning "You can play with custom plugins in $PLUGIN_HOME" +warning "but keep $PLUGIN_HOME_LEGACY created, so it is not renamed again" # create config file and add agent default path touch $CONFIG_FILE @@ -92,4 +89,4 @@ else fi export FLAGS="$FLAGS -Djdk.attach.allowAttachSelf=true --add-exports jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED" # jdk11+ do not allow attach by default; jdk17 is hiding javap api -run "$@" +run "$@" diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 373f868..80d8259 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -5,8 +5,9 @@ Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz -Source1: java-runtime-decompiler +Source1: %{name} Source3: jrd.desktop +Source4: jrd-hex.desktop Patch1: systemFernflower.patch Patch2: systemProcyon.patch Patch21: systemProcyonAssembler.patch @@ -41,20 +42,23 @@ BuildRequires: java-devel BuildRequires: google-gson BuildRequires: desktop-file-utils BuildRequires: classpathless-compiler +Requires: google-gson +Requires: byteman +Requires: rsyntaxtextarea Requires: java-headless -Recommends: java Requires: classpathless-compiler Requires: java-diff-utils -Recommends: fernflower -Recommends: procyon-decompiler >= 0.6 -Recommends: CFR -Recommends: openjdk-asmtools >= 8.0 -Recommends: openjdk-asmtools7 +Recommends: java +Recommends: %{name}-fernflower-plugin +Recommends: %{name}-procyon-plugin +Recommends: %{name}-cfr-plugin +Recommends: %{name}-asmtools-plugin +Recommends: %{name}-asmtools7-plugin %description -This application can access JVM memory at runtime, -extract byte code from the JVM and decompile it. -In addition, it can modify the obtained code and comple it back +This application can access JVM at runtime, +extract byte code from the JVM and decompile it, modify the obtained code and compile it back. +It also works with local classpath and source path and provide standalone hex, with binary diff. %package javadoc Summary: Javadoc for %{name} @@ -63,6 +67,46 @@ Requires: %{name} = %{version}-%{release} %description javadoc This package contains the API documentation for %{name}. +%package fernflower-plugin +Requires: fernflower +Summary: fernflower decompiler plugin for %{name} +Requires: %{name} = %{version}-%{release} + +%description fernflower-plugin +This package provides bindings and requirements to fernflower decompiler for %{name}. + +%package procyon-plugin +Requires: procyon-decompiler >= 0.6 +Summary: procyon decompiler plugin for %{name} +Requires: %{name} = %{version}-%{release} + +%description procyon-plugin +This package provides bindings and requirements to procyon decompiler for %{name}. + +%package cfr-plugin +Requires: CFR +Summary: CFR decompiler plugin for %{name} +Requires: %{name} = %{version}-%{release} + +%description cfr-plugin +This package provides bindings and requirements to CFR decompiler for %{name}. + +%package asmtools-plugin +Requires: openjdk-asmtools >= 8.0 +Summary: asmtools disassembler and assembler plugin for %{name} +Requires: %{name} = %{version}-%{release} + +%description asmtools-plugin +This package provides bindings and requirements to asmtools disassembler and assembler for %{name}. + +%package asmtools7-plugin +Requires: openjdk-asmtools7 +Summary: asmtools7 disassembler and assembler plugin for %{name} +Requires: %{name} = %{version}-%{release} + +%description asmtools7-plugin +This package provides bindings and requirements to asmtools7 disassembler and assembler for %{name}. + %prep %setup -q -n %{name}-%{name}-%{version} %patch1 -p0 @@ -105,66 +149,96 @@ java -cp $CPLC/classpathless-compiler.jar:$CPLC/classpathless-compiler-api.jar:$ %mvn_install install -d -m 755 $RPM_BUILD_ROOT%{_mandir}/man1/ install -m 644 %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/ +pushd $RPM_BUILD_ROOT%{_mandir}/man1/ + ln -s %{name}.1 jrd.1 + ln -s %{name}.1 %{name}-hex.1 + ln -s %{name}.1 jrd-hex.1 +popd install -d -m 755 $RPM_BUILD_ROOT%{_bindir} install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/ install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ +pushd $RPM_BUILD_ROOT%{_bindir} + cp %{name} %{name}-hex + sed 's/^run .*/run -hex "$@"/' -i %{name}-hex + ln -s %{name} jrd + ln -s %{name}-hex jrd-hex +popd + cp -r %{_builddir}/%{name}-%{name}-%{version}/runtime-decompiler/src/plugins/ $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/applications -desktop-file-install --vendor="fedora" \ ---dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE3} +desktop-file-install --vendor="fedora" --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE3} +desktop-file-install --vendor="fedora" --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE4} #jd is not yet packed and sucks anyway rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.java rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json - %files -f .mfiles %attr(755, root, -) %{_bindir}/java-runtime-decompiler -%{_mandir}/man1/java-runtime-decompiler.1* +%attr(755, root, -) %{_bindir}/java-runtime-decompiler-hex +%{_bindir}/jrd +%{_bindir}/jrd-hex +%{_mandir}/man1/java-runtime-decompiler*.1* +%{_mandir}/man1/jrd*.1* # wrappers for decompilers %dir %{_sysconfdir}/%{name} %dir %{_sysconfdir}/%{name}/plugins +%dir %{_datadir}/applications +%{_datadir}/applications/fedora-jrd.desktop +%{_datadir}/applications/fedora-jrd-hex.desktop + +%files fernflower-plugin %config %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/FernflowerDecompilerWrapper.json + +%files procyon-plugin %config %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/ProcyonDecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/ProcyonAssemblerDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/ProcyonAssemblerDecompilerWrapper.json + +%files cfr-plugin %config %{_sysconfdir}/%{name}/plugins/CfrDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/CfrDecompilerWrapper.json + +%files asmtools-plugin %config %{_sysconfdir}/%{name}/plugins/JasmDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmDecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/JasmGDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmGDecompilerWrapper.json -%config %{_sysconfdir}/%{name}/plugins/Jasm7DecompilerWrapper.java -%config(noreplace) %{_sysconfdir}/%{name}/plugins/Jasm7DecompilerWrapper.json -%config %{_sysconfdir}/%{name}/plugins/JasmG7DecompilerWrapper.java -%config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmG7DecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/JcoderDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/JcoderDecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/JcoderGDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/JcoderGDecompilerWrapper.json + +%files asmtools7-plugin +%config %{_sysconfdir}/%{name}/plugins/Jasm7DecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/Jasm7DecompilerWrapper.json +%config %{_sysconfdir}/%{name}/plugins/JasmG7DecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmG7DecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/Jcoder7DecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/Jcoder7DecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/JcoderG7DecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/JcoderG7DecompilerWrapper.json %license LICENSE -%dir %{_datadir}/applications -%{_datadir}/applications/fedora-jrd.desktop - %files javadoc -f .mfiles-javadoc %license LICENSE %changelog * Wed Mar 15 2023 Fedora Release Engineering - 7.1-1 - moved to jrd 7.1 -- todo: new launchers, new classpath (diff, cplc api...) -- verify current wrappers -- fixed procyon wrapper -- removed jd wrapper (was new in 7.1) +- todo verify current wrappers +- added desp on java-diff and new cplc +- fixed(?) procyon wrapper + - todo procyon crashes witout trace + - todo asmtools8 pacekd in old version +- removed jd wrapper (was new in 7.1, maybe will be added) +- split plugins to subpkgs +- added jrd-hex launcher +- added hex launcher, added jrd symlinks * Thu Jul 21 2022 Fedora Release Engineering - 6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/jrd-hex.desktop b/jrd-hex.desktop new file mode 100644 index 0000000..a0db405 --- /dev/null +++ b/jrd-hex.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Type=Application +Categories=Development;Profiling;Java; +Version=1.0 +Name=Java Runtime Decompiler Hex editor +Exec=java-runtime-decompiler-hex +Terminal=false +Name[en_US]=jrd-hex.desktop diff --git a/jrd.desktop b/jrd.desktop index eb2d468..70a9f2b 100644 --- a/jrd.desktop +++ b/jrd.desktop @@ -6,3 +6,4 @@ Version=1.0 Name=Java Runtime Decompiler Exec=java-runtime-decompiler Terminal=false +Name[en_US]=jrd.desktop From 66d3261592a586e9979d346cf36e0b00341d98a5 Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 18 Mar 2023 12:02:47 +0100 Subject: [PATCH 42/73] Sealed asm8 minimal version --- java-runtime-decompiler.spec | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 80d8259..0c991e4 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -92,7 +92,7 @@ Requires: %{name} = %{version}-%{release} This package provides bindings and requirements to CFR decompiler for %{name}. %package asmtools-plugin -Requires: openjdk-asmtools >= 8.0 +Requires: openjdk-asmtools >= 8.0.b02.ea-0.3.20230113 Summary: asmtools disassembler and assembler plugin for %{name} Requires: %{name} = %{version}-%{release} @@ -230,11 +230,9 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %changelog * Wed Mar 15 2023 Fedora Release Engineering - 7.1-1 - moved to jrd 7.1 -- todo verify current wrappers - added desp on java-diff and new cplc - fixed(?) procyon wrapper - todo procyon crashes witout trace - - todo asmtools8 pacekd in old version - removed jd wrapper (was new in 7.1, maybe will be added) - split plugins to subpkgs - added jrd-hex launcher From 4a89a2508d03f81dae2520b36267c4d54c3622e2 Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 18 Mar 2023 12:19:23 +0100 Subject: [PATCH 43/73] Partial fix to make procyon help work --- java-runtime-decompiler | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-runtime-decompiler b/java-runtime-decompiler index 331de22..df6ccc7 100644 --- a/java-runtime-decompiler +++ b/java-runtime-decompiler @@ -88,5 +88,5 @@ else echo "Agent was not found and agent path was not set correctly. This has to be done manually in the decompiler GUI, or set AGENT_PATH===path_to_agent_jar in the configuration file: $CONFIG_FILE" >&2 fi -export FLAGS="$FLAGS -Djdk.attach.allowAttachSelf=true --add-exports jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED" # jdk11+ do not allow attach by default; jdk17 is hiding javap api +export FLAGS="$FLAGS -Djdk.attach.allowAttachSelf=true --add-exports jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED" # jdk11+ do not allow attach by default; jdk17 is hiding javap api run "$@" From 1602f58d32e69e08f4ed95ff4a5804982d90974a Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 18 Mar 2023 20:51:35 +0100 Subject: [PATCH 44/73] Bumped to 7.2; todo, fix procyon patches --- .gitignore | 1 + java-runtime-decompiler.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 741bd3d..5d8e47b 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /java-runtime-decompiler-6.0.0.pre.3.tar.gz /java-runtime-decompiler-6.1.tar.gz /java-runtime-decompiler-7.1.tar.gz +/java-runtime-decompiler-7.2.tar.gz diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 0c991e4..ce97784 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,6 +1,6 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 7.1 +Version: 7.2 Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler diff --git a/sources b/sources index 2d86801..4e51993 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-7.1.tar.gz) = 09f76e0f82823089ce122a02b66664535afba3a5bbd30a48f2cf1ba505647d75ba67b2c361eadd084d025ff77298f6973c9eaaef970ff5a83d69573c3ab5fd7b +SHA512 (java-runtime-decompiler-7.2.tar.gz) = 21940dd0d4acba89b0e42c3588b0c6813247c71271347a556093196f2ffa8d0da6177c7db629e5f0792c5b9bdcc768ff5dfd21f6aaf1d93151c10cdfd29e0247 From a3812684cc25e9aaad656395017ab0d790304319 Mon Sep 17 00:00:00 2001 From: Jiri Date: Sat, 18 Mar 2023 20:59:11 +0100 Subject: [PATCH 45/73] Adapted procyon patches --- systemProcyon.patch | 8 +++++--- systemProcyonAssembler.patch | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/systemProcyon.patch b/systemProcyon.patch index 35e93a2..4886e80 100644 --- a/systemProcyon.patch +++ b/systemProcyon.patch @@ -1,16 +1,18 @@ --- runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 +++ runtime-decompiler/src/plugins/ProcyonDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 -@@ -2,9 +2,9 @@ +@@ -2,10 +2,10 @@ "Name": "Procyon", - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonDecompilerWrapper.java", + "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/ProcyonDecompilerWrapper.java", "DependencyURL": [ - "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/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" + "/usr/share/java/procyon/procyon-core.jar", + "/usr/share/java/procyon/procyon-compilertools.jar", -+ "/usr/share/java/procyon/procyon-decompiler.jar" ++ "/usr/share/java/procyon/procyon-decompiler.jar", ++ "/usr/share/java/beust-jcommander.jar" ], "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/git " } diff --git a/systemProcyonAssembler.patch b/systemProcyonAssembler.patch index e53372b..d385b99 100644 --- a/systemProcyonAssembler.patch +++ b/systemProcyonAssembler.patch @@ -1,16 +1,18 @@ --- runtime-decompiler/src/plugins/ProcyonAssemblerDecompilerWrapper.json 2018-11-12 15:25:47.000000000 +0100 +++ runtime-decompiler/src/plugins/ProcyonAssemblerDecompilerWrapper.json 2019-01-16 12:13:37.317778036 +0100 -@@ -2,9 +2,9 @@ +@@ -2,10 +2,10 @@ "Name": "Procyon-Assembler", - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/ProcyonAssemblerDecompilerWrapper.java", + "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/ProcyonAssemblerDecompilerWrapper.java", "DependencyURL": [ - "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/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" + "/usr/share/java/procyon/procyon-core.jar", + "/usr/share/java/procyon/procyon-compilertools.jar", -+ "/usr/share/java/procyon/procyon-decompiler.jar" ++ "/usr/share/java/procyon/procyon-decompiler.jar", ++ "/usr/share/java/beust-jcommander.jar" ], "DecompilerDownloadURL": "https://github.com/mstrobel/procyon/git " } From 54fcf013ab0a751b78fc3be8846a52c66d52749a Mon Sep 17 00:00:00 2001 From: Jiri Date: Fri, 30 Jun 2023 16:05:55 +0200 Subject: [PATCH 46/73] moved to 7.3 - https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.3 - https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.2 - https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.1 --- .gitignore | 1 + java-runtime-decompiler.spec | 8 +++++++- sources | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5d8e47b..5c6e117 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /java-runtime-decompiler-6.1.tar.gz /java-runtime-decompiler-7.1.tar.gz /java-runtime-decompiler-7.2.tar.gz +/java-runtime-decompiler-7.3.tar.gz diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index ce97784..b671dd4 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,6 +1,6 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 7.2 +Version: 7.3 Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler @@ -228,7 +228,13 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Fri Jun 30 2023 Fedora Release Engineering - 7.3-1 +- moved to 7.3 +- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.3 +- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.2 + * Wed Mar 15 2023 Fedora Release Engineering - 7.1-1 +- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.1 - moved to jrd 7.1 - added desp on java-diff and new cplc - fixed(?) procyon wrapper diff --git a/sources b/sources index 4e51993..2e91c7f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-7.2.tar.gz) = 21940dd0d4acba89b0e42c3588b0c6813247c71271347a556093196f2ffa8d0da6177c7db629e5f0792c5b9bdcc768ff5dfd21f6aaf1d93151c10cdfd29e0247 +SHA512 (java-runtime-decompiler-7.3.tar.gz) = dc45ee8fa53d3f3f6479f9d2d8978a714731d1cb333fe4e15321564bc049d6cde90e2e618d304df24bbcb6dec23cca6cb5373e867c8ec45212746b344e65a1e2 From 98f8cad7ba2e38508d487e397fc9072006b763ee Mon Sep 17 00:00:00 2001 From: Jiri Date: Tue, 11 Jul 2023 10:24:31 +0200 Subject: [PATCH 47/73] added 2b99a244b592445962cdd15ca33f80449f9aa2ea.patch to fix compiler issue in jrd window --- ...a244b592445962cdd15ca33f80449f9aa2ea.patch | 60 +++++++++++++++++++ java-runtime-decompiler.spec | 7 ++- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 2b99a244b592445962cdd15ca33f80449f9aa2ea.patch diff --git a/2b99a244b592445962cdd15ca33f80449f9aa2ea.patch b/2b99a244b592445962cdd15ca33f80449f9aa2ea.patch new file mode 100644 index 0000000..1b258f8 --- /dev/null +++ b/2b99a244b592445962cdd15ca33f80449f9aa2ea.patch @@ -0,0 +1,60 @@ +commit 2b99a244b592445962cdd15ca33f80449f9aa2ea +Author: Jiri +Date: Tue Jul 11 10:16:41 2023 +0200 + + isTreatAllTabsAsOneBatch returns false in jrd mode and is not shown + +diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java +index 3e87e6d..a8db71a 100644 +--- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java ++++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java +@@ -574,18 +574,20 @@ public class TextWithControls extends JPanel + } + }); + advanced.add(setMethod); +- JCheckBox treatAllAsOne = new JCheckBox("Treat all tabs in this window as single batch"); +- Container parent = getParentWindow(); +- if (parent != null) { +- treatAllAsOne.addActionListener(new ActionListener() { +- @Override +- public void actionPerformed(ActionEvent actionEvent) { +- setTreatAllTabsAsOneBatch(treatAllAsOne.isSelected()); +- repaintMenu(menu); +- } +- }); +- treatAllAsOne.setSelected(isTreatAllTabsAsOneBatch()); +- advanced.add(treatAllAsOne); ++ if (getParentWindow()!=null) { ++ JCheckBox treatAllAsOne = new JCheckBox("Treat all tabs in this window as single batch"); ++ Container parent = getParentWindow(); ++ if (parent != null) { ++ treatAllAsOne.addActionListener(new ActionListener() { ++ @Override ++ public void actionPerformed(ActionEvent actionEvent) { ++ setTreatAllTabsAsOneBatch(treatAllAsOne.isSelected()); ++ repaintMenu(menu); ++ } ++ }); ++ treatAllAsOne.setSelected(isTreatAllTabsAsOneBatch()); ++ advanced.add(treatAllAsOne); ++ } + } + if (hasVm(classesAndMethodsProvider)) { + JCheckBox addToBoot = new JCheckBox( +@@ -908,10 +910,16 @@ public class TextWithControls extends JPanel + } + + private void setTreatAllTabsAsOneBatch(boolean selected) { ++ if (getParentWindow() == null) { ++ return ; ++ } + getParentWindow().setTreatAllTabsAsOneBatch(selected); + } + + private boolean isTreatAllTabsAsOneBatch() { ++ if (getParentWindow() == null) { ++ return false; ++ } + return getParentWindow().isTreatAllTabsAsOneBatch(); + } + diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index b671dd4..2510c3f 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 7.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -22,6 +22,7 @@ Patch61: systemJcoder7.patch Patch62: systemJcoderG.patch Patch63: systemJcoderG7.patch Patch7: removeMultilineSpotbugs.patch +Patch8: 2b99a244b592445962cdd15ca33f80449f9aa2ea.patch BuildArch: noarch ExclusiveArch: %{java_arches} noarch @@ -123,6 +124,7 @@ This package provides bindings and requirements to asmtools7 disassembler and as %patch62 -p0 %patch63 -p0 %patch7 -p1 +%patch8 -p1 %build pushd runtime-decompiler @@ -228,6 +230,9 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Tue Jul 11 2023 Fedora Release Engineering - 7.3-2 +- added 2b99a244b592445962cdd15ca33f80449f9aa2ea.patch to fix compiler issue in jrd window + * Fri Jun 30 2023 Fedora Release Engineering - 7.3-1 - moved to 7.3 - https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.3 From 051828906c6c920d39338ade794c2ca4807c83cf Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Wed, 12 Jul 2023 17:00:30 +0200 Subject: [PATCH 48/73] Being explicit on what jdk to use for man pages generation --- java-runtime-decompiler.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 2510c3f..d88907d 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -145,7 +145,7 @@ export JAVA_HOME=/usr/lib/jvm/java-17-openjdk #why? xmvn --version %mvn_build -f --xmvn-javadoc -- -Plegacy CPLC=/usr/share/java/classpathless-compiler -java -cp $CPLC/classpathless-compiler.jar:$CPLC/classpathless-compiler-api.jar:$CPLC/classpathless-compiler-util.jar:runtime-decompiler/target/runtime-decompiler-%{version}.jar org.jrd.backend.data.cli.Help > %{name}.1 +$JAVA_HOME/bin/java -cp $CPLC/classpathless-compiler.jar:$CPLC/classpathless-compiler-api.jar:$CPLC/classpathless-compiler-util.jar:runtime-decompiler/target/runtime-decompiler-%{version}.jar org.jrd.backend.data.cli.Help > %{name}.1 %install %mvn_install From 4e4ea6b124d33d580a32d06578883e2005e3f4ed Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 07:54:32 +0000 Subject: [PATCH 49/73] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index d88907d..4ec9aaa 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 7.3 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -230,6 +230,9 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 7.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Jul 11 2023 Fedora Release Engineering - 7.3-2 - added 2b99a244b592445962cdd15ca33f80449f9aa2ea.patch to fix compiler issue in jrd window From c2700e87eb8f3043b972b83e7382523fccd6a43f Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Fri, 13 Oct 2023 18:22:04 +0200 Subject: [PATCH 50/73] update dto 8.0 - https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-8.0 --- .gitignore | 1 + ...a244b592445962cdd15ca33f80449f9aa2ea.patch | 60 ------------------- java-runtime-decompiler.spec | 12 ++-- sources | 2 +- systemJasm.patch | 2 +- systemJasmG.patch | 2 +- systemJcoder.patch | 2 +- systemJcoderG.patch | 2 +- 8 files changed, 13 insertions(+), 70 deletions(-) delete mode 100644 2b99a244b592445962cdd15ca33f80449f9aa2ea.patch diff --git a/.gitignore b/.gitignore index 5c6e117..60c8c51 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /java-runtime-decompiler-7.1.tar.gz /java-runtime-decompiler-7.2.tar.gz /java-runtime-decompiler-7.3.tar.gz +/java-runtime-decompiler-8.0.tar.gz diff --git a/2b99a244b592445962cdd15ca33f80449f9aa2ea.patch b/2b99a244b592445962cdd15ca33f80449f9aa2ea.patch deleted file mode 100644 index 1b258f8..0000000 --- a/2b99a244b592445962cdd15ca33f80449f9aa2ea.patch +++ /dev/null @@ -1,60 +0,0 @@ -commit 2b99a244b592445962cdd15ca33f80449f9aa2ea -Author: Jiri -Date: Tue Jul 11 10:16:41 2023 +0200 - - isTreatAllTabsAsOneBatch returns false in jrd mode and is not shown - -diff --git a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java -index 3e87e6d..a8db71a 100644 ---- a/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java -+++ b/runtime-decompiler/src/main/java/org/jrd/frontend/frame/main/decompilerview/TextWithControls.java -@@ -574,18 +574,20 @@ public class TextWithControls extends JPanel - } - }); - advanced.add(setMethod); -- JCheckBox treatAllAsOne = new JCheckBox("Treat all tabs in this window as single batch"); -- Container parent = getParentWindow(); -- if (parent != null) { -- treatAllAsOne.addActionListener(new ActionListener() { -- @Override -- public void actionPerformed(ActionEvent actionEvent) { -- setTreatAllTabsAsOneBatch(treatAllAsOne.isSelected()); -- repaintMenu(menu); -- } -- }); -- treatAllAsOne.setSelected(isTreatAllTabsAsOneBatch()); -- advanced.add(treatAllAsOne); -+ if (getParentWindow()!=null) { -+ JCheckBox treatAllAsOne = new JCheckBox("Treat all tabs in this window as single batch"); -+ Container parent = getParentWindow(); -+ if (parent != null) { -+ treatAllAsOne.addActionListener(new ActionListener() { -+ @Override -+ public void actionPerformed(ActionEvent actionEvent) { -+ setTreatAllTabsAsOneBatch(treatAllAsOne.isSelected()); -+ repaintMenu(menu); -+ } -+ }); -+ treatAllAsOne.setSelected(isTreatAllTabsAsOneBatch()); -+ advanced.add(treatAllAsOne); -+ } - } - if (hasVm(classesAndMethodsProvider)) { - JCheckBox addToBoot = new JCheckBox( -@@ -908,10 +910,16 @@ public class TextWithControls extends JPanel - } - - private void setTreatAllTabsAsOneBatch(boolean selected) { -+ if (getParentWindow() == null) { -+ return ; -+ } - getParentWindow().setTreatAllTabsAsOneBatch(selected); - } - - private boolean isTreatAllTabsAsOneBatch() { -+ if (getParentWindow() == null) { -+ return false; -+ } - return getParentWindow().isTreatAllTabsAsOneBatch(); - } - diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 4ec9aaa..3e3ddc6 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 7.3 -Release: 3%{?dist} +Version: 8.0 +Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz @@ -22,7 +22,6 @@ Patch61: systemJcoder7.patch Patch62: systemJcoderG.patch Patch63: systemJcoderG7.patch Patch7: removeMultilineSpotbugs.patch -Patch8: 2b99a244b592445962cdd15ca33f80449f9aa2ea.patch BuildArch: noarch ExclusiveArch: %{java_arches} noarch @@ -93,7 +92,7 @@ Requires: %{name} = %{version}-%{release} This package provides bindings and requirements to CFR decompiler for %{name}. %package asmtools-plugin -Requires: openjdk-asmtools >= 8.0.b02.ea-0.3.20230113 +Requires: openjdk-asmtools >= 8.0.b09 Summary: asmtools disassembler and assembler plugin for %{name} Requires: %{name} = %{version}-%{release} @@ -124,7 +123,6 @@ This package provides bindings and requirements to asmtools7 disassembler and as %patch62 -p0 %patch63 -p0 %patch7 -p1 -%patch8 -p1 %build pushd runtime-decompiler @@ -230,6 +228,10 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Fri Oct 13 2023 Fedora Release Engineering - 8.0-1 +- update dto 8.0 +- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-8.0 + * Thu Jul 20 2023 Fedora Release Engineering - 7.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 2e91c7f..4ae273d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-7.3.tar.gz) = dc45ee8fa53d3f3f6479f9d2d8978a714731d1cb333fe4e15321564bc049d6cde90e2e618d304df24bbcb6dec23cca6cb5373e867c8ec45212746b344e65a1e2 +SHA512 (java-runtime-decompiler-8.0.tar.gz) = 0cc785efe5d678a4882ede71639c15d0d8c5496eab13fb6079b0030b1dca0c3b272401bddabd470a9830037d9978cecd46bc431b172f89bc32ec877e416e23d0 diff --git a/systemJasm.patch b/systemJasm.patch index eff068f..dc2991d 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.b02-ea/asmtools-8.0.b02-ea.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-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 0171e99..81b6665 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.b02-ea/asmtools-8.0.b02-ea.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-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 cf6ce68..bd2690a 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.b02-ea/asmtools-8.0.b02-ea.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-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 85d8a63..4e07a9c 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.b02-ea/asmtools-8.0.b02-ea.jar" +- "file://${HOME}/.m2/repository/org/openjdk/asmtools/8.0.b09-ea/asmtools-8.0.b09-ea.jar" + "file:/usr/share/java/openjdk-asmtools/asmtools.jar" ], "DecompilerDownloadURL": "https://github.com/openjdk/asmtools" From f800c363cb22595d8e05f25db56de0e2e549f228 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Wed, 3 Jan 2024 16:52:02 +0100 Subject: [PATCH 51/73] Bumped to 9.1 --- .gitignore | 1 + java-runtime-decompiler.spec | 9 +++++++-- sources | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 60c8c51..c37ccde 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /java-runtime-decompiler-7.2.tar.gz /java-runtime-decompiler-7.3.tar.gz /java-runtime-decompiler-8.0.tar.gz +/java-runtime-decompiler-9.1.tar.gz diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 3e3ddc6..225a850 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,10 +1,10 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler -Version: 8.0 +Version: 9.1 Release: 1%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler -Source0: https://github.com/pmikova/%{name}/archive/%{name}-%{version}.tar.gz +Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz Source1: %{name} Source3: jrd.desktop Source4: jrd-hex.desktop @@ -228,6 +228,11 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Wed Jan 03 2024 Fedora Release Engineering - 9.1-1 +- update dto 9.1 +- https://github.com/judovana/java-runtime-decompiler/releases/tag/java-runtime-decompiler-9.1 +- https://github.com/judovana/java-runtime-decompiler/releases/tag/java-runtime-decompiler-9.0 + * Fri Oct 13 2023 Fedora Release Engineering - 8.0-1 - update dto 8.0 - https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-8.0 diff --git a/sources b/sources index 4ae273d..639b6d5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (java-runtime-decompiler-8.0.tar.gz) = 0cc785efe5d678a4882ede71639c15d0d8c5496eab13fb6079b0030b1dca0c3b272401bddabd470a9830037d9978cecd46bc431b172f89bc32ec877e416e23d0 +SHA512 (java-runtime-decompiler-9.1.tar.gz) = 9373d08d9482614561726ab82b3f116136c79bf9758950276cf3043c6443425c17b43699d19cd33eb0761e3819795249a304135d64185989dcc1eeb59a9c671d From 76057b3e1d9b6d01d5b43982f89bdc466089b1b7 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Wed, 3 Jan 2024 17:12:35 +0100 Subject: [PATCH 52/73] Updated spotbugs patch --- removeMultilineSpotbugs.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/removeMultilineSpotbugs.patch b/removeMultilineSpotbugs.patch index e612855..f8ddbb9 100644 --- a/removeMultilineSpotbugs.patch +++ b/removeMultilineSpotbugs.patch @@ -49,4 +49,17 @@ /** * 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 From c7308a84590d3370818683ba66f91f0b83fb7800 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jan 2024 23:31:38 +0000 Subject: [PATCH 53/73] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 225a850..4a2770b 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 9.1 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz @@ -228,6 +228,9 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Sat Jan 20 2024 Fedora Release Engineering - 9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Wed Jan 03 2024 Fedora Release Engineering - 9.1-1 - update dto 9.1 - https://github.com/judovana/java-runtime-decompiler/releases/tag/java-runtime-decompiler-9.1 From fb1a3765b7e164c5652f122b2000f63550cdc2c4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 23:11:28 +0000 Subject: [PATCH 54/73] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 4a2770b..b8e784e 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 9.1 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz @@ -228,6 +228,9 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 9.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jan 20 2024 Fedora Release Engineering - 9.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 7e758a0b3fb18aa54b792e03065b9584975c89c1 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Tue, 27 Feb 2024 16:11:55 +0100 Subject: [PATCH 55/73] Rebuilt for java-21-openjdk as system jdk https://fedoraproject.org/wiki/Changes/Java21 --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index b8e784e..2665e28 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 9.1 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz @@ -228,6 +228,9 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Tue Feb 27 2024 Jiri Vanek - 9.1-4 +- Rebuilt for java-21-openjdk as system jdk + * Wed Jan 24 2024 Fedora Release Engineering - 9.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 91124edcd32f9d1dcc3f57388b6de2ac89f4c826 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Wed, 28 Feb 2024 17:05:23 +0100 Subject: [PATCH 56/73] adjsuted the unhappy man ual java_home --- java-runtime-decompiler.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 2665e28..a5f6061 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 9.1 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz @@ -139,7 +139,7 @@ for x in $a ; do done xmvn --version echo $JAVA_HOME -export JAVA_HOME=/usr/lib/jvm/java-17-openjdk #why? +export JAVA_HOME=/usr/lib/jvm/java-21-openjdk #why? xmvn --version %mvn_build -f --xmvn-javadoc -- -Plegacy CPLC=/usr/share/java/classpathless-compiler @@ -228,8 +228,9 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog -* Tue Feb 27 2024 Jiri Vanek - 9.1-4 +* Tue Feb 27 2024 Jiri Vanek - 9.1-5 - Rebuilt for java-21-openjdk as system jdk +- adjsuted the unhappy man ual java_home * Wed Jan 24 2024 Fedora Release Engineering - 9.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a185174e7d3ccba414cd7427d8f9cb786a27a6cb Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 22 May 2024 16:12:52 +0200 Subject: [PATCH 57/73] Add Requires on javapackages-tools --- java-runtime-decompiler.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index a5f6061..cb8f8c8 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 9.1 -Release: 5%{?dist} +Release: 6%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz @@ -45,7 +45,7 @@ BuildRequires: classpathless-compiler Requires: google-gson Requires: byteman Requires: rsyntaxtextarea -Requires: java-headless +Requires: javapackages-tools Requires: classpathless-compiler Requires: java-diff-utils Recommends: java @@ -228,6 +228,9 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Wed May 22 2024 Marian Koncek - 9.1-6 +- Add Requires on javapackages-tools + * Tue Feb 27 2024 Jiri Vanek - 9.1-5 - Rebuilt for java-21-openjdk as system jdk - adjsuted the unhappy man ual java_home From e2ade0a80c11dadccb7ae4b2e958576bc7357f95 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 22 May 2024 16:13:19 +0200 Subject: [PATCH 58/73] Use modern %patch --- java-runtime-decompiler.spec | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index cb8f8c8..efe47da 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -109,20 +109,20 @@ This package provides bindings and requirements to asmtools7 disassembler and as %prep %setup -q -n %{name}-%{name}-%{version} -%patch1 -p0 -%patch2 -p0 -%patch21 -p0 -%patch3 -p0 -%patch4 -p0 -%patch5 -p0 -%patch51 -p0 -%patch52 -p0 -%patch53 -p0 -%patch6 -p0 -%patch61 -p0 -%patch62 -p0 -%patch63 -p0 -%patch7 -p1 +%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 %build pushd runtime-decompiler From 727ea4320b35652861b4eb95a41781aa42a6c58a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 10:51:59 +0000 Subject: [PATCH 59/73] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- java-runtime-decompiler.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index efe47da..7d8afa4 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 9.1 -Release: 6%{?dist} +Release: 7%{?dist} License: GPLv3 URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz @@ -228,6 +228,9 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 9.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Wed May 22 2024 Marian Koncek - 9.1-6 - Add Requires on javapackages-tools From 3615ff4b1da4323cac02dd912815da90e34d56f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Mon, 29 Jul 2024 14:06:46 +0200 Subject: [PATCH 60/73] convert GPLv3 license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- java-runtime-decompiler.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 7d8afa4..355a415 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,8 +1,9 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 9.1 -Release: 7%{?dist} -License: GPLv3 +Release: 8%{?dist} +# 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 Source1: %{name} @@ -228,6 +229,9 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog +* Mon Jul 29 2024 Miroslav Suchý - 9.1-8 +- convert license to SPDX + * Thu Jul 18 2024 Fedora Release Engineering - 9.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 8cffe2fa212881a2936ac2cdf01b9a5b18f472b1 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 19 Sep 2024 14:13:00 +0200 Subject: [PATCH 61/73] Use %autorelease and %autochangelog --- changelog | 148 ++++++++++++++++++++++++++++++++++ java-runtime-decompiler.spec | 151 +---------------------------------- 2 files changed, 150 insertions(+), 149 deletions(-) create mode 100644 changelog diff --git a/changelog b/changelog new file mode 100644 index 0000000..c8aaa6a --- /dev/null +++ b/changelog @@ -0,0 +1,148 @@ +* Mon Jul 29 2024 Miroslav Suchý - 9.1-8 +- convert license to SPDX + +* Thu Jul 18 2024 Fedora Release Engineering - 9.1-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Wed May 22 2024 Marian Koncek - 9.1-6 +- Add Requires on javapackages-tools + +* Tue Feb 27 2024 Jiri Vanek - 9.1-5 +- Rebuilt for java-21-openjdk as system jdk +- adjsuted the unhappy man ual java_home + +* Wed Jan 24 2024 Fedora Release Engineering - 9.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jan 20 2024 Fedora Release Engineering - 9.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Wed Jan 03 2024 Fedora Release Engineering - 9.1-1 +- update dto 9.1 +- https://github.com/judovana/java-runtime-decompiler/releases/tag/java-runtime-decompiler-9.1 +- https://github.com/judovana/java-runtime-decompiler/releases/tag/java-runtime-decompiler-9.0 + +* Fri Oct 13 2023 Fedora Release Engineering - 8.0-1 +- update dto 8.0 +- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-8.0 + +* Thu Jul 20 2023 Fedora Release Engineering - 7.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jul 11 2023 Fedora Release Engineering - 7.3-2 +- added 2b99a244b592445962cdd15ca33f80449f9aa2ea.patch to fix compiler issue in jrd window + +* Fri Jun 30 2023 Fedora Release Engineering - 7.3-1 +- moved to 7.3 +- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.3 +- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.2 + +* Wed Mar 15 2023 Fedora Release Engineering - 7.1-1 +- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.1 +- moved to jrd 7.1 +- added desp on java-diff and new cplc +- fixed(?) procyon wrapper + - todo procyon crashes witout trace +- removed jd wrapper (was new in 7.1, maybe will be added) +- split plugins to subpkgs +- added jrd-hex launcher +- added hex launcher, added jrd symlinks + +* Thu Jul 21 2022 Fedora Release Engineering - 6.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jul 08 2022 Jiri Vanek - 6.1-4 +- Rebuilt for Drop i686 JDKs + +* Sat Feb 05 2022 Jiri Vanek - 6.1-3 +- Rebuilt for java-17-openjdk as system jdk + +* Thu Jan 20 2022 Fedora Release Engineering - 6.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Sun Dec 26 2021 Fedora Release Engineering - 6.0.0.pre.3-1 +- bumped sources to upstream rc candidate + +* Sun Dec 26 2021 Fedora Release Engineering - 6.0.0.pre.2-1 +- bumped sources to upstream pre release + +* Thu Aug 12 2021 Fedora Release Engineering - 6.0.0.pre.1-1 +- umped sources to upstream pre release +- adapted jcoder plugin +- todo, patch for removed plugins + +* Thu Aug 12 2021 Fedora Release Engineering - 5.1-1 +- bumped to final sources + +* Mon Aug 09 2021 Fedora Release Engineering - 5.0.rc1-1 +- adapted manpage + +* Mon Aug 02 2021 Fedora Release Engineering - 5.0.beta2-1 +- updated to 5.0 +- removed jdk8 subpkg due to compiler api +- added Cfr and asmtools plugins +- todo man page + +* Thu Jul 22 2021 Fedora Release Engineering - 4.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jan 26 2021 Fedora Release Engineering - 4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Dec 08 2020 Jiri Vanek - 4.0-2 +- Added subpackage built by jdk8 to allow looking into jdk8 apps +- for some reason, jdk8 vm can not look into jdk11 vm, even if agent is correctly jdk8 version +- the config is still share, which is stupid, but I doubt there is another target audeince then me + +* Tue Dec 08 2020 Jiri Vanek - 4.0-1 +- built by jdk11 + +* Tue Jul 28 2020 Fedora Release Engineering - 3.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Jiri Vanek - 3.0-8 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Tue Mar 17 2020 Jiri Vanek - 3.0-7 +- aligned rsyntaxtextarea version, fixed javadoc generation + +* Tue Mar 17 2020 Jiri Vanek - 3.0-6 +- changed jdk8 requirement + +* Wed Jan 29 2020 Fedora Release Engineering - 3.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Tue Aug 27 2019 Jiri Vanek - 3.0-3 +- all stdouts from customlauncher moved to stderr + +* Mon Aug 26 2019 Jiri Vanek - 3.0-0 +- moved to usptream version 3.0 +- adjusted configs, removed lambda patch + +* Thu Jul 25 2019 Fedora Release Engineering - 2.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 2.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Jan 17 2019 Jiri Vanek - 2.0-5 +- improved Patch3, includeLambdas.patch to sort the lamdas t the bottom + +* Thu Jan 17 2019 Jiri Vanek - 2.0-4 +- added depndence of procyon decompiler (currenlty under review +- added and applied Patch2, systemProcyon.patch to enable system procyon out of thebox +- added and applied Patch3, includeLambdas.patch to at least list lamdas untill fixed in upstream + +* Thu Jan 10 2019 Jiri Vanek - 2.0-3 +- added depndence of fernflower decompiler +- added and applied Patch1, systemFernflower.patch to enable system fernflower + +* Wed Nov 28 2018 Petra Mikova - 2.0-2 +- fixed changelog + +* Mon Nov 19 2018 Petra Mikova - 2.0-1 +- fixed issues listed in review (rhbz#1636019) +- added installation of desktop file + +* Wed Jun 06 2018 Petra Mikova - 1.1-1 +- initial commit diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 355a415..5e344f8 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 9.1 -Release: 8%{?dist} +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 @@ -229,151 +229,4 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %license LICENSE %changelog -* Mon Jul 29 2024 Miroslav Suchý - 9.1-8 -- convert license to SPDX - -* Thu Jul 18 2024 Fedora Release Engineering - 9.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Wed May 22 2024 Marian Koncek - 9.1-6 -- Add Requires on javapackages-tools - -* Tue Feb 27 2024 Jiri Vanek - 9.1-5 -- Rebuilt for java-21-openjdk as system jdk -- adjsuted the unhappy man ual java_home - -* Wed Jan 24 2024 Fedora Release Engineering - 9.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jan 20 2024 Fedora Release Engineering - 9.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jan 03 2024 Fedora Release Engineering - 9.1-1 -- update dto 9.1 -- https://github.com/judovana/java-runtime-decompiler/releases/tag/java-runtime-decompiler-9.1 -- https://github.com/judovana/java-runtime-decompiler/releases/tag/java-runtime-decompiler-9.0 - -* Fri Oct 13 2023 Fedora Release Engineering - 8.0-1 -- update dto 8.0 -- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-8.0 - -* Thu Jul 20 2023 Fedora Release Engineering - 7.3-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Jul 11 2023 Fedora Release Engineering - 7.3-2 -- added 2b99a244b592445962cdd15ca33f80449f9aa2ea.patch to fix compiler issue in jrd window - -* Fri Jun 30 2023 Fedora Release Engineering - 7.3-1 -- moved to 7.3 -- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.3 -- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.2 - -* Wed Mar 15 2023 Fedora Release Engineering - 7.1-1 -- https://github.com/pmikova/java-runtime-decompiler/releases/tag/java-runtime-decompiler-7.1 -- moved to jrd 7.1 -- added desp on java-diff and new cplc -- fixed(?) procyon wrapper - - todo procyon crashes witout trace -- removed jd wrapper (was new in 7.1, maybe will be added) -- split plugins to subpkgs -- added jrd-hex launcher -- added hex launcher, added jrd symlinks - -* Thu Jul 21 2022 Fedora Release Engineering - 6.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Fri Jul 08 2022 Jiri Vanek - 6.1-4 -- Rebuilt for Drop i686 JDKs - -* Sat Feb 05 2022 Jiri Vanek - 6.1-3 -- Rebuilt for java-17-openjdk as system jdk - -* Thu Jan 20 2022 Fedora Release Engineering - 6.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Sun Dec 26 2021 Fedora Release Engineering - 6.0.0.pre.3-1 -- bumped sources to upstream rc candidate - -* Sun Dec 26 2021 Fedora Release Engineering - 6.0.0.pre.2-1 -- bumped sources to upstream pre release - -* Thu Aug 12 2021 Fedora Release Engineering - 6.0.0.pre.1-1 -- umped sources to upstream pre release -- adapted jcoder plugin -- todo, patch for removed plugins - -* Thu Aug 12 2021 Fedora Release Engineering - 5.1-1 -- bumped to final sources - -* Mon Aug 09 2021 Fedora Release Engineering - 5.0.rc1-1 -- adapted manpage - -* Mon Aug 02 2021 Fedora Release Engineering - 5.0.beta2-1 -- updated to 5.0 -- removed jdk8 subpkg due to compiler api -- added Cfr and asmtools plugins -- todo man page - -* Thu Jul 22 2021 Fedora Release Engineering - 4.0-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Jan 26 2021 Fedora Release Engineering - 4.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Tue Dec 08 2020 Jiri Vanek - 4.0-2 -- Added subpackage built by jdk8 to allow looking into jdk8 apps -- for some reason, jdk8 vm can not look into jdk11 vm, even if agent is correctly jdk8 version -- the config is still share, which is stupid, but I doubt there is another target audeince then me - -* Tue Dec 08 2020 Jiri Vanek - 4.0-1 -- built by jdk11 - -* Tue Jul 28 2020 Fedora Release Engineering - 3.0-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Fri Jul 10 2020 Jiri Vanek - 3.0-8 -- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 - -* Tue Mar 17 2020 Jiri Vanek - 3.0-7 -- aligned rsyntaxtextarea version, fixed javadoc generation - -* Tue Mar 17 2020 Jiri Vanek - 3.0-6 -- changed jdk8 requirement - -* Wed Jan 29 2020 Fedora Release Engineering - 3.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Tue Aug 27 2019 Jiri Vanek - 3.0-3 -- all stdouts from customlauncher moved to stderr - -* Mon Aug 26 2019 Jiri Vanek - 3.0-0 -- moved to usptream version 3.0 -- adjusted configs, removed lambda patch - -* Thu Jul 25 2019 Fedora Release Engineering - 2.0-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 2.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Jan 17 2019 Jiri Vanek - 2.0-5 -- improved Patch3, includeLambdas.patch to sort the lamdas t the bottom - -* Thu Jan 17 2019 Jiri Vanek - 2.0-4 -- added depndence of procyon decompiler (currenlty under review -- added and applied Patch2, systemProcyon.patch to enable system procyon out of thebox -- added and applied Patch3, includeLambdas.patch to at least list lamdas untill fixed in upstream - -* Thu Jan 10 2019 Jiri Vanek - 2.0-3 -- added depndence of fernflower decompiler -- added and applied Patch1, systemFernflower.patch to enable system fernflower - -* Wed Nov 28 2018 Petra Mikova - 2.0-2 -- fixed changelog - -* Mon Nov 19 2018 Petra Mikova - 2.0-1 -- fixed issues listed in review (rhbz#1636019) -- added installation of desktop file - -* Wed Jun 06 2018 Petra Mikova - 1.1-1 -- initial commit +%autochangelog From 4cd54af8429c7c32cca9b90017eff42d9734b920 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Wed, 18 Sep 2024 14:50:02 +0200 Subject: [PATCH 62/73] Use java annotation removal tool --- java-runtime-decompiler.spec | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 5e344f8..831f745 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -43,6 +43,7 @@ BuildRequires: java-devel BuildRequires: google-gson BuildRequires: desktop-file-utils BuildRequires: classpathless-compiler +BuildRequires: jurand Requires: google-gson Requires: byteman Requires: rsyntaxtextarea @@ -125,6 +126,8 @@ This package provides bindings and requirements to asmtools7 disassembler and as %patch 63 -p0 %patch 7 -p1 +%java_remove_annotations decompiler_agent runtime-decompiler -s -n SuppressFBWarnings + %build pushd runtime-decompiler %pom_remove_plugin :maven-jar-plugin @@ -133,11 +136,6 @@ popd %pom_remove_plugin :maven-checkstyle-plugin %pom_remove_plugin :formatter-maven-plugin %pom_remove_dep :spotbugs-annotations -a=`find | grep ".*\.java$"` -for x in $a ; do - #grep -e ".*SuppressFBWarnings.*" $x && echo "^ $x ^" - sed "s/.*SuppressFBWarnings.*//g" $x -i -done xmvn --version echo $JAVA_HOME export JAVA_HOME=/usr/lib/jvm/java-21-openjdk #why? From f8a531eaf605f483872a9d324d4d8888abde0b96 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 07:42:10 +0000 Subject: [PATCH 63/73] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 9c25d6b6e32b2cec9de6cebb3298df20919a1d9a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 17:55:58 +0000 Subject: [PATCH 64/73] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From cf5e8ddab8af656fb5a377a0129c7e87ef956c34 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Tue, 29 Jul 2025 21:21:41 +0200 Subject: [PATCH 65/73] Rebuilt for java-25-openjdk as preffered jdk https://fedoraproject.org/wiki/Changes/Java25AndNoMoreSystemJdk Note, that since f43, you should be always explicit on what jdk to use. This commit should do exactly that. --- java-runtime-decompiler.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 831f745..d472796 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -26,7 +26,7 @@ Patch7: removeMultilineSpotbugs.patch BuildArch: noarch ExclusiveArch: %{java_arches} noarch -BuildRequires: maven-local +BuildRequires: maven-local-openjdk25 BuildRequires: byteman BuildRequires: rsyntaxtextarea BuildRequires: junit5 @@ -39,7 +39,7 @@ BuildRequires: maven-surefire-provider-junit5 BuildRequires: maven-surefire BuildRequires: maven-surefire-plugin BuildRequires: maven-clean-plugin -BuildRequires: java-devel +BuildRequires: java-25-devel BuildRequires: google-gson BuildRequires: desktop-file-utils BuildRequires: classpathless-compiler From 5754bd242e68be5f479a30d2661a88e5924461b1 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Thu, 4 Sep 2025 10:03:50 +0200 Subject: [PATCH 66/73] manual bodhi update for jdk25 needed on selected pkgs From 82a7cfd6d0b10312f356584dadb0e17517152866 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Thu, 4 Sep 2025 10:12:35 +0200 Subject: [PATCH 67/73] Removed java home --- java-runtime-decompiler.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index d472796..5b4bc5e 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -137,8 +137,8 @@ popd %pom_remove_plugin :formatter-maven-plugin %pom_remove_dep :spotbugs-annotations xmvn --version -echo $JAVA_HOME -export JAVA_HOME=/usr/lib/jvm/java-21-openjdk #why? +#echo $JAVA_HOME +#export JAVA_HOME=/usr/lib/jvm/java-25-openjdk #why? xmvn --version %mvn_build -f --xmvn-javadoc -- -Plegacy CPLC=/usr/share/java/classpathless-compiler From 292215c478c53cae3982d67d8c9593ccda19fec2 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Sun, 19 Oct 2025 16:40:52 +0200 Subject: [PATCH 68/73] 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/" } From 2a2543ceb15b2922a1ae39dd0711db915c6b1250 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Sun, 19 Oct 2025 18:10:18 +0200 Subject: [PATCH 69/73] Enabled jd plugin --- java-runtime-decompiler.spec | 21 +++++++++++++++------ systemJd.patch | 12 ++++++++++++ 2 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 systemJd.patch diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index b906b8c..357f7f4 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -21,6 +21,7 @@ Patch6: systemJcoder.patch Patch61: systemJcoder7.patch Patch62: systemJcoderG.patch Patch63: systemJcoderG7.patch +Patch7: systemJd.patch BuildArch: noarch ExclusiveArch: %{java_arches} noarch @@ -50,6 +51,7 @@ Recommends: java Recommends: %{name}-fernflower-plugin Recommends: %{name}-procyon-plugin Recommends: %{name}-cfr-plugin +Recommends: %{name}-jd-plugin Recommends: %{name}-asmtools-plugin Recommends: %{name}-asmtools7-plugin @@ -89,6 +91,14 @@ Requires: %{name} = %{version}-%{release} %description cfr-plugin This package provides bindings and requirements to CFR decompiler for %{name}. +%package jd-plugin +Requires: jd-core +Summary: JD decompiler %{name} +Requires: %{name} = %{version}-%{release} + +%description jd-plugin +This package provides bindings and requirements to JD decompiler for %{name}. + %package asmtools-plugin Requires: openjdk-asmtools >= 8.0.b09 Summary: asmtools disassembler and assembler plugin for %{name} @@ -120,6 +130,7 @@ This package provides bindings and requirements to asmtools7 disassembler and as %patch -P61 -p0 %patch -P62 -p0 %patch -P63 -p0 +%patch -P7 -p0 jurand -i -s -a -n SuppressFBWarnings decompiler_agent runtime-decompiler @@ -132,8 +143,6 @@ popd %pom_remove_plugin :formatter-maven-plugin %pom_remove_dep :spotbugs-annotations xmvn --version -#echo $JAVA_HOME -#export JAVA_HOME=/usr/lib/jvm/java-25-openjdk #why? xmvn --version %mvn_build -f --xmvn-javadoc -- -Plegacy CPLC=/usr/share/java/classpathless-compiler @@ -165,10 +174,6 @@ install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/applications desktop-file-install --vendor="fedora" --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE3} desktop-file-install --vendor="fedora" --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{SOURCE4} -#jd is not yet packed and sucks anyway -rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.java -rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json - %files -f .mfiles %attr(755, root, -) %{_bindir}/java-runtime-decompiler %attr(755, root, -) %{_bindir}/java-runtime-decompiler-hex @@ -197,6 +202,10 @@ rm $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json %config %{_sysconfdir}/%{name}/plugins/CfrDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/CfrDecompilerWrapper.json +%files jd-plugin +%config %{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.java +%config(noreplace) %{_sysconfdir}/%{name}/plugins/JdDecompilerWrapper.json + %files asmtools-plugin %config %{_sysconfdir}/%{name}/plugins/JasmDecompilerWrapper.java %config(noreplace) %{_sysconfdir}/%{name}/plugins/JasmDecompilerWrapper.json diff --git a/systemJd.patch b/systemJd.patch new file mode 100644 index 0000000..2a2be52 --- /dev/null +++ b/systemJd.patch @@ -0,0 +1,12 @@ +--- runtime-decompiler/src/plugins/JdDecompilerWrapper.json ++++ runtime-decompiler/src/plugins/JdDecompilerWrapper.json +@@ -2,7 +2,7 @@ + "Name": "JD", + "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JdDecompilerWrapper.java", + "DependencyURL": [ +- "file://${HOME}/.m2/repository/org/jd/jd-core/1.1.3/jd-core-1.1.3.jar" ++ "file:///usr/share/java/jd-core/jd-core.jar" + ], + "DecompilerDownloadURL": "https://github.com/java-decompiler/jd-core/" + } + From b9b96c0bccb7058d7804c9b97c24a0c8c69831dc Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Tue, 21 Oct 2025 18:59:12 +0200 Subject: [PATCH 70/73] Fixed jd plugin --- systemJd.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/systemJd.patch b/systemJd.patch index 2a2be52..5228d21 100644 --- a/systemJd.patch +++ b/systemJd.patch @@ -1,8 +1,10 @@ --- runtime-decompiler/src/plugins/JdDecompilerWrapper.json +++ runtime-decompiler/src/plugins/JdDecompilerWrapper.json -@@ -2,7 +2,7 @@ +@@ -1,8 +1,8 @@ + { "Name": "JD", - "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JdDecompilerWrapper.java", +- "WrapperURL": "file://${XDG_CONFIG_HOME}/plugins/JdDecompilerWrapper.java", ++ "WrapperURL": "file:/etc/java-runtime-decompiler/plugins/JdDecompilerWrapper.java", "DependencyURL": [ - "file://${HOME}/.m2/repository/org/jd/jd-core/1.1.3/jd-core-1.1.3.jar" + "file:///usr/share/java/jd-core/jd-core.jar" From be57c9a98a0274f24c150590e1161c850f8ecf12 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Thu, 23 Oct 2025 16:02:50 +0200 Subject: [PATCH 71/73] getrid of autrelease --- java-runtime-decompiler.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 357f7f4..61b7a9f 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 10.0 -Release: %autorelease +Release: 5 License: GPL-3.0-only URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz @@ -25,7 +25,7 @@ Patch7: systemJd.patch BuildArch: noarch ExclusiveArch: %{java_arches} noarch -BuildRequires: maven-local-openjdk25 +BuildRequires: maven-local-openjdk21 BuildRequires: byteman BuildRequires: rsyntaxtextarea BuildRequires: junit5 @@ -36,7 +36,7 @@ BuildRequires: maven-surefire-provider-junit5 BuildRequires: maven-surefire BuildRequires: maven-surefire-plugin BuildRequires: maven-clean-plugin -BuildRequires: java-25-devel +BuildRequires: java-21-devel BuildRequires: google-gson BuildRequires: desktop-file-utils BuildRequires: classpathless-compiler From 859248084e9f1189ce87dca2a4577014d86d1203 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Thu, 23 Oct 2025 16:23:35 +0200 Subject: [PATCH 72/73] Added forgotten %dist --- java-runtime-decompiler.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index 61b7a9f..d263e70 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 10.0 -Release: 5 +Release: 6%{?dist} License: GPL-3.0-only URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz From d488c1b909759fa4a94bb48f7fa2cd4546065edb Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Mon, 5 Jan 2026 18:29:47 +0100 Subject: [PATCH 73/73] Bumped to jdk25 --- java-runtime-decompiler.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/java-runtime-decompiler.spec b/java-runtime-decompiler.spec index d263e70..8ef55d9 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,7 +1,7 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 10.0 -Release: 6%{?dist} +Release: 7%{?dist} License: GPL-3.0-only URL: https://github.com/pmikova/java-runtime-decompiler Source0: https://github.com/judovana/%{name}/archive/%{name}-%{version}.tar.gz @@ -25,7 +25,7 @@ Patch7: systemJd.patch BuildArch: noarch ExclusiveArch: %{java_arches} noarch -BuildRequires: maven-local-openjdk21 +BuildRequires: maven-local-openjdk25 BuildRequires: byteman BuildRequires: rsyntaxtextarea BuildRequires: junit5 @@ -36,7 +36,7 @@ BuildRequires: maven-surefire-provider-junit5 BuildRequires: maven-surefire BuildRequires: maven-surefire-plugin BuildRequires: maven-clean-plugin -BuildRequires: java-21-devel +BuildRequires: java-25-devel BuildRequires: google-gson BuildRequires: desktop-file-utils BuildRequires: classpathless-compiler