Reformat the Bazel build files with the buildifier tool [1].
The style is different for Bazel files. Most notably, indentation level
is 4 spaces instead of 2, and " is used instead of '.
[1] https://github.com/bazelbuild/buildifier
Change-Id: I95c0c6f11b6d76572797853b4ebb5cee5ebd3c98
* stable-2.12:
Set uploader for inline edit
Update 2.12.4 release notes
SshDaemon: Set up the session timeout to make sshd.idleTimeout work
Attach sources for sshd-core and mina-core
Change-Id: I651e8901f96646660790a7ef6a14275f6d94343c
To run the tests:
bazel test //...
To build the Gerrit plugin API, run:
bazel build gerrit-plugin-api:plugin-api_deploy.jar
To build the Gerrit extension API, run:
bazel build gerrit-extension-api:extension-api_deploy.jar
TODOs:
Licenses
Reduce visibility (all public for now)
Generate HTML Documentation
Core plugins
gerrit_plugin() rule to build plugins in tree and standalone modes
GWT UI (only gwt_module() skylark rule is provided, no gwt_binary())
PolyGerrit UI
WAR
Publish artifacts to Maven Central
Ask Bazel team to add Gerrit to their CI on ci.bazel.io
Contributed-By: Han-Wen Nienhuys <hanwen@google.com>
Change-Id: I9a86e670882a44a5c966579cdeb8ed79b1590de3
This version includes several bug fixes and improvements. See
the release note [1] for details.
Many packages have been renamed, and some classes removed.
FileKeyPairProvider was removed from the SSHD library, so we need to
borrow it from the previous release. We preserve the license, that is
the same as Gerrit Code Review, the header and the indentation.
Compilation warnings are fixed, mostly by adding missing @Override
annotations.
[1] https://issues.apache.org/jira/secure/ReleaseNote.jspa?version=12323302&styleName=Html&projectId=12310849
Change-Id: If047c3a279fc9c98a59ac3102b0db3f5f2fdae48
Build was failing with the following error message:
expected 8f4b6f7ebc54655dc7d25a77665cf51f2b1288b2
received 449ec11c4417b295dbf1661585a50c6ec7d9a452
Change-Id: I77f442694eb403aff50de00ec826724fdb570e70
Since there is no official 0.9.1 release of the SSHD yet, the
0.9.0-4-g5967cfd version was built from the 0.9.x branch and uploaded to
the Google cloud storage.
This change reverts the following Gerrit commits:
3d9c70c SSHD: Update to 0.13.0
52e4e0c Bump SSHD Mina version to 2.0.8
3921163 Don't use deprecated PGPPublicKeyRingCollection constructor
13452f4 Bump Bouncycastle version to 1.51
5f7d5a7 Update EncryptedContactStore to not use deprecated/removed methods
f69698c Update SSHD to 0.11.1-atlassian-1
67c38c8 Added global request handlers to SshDaemon
c31e17f Update sshd to 0.11.0
b9c66ea Bump SSHD version to 0.10.1 and enable nio2 backend
The reason for the downgrade (copied from the change 60161):
SSHD release 0.9 is known to be free from exhausting thread pool problem
[1]. Unfortunately 0.9 release suffers from sporadic handshake failures
[2]. The fix cannot be cleanly cherry-picked to 0.9 release. The back
port of this fix [3] is tracked under its own issue [4], was uploaded as
PR for SSHD Mina's GH repository [5] and merged recently [6].
Moreover, 0.9 suffers from "Authenticated with partial success" issue
[7]
that was fixed by [8], [9]; this patch must be applied as well.
This reverts commit dc7318b8eeda15732d4d2865fc5a7a0a68b3be15.
[1] https://issues.apache.org/jira/browse/SSHD-348
[2] https://issues.apache.org/jira/browse/SSHD-330
[3] https://git-wip-us.apache.org/repos/asf?p=mina-sshd.git;a=commit;\
h=2aed686bdb21681a421033c6ee5997e5cd8a9a83
[4] https://issues.apache.org/jira/browse/SSHD-356
[5] https://github.com/apache/mina-sshd/pull/7
[6] https://git-wip-us.apache.org/repos/asf?p=mina-sshd.git;a=commit;\
h=cc7162acf7ca89561ca57a9c68de735f17bf168b
[7] https://issues.apache.org/jira/browse/SSHD-254
[8] https://git-wip-us.apache.org/repos/asf?p=mina-sshd.git;a=commit;\
h=28a8ae258b08c6b41ab64ac25f2331168dc0415a
[9] https://gerrit-review.googlesource.com/51516
Change-Id: I889fb02c2cb1aa5df2cf8dcabace086f5094a914
Long standing exhausting thread pool SSHD bug was apparently fixed
upstream [1].
All Gerrit releases since 2.8.5 are known to suffer from this problem
with the consequence that Gerrit must be restarted overnight.
[1] https://issues.apache.org/jira/browse/SSHD-348
Change-Id: Ic52277050aa0cd19b19531ee997d312fd7273ebc
Use custom build of SSHD library from Atlassian's maven repository,
that fixes sporadic handshake failures [1].
[1] https://issues.apache.org/jira/browse/SSHD-330
Change-Id: I4258f515ac10e04c8c8f1850f060b9dbad6d876f
Fixes a few issues including a null pointer exception [1] that causes
ssh commands to hang.
It also adds server driven rekeying after 1G bytes of data transferred,
which is a useful security feature.
[1] https://issues.apache.org/jira/browse/SSHD-307
Change-Id: I441995eaf76e4fe53f7991f5aef00e062900791b
46f8488a78742799a4f5f781279c8955460e7964 removed nio2 backend because of
a bug [1]. Given that the bug is fixed and released, enable it again.
Another problem was also fixed and released [2].
Upgrade to the official version 0.10.1 makes Gerrit's own custom patch of
SSHD and hosting it on Google bucket unnecessary.
[1] https://issues.apache.org/jira/browse/SSHD-252
[2] https://issues.apache.org/jira/browse/SSHD-255
Bug: Issue 2406
Change-Id: I6668f6194427f153e1982e14b3936d2f3132fa7d
Implement a new build system using Buck[1], Facebook's
open source clone of Google's internal build system.
Pros:
- Concise build language
- Test and build output is concise
- Test failures and stack traces show on terminal
- Reliable incrementals; clean is unnecessary
- Extensible with simple blocks of Python
- Fast
buck: clean: 0.452s, full 1m21.083s [*], no-op: 7.145s,
mvn: clean: 4.596s, full 2m53.776s, no-op: 59.108s,
[*] full build includes downloading all dependencies,
time can vary due to remote server performance.
Cons:
- No Windows support
- No native Maven Central support (added by macros)
- No native GWT, Prolog, or WAR support (added by macros)
- Bootstrap of buck requires Ant
Getting started:
git clone https://gerrit.googlesource.com/buck
cd buck
ant
Mac OS X:
PATH="`pwd`/bin:/System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands:$PATH"
Linux:
PATH="`pwd`/bin:$PATH"
Importing into Eclipse:
$ time buck build :eclipse
0m48.949s
Import existing project from `pwd`
Import 'gerrit' (do not import other Maven based projects)
Expand 'gerrit'
Right click 'buck-out' > Properties
Under Attributes check 'Derived'
If the code doesn't currently compile but an updated classpath
is needed, refresh the configs and obtain missing JARs:
$ buck build :eclipse_project :download
Running JUnit tests:
$ time buck test --all -e slow # skip slow tests
0m19.320s
$ time buck test --all # includes acceptance tests
5m17.517s
Building WAR:
$ buck build :gerrit
$ java -jar buck-out/gen/gerrit.war
Building release:
$ buck test --all && buck build :api :release
$ java -jar buck-out/gen/release.war
$ ls -lh buck-out/gen/{extension,plugin}-api.jar
Downloading dependencies:
Dependencies are normally downloaded automatically, but Buck can
inspect its graph and download missing dependencies so future
compiles can run without the network:
$ buck build :download
[1] http://facebook.github.io/buck/
Change-Id: I40853b108bd8e153cefa0896a5280a9a5ff81655