From 7de244c3cdc78fb002b1b01b2806a1dc6bd5a1aa Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Tue, 28 Jan 2025 03:45:11 -0800 Subject: [PATCH] refactor: remove workspace (#767) --- .bazelrc | 3 - .github/workflows/ci.yaml | 5 ++ BUILD.bazel | 11 --- MODULE.bazel | 5 ++ README.md | 12 +-- WORKSPACE | 75 +--------------- WORKSPACE.bzlmod | 11 --- examples/BUILD.bazel | 12 --- examples/assert.bzl | 10 +-- examples/dockerfile/BUILD.bazel | 13 +-- examples/dockerfile/buildx.bzl | 44 +++------- examples/setup_assertion_repos.bzl | 65 +------------- fetch.bzl | 15 ++-- internal_deps.bzl | 70 --------------- tools/BUILD.bazel | 0 tools/_run_under_cwd.sh | 16 ++++ tools/buildx | 1 + tools/docker | 1 + tools/docker-compose | 1 + tools/jd | 1 + tools/multitool | 1 + tools/tools.lock.json | 134 +++++++++++++++++++++++++++++ 22 files changed, 198 insertions(+), 308 deletions(-) delete mode 100644 WORKSPACE.bzlmod delete mode 100644 internal_deps.bzl create mode 100644 tools/BUILD.bazel create mode 100755 tools/_run_under_cwd.sh create mode 120000 tools/buildx create mode 120000 tools/docker create mode 120000 tools/docker-compose create mode 120000 tools/jd create mode 120000 tools/multitool create mode 100644 tools/tools.lock.json diff --git a/.bazelrc b/.bazelrc index 3dd14587..a36455a9 100644 --- a/.bazelrc +++ b/.bazelrc @@ -6,9 +6,6 @@ build --incompatible_strict_action_env build --nolegacy_external_runfiles common --test_env=DOCKER_HOST --action_env=DOCKER_HOST --repo_env=DOCKER_HOST -# Disable bzlmod lockfile -common --lockfile_mode=off - # On bazel 6.4.0 these are needed to successfully fetch images. common:needs_credential_helpers --credential_helper=public.ecr.aws=%workspace%/examples/credential_helper/auth.sh common:needs_credential_helpers --credential_helper=index.docker.io=%workspace%/examples/credential_helper/auth.sh diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 69842126..54e5c537 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -74,12 +74,17 @@ jobs: folder: e2e/assertion - os: macos-13 bazelversion: 6.4.0 + - folder: . + bazelversion: 6.4.0 # e2e/assertion is bzlmod only but it has test for both cases. - folder: e2e/assertion bzlmodEnabled: false # TODO: fix - folder: e2e/wasm bzlmodEnabled: true + # Don't test the root module with WORKSPACE at all + - folder: . + bzlmodEnabled: false # Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it diff --git a/BUILD.bazel b/BUILD.bazel index 5ac2bb89..42b9fafb 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,5 +1,4 @@ load("@bazel_gazelle//:def.bzl", "gazelle", "gazelle_binary") -load("@bazel_skylib//:bzl_library.bzl", "bzl_library") gazelle_binary( name = "gazelle_bin", @@ -11,13 +10,3 @@ gazelle( name = "gazelle", gazelle = "gazelle_bin", ) - -bzl_library( - name = "internal_deps", - srcs = ["internal_deps.bzl"], - visibility = ["//visibility:public"], - deps = [ - "@bazel_tools//tools/build_defs/repo:http.bzl", - "@bazel_tools//tools/build_defs/repo:utils.bzl", - ], -) diff --git a/MODULE.bazel b/MODULE.bazel index 5b906517..6a454fe1 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -36,3 +36,8 @@ bazel_dep(name = "gazelle", version = "0.35.0", dev_dependency = True, repo_name bazel_dep(name = "bazel_skylib_gazelle_plugin", version = "1.4.1", dev_dependency = True) bazel_dep(name = "rules_multirun", version = "0.9.0", dev_dependency = True) bazel_dep(name = "stardoc", version = "0.6.2", dev_dependency = True, repo_name = "io_bazel_stardoc") +bazel_dep(name = "rules_multitool", version = "0.9.0", dev_dependency = True) + +multitool = use_extension("@rules_multitool//multitool:extension.bzl", "multitool", dev_dependency = True) +multitool.hub(lockfile = "//tools:tools.lock.json") +use_repo(multitool, "multitool") diff --git a/README.md b/README.md index d519ad12..2d7faa50 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,14 @@ _Need help?_ This ruleset has support provided by [Aspect Build](https://www.asp ## Comparison with rules_docker -This ruleset is not intended as a complete replacement for [rules_docker]! -Many use cases can be accomodated, and we know that many users have completely replaced rules*docker. -You can find a migration guide at . +This ruleset is not intended as a complete replacement for [rules_docker]. +Most use cases can be accomodated, and we know many users who have completely replaced rules_docker. However, some other use cases such as `container_run_and*\*` rules have no equivalent. +You might still decide to use rules_docker, and perhaps even volunteer to help maintain it. + +You can find a migration guide at . -[rules_docker] was largely unmaintained for 18 months, and as of October 2023 it has been archived. -See https://github.com/bazelbuild/rules_docker/discussions/2038. -You might still decide to use rules_docker, and perhaps even sign up as a maintainer so that it may be un-archived. +## Design We started from first principles and avoided some pitfalls we learned from rules_docker: diff --git a/WORKSPACE b/WORKSPACE index abfbd520..95cf3e27 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -1,55 +1,3 @@ -# Declare the local Bazel workspace. -# This is *not* included in the published distribution. -workspace(name = "rules_oci") - -# Fetch deps needed only locally for development -load(":internal_deps.bzl", "rules_oci_internal_deps") - -rules_oci_internal_deps() - -## Setup rules_oci -load("//oci:dependencies.bzl", "rules_oci_dependencies") - -rules_oci_dependencies() - -load("//oci:repositories.bzl", "oci_register_toolchains") - -oci_register_toolchains(name = "oci") - -# Transitive dep for rules_multirun -load("@rules_python//python:repositories.bzl", "py_repositories") - -py_repositories() - -## Setup bazel-lib -load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies", "aspect_bazel_lib_register_toolchains") - -aspect_bazel_lib_dependencies() - -aspect_bazel_lib_register_toolchains() - -## Setup cosign -load("//cosign:repositories.bzl", "cosign_register_toolchains") - -cosign_register_toolchains(name = "oci_cosign") - -## Setup skylib unittest -load("@bazel_skylib//lib:unittest.bzl", "register_unittest_toolchains") - -register_unittest_toolchains() - -## Setup rules_go -load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") - -go_rules_dependencies() - -go_register_toolchains(version = "1.20.5") - -## Setup gazelle -load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") - -gazelle_dependencies() - ## Setup test repositories load(":fetch.bzl", "fetch_images", "fetch_test_repos") @@ -57,24 +5,7 @@ fetch_images() fetch_test_repos() -############################################ -# Stardoc -load("@io_bazel_stardoc//:setup.bzl", "stardoc_repositories") - -stardoc_repositories() - -load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps") - -rules_jvm_external_deps() - -load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup") - -rules_jvm_external_setup() - -load("@io_bazel_stardoc//:deps.bzl", "stardoc_external_deps") - -stardoc_external_deps() - -load("@stardoc_maven//:defs.bzl", stardoc_pinned_maven_install = "pinned_maven_install") +### Setup rules_oci cosign +load("//cosign:repositories.bzl", "cosign_register_toolchains") -stardoc_pinned_maven_install() +cosign_register_toolchains(name = "oci_cosign") diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod deleted file mode 100644 index 95cf3e27..00000000 --- a/WORKSPACE.bzlmod +++ /dev/null @@ -1,11 +0,0 @@ -## Setup test repositories -load(":fetch.bzl", "fetch_images", "fetch_test_repos") - -fetch_images() - -fetch_test_repos() - -### Setup rules_oci cosign -load("//cosign:repositories.bzl", "cosign_register_toolchains") - -cosign_register_toolchains(name = "oci_cosign") diff --git a/examples/BUILD.bazel b/examples/BUILD.bazel index 2512180c..c019804d 100644 --- a/examples/BUILD.bazel +++ b/examples/BUILD.bazel @@ -1,17 +1,5 @@ -load("@bazel_skylib//rules:native_binary.bzl", "native_binary") - package(default_visibility = ["//examples:__subpackages__"]) -native_binary( - name = "docker_cli", - src = select({ - "@bazel_tools//src/conditions:linux_x86_64": "@docker_cli_linux_amd64//:docker", - "@bazel_tools//src/conditions:darwin_arm64": "@docker_cli_darwin_arm64//:docker", - "@bazel_tools//src/conditions:darwin_x86_64": "@docker_cli_darwin_amd64//:docker", - }), - out = "docker", -) - platform( name = "linux_arm64", constraint_values = [ diff --git a/examples/assert.bzl b/examples/assert.bzl index a6f797f8..c870a3d5 100644 --- a/examples/assert.bzl +++ b/examples/assert.bzl @@ -108,11 +108,7 @@ def assert_oci_config( "$(location %s)" % expected, "$(location %s)" % actual, ], - src = select({ - "//examples:platform_darwin_arm64": "@jd_darwin_arm64//file", - "//examples:platform_linux_amd64": "@jd_linux_amd64//file", - "//examples:platform_darwin_amd64": "@jd_darwin_amd64//file", - }), + src = "@multitool//tools/jd", out = name, ) @@ -140,7 +136,7 @@ def assert_oci_image_command( name = name + "_gen", output_to_bindir = True, cmd = """ -docker=$(location //examples:docker_cli) +docker=$(location @multitool//tools/docker) $(location :{name}_tarball) container_id=$$($$docker run -d {docker_args}) $$docker wait $$container_id > $(location :{name}_exit_code) @@ -152,7 +148,7 @@ $$docker logs $$container_id > $(location :{name}_output) name + "_exit_code", ], target_compatible_with = TARGET_COMPATIBLE_WITH, - tools = [name + "_tarball", "//examples:docker_cli"], + tools = [name + "_tarball", "@multitool//tools/docker"], ) if output_eq: diff --git a/examples/dockerfile/BUILD.bazel b/examples/dockerfile/BUILD.bazel index 887476d4..7e8beba2 100644 --- a/examples/dockerfile/BUILD.bazel +++ b/examples/dockerfile/BUILD.bazel @@ -1,19 +1,8 @@ load("@aspect_bazel_lib//lib:run_binary.bzl", "run_binary") -load("@bazel_skylib//rules:native_binary.bzl", "native_binary") load("@configure_buildx//:defs.bzl", "BUILDER_NAME", "TARGET_COMPATIBLE_WITH") load("@rules_oci//oci:defs.bzl", "oci_image") load("//examples:assert.bzl", "assert_oci_config", "assert_oci_image_command") -native_binary( - name = "buildx", - src = select({ - "@bazel_tools//src/conditions:linux_x86_64": "@buildx_linux_amd64//file", - "@bazel_tools//src/conditions:darwin_arm64": "@buildx_darwin_arm64//file", - "@bazel_tools//src/conditions:darwin_x86_64": "@buildx_darwin_amd64//file", - }), - out = "buildx", -) - # docker buildx create --name container --driver=docker-container run_binary( name = "base", @@ -29,7 +18,7 @@ run_binary( mnemonic = "BuildDocker", out_dirs = ["base"], target_compatible_with = TARGET_COMPATIBLE_WITH, - tool = ":buildx", + tool = "@multitool//tools/buildx", ) oci_image( diff --git a/examples/dockerfile/buildx.bzl b/examples/dockerfile/buildx.bzl index 20b7d6ec..4c3579dc 100644 --- a/examples/dockerfile/buildx.bzl +++ b/examples/dockerfile/buildx.bzl @@ -1,10 +1,10 @@ "repos for buildx" load("@aspect_bazel_lib//lib:repo_utils.bzl", "repo_utils") -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") def _impl_configure_buildx(rctx): has_docker = False + # See if standard docker sock exists if not has_docker: r = rctx.execute(["stat", "/var/run/docker.sock"]) @@ -14,7 +14,17 @@ def _impl_configure_buildx(rctx): compatible_with = "[]" builder_name = "builder-docker" if has_docker: - buildx = rctx.path(Label("@buildx_%s//file:downloaded" % repo_utils.platform(rctx))) + # TODO(alex): a less hacky way for a repo rule to find this transitive repo label? + if repo_utils.platform(rctx) == "darwin_amd64": + multitool_label = "@@rules_multitool~~multitool~multitool.macos_x86_64//tools/buildx:macos_x86_64_executable" + elif repo_utils.platform(rctx) == "darwin_arm64": + multitool_label = "@@rules_multitool~~multitool~multitool.macos_arm64//tools/buildx:macos_arm64_executable" + elif repo_utils.platform(rctx) == "linux_amd64": + multitool_label = "@@rules_multitool~~multitool~multitool.linux_x86_64//tools/buildx:linux_x86_64_executable" + else: + fail("platform {} is not known", repo_utils.platform(rctx)) + + buildx = rctx.path(Label(multitool_label)) r = rctx.execute([buildx, "ls"]) if not builder_name in r.stdout: @@ -40,33 +50,3 @@ configure_buildx = repository_rule( implementation = _impl_configure_buildx, local = True, ) - -def fetch_buildx(): - http_file( - name = "buildx_linux_amd64", - urls = [ - "https://github.com/docker/buildx/releases/download/v0.14.0/buildx-v0.14.0.linux-amd64", - ], - integrity = "sha256-Mvjxfso1vy7+bA5H9A5Gkqh280UxtCHvyYR5mltBIm4=", - executable = True, - ) - - http_file( - name = "buildx_darwin_arm64", - urls = [ - "https://github.com/docker/buildx/releases/download/v0.14.0/buildx-v0.14.0.darwin-arm64", - ], - integrity = "sha256-3BdvI2ZgnMITKubwi7IZOjL5/ZNUv9Agz3+juNt0hA0=", - executable = True, - ) - - http_file( - name = "buildx_darwin_amd64", - urls = [ - "https://github.com/docker/buildx/releases/download/v0.14.0/buildx-v0.14.0.darwin-amd64", - ], - integrity = "sha256-J6rZfENSvCzFBHDgnA8Oqq2FDXR+M9CTejhhg9DruPU=", - executable = True, - ) - - configure_buildx(name = "configure_buildx") diff --git a/examples/setup_assertion_repos.bzl b/examples/setup_assertion_repos.bzl index a4fd89e5..66ed77fb 100644 --- a/examples/setup_assertion_repos.bzl +++ b/examples/setup_assertion_repos.bzl @@ -1,10 +1,9 @@ "Setup for docker testing" -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") - def _impl_configure_docker(rctx): # See if docker_host is set has_docker = "DOCKER_HOST" in rctx.os.environ + # See if standard docker sock exists if not has_docker: r = rctx.execute(["stat", "/var/run/docker.sock"]) @@ -13,7 +12,6 @@ def _impl_configure_docker(rctx): compatible_with = "[]" if has_docker else '["@platforms//:incompatible"]' - rctx.file("defs.bzl", """ # Generated by configure_docker.bzl TARGET_COMPATIBLE_WITH = %s @@ -24,64 +22,3 @@ TARGET_COMPATIBLE_WITH = %s configure_docker = repository_rule( implementation = _impl_configure_docker, ) - -def setup_assertion_repos(): - "creates repos necessary for testing agaisnt docker" - http_file( - name = "jd_darwin_arm64", - urls = [ - "https://github.com/josephburnett/jd/releases/download/v1.8.1/jd-arm64-darwin", - ], - sha256 = "8b0e51b902650287b7dedc2beee476b96c5d589309d3a7f556334c1baedbec61", - executable = True, - ) - - http_file( - name = "jd_darwin_amd64", - urls = [ - "https://github.com/josephburnett/jd/releases/download/v1.8.1/jd-amd64-darwin", - ], - sha256 = "c5fb5503d2804b1bf631bf12616d56b89711fd451ab233b688ca922402ff3444", - executable = True, - ) - - http_file( - name = "jd_linux_amd64", - urls = [ - "https://github.com/josephburnett/jd/releases/download/v1.8.1/jd-amd64-linux", - ], - sha256 = "ab918f52130561abd4f88d9c2d3ae95d4d56f1a2dff9762665890349d61c763e", - executable = True, - ) - - http_archive( - name = "docker_cli_darwin_arm64", - urls = [ - "https://download.docker.com/mac/static/stable/aarch64/docker-23.0.0.tgz", - ], - integrity = "sha256-naXFF3G/D3a8XieHkd2cm29/SHdheslS3VyI77ep/xA=", - strip_prefix = "docker", - build_file_content = 'exports_files(["docker"])', - ) - - http_archive( - name = "docker_cli_darwin_amd64", - urls = [ - "https://download.docker.com/mac/static/stable/x86_64/docker-23.0.0.tgz", - ], - integrity = "sha256-55P6RTHVIWEHuEuH8ZHFgu6TeCVPF7WqvPD6MBApOuc=", - strip_prefix = "docker", - build_file_content = 'exports_files(["docker"])', - ) - - http_archive( - name = "docker_cli_linux_amd64", - urls = [ - "https://download.docker.com/linux/static/stable/x86_64/docker-23.0.0.tgz", - ], - integrity = "sha256-agO72paEW3RRvi9qumnDgWxgqX3jGOg/0bOdG+Ji2K8=", - strip_prefix = "docker", - build_file_content = 'exports_files(["docker"])', - ) - - configure_docker(name = "docker_configure") diff --git a/fetch.bzl b/fetch.bzl index 7022969e..0f6fc26f 100644 --- a/fetch.bzl +++ b/fetch.bzl @@ -6,8 +6,8 @@ by writing them to a generated macro in a .bzl file. load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@rules_oci//oci:pull.bzl", "oci_pull") -load("//examples:setup_assertion_repos.bzl", "setup_assertion_repos") -load("//examples/dockerfile:buildx.bzl", "fetch_buildx") +load("//examples:setup_assertion_repos.bzl", "configure_docker") +load("//examples/dockerfile:buildx.bzl", "configure_buildx") def fetch_images(): "fetch external images" @@ -225,6 +225,7 @@ genrule( sha256 = "d7c7af5d86f43a885069408a89788f67f248e8124c682bb73936f33874e0611b", ) +# buildifier: disable=unnamed-macro def fetch_test_repos(): "fetch repos needed for testing" @@ -242,10 +243,8 @@ def fetch_test_repos(): path = "examples/assertion/attest_external/workspace", ) + # Setup buildx + configure_buildx(name = "configure_buildx") - # Fetch buildx - fetch_buildx() - - # Fetch necessary repos for docker testing - setup_assertion_repos() - + # Setup steps for docker testing + configure_docker(name = "docker_configure") diff --git a/internal_deps.bzl b/internal_deps.bzl deleted file mode 100644 index 27516f28..00000000 --- a/internal_deps.bzl +++ /dev/null @@ -1,70 +0,0 @@ -"""Our "development" dependencies - -Users should *not* need to install these. If users see a load() -statement from these, that's a bug in our distribution. -""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", _http_archive = "http_archive") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - -def http_archive(**kwargs): - maybe(_http_archive, **kwargs) - -def rules_oci_internal_deps(): - "Fetch deps needed for local development" - - http_archive( - name = "io_bazel_rules_go", - sha256 = "80a98277ad1311dacd837f9b16db62887702e9f1d1c4c9f796d0121a46c8e184", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.46.0/rules_go-v0.46.0.zip", - "https://github.com/bazelbuild/rules_go/releases/download/v0.46.0/rules_go-v0.46.0.zip", - ], - ) - - http_archive( - name = "bazel_gazelle", - integrity = "sha256-MpOL2hbmcABjA1R5Bj2dJMYO2o15/Uc5Vj9Q0zHLMgk=", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz", - "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz", - ], - ) - - # Override bazel_skylib distribution to fetch sources instead - # so that the gazelle extension is included - # see https://github.com/bazelbuild/bazel-skylib/issues/250 - http_archive( - name = "bazel_skylib", - sha256 = "07b4117379dde7ab382345c3b0f5edfc6b7cff6c93756eac63da121e0bbcc5de", - strip_prefix = "bazel-skylib-1.1.1", - urls = [ - "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz", - "https://github.com/bazelbuild/bazel-skylib/archive/1.1.1.tar.gz", - ], - ) - - http_archive( - name = "bazel_skylib_gazelle_plugin", - sha256 = "0a466b61f331585f06ecdbbf2480b9edf70e067a53f261e0596acd573a7d2dc3", - urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.1/bazel-skylib-gazelle-plugin-1.4.1.tar.gz"], - ) - - http_archive( - name = "io_bazel_stardoc", - sha256 = "62bd2e60216b7a6fec3ac79341aa201e0956477e7c8f6ccc286f279ad1d96432", - urls = ["https://github.com/bazelbuild/stardoc/releases/download/0.6.2/stardoc-0.6.2.tar.gz"], - ) - - http_archive( - name = "rules_multirun", - sha256 = "0e124567fa85287874eff33a791c3bbdcc5343329a56faa828ef624380d4607c", - url = "https://github.com/keith/rules_multirun/releases/download/0.9.0/rules_multirun.0.9.0.tar.gz", - ) - - http_archive( - name = "rules_python", - sha256 = "be04b635c7be4604be1ef20542e9870af3c49778ce841ee2d92fcb42f9d9516a", - strip_prefix = "rules_python-0.35.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.35.0/rules_python-0.35.0.tar.gz", - ) diff --git a/tools/BUILD.bazel b/tools/BUILD.bazel new file mode 100644 index 00000000..e69de29b diff --git a/tools/_run_under_cwd.sh b/tools/_run_under_cwd.sh new file mode 100755 index 00000000..cb314938 --- /dev/null +++ b/tools/_run_under_cwd.sh @@ -0,0 +1,16 @@ +#!/bin/sh +# See https://blog.aspect.build/run-tools-installed-by-bazel +case "$(basename "$0")" in + go) + # https://github.com/bazelbuild/rules_go/blob/master/docs/go/core/bzlmod.md#using-a-go-sdk + target="@rules_go//go" + ;; + *) + target="@multitool//tools/$(basename "$0")" + ;; +esac + +# NB: we don't use 'bazel run' because it may leave behind zombie processes under ibazel +# shellcheck disable=SC2046 +bazel 2>/dev/null build --build_runfile_links "$target" && \ + BAZEL_BINDIR=. exec $(bazel 2>/dev/null info execution_root)/$(bazel 2>/dev/null cquery --output=files "$target") "$@" diff --git a/tools/buildx b/tools/buildx new file mode 120000 index 00000000..c503e272 --- /dev/null +++ b/tools/buildx @@ -0,0 +1 @@ +_run_under_cwd.sh \ No newline at end of file diff --git a/tools/docker b/tools/docker new file mode 120000 index 00000000..c503e272 --- /dev/null +++ b/tools/docker @@ -0,0 +1 @@ +_run_under_cwd.sh \ No newline at end of file diff --git a/tools/docker-compose b/tools/docker-compose new file mode 120000 index 00000000..c503e272 --- /dev/null +++ b/tools/docker-compose @@ -0,0 +1 @@ +_run_under_cwd.sh \ No newline at end of file diff --git a/tools/jd b/tools/jd new file mode 120000 index 00000000..c503e272 --- /dev/null +++ b/tools/jd @@ -0,0 +1 @@ +_run_under_cwd.sh \ No newline at end of file diff --git a/tools/multitool b/tools/multitool new file mode 120000 index 00000000..c503e272 --- /dev/null +++ b/tools/multitool @@ -0,0 +1 @@ +_run_under_cwd.sh \ No newline at end of file diff --git a/tools/tools.lock.json b/tools/tools.lock.json new file mode 100644 index 00000000..264fe227 --- /dev/null +++ b/tools/tools.lock.json @@ -0,0 +1,134 @@ +{ + "$schema": "https://raw.githubusercontent.com/theoremlp/rules_multitool/main/lockfile.schema.json", + "buildx": { + "binaries": [ + { + "kind": "file", + "url": "https://github.com/docker/buildx/releases/download/v0.20.1/buildx-v0.20.1.linux-amd64", + "sha256": "8c38f60308a895fa570f1410e453c5de11aafd65a99fa99965d96d24b6225a78", + "os": "linux", + "cpu": "x86_64" + }, + { + "kind": "file", + "url": "https://github.com/docker/buildx/releases/download/v0.20.1/buildx-v0.20.1.darwin-arm64", + "sha256": "c2148c9d92df631e162b9b2ab5f61e866a31d99bb11e1b43566ad1356d9ab4ac", + "os": "macos", + "cpu": "arm64" + }, + { + "kind": "file", + "url": "https://github.com/docker/buildx/releases/download/v0.20.1/buildx-v0.20.1.darwin-amd64", + "sha256": "d8af275d61e770a8cf552d893e03ac4b5938517ea875fb5f7b7275e381358c92", + "os": "macos", + "cpu": "x86_64" + } + ] + }, + "docker": { + "binaries": [ + { + "kind": "archive", + "url": "https://download.docker.com/linux/static/stable/x86_64/docker-23.0.0.tgz", + "file": "docker/docker", + "sha256": "6a03bbda96845b7451be2f6aba69c3816c60a97de318e83fd1b39d1be262d8af", + "os": "linux", + "cpu": "x86_64" + }, + { + "kind": "archive", + "url": "https://download.docker.com/mac/static/stable/aarch64/docker-23.0.0.tgz", + "file": "docker/docker", + "sha256": "9da5c51771bf0f76bc5e278791dd9c9b6f7f4877617ac952dd5c88efb7a9ff10", + "os": "macos", + "cpu": "arm64" + }, + { + "kind": "archive", + "url": "https://download.docker.com/mac/static/stable/x86_64/docker-23.0.0.tgz", + "file": "docker/docker", + "sha256": "e793fa4531d5216107b84b87f191c582ee9378254f17b5aabcf0fa3010293ae7", + "os": "macos", + "cpu": "x86_64" + } + ] + }, + "docker-compose": { + "binaries": [ + { + "kind": "file", + "url": "https://github.com/docker/compose/releases/download/v2.32.4/docker-compose-linux-aarch64", + "sha256": "0c4591cf3b1ed039adcd803dbbeddf757375fc08c11245b0154135f838495a2f", + "os": "linux", + "cpu": "arm64" + }, + { + "kind": "file", + "url": "https://github.com/docker/compose/releases/download/v2.32.4/docker-compose-linux-x86_64", + "sha256": "ed1917fb54db184192ea9d0717bcd59e3662ea79db48bff36d3475516c480a6b", + "os": "linux", + "cpu": "x86_64" + }, + { + "kind": "file", + "url": "https://github.com/docker/compose/releases/download/v2.32.4/docker-compose-darwin-aarch64", + "sha256": "dc30b0276c0ba45857eef021b677d4fb2bbf13bcf809f99b691db9512bca47cc", + "os": "macos", + "cpu": "arm64" + } + ] + }, + "jd": { + "binaries": [ + { + "kind": "file", + "url": "https://github.com/josephburnett/jd/releases/download/v1.9.1/jd-amd64-linux", + "sha256": "382a69c0720a94515cb07bf8e0b89fbfa577140fc92e23b128455b5ae682e523", + "os": "linux", + "cpu": "x86_64" + }, + { + "kind": "file", + "url": "https://github.com/josephburnett/jd/releases/download/v1.9.1/jd-arm64-darwin", + "sha256": "8f34988fc77c577157b57ad22b8e3624f033396715cae208cc368eeb7f6d6823", + "os": "macos", + "cpu": "arm64" + }, + { + "kind": "file", + "url": "https://github.com/josephburnett/jd/releases/download/v1.9.1/jd-amd64-darwin", + "sha256": "7cda0be31188f8388ba537161a4f3aaaaba58bca5707be86980de759ae90c2b7", + "os": "macos", + "cpu": "x86_64" + } + ] + }, + "multitool": { + "binaries": [ + { + "kind": "archive", + "url": "https://github.com/theoremlp/multitool/releases/download/v0.9.0/multitool-aarch64-unknown-linux-gnu.tar.xz", + "file": "multitool-aarch64-unknown-linux-gnu/multitool", + "sha256": "693b66def2d8dacdfcb5a011b7c32a8e89a13bdc031db8dc40c0759a38253103", + "os": "linux", + "cpu": "arm64" + }, + { + "kind": "archive", + "url": "https://github.com/theoremlp/multitool/releases/download/v0.9.0/multitool-x86_64-unknown-linux-gnu.tar.xz", + "file": "multitool-x86_64-unknown-linux-gnu/multitool", + "sha256": "34dc5968dad458a4050ebde58e484ebb7c624a119e4031347683eeb80922e6df", + "os": "linux", + "cpu": "x86_64" + }, + { + "kind": "archive", + "url": "https://github.com/theoremlp/multitool/releases/download/v0.9.0/multitool-aarch64-apple-darwin.tar.xz", + "file": "multitool-aarch64-apple-darwin/multitool", + "sha256": "8f5e0cd033b0fcc128c762f8d527110433523da378619cecf40e91c1df5c0686", + "os": "macos", + "cpu": "arm64" + } + ] + } +}