From 665ff59e12335bc28d74a814baa31cd5b839ab72 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Thu, 12 Aug 2021 17:28:16 +0200 Subject: [PATCH 01/12] 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 fbb744b124b059c278f2ecc2deaa32b462f86c86 Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Thu, 12 Aug 2021 17:28:42 +0200 Subject: [PATCH 02/12] 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 03/12] 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 04/12] 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 05/12] 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 06/12] 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 07/12] 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 08/12] 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 09/12] 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 10/12] 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 11/12] 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 12/12] 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