Initial bump to 5.0
This commit is contained in:
parent
2b7694119f
commit
b89613b407
8 changed files with 25 additions and 161 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 <releng@fedoraproject.org> - 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 <releng@fedoraproject.org> - 4.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
|
|
@ -1,94 +0,0 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
# java runtime decompiler launch script
|
||||
|
||||
# JPackage Project <http://www.jpackage.org/>
|
||||
# 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 "$@"
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
<dependency>
|
||||
<groupId>com.fifesoft</groupId>
|
||||
<artifactId>rsyntaxtextarea</artifactId>
|
||||
- <version>2.6.1</version>
|
||||
- <version>3.1.2</version>
|
||||
+ <version>3.1.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (java-runtime-decompiler-4.0.tar.gz) = 073c3f2868ad82feee407626ed8a9962ff76ee49dc5feecd253a572d507c10c814112faeee8e1d3bf0007f8a95d7750ab6eadd845e54174e5695ca68df622764
|
||||
SHA512 (java-runtime-decompiler-5.0.beta2.tar.gz) = 81269e4885f34227ea832c29fdc646a25f65e292ed72783c40b65ba59a1937daf021eac6c3cf2176b8b3b511e62c2ecbf5d72fb4b5f512b99ce4124d0749ba02
|
||||
|
|
|
|||
|
|
@ -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
|
||||
+}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
+}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue