Compare commits
No commits in common. "rawhide" and "f35" have entirely different histories.
8 changed files with 261 additions and 25 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,4 +2,3 @@
|
|||
/v0.5.36.tar.gz
|
||||
/procyon-1.0~SNAPSHOT.tar.gz
|
||||
/procyon-92ba3f44b8f2b755a21efcdc05dec347ab4df552.tar.gz
|
||||
/procyon-88a95fa93c58322393174f84543edc7a0a2ca44d.tar.gz
|
||||
|
|
|
|||
12
adaptToNewerJcommander.patch
Normal file
12
adaptToNewerJcommander.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
--- a/Procyon.Decompiler/src/main/java/com/strobel/decompiler/CommandLineOptions.java_nw
|
||||
+++ b/Procyon.Decompiler/src/main/java/com/strobel/decompiler/CommandLineOptions.java
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
public class CommandLineOptions {
|
||||
@Parameter(description = "<type names or class/jar files>")
|
||||
- private final List<String> _inputs = new ArrayList<>();
|
||||
+ private List<String> _inputs = new ArrayList<>();
|
||||
|
||||
@Parameter(
|
||||
names = { "-?", "--help" },
|
||||
|
||||
34
disableFatJar.patch
Normal file
34
disableFatJar.patch
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
diff --git a/Procyon.Decompiler/build.gradle b/Procyon.Decompiler/build.gradle
|
||||
index 7377956..388de1e 100644
|
||||
--- a/Procyon.Decompiler/build.gradle
|
||||
+++ b/Procyon.Decompiler/build.gradle
|
||||
@@ -2,27 +2,13 @@ buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
-
|
||||
- dependencies {
|
||||
- classpath 'eu.appsatori:gradle-fatjar-plugin:0.3'
|
||||
- }
|
||||
}
|
||||
|
||||
jar.enabled = false
|
||||
uploadArchives.enabled = false
|
||||
|
||||
-apply plugin: 'eu.appsatori.fatjar'
|
||||
-
|
||||
-fatJar {
|
||||
-// from rootProject.allprojects.collect({ it.sourceSets.main.allSource })
|
||||
-
|
||||
- manifest {
|
||||
- attributes 'Title': archivesBaseName, 'Manifest-Version': '1.0', 'Version': version, 'Main-Class' : 'com.strobel.decompiler.DecompilerDriver'
|
||||
- }
|
||||
-}
|
||||
-
|
||||
dependencies {
|
||||
compile 'com.beust:jcommander:1.30'
|
||||
compile project(':Procyon.Core')
|
||||
compile project(':Procyon.CompilerTools')
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
30
lookupPatch.patch
Normal file
30
lookupPatch.patch
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
--- Procyon.Reflection/src/main/java/com/strobel/reflection/emit/TypeBuilder.java
|
||||
+++ Procyon.Reflection/src/main/java/com/strobel/reflection/emit/TypeBuilder.java
|
||||
@@ -34,6 +34,7 @@
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.annotation.Annotation;
|
||||
+import java.lang.invoke.MethodHandles;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.security.ProtectionDomain;
|
||||
@@ -1231,14 +1232,10 @@
|
||||
|
||||
_hasBeenCreated = true;
|
||||
|
||||
- _generatedClass = (Class<T>) getUnsafeInstance().defineClass(
|
||||
- fullName,
|
||||
- classBytes,
|
||||
- 0,
|
||||
- classBytes.length,
|
||||
- Thread.currentThread().getContextClassLoader(),
|
||||
- _protectionDomain
|
||||
- );
|
||||
+ MethodHandles.Lookup lookup = MethodHandles.lookup();
|
||||
+ MethodHandles.Lookup privateLookup = MethodHandles.privateLookupIn(Class.forName(fullName), lookup);
|
||||
+ _generatedClass = (Class<T>)privateLookup.defineClass(classBytes);
|
||||
+
|
||||
|
||||
RuntimeHelpers.ensureClassInitialized(_generatedClass);
|
||||
|
||||
|
||||
12
newJcommander.patch
Normal file
12
newJcommander.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
--- a/Procyon.Decompiler/src/main/java/com/strobel/decompiler/DecompilerDriver.java
|
||||
+++ a/Procyon.Decompiler/src/main/java/com/strobel/decompiler/DecompilerDriver.java
|
||||
@@ -64,7 +64,7 @@
|
||||
final boolean decompileJar = !StringUtilities.isNullOrWhitespace(jarFile);
|
||||
|
||||
if (options.getPrintVersion()) {
|
||||
- JCommander.getConsole().println(Procyon.version());
|
||||
+ jCommander.getConsole().println(Procyon.version());
|
||||
if (options.getPrintUsage()) {
|
||||
jCommander.usage();
|
||||
}
|
||||
|
||||
94
procyon.spec
94
procyon.spec
|
|
@ -2,32 +2,39 @@
|
|||
%define debug_package %{nil}
|
||||
%global remove_tests 1
|
||||
|
||||
%global commit 88a95fa93c58322393174f84543edc7a0a2ca44d
|
||||
%global commit 92ba3f44b8f2b755a21efcdc05dec347ab4df552
|
||||
%global shortcommit %(c=%{commit}; echo ${c:0:7})
|
||||
%global commitdate 20220221
|
||||
%global commitdate 20210619
|
||||
|
||||
Name: procyon
|
||||
Version: 0.6.0
|
||||
Release: 0.11.%{commitdate}.git%{shortcommit}%{?dist}
|
||||
Version: 0.5.36
|
||||
Release: 0.7.%{commitdate}.git%{shortcommit}%{?dist}
|
||||
Summary: procyon java decompiler and other tools
|
||||
# Automatically converted from old format: ASL 2.0 - review is highly recommended.
|
||||
License: Apache-2.0
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/mstrobel/procyon
|
||||
# ./generate-tarball.sh
|
||||
# This script uses a fork of the original project
|
||||
Source0: %{name}-%{commit}.tar.gz
|
||||
Source1: procyon-decompiler
|
||||
Patch3: madeToPasXlint.patch
|
||||
|
||||
# main removal is not upstream-able, and is enforced by fedora policy
|
||||
# signature is touching online world, necessary for packaging, not usptream able
|
||||
Patch0: removeSigningAndIfDecompilerAndMain.patch
|
||||
# fat jar do not have much sense for fedora packagin. not upstream-able
|
||||
Patch1: disableFatJar.patch
|
||||
# patch should be proposed to upstream.
|
||||
Patch2: adaptToNewerJcommander.patch
|
||||
Patch3: madeToPasXlint.patch
|
||||
Patch4: newJcommander.patch
|
||||
Patch5: lookupPatch.patch
|
||||
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
|
||||
BuildRequires: javapackages-tools
|
||||
BuildRequires: java-25-devel
|
||||
BuildRequires: java-devel
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: beust-jcommander
|
||||
Requires: java-25-headless
|
||||
Requires: java-headless
|
||||
Requires: javapackages-tools
|
||||
# main package is just meta package for all subprojects and their artifacts
|
||||
Recommends: %{name}-compilertools = %{version}-%{release}
|
||||
|
|
@ -45,7 +52,6 @@ The Procyon libraries are available from Maven Central under group ID org.bitbuc
|
|||
%package compilertools
|
||||
Summary: The procyon-compilertools project
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
Requires: javapackages-tools
|
||||
|
||||
%description compilertools
|
||||
|
|
@ -57,7 +63,6 @@ The Compiler Toolset is still early in development and subject to change.
|
|||
%package core
|
||||
Summary: The procyon-core framework contains common support classes
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
Requires: javapackages-tools
|
||||
|
||||
%description core
|
||||
|
|
@ -69,7 +74,6 @@ and some runtime type helpers.
|
|||
%package expressions
|
||||
Summary: The procyon-expressions framework provides a more natural form of Linq-like code generation
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
Requires: javapackages-tools
|
||||
|
||||
%description expressions
|
||||
|
|
@ -84,7 +88,6 @@ minus the dynamic callsite support (and with more relaxed rules regarding type c
|
|||
%package decompiler
|
||||
Summary: procyon-decompiler is a front-end for the Java decompiler
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
Requires: %{name}-core
|
||||
Requires: %{name}-compilertools
|
||||
Requires: beust-jcommander
|
||||
|
|
@ -98,7 +101,6 @@ https://bitbucket.org/mstrobel/procyon/wiki/Java%20Decompiler
|
|||
%package reflection
|
||||
Summary: The procyon-reflection framework provides a rich reflection and code generation API
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{java_arches} noarch
|
||||
Requires: javapackages-tools
|
||||
|
||||
%description reflection
|
||||
|
|
@ -121,8 +123,15 @@ find | grep "\\.jar$" && exit 1
|
|||
dos2unix Procyon.Decompiler/build.gradle
|
||||
dos2unix build.gradle
|
||||
dos2unix README.md
|
||||
# also removing main method from enter point jar
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
dos2unix Procyon.CompilerTools/src/main/java/com/strobel/assembler/metadata/MethodBinder.java
|
||||
%patch -P3 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
dos2unix Procyon.Reflection/src/main/java/com/strobel/reflection/emit/TypeBuilder.java
|
||||
%patch5 -p0
|
||||
|
||||
%build
|
||||
mkdir -p build/Procyon.CompilerTools/{libs,classes}
|
||||
|
|
@ -131,12 +140,10 @@ mkdir -p build/Procyon.Decompiler/{libs,classes}
|
|||
mkdir -p build/Procyon.Expressions/{libs,classes}
|
||||
mkdir -p build/Procyon.Reflection/{libs,classes}
|
||||
|
||||
sourceVersion="-source 8 -target 8 -g"
|
||||
|
||||
javac $sourceVersion -d build/Procyon.Core/classes/ ` find Procyon.Core/src/main/java -type f | grep "\.java"`
|
||||
javac $sourceVersion -d build/Procyon.Reflection/classes/ -cp build/Procyon.Core/classes/ ` find Procyon.Reflection/src/main/java -type f | grep "\.java"`
|
||||
javac $sourceVersion -d build/Procyon.Expressions/classes/ -cp build/Procyon.Core/classes/:build/Procyon.Reflection/classes/ ` find Procyon.Expressions/src/main/java -type f | grep "\.java"`
|
||||
javac $sourceVersion -d build/Procyon.CompilerTools/classes/ -cp build/Procyon.Core/classes/ ` find Procyon.CompilerTools/src/main/java -type f | grep "\.java"`
|
||||
javac -d build/Procyon.Core/classes/ ` find Procyon.Core/src/main/java -type f | grep "\.java"`
|
||||
javac -d build/Procyon.Reflection/classes/ -cp build/Procyon.Core/classes/ ` find Procyon.Reflection/src/main/java -type f | grep "\.java"`
|
||||
javac -d build/Procyon.Expressions/classes/ -cp build/Procyon.Core/classes/:build/Procyon.Reflection/classes/ ` find Procyon.Expressions/src/main/java -type f | grep "\.java"`
|
||||
javac -d build/Procyon.CompilerTools/classes/ -cp build/Procyon.Core/classes/ ` find Procyon.CompilerTools/src/main/java -type f | grep "\.java"`
|
||||
|
||||
# pack the jars
|
||||
for x in Procyon.CompilerTools Procyon.Core Procyon.Reflection Procyon.Expressions ; do
|
||||
|
|
@ -214,4 +221,45 @@ popd
|
|||
%doc README.md
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.36-0.7.20210619.git92ba3f4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Thu Jun 03 2020 Jiri Vanek <jvanek@redhat.com> - 0.5.36-0.6-92ba3f4
|
||||
- moved to commit versioning
|
||||
|
||||
* Thu Jun 03 2021 Marian Koncek <mkoncek@redhat.com> - 1.0~SNAPSHOT-1
|
||||
- Update to upstream version 1.0~SNAPSHOT
|
||||
|
||||
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.36-0.5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Thu Dec 10 2020 Jiri Vanek <jvanek@redhat.com> - 0.5.36-0.4
|
||||
- set source/target of 8
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.36-0.3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Sat Jul 11 2020 Jiri Vanek <jvanek@redhat.com> - 0.5.36-0.2
|
||||
- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11
|
||||
|
||||
* Tue Feb 18 2020 Jiri Vanek <jvanek@redhat.com> - 0.5.36-0.1
|
||||
- bumped to latest tagged forest 0.5.36
|
||||
- fixed bug in usage of newer jcommander
|
||||
|
||||
* Tue Feb 18 2020 Jiri Vanek <jvanek@redhat.com> - 0.5.33-0.5.pre02
|
||||
- removed fat jar, as gradle is gone
|
||||
- removed javadoc and srcs artifacts. will eb building by javac
|
||||
- buit by javac instead of gradle
|
||||
|
||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.33-0.3.pre02
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.33-0.2.pre02
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Fri Dec 21 2018 Jiri Vanek <jvanek@redhat.com> 0.5.33-0.1.pre02
|
||||
- created special package for assembled fat jar
|
||||
- adapted rest of package to include and cooperate with minimal decompiler frontend
|
||||
|
||||
* Fri Dec 21 2018 Jiri Vanek <jvanek@redhat.com> 0.5.33-0.1.pre01
|
||||
- inital load
|
||||
|
|
|
|||
101
removeSigningAndIfDecompilerAndMain.patch
Normal file
101
removeSigningAndIfDecompilerAndMain.patch
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
diff --git a/build.gradle b/build.gradle
|
||||
index f521868..3168766 100644
|
||||
--- a/build.gradle
|
||||
+++ b/build.gradle
|
||||
@@ -62,9 +62,6 @@ rootProject.uploadArchives.enabled = false
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'maven'
|
||||
- apply plugin: 'signing'
|
||||
-
|
||||
- final boolean shouldSign = "true".equalsIgnoreCase(System.properties.getProperty("procyon.signing.enabled"))
|
||||
|
||||
archivesBaseName = "procyon-${(it.name as String).split('\\.')[1].toLowerCase()}"
|
||||
|
||||
@@ -131,86 +128,6 @@ subprojects {
|
||||
archives javadocJar
|
||||
archives sourcesJar
|
||||
}
|
||||
-
|
||||
- if (shouldSign) {
|
||||
- signing {
|
||||
- sign configurations.archives
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- uploadArchives {
|
||||
- repositories.mavenDeployer {
|
||||
- if (shouldSign) {
|
||||
- beforeDeployment { MavenDeployment deployment ->
|
||||
- signing.signPom(deployment)
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- snapshotRepository(url: "https://oss.sonatype.org/content/repositories/snapshots") {
|
||||
- authentication(userName: project.properties.get("procyon.sonatype.username"),
|
||||
- password: project.properties.get("procyon.sonatype.password"))
|
||||
- }
|
||||
-
|
||||
- repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2") {
|
||||
- authentication(userName: project.properties.get("procyon.sonatype.username"),
|
||||
- password: project.properties.get("procyon.sonatype.password"))
|
||||
- }
|
||||
-
|
||||
- pom {
|
||||
- groupId = project.group
|
||||
- version = project.version
|
||||
- artifactId = project.archivesBaseName
|
||||
-
|
||||
- project {
|
||||
- name project.archivesBaseName
|
||||
- packaging 'jar'
|
||||
- description 'Procyon'
|
||||
- url 'https://bitbucket.org/mstrobel/procyon'
|
||||
-
|
||||
- scm {
|
||||
- url 'https://bitbucket.org/mstrobel/procyon'
|
||||
- connection 'scm:hg:https://hg@bitbucket.org/mstrobel/procyon'
|
||||
- developerConnection 'scm:hg:https://mstrobel@bitbucket.org/mstrobel/procyon'
|
||||
- }
|
||||
-
|
||||
- issueManagement {
|
||||
- system 'jira'
|
||||
- url 'https://bitbucket.org/mstrobel/procyon/issues'
|
||||
- }
|
||||
-
|
||||
- licenses {
|
||||
- license {
|
||||
- name 'The Apache Software License, Version 2.0'
|
||||
- url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||
- distribution 'repo'
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- developers {
|
||||
- developer {
|
||||
- id 'mstrobel'
|
||||
- name 'Mike Strobel'
|
||||
- roles {
|
||||
- role 'owner'
|
||||
- role 'packager'
|
||||
- role 'developer'
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- dependencies {
|
||||
- dependency {
|
||||
- groupId 'junit'
|
||||
- artifactId 'junit'
|
||||
- version '4.11'
|
||||
- scope 'test'
|
||||
-// optional = true
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
}
|
||||
}
|
||||
|
||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (procyon-88a95fa93c58322393174f84543edc7a0a2ca44d.tar.gz) = 69c782cb8648f5c8f6ed1999d301df2318f64a3d3479a16ef340891deaef7a1b161d4d2808d98e70372381626dbe5488d9d0dc9b6c17feacc8e0d38f1747985e
|
||||
SHA512 (procyon-92ba3f44b8f2b755a21efcdc05dec347ab4df552.tar.gz) = eca4fd9c7b3b4b09e4bcf7e317ca3988301899b2a784fe4b789cb5797934a849f63a9ec330a05a6c4232660c6e2878cfd242e756f0131575df72404cec573b68
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue