Merge changes from topic 'daemon-slave-mode-fixes' into stable-2.12

* changes:
  ChangeCleanupConfig: Allow canonical web URL to be null
  Daemon: Don't add change cleanup module when running as slave
  Daemon: Don't add index commands when running as slave
diff --git a/Documentation/dev-buck.txt b/Documentation/dev-buck.txt
index 10f3319..ec8515f 100644
--- a/Documentation/dev-buck.txt
+++ b/Documentation/dev-buck.txt
@@ -371,62 +371,6 @@
  )
 ----
 
-== Building against unpublished JARs, that change frequently
-
-If a dependent Gerrit library is undergoing active development it must be
-recompiled and the change must be reflected in the Buck build process. For
-example testing Gerrit against changed JGit snapshot version. After building
-JGit library, the artifacts are created in local Maven build directory, e. g.:
-
-----
-  mvn package
-  /home/<user>/projects/jgit/org.eclipse.jgit/target/org.eclipse.jgit-3.3.0-SNAPSHOT.jar
-  /home/<user>/projects/jgit/org.eclipse.jgit/target/org.eclipse.jgit-3.3.0-SNAPSHOT-sources.jar
-----
-
-If as usual, installation of the build artifacts takes place in local maven
-repository, then the Buck build must fetch them from there with normal
-`download_file.py` process. Disadvantage of this approach is that Buck cache
-invalidation must occur to refresh the artifacts after next
-change-compile-install round trip.
-
-To shorten that workflow and take the installation of the artifacts to the
-local Maven repository and fetching it again from there out of the picture,
-`local_jar()` method is used instead of `maven_jar()`:
-
-[source,python]
-----
- local_jar(
-   name = 'jgit',
-   jar = '/home/<user>/projects/jgit/org.eclipse.jgit/target/org.eclipse.jgit-3.3.0-SNAPSHOT.jar',
-   src = '/home/<user>/projects/jgit/org.eclipse.jgit/target/org.eclipse.jgit-3.3.0-SNAPSHOT-sources.jar',
-   deps = [':ewah']
- )
-----
-
-This creates a symlink to the Buck targets direct against artifacts in
-another project's Maven target directory:
-
-----
-  buck-out/gen/lib/jgit/jgit.jar ->
-  /home/<user>/projects/jgit/org.eclipse.jgit/target/org.eclipse.jgit-3.3.0-SNAPSHOT.jar
-----
-
-After `buck clean` and `buck build lib/jgit:jgit` the symbolic link that was
-created the first time is lost due to Buck's caching mechanism. This means that
-when a new version of the local artifact is deployed (by running `mvn package`
-in the JGit project in the example above), Buck is not aware of it, because it
-still has a stale version of it in its cache.
-
-To solve this problem and re-create the symbolic link, you don't need to wipe out
-the entire Buck cache. Just rebuilding the target with the `--no-cache` option
-does the job:
-
-----
-  buck clean
-  buck build --no-cache lib/jgit:jgit
-----
-
 == Building against artifacts from custom Maven repositories
 
 To build against custom Maven repositories, two modes of operations are
diff --git a/lib/local.defs b/lib/local.defs
deleted file mode 100644
index 6eec581..0000000
--- a/lib/local.defs
+++ /dev/null
@@ -1,33 +0,0 @@
-def local_jar(
-    name,
-    jar,
-    src = None,
-    deps = [],
-    visibility = ['PUBLIC']):
-  binjar = name + '.jar'
-  srcjar = name + '-src.jar'
-  genrule(
-    name = '%s__local_bin' % name,
-    cmd = 'ln -s %s $OUT' % jar,
-    out = binjar)
-  if src:
-    genrule(
-      name = '%s__local_src' % name,
-      cmd = 'ln -s %s $OUT' % src,
-      out = srcjar)
-    prebuilt_jar(
-      name = '%s_src' % name,
-      binary_jar = ':%s__local_src' % name,
-      visibility = visibility,
-    )
-  else:
-    srcjar = None
-
-  prebuilt_jar(
-    name = name,
-    deps = deps,
-    binary_jar = ':%s__local_bin' % name,
-    source_jar = ':%s__local_src' % name if srcjar else None,
-    visibility = visibility,
- )
-
diff --git a/lib/maven.defs b/lib/maven.defs
index a16fda1..5c29bed 100644
--- a/lib/maven.defs
+++ b/lib/maven.defs
@@ -12,8 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-include_defs('//lib/local.defs')
-
 GERRIT = 'GERRIT:'
 GERRIT_API = 'GERRIT_API:'
 MAVEN_CENTRAL = 'MAVEN_CENTRAL:'