From ebbb7c379ba738458176e973142a4be353a981e2 Mon Sep 17 00:00:00 2001 From: wangyuhang <524413304@qq.com> Date: Sat, 28 Jun 2025 14:57:39 +0800 Subject: [PATCH] replaced python-build-standalone with python3; moved third dependencies into the ray project to eliminate patch nesting; some trivial optimizations --- ...dapting-opencensus-to-prometheus_cpp.patch | 23 ++ ...atch-for-adapting-ray-to-flatbuffers.patch | 13 + .../patch-for-adapting-ray-to-grpc.patch | 27 ++ ...tch-for-adapting-rules_boost-to-zstd.patch | 13 + ...-adapting-rules_foreign_cc-to-python.patch | 84 ++++ ...atch-for-adapting-rules_go-to-golang.patch | 62 +++ ...atch-for-adapting-rules_perl-to-perl.patch | 28 ++ .../patch-for-removeing-ios-in-grpc.patch | 335 ++++++++++++++++ ...patch-for-removeing-ruby-in-protobuf.patch | 47 +++ ...third-dependencies-into-ray_third_de.patch | 246 ++++++++++++ ...ld-patches-BUILD-file-to-store-patch.patch | 22 - grpc-add-the-patch-to-adapt-rules_go.patch | 140 ------- ...dify-the-dependencies-in-bazel-build.patch | 246 ------------ grpc-remove-ios-related-features.patch | 378 ------------------ ...-add-a-patch-to-adapt-prometheus_cpp.patch | 67 ---- ...-the-dependencies-in-ray-bazel-build.patch | 150 ------- ...dify-the-dependencies-in-bazel-build.patch | 139 ------- protobuf-remove-ruby-related-features.patch | 103 ----- python-ray.spec | 95 ++--- ray-add-the-patch-to-adapt-flatbuffers.patch | 59 --- ...dify-the-dependencies-in-bazel-build.patch | 69 +++- ...is-quiet.patch-to-adapt-redis-x86_64.patch | 0 ...-the-dependencies-in-ray-bazel-build.patch | 126 ------ ...c-add-the-patch-to-adapt-flatbuffers.patch | 148 ------- ...-modify-the-dependencies-in-bazel-bu.patch | 76 ---- ...-the-dependencies-in-ray-bazel-build.patch | 72 ---- 26 files changed, 978 insertions(+), 1790 deletions(-) create mode 100644 build-patch/patch-for-adapting-opencensus-to-prometheus_cpp.patch create mode 100644 build-patch/patch-for-adapting-ray-to-flatbuffers.patch create mode 100644 build-patch/patch-for-adapting-ray-to-grpc.patch create mode 100644 build-patch/patch-for-adapting-rules_boost-to-zstd.patch create mode 100644 build-patch/patch-for-adapting-rules_foreign_cc-to-python.patch create mode 100644 build-patch/patch-for-adapting-rules_go-to-golang.patch create mode 100644 build-patch/patch-for-adapting-rules_perl-to-perl.patch create mode 100644 build-patch/patch-for-removeing-ios-in-grpc.patch create mode 100644 build-patch/patch-for-removeing-ruby-in-protobuf.patch create mode 100644 consolidate-all-third-dependencies-into-ray_third_de.patch delete mode 100644 create-an-oe-build-patches-BUILD-file-to-store-patch.patch delete mode 100644 grpc-add-the-patch-to-adapt-rules_go.patch delete mode 100644 grpc-modify-the-dependencies-in-bazel-build.patch delete mode 100644 grpc-remove-ios-related-features.patch delete mode 100644 opencensus-add-a-patch-to-adapt-prometheus_cpp.patch delete mode 100644 prometheus-cpp-modify-the-dependencies-in-ray-bazel-build.patch delete mode 100644 protobuf-modify-the-dependencies-in-bazel-build.patch delete mode 100644 protobuf-remove-ruby-related-features.patch delete mode 100644 ray-add-the-patch-to-adapt-flatbuffers.patch rename ray-modiy-redis-quiet.patch-to-adapt-redis-x86.patch => ray-modiy-redis-quiet.patch-to-adapt-redis-x86_64.patch (100%) delete mode 100644 rules_boost-modify-the-dependencies-in-ray-bazel-build.patch delete mode 100644 rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch delete mode 100644 rules_foreign_cc-modify-the-dependencies-in-bazel-bu.patch delete mode 100644 rules_perl-modify-the-dependencies-in-ray-bazel-build.patch diff --git a/build-patch/patch-for-adapting-opencensus-to-prometheus_cpp.patch b/build-patch/patch-for-adapting-opencensus-to-prometheus_cpp.patch new file mode 100644 index 0000000..e4ac778 --- /dev/null +++ b/build-patch/patch-for-adapting-opencensus-to-prometheus_cpp.patch @@ -0,0 +1,23 @@ +diff --git a/opencensus/exporters/stats/prometheus/BUILD b/opencensus/exporters/stats/prometheus/BUILD +index 748c7e3..c27c339 100644 +--- a/opencensus/exporters/stats/prometheus/BUILD ++++ b/opencensus/exporters/stats/prometheus/BUILD +@@ -27,7 +27,7 @@ cc_library( + deps = [ + ":prometheus_utils", + "//opencensus/stats", +- "@com_github_jupp0r_prometheus_cpp//:core", ++ "@com_github_jupp0r_prometheus_cpp//core", + ], + ) + +@@ -41,7 +41,7 @@ cc_library( + copts = DEFAULT_COPTS, + deps = [ + "//opencensus/stats", +- "@com_github_jupp0r_prometheus_cpp//:core", ++ "@com_github_jupp0r_prometheus_cpp//core", + "@com_google_absl//absl/strings", + "@com_google_absl//absl/time", + ], +-- \ No newline at end of file diff --git a/build-patch/patch-for-adapting-ray-to-flatbuffers.patch b/build-patch/patch-for-adapting-ray-to-flatbuffers.patch new file mode 100644 index 0000000..2e7c1ad --- /dev/null +++ b/build-patch/patch-for-adapting-ray-to-flatbuffers.patch @@ -0,0 +1,13 @@ +diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h +index ee34d54..671ba1c 100644 +--- a/include/flatbuffers/flatbuffers.h ++++ b/include/flatbuffers/flatbuffers.h +@@ -262,7 +262,6 @@ template class Vector { + uoffset_t size() const { return EndianScalar(length_); } + + // Deprecated: use size(). Here for backwards compatibility. +- FLATBUFFERS_ATTRIBUTE(deprecated("use size() instead")) + uoffset_t Length() const { return size(); } + + typedef typename IndirectHelper::return_type return_type; +-- \ No newline at end of file diff --git a/build-patch/patch-for-adapting-ray-to-grpc.patch b/build-patch/patch-for-adapting-ray-to-grpc.patch new file mode 100644 index 0000000..52af9bb --- /dev/null +++ b/build-patch/patch-for-adapting-ray-to-grpc.patch @@ -0,0 +1,27 @@ +diff --git a/bazel/grpc_extra_deps.bzl b/bazel/grpc_extra_deps.bzl +index 2ad8a69..5b0e326 100644 +--- a/bazel/grpc_extra_deps.bzl ++++ b/bazel/grpc_extra_deps.bzl +@@ -51,7 +51,7 @@ def grpc_extra_deps(ignore_version_differences = False): + api_dependencies() + + go_rules_dependencies() +- go_register_toolchains(version = "1.18") ++ go_register_toolchains(version = "1.17.3") + gazelle_dependencies() + + # Pull-in the go 3rd party dependencies for protoc_gen_validate, which is +diff --git a/third_party/protobuf.patch b/third_party/protobuf.patch +index a7b1cad..7feb79b 100644 +--- a/third_party/protobuf.patch ++++ b/third_party/protobuf.patch +@@ -5,7 +5,7 @@ index 45a6c20c5..c28dd8852 100755 + @@ -8,3 +8,9 @@ + # Copyright 2007 Google Inc. All Rights Reserved. + +- __version__ = '4.25.0' ++ __version__ = '4.25.1' + + + +if __name__ != '__main__': + + try: +-- \ No newline at end of file diff --git a/build-patch/patch-for-adapting-rules_boost-to-zstd.patch b/build-patch/patch-for-adapting-rules_boost-to-zstd.patch new file mode 100644 index 0000000..928a695 --- /dev/null +++ b/build-patch/patch-for-adapting-rules_boost-to-zstd.patch @@ -0,0 +1,13 @@ +diff --git a/BUILD.zstd b/BUILD.zstd +index a01c959..0ed48d6 100644 +--- a/BUILD.zstd ++++ b/BUILD.zstd +@@ -14,7 +14,6 @@ cc_library( + "lib/legacy/*.h", + "lib/legacy/*.c", + ]) + select({ +- ":linux_x86_64": ["lib/decompress/huf_decompress_amd64.S"], + "//conditions:default": [], + }), + hdrs = [ +-- \ No newline at end of file diff --git a/build-patch/patch-for-adapting-rules_foreign_cc-to-python.patch b/build-patch/patch-for-adapting-rules_foreign_cc-to-python.patch new file mode 100644 index 0000000..bf80ed1 --- /dev/null +++ b/build-patch/patch-for-adapting-rules_foreign_cc-to-python.patch @@ -0,0 +1,84 @@ +diff --git a/python/pip_install/extract_wheels/lib/wheel.py b/python/pip_install/extract_wheels/lib/wheel.py +index 74a963f..3038a0d 100644 +--- a/python/pip_install/extract_wheels/lib/wheel.py ++++ b/python/pip_install/extract_wheels/lib/wheel.py +@@ -6,7 +6,6 @@ import stat + import zipfile + from typing import Dict, Optional, Set, Tuple + +-import installer + import pkg_resources + + +diff --git a/python/pip_install/pip_repository.bzl b/python/pip_install/pip_repository.bzl +index d9888a2..ad1d555 100644 +--- a/python/pip_install/pip_repository.bzl ++++ b/python/pip_install/pip_repository.bzl +@@ -1,6 +1,5 @@ + "" + +-load("//python/pip_install:repositories.bzl", "all_requirements") + load("//python/pip_install/private:srcs.bzl", "PIP_INSTALL_PY_SRCS") + + def _construct_pypath(rctx): +@@ -19,7 +19,7 @@ def _construct_pypath(rctx): + thirdparty_roots = [ + # Includes all the external dependencies from repositories.bzl + rctx.path(Label("@" + repo + "//:BUILD.bazel")).dirname +- for repo in all_requirements ++ for repo in [] + ] + separator = ":" if not "windows" in rctx.os.name.lower() else ";" + pypath = separator.join([str(p) for p in [rules_root] + thirdparty_roots]) +@@ -183,10 +183,15 @@ def _pip_repository_impl(rctx): + + rctx.report_progress(progress_message) + ++ base_env = "/usr/lib/python3.9/site-packages" ++ custom_path = _construct_pypath(rctx) ++ pypy_path = ":".join([custom_path, base_env]) ++ ++ + result = rctx.execute( + args, + # Manually construct the PYTHONPATH since we cannot use the toolchain here +- environment = {"PYTHONPATH": _construct_pypath(rctx)}, ++ environment = {"PYTHONPATH": pypy_path}, + timeout = rctx.attr.timeout, + quiet = rctx.attr.quiet, + ) +diff --git a/python/versions.bzl b/python/versions.bzl +index 2d05e16..7b0e311 100644 +--- a/python/versions.bzl ++++ b/python/versions.bzl +@@ -20,7 +20,7 @@ MACOS_NAME = "mac os" + LINUX_NAME = "linux" + WINDOWS_NAME = "windows" + +-DEFAULT_RELEASE_BASE_URL = "https://github.com/indygreg/python-build-standalone/releases/download" ++DEFAULT_RELEASE_BASE_URL = "file:///tmp/.ray_deps/" + + # When updating the versions and releases, run the following command to get + # the hashes: +@@ -70,7 +70,7 @@ TOOL_VERSIONS = { + "strip_prefix": "python", + }, + "3.9.12": { +- "url": "20220502/cpython-{python_version}+20220502-{platform}-{build}.tar.gz", ++ "url": "python.tar.gz", + "sha256": { + "aarch64-apple-darwin": "8dee06c07cc6429df34b6abe091a4684a86f7cec76f5d1ccc1c3ce2bd11168df", + "aarch64-unknown-linux-gnu": "2ee1426c181e65133e57dc55c6a685cb1fb5e63ef02d684b8a667d5c031c4203", +diff --git a/python/repositories.bzl b/python/repositories.bzl +index 687388c..9f7b32f 100644 +--- a/python/repositories.bzl ++++ b/python/repositories.bzl +@@ -83,7 +83,6 @@ def _python_repository_impl(rctx): + else: + rctx.download_and_extract( + url = url, +- sha256 = rctx.attr.sha256, + stripPrefix = rctx.attr.strip_prefix, + ) + +-- \ No newline at end of file diff --git a/build-patch/patch-for-adapting-rules_go-to-golang.patch b/build-patch/patch-for-adapting-rules_go-to-golang.patch new file mode 100644 index 0000000..a5026ac --- /dev/null +++ b/build-patch/patch-for-adapting-rules_go-to-golang.patch @@ -0,0 +1,62 @@ +diff --git a/go/private/sdk.bzl b/go/private/sdk.bzl +index d5b2eac..23174c0 100644 +--- a/go/private/sdk.bzl ++++ b/go/private/sdk.bzl +@@ -67,15 +67,7 @@ def _go_download_sdk_impl(ctx): + ctx.report_progress("Finding latest Go version") + else: + ctx.report_progress("Finding Go SHA-256 sums") +- ctx.download( +- url = [ +- "https://golang.org/dl/?mode=json&include=all", +- "https://golang.google.cn/dl/?mode=json&include=all", +- ], +- output = "versions.json", +- ) +- +- data = ctx.read("versions.json") ++ data = ctx.read("../io_bazel_rules_go/go/private/versions.json") + sdks_by_version = _parse_versions_json(data) + + if not version: +@@ -119,7 +111,7 @@ _go_download_sdk = repository_rule( + "goos": attr.string(), + "goarch": attr.string(), + "sdks": attr.string_list_dict(), +- "urls": attr.string_list(default = ["https://dl.google.com/go/{}"]), ++ "urls": attr.string_list(default = ["file:///tmp/.ray_deps/golang-1.17.3.tar.gz"]), + "version": attr.string(), + "strip_prefix": attr.string(default = "go"), + }, +diff --git a/go/private/versions.json b/go/private/versions.json +new file mode 100644 +index 0000000..aa924d7 +--- /dev/null ++++ b/go/private/versions.json +@@ -0,0 +1,24 @@ ++[ ++ { ++ "version": "go1.17.3", ++ "stable": true, ++ "files": [ ++ { ++ "filename": "go1.17.3.linux-amd64.tar.gz", ++ "os": "linux", ++ "arch": "amd64", ++ "version": "go1.17.3", ++ "sha256": "", ++ "kind": "archive" ++ }, ++ { ++ "filename": "go1.17.3.linux-arm64.tar.gz", ++ "os": "linux", ++ "arch": "arm64", ++ "version": "go1.17.3", ++ "sha256": "", ++ "kind": "archive" ++ } ++ ] ++ } ++] +\ No newline at end of file +-- \ No newline at end of file diff --git a/build-patch/patch-for-adapting-rules_perl-to-perl.patch b/build-patch/patch-for-adapting-rules_perl-to-perl.patch new file mode 100644 index 0000000..cb39d01 --- /dev/null +++ b/build-patch/patch-for-adapting-rules_perl-to-perl.patch @@ -0,0 +1,28 @@ +diff --git a/perl/deps.bzl b/perl/deps.bzl +index 7f7ee7c..cbdd884 100644 +--- a/perl/deps.bzl ++++ b/perl/deps.bzl +@@ -11,18 +11,18 @@ def perl_register_toolchains(): + perl_download( + name = "perl_linux_arm64", + strip_prefix = "perl-aarch64-linux", +- sha256 = "01af07bc84fc9c162b09eda880f5868b67ccb440071f8088e5278e1ae394aefd", ++ sha256 = "", + urls = [ +- "https://github.com/skaji/relocatable-perl/releases/download/5.36.0.0/perl-aarch64-linux.tar.xz", ++ "file:///tmp/.ray_deps/perl-aarch64-linux.tar.gz", + ], + ) + + perl_download( + name = "perl_linux_x86_64", + strip_prefix = "perl-x86_64-linux", +- sha256 = "77ee5dfec156bd8135be3c2e9b295a393c7f7a0c7999b8932ff83ed938f65d02", ++ sha256 = "", + urls = [ +- "https://github.com/skaji/relocatable-perl/releases/download/5.36.0.0/perl-x86_64-linux.tar.xz", ++ "file:///tmp/.ray_deps/perl-x86_64-linux.tar.gz", + ], + ) + +-- \ No newline at end of file diff --git a/build-patch/patch-for-removeing-ios-in-grpc.patch b/build-patch/patch-for-removeing-ios-in-grpc.patch new file mode 100644 index 0000000..33ad348 --- /dev/null +++ b/build-patch/patch-for-removeing-ios-in-grpc.patch @@ -0,0 +1,335 @@ +diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl +index f4d1310..ec27f65 100644 +--- a/bazel/grpc_build_system.bzl ++++ b/bazel/grpc_build_system.bzl +@@ -31,8 +31,6 @@ load("//bazel:cc_grpc_library.bzl", "cc_grpc_library") + load("//bazel:copts.bzl", "GRPC_DEFAULT_COPTS") + load("//bazel:experiments.bzl", "EXPERIMENTS") + load("//bazel:test_experiments.bzl", "TEST_EXPERIMENTS") +-load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") +-load("@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", "ios_test_runner") + load("@com_google_protobuf//bazel:upb_proto_library.bzl", "upb_proto_library", "upb_proto_reflection_library") + + # The set of pollers to test against if a test exercises polling +@@ -238,46 +236,6 @@ def grpc_proto_library( + generate_mocks = generate_mocks, + ) + +-def ios_cc_test( +- name, +- tags = [], +- **kwargs): +- """An ios C++ test target. +- +- Args: +- name: The name of the test. +- tags: The tags to apply to the test. +- **kwargs: All other arguments to apply. +- """ +- test_lib_ios = name + "_test_lib_ios" +- ios_tags = tags + ["manual", "ios_cc_test"] +- test_runner = "ios_x86_64_sim_runner_" + name +- ios_test_runner( +- name = test_runner, +- device_type = "iPhone X", +- ) +- if not any([t for t in tags if t.startswith("no_test_ios")]): +- native.objc_library( +- name = test_lib_ios, +- srcs = kwargs.get("srcs"), +- deps = kwargs.get("deps"), +- copts = kwargs.get("copts"), +- data = kwargs.get("data"), +- tags = ios_tags, +- alwayslink = 1, +- testonly = 1, +- ) +- ios_test_deps = [":" + test_lib_ios] +- ios_unit_test( +- name = name + "_on_ios", +- size = kwargs.get("size"), +- data = kwargs.get("data"), +- tags = ios_tags, +- minimum_os_version = "9.0", +- runner = test_runner, +- deps = ios_test_deps, +- ) +- + def expand_tests(name, srcs, deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky): + """Common logic used to parameterize tests for every poller and EventEngine and experiment. + +@@ -498,17 +456,6 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data + "linkstatic": linkstatic, + } + +- if "grpc-fuzzer" not in tags and "no_test_ios" not in tags: +- ios_cc_test( +- name = name, +- srcs = srcs, +- tags = tags, +- deps = core_deps, +- args = args, +- flaky = True, +- **test_args +- ) +- + for poller_config in expand_tests(name, srcs, core_deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky): + native.cc_test( + name = poller_config["name"], +diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl +index 174195f..8c95d37 100644 +--- a/bazel/grpc_deps.bzl ++++ b/bazel/grpc_deps.bzl +@@ -404,26 +404,6 @@ def grpc_deps(): + ], + ) + +- if "build_bazel_rules_apple" not in native.existing_rules(): +- http_archive( +- name = "build_bazel_rules_apple", +- sha256 = "f94e6dddf74739ef5cb30f000e13a2a613f6ebfa5e63588305a71fce8a8a9911", +- urls = [ +- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_apple/releases/download/1.1.3/rules_apple.1.1.3.tar.gz", +- "https://github.com/bazelbuild/rules_apple/releases/download/1.1.3/rules_apple.1.1.3.tar.gz", +- ], +- ) +- +- if "build_bazel_apple_support" not in native.existing_rules(): +- http_archive( +- name = "build_bazel_apple_support", +- sha256 = "f4fdf5c9b42b92ea12f229b265d74bb8cedb8208ca7a445b383c9f866cf53392", +- urls = [ +- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/apple_support/releases/download/1.3.1/apple_support.1.3.1.tar.gz", +- "https://github.com/bazelbuild/apple_support/releases/download/1.3.1/apple_support.1.3.1.tar.gz", +- ], +- ) +- + if "com_google_googleapis" not in native.existing_rules(): + http_archive( + name = "com_google_googleapis", +diff --git a/bazel/grpc_extra_deps.bzl b/bazel/grpc_extra_deps.bzl +index 5b0e326..b10fc8e 100644 +--- a/bazel/grpc_extra_deps.bzl ++++ b/bazel/grpc_extra_deps.bzl +@@ -14,8 +14,6 @@ + """Loads the dependencies necessary for the external repositories defined in grpc_deps.bzl.""" + + load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") +-load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") +-load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies") + load("@com_envoyproxy_protoc_gen_validate//:dependencies.bzl", "go_third_party") + load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language") + load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") +@@ -58,10 +56,6 @@ def grpc_extra_deps(ignore_version_differences = False): + # needed for building C++ xDS protos + go_third_party() + +- apple_rules_dependencies(ignore_version_differences = ignore_version_differences) +- +- apple_support_dependencies() +- + # Initialize Google APIs with only C++ and Python targets + switched_rules_by_language( + name = "com_google_googleapis_imports", +diff --git a/examples/objective-c/BUILD b/examples/objective-c/BUILD +index 422f851..7a02df9 100644 +--- a/examples/objective-c/BUILD ++++ b/examples/objective-c/BUILD +@@ -13,8 +13,6 @@ + # limitations under the License. + + load("@com_github_grpc_grpc//bazel:objc_grpc_library.bzl", "objc_grpc_library") +-load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application") +-load("@build_bazel_rules_apple//apple:macos.bzl", "macos_application") + + licenses(["notice"]) + +diff --git a/src/objective-c/BUILD b/src/objective-c/BUILD +index 7950924..7d79331 100644 +--- a/src/objective-c/BUILD ++++ b/src/objective-c/BUILD +@@ -15,7 +15,6 @@ + # limitations under the License. + + load("//bazel:grpc_build_system.bzl", "grpc_generate_objc_one_off_targets", "grpc_objc_library") +-load("@build_bazel_rules_apple//apple:resources.bzl", "apple_resource_bundle") + + licenses(["notice"]) + +diff --git a/src/objective-c/examples/BUILD b/src/objective-c/examples/BUILD +index d407901..b390edb 100644 +--- a/src/objective-c/examples/BUILD ++++ b/src/objective-c/examples/BUILD +@@ -20,9 +20,6 @@ load( + "local_objc_grpc_library", + "proto_library_objc_wrapper", + ) +-load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application") +-load("@build_bazel_rules_apple//apple:tvos.bzl", "tvos_application") +-load("@build_bazel_rules_apple//apple:watchos.bzl", "watchos_application", "watchos_extension") + + licenses(["notice"]) + +diff --git a/src/objective-c/grpc_objc_internal_library.bzl b/src/objective-c/grpc_objc_internal_library.bzl +index 5d88486..19419fc 100644 +--- a/src/objective-c/grpc_objc_internal_library.bzl ++++ b/src/objective-c/grpc_objc_internal_library.bzl +@@ -32,11 +32,6 @@ load( + "generate_objc_srcs", + ) + load("//bazel:grpc_build_system.bzl", "grpc_objc_library") +-load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") +-load( +- "@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", +- "ios_test_runner", +-) + + # The default device type for ios objc unit tests + IOS_UNIT_TEST_DEVICE_TYPE = "iPhone 11" +@@ -44,32 +39,6 @@ IOS_UNIT_TEST_DEVICE_TYPE = "iPhone 11" + # The default iOS version for ios objc unit tests + # IOS_UNIT_TEST_OS_VERSION = "13.3" + +-def grpc_objc_ios_unit_test( +- name, +- deps, +- env = {}): +- """ios unit test for running objc test suite on iOS simulator runner +- +- Args: +- name: The name of the unit test target. +- deps: The dependencies of the target. +- env: Optional test environment variables passed to the test +- """ +- test_runner = "grpc_ios_sim_runner_" + name +- ios_test_runner( +- name = test_runner, +- device_type = IOS_UNIT_TEST_DEVICE_TYPE, +- # os_version = IOS_UNIT_TEST_OS_VERSION, +- test_environment = env, +- ) +- +- ios_unit_test( +- name = name, +- minimum_os_version = "9.0", +- runner = test_runner, +- deps = deps, +- ) +- + def proto_library_objc_wrapper( + name, + srcs, +diff --git a/src/objective-c/tests/BUILD b/src/objective-c/tests/BUILD +index d5544d6..8ccbbf5 100644 +--- a/src/objective-c/tests/BUILD ++++ b/src/objective-c/tests/BUILD +@@ -17,14 +17,10 @@ + load("//bazel:grpc_build_system.bzl", "grpc_sh_test") + load( + "//src/objective-c:grpc_objc_internal_library.bzl", +- "grpc_objc_ios_unit_test", + "grpc_objc_testing_library", + "local_objc_grpc_library", + "proto_library_objc_wrapper", + ) +-load("@build_bazel_rules_apple//apple:resources.bzl", "apple_resource_bundle") +-load("@build_bazel_rules_apple//apple:macos.bzl", "macos_unit_test") +-load("@build_bazel_rules_apple//apple:tvos.bzl", "tvos_application", "tvos_unit_test") + + licenses(["notice"]) + +@@ -251,27 +247,6 @@ grpc_objc_testing_library( + ], + ) + +-grpc_objc_ios_unit_test( +- name = "InteropTestsLocalCleartext", +- deps = [ +- ":InteropTestsLocalCleartext-lib", +- ], +-) +- +-grpc_objc_ios_unit_test( +- name = "InteropTestsLocalSSL", +- deps = [ +- ":InteropTestsLocalSSL-lib", +- ], +-) +- +-grpc_objc_ios_unit_test( +- name = "InteropTestsRemote", +- deps = [ +- ":InteropTestsRemote-lib", +- ], +-) +- + # TODO: Enable this again once @CronetFramework is working + # grpc_objc_ios_unit_test( + # name = "CronetTests", +@@ -328,11 +271,6 @@ grpc_objc_testing_library( + ], + ) + +-grpc_objc_ios_unit_test( +- name = "CFStreamTests", +- deps = [":CFStreamTests-lib"], +-) +- + grpc_objc_testing_library( + name = "EventEngineClientTests-lib", + srcs = ["EventEngineTests/CFEventEngineClientTests.mm"], +@@ -356,16 +294,6 @@ grpc_objc_testing_library( + ], + ) + +-grpc_objc_ios_unit_test( +- name = "EventEngineClientTests", +- deps = [":EventEngineClientTests-lib"], +-) +- +-grpc_objc_ios_unit_test( +- name = "EventEngineUnitTests", +- deps = [":EventEngineUnitTests-lib"], +-) +- + # Note that bazel currently doesn't support running tvos_unit_test + # See https://github.com/bazelbuild/rules_apple/blob/8d841342c238457896cd7596cc29b2d06c9a75f0/apple/testing/default_runner/tvos_test_runner.template.sh + tvos_unit_test( +diff --git a/tools/internal_ci/macos/grpc_run_bazel_cpp_ios_tests.sh b/tools/internal_ci/macos/grpc_run_bazel_cpp_ios_tests.sh +index 499d6f8..30e7ca8 100755 +--- a/tools/internal_ci/macos/grpc_run_bazel_cpp_ios_tests.sh ++++ b/tools/internal_ci/macos/grpc_run_bazel_cpp_ios_tests.sh +@@ -44,9 +44,6 @@ BAZEL_REMOTE_CACHE_ARGS=( + # TODO(jtattermusch): start running selected tests from //test/core too. + test_pattern="//test/cpp/end2end/... + //test/cpp/server/... + //test/cpp/client/... + //test/cpp/common/... + //test/cpp/codegen/... + //test/cpp/util/... + //test/cpp/grpclb/... + //test/cpp/test/... + //test/core/event_engine/..." + +-# iOS tests are marked as "manual" to prevent them from running by default. To run them, we need to use "bazel query" to list them first. +-ios_tests=$(tools/bazel query "kind(ios_unit_test, tests($test_pattern))" | grep '^//') +- + python3 tools/run_tests/python_utils/bazel_report_helper.py --report_path bazel_cpp_ios_tests + + bazel_cpp_ios_tests/bazel_wrapper \ +diff --git a/tools/run_tests/sanity/check_bazel_workspace.py b/tools/run_tests/sanity/check_bazel_workspace.py +index bf3358e..74088e3 100755 +--- a/tools/run_tests/sanity/check_bazel_workspace.py ++++ b/tools/run_tests/sanity/check_bazel_workspace.py +@@ -70,8 +70,6 @@ _GRPC_DEP_NAMES = [ + _ZOPEFOUNDATION_ZOPE_INTERFACE_DEP_NAME, + _TWISTED_CONSTANTLY_DEP_NAME, + "io_bazel_rules_go", +- "build_bazel_rules_apple", +- "build_bazel_apple_support", + "com_googlesource_code_re2", + "bazel_gazelle", + "opencensus_proto", +@@ -99,8 +97,6 @@ _GRPC_BAZEL_ONLY_DEPS = [ + _ZOPEFOUNDATION_ZOPE_INTERFACE_DEP_NAME, + _TWISTED_CONSTANTLY_DEP_NAME, + "io_bazel_rules_go", +- "build_bazel_rules_apple", +- "build_bazel_apple_support", + "com_googlesource_code_re2", + "bazel_gazelle", + "opencensus_proto", +-- + diff --git a/build-patch/patch-for-removeing-ruby-in-protobuf.patch b/build-patch/patch-for-removeing-ruby-in-protobuf.patch new file mode 100644 index 0000000..0310451 --- /dev/null +++ b/build-patch/patch-for-removeing-ruby-in-protobuf.patch @@ -0,0 +1,47 @@ +diff --git a/protobuf.bzl b/protobuf.bzl +index d96eeb4..5739dc5 100644 +--- a/protobuf.bzl ++++ b/protobuf.bzl +@@ -2,7 +2,6 @@ load("@bazel_skylib//lib:versions.bzl", "versions") + load("@rules_cc//cc:defs.bzl", "objc_library") + load("@rules_proto//proto:defs.bzl", "ProtoInfo") + load("@rules_python//python:defs.bzl", "py_library") +-load("@rules_ruby//ruby:defs.bzl", "ruby_library") + + def _GetPath(ctx, path): + if ctx.label.workspace_root: +@@ -535,15 +535,6 @@ def internal_ruby_proto_library( + deps = [] + if default_runtime: + deps.append(default_runtime) +- ruby_library( +- name = name, +- srcs = [name + "_genproto"], +- deps = deps, +- testonly = testonly, +- visibility = visibility, +- includes = includes, +- **kwargs +- ) + + # When canonical labels are in use, use additional "@" prefix + _canonical_label_prefix = "@" if str(Label("//:protoc")).startswith("@@") else "" +diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl +index cd66c06..1194d86 100644 +--- a/protobuf_deps.bzl ++++ b/protobuf_deps.bzl +@@ -114,13 +114,6 @@ def protobuf_deps(): + sha256 = "f9e4f6acf82449324d56669bda4bdb28b48688ad2990d8b39fa5b93ed39c9ad1", + ) + +- if not native.existing_rule("rules_ruby"): +- _github_archive( +- name = "rules_ruby", +- repo = "https://github.com/protocolbuffers/rules_ruby", +- commit = "b7f3e9756f3c45527be27bc38840d5a1ba690436", +- sha256 = "347927fd8de6132099fcdc58e8f7eab7bde4eb2fd424546b9cd4f1c6f8f8bad8", +- ) + + if not native.existing_rule("rules_jvm_external"): + _github_archive( +-- \ No newline at end of file diff --git a/consolidate-all-third-dependencies-into-ray_third_de.patch b/consolidate-all-third-dependencies-into-ray_third_de.patch new file mode 100644 index 0000000..cbaa605 --- /dev/null +++ b/consolidate-all-third-dependencies-into-ray_third_de.patch @@ -0,0 +1,246 @@ +From f3324cf082442b267fda07132f4a2884366bcfe5 Mon Sep 17 00:00:00 2001 +From: wangyuhang <524413304@qq.com> +Date: Tue, 24 Jun 2025 19:17:07 +0800 +Subject: [PATCH] consolidate all third dependencies into ray_third_deps_setup + +--- + WORKSPACE | 4 + + bazel/ray_deps_setup.bzl | 210 +++++++++++++++++++++++++++++++++++++++ + 2 files changed, 214 insertions(+) + +diff --git a/WORKSPACE b/WORKSPACE +index ef61172..9b95eb9 100644 +--- a/WORKSPACE ++++ b/WORKSPACE +@@ -14,6 +14,10 @@ load("//bazel:ray_deps_setup.bzl", "ray_deps_setup") + + ray_deps_setup() + ++load("//bazel:ray_deps_setup.bzl", "ray_third_deps_setup") ++ ++ray_third_deps_setup() ++ + load("//bazel:ray_deps_build_all.bzl", "ray_deps_build_all") + + ray_deps_build_all() +diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl +index 59685e7..a96f610 100644 +--- a/bazel/ray_deps_setup.bzl ++++ b/bazel/ray_deps_setup.bzl +@@ -372,3 +372,213 @@ def ray_deps_setup(): + build_file = "@com_github_ray_project_ray//bazel:BUILD.jemalloc", + strip_prefix = "jemalloc-5.3.0", + ) ++ ++def ray_third_deps_setup(): ++ ++ # need by prometheus-cpp ++ http_archive( ++ name = "civetweb", ++ strip_prefix = "civetweb-1.12", ++ urls = ["file:///tmp/.ray_deps/civetweb-1.12.tar.gz"], ++ build_file = "@com_github_jupp0r_prometheus_cpp//bazel:civetweb.BUILD", ++ ) ++ ++ # need by prometheus-cpp ++ http_archive( ++ name = "com_github_madler_zlib", ++ strip_prefix = "zlib-1.2.11", ++ urls = ["file:///tmp/.ray_deps/zlib-1.2.11.tar.gz"], ++ build_file = "@com_github_jupp0r_prometheus_cpp//bazel:zlib.BUILD", ++ ) ++ ++ # need by rules_foreign_cc ++ http_archive( ++ name = "rules_python", ++ strip_prefix = "rules_python-0.9.0", ++ urls = ["file:///tmp/.ray_deps/rules_python-0.9.0.tar.gz"], ++ patches = [ ++ "@com_github_ray_project_ray//oe-build/patches:patch-for-adapting-rules_foreign_cc-to-python.patch", ++ ], ++ patch_args = ["-p1"], ++ ) ++ ++ # need by rules_foreign_cc ++ http_archive( ++ name = "gnumake_src", ++ patches = [Label("@rules_foreign_cc//toolchains:make-reproducible-bootstrap.patch")], ++ strip_prefix = "make-4.3", ++ urls = ["file:///tmp/.ray_deps/make-4.3.tar.gz"], ++ build_file_content = """\ ++filegroup( ++ name = "all_srcs", ++ srcs = glob(["**"]), ++ visibility = ["//visibility:public"], ++) ++ """, ++ ) ++ ++ # need by rules_boost ++ http_archive( ++ name = "net_zlib_zlib", ++ strip_prefix = "zlib-1.2.11", ++ urls = ["file:///tmp/.ray_deps/zlib-1.2.11.tar.gz"], ++ build_file = "@com_github_nelhage_rules_boost//:BUILD.zlib", ++ ) ++ ++ # need by rules_boost ++ http_archive( ++ name = "org_bzip_bzip2", ++ strip_prefix = "bzip2-1.0.8", ++ urls = ["file:///tmp/.ray_deps/bzip2-1.0.8.tar.gz"], ++ build_file = "@com_github_nelhage_rules_boost//:BUILD.bzip2", ++ ) ++ ++ # need by rules_boost ++ http_archive( ++ name = "org_lzma_lzma", ++ strip_prefix = "xz-5.2.5", ++ urls = ["file:///tmp/.ray_deps/xz-5.2.5.tar.gz"], ++ build_file = "@com_github_nelhage_rules_boost//:BUILD.lzma", ++ ) ++ ++ # need by rules_boost ++ http_archive( ++ name = "com_github_facebook_zstd", ++ strip_prefix = "zstd-1.5.0", ++ urls = ["file:///tmp/.ray_deps/zstd-1.5.0.tar.gz"], ++ build_file = "@com_github_nelhage_rules_boost//:BUILD.zstd", ++ ) ++ ++ # need by rules_boost ++ http_archive( ++ name = "boost", ++ strip_prefix = "boost_1_83_0", ++ urls = ["file:///tmp/.ray_deps/boost-1.83.0.tar.gz"], ++ build_file = "@com_github_nelhage_rules_boost//:BUILD.boost", ++ ) ++ ++ # need by protobuf ++ http_archive( ++ name = "utf8_range", ++ strip_prefix = "utf8_range-de0b4a8ff9b5d4c98108bdfe723291a33c52c54f", ++ urls = ["file:///tmp/.ray_deps/utf8_range-de0b4a8ff9b5d4c98108bdfe723291a33c52c54f.tar.gz"], ++ ) ++ ++ # need by protobuf ++ http_archive( ++ name = "rules_cc", ++ strip_prefix = "rules_cc-0.0.6", ++ urls = ["file:///tmp/.ray_deps/rules_cc-0.0.6.tar.gz"], ++ ) ++ ++ # need by protobuf ++ http_archive( ++ name = "rules_java", ++ strip_prefix = "rules_java-0.1.0", ++ urls = ["file:///tmp/.ray_deps/rules_java-0.1.0.tar.gz"], ++ ) ++ ++ # need by protobuf ++ http_archive( ++ name = "rules_proto", ++ strip_prefix = "rules_proto-5.3.0-21.7", ++ urls = ["file:///tmp/.ray_deps/rules_proto-5.3.0.21.7.tar.gz"], ++ ) ++ ++ # need by protobuf ++ http_archive( ++ name = "rules_pkg", ++ strip_prefix = "rules_pkg-0.7.0", ++ urls = ["file:///tmp/.ray_deps/rules_pkg-0.7.0.tar.gz"], ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "zlib", ++ strip_prefix = "zlib-1.2.11", ++ urls = ["file:///tmp/.ray_deps/zlib-1.2.11.tar.gz"], ++ build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD", ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "rules_cc", ++ strip_prefix = "rules_cc-0.0.6", ++ urls = ["file:///tmp/.ray_deps/rules_cc-0.0.6.tar.gz"], ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "com_googlesource_code_re2", ++ strip_prefix = "re2-2021-11-01", ++ urls = ["file:///tmp/.ray_deps/re2-20211101.tar.gz"], ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "com_github_cares_cares", ++ strip_prefix = "c-ares-1.19.1", ++ urls = ["file:///tmp/.ray_deps/c-ares-1.19.1.tar.gz"], ++ build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD", ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "envoy_api", ++ strip_prefix = "data-plane-api-9d6ffa70677c4dbf23f6ed569676206c4e2edff4", ++ urls = ["file:///tmp/.ray_deps/data-plane-api-9d6ffa70677c4dbf23f6ed569676206c4e2edff4.tar.gz"], ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "io_bazel_rules_go", ++ strip_prefix = "rules_go-v0.27.0", ++ urls = ["file:///tmp/.ray_deps/rules_go-0.27.0.tar.gz"], ++ patches = ["@com_github_ray_project_ray//oe-build/patches:patch-for-adapting-rules_go-to-golang.patch"], ++ patch_args = ["-p1"], ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "com_google_googleapis", ++ strip_prefix = "googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92", ++ urls = ["file:///tmp/.ray_deps/googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz"], ++ build_file = Label("@com_github_grpc_grpc//bazel:googleapis.BUILD"), ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "bazel_gazelle", ++ strip_prefix = "bazel-gazelle-0.24.0", ++ urls = ["file:///tmp/.ray_deps/bazel-gazelle-0.24.0.tar.gz"], ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "opencensus_proto", ++ strip_prefix = "opencensus-proto-0.3.0/src", ++ urls = ["file:///tmp/.ray_deps/opencensus-proto-0.3.0.tar.gz"], ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "com_envoyproxy_protoc_gen_validate", ++ strip_prefix = "protoc-gen-validate-0.6.7", ++ urls = ["file:///tmp/.ray_deps/protoc-gen-validate-0.6.7.tar.gz"], ++ patches = ["@com_github_grpc_grpc//third_party:protoc-gen-validate.patch"], ++ patch_args = ["-p1"], ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "com_github_cncf_udpa", ++ strip_prefix = "xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7", ++ urls = ["file:///tmp/.ray_deps/xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz"], ++ ) ++ ++ # need by grpc ++ http_archive( ++ name = "google_cloud_cpp", ++ strip_prefix = "google-cloud-cpp-v2.16.0/google-cloud-cpp-2.16.0", ++ urls = ["file:///tmp/.ray_deps/google-cloud-cpp-2.16.0.tar.gz"], ++ ) +-- +2.33.0 + diff --git a/create-an-oe-build-patches-BUILD-file-to-store-patch.patch b/create-an-oe-build-patches-BUILD-file-to-store-patch.patch deleted file mode 100644 index 1a4f76a..0000000 --- a/create-an-oe-build-patches-BUILD-file-to-store-patch.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 82efff2ff021fd9db39196ae486b2cc0e2e4b0c6 Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Wed, 2 Apr 2025 11:24:49 +0800 -Subject: [PATCH] create an oe-build/patches/BUILD file to store patches - ---- - oe-build/patches/BUILD | 2 ++ - 1 file changed, 2 insertions(+) - create mode 100644 oe-build/patches/BUILD - -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -new file mode 100644 -index 0000000..66116dc ---- /dev/null -+++ b/oe-build/patches/BUILD -@@ -0,0 +1,2 @@ -+exports_files([ -+]) -\ No newline at end of file --- -2.33.0 - diff --git a/grpc-add-the-patch-to-adapt-rules_go.patch b/grpc-add-the-patch-to-adapt-rules_go.patch deleted file mode 100644 index 3338496..0000000 --- a/grpc-add-the-patch-to-adapt-rules_go.patch +++ /dev/null @@ -1,140 +0,0 @@ -From 377f17e301e16d6b9203710c3a8a2574ea74ed4a Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Wed, 2 Apr 2025 16:52:31 +0800 -Subject: [PATCH] grpc: add the patch to adapt rules_go - ---- - bazel/ray_deps_setup.bzl | 1 + - oe-build/patches/BUILD | 1 + - ...grpc-add-the-patch-to-adapt-rules_go.patch | 88 +++++++++++++++++++ - 3 files changed, 90 insertions(+) - create mode 100644 oe-build/patches/grpc-add-the-patch-to-adapt-rules_go.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index f532d16..8572060 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -257,6 +257,7 @@ def ray_deps_setup(): - "@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch", - "@com_github_ray_project_ray//oe-build/patches:grpc-modify-the-dependencies-in-bazel-build.patch", - "@com_github_ray_project_ray//oe-build/patches:grpc-remove-ios-related-features.patch", -+ "@com_github_ray_project_ray//oe-build/patches:grpc-add-the-patch-to-adapt-rules_go.patch", - ], - patch_args = ["-p1"], - ) -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index ba745ce..49388c4 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -3,4 +3,5 @@ exports_files([ - "rules_perl-modify-the-dependencies-in-bazel-build.patch", - "grpc-modify-the-dependencies-in-bazel-build.patch", - "grpc-remove-ios-related-features.patch", -+ "grpc-add-the-patch-to-adapt-rules_go.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/grpc-add-the-patch-to-adapt-rules_go.patch b/oe-build/patches/grpc-add-the-patch-to-adapt-rules_go.patch -new file mode 100644 -index 0000000..231bb39 ---- /dev/null -+++ b/oe-build/patches/grpc-add-the-patch-to-adapt-rules_go.patch -@@ -0,0 +1,96 @@ -+diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl -+index 8c95d37..4c4bedc 100644 -+--- a/bazel/grpc_deps.bzl -++++ b/bazel/grpc_deps.bzl -+@@ -402,6 +402,8 @@ def grpc_deps(): -+ urls = [ -+ "file:///tmp/.ray_deps/rules_go-0.27.0.tar.gz", -+ ], -++ patches = ["@com_github_grpc_grpc//oe-build/patches:rules_go-modify-the-dependencies-in-bazel.patch"], -++ patch_args = ["-p1"], -+ ) -+ -+ if "com_google_googleapis" not in native.existing_rules(): -+diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -+new file mode 100644 -+index 0000000..e762657 -+--- /dev/null -++++ b/oe-build/patches/BUILD -+@@ -0,0 +1,3 @@ -++exports_files([ -++ "rules_go-modify-the-dependencies-in-bazel.patch", -++]) -+\ No newline at end of file -+diff --git a/oe-build/patches/rules_go-modify-the-dependencies-in-bazel.patch b/oe-build/patches/rules_go-modify-the-dependencies-in-bazel.patch -+new file mode 100644 -+index 0000000..7c4305a -+--- /dev/null -++++ b/oe-build/patches/rules_go-modify-the-dependencies-in-bazel.patch -+@@ -0,0 +1,64 @@ -++diff --git a/go/private/sdk.bzl b/go/private/sdk.bzl -++index d5b2eac..23174c0 100644 -++--- a/go/private/sdk.bzl -+++++ b/go/private/sdk.bzl -++@@ -67,15 +67,7 @@ def _go_download_sdk_impl(ctx): -++ ctx.report_progress("Finding latest Go version") -++ else: -++ ctx.report_progress("Finding Go SHA-256 sums") -++- ctx.download( -++- url = [ -++- "https://golang.org/dl/?mode=json&include=all", -++- "https://golang.google.cn/dl/?mode=json&include=all", -++- ], -++- output = "versions.json", -++- ) -++- -++- data = ctx.read("versions.json") -+++ data = ctx.read("../io_bazel_rules_go/go/private/versions.json") -++ sdks_by_version = _parse_versions_json(data) -++ -++ if not version: -++@@ -119,7 +111,7 @@ _go_download_sdk = repository_rule( -++ "goos": attr.string(), -++ "goarch": attr.string(), -++ "sdks": attr.string_list_dict(), -++- "urls": attr.string_list(default = ["https://dl.google.com/go/{}"]), -+++ "urls": attr.string_list(default = ["file:///tmp/.ray_deps/golang-1.17.3.tar.gz"]), -++ "version": attr.string(), -++ "strip_prefix": attr.string(default = "go"), -++ }, -++diff --git a/go/private/versions.json b/go/private/versions.json -++new file mode 100644 -++index 0000000..aa924d7 -++--- /dev/null -+++++ b/go/private/versions.json -++@@ -0,0 +1,24 @@ -+++[ -+++ { -+++ "version": "go1.17.3", -+++ "stable": true, -+++ "files": [ -+++ { -+++ "filename": "go1.17.3.linux-amd64.tar.gz", -+++ "os": "linux", -+++ "arch": "amd64", -+++ "version": "go1.17.3", -+++ "sha256": "", -+++ "kind": "archive" -+++ }, -+++ { -+++ "filename": "go1.17.3.linux-arm64.tar.gz", -+++ "os": "linux", -+++ "arch": "arm64", -+++ "version": "go1.17.3", -+++ "sha256": "", -+++ "kind": "archive" -+++ } -+++ ] -+++ } -+++] -++\ No newline at end of file -++-- -++2.33.0 -++ -+-- -+2.33.0 -+ --- -2.33.0 - diff --git a/grpc-modify-the-dependencies-in-bazel-build.patch b/grpc-modify-the-dependencies-in-bazel-build.patch deleted file mode 100644 index d7d3bba..0000000 --- a/grpc-modify-the-dependencies-in-bazel-build.patch +++ /dev/null @@ -1,246 +0,0 @@ -From 190e23ac4eacf2ec1ebc28b4b8741d9ed7baeb55 Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Wed, 2 Apr 2025 16:03:02 +0800 -Subject: [PATCH] grpc: modify the dependencies in bazel build - ---- - bazel/ray_deps_setup.bzl | 1 + - oe-build/patches/BUILD | 1 + - ...dify-the-dependencies-in-bazel-build.patch | 202 ++++++++++++++++++ - 3 files changed, 204 insertions(+) - create mode 100644 oe-build/patches/grpc-modify-the-dependencies-in-bazel-build.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index 78c9577..cf2c3fa 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -246,6 +246,7 @@ def ray_deps_setup(): - urls = ["file:///tmp/.ray_deps/grpc-1.60.0.tar.gz",], - patches = [ - "@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch", -+ "@com_github_ray_project_ray//oe-build/patches:grpc-modify-the-dependencies-in-bazel-build.patch", - ], - patch_args = ["-p1"], - ) -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index d9229a2..cea361d 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -1,4 +1,5 @@ - exports_files([ - "ray-add-the-patch-to-adapt-flatbuffers.patch", - "rules_perl-modify-the-dependencies-in-bazel-build.patch", -+ "grpc-modify-the-dependencies-in-bazel-build.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/grpc-modify-the-dependencies-in-bazel-build.patch b/oe-build/patches/grpc-modify-the-dependencies-in-bazel-build.patch -new file mode 100644 -index 0000000..758e8a9 ---- /dev/null -+++ b/oe-build/patches/grpc-modify-the-dependencies-in-bazel-build.patch -@@ -0,0 +1,202 @@ -+diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl -+index a982d80..a662aaa 100644 -+--- a/bazel/grpc_deps.bzl -++++ b/bazel/grpc_deps.bzl -+@@ -247,11 +247,9 @@ def grpc_deps(): -+ http_archive( -+ name = "zlib", -+ build_file = "@com_github_grpc_grpc//third_party:zlib.BUILD", -+- sha256 = "90f43a9c998740e8a0db24b0af0147033db2aaaa99423129abbd76640757cac9", -+- strip_prefix = "zlib-04f42ceca40f73e2978b50e93806c2a18c1281fc", -++ strip_prefix = "zlib-1.2.11", -+ urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/madler/zlib/archive/04f42ceca40f73e2978b50e93806c2a18c1281fc.tar.gz", -+- "https://github.com/madler/zlib/archive/04f42ceca40f73e2978b50e93806c2a18c1281fc.tar.gz", -++ "file:///tmp/.ray_deps/zlib-1.2.11.tar.gz", -+ ], -+ ) -+ -+@@ -274,11 +272,10 @@ def grpc_deps(): -+ if "com_google_googletest" not in native.existing_rules(): -+ http_archive( -+ name = "com_google_googletest", -+- sha256 = "31bf78bd91b96dd5e24fab3bb1d7f3f7453ccbaceec9afb86d6e4816a15ab109", -+- strip_prefix = "googletest-2dd1c131950043a8ad5ab0d2dda0e0970596586a", -++ strip_prefix = "googletest-1.14.0", -+ urls = [ -+ # 2023-10-09 -+- "https://github.com/google/googletest/archive/2dd1c131950043a8ad5ab0d2dda0e0970596586a.tar.gz", -++ "file:///tmp/.ray_deps/gtest-1.14.0.tar.gz", -+ ], -+ ) -+ -+@@ -298,11 +295,9 @@ def grpc_deps(): -+ if "rules_cc" not in native.existing_rules(): -+ http_archive( -+ name = "rules_cc", -+- sha256 = "3d9e271e2876ba42e114c9b9bc51454e379cbf0ec9ef9d40e2ae4cec61a31b40", -+ strip_prefix = "rules_cc-0.0.6", -+ urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz", -+- "https://github.com/bazelbuild/rules_cc/releases/download/0.0.6/rules_cc-0.0.6.tar.gz", -++ "file:///tmp/.ray_deps/rules_cc-0.0.6.tar.gz", -+ ], -+ ) -+ -+@@ -320,11 +315,9 @@ def grpc_deps(): -+ if "com_googlesource_code_re2" not in native.existing_rules(): -+ http_archive( -+ name = "com_googlesource_code_re2", -+- sha256 = "1ae8ccfdb1066a731bba6ee0881baad5efd2cd661acd9569b689f2586e1a50e9", -+- strip_prefix = "re2-2022-04-01", -++ strip_prefix = "re2-2021-11-01", -+ urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/google/re2/archive/2022-04-01.tar.gz", -+- "https://github.com/google/re2/archive/2022-04-01.tar.gz", -++ "file:///tmp/.ray_deps/re2-20211101.tar.gz", -+ ], -+ ) -+ -+@@ -332,11 +325,9 @@ def grpc_deps(): -+ http_archive( -+ name = "com_github_cares_cares", -+ build_file = "@com_github_grpc_grpc//third_party:cares/cares.BUILD", -+- sha256 = "bf26e5b25e259911914a85ae847b6d723488adb5af4f8bdeb9d0871a318476e3", -+- strip_prefix = "c-ares-6360e96b5cf8e5980c887ce58ef727e53d77243a", -++ strip_prefix = "c-ares-1.19.1", -+ urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/c-ares/c-ares/archive/6360e96b5cf8e5980c887ce58ef727e53d77243a.tar.gz", -+- "https://github.com/c-ares/c-ares/archive/6360e96b5cf8e5980c887ce58ef727e53d77243a.tar.gz", -++ "file:///tmp/.ray_deps/c-ares-1.19.1.tar.gz", -+ ], -+ ) -+ -+@@ -398,21 +389,18 @@ def grpc_deps(): -+ if "envoy_api" not in native.existing_rules(): -+ http_archive( -+ name = "envoy_api", -+- sha256 = "fff067a5d6d776fc88549b5dd4773a6f8f0187b26a859de8b29bd4226a28ee63", -+ strip_prefix = "data-plane-api-9d6ffa70677c4dbf23f6ed569676206c4e2edff4", -+ urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/envoyproxy/data-plane-api/archive/9d6ffa70677c4dbf23f6ed569676206c4e2edff4.tar.gz", -+- "https://github.com/envoyproxy/data-plane-api/archive/9d6ffa70677c4dbf23f6ed569676206c4e2edff4.tar.gz", -++ "file:///tmp/.ray_deps/data-plane-api-9d6ffa70677c4dbf23f6ed569676206c4e2edff4.tar.gz", -+ ], -+ ) -+ -+ if "io_bazel_rules_go" not in native.existing_rules(): -+ http_archive( -+ name = "io_bazel_rules_go", -+- sha256 = "69de5c704a05ff37862f7e0f5534d4f479418afc21806c887db544a316f3cb6b", -++ strip_prefix = "rules_go-v0.27.0", -+ urls = [ -+- "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.27.0/rules_go-v0.27.0.tar.gz", -+- "https://github.com/bazelbuild/rules_go/releases/download/v0.27.0/rules_go-v0.27.0.tar.gz", -++ "file:///tmp/.ray_deps/rules_go-0.27.0.tar.gz", -+ ], -+ ) -+ -+@@ -439,43 +427,37 @@ def grpc_deps(): -+ if "com_google_googleapis" not in native.existing_rules(): -+ http_archive( -+ name = "com_google_googleapis", -+- sha256 = "5bb6b0253ccf64b53d6c7249625a7e3f6c3bc6402abd52d3778bfa48258703a0", -+ strip_prefix = "googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92", -+ build_file = Label("//bazel:googleapis.BUILD"), -+ urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz", -+- "https://github.com/googleapis/googleapis/archive/2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz", -++ "file:///tmp/.ray_deps/googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92.tar.gz", -+ ], -+ ) -+ -+ if "bazel_gazelle" not in native.existing_rules(): -+ http_archive( -+ name = "bazel_gazelle", -+- sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb", -++ strip_prefix = "bazel-gazelle-0.24.0", -+ urls = [ -+- "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", -+- "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz", -++ "file:///tmp/.ray_deps/bazel-gazelle-0.24.0.tar.gz", -+ ], -+ ) -+ -+ if "opencensus_proto" not in native.existing_rules(): -+ http_archive( -+ name = "opencensus_proto", -+- sha256 = "b7e13f0b4259e80c3070b583c2f39e53153085a6918718b1c710caf7037572b0", -+ strip_prefix = "opencensus-proto-0.3.0/src", -+ urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz", -+- "https://github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz", -++ "file:///tmp/.ray_deps/opencensus-proto-0.3.0.tar.gz", -+ ], -+ ) -+ -+ if "com_envoyproxy_protoc_gen_validate" not in native.existing_rules(): -+ http_archive( -+ name = "com_envoyproxy_protoc_gen_validate", -+- strip_prefix = "protoc-gen-validate-4694024279bdac52b77e22dc87808bd0fd732b69", -+- sha256 = "1e490b98005664d149b379a9529a6aa05932b8a11b76b4cd86f3d22d76346f47", -++ strip_prefix = "protoc-gen-validate-0.6.7", -+ urls = [ -+- "https://github.com/envoyproxy/protoc-gen-validate/archive/4694024279bdac52b77e22dc87808bd0fd732b69.tar.gz", -++ "file:///tmp/.ray_deps/protoc-gen-validate-0.6.7.tar.gz", -+ ], -+ patches = ["@com_github_grpc_grpc//third_party:protoc-gen-validate.patch"], -+ patch_args = ["-p1"], -+@@ -484,11 +466,9 @@ def grpc_deps(): -+ if "com_github_cncf_udpa" not in native.existing_rules(): -+ http_archive( -+ name = "com_github_cncf_udpa", -+- sha256 = "0d33b83f8c6368954e72e7785539f0d272a8aba2f6e2e336ed15fd1514bc9899", -+ strip_prefix = "xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7", -+ urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz", -+- "https://github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz", -++ "file:///tmp/.ray_deps/xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz", -+ ], -+ ) -+ -+@@ -523,11 +503,9 @@ def grpc_deps(): -+ if "google_cloud_cpp" not in native.existing_rules(): -+ http_archive( -+ name = "google_cloud_cpp", -+- sha256 = "7ca7f583b60d2aa1274411fed3b9fb3887119b2e84244bb3fc69ea1db819e4e5", -+- strip_prefix = "google-cloud-cpp-2.16.0", -++ strip_prefix = "google-cloud-cpp-v2.16.0/google-cloud-cpp-2.16.0", -+ urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz", -+- "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz", -++ "file:///tmp/.ray_deps/google-cloud-cpp-2.16.0.tar.gz", -+ ], -+ ) -+ -+diff --git a/bazel/grpc_extra_deps.bzl b/bazel/grpc_extra_deps.bzl -+index 2ad8a69..5b0e326 100644 -+--- a/bazel/grpc_extra_deps.bzl -++++ b/bazel/grpc_extra_deps.bzl -+@@ -51,7 +51,7 @@ def grpc_extra_deps(ignore_version_differences = False): -+ api_dependencies() -+ -+ go_rules_dependencies() -+- go_register_toolchains(version = "1.18") -++ go_register_toolchains(version = "1.17.3") -+ gazelle_dependencies() -+ -+ # Pull-in the go 3rd party dependencies for protoc_gen_validate, which is -+diff --git a/third_party/protobuf.patch b/third_party/protobuf.patch -+index a7b1cad..7feb79b 100644 -+--- a/third_party/protobuf.patch -++++ b/third_party/protobuf.patch -+@@ -5,7 +5,7 @@ index 45a6c20c5..c28dd8852 100755 -+ @@ -8,3 +8,9 @@ -+ # Copyright 2007 Google Inc. All Rights Reserved. -+ -+- __version__ = '4.25.0' -++ __version__ = '4.25.1' -+ + -+ +if __name__ != '__main__': -+ + try: -+-- --- -2.33.0 - diff --git a/grpc-remove-ios-related-features.patch b/grpc-remove-ios-related-features.patch deleted file mode 100644 index 98dcd2f..0000000 --- a/grpc-remove-ios-related-features.patch +++ /dev/null @@ -1,378 +0,0 @@ -From 6e3be54c9fdddf05e357a719db559104695ad3be Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Wed, 2 Apr 2025 16:20:31 +0800 -Subject: [PATCH] grpc: remove ios related features - ---- - bazel/ray_deps_setup.bzl | 1 + - oe-build/patches/BUILD | 1 + - .../grpc-remove-ios-related-features.patch | 368 ++++++++++++++++++ - 3 files changed, 370 insertions(+) - create mode 100644 oe-build/patches/grpc-remove-ios-related-features.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index 327532c..0329598 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -256,6 +256,7 @@ def ray_deps_setup(): - patches = [ - "@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch", - "@com_github_ray_project_ray//oe-build/patches:grpc-modify-the-dependencies-in-bazel-build.patch", -+ "@com_github_ray_project_ray//oe-build/patches:grpc-remove-ios-related-features.patch", - ], - patch_args = ["-p1"], - ) -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index cea361d..ba745ce 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -2,4 +2,5 @@ exports_files([ - "ray-add-the-patch-to-adapt-flatbuffers.patch", - "rules_perl-modify-the-dependencies-in-bazel-build.patch", - "grpc-modify-the-dependencies-in-bazel-build.patch", -+ "grpc-remove-ios-related-features.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/grpc-remove-ios-related-features.patch b/oe-build/patches/grpc-remove-ios-related-features.patch -new file mode 100644 -index 0000000..db93eb0 ---- /dev/null -+++ b/oe-build/patches/grpc-remove-ios-related-features.patch -@@ -0,0 +1,334 @@ -+diff --git a/bazel/grpc_build_system.bzl b/bazel/grpc_build_system.bzl -+index f4d1310..ec27f65 100644 -+--- a/bazel/grpc_build_system.bzl -++++ b/bazel/grpc_build_system.bzl -+@@ -31,8 +31,6 @@ load("//bazel:cc_grpc_library.bzl", "cc_grpc_library") -+ load("//bazel:copts.bzl", "GRPC_DEFAULT_COPTS") -+ load("//bazel:experiments.bzl", "EXPERIMENTS") -+ load("//bazel:test_experiments.bzl", "TEST_EXPERIMENTS") -+-load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") -+-load("@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", "ios_test_runner") -+ load("@com_google_protobuf//bazel:upb_proto_library.bzl", "upb_proto_library", "upb_proto_reflection_library") -+ -+ # The set of pollers to test against if a test exercises polling -+@@ -238,46 +236,6 @@ def grpc_proto_library( -+ generate_mocks = generate_mocks, -+ ) -+ -+-def ios_cc_test( -+- name, -+- tags = [], -+- **kwargs): -+- """An ios C++ test target. -+- -+- Args: -+- name: The name of the test. -+- tags: The tags to apply to the test. -+- **kwargs: All other arguments to apply. -+- """ -+- test_lib_ios = name + "_test_lib_ios" -+- ios_tags = tags + ["manual", "ios_cc_test"] -+- test_runner = "ios_x86_64_sim_runner_" + name -+- ios_test_runner( -+- name = test_runner, -+- device_type = "iPhone X", -+- ) -+- if not any([t for t in tags if t.startswith("no_test_ios")]): -+- native.objc_library( -+- name = test_lib_ios, -+- srcs = kwargs.get("srcs"), -+- deps = kwargs.get("deps"), -+- copts = kwargs.get("copts"), -+- data = kwargs.get("data"), -+- tags = ios_tags, -+- alwayslink = 1, -+- testonly = 1, -+- ) -+- ios_test_deps = [":" + test_lib_ios] -+- ios_unit_test( -+- name = name + "_on_ios", -+- size = kwargs.get("size"), -+- data = kwargs.get("data"), -+- tags = ios_tags, -+- minimum_os_version = "9.0", -+- runner = test_runner, -+- deps = ios_test_deps, -+- ) -+- -+ def expand_tests(name, srcs, deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky): -+ """Common logic used to parameterize tests for every poller and EventEngine and experiment. -+ -+@@ -498,17 +456,6 @@ def grpc_cc_test(name, srcs = [], deps = [], external_deps = [], args = [], data -+ "linkstatic": linkstatic, -+ } -+ -+- if "grpc-fuzzer" not in tags and "no_test_ios" not in tags: -+- ios_cc_test( -+- name = name, -+- srcs = srcs, -+- tags = tags, -+- deps = core_deps, -+- args = args, -+- flaky = True, -+- **test_args -+- ) -+- -+ for poller_config in expand_tests(name, srcs, core_deps, tags, args, exclude_pollers, uses_polling, uses_event_engine, flaky): -+ native.cc_test( -+ name = poller_config["name"], -+diff --git a/bazel/grpc_deps.bzl b/bazel/grpc_deps.bzl -+index 174195f..8c95d37 100644 -+--- a/bazel/grpc_deps.bzl -++++ b/bazel/grpc_deps.bzl -+@@ -404,26 +404,6 @@ def grpc_deps(): -+ ], -+ ) -+ -+- if "build_bazel_rules_apple" not in native.existing_rules(): -+- http_archive( -+- name = "build_bazel_rules_apple", -+- sha256 = "f94e6dddf74739ef5cb30f000e13a2a613f6ebfa5e63588305a71fce8a8a9911", -+- urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/rules_apple/releases/download/1.1.3/rules_apple.1.1.3.tar.gz", -+- "https://github.com/bazelbuild/rules_apple/releases/download/1.1.3/rules_apple.1.1.3.tar.gz", -+- ], -+- ) -+- -+- if "build_bazel_apple_support" not in native.existing_rules(): -+- http_archive( -+- name = "build_bazel_apple_support", -+- sha256 = "f4fdf5c9b42b92ea12f229b265d74bb8cedb8208ca7a445b383c9f866cf53392", -+- urls = [ -+- "https://storage.googleapis.com/grpc-bazel-mirror/github.com/bazelbuild/apple_support/releases/download/1.3.1/apple_support.1.3.1.tar.gz", -+- "https://github.com/bazelbuild/apple_support/releases/download/1.3.1/apple_support.1.3.1.tar.gz", -+- ], -+- ) -+- -+ if "com_google_googleapis" not in native.existing_rules(): -+ http_archive( -+ name = "com_google_googleapis", -+diff --git a/bazel/grpc_extra_deps.bzl b/bazel/grpc_extra_deps.bzl -+index 5b0e326..b10fc8e 100644 -+--- a/bazel/grpc_extra_deps.bzl -++++ b/bazel/grpc_extra_deps.bzl -+@@ -14,8 +14,6 @@ -+ """Loads the dependencies necessary for the external repositories defined in grpc_deps.bzl.""" -+ -+ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies") -+-load("@build_bazel_apple_support//lib:repositories.bzl", "apple_support_dependencies") -+-load("@build_bazel_rules_apple//apple:repositories.bzl", "apple_rules_dependencies") -+ load("@com_envoyproxy_protoc_gen_validate//:dependencies.bzl", "go_third_party") -+ load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language") -+ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") -+@@ -58,10 +56,6 @@ def grpc_extra_deps(ignore_version_differences = False): -+ # needed for building C++ xDS protos -+ go_third_party() -+ -+- apple_rules_dependencies(ignore_version_differences = ignore_version_differences) -+- -+- apple_support_dependencies() -+- -+ # Initialize Google APIs with only C++ and Python targets -+ switched_rules_by_language( -+ name = "com_google_googleapis_imports", -+diff --git a/examples/objective-c/BUILD b/examples/objective-c/BUILD -+index 422f851..7a02df9 100644 -+--- a/examples/objective-c/BUILD -++++ b/examples/objective-c/BUILD -+@@ -13,8 +13,6 @@ -+ # limitations under the License. -+ -+ load("@com_github_grpc_grpc//bazel:objc_grpc_library.bzl", "objc_grpc_library") -+-load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application") -+-load("@build_bazel_rules_apple//apple:macos.bzl", "macos_application") -+ -+ licenses(["notice"]) -+ -+diff --git a/src/objective-c/BUILD b/src/objective-c/BUILD -+index 7950924..7d79331 100644 -+--- a/src/objective-c/BUILD -++++ b/src/objective-c/BUILD -+@@ -15,7 +15,6 @@ -+ # limitations under the License. -+ -+ load("//bazel:grpc_build_system.bzl", "grpc_generate_objc_one_off_targets", "grpc_objc_library") -+-load("@build_bazel_rules_apple//apple:resources.bzl", "apple_resource_bundle") -+ -+ licenses(["notice"]) -+ -+diff --git a/src/objective-c/examples/BUILD b/src/objective-c/examples/BUILD -+index d407901..b390edb 100644 -+--- a/src/objective-c/examples/BUILD -++++ b/src/objective-c/examples/BUILD -+@@ -20,9 +20,6 @@ load( -+ "local_objc_grpc_library", -+ "proto_library_objc_wrapper", -+ ) -+-load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application") -+-load("@build_bazel_rules_apple//apple:tvos.bzl", "tvos_application") -+-load("@build_bazel_rules_apple//apple:watchos.bzl", "watchos_application", "watchos_extension") -+ -+ licenses(["notice"]) -+ -+diff --git a/src/objective-c/grpc_objc_internal_library.bzl b/src/objective-c/grpc_objc_internal_library.bzl -+index 5d88486..19419fc 100644 -+--- a/src/objective-c/grpc_objc_internal_library.bzl -++++ b/src/objective-c/grpc_objc_internal_library.bzl -+@@ -32,11 +32,6 @@ load( -+ "generate_objc_srcs", -+ ) -+ load("//bazel:grpc_build_system.bzl", "grpc_objc_library") -+-load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") -+-load( -+- "@build_bazel_rules_apple//apple/testing/default_runner:ios_test_runner.bzl", -+- "ios_test_runner", -+-) -+ -+ # The default device type for ios objc unit tests -+ IOS_UNIT_TEST_DEVICE_TYPE = "iPhone 11" -+@@ -44,32 +39,6 @@ IOS_UNIT_TEST_DEVICE_TYPE = "iPhone 11" -+ # The default iOS version for ios objc unit tests -+ # IOS_UNIT_TEST_OS_VERSION = "13.3" -+ -+-def grpc_objc_ios_unit_test( -+- name, -+- deps, -+- env = {}): -+- """ios unit test for running objc test suite on iOS simulator runner -+- -+- Args: -+- name: The name of the unit test target. -+- deps: The dependencies of the target. -+- env: Optional test environment variables passed to the test -+- """ -+- test_runner = "grpc_ios_sim_runner_" + name -+- ios_test_runner( -+- name = test_runner, -+- device_type = IOS_UNIT_TEST_DEVICE_TYPE, -+- # os_version = IOS_UNIT_TEST_OS_VERSION, -+- test_environment = env, -+- ) -+- -+- ios_unit_test( -+- name = name, -+- minimum_os_version = "9.0", -+- runner = test_runner, -+- deps = deps, -+- ) -+- -+ def proto_library_objc_wrapper( -+ name, -+ srcs, -+diff --git a/src/objective-c/tests/BUILD b/src/objective-c/tests/BUILD -+index d5544d6..8ccbbf5 100644 -+--- a/src/objective-c/tests/BUILD -++++ b/src/objective-c/tests/BUILD -+@@ -17,14 +17,10 @@ -+ load("//bazel:grpc_build_system.bzl", "grpc_sh_test") -+ load( -+ "//src/objective-c:grpc_objc_internal_library.bzl", -+- "grpc_objc_ios_unit_test", -+ "grpc_objc_testing_library", -+ "local_objc_grpc_library", -+ "proto_library_objc_wrapper", -+ ) -+-load("@build_bazel_rules_apple//apple:resources.bzl", "apple_resource_bundle") -+-load("@build_bazel_rules_apple//apple:macos.bzl", "macos_unit_test") -+-load("@build_bazel_rules_apple//apple:tvos.bzl", "tvos_application", "tvos_unit_test") -+ -+ licenses(["notice"]) -+ -+@@ -251,27 +247,6 @@ grpc_objc_testing_library( -+ ], -+ ) -+ -+-grpc_objc_ios_unit_test( -+- name = "InteropTestsLocalCleartext", -+- deps = [ -+- ":InteropTestsLocalCleartext-lib", -+- ], -+-) -+- -+-grpc_objc_ios_unit_test( -+- name = "InteropTestsLocalSSL", -+- deps = [ -+- ":InteropTestsLocalSSL-lib", -+- ], -+-) -+- -+-grpc_objc_ios_unit_test( -+- name = "InteropTestsRemote", -+- deps = [ -+- ":InteropTestsRemote-lib", -+- ], -+-) -+- -+ # TODO: Enable this again once @CronetFramework is working -+ # grpc_objc_ios_unit_test( -+ # name = "CronetTests", -+@@ -328,11 +271,6 @@ grpc_objc_testing_library( -+ ], -+ ) -+ -+-grpc_objc_ios_unit_test( -+- name = "CFStreamTests", -+- deps = [":CFStreamTests-lib"], -+-) -+- -+ grpc_objc_testing_library( -+ name = "EventEngineClientTests-lib", -+ srcs = ["EventEngineTests/CFEventEngineClientTests.mm"], -+@@ -356,16 +294,6 @@ grpc_objc_testing_library( -+ ], -+ ) -+ -+-grpc_objc_ios_unit_test( -+- name = "EventEngineClientTests", -+- deps = [":EventEngineClientTests-lib"], -+-) -+- -+-grpc_objc_ios_unit_test( -+- name = "EventEngineUnitTests", -+- deps = [":EventEngineUnitTests-lib"], -+-) -+- -+ # Note that bazel currently doesn't support running tvos_unit_test -+ # See https://github.com/bazelbuild/rules_apple/blob/8d841342c238457896cd7596cc29b2d06c9a75f0/apple/testing/default_runner/tvos_test_runner.template.sh -+ tvos_unit_test( -+diff --git a/tools/internal_ci/macos/grpc_run_bazel_cpp_ios_tests.sh b/tools/internal_ci/macos/grpc_run_bazel_cpp_ios_tests.sh -+index 499d6f8..30e7ca8 100755 -+--- a/tools/internal_ci/macos/grpc_run_bazel_cpp_ios_tests.sh -++++ b/tools/internal_ci/macos/grpc_run_bazel_cpp_ios_tests.sh -+@@ -44,9 +44,6 @@ BAZEL_REMOTE_CACHE_ARGS=( -+ # TODO(jtattermusch): start running selected tests from //test/core too. -+ test_pattern="//test/cpp/end2end/... + //test/cpp/server/... + //test/cpp/client/... + //test/cpp/common/... + //test/cpp/codegen/... + //test/cpp/util/... + //test/cpp/grpclb/... + //test/cpp/test/... + //test/core/event_engine/..." -+ -+-# iOS tests are marked as "manual" to prevent them from running by default. To run them, we need to use "bazel query" to list them first. -+-ios_tests=$(tools/bazel query "kind(ios_unit_test, tests($test_pattern))" | grep '^//') -+- -+ python3 tools/run_tests/python_utils/bazel_report_helper.py --report_path bazel_cpp_ios_tests -+ -+ bazel_cpp_ios_tests/bazel_wrapper \ -+diff --git a/tools/run_tests/sanity/check_bazel_workspace.py b/tools/run_tests/sanity/check_bazel_workspace.py -+index bf3358e..74088e3 100755 -+--- a/tools/run_tests/sanity/check_bazel_workspace.py -++++ b/tools/run_tests/sanity/check_bazel_workspace.py -+@@ -70,8 +70,6 @@ _GRPC_DEP_NAMES = [ -+ _ZOPEFOUNDATION_ZOPE_INTERFACE_DEP_NAME, -+ _TWISTED_CONSTANTLY_DEP_NAME, -+ "io_bazel_rules_go", -+- "build_bazel_rules_apple", -+- "build_bazel_apple_support", -+ "com_googlesource_code_re2", -+ "bazel_gazelle", -+ "opencensus_proto", -+@@ -99,8 +97,6 @@ _GRPC_BAZEL_ONLY_DEPS = [ -+ _ZOPEFOUNDATION_ZOPE_INTERFACE_DEP_NAME, -+ _TWISTED_CONSTANTLY_DEP_NAME, -+ "io_bazel_rules_go", -+- "build_bazel_rules_apple", -+- "build_bazel_apple_support", -+ "com_googlesource_code_re2", -+ "bazel_gazelle", -+ "opencensus_proto", -+-- --- -2.33.0 - diff --git a/opencensus-add-a-patch-to-adapt-prometheus_cpp.patch b/opencensus-add-a-patch-to-adapt-prometheus_cpp.patch deleted file mode 100644 index a212917..0000000 --- a/opencensus-add-a-patch-to-adapt-prometheus_cpp.patch +++ /dev/null @@ -1,67 +0,0 @@ -From e3f91a577586761f72030af27d8fc6b5be6a645c Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Wed, 9 Apr 2025 18:46:42 +0800 -Subject: [PATCH] opencensus: add a patch to adapt prometheus_cpp - ---- - bazel/ray_deps_setup.bzl | 1 + - oe-build/patches/BUILD | 1 + - ...-add-a-patch-to-adapt-prometheus_cpp.patch | 23 +++++++++++++++++++ - 3 files changed, 25 insertions(+) - create mode 100644 oe-build/patches/opencensus-add-a-patch-to-adapt-prometheus_cpp.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index 15b1f20..b132c0a 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -214,6 +214,7 @@ def ray_deps_setup(): - patches = [ - "@com_github_ray_project_ray//thirdparty/patches:opencensus-cpp-harvest-interval.patch", - "@com_github_ray_project_ray//thirdparty/patches:opencensus-cpp-shutdown-api.patch", -+ "@com_github_ray_project_ray//oe-build/patches:opencensus-add-a-patch-to-adapt-prometheus_cpp.patch", - ], - patch_args = ["-p1"], - ) -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index b77974d..9a72080 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -10,4 +10,5 @@ exports_files([ - "rules_foreign_cc-modify-the-dependencies-in-bazel-build.patch", - "rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch", - "prometheus-cpp-modify-the-dependencies-in-bazel-build.patch", -+ "opencensus-add-a-patch-to-adapt-prometheus_cpp.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/opencensus-add-a-patch-to-adapt-prometheus_cpp.patch b/oe-build/patches/opencensus-add-a-patch-to-adapt-prometheus_cpp.patch -new file mode 100644 -index 0000000..5330e3b ---- /dev/null -+++ b/oe-build/patches/opencensus-add-a-patch-to-adapt-prometheus_cpp.patch -@@ -0,0 +1,23 @@ -+diff --git a/opencensus/exporters/stats/prometheus/BUILD b/opencensus/exporters/stats/prometheus/BUILD -+index 748c7e3..c27c339 100644 -+--- a/opencensus/exporters/stats/prometheus/BUILD -++++ b/opencensus/exporters/stats/prometheus/BUILD -+@@ -27,7 +27,7 @@ cc_library( -+ deps = [ -+ ":prometheus_utils", -+ "//opencensus/stats", -+- "@com_github_jupp0r_prometheus_cpp//:core", -++ "@com_github_jupp0r_prometheus_cpp//core", -+ ], -+ ) -+ -+@@ -41,7 +41,7 @@ cc_library( -+ copts = DEFAULT_COPTS, -+ deps = [ -+ "//opencensus/stats", -+- "@com_github_jupp0r_prometheus_cpp//:core", -++ "@com_github_jupp0r_prometheus_cpp//core", -+ "@com_google_absl//absl/strings", -+ "@com_google_absl//absl/time", -+ ], -+-- --- -2.33.0 - diff --git a/prometheus-cpp-modify-the-dependencies-in-ray-bazel-build.patch b/prometheus-cpp-modify-the-dependencies-in-ray-bazel-build.patch deleted file mode 100644 index 93ca4c6..0000000 --- a/prometheus-cpp-modify-the-dependencies-in-ray-bazel-build.patch +++ /dev/null @@ -1,150 +0,0 @@ -From 4f38c3f784a70725685de6f13aa18c792b116802 Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Thu, 3 Apr 2025 09:58:47 +0800 -Subject: [PATCH] prometheus-cpp: modify the dependencies in ray bazel build - ---- - bazel/ray_deps_setup.bzl | 2 ++ - oe-build/patches/BUILD | 1 + - ...dify-the-dependencies-in-bazel-build.patch | 32 +++++++++++++++++++ - .../patches/prometheus-windows-headers.patch | 6 ++-- - .../patches/prometheus-windows-pollfd.patch | 6 ++-- - .../patches/prometheus-windows-zlib.patch | 18 +++++------ - 6 files changed, 50 insertions(+), 15 deletions(-) - create mode 100644 oe-build/patches/prometheus-cpp-modify-the-dependencies-in-bazel-build.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index 3c98b39..630e068 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -238,7 +238,9 @@ def ray_deps_setup(): - # https://github.com/jupp0r/prometheus-cpp/pull/225 - "@com_github_ray_project_ray//thirdparty/patches:prometheus-windows-zlib.patch", - "@com_github_ray_project_ray//thirdparty/patches:prometheus-windows-pollfd.patch", -+ "@com_github_ray_project_ray//oe-build/patches:prometheus-cpp-modify-the-dependencies-in-bazel-build.patch", - ], -+ patch_args = ["-p1"], - ) - - auto_http_archive( -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index 8ab49dc..b77974d 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -9,4 +9,5 @@ exports_files([ - "rules_boost-modify-the-dependencies-in-bazel-build.patch", - "rules_foreign_cc-modify-the-dependencies-in-bazel-build.patch", - "rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch", -+ "prometheus-cpp-modify-the-dependencies-in-bazel-build.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/prometheus-cpp-modify-the-dependencies-in-bazel-build.patch b/oe-build/patches/prometheus-cpp-modify-the-dependencies-in-bazel-build.patch -new file mode 100644 -index 0000000..692ce17 ---- /dev/null -+++ b/oe-build/patches/prometheus-cpp-modify-the-dependencies-in-bazel-build.patch -@@ -0,0 +1,32 @@ -+diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl -+index 3202b16..f3be4be 100644 -+--- a/bazel/repositories.bzl -++++ b/bazel/repositories.bzl -+@@ -5,10 +5,9 @@ def prometheus_cpp_repositories(): -+ maybe( -+ http_archive, -+ name = "civetweb", -+- strip_prefix = "civetweb-2c1caa6e690bfe3b435a10c372ab2dcd14b872e8", -+- sha256 = "d576b2257fe116523e5644232868670dcdd6c89b8e42b69d51e26b146575ab6a", -++ strip_prefix = "civetweb-1.12", -+ urls = [ -+- "https://github.com/civetweb/civetweb/archive/2c1caa6e690bfe3b435a10c372ab2dcd14b872e8.tar.gz", -++ "file:///tmp/.ray_deps/civetweb-1.12.tar.gz", -+ ], -+ build_file = "@com_github_jupp0r_prometheus_cpp//bazel:civetweb.BUILD", -+ ) -+@@ -49,11 +49,9 @@ def prometheus_cpp_repositories(): -+ http_archive, -+ # Named "com_github_madler_zlib" to match gRPC's import of zlib. -+ name = "com_github_madler_zlib", -+- sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1", -+ strip_prefix = "zlib-1.2.11", -+ urls = [ -+- "https://mirror.bazel.build/zlib.net/zlib-1.2.11.tar.gz", -+- "https://zlib.net/zlib-1.2.11.tar.gz", -++ "file:///tmp/.ray_deps/zlib-1.2.11.tar.gz", -+ ], -+ build_file = "@com_github_jupp0r_prometheus_cpp//bazel:zlib.BUILD", -+ ) -+-- -+2.33.0 -diff --git a/thirdparty/patches/prometheus-windows-headers.patch b/thirdparty/patches/prometheus-windows-headers.patch -index ca9765d..8e32b97 100644 ---- a/thirdparty/patches/prometheus-windows-headers.patch -+++ b/thirdparty/patches/prometheus-windows-headers.patch -@@ -1,6 +1,6 @@ --diff --git core/src/histogram.cc core/src/histogram.cc ----- core/src/histogram.cc --+++ core/src/histogram.cc -+diff --git a/core/src/histogram.cc b/core/src/histogram.cc -+--- a/core/src/histogram.cc -++++ b/core/src/histogram.cc - @@ -6,1 +6,3 @@ - #include - +#include -diff --git a/thirdparty/patches/prometheus-windows-pollfd.patch b/thirdparty/patches/prometheus-windows-pollfd.patch -index 3b30942..3e2f588 100644 ---- a/thirdparty/patches/prometheus-windows-pollfd.patch -+++ b/thirdparty/patches/prometheus-windows-pollfd.patch -@@ -9,9 +9,9 @@ Hence we block Windows from defining pollfd (which this project doesn't use). - bazel/civetweb.BUILD | 7 +++++++ - 1 file changed, 7 insertions(+) - --diff --git bazel/civetweb.BUILD bazel/civetweb.BUILD ----- bazel/civetweb.BUILD --+++ bazel/civetweb.BUILD -+diff --git a/bazel/civetweb.BUILD b/bazel/civetweb.BUILD -+--- a/bazel/civetweb.BUILD -++++ b/bazel/civetweb.BUILD - @@ -9,6 +9,11 @@ config_setting( - values = {"cpu": "darwin_x86_64"}, - ) -diff --git a/thirdparty/patches/prometheus-windows-zlib.patch b/thirdparty/patches/prometheus-windows-zlib.patch -index 0a64108..73daefd 100644 ---- a/thirdparty/patches/prometheus-windows-zlib.patch -+++ b/thirdparty/patches/prometheus-windows-zlib.patch -@@ -3,24 +3,24 @@ From: easy - Date: Wed, 14 Nov 2018 16:49:24 +1100 - Subject: [PATCH] Rename net_zlib_zlib to com_github_madler_zlib to match gRPC. - --diff --git README.md README.md -+diff --git a/README.md b/README.md - index be8e683..1dbc917 100644 ----- README.md --+++ README.md -+--- a/README.md -++++ b/README.md - @@ -142,1 +142,1 @@ you introduce the following dependencies, if they do not exist yet, to your proj - -* `load_net_zlib_zlib()` to load `net_zlib_zlib` rules for zlib - +* `load_com_github_madler_zlib()` to load `com_github_madler_zlib` rules for zlib --diff --git pull/BUILD.bazel pull/BUILD.bazel -+diff --git a/pull/BUILD.bazel b/pull/BUILD.bazel - index 6d90c23..d35f63e 100644 ----- pull/BUILD.bazel --+++ pull/BUILD.bazel -+--- a/pull/BUILD.bazel -++++ b/pull/BUILD.bazel - @@ -26,1 +26,1 @@ cc_library( - - "@net_zlib_zlib//:z", - + "@com_github_madler_zlib//:z", --diff --git bazel/repositories.bzl bazel/repositories.bzl -+diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl - index 258b73f..91398cf 100644 ----- bazel/repositories.bzl --+++ bazel/repositories.bzl -+--- a/bazel/repositories.bzl -++++ b/bazel/repositories.bzl - @@ -48,3 +48,4 @@ def prometheus_cpp_repositories(): - maybe( - http_archive, --- -2.33.0 - diff --git a/protobuf-modify-the-dependencies-in-bazel-build.patch b/protobuf-modify-the-dependencies-in-bazel-build.patch deleted file mode 100644 index 601d145..0000000 --- a/protobuf-modify-the-dependencies-in-bazel-build.patch +++ /dev/null @@ -1,139 +0,0 @@ -From 8d1f7927095f8e63146defc16e2c865dcd0a5d46 Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Thu, 3 Apr 2025 11:29:36 +0800 -Subject: [PATCH] protobuf: modify the dependencies in bazel build - ---- - bazel/ray_deps_setup.bzl | 5 ++ - oe-build/patches/BUILD | 1 + - ...dify-the-dependencies-in-bazel-build.patch | 83 +++++++++++++++++++ - 3 files changed, 89 insertions(+) - create mode 100644 oe-build/patches/protobuf-modify-the-dependencies-in-bazel-build.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index 0ca7067..42388a2 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -97,6 +97,7 @@ def ray_deps_setup(): - ], - patches = [ - "@com_github_grpc_grpc//third_party:protobuf.patch", -+ "@com_github_ray_project_ray//oe-build/patches:protobuf-modify-the-dependencies-in-bazel-build.patch", - ], - patch_args = ["-p1"], - ) -@@ -308,6 +309,10 @@ def ray_deps_setup(): - name = "com_google_protobuf_rules_proto_grpc", - strip_prefix = "protobuf-25.1", - urls = ["file:///tmp/.ray_deps/protobuf-25.1.tar.gz"], -+ patches = [ -+ "@com_github_ray_project_ray//oe-build/patches:protobuf-modify-the-dependencies-in-bazel-build.patch", -+ ], -+ patch_args = ["-p1"], - ) - auto_http_archive( - name = "rules_proto_grpc", -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index 49388c4..546348b 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -4,4 +4,5 @@ exports_files([ - "grpc-modify-the-dependencies-in-bazel-build.patch", - "grpc-remove-ios-related-features.patch", - "grpc-add-the-patch-to-adapt-rules_go.patch", -+ "protobuf-modify-the-dependencies-in-bazel-build.patch" - ]) -\ No newline at end of file -diff --git a/oe-build/patches/protobuf-modify-the-dependencies-in-bazel-build.patch b/oe-build/patches/protobuf-modify-the-dependencies-in-bazel-build.patch -new file mode 100644 -index 0000000..d497a27 ---- /dev/null -+++ b/oe-build/patches/protobuf-modify-the-dependencies-in-bazel-build.patch -@@ -0,0 +1,84 @@ -+diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl -+index d055eed..4ed6914 100644 -+--- a/protobuf_deps.bzl -++++ b/protobuf_deps.bzl -+@@ -69,35 +69,36 @@ def protobuf_deps(): -+ ) -+ -+ if not native.existing_rule("utf8_range"): -+- _github_archive( -++ http_archive( -+ name = "utf8_range", -+- repo = "https://github.com/protocolbuffers/utf8_range", -+- commit = "d863bc33e15cba6d873c878dcca9e6fe52b2f8cb", -+- sha256 = "568988b5f7261ca181468dba38849fabf59dd9200fb2ed4b2823da187ef84d8c", -++ strip_prefix = "utf8_range-de0b4a8ff9b5d4c98108bdfe723291a33c52c54f", -++ urls = [ -++ "file:///tmp/.ray_deps/utf8_range-de0b4a8ff9b5d4c98108bdfe723291a33c52c54f.tar.gz", -++ ], -+ ) -+ -+ if not native.existing_rule("rules_cc"): -+- _github_archive( -++ http_archive( -+ name = "rules_cc", -+- repo = "https://github.com/bazelbuild/rules_cc", -+- commit = "818289e5613731ae410efb54218a4077fb9dbb03", -+- sha256 = "0adbd6f567291ad526e82c765e15aed33cea5e256eeba129f1501142c2c56610", -++ strip_prefix = "rules_cc-0.0.6", -++ urls = [ -++ "file:///tmp/.ray_deps/rules_cc-0.0.6.tar.gz", -++ ], -+ ) -+ -+ if not native.existing_rule("rules_java"): -+ http_archive( -+ name = "rules_java", -+- url = "https://github.com/bazelbuild/rules_java/releases/download/6.0.0/rules_java-6.0.0.tar.gz", -+- sha256 = "469b7f3b580b4fcf8112f4d6d0d5a4ce8e1ad5e21fee67d8e8335d5f8b3debab", -++ strip_prefix = "rules_java-0.1.0", -++ url = "file:///tmp/.ray_deps/rules_java-0.1.0.tar.gz", -+ ) -+ -+ if not native.existing_rule("rules_proto"): -+ http_archive( -+ name = "rules_proto", -+- sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd", -+ strip_prefix = "rules_proto-5.3.0-21.7", -+ urls = [ -+- "https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz", -++ "file:///tmp/.ray_deps/rules_proto-5.3.0.21.7.tar.gz", -+ ], -+ ) -+ -+@@ -110,11 +115,12 @@ def protobuf_deps(): -+ ) -+ -+ if not native.existing_rule("rules_ruby"): -+- _github_archive( -++ http_archive( -+ name = "rules_ruby", -+- repo = "https://github.com/protocolbuffers/rules_ruby", -+- commit = "b7f3e9756f3c45527be27bc38840d5a1ba690436", -+- sha256 = "347927fd8de6132099fcdc58e8f7eab7bde4eb2fd424546b9cd4f1c6f8f8bad8", -++ strip_prefix = "rules_ruby-5cf6ff74161d7f985b9bf86bb3c5fb16cef6337b", -++ urls = [ -++ "file:///tmp/.ray_deps/rules_ruby-5cf6ff74161d7f985b9bf86bb3c5fb16cef6337b.tar.gz", -++ ], -+ ) -+ -+ if not native.existing_rule("rules_jvm_external"): -+@@ -129,10 +136,9 @@ def protobuf_deps(): -+ http_archive( -+ name = "rules_pkg", -+ urls = [ -+- "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", -+- "https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz", -++ "file:///tmp/.ray_deps/rules_pkg-0.7.0.tar.gz", -+ ], -+- sha256 = "8a298e832762eda1830597d64fe7db58178aa84cd5926d76d5b744d6558941c2", -++ strip_prefix = "rules_pkg-0.7.0", -+ ) -+ -+ if not native.existing_rule("build_bazel_rules_apple"): -+-- --- -2.33.0 - diff --git a/protobuf-remove-ruby-related-features.patch b/protobuf-remove-ruby-related-features.patch deleted file mode 100644 index f2f26c8..0000000 --- a/protobuf-remove-ruby-related-features.patch +++ /dev/null @@ -1,103 +0,0 @@ -From 38b7ae35cd5fa0e5b62a96beeeb1bc6f2b7f47dd Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Thu, 3 Apr 2025 14:23:43 +0800 -Subject: [PATCH] protobuf: remove ruby related features - ---- - bazel/ray_deps_setup.bzl | 2 + - oe-build/patches/BUILD | 3 +- - ...rotobuf-remove-ruby-related-features.patch | 58 +++++++++++++++++++ - 3 files changed, 62 insertions(+), 1 deletion(-) - create mode 100644 oe-build/patches/protobuf-remove-ruby-related-features.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index 42388a2..e6fd282 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -98,6 +98,7 @@ def ray_deps_setup(): - patches = [ - "@com_github_grpc_grpc//third_party:protobuf.patch", - "@com_github_ray_project_ray//oe-build/patches:protobuf-modify-the-dependencies-in-bazel-build.patch", -+ "@com_github_ray_project_ray//oe-build/patches:protobuf-remove-ruby-related-features.patch", - ], - patch_args = ["-p1"], - ) -@@ -311,6 +312,7 @@ def ray_deps_setup(): - urls = ["file:///tmp/.ray_deps/protobuf-25.1.tar.gz"], - patches = [ - "@com_github_ray_project_ray//oe-build/patches:protobuf-modify-the-dependencies-in-bazel-build.patch", -+ "@com_github_ray_project_ray//oe-build/patches:protobuf-remove-ruby-related-features.patch", - ], - patch_args = ["-p1"], - ) -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index 546348b..eae394e 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -4,5 +4,6 @@ exports_files([ - "grpc-modify-the-dependencies-in-bazel-build.patch", - "grpc-remove-ios-related-features.patch", - "grpc-add-the-patch-to-adapt-rules_go.patch", -- "protobuf-modify-the-dependencies-in-bazel-build.patch" -+ "protobuf-modify-the-dependencies-in-bazel-build.patch", -+ "protobuf-remove-ruby-related-features.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/protobuf-remove-ruby-related-features.patch b/oe-build/patches/protobuf-remove-ruby-related-features.patch -new file mode 100644 -index 0000000..255e287 ---- /dev/null -+++ b/oe-build/patches/protobuf-remove-ruby-related-features.patch -@@ -0,0 +1,49 @@ -+diff --git a/protobuf.bzl b/protobuf.bzl -+index d96eeb4..5739dc5 100644 -+--- a/protobuf.bzl -++++ b/protobuf.bzl -+@@ -2,7 +2,7 @@ load("@bazel_skylib//lib:versions.bzl", "versions") -+ load("@rules_cc//cc:defs.bzl", "objc_library") -+ load("@rules_proto//proto:defs.bzl", "ProtoInfo") -+ load("@rules_python//python:defs.bzl", "py_library") -+-load("@rules_ruby//ruby:defs.bzl", "ruby_library") -++#load("@rules_ruby//ruby:defs.bzl", "ruby_library") -+ -+ def _GetPath(ctx, path): -+ if ctx.label.workspace_root: -+@@ -535,15 +535,6 @@ def internal_ruby_proto_library( -+ deps = [] -+ if default_runtime: -+ deps.append(default_runtime) -+- ruby_library( -+- name = name, -+- srcs = [name + "_genproto"], -+- deps = deps, -+- testonly = testonly, -+- visibility = visibility, -+- includes = includes, -+- **kwargs -+- ) -+ -+ # When canonical labels are in use, use additional "@" prefix -+ _canonical_label_prefix = "@" if str(Label("//:protoc")).startswith("@@") else "" -+diff --git a/protobuf_deps.bzl b/protobuf_deps.bzl -+index cd66c06..1194d86 100644 -+--- a/protobuf_deps.bzl -++++ b/protobuf_deps.bzl -+@@ -114,14 +114,6 @@ def protobuf_deps(): -+ sha256 = "f9e4f6acf82449324d56669bda4bdb28b48688ad2990d8b39fa5b93ed39c9ad1", -+ ) -+ -+- if not native.existing_rule("rules_ruby"): -+- http_archive( -+- name = "rules_ruby", -+- strip_prefix = "rules_ruby-5cf6ff74161d7f985b9bf86bb3c5fb16cef6337b", -+- urls = [ -+- "file:///tmp/.ray_deps/rules_ruby-5cf6ff74161d7f985b9bf86bb3c5fb16cef6337b.tar.gz", -+- ], -+- ) -+ -+ if not native.existing_rule("rules_jvm_external"): -+ _github_archive( -+-- --- -2.33.0 - diff --git a/python-ray.spec b/python-ray.spec index 3bced47..e7a9d8b 100644 --- a/python-ray.spec +++ b/python-ray.spec @@ -1,6 +1,6 @@ Name: python-ray Version: 2.42.1 -Release: 2 +Release: 3 Summary: Ray provides a simple, universal API for building distributed applications. License: Apache 2.0 URL: https://github.com/ray-project/ray @@ -40,28 +40,15 @@ Provides: libray_api.so(VERSION_1.0)(64bit) Patch0001: fix-secure-compiler-options.patch Patch0002: compile-with-the-g-option-to-support-building-a-debu.patch Patch0003: set-setup_requires-to-none-in-setup.py.patch -Patch0004: ray-modify-the-dependencies-in-bazel-build.patch -Patch0005: create-an-oe-build-patches-BUILD-file-to-store-patch.patch -Patch0006: ray-add-the-patch-to-adapt-flatbuffers.patch -Patch0007: rules_perl-modify-the-dependencies-in-ray-bazel-build.patch -Patch0008: modify-the-patch-directory-level-of-grpc-cython-copt.patch -Patch0009: grpc-modify-the-dependencies-in-bazel-build.patch -Patch0010: grpc-remove-ios-related-features.patch -Patch0011: grpc-add-the-patch-to-adapt-rules_go.patch -Patch0012: protobuf-modify-the-dependencies-in-bazel-build.patch -Patch0013: protobuf-remove-ruby-related-features.patch -Patch0014: rules_boost-modify-the-dependencies-in-ray-bazel-build.patch -Patch0015: rules_foreign_cc-modify-the-dependencies-in-bazel-bu.patch -Patch0016: rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch -Patch0017: prometheus-cpp-modify-the-dependencies-in-ray-bazel-build.patch %ifarch x86_64 -Patch0018: ray-modiy-redis-quiet.patch-to-adapt-redis-x86.patch +Patch0004: ray-modiy-redis-quiet.patch-to-adapt-redis-x86_64.patch %endif %ifarch aarch64 -Patch0018: ray-modiy-redis-quiet.patch-to-adapt-redis-aarch64.patch +Patch0004: ray-modiy-redis-quiet.patch-to-adapt-redis-aarch64.patch %endif -Patch0019: opencensus-add-a-patch-to-adapt-prometheus_cpp.patch - +Patch0005: modify-the-patch-directory-level-of-grpc-cython-copt.patch +Patch0006: ray-modify-the-dependencies-in-bazel-build.patch +Patch0007: consolidate-all-third-dependencies-into-ray_third_de.patch %description -n python3-ray Today's ML workloads are increasingly compute-intensive. As convenient as they are, single-node development environments such as your laptop cannot scale to meet these demands. @@ -70,6 +57,10 @@ With Ray, you can seamlessly scale the same code from a laptop to a cluster. Ray %prep %autosetup -n %{name}-%{version} -p1 -Sgit +pwd +cd %{_builddir}/../SOURCES/ +cp build-patch/* %{_builddir}/%{name}-%{version}/oe-build/patches +cd - %build export SKIP_THIRDPARTY_INSTALL_CONDA_FORGE=True @@ -106,7 +97,6 @@ ray_deps=( "protoc-gen-validate-0.6.7" \ "python-aiohttp-3.9.3" \ "python-aiosignal-1.3.1" \ - "python-build-standalone-20220502" \ "python-frozenlist-1.4.0" \ "rules_boost-57c99395e15720e287471d79178d36a85b64d6f6" \ "rules_cc-0.0.6" \ @@ -133,10 +123,9 @@ ray_deps=( "make-4.3" \ "golang-1.17.3" \ "gflags-2.2.2" \ - "msgpack-3.1.0" \ "spdlog-1.11.0" \ "nlohmann-json-3.11.2" \ - "redis-7.2.8" \ + "redis-7.2.9" \ "zstd-1.5.0" \ "xz-5.2.5" \ "bzip2-1.0.8" \ @@ -144,22 +133,38 @@ ray_deps=( original_dir=$(pwd) -rm -rf /tmp/.ray_deps; mkdir -p /tmp/.ray_deps; -cd %{_builddir} -rm -rf .ray_deps; mkdir -p .ray_deps; cd .ray_deps; +%define requeire_ray_deps_dir /tmp/.ray_deps +rm -rf %{requeire_ray_deps_dir}; mkdir -p %{requeire_ray_deps_dir}; +%define download_ray_deps_dir %{_builddir}/%{name}-%{version}/.ray_deps +rm -rf %{download_ray_deps_dir}; mkdir -p %{download_ray_deps_dir}; cd %{download_ray_deps_dir} -%define relocal_perl relocatable-perl-5.34.0.0 +%define relocal_perl_pkg relocatable-perl-5.34.0.0 %define pkg_name perl-%{_arch}-linux -mkdir -p %{relocal_perl}; cd %{relocal_perl} -yumdownloader %{relocal_perl} +mkdir -p %{relocal_perl_pkg}; cd %{relocal_perl_pkg} +yumdownloader %{relocal_perl_pkg} mkdir -p %{pkg_name} -rpm2cpio %{relocal_perl}*.rpm | cpio -div -D %{pkg_name} -cp -r %{_builddir}/.ray_deps/%{relocal_perl}/%{pkg_name}/usr/bin %{_builddir}/.ray_deps/%{relocal_perl}/%{pkg_name}/ -cp -r %{_builddir}/.ray_deps/%{relocal_perl}/%{pkg_name}/usr/lib64/ %{_builddir}/.ray_deps/%{relocal_perl}/%{pkg_name}/lib64 -rm -rf %{_builddir}/.ray_deps/%{relocal_perl}/%{pkg_name}/etc/ %{_builddir}/.ray_deps/%{relocal_perl}/%{pkg_name}/usr/ -tar -zcf /tmp/.ray_deps/%{pkg_name}.tar.gz -C %{_builddir}/.ray_deps/%{relocal_perl}/ . - -cd %{_builddir}/.ray_deps/ +rpm2cpio %{relocal_perl_pkg}*.rpm | cpio -div -D %{pkg_name} +cd %{pkg_name} +cp -r usr/bin . +cp -r usr/lib64/ lib64 +rm -rf etc/ usr/ +tar -zcf %{requeire_ray_deps_dir}/%{pkg_name}.tar.gz -C %{download_ray_deps_dir}/%{relocal_perl_pkg}/ %{pkg_name} + +cd %{download_ray_deps_dir} + +%define python_pkg python3-3.9.9 +%define pkg_name python +mkdir -p %{python_pkg}; cd %{python_pkg} +yumdownloader %{python_pkg} +mkdir -p %{pkg_name}; +rpm2cpio %{python_pkg}*.rpm | cpio -div -D %{pkg_name} +cd %{pkg_name} +cp -r usr/* . +rm -rf lib +mv lib64 lib +tar -zcf %{requeire_ray_deps_dir}/%{pkg_name}.tar.gz -C %{download_ray_deps_dir}/%{python_pkg}/ %{pkg_name} + +cd %{download_ray_deps_dir} for ray_dep in "${ray_deps[@]}"; do mkdir -p $ray_dep; cd $ray_dep @@ -168,13 +173,6 @@ for ray_dep in "${ray_deps[@]}"; do rpm2cpio $ray_dep*.src.rpm | cpio -div -D $ray_dep.src cd $ray_dep.src - if [ $ray_dep = "python-build-standalone-20220502" ]; then - mkdir -p /tmp/.ray_deps/python-build-standalone - cp cpython* /tmp/.ray_deps/python-build-standalone - cd %{_builddir}/.ray_deps - continue - fi - if [ $ray_dep = "zlib-1.2.11" ]; then rm -rf zlib-1.2.11-SIMD.patch rm -rf zlib-Optimize-CRC32.patch @@ -182,11 +180,11 @@ for ray_dep in "${ray_deps[@]}"; do sed -i '/Patch9001/d' zlib.spec fi - rpmbuild --define "_sourcedir %{_builddir}/.ray_deps/$ray_dep/$ray_dep.src" \ - --define "_builddir %{_builddir}/.ray_deps/$ray_dep/$ray_dep.src/BUILD" \ + rpmbuild --define "_sourcedir %{download_ray_deps_dir}/$ray_dep/$ray_dep.src" \ + --define "_builddir %{download_ray_deps_dir}/$ray_dep/$ray_dep.src/BUILD" \ -bp *.spec - tar -zcf /tmp/.ray_deps/$ray_dep.tar.gz -C %{_builddir}/.ray_deps/$ray_dep/$ray_dep.src/BUILD/ . - cd %{_builddir}/.ray_deps + tar -zcf %{requeire_ray_deps_dir}/$ray_dep.tar.gz -C %{download_ray_deps_dir}/$ray_dep/$ray_dep.src/BUILD/ . + cd %{download_ray_deps_dir} done cd $original_dir @@ -224,6 +222,11 @@ cd %{_builddir}/%{name}-%{version}/; bazel clean --expunge; rm -rf ~/.cache/baze %config(noreplace) /etc/ld.so.conf.d/* %changelog +* Thu May 15 2025 wangyuhang <524413304@qq.com> - 2.42.1-3 +- replaced python-build-standalone with python3 + moved third dependencies into the ray project to eliminate patch nesting + some trivial optimizations + * Thu May 15 2025 wangyuhang <524413304@qq.com> - 2.42.1-2 - supports building a debug version and some trivial modifications diff --git a/ray-add-the-patch-to-adapt-flatbuffers.patch b/ray-add-the-patch-to-adapt-flatbuffers.patch deleted file mode 100644 index 2ee60d8..0000000 --- a/ray-add-the-patch-to-adapt-flatbuffers.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 30387351b0bad65b21559fee8bf33aadd942f930 Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Wed, 2 Apr 2025 14:44:38 +0800 -Subject: [PATCH] ray: add the patch to adapt flatbuffers - ---- - bazel/ray_deps_setup.bzl | 4 ++++ - oe-build/patches/BUILD | 1 + - .../ray-add-the-patch-to-adapt-flatbuffers.patch | 14 ++++++++++++++ - 3 files changed, 19 insertions(+) - create mode 100644 oe-build/patches/ray-add-the-patch-to-adapt-flatbuffers.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index 37b096e..d8fb7f0 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -172,6 +172,10 @@ def ray_deps_setup(): - name = "com_github_google_flatbuffers", - urls = ["file:///tmp/.ray_deps/flatbuffers-2.0.0.tar.gz",], - strip_prefix = "flatbuffers-2.0.0", -+ patches = [ -+ "@com_github_ray_project_ray//oe-build/patches:ray-add-the-patch-to-adapt-flatbuffers.patch", -+ ], -+ patch_args = ["-p1"], - ) - - auto_http_archive( -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index 66116dc..646a123 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -1,2 +1,3 @@ - exports_files([ -+ "ray-add-the-patch-to-adapt-flatbuffers.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/ray-add-the-patch-to-adapt-flatbuffers.patch b/oe-build/patches/ray-add-the-patch-to-adapt-flatbuffers.patch -new file mode 100644 -index 0000000..43b4af2 ---- /dev/null -+++ b/oe-build/patches/ray-add-the-patch-to-adapt-flatbuffers.patch -@@ -0,0 +1,14 @@ -+diff --git a/include/flatbuffers/flatbuffers.h b/include/flatbuffers/flatbuffers.h -+index ee34d54..671ba1c 100644 -+--- a/include/flatbuffers/flatbuffers.h -++++ b/include/flatbuffers/flatbuffers.h -+@@ -262,7 +262,7 @@ template class Vector { -+ uoffset_t size() const { return EndianScalar(length_); } -+ -+ // Deprecated: use size(). Here for backwards compatibility. -+- FLATBUFFERS_ATTRIBUTE(deprecated("use size() instead")) -++ // FLATBUFFERS_ATTRIBUTE(deprecated("use size() instead")) -+ uoffset_t Length() const { return size(); } -+ -+ typedef typename IndirectHelper::return_type return_type; -+-- --- -2.33.0 - diff --git a/ray-modify-the-dependencies-in-bazel-build.patch b/ray-modify-the-dependencies-in-bazel-build.patch index 89632e6..a39ce3e 100644 --- a/ray-modify-the-dependencies-in-bazel-build.patch +++ b/ray-modify-the-dependencies-in-bazel-build.patch @@ -5,11 +5,13 @@ Subject: [PATCH] ray: modify the dependencies in bazel build --- WORKSPACE | 4 +- - bazel/ray_deps_setup.bzl | 124 +++++++++++++++++---------------------- - 2 files changed, 56 insertions(+), 72 deletions(-) + bazel/ray_deps_setup.bzl | 140 +++++++++++++++++++-------------------- + oe-build/patches/BUILD | 1 + + 3 files changed, 73 insertions(+), 72 deletions(-) + create mode 100644 oe-build/patches/BUILD diff --git a/WORKSPACE b/WORKSPACE -index 7aa6899..3f2fce0 100644 +index 7aa6899..ef61172 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -4,9 +4,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") @@ -25,10 +27,10 @@ index 7aa6899..3f2fce0 100644 ) diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index 02fddb0..37b096e 100644 +index 552fa03..07c5693 100644 --- a/bazel/ray_deps_setup.bzl +++ b/bazel/ray_deps_setup.bzl -@@ -91,10 +91,9 @@ def ray_deps_setup(): +@@ -91,13 +91,13 @@ def ray_deps_setup(): # Pinned grpc version: v23.4 http_archive( name = "com_google_protobuf", @@ -41,18 +43,22 @@ index 02fddb0..37b096e 100644 ], patches = [ "@com_github_grpc_grpc//third_party:protobuf.patch", -@@ -108,8 +107,8 @@ def ray_deps_setup(): ++ "@com_github_ray_project_ray//oe-build/patches:patch-for-removeing-ruby-in-protobuf.patch", + ], + patch_args = ["-p1"], + ) +@@ -108,8 +108,8 @@ def ray_deps_setup(): name = "com_github_antirez_redis", build_file = "@com_github_ray_project_ray//bazel:BUILD.redis", patch_args = ["-p1"], - url = "https://github.com/redis/redis/archive/refs/tags/7.2.3.tar.gz", - sha256 = "afd656dbc18a886f9a1cc08a550bf5eb89de0d431e713eba3ae243391fb008a6", -+ strip_prefix = "redis-7.2.8", -+ url = "file:///tmp/.ray_deps/redis-7.2.8.tar.gz", ++ strip_prefix = "redis-7.2.9", ++ url = "file:///tmp/.ray_deps/redis-7.2.9.tar.gz", patches = [ "@com_github_ray_project_ray//thirdparty/patches:redis-quiet.patch", ], -@@ -119,19 +118,15 @@ def ray_deps_setup(): +@@ -119,19 +119,15 @@ def ray_deps_setup(): auto_http_archive( name = "com_github_redis_hiredis", build_file = "@com_github_ray_project_ray//bazel:BUILD.hiredis", @@ -76,7 +82,7 @@ index 02fddb0..37b096e 100644 patches = [ "@com_github_ray_project_ray//thirdparty/patches:spdlog-rotation-file-format.patch", ], -@@ -148,67 +143,66 @@ def ray_deps_setup(): +@@ -148,70 +144,76 @@ def ray_deps_setup(): auto_http_archive( name = "rules_jvm_external", @@ -112,6 +118,8 @@ index 02fddb0..37b096e 100644 - sha256 = "490d11425393eed068966a4990ead1ff07c658f823fd982fddac67006ccc44ab", + strip_prefix = "rules_boost-57c99395e15720e287471d79178d36a85b64d6f6", + urls = ["file:///tmp/.ray_deps/rules_boost-57c99395e15720e287471d79178d36a85b64d6f6.tar.gz",], ++ patches = ["@com_github_ray_project_ray//oe-build/patches:patch-for-adapting-rules_boost-to-zstd.patch"], ++ patch_args = ["-p1"], ) auto_http_archive( @@ -120,6 +128,10 @@ index 02fddb0..37b096e 100644 - sha256 = "3f469032571d324eabea88d7014c05fec8565a5877dbe49b2a52d8d1a0f18e63", + urls = ["file:///tmp/.ray_deps/flatbuffers-2.0.0.tar.gz",], + strip_prefix = "flatbuffers-2.0.0", ++ patches = [ ++ "@com_github_ray_project_ray//oe-build/patches:patch-for-adapting-ray-to-flatbuffers.patch", ++ ], ++ patch_args = ["-p1"], ) auto_http_archive( @@ -164,7 +176,11 @@ index 02fddb0..37b096e 100644 patches = [ "@com_github_ray_project_ray//thirdparty/patches:opencensus-cpp-harvest-interval.patch", "@com_github_ray_project_ray//thirdparty/patches:opencensus-cpp-shutdown-api.patch", -@@ -222,18 +216,17 @@ def ray_deps_setup(): ++ "@com_github_ray_project_ray//oe-build/patches:patch-for-adapting-opencensus-to-prometheus_cpp.patch", + ], + patch_args = ["-p1"], + ) +@@ -222,18 +224,17 @@ def ray_deps_setup(): # TODO(owner): Upgrade abseil to latest version after protobuf updated, which requires to upgrade `rules_cc` first. auto_http_archive( name = "com_google_absl", @@ -186,7 +202,7 @@ index 02fddb0..37b096e 100644 patches = [ "@com_github_ray_project_ray//thirdparty/patches:prometheus-windows-headers.patch", # https://github.com/jupp0r/prometheus-cpp/pull/225 -@@ -245,8 +238,8 @@ def ray_deps_setup(): +@@ -245,45 +246,47 @@ def ray_deps_setup(): auto_http_archive( name = "com_github_grpc_grpc", # NOTE: If you update this, also update @boringssl's hash. @@ -196,8 +212,11 @@ index 02fddb0..37b096e 100644 + urls = ["file:///tmp/.ray_deps/grpc-1.60.0.tar.gz",], patches = [ "@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch", ++ "@com_github_ray_project_ray//oe-build/patches:patch-for-adapting-ray-to-grpc.patch", ++ "@com_github_ray_project_ray//oe-build/patches:patch-for-removeing-ios-in-grpc.patch", ], -@@ -254,35 +247,33 @@ def ray_deps_setup(): + patch_args = ["-p1"], + ) http_archive( name = "openssl", @@ -231,6 +250,8 @@ index 02fddb0..37b096e 100644 + urls = [ + "file:///tmp/.ray_deps/rules_perl-022b8daf2bb4836ac7a50e4a1d8ea056a3e1e403.tar.gz", + ], ++ patches = ["@com_github_ray_project_ray//oe-build/patches:patch-for-adapting-rules_perl-to-perl.patch"], ++ patch_args = ["-p1"], ) http_archive( @@ -242,7 +263,7 @@ index 02fddb0..37b096e 100644 ) http_archive( -@@ -291,10 +282,9 @@ def ray_deps_setup(): +@@ -292,10 +295,9 @@ def ray_deps_setup(): # https://github.com/grpc/grpc/blob/1ff1feaa83e071d87c07827b0a317ffac673794f/bazel/grpc_deps.bzl#L189 # Ensure this rule matches the rule used by grpc's bazel/grpc_deps.bzl name = "boringssl", @@ -254,7 +275,7 @@ index 02fddb0..37b096e 100644 ], ) -@@ -306,14 +296,13 @@ def ray_deps_setup(): +@@ -307,14 +309,17 @@ def ray_deps_setup(): # protobuf library that Ray supports. http_archive( name = "com_google_protobuf_rules_proto_grpc", @@ -263,6 +284,10 @@ index 02fddb0..37b096e 100644 - sha256 = "3bd7828aa5af4b13b99c191e8b1e884ebfa9ad371b0ce264605d347f135d2568", + strip_prefix = "protobuf-25.1", + urls = ["file:///tmp/.ray_deps/protobuf-25.1.tar.gz"], ++ patches = [ ++ "@com_github_ray_project_ray//oe-build/patches:patch-for-removeing-ruby-in-protobuf.patch", ++ ], ++ patch_args = ["-p1"], ) auto_http_archive( name = "rules_proto_grpc", @@ -273,7 +298,7 @@ index 02fddb0..37b096e 100644 repo_mapping = { "@com_google_protobuf": "@com_google_protobuf_rules_proto_grpc", }, -@@ -322,8 +311,8 @@ def ray_deps_setup(): +@@ -323,8 +328,8 @@ def ray_deps_setup(): auto_http_archive( name = "msgpack", build_file = True, @@ -284,7 +309,7 @@ index 02fddb0..37b096e 100644 patches = [ "@com_github_ray_project_ray//thirdparty/patches:msgpack-windows-iovec.patch", ], -@@ -332,15 +321,13 @@ def ray_deps_setup(): +@@ -333,15 +338,13 @@ def ray_deps_setup(): http_archive( name = "io_opencensus_proto", strip_prefix = "opencensus-proto-0.3.0/src", @@ -303,7 +328,7 @@ index 02fddb0..37b096e 100644 build_file = "@com_github_ray_project_ray//bazel:BUILD.nlohmann_json", ) -@@ -358,16 +345,13 @@ def ray_deps_setup(): +@@ -359,16 +362,13 @@ def ray_deps_setup(): # Replace the commit hash in both places (below) with the latest, rather than using the stale one here. # Even better, set up Renovate and let it do the work for you (see "Suggestion: Updates" in the README). @@ -322,6 +347,14 @@ index 02fddb0..37b096e 100644 - sha256 = "2db82d1e7119df3e71b7640219b6dfe84789bc0537983c3b7ac4f7189aecfeaa", strip_prefix = "jemalloc-5.3.0", ) +diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD +new file mode 100644 +index 0000000..9e9810b +--- /dev/null ++++ b/oe-build/patches/BUILD +@@ -0,0 +1 @@ ++# patches for adapting to openEuler +\ No newline at end of file -- 2.33.0 diff --git a/ray-modiy-redis-quiet.patch-to-adapt-redis-x86.patch b/ray-modiy-redis-quiet.patch-to-adapt-redis-x86_64.patch similarity index 100% rename from ray-modiy-redis-quiet.patch-to-adapt-redis-x86.patch rename to ray-modiy-redis-quiet.patch-to-adapt-redis-x86_64.patch diff --git a/rules_boost-modify-the-dependencies-in-ray-bazel-build.patch b/rules_boost-modify-the-dependencies-in-ray-bazel-build.patch deleted file mode 100644 index 57c6ef0..0000000 --- a/rules_boost-modify-the-dependencies-in-ray-bazel-build.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 0cdf02dafcdda5abc21844c39da2de7ff2515a4f Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Wed, 2 Apr 2025 19:35:53 +0800 -Subject: [PATCH] rules_boost: modify the dependencies in ray bazel build - ---- - bazel/ray_deps_setup.bzl | 2 + - oe-build/patches/BUILD | 1 + - ...dify-the-dependencies-in-bazel-build.patch | 81 +++++++++++++++++++ - 3 files changed, 84 insertions(+) - create mode 100644 oe-build/patches/rules_boost-modify-the-dependencies-in-bazel-build.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index e18cf94..d1cc1b3 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -166,6 +166,8 @@ def ray_deps_setup(): - # If you update the Boost version, remember to update the 'boost' rule. - strip_prefix = "rules_boost-57c99395e15720e287471d79178d36a85b64d6f6", - urls = ["file:///tmp/.ray_deps/rules_boost-57c99395e15720e287471d79178d36a85b64d6f6.tar.gz",], -+ patches = ["@com_github_ray_project_ray//oe-build/patches:rules_boost-modify-the-dependencies-in-bazel-build.patch"], -+ patch_args = ["-p1"], - ) - - auto_http_archive( -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index eae394e..9df5963 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -6,4 +6,5 @@ exports_files([ - "grpc-add-the-patch-to-adapt-rules_go.patch", - "protobuf-modify-the-dependencies-in-bazel-build.patch", - "protobuf-remove-ruby-related-features.patch", -+ "rules_boost-modify-the-dependencies-in-bazel-build.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/rules_boost-modify-the-dependencies-in-bazel-build.patch b/oe-build/patches/rules_boost-modify-the-dependencies-in-bazel-build.patch -new file mode 100644 -index 0000000..af31057 ---- /dev/null -+++ b/oe-build/patches/rules_boost-modify-the-dependencies-in-bazel-build.patch -@@ -0,0 +1,81 @@ -+diff --git a/BUILD.zstd b/BUILD.zstd -+index a01c959..0ed48d6 100644 -+--- a/BUILD.zstd -++++ b/BUILD.zstd -+@@ -14,7 +14,6 @@ cc_library( -+ "lib/legacy/*.h", -+ "lib/legacy/*.c", -+ ]) + select({ -+- ":linux_x86_64": ["lib/decompress/huf_decompress_amd64.S"], -+ "//conditions:default": [], -+ }), -+ hdrs = [ -+diff --git a/boost/boost.bzl b/boost/boost.bzl -+index fc56a14..d36384a 100644 -+--- a/boost/boost.bzl -++++ b/boost/boost.bzl -+@@ -161,20 +161,17 @@ def boost_deps(): -+ http_archive, -+ name = "net_zlib_zlib", -+ build_file = "@com_github_nelhage_rules_boost//:BUILD.zlib", -+- url = "https://github.com/madler/zlib/archive/v1.2.13.tar.gz", -+- sha256 = "1525952a0a567581792613a9723333d7f8cc20b87a81f920fb8bc7e3f2251428", -+- strip_prefix = "zlib-1.2.13", -++ url = "file:///tmp/.ray_deps/zlib-1.2.11.tar.gz", -++ strip_prefix = "zlib-1.2.11", -+ ) -+ -+ maybe( -+ http_archive, -+ name = "org_bzip_bzip2", -+ build_file = "@com_github_nelhage_rules_boost//:BUILD.bzip2", -+- sha256 = "ab5a03176ee106d3f0fa90e381da478ddae405918153cca248e682cd0c4a2269", -+ strip_prefix = "bzip2-1.0.8", -+ urls = [ -+- "https://mirror.bazel.build/sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", -+- "https://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz", -++ "file:///tmp/.ray_deps/bzip2-1.0.8.tar.gz", -+ ] -+ ) -+ -+@@ -184,11 +181,9 @@ def boost_deps(): -+ http_archive, -+ name = "org_lzma_lzma", -+ build_file = "@com_github_nelhage_rules_boost//:BUILD.lzma", -+- sha256 = "06327c2ddc81e126a6d9a78b0be5014b976a2c0832f492dcfc4755d7facf6d33", -+- strip_prefix = "xz-5.2.7", -++ strip_prefix = "xz-5.2.5", -+ urls = [ -+- "https://%s.dl.sourceforge.net/project/lzmautils/xz-5.2.7.tar.gz" % m -+- for m in SOURCEFORGE_MIRRORS -++ "file:///tmp/.ray_deps/xz-5.2.5.tar.gz", -+ ], -+ ) -+ -+@@ -196,9 +191,8 @@ def boost_deps(): -+ http_archive, -+ name = "com_github_facebook_zstd", -+ build_file = "@com_github_nelhage_rules_boost//:BUILD.zstd", -+- url = "https://github.com/facebook/zstd/archive/v1.5.2/zstd-1.5.2.tar.gz", -+- sha256 = "f7de13462f7a82c29ab865820149e778cbfe01087b3a55b5332707abf9db4a6e", -+- strip_prefix = "zstd-1.5.2", -++ url = "file:///tmp/.ray_deps/zstd-1.5.0.tar.gz", -++ strip_prefix = "zstd-1.5.0", -+ ) -+ -+ maybe( -+@@ -207,11 +201,9 @@ def boost_deps(): -+ build_file = "@com_github_nelhage_rules_boost//:BUILD.boost", -+ patch_cmds = ["rm -f doc/pdf/BUILD"], -+ patch_cmds_win = ["Remove-Item -Force doc/pdf/BUILD"], -+- sha256 = "205666dea9f6a7cfed87c7a6dfbeb52a2c1b9de55712c9c1a87735d7181452b6", -+- strip_prefix = "boost_1_81_0", -++ strip_prefix = "boost_1_83_0", -+ urls = [ -+- "https://mirror.bazel.build/boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz", -+- "https://boostorg.jfrog.io/artifactory/main/release/1.81.0/source/boost_1_81_0.tar.gz", -++ "file:///tmp/.ray_deps/boost-1.83.0.tar.gz", -+ ], -+ ) -+ -+-- --- -2.33.0 - diff --git a/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch b/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch deleted file mode 100644 index 692aedf..0000000 --- a/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch +++ /dev/null @@ -1,148 +0,0 @@ -From 68d1e2987cc54fb16daee08f1fa40acf3115fd61 Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Thu, 3 Apr 2025 16:44:25 +0800 -Subject: [PATCH] rules_foreign_cc: add the patch to adapt flatbuffers - ---- - bazel/ray_deps_setup.bzl | 1 + - oe-build/patches/BUILD | 1 + - ...c-add-the-patch-to-adapt-flatbuffers.patch | 104 ++++++++++++++++++ - 3 files changed, 106 insertions(+) - create mode 100644 oe-build/patches/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index ae1472d..3c98b39 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -270,6 +270,7 @@ def ray_deps_setup(): - url = "file:///tmp/.ray_deps/rules_foreign_cc-0.9.0.tar.gz", - patches = [ - "@com_github_ray_project_ray//oe-build/patches:rules_foreign_cc-modify-the-dependencies-in-bazel-build.patch", -+ "@com_github_ray_project_ray//oe-build/patches:rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch", - ], - patch_args = ["-p1"], - ) -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index a402205..8ab49dc 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -8,4 +8,5 @@ exports_files([ - "protobuf-remove-ruby-related-features.patch", - "rules_boost-modify-the-dependencies-in-bazel-build.patch", - "rules_foreign_cc-modify-the-dependencies-in-bazel-build.patch", -+ "rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch b/oe-build/patches/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch -new file mode 100644 -index 0000000..ea7fd8f ---- /dev/null -+++ b/oe-build/patches/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch -@@ -0,0 +1,104 @@ -+diff --git a/foreign_cc/repositories.bzl b/foreign_cc/repositories.bzl -+index 2833478..020339f 100644 -+--- a/foreign_cc/repositories.bzl -++++ b/foreign_cc/repositories.bzl -+@@ -88,4 +88,8 @@ def rules_foreign_cc_dependencies( -+ name = "rules_python", -+ strip_prefix = "rules_python-0.9.0", -+ url = "file:///tmp/.ray_deps/rules_python-0.9.0.tar.gz", -++ patches = [ -++ "@rules_foreign_cc//oe-build/patches:rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch", -++ ], -++ patch_args = ["-p1"], -+ ) -+diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -+new file mode 100644 -+index 0000000..00904bd -+--- /dev/null -++++ b/oe-build/patches/BUILD -+@@ -0,0 +1,3 @@ -++exports_files([ -++ "rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch" -++]) -+\ No newline at end of file -+diff --git a/oe-build/patches/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch b/oe-build/patches/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch -+new file mode 100644 -+index 0000000..be6cb2b -+--- /dev/null -++++ b/oe-build/patches/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch -+@@ -0,0 +1,74 @@ -++diff --git a/python/pip_install/extract_wheels/lib/wheel.py b/python/pip_install/extract_wheels/lib/wheel.py -++index 74a963f..3038a0d 100644 -++--- a/python/pip_install/extract_wheels/lib/wheel.py -+++++ b/python/pip_install/extract_wheels/lib/wheel.py -++@@ -6,7 +6,7 @@ import stat -++ import zipfile -++ from typing import Dict, Optional, Set, Tuple -++ -++-import installer -+++# import installer -++ import pkg_resources -++ -++ -++diff --git a/python/pip_install/pip_repository.bzl b/python/pip_install/pip_repository.bzl -++index d9888a2..ad1d555 100644 -++--- a/python/pip_install/pip_repository.bzl -+++++ b/python/pip_install/pip_repository.bzl -++@@ -1,6 +1,6 @@ -++ "" -++ -++-load("//python/pip_install:repositories.bzl", "all_requirements") -+++#load("//python/pip_install:repositories.bzl", "all_requirements") -++ load("//python/pip_install/private:srcs.bzl", "PIP_INSTALL_PY_SRCS") -++ -++ def _construct_pypath(rctx): -++@@ -19,7 +19,7 @@ def _construct_pypath(rctx): -++ thirdparty_roots = [ -++ # Includes all the external dependencies from repositories.bzl -++ rctx.path(Label("@" + repo + "//:BUILD.bazel")).dirname -++- for repo in all_requirements -+++ for repo in [] -++ ] -++ separator = ":" if not "windows" in rctx.os.name.lower() else ";" -++ pypath = separator.join([str(p) for p in [rules_root] + thirdparty_roots]) -++@@ -183,10 +183,15 @@ def _pip_repository_impl(rctx): -++ -++ rctx.report_progress(progress_message) -++ -+++ base_env = "/usr/lib/python3.9/site-packages" -+++ custom_path = _construct_pypath(rctx) -+++ pypy_path = ":".join([custom_path, base_env]) -+++ -+++ -++ result = rctx.execute( -++ args, -++ # Manually construct the PYTHONPATH since we cannot use the toolchain here -++- environment = {"PYTHONPATH": _construct_pypath(rctx)}, -+++ environment = {"PYTHONPATH": pypy_path}, -++ timeout = rctx.attr.timeout, -++ quiet = rctx.attr.quiet, -++ ) -++diff --git a/python/versions.bzl b/python/versions.bzl -++index 2d05e16..7b0e311 100644 -++--- a/python/versions.bzl -+++++ b/python/versions.bzl -++@@ -20,7 +20,7 @@ MACOS_NAME = "mac os" -++ LINUX_NAME = "linux" -++ WINDOWS_NAME = "windows" -++ -++-DEFAULT_RELEASE_BASE_URL = "https://github.com/indygreg/python-build-standalone/releases/download" -+++DEFAULT_RELEASE_BASE_URL = "file:///tmp/.ray_deps/python-build-standalone/" -++ -++ # When updating the versions and releases, run the following command to get -++ # the hashes: -++@@ -70,7 +70,7 @@ TOOL_VERSIONS = { -++ "strip_prefix": "python", -++ }, -++ "3.9.12": { -++- "url": "20220502/cpython-{python_version}+20220502-{platform}-{build}.tar.gz", -+++ "url": "cpython-{python_version}+20220502-{platform}-{build}.tar.gz", -++ "sha256": { -++ "aarch64-apple-darwin": "8dee06c07cc6429df34b6abe091a4684a86f7cec76f5d1ccc1c3ce2bd11168df", -++ "aarch64-unknown-linux-gnu": "2ee1426c181e65133e57dc55c6a685cb1fb5e63ef02d684b8a667d5c031c4203", -++-- -+-- --- -2.33.0 - diff --git a/rules_foreign_cc-modify-the-dependencies-in-bazel-bu.patch b/rules_foreign_cc-modify-the-dependencies-in-bazel-bu.patch deleted file mode 100644 index 54b89cf..0000000 --- a/rules_foreign_cc-modify-the-dependencies-in-bazel-bu.patch +++ /dev/null @@ -1,76 +0,0 @@ -From 65b95b161b3b7925fa535c201d55f33ccacdb83e Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Thu, 3 Apr 2025 16:38:43 +0800 -Subject: [PATCH] rules_foreign_cc: modify the dependencies in bazel build - ---- - bazel/ray_deps_setup.bzl | 4 +++ - oe-build/patches/BUILD | 1 + - ...dify-the-dependencies-in-bazel-build.patch | 29 +++++++++++++++++++ - 3 files changed, 34 insertions(+) - create mode 100644 oe-build/patches/rules_foreign_cc-modify-the-dependencies-in-bazel-build.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index d1cc1b3..ae1472d 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -268,6 +268,10 @@ def ray_deps_setup(): - name = "rules_foreign_cc", - strip_prefix = "rules_foreign_cc-0.9.0", - url = "file:///tmp/.ray_deps/rules_foreign_cc-0.9.0.tar.gz", -+ patches = [ -+ "@com_github_ray_project_ray//oe-build/patches:rules_foreign_cc-modify-the-dependencies-in-bazel-build.patch", -+ ], -+ patch_args = ["-p1"], - ) - - # Using shallow_since allows the rule to clone down fewer commits. -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index 9df5963..a402205 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -7,4 +7,5 @@ exports_files([ - "protobuf-modify-the-dependencies-in-bazel-build.patch", - "protobuf-remove-ruby-related-features.patch", - "rules_boost-modify-the-dependencies-in-bazel-build.patch", -+ "rules_foreign_cc-modify-the-dependencies-in-bazel-build.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/rules_foreign_cc-modify-the-dependencies-in-bazel-build.patch b/oe-build/patches/rules_foreign_cc-modify-the-dependencies-in-bazel-build.patch -new file mode 100644 -index 0000000..992f9f1 ---- /dev/null -+++ b/oe-build/patches/rules_foreign_cc-modify-the-dependencies-in-bazel-build.patch -@@ -0,0 +1,29 @@ -+diff -Nur old/rules_foreign_cc-0.9.0/foreign_cc/repositories.bzl rules_foreign_cc-0.9.0/foreign_cc/repositories.bzl -+--- old/rules_foreign_cc-0.9.0/foreign_cc/repositories.bzl 2022-08-03 03:56:49.000000000 +0800 -++++ rules_foreign_cc-0.9.0/foreign_cc/repositories.bzl 2025-03-29 20:27:00.728000000 +0800 -+@@ -85,7 +85,6 @@ -+ maybe( -+ http_archive, -+ name = "rules_python", -+- sha256 = "5fa3c738d33acca3b97622a13a741129f67ef43f5fdfcec63b29374cc0574c29", -+ strip_prefix = "rules_python-0.9.0", -+- url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.9.0.tar.gz", -++ url = "file:///tmp/.ray_deps/rules_python-0.9.0.tar.gz", -+ ) -+diff -Nur old/rules_foreign_cc-0.9.0/toolchains/built_toolchains.bzl rules_foreign_cc-0.9.0/toolchains/built_toolchains.bzl -+--- old/rules_foreign_cc-0.9.0/toolchains/built_toolchains.bzl 2022-08-03 03:56:49.000000000 +0800 -++++ rules_foreign_cc-0.9.0/toolchains/built_toolchains.bzl 2025-03-29 18:12:01.392000000 +0800 -+@@ -425,11 +425,9 @@ -+ name = "gnumake_src", -+ build_file_content = _ALL_CONTENT, -+ patches = [Label("//toolchains:make-reproducible-bootstrap.patch")], -+- sha256 = "e05fdde47c5f7ca45cb697e973894ff4f5d79e13b750ed57d7b66d8defc78e19", -+ strip_prefix = "make-4.3", -+ urls = [ -+- "https://mirror.bazel.build/ftpmirror.gnu.org/gnu/make/make-4.3.tar.gz", -+- "http://ftpmirror.gnu.org/gnu/make/make-4.3.tar.gz", -++ "file:///tmp/.ray_deps/make-4.3.tar.gz", -+ ], -+ ) -+ return -+-- --- -2.33.0 - diff --git a/rules_perl-modify-the-dependencies-in-ray-bazel-build.patch b/rules_perl-modify-the-dependencies-in-ray-bazel-build.patch deleted file mode 100644 index 3641a86..0000000 --- a/rules_perl-modify-the-dependencies-in-ray-bazel-build.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 19ffa1aeadf74c7d21726b2bb5f3669cd1317edc Mon Sep 17 00:00:00 2001 -From: wangyuhang <524413304@qq.com> -Date: Wed, 2 Apr 2025 15:21:10 +0800 -Subject: [PATCH] rules_perl: modify the dependencies in ray bazel build - ---- - bazel/ray_deps_setup.bzl | 2 ++ - oe-build/patches/BUILD | 1 + - ...dify-the-dependencies-in-bazel-build.patch | 26 +++++++++++++++++++ - 3 files changed, 29 insertions(+) - create mode 100644 oe-build/patches/rules_perl-modify-the-dependencies-in-bazel-build.patch - -diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl -index d8fb7f0..796123e 100644 ---- a/bazel/ray_deps_setup.bzl -+++ b/bazel/ray_deps_setup.bzl -@@ -272,6 +272,8 @@ def ray_deps_setup(): - urls = [ - "file:///tmp/.ray_deps/rules_perl-022b8daf2bb4836ac7a50e4a1d8ea056a3e1e403.tar.gz", - ], -+ patches = ["@com_github_ray_project_ray//oe-build/patches:rules_perl-modify-the-dependencies-in-bazel-build.patch"], -+ patch_args = ["-p1"], - ) - - http_archive( -diff --git a/oe-build/patches/BUILD b/oe-build/patches/BUILD -index 646a123..d9229a2 100644 ---- a/oe-build/patches/BUILD -+++ b/oe-build/patches/BUILD -@@ -1,3 +1,4 @@ - exports_files([ - "ray-add-the-patch-to-adapt-flatbuffers.patch", -+ "rules_perl-modify-the-dependencies-in-bazel-build.patch", - ]) -\ No newline at end of file -diff --git a/oe-build/patches/rules_perl-modify-the-dependencies-in-bazel-build.patch b/oe-build/patches/rules_perl-modify-the-dependencies-in-bazel-build.patch -new file mode 100644 -index 0000000..ab821c7 ---- /dev/null -+++ b/oe-build/patches/rules_perl-modify-the-dependencies-in-bazel-build.patch -@@ -0,0 +1,28 @@ -+diff --git a/perl/deps.bzl b/perl/deps.bzl -+index 7f7ee7c..cbdd884 100644 -+--- a/perl/deps.bzl -++++ b/perl/deps.bzl -+@@ -11,18 +11,18 @@ def perl_register_toolchains(): -+ perl_download( -+ name = "perl_linux_arm64", -+ strip_prefix = "perl-aarch64-linux", -+- sha256 = "01af07bc84fc9c162b09eda880f5868b67ccb440071f8088e5278e1ae394aefd", -++ sha256 = "", -+ urls = [ -+- "https://github.com/skaji/relocatable-perl/releases/download/5.36.0.0/perl-aarch64-linux.tar.xz", -++ "file:///tmp/.ray_deps/perl-aarch64-linux.tar.gz", -+ ], -+ ) -+ -+ perl_download( -+ name = "perl_linux_x86_64", -+ strip_prefix = "perl-x86_64-linux", -+- sha256 = "77ee5dfec156bd8135be3c2e9b295a393c7f7a0c7999b8932ff83ed938f65d02", -++ sha256 = "", -+ urls = [ -+- "https://github.com/skaji/relocatable-perl/releases/download/5.36.0.0/perl-x86_64-linux.tar.xz", -++ "file:///tmp/.ray_deps/perl-x86_64-linux.tar.gz", -+ ], -+ ) -+ -+-- --- -2.33.0 - -- Gitee