diff --git a/eclipse-jgit.spec b/eclipse-jgit.spec index 00c6edb..09e0b72 100644 --- a/eclipse-jgit.spec +++ b/eclipse-jgit.spec @@ -1,20 +1,13 @@ %global gittag 5.4.0.201906121030-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 - -# Set this to build standalone jgit command line tool only -%bcond_without jgit_eclipse_features - Name: eclipse-jgit Version: 5.4.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Eclipse JGit +# The jgit Eclipse plug-ins are "EDL" licensed, which is equivilent to the new BSD license License: BSD -URL: http://www.eclipse.org/egit/ +URL: https://www.eclipse.org/jgit/ Source0: https://git.eclipse.org/c/jgit/jgit.git/snapshot/jgit-%{gittag}.tar.xz # Set the correct classpath for the command line tools @@ -30,69 +23,15 @@ BuildArch: noarch # Upstream Eclipse no longer supports non-64bit arches ExcludeArch: s390 %{arm} %{ix86} -# 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-source-plugin) -BuildRequires: mvn(org.apache.sshd:sshd-osgi) >= 2.2.0 -BuildRequires: mvn(org.apache.sshd:sshd-sftp) >= 2.2.0 -BuildRequires: mvn(org.bouncycastle:bcpg-jdk15on) >= 1.61 -BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on) >= 1.61 -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.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} || %{with jgit_eclipse_features} -# For building the eclipse features BuildRequires: tycho -Requires: eclipse-platform -Requires: jzlib -Requires: bouncycastle >= 1.61 -Requires: apache-sshd >= 1:2.2.0 -%if %{without bootstrap} BuildRequires: jgit = %{version} -Requires: jgit = %{version}-%{release} -%endif -%endif + +Requires: eclipse-platform +Requires: jgit = %{version} %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 -Requires: javapackages-tools - -%description -n jgit -Command line Git tool built entirely in Java. - %prep %setup -n jgit-%{gittag} -q %patch0 -p1 @@ -102,16 +41,10 @@ Command line Git tool built entirely in Java. 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 @@ -120,93 +53,33 @@ done # Don't build source features %pom_disable_module org.eclipse.jgit.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_disable_module org.eclipse.jgit.coverage -%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 - -# Avoid failures due to lack of jacoco -sed -i -e 's/@{argLine}//' $(find -name pom.xml) - -# Don't attach shell script artifact -%pom_remove_plugin org.codehaus.mojo:build-helper-maven-plugin org.eclipse.jgit.pgm - -# Don't have spring-boot -%pom_remove_plugin :spring-boot-maven-plugin org.eclipse.jgit.pgm -%pom_xpath_remove "pom:plugins/pom:plugin/pom:executions/pom:execution[pom:id='create_jgit']" org.eclipse.jgit.pgm -sed -i -e 's/org\.springframework\.boot\.loader\.JarLauncher/org.eclipse.jgit.pgm.Main/' \ - org.eclipse.jgit.pgm/jgit.sh - -# 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 -%mvn_build -f --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} || %{with jgit_eclipse_features} pushd org.eclipse.jgit.packaging -%mvn_build -j -- -Dfedora.p2.repos=$(pwd)/.m2 +%mvn_build -j 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} || %{with jgit_eclipse_features} 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 < - 5.4.0-3 +- Move the core jgit library out into a separate package, allows us to simplify + this package tremendously; see https://pagure.io/stewardship-sig/issue/13 and + rhbz#1732894 for details + * Thu Jun 27 2019 Mat Booth - 5.4.0-2 - Fix jgit command line launching script