Fridrich Strba 2019-11-11 12:10:41 +00:00 committed by Git OBS Bridge
commit 2d1e21d8f4
8 changed files with 477 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<package>bootstrap</package>
</multibuild>

5
eclipse-jgit.changes Normal file
View File

@ -0,0 +1,5 @@
-------------------------------------------------------------------
Mon Nov 11 12:09:35 UTC 2019 - Fridrich Strba <fstrba@suse.com>
- Initial packaging of eclipse-jgit 5.1.1 as a _multibuild package
in order to allow bootstrapping

238
eclipse-jgit.spec Normal file
View File

@ -0,0 +1,238 @@
#
# spec file for package eclipse-jgit
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "bootstrap"
%bcond_without bootstrap
%else
%bcond_with bootstrap
%endif
%global gittag 5.1.1.201809181055-r
Version: 5.1.1
Release: 0
Summary: Eclipse JGit
License: BSD
Group: Development/Libraries/Java
URL: https://www.eclipse.org/egit/
# Use github mirror for now, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=522144
Source0: https://github.com/eclipse/jgit/archive/v%{gittag}/jgit-v%{gittag}.tar.gz
Patch0: fix_jgit_sh.patch
# Change how feature deps are specified, to avoid embedding versions
Patch1: jgit-feature-deps.patch
# For main build
BuildRequires: ant
BuildRequires: fdupes
BuildRequires: git
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(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.bouncycastle:bcprov-jdk15on)
BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin)
BuildRequires: mvn(org.eclipse.jetty:jetty-continuation)
BuildRequires: mvn(org.eclipse.jetty:jetty-servlet)
BuildRequires: mvn(org.hamcrest:hamcrest-library)
BuildRequires: mvn(org.osgi:osgi.core)
BuildRequires: mvn(org.slf4j:slf4j-api)
BuildRequires: mvn(org.slf4j:slf4j-simple)
BuildRequires: mvn(org.tukaani:xz)
BuildConflicts: java-devel >= 9
BuildArch: noarch
%if %{with bootstrap}
Name: eclipse-jgit-bootstrap
%else
Name: eclipse-jgit
# For building the eclipse features
BuildRequires: eclipse-platform-bootstrap
BuildRequires: jgit-bootstrap = %{version}
BuildRequires: tycho
#!BuildIgnore: eclipse-platform
#!BuildIgnore: jgit
#!BuildIgnore: tycho-bootstrap
#!BuildRequires: log4j eclipse-emf-core eclipse-ecf-core
Requires: eclipse-platform
Requires: jgit = %{version}-%{release}
Requires: jzlib
%endif
%description
A pure Java implementation of the Git version control system.
%package -n jgit-javadoc
Summary: API documentation for %{name}
Group: Documentation/HTML
%description -n jgit-javadoc
%{summary}.
%if %{with bootstrap}
%package -n jgit-bootstrap
%else
%package -n jgit
Obsoletes: jgit-bootstrap
%endif
Summary: Java-based command line Git interface
Group: Development/Libraries/Java
%if %{with bootstrap}
%description -n jgit-bootstrap
%else
%description -n jgit
%endif
Command line Git tool built entirely in Java.
%prep
%setup -q -n jgit-%{gittag}
%patch0
%patch1
# Disable multithreaded build
rm .mvn/maven.config
# Javaewah change
sed -i -e "s/javaewah/com.googlecode.javaewah.JavaEWAH/g" org.eclipse.jgit.packaging/org.eclipse.jgit{,.pgm}.feature/feature.xml
# 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
# org.slf4j.api -> slf4j.api
# org.slf4j.impl.log4j12 -> slf4j.simple
sed -i 's/org\.slf4j\.api/slf4j\.api/
s/org\.slf4j\.impl\.log4j12/slf4j\.simple/' \
org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml
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
%if %{with bootstrap}
%global no_javadoc "-j"
%else
%global no_javadoc %{nil}
%endif
# 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 -f %{no_javadoc} -- -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 -f -- -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}
%if %{without bootstrap}
install -dm755 %{buildroot}%{_javadocdir}/jgit
cp -pr .xmvn/apidocs/* %{buildroot}%{_javadocdir}/jgit
echo '%{_javadocdir}/jgit' >>.mfiles-javadoc
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
%fdupes -s %{buildroot}%{_javadocdir}
%if %{without bootstrap}
%files -f org.eclipse.jgit.packaging/.mfiles
%license LICENSE
%doc README.md
%files -n jgit -f .mfiles
%else
%files -n jgit-bootstrap -f .mfiles
%endif
%license LICENSE
%doc README.md
%{_bindir}/jgit
%config(noreplace) %{_sysconfdir}/ant.d/jgit
%if %{without bootstrap}
%files -n jgit-javadoc -f .mfiles-javadoc
%license LICENSE
%endif
%changelog

11
fix_jgit_sh.patch Normal file
View File

@ -0,0 +1,11 @@
--- org.eclipse.jgit.pgm/jgit.sh.sav 2011-09-15 18:32:58.000000000 +0300
+++ org.eclipse.jgit.pgm/jgit.sh 2011-10-28 13:05:51.399038583 +0300
@@ -60,7 +60,7 @@ esac
this_script=`which "$0" 2>/dev/null`
[ $? -gt 0 -a -f "$0" ] && this_script="$0"
cp=$this_script
-
+export JGIT_CLASSPATH="$(build-classpath jgit slf4j/api slf4j/simple args4j jzlib jsch commons-compress xz-java javaewah httpcomponents/httpcore httpcomponents/httpclient commons-logging commons-codec)"
platform="`uname`"
if [ -n "$JGIT_CLASSPATH" ]
then

193
jgit-feature-deps.patch Normal file
View File

@ -0,0 +1,193 @@
--- ./org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml.orig 2016-05-02 16:56:15.881504725 +0100
+++ ./org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.xml 2016-05-02 17:00:33.218156329 +0100
@@ -24,6 +24,7 @@
<requires>
<import plugin="org.eclipse.jgit"/>
+ <import plugin="com.google.gson" />
</requires>
<plugin
@@ -38,13 +39,6 @@
download-size="0"
install-size="0"
version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="com.google.gson"
- download-size="0"
- install-size="0"
- version="0.0.0"
unpack="false"/>
</feature>
--- ./org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml.orig 2016-05-02 16:56:15.884504686 +0100
+++ ./org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.xml 2016-05-02 16:59:59.013601389 +0100
@@ -24,6 +24,7 @@
<requires>
<import plugin="com.jcraft.jsch"/>
+ <import plugin="org.apache.commons.logging" />
</requires>
<plugin
@@ -45,13 +46,6 @@
download-size="0"
install-size="0"
version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.logging"
- download-size="0"
- install-size="0"
- version="0.0.0"
unpack="false"/>
</feature>
--- ./org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml.orig 2016-05-02 16:56:15.888504634 +0100
+++ ./org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml 2016-05-02 16:57:46.876320725 +0100
@@ -24,6 +24,8 @@
<requires>
<import plugin="org.eclipse.jgit"/>
+ <import plugin="org.apache.httpcomponents.httpclient" />
+ <import plugin="org.apache.httpcomponents.httpcore" />
</requires>
<plugin
@@ -31,20 +33,6 @@
download-size="0"
install-size="0"
version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.httpcomponents.httpcore"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.httpcomponents.httpclient"
- download-size="0"
- install-size="0"
- version="0.0.0"
unpack="false"/>
</feature>
--- ./org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml.orig 2016-05-02 16:56:15.890504608 +0100
+++ ./org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml 2016-05-02 16:57:17.671700728 +0100
@@ -33,6 +33,9 @@
<requires>
<import feature="org.eclipse.jgit" version="5.1.1" match="equivalent"/>
<import feature="org.eclipse.jgit.lfs" version="5.1.1" match="equivalent"/>
+ <import plugin="org.apache.commons.compress" />
+ <import plugin="org.kohsuke.args4j" />
+ <import plugin="javaewah" />
</requires>
<plugin
@@ -49,25 +52,4 @@
version="0.0.0"
unpack="false"/>
- <plugin
- id="org.apache.commons.compress"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.kohsuke.args4j"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="javaewah"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
</feature>
--- ./org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml.orig 2016-05-02 16:56:15.886504660 +0100
+++ ./org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml 2016-05-02 16:59:28.769994911 +0100
@@ -22,6 +22,15 @@
<discovery label="%updateSiteName" url="http://download.eclipse.org/egit/updates"/>
</url>
+ <requires>
+ <import plugin="com.jcraft.jsch" />
+ <import plugin="com.jcraft.jzlib"/>
+ <import plugin="javaewah" />
+ <import plugin="org.apache.commons.compress" />
+ <import plugin="slf4j.api" />
+ <import plugin="slf4j.simple" />
+ </requires>
+
<plugin
id="org.eclipse.jgit"
download-size="0"
@@ -34,56 +43,6 @@
download-size="0"
install-size="0"
version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="com.jcraft.jsch"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="javaewah"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.compress"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.slf4j.api"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.slf4j.impl.log4j12"
- download-size="0"
- install-size="0"
- version="0.0.0"
- fragment="true"
- unpack="false"/>
-
- <plugin
- id="org.apache.log4j"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="com.jcraft.jzlib"
- download-size="0"
- install-size="0"
- version="0.0.0"
unpack="false"/>
</feature>

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3209486b92f5702dca41bcc24c1a78ec83d09519dc04c4f47b458726fa5a8099
size 3180214