From d37b49ff6387f2f8156ef7deb129cd07d5c72960 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Oct 30 2014 09:47:10 +0000 Subject: import devtoolset-3-eclipse-jgit-3.4.1-1.el7 --- diff --git a/.devtoolset-3-eclipse-jgit.metadata b/.devtoolset-3-eclipse-jgit.metadata new file mode 100644 index 0000000..0781b8d --- /dev/null +++ b/.devtoolset-3-eclipse-jgit.metadata @@ -0,0 +1 @@ +9d1982902f9c7b5163b5c37807eabfffd8f564a3 SOURCES/jgit-3.4.1.201406201815-r.tar.bz2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4f873e5 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/jgit-3.4.1.201406201815-r.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/eclipse-jgit-413163.patch b/SOURCES/eclipse-jgit-413163.patch new file mode 100644 index 0000000..a5597b2 --- /dev/null +++ b/SOURCES/eclipse-jgit-413163.patch @@ -0,0 +1,278 @@ +From db03b9787cb8c71d9c035a628ecae17581bcc390 Mon Sep 17 00:00:00 2001 +From: Robin Stocker +Date: Thu, 18 Jul 2013 19:08:29 +0200 +Subject: [PATCH] Fix compilation errors with args4j 2.0.23 and later + +The multiValued attribute on @Option was removed. When the field is a +List, it's not actually needed (even with earlier versions of args4j), +see RmTest. In other cases, we have a custom handler, where it's also +not needed. + +Bug: 413163 +Change-Id: I4bb951e9fab5f4ae4271bd7e11be799dc234ab80 +--- + .../tst/org/eclipse/jgit/pgm/RmTest.java | 80 ++++++++++++++++++++++ + .../src/org/eclipse/jgit/pgm/Daemon.java | 8 +-- + .../src/org/eclipse/jgit/pgm/Diff.java | 2 +- + .../src/org/eclipse/jgit/pgm/DiffTree.java | 2 +- + .../src/org/eclipse/jgit/pgm/LsTree.java | 2 +- + .../org/eclipse/jgit/pgm/RevWalkTextBuiltin.java | 2 +- + .../src/org/eclipse/jgit/pgm/Rm.java | 4 +- + .../src/org/eclipse/jgit/pgm/Show.java | 2 +- + .../org/eclipse/jgit/pgm/debug/DiffAlgorithms.java | 4 +- + .../eclipse/jgit/pgm/debug/TextHashFunctions.java | 6 +- + 10 files changed, 95 insertions(+), 17 deletions(-) + create mode 100644 org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RmTest.java + +diff --git a/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RmTest.java b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RmTest.java +new file mode 100644 +index 0000000..00a1a9a +--- /dev/null ++++ b/org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/RmTest.java +@@ -0,0 +1,80 @@ ++/* ++ * Copyright (C) 2013 Robin Stocker and others. ++ * ++ * This program and the accompanying materials are made available ++ * under the terms of the Eclipse Distribution License v1.0 which ++ * accompanies this distribution, is reproduced below, and is ++ * available at http://www.eclipse.org/org/documents/edl-v10.php ++ * ++ * All rights reserved. ++ * ++ * Redistribution and use in source and binary forms, with or ++ * without modification, are permitted provided that the following ++ * conditions are met: ++ * ++ * - Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * ++ * - Redistributions in binary form must reproduce the above ++ * copyright notice, this list of conditions and the following ++ * disclaimer in the documentation and/or other materials provided ++ * with the distribution. ++ * ++ * - Neither the name of the Eclipse Foundation, Inc. nor the ++ * names of its contributors may be used to endorse or promote ++ * products derived from this software without specific prior ++ * written permission. ++ * ++ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND ++ * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, ++ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES ++ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR ++ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT ++ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; ++ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER ++ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, ++ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ++ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ++ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ++ */ ++package org.eclipse.jgit.pgm; ++ ++import static org.junit.Assert.assertArrayEquals; ++import static org.junit.Assert.assertFalse; ++import static org.junit.Assert.assertNull; ++ ++import java.io.File; ++ ++import org.eclipse.jgit.api.Git; ++import org.eclipse.jgit.dircache.DirCache; ++import org.eclipse.jgit.lib.CLIRepositoryTestCase; ++import org.junit.Before; ++import org.junit.Test; ++ ++public class RmTest extends CLIRepositoryTestCase { ++ private Git git; ++ ++ @Override ++ @Before ++ public void setUp() throws Exception { ++ super.setUp(); ++ git = new Git(db); ++ } ++ ++ @Test ++ public void multiplePathsShouldBeRemoved() throws Exception { ++ File a = writeTrashFile("a", "Hello"); ++ File b = writeTrashFile("b", "world!"); ++ git.add().addFilepattern("a").addFilepattern("b").call(); ++ ++ String[] result = execute("git rm a b"); ++ assertArrayEquals(new String[] { "" }, result); ++ DirCache cache = db.readDirCache(); ++ assertNull(cache.getEntry("a")); ++ assertNull(cache.getEntry("b")); ++ assertFalse(a.exists()); ++ assertFalse(b.exists()); ++ } ++} +diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java +index 04182d6..9ef8e49 100644 +--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java ++++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java +@@ -75,16 +75,16 @@ + @Option(name = "--timeout", metaVar = "metaVar_seconds", usage = "usage_abortConnectionIfNoActivity") + int timeout = -1; + +- @Option(name = "--enable", metaVar = "metaVar_service", usage = "usage_enableTheServiceInAllRepositories", multiValued = true) ++ @Option(name = "--enable", metaVar = "metaVar_service", usage = "usage_enableTheServiceInAllRepositories") + final List enable = new ArrayList(); + +- @Option(name = "--disable", metaVar = "metaVar_service", usage = "usage_disableTheServiceInAllRepositories", multiValued = true) ++ @Option(name = "--disable", metaVar = "metaVar_service", usage = "usage_disableTheServiceInAllRepositories") + final List disable = new ArrayList(); + +- @Option(name = "--allow-override", metaVar = "metaVar_service", usage = "usage_configureTheServiceInDaemonServicename", multiValued = true) ++ @Option(name = "--allow-override", metaVar = "metaVar_service", usage = "usage_configureTheServiceInDaemonServicename") + final List canOverride = new ArrayList(); + +- @Option(name = "--forbid-override", metaVar = "metaVar_service", usage = "usage_configureTheServiceInDaemonServicename", multiValued = true) ++ @Option(name = "--forbid-override", metaVar = "metaVar_service", usage = "usage_configureTheServiceInDaemonServicename") + final List forbidOverride = new ArrayList(); + + @Option(name = "--export-all", usage = "usage_exportWithoutGitDaemonExportOk") +diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java +index 8f05168..3db8ce2 100644 +--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java ++++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java +@@ -89,7 +89,7 @@ + @Option(name = "--cached", usage = "usage_cached") + private boolean cached; + +- @Option(name = "--", metaVar = "metaVar_paths", multiValued = true, handler = PathTreeFilterHandler.class) ++ @Option(name = "--", metaVar = "metaVar_paths", handler = PathTreeFilterHandler.class) + private TreeFilter pathFilter = TreeFilter.ALL; + + // BEGIN -- Options shared with Log +diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java +index 018bad0..ec23f11 100644 +--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java ++++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java +@@ -68,7 +68,7 @@ void tree_0(final AbstractTreeIterator c) { + @Argument(index = 1, metaVar = "metaVar_treeish", required = true) + private final List trees = new ArrayList(); + +- @Option(name = "--", metaVar = "metaVar_path", multiValued = true, handler = PathTreeFilterHandler.class) ++ @Option(name = "--", metaVar = "metaVar_path", handler = PathTreeFilterHandler.class) + private TreeFilter pathFilter = TreeFilter.ALL; + + @Override +diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java +index 4fb560b..0110935 100644 +--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java ++++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java +@@ -65,7 +65,7 @@ + private AbstractTreeIterator tree; + + @Argument(index = 1) +- @Option(name = "--", metaVar = "metaVar_paths", multiValued = true, handler = StopOptionHandler.class) ++ @Option(name = "--", metaVar = "metaVar_paths", handler = StopOptionHandler.class) + private List paths = new ArrayList(); + + @Override +diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java +index 4327403..ba0493a 100644 +--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java ++++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java +@@ -124,7 +124,7 @@ void enableBoundary(final boolean on) { + @Argument(index = 0, metaVar = "metaVar_commitish") + private final List commits = new ArrayList(); + +- @Option(name = "--", metaVar = "metaVar_path", multiValued = true, handler = PathTreeFilterHandler.class) ++ @Option(name = "--", metaVar = "metaVar_path", handler = PathTreeFilterHandler.class) + protected TreeFilter pathFilter = TreeFilter.ALL; + + private final List revLimiter = new ArrayList(); +diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java +index 816b310..0b6f522 100644 +--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java ++++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java +@@ -55,12 +55,10 @@ + + @Command(usage = "usage_StopTrackingAFile", common = true) + class Rm extends TextBuiltin { +- @Argument(metaVar = "metaVar_path", usage = "usage_path", multiValued = true, required = true) +- ++ @Argument(metaVar = "metaVar_path", usage = "usage_path", required = true) + @Option(name = "--", handler = StopOptionHandler.class) + private List paths = new ArrayList(); + +- + @Override + protected void run() throws Exception { + RmCommand command = new Git(db).rm(); +diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java +index a33a2d4..bcff628 100644 +--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java ++++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java +@@ -87,7 +87,7 @@ + @Argument(index = 0, metaVar = "metaVar_object") + private String objectName; + +- @Option(name = "--", metaVar = "metaVar_path", multiValued = true, handler = PathTreeFilterHandler.class) ++ @Option(name = "--", metaVar = "metaVar_path", handler = PathTreeFilterHandler.class) + protected TreeFilter pathFilter = TreeFilter.ALL; + + // BEGIN -- Options shared with Diff +diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java +index 3efe884..af3915b 100644 +--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java ++++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java +@@ -109,13 +109,13 @@ DiffAlgorithm create() { + // + // + +- @Option(name = "--algorithm", multiValued = true, metaVar = "NAME", usage = "Enable algorithm(s)") ++ @Option(name = "--algorithm", metaVar = "NAME", usage = "Enable algorithm(s)") + List algorithms = new ArrayList(); + + @Option(name = "--text-limit", metaVar = "LIMIT", usage = "Maximum size in KiB to scan per file revision") + int textLimit = 15 * 1024; // 15 MiB as later we do * 1024. + +- @Option(name = "--repository", aliases = { "-r" }, multiValued = true, metaVar = "GIT_DIR", usage = "Repository to scan") ++ @Option(name = "--repository", aliases = { "-r" }, metaVar = "GIT_DIR", usage = "Repository to scan") + List gitDirs = new ArrayList(); + + @Option(name = "--count", metaVar = "LIMIT", usage = "Number of file revisions to be compared") +diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java +index e43c9a6..274a89c 100644 +--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java ++++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java +@@ -248,16 +248,16 @@ public int fold(int hash, int bits) { + // + // + +- @Option(name = "--hash", multiValued = true, metaVar = "NAME", usage = "Enable hash function(s)") ++ @Option(name = "--hash", metaVar = "NAME", usage = "Enable hash function(s)") + List hashFunctions = new ArrayList(); + +- @Option(name = "--fold", multiValued = true, metaVar = "NAME", usage = "Enable fold function(s)") ++ @Option(name = "--fold", metaVar = "NAME", usage = "Enable fold function(s)") + List foldFunctions = new ArrayList(); + + @Option(name = "--text-limit", metaVar = "LIMIT", usage = "Maximum size in KiB to scan") + int textLimit = 15 * 1024; // 15 MiB as later we do * 1024. + +- @Option(name = "--repository", aliases = { "-r" }, multiValued = true, metaVar = "GIT_DIR", usage = "Repository to scan") ++ @Option(name = "--repository", aliases = { "-r" }, metaVar = "GIT_DIR", usage = "Repository to scan") + List gitDirs = new ArrayList(); + + @Override +-- +1.8.3.1 +--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java.bak 2013-10-03 10:47:24.000000000 +0200 ++++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java 2013-10-03 10:57:14.418101625 +0200 +@@ -184,8 +184,7 @@ + static class MyOptionDef extends OptionDef { + + public MyOptionDef(OptionDef o) { +- super(o.usage(), o.metaVar(), o.required(), o.handler(), o +- .isMultiValued()); ++ super(o.usage(), o.metaVar(), o.required(), o.hidden(), o.handler(), o.isMultiValued()); + } + + @Override diff --git a/SOURCES/fix_category.patch b/SOURCES/fix_category.patch new file mode 100644 index 0000000..9928e25 --- /dev/null +++ b/SOURCES/fix_category.patch @@ -0,0 +1,27 @@ +--- org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml.sav 2014-03-03 01:26:54.000000000 +0200 ++++ org.eclipse.jgit.packaging/org.eclipse.jgit.repository/category.xml 2014-03-10 17:45:40.762278933 +0200 +@@ -6,24 +6,12 @@ + + + +- +- +- + + + +- +- +- +- +- +- + + + +- +- +- + + + JGit diff --git a/SOURCES/fix_jgit_sh.patch b/SOURCES/fix_jgit_sh.patch new file mode 100644 index 0000000..c519dbe --- /dev/null +++ b/SOURCES/fix_jgit_sh.patch @@ -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="/usr/share/java/jgit/*:/usr/share/java/args4j.jar:/usr/share/java/jsch.jar:/usr/share/java/commons-compress.jar:/usr/share/java/xz-java.jar:/usr/share/java/javaewah/JavaEWAH.jar" + if [ -n "$JGIT_CLASSPATH" ] + then + cp="$cp:$JGIT_CLASSPATH" diff --git a/SOURCES/java7module.patch b/SOURCES/java7module.patch new file mode 100644 index 0000000..4c5a652 --- /dev/null +++ b/SOURCES/java7module.patch @@ -0,0 +1,23 @@ +--- pom.xml.sav 2014-03-28 16:03:13.323171797 +0200 ++++ pom.xml 2014-03-28 16:03:49.204259024 +0200 +@@ -503,7 +503,7 @@ + + jgit.java6 + +- 1.6 ++ [1.6,) + + + org.eclipse.jgit.console +@@ -512,10 +512,9 @@ + + jgit.java7 + +- 1.7 ++ [1.7,) + + +- org.eclipse.jgit.console + org.eclipse.jgit.java7 + org.eclipse.jgit.java7.test + diff --git a/SPECS/eclipse-jgit.spec b/SPECS/eclipse-jgit.spec new file mode 100644 index 0000000..7cdedd5 --- /dev/null +++ b/SPECS/eclipse-jgit.spec @@ -0,0 +1,363 @@ +%global install_loc %{_datadir}/eclipse/dropins/jgit +%global version_suffix 201406201815-r + +%{?scl:%scl_package eclipse-jgit} +%{!?scl:%global pkg_name %{name}} +%{!?maven_scl:%global maven_scl_prefix %{nil}} + +# Use SCL-ized package on RHEL < 7 and base otherwise +%if 0%{?rhel} < 7 +%global base_or_scl %{?scl_prefix} +%else +%global base_or_scl %{nil} +%endif + + +Name: %{?scl_prefix}eclipse-jgit +Version: 3.4.1 +Release: 1%{?dist} +Summary: Eclipse JGit + +Group: Development/Tools +License: BSD +URL: http://www.eclipse.org/egit/ +Source0: http://git.eclipse.org/c/jgit/jgit.git/snapshot/jgit-%{version}.%{version_suffix}.tar.bz2 +Patch0: fix_jgit_sh.patch +Patch1: eclipse-jgit-413163.patch +Patch2: fix_category.patch +Patch3: java7module.patch + +BuildArch: noarch + +BuildRequires: java-devel +BuildRequires: %{?scl_prefix}eclipse-pde >= 1:3.5.0 +BuildRequires: %{maven_scl_prefix}javapackages-tools +BuildRequires: %{maven_scl_prefix}maven-local +BuildRequires: %{maven_scl_prefix}maven-compiler-plugin +BuildRequires: %{maven_scl_prefix}maven-install-plugin +BuildRequires: %{maven_scl_prefix}maven-jar-plugin +BuildRequires: %{maven_scl_prefix}maven-javadoc-plugin +BuildRequires: %{maven_scl_prefix}maven-release-plugin +BuildRequires: %{maven_scl_prefix}maven-resources-plugin +BuildRequires: %{maven_scl_prefix}maven-surefire-plugin +BuildRequires: %{maven_scl_prefix}maven-surefire-provider-junit +BuildRequires: %{maven_scl_prefix}maven-shade-plugin +BuildRequires: tycho +BuildRequires: %{?scl_prefix}eclipse-equinox-osgi +BuildRequires: %{?scl_prefix}eclipse-platform +BuildRequires: %{?scl_prefix}args4j >= 2.0.12 +BuildRequires: %{base_or_scl}apache-commons-compress +BuildRequires: %{base_or_scl}xz-java >= 1.1-2 +BuildRequires: %{?scl_prefix}javaewah +BuildRequires: %{maven_scl_prefix}mvn(org.codehaus.mojo:build-helper-maven-plugin) +BuildRequires: %{?scl_prefix}feclipse-maven-plugin >= 0.0.3 +%{?scl:Requires: %scl_runtime} +Requires: %{?scl_prefix}eclipse-platform >= 3.5.0 +Requires: %{?scl_prefix}javaewah +Requires: %{?scl_prefix}args4j +Requires: %{base_or_scl}apache-commons-compress +Requires: %{base_or_scl}xz-java >= 1.1-2 + +%description +A pure Java implementation of the Git version control system. + +%package -n %{?scl_prefix}jgit-javadoc +Summary: API documentation for %{pkg_name} +Group: Documentation + +%description -n %{?scl_prefix}jgit-javadoc +%{summary}. + +%package -n %{?scl_prefix}jgit +Summary: Java-based command line Git interface +Group: Development/Tools +Requires: %{?scl_prefix}args4j >= 2.0.12 +Requires: %{base_or_scl}apache-commons-compress +Requires: %{base_or_scl}xz-java >= 1.1-2 +Requires: %{?scl_prefix}javaewah + +%description -n %{?scl_prefix}jgit +Command line Git tool built entirely in Java. + +%prep +%setup -n jgit-%{version}.%{version_suffix} -q + +scl enable %{scl} - <<"EOF" +%patch0 +%patch1 -p1 +%patch2 -b .sav +%patch3 + +#javaewah change +sed -i -e "s/javaewah/com.googlecode.javaewah.JavaEWAH/g" org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.xml + +#don't try to get it from local *maven* repo, use tycho resolved one +%pom_remove_dep com.googlecode.javaewah:JavaEWAH +%pom_remove_dep org.eclipse.jgit:org.eclipse.jgit.junit.http org.eclipse.jgit.packaging/org.eclipse.jgit.repository + +#those bundles don't compile with latest jetty +%pom_disable_module org.eclipse.jgit.http.test +%pom_disable_module org.eclipse.jgit.pgm.test +%pom_disable_module org.eclipse.jgit.junit.http + +%pom_disable_module org.eclipse.jgit.target 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 + +%pom_disable_module org.eclipse.jgit.junit.feature org.eclipse.jgit.packaging +%pom_disable_module org.eclipse.jgit.pgm.feature org.eclipse.jgit.packaging +%pom_disable_module org.eclipse.jgit.pgm.source.feature org.eclipse.jgit.packaging +%pom_disable_module org.eclipse.jgit.http.apache.feature org.eclipse.jgit.packaging + +sed -i -e 's/\, multiValued = true//' org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java +sed -i -e 's/\, multiValued = true//' org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java +sed -i -e 's/0.7.9,0.8.0/0.7.9,0.9.0/g' org.eclipse.jgit/META-INF/MANIFEST.MF +sed -i -e 's/0.7.9,0.8.0/0.7.9,0.9.0/g' org.eclipse.jgit.test/META-INF/MANIFEST.MF +sed -i -e 's/o.hidden()/o.help(),o.hidden()/g' org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java +%pom_remove_plugin org.jacoco:jacoco-maven-plugin +EOF + +%build +scl enable %{scl} - <<"EOF" +mvn-rpmbuild -Dmaven.test.skip=true install +mvn-rpmbuild -Dmaven.test.skip=true -f org.eclipse.jgit.packaging/pom.xml verify +EOF + +%install +scl enable %{scl} - <<"EOF" +install -d -m 755 %{buildroot}%{install_loc} + +mvn-rpmbuild org.fedoraproject:feclipse-maven-plugin:install \ + -DsourceRepo=`pwd`/org.eclipse.jgit.packaging/org.eclipse.jgit.repository/target/repository \ + -DtargetLocation=%{buildroot}%{install_loc}/eclipse + +pushd %{buildroot}%{install_loc}/eclipse/plugins + rm com.jcraft.jsch_*.jar + rm com.googlecode.javaewah.JavaEWAH_*.jar + rm org.apache.commons.compress_*.jar +#to the future maintainers - dont forget to add those jars to the fix_jgit_sh.patch + ln -s %{_javadir}/args4j.jar +%if 0%{?rhel} < 7 + ln -s %{_javadir}/commons-compress.jar + ln -s %{_javadir}/xz-java.jar +%else + ln -s %{_root_datadir}/java/commons-compress.jar + ln -s %{_root_datadir}/java/xz-java.jar +%endif + ln -s %{_javadir}/javaewah/JavaEWAH.jar +popd + +#giant hack - for some reason source bundle is in the repo, install the proper one +cp org.eclipse.jgit/target/org.eclipse.jgit-*-r.jar %{buildroot}%{install_loc}/eclipse/plugins + +# JARs +install -d -m 0755 %{buildroot}%{_javadir}/jgit +install -m 644 org.eclipse.jgit/target/org.eclipse.jgit-%{version}.%{version_suffix}.jar %{buildroot}%{_javadir}/jgit/jgit.jar +install -m 644 org.eclipse.jgit.ui/target/org.eclipse.jgit.ui-%{version}.%{version_suffix}.jar %{buildroot}%{_javadir}/jgit/ui.jar +install -m 644 org.eclipse.jgit.java7/target/org.eclipse.jgit.java7-%{version}.%{version_suffix}.jar %{buildroot}%{_javadir}/jgit/java7.jar +install -m 644 org.eclipse.jgit.console/target/org.eclipse.jgit.console-%{version}.%{version_suffix}.jar %{buildroot}%{_javadir}/jgit/console.jar +install -m 644 org.eclipse.jgit.pgm/target/org.eclipse.jgit.pgm-%{version}.%{version_suffix}.jar %{buildroot}%{_javadir}/jgit/pgm.jar +# Javadocs +install -d -m 755 %{buildroot}%{_javadocdir}/jgit +cp -rp org.eclipse.jgit/target/apidocs %{buildroot}%{_javadocdir}/jgit +cp -rp org.eclipse.jgit.ui/target/apidocs %{buildroot}%{_javadocdir}/jgit +cp -rp org.eclipse.jgit.console/target/apidocs %{buildroot}%{_javadocdir}/jgit +# POM Files +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-jgit-parent.pom +install -pm 644 org.eclipse.jgit/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-jgit.pom +install -pm 644 org.eclipse.jgit.ui/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-ui.pom +install -pm 644 org.eclipse.jgit.java7/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-java7.pom +install -pm 644 org.eclipse.jgit.console/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-console.pom +install -pm 644 org.eclipse.jgit.pgm/pom.xml %{buildroot}%{_mavenpomdir}/JPP.jgit-pgm.pom + +%add_maven_depmap JPP.jgit-jgit.pom jgit/jgit.jar +%add_maven_depmap JPP.jgit-ui.pom jgit/ui.jar +%add_maven_depmap JPP.jgit-java7.pom jgit/java7.jar +%add_maven_depmap JPP.jgit-console.pom jgit/console.jar +%add_maven_depmap JPP.jgit-pgm.pom jgit/pgm.jar +%add_maven_depmap JPP-jgit-parent.pom +# Binary +install -dm 755 %{buildroot}%{_bindir} +install -m 755 org.eclipse.jgit.pgm/jgit.sh %{buildroot}%{_bindir}/jgit +EOF + +%files +%doc LICENSE +%doc README.md +%{install_loc} + +%files -n %{?scl_prefix}jgit +%{_bindir}/jgit +%{_javadir}/jgit +%{_mavendepmapfragdir}/%{pkg_name} +%{_mavenpomdir}/JPP-jgit-parent.pom +%{_mavenpomdir}/JPP.jgit*.pom +%doc LICENSE +%doc README.md + +%files -n %{?scl_prefix}jgit-javadoc +%{_javadocdir}/jgit +%doc LICENSE +%doc README.md + +%changelog +* Mon Jun 30 2014 Alexander Kurtakov 3.4.1-1 +- Update to upstream 3.4.1 release. + +* Tue Jun 3 2014 Alexander Kurtakov 3.3.2-3.2 +- Add missing R on args4j. + +* Wed May 28 2014 Roland Grunberg - 3.3.2-3.1 +- Fix symlink paths. + +* Wed May 28 2014 Alexander Kurtakov 3.3.2-2.1 +- Add sclized Rs as auto-reqs are not working on RHEL 6. + +* Wed May 21 2014 Alexander Kurtakov 3.3.2-2 +- Fix compile against latest args4j. + +* Fri Apr 25 2014 Alexander Kurtakov 3.3.2-1 +- Update to 3.3.2. + +* Mon Mar 31 2014 Alexander Kurtakov 3.3.1-2 +- Remove bundled commons-compress. + +* Fri Mar 28 2014 Alexander Kurtakov 3.3.1-1 +- Update to 3.3.1. + +* Tue Mar 11 2014 Alexander Kurtakov 3.3.0-1 +- Update to 3.3.0. + +* Sun Dec 29 2013 Alexander Kurtakov 3.2.0-1 +- Update to 3.2.0. + +* Thu Oct 3 2013 Krzysztof Daniel 3.1.0-1 +- Update to Kepler SR1. + +* Mon Aug 5 2013 Krzysztof Daniel 3.0.0-7 +- Add missing jgit plugin back. + +* Tue Jul 16 2013 Krzysztof Daniel 3.0.0-6 +- Change the build system to mvn-rpmbuild. +- Use feclipse-maven-plugin to install things. +- Bug 413163 - Incompatible change in latest args4j: multiValued removed from @Option + +* Fri Jul 5 2013 Neil Brian Guzman 3.0.0-5 +- Bump release + +* Tue Jun 25 2013 Neil Brian Guzman 3.0.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Tue Jun 25 2013 Krzysztof Daniel 3.0.0-3 +- Add missing R: javaewah to eclipse-jgit. + +* Tue Jun 25 2013 Krzysztof Daniel 3.0.0-2 +- Move symlinks to eclipse-jgit. +- Fix jgit classpath. + +* Thu Jun 20 2013 Neil Brian Guzman 3.0.0-1 +- Update to 3.0.0 release + +* Tue May 14 2013 Krzysztof Daniel 2.3.1-2 +- Rebuild with latest icu4j. + +* Thu Feb 21 2013 Roland Grunberg - 2.3.1-1 +- SCL-ize package. + +* Thu Feb 21 2013 Roland Grunberg - 2.3.1-1 +- Update to 2.3.1 release. + +* Thu Feb 14 2013 Roland Grunberg - 2.2.0-3 +- jgit subpackage should own its symlinked dependencies. + +* Wed Feb 13 2013 Fedora Release Engineering - 2.2.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jan 3 2013 Krzysztof Daniel 2.2.0-1 +- Update to 2.2.0 release. + +* Mon Oct 1 2012 Alexander Kurtakov 2.1.0-1 +- Update to 2.1.0 release. + +* Wed Jul 18 2012 Fedora Release Engineering - 2.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Mon Jul 2 2012 Alexander Kurtakov 2.0.0-1 +- Update to 2.0.0 upstream release. + +* Fri Apr 27 2012 Severin Gehwolf 1.3.0-3 +- Use eclipse-pdebuild over old pdebuild script. + +* Thu Apr 26 2012 Severin Gehwolf 1.3.0-2 +- Tweak .spec so as to avoid modifying to much of the .spec file +- Fix upstream 1.3 release sources. + +* Fri Feb 17 2012 Andrew Robinson 1.3.0-1 +- Update to 1.3.0 upstream release. + +* Thu Jan 5 2012 Alexander Kurtakov 1.2.0-2 +- Build eclipse plugin first to not interfere with maven artifacts. + +* Thu Jan 5 2012 Alexander Kurtakov 1.2.0-1 +- Update to 1.2.0 release. + +* Fri Oct 28 2011 Andrew Robinson 1.1.0-4 +- Add jsch jar to the classpath. + +* Fri Oct 28 2011 Alexander Kurtakov 1.1.0-3 +- Drop libs subpackage and use the sh script directly instead of the shaded executable. +- Install jars in _javadir subdir as per guidelines. + +* Thu Oct 27 2011 Andrew Robinson 1.1.0-2 +- Added Java libraries, javadocs and console binary subpackages. + +* Fri Sep 23 2011 Andrew Robinson 1.1.0-1 +- Update to upstream release 1.1.0. + +* Tue Jun 14 2011 Chris Aniszczyk 1.0.0-2 +- Update to upstream release 1.0.0.201106090707-r. + +* Tue Jun 07 2011 Chris Aniszczyk 1.0.0-1 +- Update to upstream release 1.0.0. + +* Tue May 03 2011 Chris Aniszczyk 0.12.1-1 +- Update to upstream release 0.12.1. + +* Tue Feb 22 2011 Chris Aniszczyk 0.11.3-1 +- Update to upstream release 0.11.3. + +* Tue Feb 08 2011 Fedora Release Engineering - 0.10.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Dec 22 2010 Chris Aniszczyk 0.10.1-1 +- Update to upstream release 0.10.1. + +* Thu Oct 7 2010 Chris Aniszczyk 0.9.3-1 +- Update to upstream release 0.9.3. + +* Wed Sep 15 2010 Severin Gehwolf 0.9.1-1 +- Update to upstream release 0.9.1. + +* Thu Aug 26 2010 Severin Gehwolf 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 0.9.0-0.120100825git +- Pre-release version of JGit 0.9.0 + +* Fri Jun 25 2010 Severin Gehwolf 0.8.4-2 +- Increase release number to make tagging work. + +* Wed Jun 23 2010 Severin Gehwolf 0.8.4-1 +- Rebase to 0.8.4 release. + +* Mon Apr 12 2010 Jeff Johnston 0.7.1-1 +- Rebase to 0.7.1 release. + +* Tue Feb 9 2010 Alexander Kurtakov 0.6.0-0.1.git20100208 +- New git snapshot. + +* Thu Nov 5 2009 Alexander Kurtakov 0.6.0-0.1.git20091029 +- Correct release. + +* Thu Oct 29 2009 Alexander Kurtakov 0.6.0-0.git20091029.1 +- Initial package