Bootstrap into SCL

This commit is contained in:
Mat Booth 2014-07-11 13:30:09 +01:00
parent e70f9a8fce
commit cd534319f1
2 changed files with 72 additions and 35 deletions

View File

@ -0,0 +1,16 @@
--- eclipse.jdt/org.eclipse.jdt-feature/feature.xml.old 2014-05-19 15:24:30.868884801 -0400
+++ eclipse.jdt/org.eclipse.jdt-feature/feature.xml 2014-05-19 15:24:42.186567987 -0400
@@ -85,13 +85,6 @@
unpack="false"/>
<plugin
- id="org.eclipse.jdt.annotation"
- download-size="0"
- install-size="0"
- version="2.0.0.qualifier"
- unpack="false"/>
-
- <plugin
id="org.eclipse.jdt.core.manipulation"
download-size="0"
install-size="0"

View File

@ -1,11 +1,11 @@
%{?scl:%scl_package eclipse}
%{!?scl:%global pkg_name %{name}}
%{!?scl:%global _scl_root %{nil}}
%{?scl:%global app_name "Eclipse Luna"}
# Set to 1 to build Eclipse without dependency to eclipse-pde
# Some parts (help) will not be built, and second run will be required,
# but this is a way to bootstrap Eclipse on secondary archs.
%global bootstrap 0
%global bootstrap 1
Epoch: 1
@ -16,7 +16,7 @@ Epoch: 1
%global eb_commit b95311b1c90288893e23fdd8d13373aba80a8e6b
%global eclipse_tag R4_4
%global eclipse_version %{eclipse_major}.%{eclipse_minor}.%{eclipse_micro}
%global _jetty_version 9.2.1
%global _jetty_version 9.0.5
%ifarch %{ix86}
%define eclipse_arch x86
@ -39,7 +39,7 @@ Epoch: 1
Summary: An open, extensible IDE
Name: %{?scl_prefix}eclipse
Version: %{eclipse_version}
Release: 5%{?dist}
Release: 5.1%{?dist}
License: EPL
Group: Development/Tools
URL: http://www.eclipse.org/
@ -111,6 +111,7 @@ Patch20: %{pkg_name}-no-target-platform.patch
Patch21: %{pkg_name}-mockito.patch
Patch22: %{pkg_name}-policy-comparators.patch
Patch23: %{pkg_name}-disable-jdt-annotation-java8.patch
BuildRequires: rsync
BuildRequires: make, gcc
@ -137,8 +138,8 @@ BuildRequires: jsch >= 0:0.1.46-2
BuildRequires: apache-commons-el >= 1.0-22
BuildRequires: apache-commons-logging
BuildRequires: apache-commons-codec >= 1.6-2
BuildRequires: felix-gogo-command >= 0.14.0-2
BuildRequires: felix-gogo-shell >= 0.10.0-3
BuildRequires: %{?scl_prefix}felix-gogo-command >= 0.14.0-2
BuildRequires: %{?scl_prefix}felix-gogo-shell >= 0.10.0-3
BuildRequires: osgi(org.eclipse.jetty.util) >= %{_jetty_version}
BuildRequires: osgi(org.eclipse.jetty.server) >= %{_jetty_version}
BuildRequires: osgi(org.eclipse.jetty.http) >= %{_jetty_version}
@ -150,29 +151,30 @@ BuildRequires: %{?scl_prefix}lucene-core >= 4.8.1-3
BuildRequires: %{?scl_prefix}lucene-analysis >= 4.8.1-3
BuildRequires: junit >= 4.10-5
BuildRequires: hamcrest >= 0:1.1-11
BuildRequires: %{?scl_prefix}sat4j >= 2.3.5-1
BuildRequires: sat4j >= 2.3.5-1
BuildRequires: %{?scl_prefix}objectweb-asm >= 5.0.1-1
BuildRequires: zip
BuildRequires: sac >= 1.3-12
BuildRequires: batik >= 1.8
BuildRequires: %{?scl_prefix}batik >= 1.8
BuildRequires: xml-commons-apis >= 1.4.01-12
BuildRequires: atinject >= 1-6
BuildRequires: tycho >= 0.19
BuildRequires: tycho-extras >= 0.19
BuildRequires: eclipse-ecf-core >= 3.8.1-1
BuildRequires: eclipse-emf-core >= 1:2.10.0-1
BuildRequires: %{?scl_prefix}tycho >= 0.20
BuildRequires: %{?scl_prefix}tycho-extras >= 0.20
BuildRequires: %{?scl_prefix}eclipse-ecf-core >= 3.8.1-1
BuildRequires: %{?scl_prefix}eclipse-emf-core >= 1:2.10.0-1
BuildRequires: tomcat-el-2.2-api
BuildRequires: glassfish-jsp-api >= 2.2.1-4
BuildRequires: glassfish-jsp >= 2.2.5
BuildRequires: glassfish-servlet-api >= 3.1.0
BuildRequires: cbi-plugins
BuildRequires: %{?scl_prefix}cbi-plugins
BuildRequires: xml-maven-plugin
BuildRequires: httpcomponents-core
BuildRequires: httpcomponents-client
BuildRequires: mockito
%if ! %{bootstrap}
BuildRequires: eclipse-pde
%endif
BuildRequires: eclipse-license
BuildRequires: %{?scl_prefix}eclipse-pde
%endif
BuildRequires: %{?scl_prefix}eclipse-license
%description
The Eclipse platform is designed for building integrated development
@ -209,8 +211,8 @@ Requires: ant-javamail ant-jdepend ant-junit ant-swing ant-jsch ant-testutil ant
Requires: apache-commons-el >= 1.0-23
Requires: apache-commons-logging
Requires: apache-commons-codec >= 1.6-2
Requires: felix-gogo-command >= 0.14.0-2
Requires: felix-gogo-shell >= 0.10.0-3
Requires: %{?scl_prefix}felix-gogo-command >= 0.14.0-2
Requires: %{?scl_prefix}felix-gogo-shell >= 0.10.0-3
Requires: osgi(org.eclipse.jetty.util) >= %{_jetty_version}
Requires: osgi(org.eclipse.jetty.server) >= %{_jetty_version}
Requires: osgi(org.eclipse.jetty.http) >= %{_jetty_version}
@ -221,14 +223,15 @@ Requires: osgi(org.eclipse.jetty.servlet) >= %{_jetty_version}
Requires: jsch >= 0.1.46-2
Requires: %{?scl_prefix}lucene-core >= 4.8.1-3
Requires: %{?scl_prefix}lucene-analysis >= 4.8.1-3
Requires: %{?scl_prefix}sat4j >= 2.3.5-1
Requires: sat4j >= 2.3.5-1
Requires: sac >= 1.3-12
Requires: xml-commons-apis >= 1.4.01-12
Requires: batik >= 1.8
Requires: %{?scl_prefix}batik >= 1.8
Requires: atinject >= 1-6
Requires: geronimo-annotation >= 1.0-7
Requires: eclipse-ecf-core >= 3.8.1-1
Requires: eclipse-emf-core >= 1:2.10.0-1
Requires: %{?scl_prefix}eclipse-ecf-core >= 3.8.1-1
Requires: %{?scl_prefix}eclipse-emf-core >= 1:2.10.0-1
Requires: tomcat-el-2.2-api
Requires: glassfish-jsp-api >= 2.2.1-4
Requires: glassfish-jsp >= 2.2.5
Requires: glassfish-servlet-api >= 3.1.0
@ -321,6 +324,7 @@ tar --strip-components=1 -xf %{SOURCE1}
%patch20
%patch21
%patch22
%patch23
#Disable as many things as possible to make the build faster. We care only for Eclipse.
%pom_disable_module platform.sdk eclipse.platform.releng.tychoeclipsebuilder
@ -356,6 +360,9 @@ tar --strip-components=1 -xf %{SOURCE1}
%pom_disable_module bundles/org.eclipse.releng.tools eclipse.platform.releng
%pom_disable_module features/org.eclipse.releng.tools eclipse.platform.releng
# Disable java 8 bits for now
%pom_disable_module org.eclipse.jdt.annotation eclipse.jdt.core
# We don't need support for Eclipse 2.x style plugins
%pom_disable_module features/org.eclipse.osgi.compatibility.plugins.feature rt.equinox.framework
%pom_disable_module bundles/org.eclipse.osgi.compatibility.plugins rt.equinox.framework
@ -452,8 +459,6 @@ done
cp -r %{_javadir}/eclipse-license/eclipse/features/* .m2/p2/repo-sdk/features/
cp -r %{_javadir}/emf/eclipse/features/* .m2/p2/repo-sdk/features/
cp -r %{_javadir}/ecf/eclipse/features/* .m2/p2/repo-sdk/features/
%{?scl: cp %{_javadir}/ecf/eclipse/plugins/* .m2/p2/repo-sdk/plugins}
%{?scl: cp %{_javadir}/*sat4j* .m2/p2/repo-sdk/plugins}
%if ! %{bootstrap}
cp -rf %{_libdir}/eclipse/dropins/sdk/plugins/org.eclipse.pde.build_* .m2/p2/repo-sdk/plugins/
cp -rf %{_libdir}/eclipse/dropins/sdk/plugins/org.eclipse.pde.core_* .m2/p2/repo-sdk/plugins/
@ -465,10 +470,12 @@ sed -i -e 's@>org.eclipse.jdt<@>org.eclipse.tycho<@' eclipse-platform-parent/pom
# Allow usage of javax.servlet.jsp 2.3.
sed -i '/javax\.servlet\.jsp/ s/2\.3/2\.4/' rt.equinox.bundles/bundles/org.eclipse.equinox.jsp.jasper/META-INF/MANIFEST.MF
# Use com.sun.el.java.el (Glassfish) instead of javax.el (Tomcat)
sed -i 's/javax\.el/com\.sun\.el\.javax\.el/' \
eclipse.platform.releng/features/org.eclipse.help-feature/feature.xml \
eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/pom.xml
# Force usage of javax.servlet 3.1
sed -i '/javax.servlet/ s/2\.4\.0/3\.1\.0/' eclipse.platform.ua/org.eclipse.help.webapp/META-INF/MANIFEST.MF
# Tomcat provides javax.el
sed -i 's/com\.sun\.el\.javax\.el/javax\.el/' dependencies/replace_platform_plugins_with_symlinks.sh
sed -i 's/glassfish-el\.jar/tomcat-el-api\.jar/' dependencies/replace_platform_plugins_with_symlinks.sh
# Bump javax.servlet Import-Package statements
sed -i '/javax\.servlet/ s/3\.1/3\.2/' rt.equinox.bundles/bundles/org.eclipse.equinox.http.servlet/META-INF/MANIFEST.MF
@ -478,7 +485,17 @@ sed -i '/javax\.servlet/ s/3\.1/3\.2/' rt.equinox.bundles/bundles/org.eclipse.eq
sed -i -e 's@Dhelp.lucene.tokenizer=standard@XX:MaxPermSize=384M@g' eclipse.platform.common/bundles/org.eclipse.platform.doc.isv/pom.xml
%if %{bootstrap}
# Not sure why this is needed yet...
mkdir -p .m2/org/eclipse/tycho/tycho-bundles-external/0.20.0
mkdir -p .m2/org/eclipse/tycho/tycho-standalone-p2-director/0.20.0
cp %{_javadir}/tycho/tycho-bundles-external.zip .m2/org/eclipse/tycho/tycho-bundles-external/0.20.0/tycho-bundles-external-0.20.0.zip
cp %{_javadir}/tycho/tycho-standalone-p2-director.zip .m2/org/eclipse/tycho/tycho-standalone-p2-director/0.20.0/tycho-standalone-p2-director-0.20.0.zip
%endif
%build
%{?scl:scl enable %{scl} - << "EOF"}
set -x
#This is the lowest value where the build succeeds. 512m is not enough.
export MAVEN_OPTS="-Xmx1000m -XX:MaxPermSize=256m -XX:CompileCommand=exclude,org/eclipse/tycho/core/osgitools/EquinoxResolver,newState ${MAVEN_OPTS}"
export JAVA_HOME=%{java_home}
@ -492,6 +509,7 @@ xmvn -o clean verify \
-Dmaven.test.skip=true -Dnative=gtk.linux.%{eclipse_arch} \
-Dtycho.local.keepTarget -DbuildId=`echo "%{release}" | tr -d "."` \
-Dtargets=install
%{?scl:EOF}
#symlink necessary plugins (that are provided by other packages)
dependencies/replace_platform_plugins_with_symlinks.sh \
@ -560,7 +578,7 @@ cat >> eclipse.ini <<EOF
-XX:CompileCommand=exclude,org/eclipse/cdt/internal/core/pdom/dom/cpp/PDOMCPPLinkage,addBinding
-XX:CompileCommand=exclude,org/python/pydev/editor/codecompletion/revisited/PythonPathHelper,isValidSourceFile
-XX:CompileCommand=exclude,org/eclipse/tycho/core/osgitools/EquinoxResolver,newState
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=%{_scl_root}/usr/share/eclipse/dropins
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=%{?_scl_root}/usr/share/eclipse/dropins
-Declipse.p2.skipMovedInstallDetection=true
EOF
@ -590,7 +608,7 @@ ln -s /usr/share/icons/hicolor/256x256/apps/%{?scl_prefix}eclipse.png \
# Install desktop file and app data
%{?scl: sed -i -e 's/Exec=eclipse/Exec=scl enable %{scl_name} eclipse/g' desktopintegration/eclipse.desktop}
%{?scl: sed -i -e 's/Icon=eclipse/Icon=%{?scl_prefix}eclipse/g' desktopintegration/eclipse.desktop}
%{?scl: sed -i -e 's/Name=Eclipse/Name=DTS Eclipse/g' desktopintegration/eclipse.desktop}
%{?scl: sed -i -e 's/Name=Eclipse/Name=%{app_name}/g' desktopintegration/eclipse.desktop}
install -D desktopintegration/eclipse.desktop $RPM_BUILD_ROOT/usr/share/applications/%{?scl_prefix}eclipse.desktop
install -D desktopintegration/eclipse.appdata.xml $RPM_BUILD_ROOT/usr/share/appdata/%{?scl_prefix}eclipse.appdata.xml
desktop-file-validate $RPM_BUILD_ROOT/usr/share/applications/%{?scl_prefix}eclipse.desktop
@ -620,7 +638,7 @@ TARGET_LAUNCHER=%{_libdir}/%{pkg_name}/plugins/`ls eclipse.platform.releng.tycho
sed -i -e "s,@LAUNCHER@,${TARGET_LAUNCHER}," $RPM_BUILD_ROOT%{_bindir}/efj
#eclipse binary
pushd $RPM_BUILD_ROOT%{_scl_root}%{_bindir}
pushd $RPM_BUILD_ROOT%{_bindir}
ln -s %{_libdir}/%{pkg_name}/eclipse
popd
@ -651,7 +669,7 @@ popd
# Symlink OSGI jars into javadir
for J in osgi osgi.services osgi.util osgi.compatibility.state equinox.http.servlet ; do
pushd $RPM_BUILD_ROOT%{_javadir}/eclipse
DIR=%{?scl: ../../../../}../../../..%{_libdir}/%{pkg_name}
DIR=%{?scl:../../../../}../../../..%{_libdir}/%{pkg_name}
[ -e "`ls $DIR/plugins/org.eclipse.${J}_*.jar`" ] && ln -s $DIR/plugins/org.eclipse.${J}_*.jar ${J}.jar
[ -e "`ls $DIR/dropins/*/plugins/org.eclipse.${J}_*.jar`" ] && ln -s $DIR/dropins/*/plugins/org.eclipse.${J}_*.jar ${J}.jar
popd
@ -718,7 +736,7 @@ pushd $RPM_BUILD_ROOT/%{_javadir}/eclipse-testing/plugins
popd
sed -i -e "s#@libdir@#%{_libdir}#" $RPM_BUILD_ROOT/%{_javadir}/eclipse-testing/runtests.sh
sed -i -e "s#@USR@#%{?scl:%{_scl_root}}%{_usr}#" $RPM_BUILD_ROOT/%{_javadir}/eclipse-testing/runtests.sh
sed -i -e "s#@USR@#%{?_scl_root}%{_usr}#" $RPM_BUILD_ROOT/%{_javadir}/eclipse-testing/runtests.sh
touch $RPM_BUILD_ROOT%{_bindir}/%{pkg_name}-runEclipsePackageTests
chmod a+x $RPM_BUILD_ROOT/%{_bindir}/%{pkg_name}-runEclipsePackageTests
echo '#!/bin/sh' >> $RPM_BUILD_ROOT/%{_bindir}/%{pkg_name}-runEclipsePackageTests
@ -739,7 +757,7 @@ sed -i 's|\.\+/\(prepAllTestBundles\.sh\)|%{_javadir}/eclipse-testing/testbundle
sed -i 's|cp swtbot-library.xml alltest.xml updateTestBundleXML.sh target/|cp %{_javadir}/eclipse-testing/testbundle/{swtbot-library.xml,alltest.xml,updateTestBundleXML.sh} target/|' prepRuntimeLocation.sh
for file in genRepo.sh gatherBundles.sh ;do
sed -i 's|scl_root=|scl_root=%{_scl_root}|' ${file}
sed -i 's|scl_root=|scl_root=%{?_scl_root}|' ${file}
done
mv $RPM_BUILD_ROOT/%{_javadir}/eclipse-testing/testbundle/%{pkg_name}-runTestBundles $RPM_BUILD_ROOT/%{_bindir}/%{pkg_name}-runTestBundles
@ -803,7 +821,7 @@ fi
%{_libdir}/%{pkg_name}/plugins/javax.servlet_*
%{_libdir}/%{pkg_name}/plugins/javax.servlet.jsp_*
%{_libdir}/%{pkg_name}/plugins/javax.xml_*
%{_libdir}/%{pkg_name}/plugins/com.sun.el.javax.el_*
%{_libdir}/%{pkg_name}/plugins/javax.el_*
%{_libdir}/%{pkg_name}/plugins/javax.inject_*.jar
%{_libdir}/%{pkg_name}/plugins/org.apache.ant_*
%{_libdir}/%{pkg_name}/plugins/org.apache.batik.css_*
@ -1016,6 +1034,9 @@ fi
%{_libdir}/%{pkg_name}/plugins/org.eclipse.osgi.compatibility.state_*
%changelog
* Wed Jul 09 2014 Mat Booth <mat.booth@redhat.com> - 1:4.4.0-5.1
- Bootstrap into SCL
* Tue Jul 08 2014 Mat Booth <mat.booth@redhat.com> - 1:4.4.0-5
- Make GTK3 the default SWT implementation in eclipse.ini