From 1ef24c1d6860abc38f28416a2d8465fb15b52e36 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Mon, 26 Aug 2019 19:04:29 +0200 Subject: [PATCH] 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"