[eclipse-egit] Add bootstrapping capability.

Roland Grunberg rgrunber at fedoraproject.org
Mon Jan 19 18:17:11 UTC 2015


commit 16e8a6e95e5792844c00c8499c28630308ab6498
Author: Roland Grunberg <rgrunber at redhat.com>
Date:   Mon Jan 19 12:55:37 2015 -0500

    Add bootstrapping capability.

 eclipse-egit.spec      |   37 ++++++++++++++++++++++++++++++++++---
 remove-mylyn-dep.patch |   43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 77 insertions(+), 3 deletions(-)
---
diff --git a/eclipse-egit.spec b/eclipse-egit.spec
index 5b67f81..81840d5 100644
--- a/eclipse-egit.spec
+++ b/eclipse-egit.spec
@@ -1,3 +1,6 @@
+# EGit and Mylyn have circular dependencies
+# EGit can build bootstrapped when Mylyn not present
+%global bootstrap 0
 %global version_suffix 201501031845-r
 
 %{?scl:%scl_package eclipse-egit}
@@ -5,17 +8,22 @@
 
 Name:             %{?scl_prefix}eclipse-egit
 Version:          3.6.1
-Release:          1%{?dist}
+Release:          2%{?dist}
 Summary:          Eclipse Git Integration
 
 License:          EPL
 URL:              http://www.eclipse.org/egit
 Source0:          http://git.eclipse.org/c/egit/egit.git/snapshot/egit-%{version}.%{version_suffix}.tar.bz2
+%if %{bootstrap}
+Patch0:           remove-mylyn-dep.patch
+%endif
 
-BuildRequires:    tycho
+BuildRequires:    %{?scl_prefix}tycho
 BuildRequires:    %{?scl_prefix}eclipse-jgit >= 3.5.3-1
+%if ! %{bootstrap}
 BuildRequires:    %{?scl_prefix}eclipse-mylyn-context-team
 BuildRequires:    %{?scl_prefix}eclipse-mylyn-docs-wikitext
+%endif
 
 Requires:         %{?scl_prefix}eclipse-platform >= 1:3.5.0
 Requires:         %{?scl_prefix}eclipse-jgit >= 3.5.3-1
@@ -27,7 +35,7 @@ BuildArch:        noarch
 The eclipse-egit package contains Eclipse plugins for
 interacting with Git repositories.
 
-
+%if ! %{bootstrap}
 %package mylyn
 Summary:     Git integration for mylyn.
 Requires:    %{?scl_prefix}eclipse-mylyn-context-team
@@ -36,10 +44,15 @@ Requires:    %{?scl_prefix}eclipse-mylyn-docs-wikitext
 
 %description mylyn
 Git integration for mylyn.
+%endif
 
 %prep
 %setup -q -n egit-%{version}.%{version_suffix}
+%if %{bootstrap}
+%patch0
+%endif
 
+%{?scl:scl enable %{scl} - << "EOF"}
 %pom_xpath_remove "pom:repositories"
 %pom_xpath_remove "pom:dependencies"
 %pom_xpath_remove "pom:profiles"
@@ -53,22 +66,40 @@ Git integration for mylyn.
 %pom_disable_module org.eclipse.egit.ui.test
 %pom_disable_module org.eclipse.egit.mylyn.ui.test
 
+%if %{bootstrap}
+#to avoid mylyn circular dependancy
+%pom_disable_module org.eclipse.egit.mylyn.ui
+%pom_disable_module org.eclipse.egit.mylyn-feature
+%endif
+
+%if ! %{bootstrap}
 %mvn_package :*mylyn* mylyn
+%endif
 %mvn_package :* egit
+%{?scl:EOF}
 
 %build
+%{?scl:scl enable %{scl} - << "EOF"}
 %mvn_build -j -f
+%{?scl:EOF}
 
 %install
+%{?scl:scl enable %{scl} - << "EOF"}
 %mvn_install
+%{?scl:EOF}
 
 %files -f .mfiles-egit
 %doc LICENSE README.md
 
+%if ! %{bootstrap}
 %files mylyn -f .mfiles-mylyn
 %doc LICENSE README.md
+%endif
 
 %changelog
+* Mon Jan 19 2015 Roland Grunberg <rgrunber at redhat.com> - 3.6.1-2
+- Add bootstrapping capability.
+
 * Mon Jan 5 2015 Alexander Kurtakov <akurtako at redhat.com> 3.6.1-1
 - Update to upstream 3.6.1 release.
 
diff --git a/remove-mylyn-dep.patch b/remove-mylyn-dep.patch
new file mode 100644
index 0000000..8866e52
--- /dev/null
+++ b/remove-mylyn-dep.patch
@@ -0,0 +1,43 @@
+diff --git org.eclipse.egit.doc/META-INF/MANIFEST.MF org.eclipse.egit.doc/META-INF/MANIFEST.MF
+index e804799..d40ca7a 100644
+--- org.eclipse.egit.doc/META-INF/MANIFEST.MF
++++ org.eclipse.egit.doc/META-INF/MANIFEST.MF
+@@ -5,7 +5,4 @@ Bundle-SymbolicName: org.eclipse.egit.doc;singleton:=true
+ Bundle-Version: 3.6.1.201501031845-r
+ Bundle-Vendor: %Bundle-Vendor
+ Bundle-Localization: plugin
+-Require-Bundle: org.eclipse.mylyn.wikitext.core;bundle-version="[2.0.0,3.0.0)";resolution:=optional,
+- org.eclipse.mylyn.wikitext.core.ant;bundle-version="[2.0.0,3.0.0)";resolution:=optional,
+- org.eclipse.mylyn.wikitext.mediawiki.core;bundle-version="[2.0.0,3.0.0)";resolution:=optional,
+- org.eclipse.ui.cheatsheets;bundle-version="[3.3.0,4.0.0)"
++Require-Bundle: org.eclipse.ui.cheatsheets;bundle-version="[3.3.0,4.0.0)"
+diff --git org.eclipse.egit.repository/category.xml org.eclipse.egit.repository/category.xml
+index 223bb3f..8dc8821 100644
+--- org.eclipse.egit.repository/category.xml
++++ org.eclipse.egit.repository/category.xml
+@@ -9,9 +9,6 @@
+    <feature url="features/org.eclipse.egit.sources_0.0.0.qualifier.jar" id="org.eclipse.egit.source" version="0.0.0" patch="true">
+       <category name="Eclipse Git Team Provider"/>
+    </feature>
+-   <feature url="features/org.eclipse.egit.mylyn_0.0.0.qualifier.jar" id="org.eclipse.egit.mylyn" version="0.0.0">
+-      <category name="Eclipse Git Team Provider"/>
+-   </feature>
+    <feature url="features/org.eclipse.jgit_0.0.0.qualifier.jar" id="org.eclipse.jgit" version="0.0.0" patch="true">
+       <category name="JGit"/>
+    </feature>
+diff --git org.eclipse.egit.source-feature/feature.xml org.eclipse.egit.source-feature/feature.xml
+index 6d1addf..b364ddf 100644
+--- org.eclipse.egit.source-feature/feature.xml
++++ org.eclipse.egit.source-feature/feature.xml
+@@ -37,11 +37,4 @@
+          version="0.0.0"
+          unpack="false"/>
+ 
+-   <plugin
+-         id="org.eclipse.egit.mylyn.ui.source"
+-         download-size="0"
+-         install-size="0"
+-         version="0.0.0"
+-         unpack="false"/>
+-
+ </feature>


More information about the scm-commits mailing list