Fix p4runtime runtime dependencies when building with Bazel

A convenient macro for packaging together all proto and gRPC libraries
in an OSGi jar is provided. Also re-packaging of gRPC core (to avoid OSGi
split problem) is simplified by depending on a patched fork of grpc-java.

Change-Id: Idb79a5bea8ae0bc57b146bda1fc47a4568d12c60
diff --git a/tools/build/bazel/p4lang_workspace.bzl b/tools/build/bazel/p4lang_workspace.bzl
index 24da166..abf4c5c 100644
--- a/tools/build/bazel/p4lang_workspace.bzl
+++ b/tools/build/bazel/p4lang_workspace.bzl
@@ -3,10 +3,14 @@
 P4RUNTIME_COMMIT = "028552d98b774301c51be0fe5bc97c9e95716759"
 PI_COMMIT = "36ca74fae69c8d0a142f8bfd2487bee72505cf48"
 
+P4RUNTIME_SHA = "f335573ea971c21a1a298954039a27881b7337a03f4523321b6458eb0558644a"
+PI_SHA = "767476cf9232dc39f0115d1ffc38f9b81acec74da078c048f278804f325bf77e"
+
 def generate_p4lang():
     http_archive(
         name = "com_github_p4lang_p4runtime",
         urls = ["https://github.com/p4lang/p4runtime/archive/%s.zip" % P4RUNTIME_COMMIT],
+        sha256 = P4RUNTIME_SHA,
         strip_prefix = "p4runtime-%s/proto" % P4RUNTIME_COMMIT,
         build_file = "//tools/build/bazel:p4runtime_BUILD"
     )
@@ -14,6 +18,7 @@
     http_archive(
         name = "com_github_p4lang_pi",
         urls = ["https://github.com/p4lang/PI/archive/%s.zip" % PI_COMMIT],
+        sha256 = PI_SHA,
         strip_prefix = "PI-%s/proto" % PI_COMMIT,
         build_file = "//tools/build/bazel:pi_BUILD"
     )