Compare commits

..

No commits in common. "00b82a268f8dd20038b8459de089908d28370171" and "50771324748280f43e867bfe33946477c2f22c9f" have entirely different histories.

10 changed files with 117 additions and 110 deletions

View File

@ -1 +0,0 @@
1

12
.gitignore vendored
View File

@ -1,3 +1,9 @@
/ecjsrc-4.20.jar
/ecj-3.27.0.pom
/javax16api.jar
/noarch
/.build-*.log
/*.src.rpm
/ecj-*.pom
/ecj-*/
/ecjsrc-*.jar
/java10api.jar
/java14api.jar
/javax15api.jar

18
.project Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ecj</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.linuxtools.rpm.rpmlint.rpmlintBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.linuxtools.rpm.core.rpmnature</nature>
<nature>org.eclipse.linuxtools.rpm.rpmlint.rpmlintNature</nature>
</natures>
</projectDescription>

View File

@ -1,27 +1,27 @@
Manifest-Version: 1.0
Created-By: Maven Archiver 3.5.0
Build-Jdk-Spec: 11
Main-Class: org.eclipse.jdt.internal.compiler.batch.Main
Bundle-ManifestVersion: 2
Bundle-Name: Eclipse Compiler for Java(TM)
Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
Bundle-Version: 3.27.0.v20210823-1758
Export-Package: org.eclipse.jdt.core,org.eclipse.jdt.core.compiler,org
.eclipse.jdt.internal.antadapter;x-internal:=true,org.eclipse.jdt.int
ernal.compiler;x-internal:=true,org.eclipse.jdt.internal.compiler.apt
.dispatch;x-internal:=true,org.eclipse.jdt.internal.compiler.apt.mode
l;x-internal:=true,org.eclipse.jdt.internal.compiler.apt.util;x-inter
nal:=true,org.eclipse.jdt.internal.compiler.ast;x-internal:=true,org.
eclipse.jdt.internal.compiler.batch;x-internal:=true,org.eclipse.jdt.
internal.compiler.classfmt;x-internal:=true,org.eclipse.jdt.internal.
compiler.codegen;x-internal:=true,org.eclipse.jdt.internal.compiler.e
nv;x-internal:=true,org.eclipse.jdt.internal.compiler.flow;x-internal
:=true,org.eclipse.jdt.internal.compiler.impl;x-internal:=true,org.ec
lipse.jdt.internal.compiler.lookup;x-internal:=true,org.eclipse.jdt.i
nternal.compiler.parser;x-internal:=true,org.eclipse.jdt.internal.com
piler.parser.diagnose;x-internal:=true,org.eclipse.jdt.internal.compi
ler.problem;x-internal:=true,org.eclipse.jdt.internal.compiler.util;x
-internal:=true,org.eclipse.jdt.internal.compiler.tool;x-internal:=tr
ue
Bundle-Name: Eclipse Compiler for Java(TM)
Bundle-Version: 3.24.0.v20201123-0742
Bundle-ClassPath: .
Bundle-ManifestVersion: 2
Bundle-Vendor: Eclipse.org
Export-Package: org.eclipse.jdt.core,org.eclipse.jdt.core.compiler,org.e
clipse.jdt.internal.antadapter;x-internal:=true,org.eclipse.jdt.interna
l.compiler;x-internal:=true,org.eclipse.jdt.internal.compiler.apt.dispa
tch;x-internal:=true,org.eclipse.jdt.internal.compiler.apt.model;x-inte
rnal:=true,org.eclipse.jdt.internal.compiler.apt.util;x-internal:=true,
org.eclipse.jdt.internal.compiler.ast;x-internal:=true,org.eclipse.jdt.
internal.compiler.batch;x-internal:=true,org.eclipse.jdt.internal.compi
ler.classfmt;x-internal:=true,org.eclipse.jdt.internal.compiler.codegen
;x-internal:=true,org.eclipse.jdt.internal.compiler.env;x-internal:=tru
e,org.eclipse.jdt.internal.compiler.flow;x-internal:=true,org.eclipse.j
dt.internal.compiler.impl;x-internal:=true,org.eclipse.jdt.internal.com
piler.lookup;x-internal:=true,org.eclipse.jdt.internal.compiler.parser;
x-internal:=true,org.eclipse.jdt.internal.compiler.parser.diagnose;x-in
ternal:=true,org.eclipse.jdt.internal.compiler.problem;x-internal:=true
,org.eclipse.jdt.internal.compiler.util;x-internal:=true,org.eclipse.jd
t.internal.compiler.tool;x-internal:=true
Build-Jdk-Spec: 11
Created-By: Maven Archiver 3.5.0
Main-Class: org.eclipse.jdt.internal.compiler.batch.Main

View File

@ -1,18 +1,13 @@
From e7ff390ef777bd818ccc6e6f8f3a56f36020abfe Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@gmail.com>
Date: Wed, 15 Sep 2021 10:21:53 +0100
Subject: [PATCH 1/2] Always generate bytecode debuginfo
When ecj is used to build RPMs
---
.../jdt/internal/compiler/batch/Main.java | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/org/eclipse/jdt/internal/compiler/batch/Main.java b/org/eclipse/jdt/internal/compiler/batch/Main.java
index f77372d..73a0d24 100644
--- a/org/eclipse/jdt/internal/compiler/batch/Main.java
+++ b/org/eclipse/jdt/internal/compiler/batch/Main.java
@@ -3109,6 +3109,29 @@ public void configure(String[] argv) {
### Eclipse Workspace Patch 1.0
#P org.eclipse.jdt.core
Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v
retrieving revision 1.327
diff -u -r1.327 Main.java
--- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 21 Apr 2008 15:00:59 -0000 1.327
+++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 20 Nov 2008 19:26:57 -0000
@@ -2609,6 +2609,29 @@
this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
}
@ -42,6 +37,3 @@ index f77372d..73a0d24 100644
this.logger.logCommandLineArguments(newCommandLineArgs);
this.logger.logOptions(this.options);
--
2.31.1

View File

@ -1,57 +1,62 @@
Epoch: 1
%global eclipse_ver 4.20
%global bundle_ver 3.27.0
%global jar_ver %{eclipse_ver}
%global drop R-%{jar_ver}-202106111600
%global qualifier R-4.18-202012021800
Summary: Eclipse Compiler for Java
Name: ecj
Version: %{eclipse_ver}
Release: 11%{?dist}
URL: https://www.eclipse.org
Name: ecj
Version: 4.18
Release: 3%{?dist}
URL: https://www.eclipse.org
License: EPL-2.0
Source0: https://download.eclipse.org/eclipse/downloads/drops4/%{drop}/ecjsrc-%{jar_ver}.jar
Source1: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/%{bundle_ver}/ecj-%{bundle_ver}.pom
# The ecj build does not generate a proper manifest, so use the one from the binary distribution
# Extracted from: https://download.eclipse.org/eclipse/downloads/drops4/%%{drop}/ecj-%%{jar_ver}.jar
Source2: MANIFEST.MF
Source0: https://download.eclipse.org/eclipse/downloads/drops4/%{qualifier}/ecjsrc-%{version}.jar
Source1: https://repo1.maven.org/maven2/org/eclipse/jdt/ecj/3.24.0/ecj-3.24.0.pom
# Extracted from https://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops4/%%{qualifier}/ecj-%%{version}.jar
Source4: MANIFEST.MF
# Java API stubs for newer JDKs to allow us to build on the system default JDK
# Fetched from https://github.com/eclipse/eclipse.jdt.core/blob/R4_18/org.eclipse.jdt.compiler.tool/lib/javax15api.jar
Source5: https://github.com/eclipse/eclipse.jdt.core/blob/R4_18/org.eclipse.jdt.compiler.tool/lib/javax15api.jar
# Always generate debug info when building RPMs (Andrew Haley)
Patch0: 0001-Always-generate-bytecode-debuginfo.patch
Patch0: %{name}-rpmdebuginfo.patch
# Include java API stubs in build
Patch1: javaAPI.patch
BuildArch: noarch
BuildRequires: ant
BuildRequires: javapackages-local
BuildRequires: java-17-openjdk-devel
Requires: java-headless >= 1:1.8.0
Requires: javapackages-tools
# Build with Java 11 against bootclasspath of Java 8
BuildRequires: java-11-openjdk-devel
BuildRequires: java-1.8.0-openjdk-devel
%description
ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
the JDT Core batch compiler.
%prep
%autosetup -p1 -c -n %{name}-%{eclipse_ver}
%setup -q -c
%patch0 -p1
%patch1
# Specify encoding
sed -i -e '/compilerarg/s/Xlint:none/Xlint:none -encoding cp1252/' build.xml
sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml
cp %{SOURCE1} pom.xml
mkdir -p scripts/binary/META-INF/
cp %{SOURCE2} scripts/binary/META-INF/MANIFEST.MF
cp %{SOURCE4} scripts/binary/META-INF/MANIFEST.MF
rm ./META-INF/ECLIPSE_.{SF,RSA}
# Aliases
%mvn_alias org.eclipse.jdt:ecj org.eclipse.jdt:core org.eclipse.jdt.core.compiler:ecj \
org.eclipse.tycho:org.eclipse.jdt.core org.eclipse.tycho:org.eclipse.jdt.compiler.apt
# Make Java API stubs available for other packages
%mvn_artifact "org.eclipse:javax15api:jar:15" %{SOURCE5}
%build
export JAVA_HOME=/usr/lib/jvm/java-17
ant
ant -Djavaapi=%{SOURCE5}
%install
%mvn_artifact pom.xml ecj.jar
@ -70,31 +75,6 @@ install -m 644 -p ecj.1 $RPM_BUILD_ROOT%{_mandir}/man1/ecj.1
%{_mandir}/man1/ecj*
%changelog
* Thu Feb 23 2023 Hui Wang <huwang@redhat.com> - 1:4.20-11
- Bump release so that the NVR on RHEL-9 is higher than RHEL-8
* Mon Feb 20 2023 Hui Wang <huwang@redhat.com> - 1:4.20-4
- Drop unnecessary javax16.api.jar
- Add dependency on javapackages-tools since the ecj binary requires it to run
* Thu Feb 02 2023 Hui Wang <huwang@redhat.com> - 1:4.20-3
- Add tmt gating plan
* Wed Feb 01 2023 Hui Wang <huwang@redhat.com> - 1:4.20-2
- Add gating.yaml
* Thu Jan 19 2023 Hui Wang <huwang@redhat.com> - 1:4.20-1
- Update to 4.20
* Wed Aug 25 2021 Stefan Bluhm <stefan.bluhm@clacee.eu> - 1:4.19-3
- Added RHEL8 build.
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:4.19-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Mar 10 2021 Mat Booth <mat.booth@redhat.com> - 1:4.19-1
- Update to latest upstream release
* Mon Mar 01 2021 Mat Booth <mat.booth@redhat.com> - 1:4.18-3
- Allow building against Java 11

View File

@ -1,6 +0,0 @@
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

26
javaAPI.patch Normal file
View File

@ -0,0 +1,26 @@
--- build.xml.orig 2018-03-20 15:15:57.063810672 +0000
+++ build.xml 2018-03-20 15:16:26.018700633 +0000
@@ -18,16 +18,20 @@
<property name="output" value="bin" />
<property name="jar_file" value="ecj.jar" />
+ <path id="build.path">
+ <pathelement path="${javaapi}"/>
+ <pathelement path="/usr/lib/jvm/java-1.8.0/jre/lib/rt.jar"/>
+ </path>
<target name="build">
<delete file="${basedir}/${jar_file}" failonerror="no" />
<delete dir="${output}" failonerror="no" />
<mkdir dir="${output}" />
- <javac srcdir="${basedir}" destdir="${output}"
- debuglevel="lines,source"
+ <javac srcdir="${basedir}" destdir="${output}" bootclasspathref="build.path"
+ debug="yes"
source="1.8"
target="1.8">
- <compilerarg line="-Xlint:none"/>
+ <compilerarg line="-Xlint:none -encoding cp1252"/>
</javac>
<delete file="${basedir}/META-INF/MANIFEST.MF" failonerror="false"/>

View File

@ -1,9 +0,0 @@
summary: Basic smoke test
prepare:
- name: packages
how: install
package:
- ecj
execute:
how: tmt
script: ecj -version

View File

@ -1,2 +1,3 @@
SHA512 (ecjsrc-4.20.jar) = fb27c0a37ed5cdfdcdbc904d067bfdd0477ddfd873a6cd8477d3b473734fd0e37329f0e9ab85dc5f89994d68d9886a488bd88568bc00e25f54c1a5a468dc1384
SHA512 (ecj-3.27.0.pom) = 675ab0f5f9a5bb7cc7feb47d98de4623d19a57a89b89d8191e6f7f0e524aae423a7f7fead380b0a58bafab439295ce01eeb442823033d415ac890f6b3ea070a2
SHA512 (ecj-3.24.0.pom) = 8ed2e8b16b917a4274a9e06c411f4a03d12c229b93038d400156ff5507a7983c1b8eaea7152a03416392adc4ce845567bc1200063ec3912384fd6c32261ff601
SHA512 (ecjsrc-4.18.jar) = d68134a517b4dfb24023c0b4871cf25513454049b631729c9b57767c7045a10299eba2bda2188d18492899165a7a723e94595cbc47a849ee12eaa66596df4f4b
SHA512 (javax15api.jar) = c1b16bff598301fa94cb50068350e006a249b5c71185c02113049af7c7b2afb298ef8651263221ed64a3282a0b515ab99cdd0fc44f94f606e9d859616ec2ef6b