%global gittag 5.2.0.201812061821-r # Due to circular self-dependency, one build must be done with this flag set # when updating to new versions. A second build without this flag ensures that # all symlinks are generated correctly. %bcond_with bootstrap Name: eclipse-jgit Version: 5.2.0 Release: %mkrel 3 Group: Development/Java Summary: Eclipse JGit License: BSD URL: http://www.eclipse.org/egit/ Source0: https://git.eclipse.org/c/jgit/jgit.git/snapshot/jgit-%{gittag}.tar.xz # Set the correct classpath for the command line tools Patch0: 0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch # Switch to feature requirements for third-party bundles, also makes the following changes: # javaewah -> com.googlecode.javaewah.JavaEWAH # org.slf4j.api -> slf4j.api # org.slf4j.impl.log4j12 -> slf4j.simple Patch1: 0002-Don-t-embed-versions-of-third-party-libs-use-feature.patch # Changes necessary for the latest version of apache-sshd Patch2: 0003-Port-to-apache-sshd-2.1.0.patch BuildArch: noarch # For main build BuildRequires: maven-local BuildRequires: mvn(args4j:args4j) BuildRequires: mvn(com.google.code.gson:gson) BuildRequires: mvn(com.googlecode.javaewah:JavaEWAH) BuildRequires: mvn(com.jcraft:jsch) BuildRequires: mvn(com.jcraft:jzlib) BuildRequires: mvn(javax.servlet:javax.servlet-api) BuildRequires: mvn(junit:junit) BuildRequires: mvn(net.i2p.crypto:eddsa) BuildRequires: mvn(org.apache.ant:ant) BuildRequires: mvn(org.apache.commons:commons-compress) BuildRequires: mvn(org.apache.httpcomponents:httpclient) BuildRequires: mvn(org.apache.httpcomponents:httpcore) BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-clean-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-install-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-shade-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-source-plugin) BuildRequires: mvn(org.apache.sshd:sshd-core) BuildRequires: mvn(org.apache.sshd:sshd-sftp) BuildRequires: mvn(org.bouncycastle:bcprov-jdk15on) >= 1.61 BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.eclipse.jetty:jetty-servlet) BuildRequires: mvn(org.hamcrest:hamcrest-library) BuildRequires: mvn(org.mockito:mockito-core) BuildRequires: mvn(org.osgi:osgi.core) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-simple) BuildRequires: mvn(org.tukaani:xz) # Needed for test suites BuildRequires: git %if %{without bootstrap} # For building the eclipse features BuildRequires: tycho BuildRequires: jgit = %{version} Requires: eclipse-platform Requires: jgit = %{version}-%{release} Requires: jzlib Requires: bouncycastle >= 1.61 %endif %description A pure Java implementation of the Git version control system. %package -n jgit-javadoc Summary: API documentation for %{name} %description -n jgit-javadoc %{summary}. %package -n jgit Summary: Java-based command line Git interface %description -n jgit Command line Git tool built entirely in Java. %prep %setup -n jgit-%{gittag} -q %patch0 -p1 %patch1 -p1 %patch2 -p1 # Disable multithreaded build rm .mvn/maven.config # Don't try to get deps from local *maven* repo, use tycho resolved ones %pom_remove_dep com.googlecode.javaewah:JavaEWAH for p in $(find org.eclipse.jgit.packaging -name pom.xml) ; do grep -q dependencies $p && %pom_xpath_remove "pom:dependencies" $p done # Disable "errorprone" compiler %pom_xpath_remove "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:executions/pom:execution[pom:id='compile-with-errorprone']" pom.xml %pom_xpath_remove "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:executions/pom:execution[pom:id='default-compile']/pom:configuration" pom.xml %pom_xpath_remove "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:dependencies" pom.xml # Don't need target platform or repository modules with xmvn %pom_disable_module org.eclipse.jgit.target org.eclipse.jgit.packaging %pom_disable_module org.eclipse.jgit.repository org.eclipse.jgit.packaging %pom_xpath_remove "pom:build/pom:pluginManagement/pom:plugins/pom:plugin/pom:configuration/pom:target" org.eclipse.jgit.packaging/pom.xml # Don't build source features %pom_disable_module org.eclipse.jgit.source.feature org.eclipse.jgit.packaging %pom_disable_module org.eclipse.jgit.pgm.source.feature org.eclipse.jgit.packaging # Use newer Felix dep %pom_change_dep -r org.osgi:org.osgi.core org.osgi:osgi.core # Remove unnecessary plugins for RPM builds %pom_remove_plugin :jacoco-maven-plugin %pom_remove_plugin :maven-javadoc-plugin %pom_remove_plugin :maven-enforcer-plugin %pom_remove_plugin :maven-enforcer-plugin org.eclipse.jgit.packaging %pom_remove_plugin -r :japicmp-maven-plugin # Don't attach shell script artifact %pom_remove_plugin org.codehaus.mojo:build-helper-maven-plugin org.eclipse.jgit.pgm # Remove org.apache.log4j %pom_remove_dep log4j:log4j . org.eclipse.jgit.pgm %pom_change_dep org.slf4j:slf4j-log4j12 org.slf4j:slf4j-simple . org.eclipse.jgit.pgm pushd org.eclipse.jgit.packaging %mvn_package "::pom::" __noinstall popd %mvn_package ":*.test" __noinstall %build # Due to a current limitation of Tycho it is not possible to mix pom-first and # manifest-first builds in the same reactor build hence two separate invocations # First invocation installs jgit so the second invocation will succeed # One test always fails "RacyGitTests.testRacyGitDetection" so ignore failures for now %mvn_build --post install:install -- -Pjavac \ -Dmaven.repo.local=$(pwd)/org.eclipse.jgit.packaging/.m2 -Dmaven.test.failure.ignore=true # Second invocation builds the eclipse features %if %{without bootstrap} pushd org.eclipse.jgit.packaging %mvn_build -j -- -Dfedora.p2.repos=$(pwd)/.m2 popd %endif %install # The macro does not allow us to change the "namespace" value, but here we want to # set it to something other than the SRPM name, so explode the macro xmvn-install -R .xmvn-reactor -n jgit -d %{buildroot} install -dm755 %{buildroot}%{_javadocdir}/jgit cp -pr .xmvn/apidocs/* %{buildroot}%{_javadocdir}/jgit echo '%{_javadocdir}/jgit' >>.mfiles-javadoc %if %{without bootstrap} pushd org.eclipse.jgit.packaging %mvn_install popd %endif # Binary install -dm 755 %{buildroot}%{_bindir} install -m 755 org.eclipse.jgit.pgm/jgit.sh %{buildroot}%{_bindir}/jgit # Ant task configuration install -dm 755 %{buildroot}%{_sysconfdir}/ant.d cat > %{buildroot}%{_sysconfdir}/ant.d/jgit <<EOF javaewah jzlib jsch jgit/org.eclipse.jgit jgit/org.eclipse.jgit.ant slf4j/slf4j-api slf4j/slf4j-simple httpcomponents/httpcore httpcomponents/httpclient commons-logging commons-codec EOF %if %{without bootstrap} %files -f org.eclipse.jgit.packaging/.mfiles %else %files %endif %license LICENSE %doc README.md %files -n jgit -f .mfiles %license LICENSE %doc README.md %{_bindir}/jgit %config(noreplace) %{_sysconfdir}/ant.d/jgit %files -n jgit-javadoc -f .mfiles-javadoc %license LICENSE %changelog * Thu Feb 07 2019 daviddavid <daviddavid> 5.2.0-3.mga7 + Revision: 1363962 - Add missing requires for optional dep on bouncycastle * Sun Dec 16 2018 neoclust <neoclust> 5.2.0-2.mga7 + Revision: 1341798 - Disable bootstrap * Sat Dec 15 2018 neoclust <neoclust> 5.2.0-1.mga7 + Revision: 1341389 - New version 5.2.0 * Tue Sep 18 2018 umeabot <umeabot> 4.7.0-4.mga7 + Revision: 1260749 - Mageia 7 Mass Rebuild * Wed May 17 2017 neoclust <neoclust> 4.7.0-3.mga6 + Revision: 1102508 - New version 4.7.0 * Wed Oct 05 2016 daviddavid <daviddavid> 4.5.0-1.mga6 + Revision: 1058855 - Update to upstream 4.5.0 release * Thu Aug 11 2016 daviddavid <daviddavid> 4.4.1-1.mga6 + Revision: 1045540 - Upgrade to 4.4.1 (sync with fc24) * Sun Jul 03 2016 daviddavid <daviddavid> 4.4.0-2.mga6 + Revision: 1038548 - Fix IllegalStateException when starting git daemon from the command line * Sun Jul 03 2016 daviddavid <daviddavid> 4.4.0-1.mga6 + Revision: 1038402 - Update to latest release - Add missing build-requires * Wed May 04 2016 daviddavid <daviddavid> 4.3.0-2.mga6 + Revision: 1009390 - Avoid embedding versions of external deps in features. This avoids the need to rebuild when a dependency changes version. * Fri Apr 29 2016 daviddavid <daviddavid> 4.3.0-1.mga6 + Revision: 1007740 - Upgrade to 4.3.0 - make sure patch2 is applied + neoclust <neoclust> - Second rebuild of the java stack - Second rebuild of the java stack * Sun Feb 21 2016 neoclust <neoclust> 4.2.0-3.mga6 + Revision: 975785 - First rebuild of the java stack - sync package eclipse-jgit with fedora + umeabot <umeabot> - Mageia 6 Mass Rebuild * Wed Dec 31 2014 pterjan <pterjan> 3.5.2-2.mga5 + Revision: 807613 - Clean rebuild - Sync with Fedora 21 (update to 3.5.2) - Restore + sander85 <sander85> - Depends on broken java stack + umeabot <umeabot> - Second Mageia 5 Mass Rebuild - Mageia 5 Mass Rebuild * Thu Dec 19 2013 luigiwalser <luigiwalser> 3.1.0-3.mga4 + Revision: 559006 - rebuild against eclipse-4.3.1-7.mga4 * Tue Oct 22 2013 umeabot <umeabot> 3.1.0-2.mga4 + Revision: 542181 - Mageia 4 Mass Rebuild * Mon Oct 14 2013 dmorgan <dmorgan> 3.1.0-1.mga4 + Revision: 497051 - New version - New version * Sat Jan 19 2013 dmorgan <dmorgan> 2.2.0-1.mga3 + Revision: 389581 - New version * Fri Jan 11 2013 umeabot <umeabot> 2.1.0-5.mga3 + Revision: 349434 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Thu Dec 06 2012 dmorgan <dmorgan> 2.1.0-4.mga3 + Revision: 327351 - Rebuild against new eclipse - Rebuild against new eclipse * Wed Dec 05 2012 dmorgan <dmorgan> 2.1.0-2.mga3 + Revision: 327059 - Rebuild to check correctness of eclipse setup * Wed Dec 05 2012 dmorgan <dmorgan> 2.1.0-1.mga3 + Revision: 326990 - New version - New version * Mon May 09 2011 dmorgan <dmorgan> 0.12.1-1.mga1 + Revision: 96792 - imported package eclipse-jgit * Tue May 03 2011 Chris Aniszczyk <zx@redhat.com> 0.12.1-1 - Update to upstream release 0.12.1. * Tue Feb 22 2011 Chris Aniszczyk <zx@redhat.com> 0.11.3-1 - Update to upstream release 0.11.3. * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.10.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Dec 22 2010 Chris Aniszczyk <zx@redhat.com> 0.10.1-1 - Update to upstream release 0.10.1. * Thu Oct 7 2010 Chris Aniszczyk <zx@redhat.com> 0.9.3-1 - Update to upstream release 0.9.3. * Wed Sep 15 2010 Severin Gehwolf <sgehwolf@redhat.com> 0.9.1-1 - Update to upstream release 0.9.1. * Thu Aug 26 2010 Severin Gehwolf <sgehwolf at, redhat.com> 0.9.0-0.1.20100825git - Make release tag more readable (separate "0.1" and pre-release tag by "."). * Wed Aug 25 2010 Severin Gehwolf <sgehwolf at, redhat.com> 0.9.0-0.120100825git - Pre-release version of JGit 0.9.0 * Fri Jun 25 2010 Severin Gehwolf <sgehwolf at, redhat.com> 0.8.4-2 - Increase release number to make tagging work. * Wed Jun 23 2010 Severin Gehwolf <sgehwolf at, redhat.com> 0.8.4-1 - Rebase to 0.8.4 release. * Mon Apr 12 2010 Jeff Johnston <jjohnstn@redhat.com> 0.7.1-1 - Rebase to 0.7.1 release. * Tue Feb 9 2010 Alexander Kurtakov <akurtako@redhat.com> 0.6.0-0.1.git20100208 - New git snapshot. * Thu Nov 5 2009 Alexander Kurtakov <akurtako@redhat.com> 0.6.0-0.1.git20091029 - Correct release. * Thu Oct 29 2009 Alexander Kurtakov <akurtako@redhat.com> 0.6.0-0.git20091029.1 - Initial package