diff --git a/eclipse-jgit-jetty-9.4.0.patch b/eclipse-jgit-jetty-9.4.0.patch new file mode 100644 index 0000000..8e83cd3 --- /dev/null +++ b/eclipse-jgit-jetty-9.4.0.patch @@ -0,0 +1,51 @@ +--- org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java.orig 2016-06-13 11:40:49.930107546 +0100 ++++ org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java 2016-06-13 11:45:22.354906250 +0100 +@@ -53,11 +53,14 @@ + import java.net.UnknownHostException; + import java.util.ArrayList; + import java.util.List; ++import java.util.concurrent.ConcurrentMap; ++import java.util.concurrent.ConcurrentHashMap; + + import org.eclipse.jetty.security.Authenticator; + import org.eclipse.jetty.security.ConstraintMapping; + import org.eclipse.jetty.security.ConstraintSecurityHandler; +-import org.eclipse.jetty.security.MappedLoginService; ++import org.eclipse.jetty.security.AbstractLoginService; ++import org.eclipse.jetty.security.AbstractLoginService.UserPrincipal; + import org.eclipse.jetty.security.authentication.BasicAuthenticator; + import org.eclipse.jetty.server.Connector; + import org.eclipse.jetty.server.HttpConfiguration; +@@ -171,15 +174,27 @@ + private void auth(ServletContextHandler ctx, Authenticator authType) { + final String role = "can-access"; + +- MappedLoginService users = new MappedLoginService() { ++ AbstractLoginService users = new AbstractLoginService() { ++ protected final ConcurrentMap _users = new ConcurrentHashMap(); ++ ++ @Override ++ protected void doStart() throws Exception { ++ UserPrincipal p = new UserPrincipal(username, new Password(password)); ++ _users.put(username, p); ++ super.doStart(); ++ } ++ + @Override +- protected UserIdentity loadUser(String who) { +- return null; ++ protected UserPrincipal loadUserInfo(String who) { ++ return _users.get(who); + } + + @Override +- protected void loadUsers() throws IOException { +- putUser(username, new Password(password), new String[] { role }); ++ protected String[] loadRoleInfo(UserPrincipal who) { ++ if (_users.get(who.getName()) == null) ++ return null; ++ else ++ return new String[] { role }; + } + }; + diff --git a/eclipse-jgit.spec b/eclipse-jgit.spec index 05024ea..99528e5 100644 --- a/eclipse-jgit.spec +++ b/eclipse-jgit.spec @@ -1,8 +1,8 @@ -%global version_suffix 201604071810-r +%global version_suffix 201606070830-r Name: eclipse-jgit -Version: 4.3.0 -Release: 2%{?dist} +Version: 4.4.0 +Release: 1%{?dist} Summary: Eclipse JGit License: BSD @@ -13,8 +13,9 @@ Patch0: fix_jgit_sh.patch Patch1: eclipse-jgit-413163.patch # Have to patch for latest vesions of jetty Patch2: eclipse-jgit-jetty-9.3.7.patch +Patch3: eclipse-jgit-jetty-9.4.0.patch # Change how feature deps are specified, to avoid embedding versions -Patch3: jgit-feature-deps.patch +Patch4: jgit-feature-deps.patch BuildArch: noarch @@ -52,10 +53,14 @@ Command line Git tool built entirely in Java. %patch0 %patch1 -p1 +%if 0%{?fedora} >= 25 +%patch3 +%else %if 0%{?fedora} >= 24 %patch2 -p1 %endif -%patch3 +%endif +%patch4 #javaewah change sed -i -e "s/javaewah/com.googlecode.javaewah.JavaEWAH/g" org.eclipse.jgit.packaging/org.eclipse.jgit{,.pgm}.feature/feature.xml @@ -151,6 +156,9 @@ install -m 755 org.eclipse.jgit.pgm/jgit.sh %{buildroot}%{_bindir}/jgit %doc LICENSE README.md %changelog +* Mon Jun 13 2016 Mat Booth - 4.4.0-1 +- Update to latest release + * Mon May 02 2016 Mat Booth - 4.3.0-2 - Avoid embedding versions of external deps in features. This avoids the need to rebuild when a dependency changes version. diff --git a/jgit-feature-deps.patch b/jgit-feature-deps.patch index 1597372..3f386b3 100644 --- a/jgit-feature-deps.patch +++ b/jgit-feature-deps.patch @@ -149,8 +149,8 @@ +++ ./org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.xml 2016-05-02 16:57:17.671700728 +0100 @@ -33,6 +33,9 @@ - - + + + + + diff --git a/sources b/sources index ef89a3d..830fd89 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -80636befc96024fe0894b6e9a2535c53 jgit-4.3.0.201604071810-r.tar.xz +09cd9bfb6d3fc8c272d96ada0f858214 jgit-4.4.0.201606070830-r.tar.xz