Compare commits

...

10 Commits

Author SHA1 Message Date
Hui Wang 00b82a268f Resolves: #2172870 Bump release of ecj for RHEL-9 2023-02-23 19:35:39 +08:00
Hui Wang dffb4a93c2 Related: #2160545 Update BuildRequires to use java-17 2023-02-20 14:47:11 +08:00
Hui Wang b20d576ff7 Related: #2160545 Drop unneeded jar and add dep on javapackages-tools 2023-02-20 14:14:41 +08:00
Hui Wang c72d4577b8 Related: #2160545 Add tmt gating plan 2023-02-02 15:40:27 +08:00
Hui Wang 1b9c3de94a Related: #2160545 2023-02-01 23:04:51 +08:00
Hui Wang 15697b3264 Resolves: #2160545 Add ecj to RHEL9 2023-01-31 23:30:42 +08:00
David Fan ea8a14a938 Revert to new branch setup
This reverts commit 4d39955866.
2023-01-31 14:11:31 +00:00
Troy Dawson 33c4390a98 ecj package is retired on c9s for CS-753 2022-04-14 12:23:10 -07:00
Mohan Boddu b093bc8091 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
Signed-off-by: Mohan Boddu <mboddu@redhat.com>
2021-04-15 23:10:42 +00:00
DistroBaker 8940e412c0 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/ecj.git#c2b8fcc4de4547d373fec7d5bb949c41b7ecca6f
2021-03-13 18:55:57 +00:00
10 changed files with 111 additions and 118 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

12
.gitignore vendored
View File

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

View File

@ -1,18 +0,0 @@
<?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,13 +1,18 @@
### 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 @@
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) {
this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED);
}
@ -37,3 +42,6 @@ diff -u -r1.327 Main.java
this.logger.logCommandLineArguments(newCommandLineArgs);
this.logger.logOptions(this.options);
--
2.31.1

View File

@ -1,27 +1,27 @@
Manifest-Version: 1.0
Bundle-SymbolicName: org.eclipse.jdt.core.compiler.batch
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
Build-Jdk-Spec: 11
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
Bundle-ClassPath: .
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

View File

@ -1,62 +1,57 @@
Epoch: 1
%global qualifier R-4.18-202012021800
%global eclipse_ver 4.20
%global bundle_ver 3.27.0
%global jar_ver %{eclipse_ver}
%global drop R-%{jar_ver}-202106111600
Summary: Eclipse Compiler for Java
Name: ecj
Version: 4.18
Release: 3%{?dist}
URL: https://www.eclipse.org
Name: ecj
Version: %{eclipse_ver}
Release: 11%{?dist}
URL: https://www.eclipse.org
License: EPL-2.0
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
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
# Always generate debug info when building RPMs (Andrew Haley)
Patch0: %{name}-rpmdebuginfo.patch
# Include java API stubs in build
Patch1: javaAPI.patch
Patch0: 0001-Always-generate-bytecode-debuginfo.patch
BuildArch: noarch
BuildRequires: ant
BuildRequires: javapackages-local
BuildRequires: java-17-openjdk-devel
# Build with Java 11 against bootclasspath of Java 8
BuildRequires: java-11-openjdk-devel
BuildRequires: java-1.8.0-openjdk-devel
Requires: java-headless >= 1:1.8.0
Requires: javapackages-tools
%description
ECJ is the Java bytecode compiler of the Eclipse Platform. It is also known as
the JDT Core batch compiler.
%prep
%setup -q -c
%patch0 -p1
%patch1
%autosetup -p1 -c -n %{name}-%{eclipse_ver}
sed -i -e 's|debuglevel=\"lines,source\"|debug=\"yes\"|g' build.xml
# Specify encoding
sed -i -e '/compilerarg/s/Xlint:none/Xlint:none -encoding cp1252/' build.xml
cp %{SOURCE1} pom.xml
mkdir -p scripts/binary/META-INF/
cp %{SOURCE4} scripts/binary/META-INF/MANIFEST.MF
cp %{SOURCE2} 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
ant -Djavaapi=%{SOURCE5}
export JAVA_HOME=/usr/lib/jvm/java-17
ant
%install
%mvn_artifact pom.xml ecj.jar
@ -75,6 +70,31 @@ 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

6
gating.yaml Normal file
View File

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

View File

@ -1,26 +0,0 @@
--- 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"/>

9
plans/smoke.fmf Normal file
View File

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

View File

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