[Bazel] Fix broken build rules or mark them manual (#9913)

* Fix filename for unittest_gen_import.proto.

* Add 'manual' tags to jvm_export rules so they aren't selected by wildcard

* Run buildifier
diff --git a/BUILD.bazel b/BUILD.bazel
index 86cc1ce..cc623aa 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -801,10 +801,13 @@
         "src/google/protobuf/**/*",
         # Files for csharp_bootstrap_unittest.cc.
         "conformance/**/*",
-    ]) + glob([
-        # Files for csharp_bootstrap_unittest.cc.
-        "csharp/src/**/*",
-    ], allow_empty=True),
+    ]) + glob(
+        [
+            # Files for csharp_bootstrap_unittest.cc.
+            "csharp/src/**/*",
+        ],
+        allow_empty = True,
+    ),
     includes = [
         "src/",
     ],
@@ -1020,10 +1023,6 @@
 
 py_library(
     name = "protobuf_python",
-    deps = [
-        ":well_known_types_py_pb2",
-        ":python_srcs",
-    ],
     data = select({
         "//conditions:default": [],
         ":use_fast_cpp_protos": [
@@ -1031,6 +1030,10 @@
             ":python/google/protobuf/pyext/_message.so",
         ],
     }),
+    deps = [
+        ":python_srcs",
+        ":well_known_types_py_pb2",
+    ],
 )
 
 # Copy the test proto files from src/google/protobuf to
@@ -1058,8 +1061,8 @@
     default_runtime = "",
     protoc = ":protoc",
     srcs_version = "PY2AND3",
-    deps = [":well_known_types_py_pb2"],
     visibility = ["//visibility:public"],
+    deps = [":well_known_types_py_pb2"],
 )
 
 py_proto_library(
@@ -1072,8 +1075,8 @@
     default_runtime = ":protobuf_python",
     protoc = ":protoc",
     srcs_version = "PY2AND3",
-    deps = [":python_common_test_protos"],
     visibility = ["//visibility:public"],
+    deps = [":python_common_test_protos"],
 )
 
 py_library(
@@ -1139,12 +1142,14 @@
 alias(
     name = "objectivec",
     actual = "//objectivec",
+    tags = ["manual"],
     visibility = ["//visibility:public"],
 )
 
 alias(
     name = "protobuf_objc",
     actual = "//objectivec",
+    tags = ["manual"],
     visibility = ["//visibility:public"],
 )
 
@@ -1155,7 +1160,7 @@
 genrule(
     name = "generated_protos",
     srcs = ["src/google/protobuf/unittest_import.proto"],
-    outs = ["unittest_gen.proto"],
+    outs = ["unittest_gen_import.proto"],
     cmd = "cat $(SRCS) | sed 's|google/|src/google/|' >  $(OUTS)",
 )
 
@@ -1474,28 +1479,31 @@
 # Files included in all source distributions
 pkg_files(
     name = "common_dist_files",
-    srcs = glob([
-        "*.bzl",
-        "cmake/*.cmake",
-        "cmake/*.in",
-        "editors/*",
+    srcs = glob(
+        [
+            "*.bzl",
+            "cmake/*.cmake",
+            "cmake/*.in",
+            "editors/*",
 
-        # Several of these files are generated by autogen.sh, so using
-        # glob() lets us ignore them if they are missing. (This is not good
-        # practice, though.)
-        "Makefile.in",
-        "aclocal.m4",
-        "ar-lib",
-        "compile",
-        "config*",
-        "depcomp",
-        "install-sh",
-        "ltmain.sh",
-        "m4/*.m4",
-        "missing",
-        "protobuf*.pc.in",
-        "test-driver",
-    ], allow_empty = True) + [
+            # Several of these files are generated by autogen.sh, so using
+            # glob() lets us ignore them if they are missing. (This is not good
+            # practice, though.)
+            "Makefile.in",
+            "aclocal.m4",
+            "ar-lib",
+            "compile",
+            "config*",
+            "depcomp",
+            "install-sh",
+            "ltmain.sh",
+            "m4/*.m4",
+            "missing",
+            "protobuf*.pc.in",
+            "test-driver",
+        ],
+        allow_empty = True,
+    ) + [
         "BUILD.bazel",
         "CHANGES.txt",
         "CMakeLists.txt",
diff --git a/java/core/BUILD.bazel b/java/core/BUILD.bazel
index 60be807..e36a38e 100644
--- a/java/core/BUILD.bazel
+++ b/java/core/BUILD.bazel
@@ -121,6 +121,7 @@
     resources = [
         "//:lite_well_known_protos",
     ],
+    tags = ["manual"],
     runtime_deps = [":lite"],
 )
 
@@ -156,6 +157,7 @@
     resources = [
         "//:well_known_protos",
     ],
+    tags = ["manual"],
     runtime_deps = [":core"],
 )
 
diff --git a/java/kotlin-lite/BUILD.bazel b/java/kotlin-lite/BUILD.bazel
index 47b02c2..09f0dec 100644
--- a/java/kotlin-lite/BUILD.bazel
+++ b/java/kotlin-lite/BUILD.bazel
@@ -37,6 +37,7 @@
     maven_coordinates = "com.google.protobuf:protobuf-kotlin-lite:%s" % PROTOBUF_JAVA_VERSION,
     pom_template = "//java/kotlin-lite:pom_template.xml",
     resources = ["//:well_known_protos"],
+    tags = ["manual"],
     runtime_deps = [
         ":lite_extensions",
         ":well_known_protos_kotlin_lite",
diff --git a/java/kotlin/BUILD.bazel b/java/kotlin/BUILD.bazel
index a3cf83d..859b86b 100644
--- a/java/kotlin/BUILD.bazel
+++ b/java/kotlin/BUILD.bazel
@@ -59,6 +59,7 @@
     maven_coordinates = "com.google.protobuf:protobuf-kotlin:%s" % PROTOBUF_JAVA_VERSION,
     pom_template = "//java/kotlin:pom_template.xml",
     resources = ["//:well_known_protos"],
+    tags = ["manual"],
     runtime_deps = [
         ":bytestring_lib",
         ":full_extensions",
diff --git a/java/util/BUILD.bazel b/java/util/BUILD.bazel
index bea3099..e3804fb 100644
--- a/java/util/BUILD.bazel
+++ b/java/util/BUILD.bazel
@@ -27,6 +27,7 @@
     deploy_env = ["//java/core"],
     maven_coordinates = "com.google.protobuf:protobuf-java-util:%s" % PROTOBUF_JAVA_VERSION,
     pom_template = "pom_template.xml",
+    tags = ["manual"],
     visibility = ["//java:__pkg__"],
     runtime_deps = [":util"],
 )