Implement rules archive release artifact in github action. (#1501)

* Implement rules archive release artifact in github action.

* Remove distro package and dependencies
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index 715df0c..bd4dbab 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -116,8 +116,9 @@
         run: |
           # Update urls and sha256 values
           bazel ${BAZEL_STARTUP_FLAGS[@]}  run //crate_universe/tools/urls_generator -- --artifacts-dir="${ARTIFACTS_DIR}" --url-prefix="${URL_PREFIX}"
-          # Publish to a known location
-          bazel ${BAZEL_STARTUP_FLAGS[@]}  run //distro:publish -- ${{ github.workspace }}/.github
+          bazel clean
+          # Build an archive of the repo contents
+          tar -czf ${{ github.workspace }}/.github/rules_rust.tar.gz --exclude=".git" --exclude=".github" --exclude="examples" -C ${{ github.workspace }} .
           # Save the sha256 checksum of the distro archive to the environment
           sha256="$(shasum --algorithm 256 ${{ github.workspace }}/.github/rules_rust.tar.gz | awk '{ print $1 }')"
           echo "ARCHIVE_SHA256=${sha256}" >> $GITHUB_ENV
diff --git a/BUILD.bazel b/BUILD.bazel
index d4cbb9a..69e43c7 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -11,25 +11,6 @@
     visibility = ["//visibility:public"],
 )
 
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "//bindgen:distro",
-        "//cargo:distro",
-        "//crate_universe:distro",
-        "//proto:distro",
-        "//rust:distro",
-        "//tools:distro",
-        "//util:distro",
-        "//wasm_bindgen:distro",
-        "BUILD.bazel",
-        "README.md",
-        "LICENSE.txt",
-        "WORKSPACE.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
-
 # This setting may be changed from the command line to generate machine readable errors.
 error_format(
     name = "error_format",
diff --git a/WORKSPACE.bazel b/WORKSPACE.bazel
index 2bc17ba..6c3f851 100644
--- a/WORKSPACE.bazel
+++ b/WORKSPACE.bazel
@@ -59,16 +59,3 @@
 #
 # load("@bazelci_rules//:rbe_repo.bzl", "rbe_preconfig")
 # rbe_preconfig(name = "buildkite_config", toolchain = "ubuntu1604-bazel-java8")
-
-http_archive(
-    name = "rules_pkg",
-    sha256 = "62eeb544ff1ef41d786e329e1536c1d541bb9bcad27ae984d57f18f314018e66",
-    urls = [
-        "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz",
-        "https://github.com/bazelbuild/rules_pkg/releases/download/0.6.0/rules_pkg-0.6.0.tar.gz",
-    ],
-)
-
-load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
-
-rules_pkg_dependencies()
diff --git a/bindgen/3rdparty/BUILD.bazel b/bindgen/3rdparty/BUILD.bazel
index 7e169ee..2317ac9 100644
--- a/bindgen/3rdparty/BUILD.bazel
+++ b/bindgen/3rdparty/BUILD.bazel
@@ -50,15 +50,3 @@
     ],
     visibility = ["//bindgen:__pkg__"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.bzl",
-        "*.bazel",
-    ]) + [
-        "//bindgen/3rdparty/crates:srcs",
-        "Cargo.Bazel.lock",
-    ],
-    visibility = ["//bindgen:__pkg__"],
-)
diff --git a/bindgen/BUILD.bazel b/bindgen/BUILD.bazel
index c0872af..bb93162 100644
--- a/bindgen/BUILD.bazel
+++ b/bindgen/BUILD.bazel
@@ -23,15 +23,6 @@
     ],
 )
 
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "//bindgen/3rdparty:distro",
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
-
 rust_bindgen_toolchain(
     name = "default_bindgen_toolchain_impl",
     bindgen = "//bindgen/3rdparty:bindgen",
diff --git a/cargo/BUILD.bazel b/cargo/BUILD.bazel
index 181219b..6c21ee1 100644
--- a/cargo/BUILD.bazel
+++ b/cargo/BUILD.bazel
@@ -7,14 +7,3 @@
     srcs = glob(["**/*.bzl"]),
     deps = ["//cargo/private:bzl_lib"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "//cargo/bootstrap:distro",
-        "//cargo/cargo_build_script_runner:distro",
-        "//cargo/private:distro",
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/cargo/bootstrap/BUILD.bazel b/cargo/bootstrap/BUILD.bazel
index 3a7d242..4d804cc 100644
--- a/cargo/bootstrap/BUILD.bazel
+++ b/cargo/bootstrap/BUILD.bazel
@@ -19,12 +19,3 @@
         "RULES_RUST_CARGO_BOOTSTRAP_BINARY": "$(rootpath bootstrap_installer.rs)",
     },
 )
-
-filegroup(
-    name = "distro",
-    srcs = [
-        "BUILD.bazel",
-        "bootstrap_installer.rs",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/cargo/cargo_build_script_runner/BUILD.bazel b/cargo/cargo_build_script_runner/BUILD.bazel
index bf72b2a..81e3256 100644
--- a/cargo/cargo_build_script_runner/BUILD.bazel
+++ b/cargo/cargo_build_script_runner/BUILD.bazel
@@ -26,11 +26,3 @@
     edition = "2018",
     deps = [":cargo_build_script_runner"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob(["*.rs"]) + [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/cargo/private/BUILD.bazel b/cargo/private/BUILD.bazel
index b81e3a1..6a1aab6 100644
--- a/cargo/private/BUILD.bazel
+++ b/cargo/private/BUILD.bazel
@@ -5,11 +5,3 @@
     srcs = glob(["**/*.bzl"]),
     visibility = ["//:__subpackages__"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/crate_universe/3rdparty/BUILD.bazel b/crate_universe/3rdparty/BUILD.bazel
index fc021f3..bec71cd 100644
--- a/crate_universe/3rdparty/BUILD.bazel
+++ b/crate_universe/3rdparty/BUILD.bazel
@@ -36,18 +36,6 @@
 )
 
 filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.bzl",
-        "*.bazel",
-    ]) + [
-        "Cargo.Bazel.lock",
-        "cargo-bazel-lock.json",
-        "//crate_universe/3rdparty/crates:srcs",
-    ],
-)
-
-filegroup(
     name = "bzl_srcs",
     srcs = glob(["*.bzl"]) + [
         "//crate_universe/3rdparty/crates:crates.bzl",
diff --git a/crate_universe/BUILD.bazel b/crate_universe/BUILD.bazel
index 10ad57c..a99a90c 100644
--- a/crate_universe/BUILD.bazel
+++ b/crate_universe/BUILD.bazel
@@ -14,21 +14,6 @@
 )
 
 filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        ":rust_srcs",
-        "//crate_universe/3rdparty:distro",
-        "//crate_universe/private:distro",
-        "//crate_universe/tools:distro",
-        "BUILD.bazel",
-        "Cargo.lock",
-        "Cargo.toml",
-        "README.md",
-    ],
-    visibility = ["//:__subpackages__"],
-)
-
-filegroup(
     name = "bzl_srcs",
     srcs = glob(["*.bzl"]) + [
         "//crate_universe/3rdparty:bzl_srcs",
diff --git a/crate_universe/private/BUILD.bazel b/crate_universe/private/BUILD.bazel
index 39f0969..0b41b53 100644
--- a/crate_universe/private/BUILD.bazel
+++ b/crate_universe/private/BUILD.bazel
@@ -14,11 +14,3 @@
     name = "bzl_srcs",
     srcs = glob(["*.bzl"]),
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "BUILD.bazel",
-        "//crate_universe/private/vendor:distro",
-    ],
-)
diff --git a/crate_universe/private/vendor/BUILD.bazel b/crate_universe/private/vendor/BUILD.bazel
index 3c02387..04726cd 100644
--- a/crate_universe/private/vendor/BUILD.bazel
+++ b/crate_universe/private/vendor/BUILD.bazel
@@ -1,11 +1,3 @@
 load("//crate_universe/private:vendor_utils.bzl", "crates_vendor_deps_targets")
 
 crates_vendor_deps_targets()
-
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "BUILD.bazel",
-    ],
-    visibility = ["//crate_universe/private:__subpackages__"],
-)
diff --git a/crate_universe/tools/BUILD.bazel b/crate_universe/tools/BUILD.bazel
index 0536794..1677d9e 100644
--- a/crate_universe/tools/BUILD.bazel
+++ b/crate_universe/tools/BUILD.bazel
@@ -1,14 +1,4 @@
 filegroup(
-    name = "distro",
-    srcs = [
-        "BUILD.bazel",
-        "//crate_universe/tools/cross_installer:distro",
-        "//crate_universe/tools/urls_generator:distro",
-    ],
-    visibility = ["//crate_universe:__subpackages__"],
-)
-
-filegroup(
     name = "bzl_srcs",
     srcs = [
         "//crate_universe/tools/cross_installer:bzl_srcs",
diff --git a/crate_universe/tools/cross_installer/BUILD.bazel b/crate_universe/tools/cross_installer/BUILD.bazel
index eb96aee..d436f8a 100644
--- a/crate_universe/tools/cross_installer/BUILD.bazel
+++ b/crate_universe/tools/cross_installer/BUILD.bazel
@@ -29,18 +29,6 @@
 cross_binary(name = "cross")
 
 filegroup(
-    name = "distro",
-    srcs = glob([
-        "**/*.rs",
-        "**/*.toml",
-    ]) + [
-        "BUILD.bazel",
-        "cross_installer_deps.bzl",
-    ],
-    visibility = ["//crate_universe/tools:__pkg__"],
-)
-
-filegroup(
     name = "bzl_srcs",
     srcs = glob(["**/*.bzl"]),
     visibility = ["//crate_universe/tools:__pkg__"],
diff --git a/crate_universe/tools/urls_generator/BUILD.bazel b/crate_universe/tools/urls_generator/BUILD.bazel
index 4423011..2d536d9 100644
--- a/crate_universe/tools/urls_generator/BUILD.bazel
+++ b/crate_universe/tools/urls_generator/BUILD.bazel
@@ -6,17 +6,6 @@
     visibility = ["//visibility:public"],
 )
 
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "**/*.rs",
-    ]) + [
-        "BUILD.bazel",
-        "Cargo.toml",
-    ],
-    visibility = ["//crate_universe/tools:__pkg__"],
-)
-
 rust_binary(
     name = "urls_generator",
     srcs = glob(["src/**/*.rs"]),
diff --git a/distro/BUILD.bazel b/distro/BUILD.bazel
deleted file mode 100644
index 777446c..0000000
--- a/distro/BUILD.bazel
+++ /dev/null
@@ -1,33 +0,0 @@
-load("@rules_pkg//:pkg.bzl", "pkg_tar")
-
-pkg_tar(
-    name = "rules_rust",
-    srcs = ["//:distro"],
-    extension = "tar.gz",
-    mode = "0444",
-    # Make it owned by root so it does not have the uid of the CI robot.
-    owner = "0.0",
-    package_dir = ".",
-    strip_prefix = ".",
-    visibility = ["//:__subpackages__"],
-)
-
-# This filegroup allows the tar file to appear in runfiles
-# https://github.com/bazelbuild/bazel/issues/12348
-filegroup(
-    name = "distro",
-    srcs = [":rules_rust"],
-    visibility = ["//:__subpackages__"],
-)
-
-sh_binary(
-    name = "publish",
-    srcs = ["publisher.sh"],
-    data = [":distro"],
-    env = {"ARCHIVE": "$(rootpath :distro)"},
-    target_compatible_with = select({
-        "@platforms//os:linux": [],
-        "@platforms//os:macos": [],
-        "//conditions:default": ["@platforms//:incompatible"],
-    }),
-)
diff --git a/distro/publisher.sh b/distro/publisher.sh
deleted file mode 100755
index 5f6a01e..0000000
--- a/distro/publisher.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-set -euo pipefail
-
-ABS_ARCHIVE="$(pwd)/${ARCHIVE}"
-cd "${BUILD_WORKING_DIRECTORY}"
-mkdir -p "$@"
-
-set -x
-cp -fp "${ABS_ARCHIVE}" "$@"/"$(basename "${ARCHIVE}")"
diff --git a/proto/3rdparty/BUILD.bazel b/proto/3rdparty/BUILD.bazel
index 4bbcd71..cb1e2a7 100644
--- a/proto/3rdparty/BUILD.bazel
+++ b/proto/3rdparty/BUILD.bazel
@@ -65,16 +65,3 @@
     ],
     visibility = ["//proto:__pkg__"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.bzl",
-        "*.bazel",
-    ]) + [
-        "//proto/3rdparty/patches:distro",
-        "//proto/3rdparty/crates:srcs",
-        "Cargo.Bazel.lock",
-    ],
-    visibility = ["//proto:__pkg__"],
-)
diff --git a/proto/3rdparty/patches/BUILD.bazel b/proto/3rdparty/patches/BUILD.bazel
index d1eb637..fb662c8 100644
--- a/proto/3rdparty/patches/BUILD.bazel
+++ b/proto/3rdparty/patches/BUILD.bazel
@@ -3,14 +3,3 @@
 exports_files([
     "com_google_protobuf-v3.10.0-bzl_visibility.patch",
 ])
-
-filegroup(
-    name = "distro",
-    srcs = [
-        "BUILD.bazel",
-        "README.md",
-    ] + glob([
-        "*.patch",
-    ]),
-    visibility = ["//:__subpackages__"],
-)
diff --git a/proto/BUILD.bazel b/proto/BUILD.bazel
index 3a33024..298c615 100644
--- a/proto/BUILD.bazel
+++ b/proto/BUILD.bazel
@@ -14,19 +14,6 @@
     actual = "//proto/3rdparty/crates:grpc-compiler__protoc-gen-rust-grpc",
 )
 
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.bzl",
-        "*.rs",
-    ]) + [
-        "//proto/raze:distro",
-        "//proto/3rdparty:distro",
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
-
 toolchain_type(
     name = "toolchain_type",
 )
diff --git a/proto/raze/BUILD.bazel b/proto/raze/BUILD.bazel
index 65ae167..42a33d1 100644
--- a/proto/raze/BUILD.bazel
+++ b/proto/raze/BUILD.bazel
@@ -63,9 +63,3 @@
         "manual",
     ],
 )
-
-filegroup(
-    name = "distro",
-    srcs = ["BUILD.bazel"],
-    visibility = ["//proto:__pkg__"],
-)
diff --git a/rust/BUILD.bazel b/rust/BUILD.bazel
index f9c7368..f4edbd8 100644
--- a/rust/BUILD.bazel
+++ b/rust/BUILD.bazel
@@ -29,16 +29,3 @@
         "//rust/settings:bzl_lib",
     ],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "//rust/platform:distro",
-        "//rust/private:distro",
-        "//rust/settings:distro",
-        "//rust/rust_analyzer:distro",
-        "//rust/toolchain:distro",
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/rust/platform/BUILD.bazel b/rust/platform/BUILD.bazel
index 79dd9d6..56ed346 100644
--- a/rust/platform/BUILD.bazel
+++ b/rust/platform/BUILD.bazel
@@ -17,14 +17,3 @@
     srcs = glob(["**/*.bzl"]),
     visibility = ["//rust:__subpackages__"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "//rust/platform/channel:distro",
-        "//rust/platform/cpu:distro",
-        "//rust/platform/os:distro",
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/rust/platform/channel/BUILD.bazel b/rust/platform/channel/BUILD.bazel
index d097d42..84fc8c7 100644
--- a/rust/platform/channel/BUILD.bazel
+++ b/rust/platform/channel/BUILD.bazel
@@ -20,11 +20,3 @@
     name = "stable",
     constraint_setting = ":channel",
 )
-
-filegroup(
-    name = "distro",
-    srcs = [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/rust/platform/cpu/BUILD.bazel b/rust/platform/cpu/BUILD.bazel
index 36e026a..476f8cf 100644
--- a/rust/platform/cpu/BUILD.bazel
+++ b/rust/platform/cpu/BUILD.bazel
@@ -3,11 +3,3 @@
     constraint_setting = "@platforms//cpu",
     visibility = ["//visibility:public"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/rust/platform/os/BUILD.bazel b/rust/platform/os/BUILD.bazel
index 5c2d48a..7692abe 100644
--- a/rust/platform/os/BUILD.bazel
+++ b/rust/platform/os/BUILD.bazel
@@ -9,11 +9,3 @@
     constraint_setting = "@platforms//os",
     visibility = ["//visibility:public"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/rust/private/BUILD.bazel b/rust/private/BUILD.bazel
index 40f4a69..d175b28 100644
--- a/rust/private/BUILD.bazel
+++ b/rust/private/BUILD.bazel
@@ -10,15 +10,6 @@
     deps = ["//rust/platform:bzl_lib"],
 )
 
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "//rust/private/dummy_cc_toolchain:distro",
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
-
 stamp_build_setting(name = "stamp")
 
 rust_analyzer_detect_sysroot(
diff --git a/rust/private/dummy_cc_toolchain/BUILD.bazel b/rust/private/dummy_cc_toolchain/BUILD.bazel
index 140c8f2..004d233 100644
--- a/rust/private/dummy_cc_toolchain/BUILD.bazel
+++ b/rust/private/dummy_cc_toolchain/BUILD.bazel
@@ -11,11 +11,3 @@
     toolchain = ":dummy_cc_wasm32",
     toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/rust/rust_analyzer/BUILD.bazel b/rust/rust_analyzer/BUILD.bazel
index 2b9f2bf..04e6c60 100644
--- a/rust/rust_analyzer/BUILD.bazel
+++ b/rust/rust_analyzer/BUILD.bazel
@@ -3,11 +3,3 @@
 toolchain_type(
     name = "toolchain_type",
 )
-
-filegroup(
-    name = "distro",
-    srcs = [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/rust/settings/BUILD.bazel b/rust/settings/BUILD.bazel
index c5928a1..ffdba06 100644
--- a/rust/settings/BUILD.bazel
+++ b/rust/settings/BUILD.bazel
@@ -41,11 +41,3 @@
     name = "bzl_lib",
     srcs = glob(["**/*.bzl"]),
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/rust/toolchain/BUILD.bazel b/rust/toolchain/BUILD.bazel
index debac40..766f1e5 100644
--- a/rust/toolchain/BUILD.bazel
+++ b/rust/toolchain/BUILD.bazel
@@ -40,11 +40,3 @@
 current_rust_toolchain(
     name = "current_rust_toolchain",
 )
-
-filegroup(
-    name = "distro",
-    srcs = [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel
index f25df3c..e69de29 100644
--- a/tools/BUILD.bazel
+++ b/tools/BUILD.bazel
@@ -1,13 +0,0 @@
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "BUILD.bazel",
-        "//tools/allowlists/function_transition_allowlist:distro",
-        "//tools/clippy:distro",
-        "//tools/runfiles:distro",
-        "//tools/rust_analyzer:distro",
-        "//tools/rustdoc:distro",
-        "//tools/rustfmt:distro",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/tools/allowlists/function_transition_allowlist/BUILD.bazel b/tools/allowlists/function_transition_allowlist/BUILD.bazel
index e490615..9fdee4b 100644
--- a/tools/allowlists/function_transition_allowlist/BUILD.bazel
+++ b/tools/allowlists/function_transition_allowlist/BUILD.bazel
@@ -2,11 +2,3 @@
     name = "function_transition_allowlist",
     packages = ["//..."],
 )
-
-filegroup(
-    name = "distro",
-    srcs = [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/tools/clippy/BUILD.bazel b/tools/clippy/BUILD.bazel
index fb386e3..09e246f 100644
--- a/tools/clippy/BUILD.bazel
+++ b/tools/clippy/BUILD.bazel
@@ -1,10 +1 @@
 exports_files(["clippy.toml"])
-
-filegroup(
-    name = "distro",
-    srcs = [
-        "BUILD.bazel",
-        "clippy.toml",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/tools/runfiles/BUILD.bazel b/tools/runfiles/BUILD.bazel
index 6e7b802..aa3414d 100644
--- a/tools/runfiles/BUILD.bazel
+++ b/tools/runfiles/BUILD.bazel
@@ -22,14 +22,3 @@
     name = "runfiles_doc_test",
     crate = ":runfiles",
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "data/**",
-        "**/*.rs",
-    ]) + [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/tools/rust_analyzer/3rdparty/BUILD.bazel b/tools/rust_analyzer/3rdparty/BUILD.bazel
index 37f4b18..b642169 100644
--- a/tools/rust_analyzer/3rdparty/BUILD.bazel
+++ b/tools/rust_analyzer/3rdparty/BUILD.bazel
@@ -45,15 +45,3 @@
     ],
     visibility = ["//tools/rust_analyzer:__pkg__"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.bzl",
-        "*.bazel",
-    ]) + [
-        "Cargo.Bazel.lock",
-        "//tools/rust_analyzer/3rdparty/crates:srcs",
-    ],
-    visibility = ["//tools/rust_analyzer:__pkg__"],
-)
diff --git a/tools/rust_analyzer/BUILD.bazel b/tools/rust_analyzer/BUILD.bazel
index 5de795c..54f5436 100644
--- a/tools/rust_analyzer/BUILD.bazel
+++ b/tools/rust_analyzer/BUILD.bazel
@@ -62,15 +62,3 @@
     visibility = ["//visibility:public"],
     deps = ["//tools/rust_analyzer/3rdparty:bzl_lib"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.bzl",
-        "**/*.rs",
-    ]) + [
-        "//tools/rust_analyzer/3rdparty:distro",
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/tools/rustdoc/BUILD.bazel b/tools/rustdoc/BUILD.bazel
index 7a79e44..f941759 100644
--- a/tools/rustdoc/BUILD.bazel
+++ b/tools/rustdoc/BUILD.bazel
@@ -10,13 +10,3 @@
         "//tools/runfiles",
     ],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "**/*.rs",
-    ]) + [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/tools/rustfmt/BUILD.bazel b/tools/rustfmt/BUILD.bazel
index ee1631a..1721301 100644
--- a/tools/rustfmt/BUILD.bazel
+++ b/tools/rustfmt/BUILD.bazel
@@ -76,15 +76,3 @@
         ":rustfmt",
     ],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.bzl",
-        "**/*.rs",
-    ]) + [
-        "rustfmt.toml",
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/util/BUILD.bazel b/util/BUILD.bazel
index 8e43dea..8502870 100644
--- a/util/BUILD.bazel
+++ b/util/BUILD.bazel
@@ -9,19 +9,3 @@
     srcs = ["collect_coverage.sh"],
     visibility = ["//visibility:public"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.txt",
-    ]) + [
-        "BUILD.bazel",
-        "fetch_shas.sh",
-        ":collect_coverage",
-        "//util/dir_zipper:distro",
-        "//util/import:distro",
-        "//util/label:distro",
-        "//util/process_wrapper:distro",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/util/dir_zipper/BUILD.bazel b/util/dir_zipper/BUILD.bazel
index 17b2251..43ab79e 100644
--- a/util/dir_zipper/BUILD.bazel
+++ b/util/dir_zipper/BUILD.bazel
@@ -6,11 +6,3 @@
     edition = "2018",
     visibility = ["//visibility:public"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob(["*.rs"]) + [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/util/import/3rdparty/BUILD.bazel b/util/import/3rdparty/BUILD.bazel
index 1a41d86..cb29b20 100644
--- a/util/import/3rdparty/BUILD.bazel
+++ b/util/import/3rdparty/BUILD.bazel
@@ -38,15 +38,3 @@
     ],
     visibility = ["//util/import:__pkg__"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.bzl",
-        "*.bazel",
-    ]) + [
-        "//util/import/3rdparty/crates:srcs",
-        "Cargo.Bazel.lock",
-    ],
-    visibility = ["//util/import:__pkg__"],
-)
diff --git a/util/import/BUILD.bazel b/util/import/BUILD.bazel
index d2290bc..898a82f 100644
--- a/util/import/BUILD.bazel
+++ b/util/import/BUILD.bazel
@@ -75,16 +75,3 @@
     name = "fake_import_macro_impl",
     srcs = ["fake_import_macro_impl.cc"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.bzl",
-        "**/*.rs",
-        "**/*.cc",
-    ]) + [
-        "//util/import/3rdparty:distro",
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/util/label/BUILD.bazel b/util/label/BUILD.bazel
index 46f60db..405006d 100644
--- a/util/label/BUILD.bazel
+++ b/util/label/BUILD.bazel
@@ -14,13 +14,3 @@
     name = "label_test",
     crate = ":label",
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "**/*.rs",
-    ]) + [
-        "BUILD.bazel",
-    ],
-    visibility = ["//:__subpackages__"],
-)
diff --git a/util/process_wrapper/BUILD.bazel b/util/process_wrapper/BUILD.bazel
index 67c7119..c5276dd 100644
--- a/util/process_wrapper/BUILD.bazel
+++ b/util/process_wrapper/BUILD.bazel
@@ -18,13 +18,3 @@
     crate = ":process_wrapper",
     edition = "2018",
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "**/*.bazel",
-        "**/*.cc",
-        "**/*.rs",
-    ]),
-    visibility = ["//:__subpackages__"],
-)
diff --git a/wasm_bindgen/3rdparty/BUILD.bazel b/wasm_bindgen/3rdparty/BUILD.bazel
index e23fe87..16a627f 100644
--- a/wasm_bindgen/3rdparty/BUILD.bazel
+++ b/wasm_bindgen/3rdparty/BUILD.bazel
@@ -81,15 +81,3 @@
     ],
     visibility = ["//wasm_bindgen:__pkg__"],
 )
-
-filegroup(
-    name = "distro",
-    srcs = glob([
-        "*.bzl",
-        "*.bazel",
-    ]) + [
-        "//wasm_bindgen/3rdparty/crates:srcs",
-        "Cargo.Bazel.lock",
-    ],
-    visibility = ["//wasm_bindgen:__pkg__"],
-)
diff --git a/wasm_bindgen/BUILD.bazel b/wasm_bindgen/BUILD.bazel
index 4ad36b0..1c5dade 100644
--- a/wasm_bindgen/BUILD.bazel
+++ b/wasm_bindgen/BUILD.bazel
@@ -23,15 +23,6 @@
     ],
 )
 
-filegroup(
-    name = "distro",
-    srcs = glob(["*.bzl"]) + [
-        "BUILD.bazel",
-        "//wasm_bindgen/3rdparty:distro",
-    ],
-    visibility = ["//:__subpackages__"],
-)
-
 rust_wasm_bindgen_toolchain(
     name = "default_wasm_bindgen_toolchain_impl",
     bindgen = "@rules_rust//wasm_bindgen/3rdparty:wasm_bindgen_cli",