From 6bc00e1688237d0d37f7080d1585253c7bb372e8 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 9 Apr 2019 08:53:20 +0900 Subject: [PATCH 1/3] Set version to 2.13.14-SNAPSHOT Change-Id: I00d28da3df73f3396e124a1eb2b980c290ddf340 --- Documentation/dev-plugins.txt | 2 +- VERSION | 2 +- gerrit-acceptance-framework/pom.xml | 2 +- gerrit-extension-api/pom.xml | 2 +- gerrit-plugin-api/pom.xml | 2 +- gerrit-plugin-archetype/pom.xml | 2 +- gerrit-plugin-gwt-archetype/pom.xml | 2 +- gerrit-plugin-gwtui/pom.xml | 2 +- gerrit-plugin-js-archetype/pom.xml | 2 +- gerrit-war/pom.xml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Documentation/dev-plugins.txt b/Documentation/dev-plugins.txt index 8dfe9e5c16..c4c04ac0df 100644 --- a/Documentation/dev-plugins.txt +++ b/Documentation/dev-plugins.txt @@ -36,7 +36,7 @@ plugin project. ---- mvn archetype:generate -DarchetypeGroupId=com.google.gerrit \ -DarchetypeArtifactId=gerrit-plugin-archetype \ - -DarchetypeVersion=2.13.13 \ + -DarchetypeVersion=2.13.14-SNAPSHOT \ -DgroupId=com.googlesource.gerrit.plugins.testplugin \ -DartifactId=testplugin ---- diff --git a/VERSION b/VERSION index 4bd2d302b7..9cfcfa799b 100644 --- a/VERSION +++ b/VERSION @@ -2,4 +2,4 @@ # Used by :api_install and :api_deploy targets # when talking to the destination repository. # -GERRIT_VERSION = '2.13.13' +GERRIT_VERSION = '2.13.14-SNAPSHOT' diff --git a/gerrit-acceptance-framework/pom.xml b/gerrit-acceptance-framework/pom.xml index 2c541baf7b..8d3dd38d26 100644 --- a/gerrit-acceptance-framework/pom.xml +++ b/gerrit-acceptance-framework/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-acceptance-framework - 2.13.13 + 2.13.14-SNAPSHOT jar Gerrit Code Review - Acceptance Test Framework Framework for Gerrit's acceptance tests diff --git a/gerrit-extension-api/pom.xml b/gerrit-extension-api/pom.xml index 9008ed3cac..13e96b1bcc 100644 --- a/gerrit-extension-api/pom.xml +++ b/gerrit-extension-api/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-extension-api - 2.13.13 + 2.13.14-SNAPSHOT jar Gerrit Code Review - Extension API API for Gerrit Extensions diff --git a/gerrit-plugin-api/pom.xml b/gerrit-plugin-api/pom.xml index 4513451bfb..8ce41aee61 100644 --- a/gerrit-plugin-api/pom.xml +++ b/gerrit-plugin-api/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-api - 2.13.13 + 2.13.14-SNAPSHOT jar Gerrit Code Review - Plugin API API for Gerrit Plugins diff --git a/gerrit-plugin-archetype/pom.xml b/gerrit-plugin-archetype/pom.xml index abcf874271..ec5c9d5f79 100644 --- a/gerrit-plugin-archetype/pom.xml +++ b/gerrit-plugin-archetype/pom.xml @@ -20,7 +20,7 @@ limitations under the License. com.google.gerrit gerrit-plugin-archetype - 2.13.13 + 2.13.14-SNAPSHOT Gerrit Code Review - Plugin Archetype Maven Archetype for Gerrit Plugins https://www.gerritcodereview.com/ diff --git a/gerrit-plugin-gwt-archetype/pom.xml b/gerrit-plugin-gwt-archetype/pom.xml index a1cdb6e9d9..c9e95df9a0 100644 --- a/gerrit-plugin-gwt-archetype/pom.xml +++ b/gerrit-plugin-gwt-archetype/pom.xml @@ -20,7 +20,7 @@ limitations under the License. com.google.gerrit gerrit-plugin-gwt-archetype - 2.13.13 + 2.13.14-SNAPSHOT Gerrit Code Review - Web UI GWT Plugin Archetype Maven Archetype for Gerrit Web UI GWT Plugins https://www.gerritcodereview.com/ diff --git a/gerrit-plugin-gwtui/pom.xml b/gerrit-plugin-gwtui/pom.xml index c1f5bc684d..59f70479e0 100644 --- a/gerrit-plugin-gwtui/pom.xml +++ b/gerrit-plugin-gwtui/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-plugin-gwtui - 2.13.13 + 2.13.14-SNAPSHOT jar Gerrit Code Review - Plugin GWT UI Common Classes for Gerrit GWT UI Plugins diff --git a/gerrit-plugin-js-archetype/pom.xml b/gerrit-plugin-js-archetype/pom.xml index ea5674f861..637ec8f768 100644 --- a/gerrit-plugin-js-archetype/pom.xml +++ b/gerrit-plugin-js-archetype/pom.xml @@ -20,7 +20,7 @@ limitations under the License. com.google.gerrit gerrit-plugin-js-archetype - 2.13.13 + 2.13.14-SNAPSHOT Gerrit Code Review - Web UI JavaScript Plugin Archetype Maven Archetype for Gerrit Web UI JavaScript Plugins https://www.gerritcodereview.com/ diff --git a/gerrit-war/pom.xml b/gerrit-war/pom.xml index 7566bda4b3..1936bc6506 100644 --- a/gerrit-war/pom.xml +++ b/gerrit-war/pom.xml @@ -2,7 +2,7 @@ 4.0.0 com.google.gerrit gerrit-war - 2.13.13 + 2.13.14-SNAPSHOT war Gerrit Code Review - WAR Gerrit WAR From 407ae56d25332ffb82e65c3979e02df9a7866c67 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Fri, 29 Mar 2019 00:25:10 +0100 Subject: [PATCH 2/3] Switch to java 8 Official support for Java 7 was discontinued on April 2015: [1]. [1] https://www.java.com/en/download/faq/java_7.xml Change-Id: I3aaf3eba118aaec3114a6dce8e93eda9dff4a18d --- .buckconfig | 2 ++ Documentation/dev-buck.txt | 2 +- gerrit-main/src/main/java/Main.java | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.buckconfig b/.buckconfig index b347a96a88..3ce69da9cd 100644 --- a/.buckconfig +++ b/.buckconfig @@ -20,6 +20,8 @@ [java] jar_spool_mode = direct_to_jar src_roots = java, resources, src + source_level = 8 + target_level = 8 [project] ignore = .git, eclipse-out, bazel-gerrit, bin diff --git a/Documentation/dev-buck.txt b/Documentation/dev-buck.txt index 315c0b06b3..dd707f5647 100644 --- a/Documentation/dev-buck.txt +++ b/Documentation/dev-buck.txt @@ -3,7 +3,7 @@ == Installation -You need to use Java 7 and Node.js for building gerrit. +You need to use Java 8 and Node.js for building gerrit. There is currently no binary distribution of Buck, so it has to be manually built and installed. Apache Ant and gcc are required. Currently only Linux diff --git a/gerrit-main/src/main/java/Main.java b/gerrit-main/src/main/java/Main.java index a29f1c66a6..58de6a453f 100644 --- a/gerrit-main/src/main/java/Main.java +++ b/gerrit-main/src/main/java/Main.java @@ -31,11 +31,11 @@ public final class Main { private static boolean onSupportedJavaVersion() { final String version = System.getProperty("java.specification.version"); - if (1.7 <= parse(version)) { + if (1.8 <= parse(version)) { return true; } - System.err.println("fatal: Gerrit Code Review requires Java 7 or later"); + System.err.println("fatal: Gerrit Code Review requires Java 8 or later"); System.err.println(" (trying to run on Java " + version + ")"); return false; } From 2de45fb5cee92fede40ef76f2236f93be06856d2 Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Thu, 29 Sep 2016 08:27:30 +0200 Subject: [PATCH 3/3] Bump Mina core to 2.0.16 and sshd to 1.4 This release moves to Java 8 and fixes various bugs. See the sshd-core release notes [1] and mina-project page [2] for details. [1] https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310849&version=12338322 [2] https://mina.apache.org/mina-project/ Change-Id: I5df8540fa96f91126ccd45446a070f2000436b15 --- WORKSPACE | 8 ++++---- .../java/com/google/gerrit/pgm/init/InitSshd.java | 2 +- .../java/com/google/gerrit/sshd/HostKeyProvider.java | 6 +++--- .../main/java/com/google/gerrit/sshd/SshDaemon.java | 8 ++++---- lib/mina/BUCK | 12 ++++++------ 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index d465b3745a..d4c173389b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -488,14 +488,14 @@ maven_jar( maven_jar( name = 'sshd', - artifact = 'org.apache.sshd:sshd-core:1.2.0', - sha1 = '4bc24a8228ba83dac832680366cf219da71dae8e', + artifact = 'org.apache.sshd:sshd-core:1.4.0', + sha1 = 'c8f3d7457fc9979d1b9ec319f0229b89793c8e56', ) maven_jar( name = 'mina_core', - artifact = 'org.apache.mina:mina-core:2.0.10', - sha1 = 'a1cb1136b104219d6238de886bf5a3ea4554eb58', + artifact = 'org.apache.mina:mina-core:2.0.16', + sha1 = 'f720f17643eaa7b0fec07c1d7f6272972c02bba4', ) maven_jar( diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/InitSshd.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/InitSshd.java index cb4439acc9..4cdf3aae29 100644 --- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/InitSshd.java +++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/InitSshd.java @@ -27,7 +27,7 @@ import com.google.gerrit.server.util.SocketUtil; import com.google.inject.Inject; import com.google.inject.Singleton; -import org.apache.sshd.common.util.SecurityUtils; +import org.apache.sshd.common.util.security.SecurityUtils; import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider; import java.io.IOException; diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/HostKeyProvider.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/HostKeyProvider.java index 8190836e83..09fa42c1b0 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/HostKeyProvider.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/HostKeyProvider.java @@ -19,9 +19,9 @@ import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.ProvisionException; -import org.apache.sshd.common.keyprovider.AbstractFileKeyPairProvider; +import org.apache.sshd.common.keyprovider.FileKeyPairProvider; import org.apache.sshd.common.keyprovider.KeyPairProvider; -import org.apache.sshd.common.util.SecurityUtils; +import org.apache.sshd.common.util.security.SecurityUtils; import org.apache.sshd.server.keyprovider.SimpleGeneratorHostKeyProvider; import java.io.File; @@ -73,7 +73,7 @@ class HostKeyProvider implements Provider { throw new ProvisionException("Bouncy Castle Crypto not installed;" + " needed to read server host keys: " + stdKeys + ""); } - AbstractFileKeyPairProvider kp = SecurityUtils.createFileKeyPairProvider(); + FileKeyPairProvider kp = new FileKeyPairProvider(); kp.setFiles(stdKeys); return kp; } diff --git a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshDaemon.java b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshDaemon.java index d0f54e6b37..bd121eec39 100644 --- a/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshDaemon.java +++ b/gerrit-sshd/src/main/java/com/google/gerrit/sshd/SshDaemon.java @@ -65,10 +65,10 @@ import org.apache.sshd.common.random.Random; import org.apache.sshd.common.random.SingletonRandomFactory; import org.apache.sshd.common.session.ConnectionService; import org.apache.sshd.common.session.Session; -import org.apache.sshd.common.util.SecurityUtils; import org.apache.sshd.common.util.buffer.Buffer; import org.apache.sshd.common.util.buffer.ByteArrayBuffer; import org.apache.sshd.common.util.net.SshdSocketAddress; +import org.apache.sshd.common.util.security.SecurityUtils; import org.apache.sshd.server.Command; import org.apache.sshd.server.CommandFactory; import org.apache.sshd.server.ServerBuilder; @@ -693,12 +693,12 @@ public class SshDaemon extends SshServer implements SshInfo, LifecycleListener { private void initForwarding() { setTcpipForwardingFilter(new ForwardingFilter() { @Override - public boolean canForwardAgent(Session session) { + public boolean canForwardAgent(Session session, String requestType) { return false; } @Override - public boolean canForwardX11(Session session) { + public boolean canForwardX11(Session session, String requestType) { return false; } @@ -723,7 +723,7 @@ public class SshDaemon extends SshServer implements SshInfo, LifecycleListener { return new FileSystem() { @Override public void close() throws IOException { - } + } @Override public Iterable getFileStores() { diff --git a/lib/mina/BUCK b/lib/mina/BUCK index f22a710631..60e965556c 100644 --- a/lib/mina/BUCK +++ b/lib/mina/BUCK @@ -8,9 +8,9 @@ EXCLUDE = [ maven_jar( name = 'sshd', - id = 'org.apache.sshd:sshd-core:1.2.0', - sha1 = '4bc24a8228ba83dac832680366cf219da71dae8e', - src_sha1 = '490e3f03d7628ecf1cbb8317563fdbf06e68e29f', + id = 'org.apache.sshd:sshd-core:1.4.0', + sha1 = 'c8f3d7457fc9979d1b9ec319f0229b89793c8e56', + src_sha1 = '7dbe0edbd2362b58778bbed77407f2e0ded08fcd', license = 'Apache2.0', deps = [':core'], exclude = EXCLUDE, @@ -18,9 +18,9 @@ maven_jar( maven_jar( name = 'core', - id = 'org.apache.mina:mina-core:2.0.10', - sha1 = 'a1cb1136b104219d6238de886bf5a3ea4554eb58', - src_sha1 = 'b70ff94ba379b4e825caca1af4ec83193fac4b10', + id = 'org.apache.mina:mina-core:2.0.16', + sha1 = 'f720f17643eaa7b0fec07c1d7f6272972c02bba4', + src_sha1 = '660fb813ca1c8d8a936f894324091400a5ac128a', license = 'Apache2.0', exclude = EXCLUDE, )