diff --git a/includeLambdas.patch b/includeLambdas.patch new file mode 100644 index 0000000..2fc9fee --- /dev/null +++ b/includeLambdas.patch @@ -0,0 +1,58 @@ +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.spec b/java-runtime-decompiler.spec index d25e5d7..51062e0 100644 --- a/java-runtime-decompiler.spec +++ b/java-runtime-decompiler.spec @@ -1,15 +1,17 @@ Summary: Application for extraction and decompilation of JVM byte code Name: java-runtime-decompiler Version: 2.0 -Release: 3%{?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 Source1: java-runtime-decompiler Source2: java-runtime-decompiler.1 Source3: jrd.desktop -# Remove RSyntaxTextArea library from the sources and dependencies, as it is not packaged for epel -Patch1: remove_rsyntaxtextarea.patch +Patch0: remove_rsyntaxtextarea.patch +Patch1: systemFernflower.patch +Patch2: systemProcyon.patch +Patch3: includeLambdas.patch BuildArch: noarch BuildRequires: maven-local BuildRequires: byteman @@ -20,6 +22,8 @@ BuildRequires: java-devel = 1:1.8.0 BuildRequires: google-gson BuildRequires: desktop-file-utils Requires: java-devel = 1:1.8.0 +Recommends: fernflower +Recommends: procyon-decompiler %description This application can access JVM memory at runtime, @@ -33,7 +37,10 @@ This package contains the API documentation for %{name}. %prep %setup -q -n %{name}-%{name}-%{version} -%patch1 -p1 +%patch0 -p1 +%patch1 +%patch2 +%patch3 %build pushd runtime-decompiler @@ -77,8 +84,20 @@ desktop-file-install --vendor="fedora" \ %license LICENSE %changelog +* 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 + * Mon Dec 3 2018 Petra Mikova - 2.0-3 -- patch to remove rsyntaxtextarea, because rhel does not have the package +- patch to remove rsyntaxtextarea, because rhel does not have the package(guilty is jvanek, sorry) - removed from spec and runscript accordingly * Wed Nov 28 2018 Petra Mikova - 2.0-2 diff --git a/systemFernflower.patch b/systemFernflower.patch new file mode 100644 index 0000000..ab707cd --- /dev/null +++ b/systemFernflower.patch @@ -0,0 +1,13 @@ +--- runtime-decompiler/src/plugins/FernflowerDecompilerWrapper.json ++++ runtime-decompiler/src/plugins/FernflowerDecompilerWrapper.json +@@ -2,7 +2,7 @@ + "Name": "Fernflower", + "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/FernflowerDecompilerWrapper.java", + "DependencyURL": [ +- "file://${HOME}/IdeaProjects/fernflower/build/libs/fernflower.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 new file mode 100644 index 0000000..91e2c7b --- /dev/null +++ b/systemProcyon.patch @@ -0,0 +1,15 @@ +--- 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 @@ + "Name": "Procyon", + "WrapperURL": "file:///etc/java-runtime-decompiler/plugins/ProcyonDecompilerWrapper.java", + "DependencyURL": [ +- "file:///usr/share/java/procyon-decompiler.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 ++}