diff --git a/bazel-6.5.0-linux-aarch64 b/bazel-6.5.0-linux-aarch64 new file mode 100755 index 0000000000000000000000000000000000000000..ca606fe8e3752497cc71c40f7fa7d1105edc536b Binary files /dev/null and b/bazel-6.5.0-linux-aarch64 differ diff --git a/bazel-6.5.0-linux-x86_64 b/bazel-6.5.0-linux-x86_64 new file mode 100755 index 0000000000000000000000000000000000000000..745f05c474058d4a0511b79de52213d711343ae5 Binary files /dev/null and b/bazel-6.5.0-linux-x86_64 differ 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 new file mode 100644 index 0000000000000000000000000000000000000000..1a4f76a44aad914d4358add64ed504dd94afb77e --- /dev/null +++ b/create-an-oe-build-patches-BUILD-file-to-store-patch.patch @@ -0,0 +1,22 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..6adb4e5e671bd5ebec7ac726a70f355df52efc83 --- /dev/null +++ b/grpc-add-the-patch-to-adapt-rules_go.patch @@ -0,0 +1,132 @@ +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,88 @@ ++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,56 @@ +++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,16 @@ ++++[ ++++ { ++++ "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" ++++ } ++++ ] ++++ } ++++] +++\ 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 new file mode 100644 index 0000000000000000000000000000000000000000..d7d3bba59060bf72375cfd7604ceb78921be0772 --- /dev/null +++ b/grpc-modify-the-dependencies-in-bazel-build.patch @@ -0,0 +1,246 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..66886e186a7484271dba29e716f3f8a69ab70bf4 --- /dev/null +++ b/grpc-remove-ios-related-features.patch @@ -0,0 +1,410 @@ +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,366 @@ ++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,59 +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", ++-# deps = [ ++-# "CronetTests-lib", ++-# ], ++-# ) ++-# ++-# grpc_objc_ios_unit_test( ++-# name = "CppCronetTests", ++-# deps = [ ++-# "CppCronetTests-lib", ++-# ], ++-# ) ++-# ++-# grpc_objc_ios_unit_test( ++-# name = "PerfTestsPosix", ++-# deps = [ ++-# "PerfTests-lib-Posix", ++-# ], ++-# ) ++-# ++-# grpc_objc_ios_unit_test( ++-# name = "PerfTests", ++-# env = { ++-# "GRPC_CFSTREAM_RUN_LOOP": "1", ++-# }, ++-# deps = [ ++-# "PerfTests-lib", ++-# ], ++-# ) ++- ++ macos_unit_test( ++ name = "MacTests", ++ minimum_os_version = "10.10", ++@@ -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/modify-the-patch-directory-level-of-grpc-cython-copt.patch b/modify-the-patch-directory-level-of-grpc-cython-copt.patch new file mode 100644 index 0000000000000000000000000000000000000000..b35e85b58bbbb878457b75f100bd18fa032a34de --- /dev/null +++ b/modify-the-patch-directory-level-of-grpc-cython-copt.patch @@ -0,0 +1,40 @@ +From fba4e3f481f8762632ce7c47ec4e1e5504de061e Mon Sep 17 00:00:00 2001 +From: wangyuhang <524413304@qq.com> +Date: Wed, 2 Apr 2025 15:13:11 +0800 +Subject: [PATCH] modify the patch directory level of grpc-cython-copts.patch + from p0 to p1 + +--- + bazel/ray_deps_setup.bzl | 1 + + thirdparty/patches/grpc-cython-copts.patch | 6 +++--- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl +index d92524e..919f325 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", + ], ++ patch_args = ["-p1"], + ) + + http_archive( +diff --git a/thirdparty/patches/grpc-cython-copts.patch b/thirdparty/patches/grpc-cython-copts.patch +index c893cab..17c4f97 100644 +--- a/thirdparty/patches/grpc-cython-copts.patch ++++ b/thirdparty/patches/grpc-cython-copts.patch +@@ -1,6 +1,6 @@ +-diff --git bazel/cython_library.bzl bazel/cython_library.bzl +---- bazel/cython_library.bzl +-+++ bazel/cython_library.bzl ++diff --git a/bazel/cython_library.bzl b/bazel/cython_library.bzl ++--- a/bazel/cython_library.bzl +++++ b/bazel/cython_library.bzl + @@ -10,15 +10,16 @@ + -def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs): + +def pyx_library(name, deps = [], cc_kwargs = {}, py_deps = [], srcs = [], **kwargs): +-- +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 new file mode 100644 index 0000000000000000000000000000000000000000..a2129177b1342a4f7aca5577371add6f3caa0e99 --- /dev/null +++ b/opencensus-add-a-patch-to-adapt-prometheus_cpp.patch @@ -0,0 +1,67 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..93ca4c6edaee4571dd354166d6e0aad0acebd58a --- /dev/null +++ b/prometheus-cpp-modify-the-dependencies-in-ray-bazel-build.patch @@ -0,0 +1,150 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..601d1450cadbefc6af426a2cfc7c4324b0604693 --- /dev/null +++ b/protobuf-modify-the-dependencies-in-bazel-build.patch @@ -0,0 +1,139 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..8c51bb41bc6bd683ddf2952ff3e6f2f892e2dc58 --- /dev/null +++ b/protobuf-remove-ruby-related-features.patch @@ -0,0 +1,112 @@ +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,58 @@ ++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,15 @@ 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 ++- ) +++# 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 new file mode 100644 index 0000000000000000000000000000000000000000..0f278aac9d68f411971af12897cee05d6635a0e4 --- /dev/null +++ b/python-ray.spec @@ -0,0 +1,200 @@ +%define debug_package %{nil} + +Name: python-ray +Version: 2.42.1 +Release: 1%{?dist} +Summary: Ray provides a simple, universal API for building distributed applications. +License: Apache 2.0 +URL: https://github.com/ray-project/ray +Source0: https://github.com/ray-project/ray/archive/refs/tags/ray-%{version}.tar.gz + +%ifarch aarch64 +Source1: bazel-6.5.0-linux-aarch64 +%endif +%ifarch x86_64 +Source1: bazel-6.5.0-linux-x86_64 +%endif + +%ifarch x86_64 aarch64 +Provides: libray_api.so(VERSION_1.0)(64bit) +%endif + +Provides: python-ray + +BuildRequires: gcc g++ gdb make bazel +BuildRequires: python3-devel python3-setuptools python3-pip python3-setproctitle +BuildRequires: python3-colorama python3-wheel python3-Cython +BuildRequires: golang-devel = 1.17.3 +# need by 'rpm -bp protobuf' +BuildRequires: javapackages-local +# need by 'rpm -bp flatbuffers' +BuildRequires: cmake + +Requires: python3-devel python3-msgpack python3-filelock python3-pyyaml python3-protobuf +Requires: python3-jsonschema python3-packaging python3-click python3-aiosignal python3-frozenlist +Requires: python3-aiohttp >= 3.9.3 + +Patch0001: set-setup_requires-to-none-in-setup.py.patch +Patch0002: ray-modify-the-dependencies-in-bazel-build.patch +Patch0003: create-an-oe-build-patches-BUILD-file-to-store-patch.patch +Patch0004: ray-add-the-patch-to-adapt-flatbuffers.patch +Patch0005: rules_perl-modify-the-dependencies-in-ray-bazel-build.patch +Patch0006: modify-the-patch-directory-level-of-grpc-cython-copt.patch +Patch0007: grpc-modify-the-dependencies-in-bazel-build.patch +Patch0008: grpc-remove-ios-related-features.patch +Patch0009: grpc-add-the-patch-to-adapt-rules_go.patch +Patch0010: protobuf-modify-the-dependencies-in-bazel-build.patch +Patch0011: protobuf-remove-ruby-related-features.patch +Patch0012: rules_boost-modify-the-dependencies-in-ray-bazel-build.patch +Patch0013: rules_foreign_cc-modify-the-dependencies-in-bazel-bu.patch +Patch0014: rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch +Patch0015: prometheus-cpp-modify-the-dependencies-in-ray-bazel-build.patch +Patch0016: ray-modiy-redis-quiet.patch-to-adapt-redis.patch +Patch0017: opencensus-add-a-patch-to-adapt-prometheus_cpp.patch + +%description +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. +Ray is a unified way to scale Python and AI applications from a laptop to a cluster. +With Ray, you can seamlessly scale the same code from a laptop to a cluster. Ray is designed to be general-purpose, meaning that it can performantly run any kind of workload. If your application is written in Python, you can scale it with Ray, no other infrastructure required. + +%prep +%autosetup -n %{name}-%{version} -p1 -Sgit +cp -a %{SOURCE1} /usr/bin/bazel +chmod +x /usr/bin/bazel + +%build +export SKIP_THIRDPARTY_INSTALL_CONDA_FORGE=True +export HTTP_TIMEOUT=20 + +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 relocal_perl relocatable-perl-5.34.0.0 +%define pkg_name perl-%{_arch}-linux +mkdir -p %{relocal_perl}; cd %{relocal_perl} +yumdownloader %{relocal_perl} +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}/lib +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/ + +ray_deps=( + "abseil-cpp-20230802.1" \ + "bazel-6.5.0" \ + "bazel-common-084aadd3b854cad5d5e754a7e7d958ac531e6801" \ + "bazel-compile-commands-extractor-2e8b7654fa10c44b9937453fa4974ed2229d5366" \ + "bazel-gazelle-0.24.0" \ + "bazel_jar_jar-0.1.0" \ + "bazel-platforms-0.0.9" \ + "bazel-skylib-1.6.1" \ + "boost-1.83.0" \ + "boringssl-342e805bc1f5dfdd650e3f031686d6c939b095d9" \ + "c-ares-1.19.1" \ + "civetweb-1.12" \ + "data-plane-api-9d6ffa70677c4dbf23f6ed569676206c4e2edff4" \ + "googleapis-2f9af297c84c55c8b871ba4495e01ade42476c92" \ + "google-cloud-cpp-2.16.0" \ + "grpc-1.60.0" \ + "gtest-1.14.0" \ + "msgpack-3.1.0" \ + "opencensus-cpp-5e5f2632c84e2230fb7ccb8e336f603d2ec6aa1b" \ + "opencensus-proto-0.3.0" \ + "perl-App-ChangeShebang-0.10" \ + "perl-Devel-PatchPerl-2.08" \ + "perl-IPC-Run3-0.049" \ + "prometheus-cpp-60eaa4ea47b16751a8e8740b05fe70914c68a480" \ + "protobuf-25.1" \ + "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" \ + "rules_foreign_cc-0.9.0" \ + "rules_go-0.27.0" \ + "rules_java-0.1.0" \ + "rules_jvm_external-2.10" \ + "rules_perl-022b8daf2bb4836ac7a50e4a1d8ea056a3e1e403" \ + "rules_pkg-0.7.0" \ + "rules_proto-5.3.0.21.7" \ + "rules_proto_grpc-1.0.0" \ + "rules_python-0.9.0" \ + "rules_ruby-5cf6ff74161d7f985b9bf86bb3c5fb16cef6337b" \ + "upb-455cfdb8ae60a1763e6d924e36851c6897a781bb" \ + "utf8_range-de0b4a8ff9b5d4c98108bdfe723291a33c52c54f" \ + "xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7" \ + "flatbuffers-2.0.0" \ + "Cython-0.29.25" \ + "hiredis-1.0.2" \ + "jemalloc-5.3.0" \ + "openssl-1.1.1wa" \ + "re2-20211101" \ + "zlib-1.2.11" \ + "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.7" \ + "zstd-1.5.0" \ + "xz-5.2.5" \ + "bzip2-1.0.8" \ +) + +for ray_dep in "${ray_deps[@]}"; do + mkdir -p $ray_dep; cd $ray_dep + yumdownloader --source $ray_dep + mkdir -p $ray_dep.src + 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 + + rpmbuild --define "_sourcedir %{_builddir}/.ray_deps/$ray_dep/$ray_dep.src" \ + --define "_builddir %{_builddir}/.ray_deps/$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 +done + +cd $original_dir + +cd python +bazel --version +%py3_build +cd - + +%install +cd python +%py3_install +mkdir -p %{buildroot}%{python3_sitelib} +rm -rf ray/serve/tests/ +rm -f ray/serve/BUILD +rm -f ray/rllib +cp -a ../rllib ./ray/ +cp -a ray/ %{buildroot}%{python3_sitelib} + +%clean +# cd python; bazel clean --expunge; rm -rf ~/.cache/bazel + +%files -n %{name} +%{python3_sitelib}/* +%{_bindir}/* + +%changelog +* Fri Feb 28 2025 Python_Bot - 2.42.1-1 +- Package Spec generated diff --git a/ray-2.42.1.tar.gz b/ray-2.42.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c69c943bb1b024cc06ac5d889af8ec178ddc1e1c Binary files /dev/null and b/ray-2.42.1.tar.gz differ diff --git a/ray-add-the-patch-to-adapt-flatbuffers.patch b/ray-add-the-patch-to-adapt-flatbuffers.patch new file mode 100644 index 0000000000000000000000000000000000000000..2ee60d8d69bea927a7f3fff8d92c5a98341b0346 --- /dev/null +++ b/ray-add-the-patch-to-adapt-flatbuffers.patch @@ -0,0 +1,59 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..88ffdbfceca4571ad669dc29c474165d817c3986 --- /dev/null +++ b/ray-modify-the-dependencies-in-bazel-build.patch @@ -0,0 +1,327 @@ +From 3231b2a238c238b36e8d2d56f91d0cb0a9fc5e95 Mon Sep 17 00:00:00 2001 +From: wangyuhang <524413304@qq.com> +Date: Mon, 31 Mar 2025 20:09:53 +0800 +Subject: [PATCH] ray: modify the dependencies in bazel build + +--- + WORKSPACE | 4 +- + bazel/ray_deps_setup.bzl | 124 +++++++++++++++++---------------------- + 2 files changed, 56 insertions(+), 72 deletions(-) + +diff --git a/WORKSPACE b/WORKSPACE +index 7aa6899..3f2fce0 100644 +--- a/WORKSPACE ++++ b/WORKSPACE +@@ -4,9 +4,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") + + http_archive( + name = "platforms", +- sha256 = "5eda539c841265031c2f82d8ae7a3a6490bd62176e0c038fc469eabf91f6149b", ++ strip_prefix = "bazel-platforms-0.0.9", + urls = [ +- "https://github.com/bazelbuild/platforms/releases/download/0.0.9/platforms-0.0.9.tar.gz", ++ "file:///tmp/.ray_deps/bazel-platforms-0.0.9.tar.gz", + ], + ) + +diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl +index 02fddb0..37b096e 100644 +--- a/bazel/ray_deps_setup.bzl ++++ b/bazel/ray_deps_setup.bzl +@@ -91,10 +91,9 @@ def ray_deps_setup(): + # Pinned grpc version: v23.4 + http_archive( + name = "com_google_protobuf", +- sha256 = "76a33e2136f23971ce46c72fd697cd94dc9f73d56ab23b753c3e16854c90ddfd", +- strip_prefix = "protobuf-2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a", ++ strip_prefix = "protobuf-25.1", + urls = [ +- "https://github.com/protocolbuffers/protobuf/archive/2c5fa078d8e86e5f4bd34e6f4c9ea9e8d7d4d44a.tar.gz", ++ "file:///tmp/.ray_deps/protobuf-25.1.tar.gz", + ], + patches = [ + "@com_github_grpc_grpc//third_party:protobuf.patch", +@@ -108,8 +107,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.7", ++ url = "file:///tmp/.ray_deps/redis-7.2.7.tar.gz", + patches = [ + "@com_github_ray_project_ray//thirdparty/patches:redis-quiet.patch", + ], +@@ -119,19 +118,15 @@ def ray_deps_setup(): + auto_http_archive( + name = "com_github_redis_hiredis", + build_file = "@com_github_ray_project_ray//bazel:BUILD.hiredis", +- url = "https://github.com/redis/hiredis/archive/60e5075d4ac77424809f855ba3e398df7aacefe8.tar.gz", +- sha256 = "b6d6f799b7714d85316f9ebfb76a35a78744f42ea3b6774289d882d13a2f0383", +- patches = [ +- "@com_github_ray_project_ray//thirdparty/patches:hiredis-windows-msvc.patch", +- ], ++ urls = ["file:///tmp/.ray_deps/hiredis-1.0.2.tar.gz",], ++ strip_prefix = "hiredis-1.0.2", + ) + + auto_http_archive( + name = "com_github_spdlog", + build_file = "@com_github_ray_project_ray//bazel:BUILD.spdlog", +- urls = ["https://github.com/gabime/spdlog/archive/v1.12.0.zip"], +- sha256 = "6174bf8885287422a6c6a0312eb8a30e8d22bcfcee7c48a6d02d1835d7769232", +- # spdlog rotation filename format conflict with ray, update the format. ++ urls = ["file:///tmp/.ray_deps/spdlog-1.11.0.tar.gz"], ++ strip_prefix = "spdlog-1.11.0", + patches = [ + "@com_github_ray_project_ray//thirdparty/patches:spdlog-rotation-file-format.patch", + ], +@@ -148,67 +143,66 @@ def ray_deps_setup(): + + auto_http_archive( + name = "rules_jvm_external", +- url = "https://github.com/bazelbuild/rules_jvm_external/archive/2.10.tar.gz", +- sha256 = "5c1b22eab26807d5286ada7392d796cbc8425d3ef9a57d114b79c5f8ef8aca7c", ++ strip_prefix = "rules_jvm_external-2.10", ++ url = "file:///tmp/.ray_deps/rules_jvm_external-2.10.tar.gz", + ) + + auto_http_archive( + name = "bazel_common", +- url = "https://github.com/google/bazel-common/archive/084aadd3b854cad5d5e754a7e7d958ac531e6801.tar.gz", +- sha256 = "a6e372118bc961b182a3a86344c0385b6b509882929c6b12dc03bb5084c775d5", ++ strip_prefix = "bazel-common-084aadd3b854cad5d5e754a7e7d958ac531e6801", ++ url = "file:///tmp/.ray_deps/bazel-common-084aadd3b854cad5d5e754a7e7d958ac531e6801.tar.gz", + ) + + http_archive( + name = "bazel_skylib", +- sha256 = "9f38886a40548c6e96c106b752f242130ee11aaa068a56ba7e56f4511f33e4f2", ++ strip_prefix = "bazel-skylib-1.6.1", + urls = [ +- "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.6.1/bazel-skylib-1.6.1.tar.gz", +- "https://github.com/bazelbuild/bazel-skylib/releases/download/1.6.1/bazel-skylib-1.6.1.tar.gz", ++ "file:///tmp/.ray_deps/bazel-skylib-1.6.1.tar.gz", + ], + ) + + auto_http_archive( + name = "com_github_nelhage_rules_boost", + # If you update the Boost version, remember to update the 'boost' rule. +- url = "https://github.com/nelhage/rules_boost/archive/57c99395e15720e287471d79178d36a85b64d6f6.tar.gz", +- sha256 = "490d11425393eed068966a4990ead1ff07c658f823fd982fddac67006ccc44ab", ++ strip_prefix = "rules_boost-57c99395e15720e287471d79178d36a85b64d6f6", ++ urls = ["file:///tmp/.ray_deps/rules_boost-57c99395e15720e287471d79178d36a85b64d6f6.tar.gz",], + ) + + auto_http_archive( + name = "com_github_google_flatbuffers", +- url = "https://github.com/google/flatbuffers/archive/63d51afd1196336a7d1f56a988091ef05deb1c62.tar.gz", +- sha256 = "3f469032571d324eabea88d7014c05fec8565a5877dbe49b2a52d8d1a0f18e63", ++ urls = ["file:///tmp/.ray_deps/flatbuffers-2.0.0.tar.gz",], ++ strip_prefix = "flatbuffers-2.0.0", + ) + + auto_http_archive( + name = "com_google_googletest", +- url = "https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz", +- sha256 = "8ad598c73ad796e0d8280b082cebd82a630d73e73cd3c70057938a6501bba5d7", ++ strip_prefix = "googletest-1.14.0", ++ url = "file:///tmp/.ray_deps/gtest-1.14.0.tar.gz", + ) + + auto_http_archive( + name = "com_github_gflags_gflags", +- url = "https://github.com/gflags/gflags/archive/e171aa2d15ed9eb17054558e0b3a6a413bb01067.tar.gz", +- sha256 = "b20f58e7f210ceb0e768eb1476073d0748af9b19dfbbf53f4fd16e3fb49c5ac8", ++ strip_prefix = "gflags-2.2.2", ++ url = "file:///tmp/.ray_deps/gflags-2.2.2.tar.gz", + ) + + auto_http_archive( + name = "cython", + build_file = True, +- url = "https://github.com/cython/cython/archive/refs/tags/0.29.37.tar.gz", +- sha256 = "824eb14045d85c5af677536134199dd6709db8fb0835452fd2d54bc3c8df8887", ++ urls = ["file:///tmp/.ray_deps/Cython-0.29.25.tar.gz",], ++ strip_prefix = "Cython-0.29.25", + ) + + auto_http_archive( + name = "com_github_johnynek_bazel_jar_jar", +- url = "https://github.com/johnynek/bazel_jar_jar/archive/171f268569384c57c19474b04aebe574d85fde0d.tar.gz", +- sha256 = "97c5f862482a05f385bd8f9d28a9bbf684b0cf3fae93112ee96f3fb04d34b193", ++ strip_prefix = "bazel_jar_jar-0.1.0", ++ url = "file:///tmp/.ray_deps/bazel_jar_jar-0.1.0.tar.gz", + ) + + auto_http_archive( + name = "io_opencensus_cpp", +- url = "https://github.com/census-instrumentation/opencensus-cpp/archive/5e5f2632c84e2230fb7ccb8e336f603d2ec6aa1b.zip", +- sha256 = "1b88d6663f05c6a56c1604eb2afad22831d5f28a76f6fab8f37187f1e4ace425", ++ strip_prefix = "opencensus-cpp-5e5f2632c84e2230fb7ccb8e336f603d2ec6aa1b", ++ url = "file:///tmp/.ray_deps/opencensus-cpp-5e5f2632c84e2230fb7ccb8e336f603d2ec6aa1b.tar.gz", + 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(): + # TODO(owner): Upgrade abseil to latest version after protobuf updated, which requires to upgrade `rules_cc` first. + auto_http_archive( + name = "com_google_absl", +- sha256 = "987ce98f02eefbaf930d6e38ab16aa05737234d7afbab2d5c4ea7adbe50c28ed", + strip_prefix = "abseil-cpp-20230802.1", + urls = [ +- "https://github.com/abseil/abseil-cpp/archive/refs/tags/20230802.1.tar.gz", ++ "file:///tmp/.ray_deps/abseil-cpp-20230802.1.tar.gz", + ], + ) + + # OpenCensus depends on jupp0r/prometheus-cpp + auto_http_archive( + name = "com_github_jupp0r_prometheus_cpp", +- url = "https://github.com/jupp0r/prometheus-cpp/archive/60eaa4ea47b16751a8e8740b05fe70914c68a480.tar.gz", +- sha256 = "ec825b802487ac18b0d98e2e8b7961487b12562f8f82e424521d0a891d9e1373", ++ url = "file:///tmp/.ray_deps/prometheus-cpp-60eaa4ea47b16751a8e8740b05fe70914c68a480.tar.gz", ++ strip_prefix = "prometheus-cpp-60eaa4ea47b16751a8e8740b05fe70914c68a480", + 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(): + auto_http_archive( + name = "com_github_grpc_grpc", + # NOTE: If you update this, also update @boringssl's hash. +- url = "https://github.com/grpc/grpc/archive/refs/tags/v1.57.1.tar.gz", +- sha256 = "0762f809b9de845e6a7c809cabccad6aa4143479fd43b396611fe5a086c0aeeb", ++ strip_prefix = "grpc-1.60.0", ++ urls = ["file:///tmp/.ray_deps/grpc-1.60.0.tar.gz",], + patches = [ + "@com_github_ray_project_ray//thirdparty/patches:grpc-cython-copts.patch", + ], +@@ -254,35 +247,33 @@ def ray_deps_setup(): + + http_archive( + name = "openssl", +- strip_prefix = "openssl-1.1.1f", +- sha256 = "186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35", ++ strip_prefix = "openssl-1.1.1wa", + urls = [ +- "https://openssl.org/source/old/1.1.1/openssl-1.1.1f.tar.gz", ++ "file:///tmp/.ray_deps/openssl-1.1.1wa.tar.gz", + ], + build_file = "@rules_foreign_cc_thirdparty//openssl:BUILD.openssl.bazel", + ) + + http_archive( + name = "rules_foreign_cc", +- sha256 = "2a4d07cd64b0719b39a7c12218a3e507672b82a97b98c6a89d38565894cf7c51", + strip_prefix = "rules_foreign_cc-0.9.0", +- url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.9.0.tar.gz", ++ url = "file:///tmp/.ray_deps/rules_foreign_cc-0.9.0.tar.gz", + ) + + # Using shallow_since allows the rule to clone down fewer commits. + # Reference: https://bazel.build/rules/lib/repo/git +- git_repository( ++ http_archive( + name = "rules_perl", +- remote = "https://github.com/bazelbuild/rules_perl.git", +- commit = "022b8daf2bb4836ac7a50e4a1d8ea056a3e1e403", +- shallow_since = "1663780239 -0700", ++ strip_prefix = "rules_perl-022b8daf2bb4836ac7a50e4a1d8ea056a3e1e403", ++ urls = [ ++ "file:///tmp/.ray_deps/rules_perl-022b8daf2bb4836ac7a50e4a1d8ea056a3e1e403.tar.gz", ++ ], + ) + + http_archive( + name = "rules_foreign_cc_thirdparty", +- sha256 = "2a4d07cd64b0719b39a7c12218a3e507672b82a97b98c6a89d38565894cf7c51", + strip_prefix = "rules_foreign_cc-0.9.0/examples/third_party", +- url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.9.0.tar.gz", ++ url = "file:///tmp/.ray_deps/rules_foreign_cc-0.9.0.tar.gz", + ) + + http_archive( +@@ -291,10 +282,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", +- sha256 = "0675a4f86ce5e959703425d6f9063eaadf6b61b7f3399e77a154c0e85bad46b1", + strip_prefix = "boringssl-342e805bc1f5dfdd650e3f031686d6c939b095d9", + urls = [ +- "https://github.com/google/boringssl/archive/342e805bc1f5dfdd650e3f031686d6c939b095d9.tar.gz", ++ "file:///tmp/.ray_deps/boringssl-342e805bc1f5dfdd650e3f031686d6c939b095d9.tar.gz", + ], + ) + +@@ -306,14 +296,13 @@ def ray_deps_setup(): + # protobuf library that Ray supports. + http_archive( + name = "com_google_protobuf_rules_proto_grpc", +- strip_prefix = "protobuf-3.19.4", +- urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.19.4.tar.gz"], +- sha256 = "3bd7828aa5af4b13b99c191e8b1e884ebfa9ad371b0ce264605d347f135d2568", ++ strip_prefix = "protobuf-25.1", ++ urls = ["file:///tmp/.ray_deps/protobuf-25.1.tar.gz"], + ) + auto_http_archive( + name = "rules_proto_grpc", +- url = "https://github.com/rules-proto-grpc/rules_proto_grpc/archive/a74fef39c5fe636580083545f76d1eab74f6450d.tar.gz", +- sha256 = "2f6606151ec042e23396f07de9e7dcf6ca9a5db1d2b09f0cc93a7fc7f4008d1b", ++ strip_prefix = "rules_proto_grpc-1.0.0", ++ url = "file:///tmp/.ray_deps/rules_proto_grpc-1.0.0.tar.gz", + repo_mapping = { + "@com_google_protobuf": "@com_google_protobuf_rules_proto_grpc", + }, +@@ -322,8 +311,8 @@ def ray_deps_setup(): + auto_http_archive( + name = "msgpack", + build_file = True, +- url = "https://github.com/msgpack/msgpack-c/archive/8085ab8721090a447cf98bb802d1406ad7afe420.tar.gz", +- sha256 = "83c37c9ad926bbee68d564d9f53c6cbb057c1f755c264043ddd87d89e36d15bb", ++ strip_prefix = "msgpack-3.1.0", ++ url = "file:///tmp/.ray_deps/msgpack-3.1.0.tar.gz", + patches = [ + "@com_github_ray_project_ray//thirdparty/patches:msgpack-windows-iovec.patch", + ], +@@ -332,15 +321,13 @@ def ray_deps_setup(): + http_archive( + name = "io_opencensus_proto", + strip_prefix = "opencensus-proto-0.3.0/src", +- urls = ["https://github.com/census-instrumentation/opencensus-proto/archive/v0.3.0.tar.gz"], +- sha256 = "b7e13f0b4259e80c3070b583c2f39e53153085a6918718b1c710caf7037572b0", ++ urls = ["file:///tmp/.ray_deps/opencensus-proto-0.3.0.tar.gz"], + ) + + http_archive( + name = "nlohmann_json", +- strip_prefix = "json-3.9.1", +- urls = ["https://github.com/nlohmann/json/archive/v3.9.1.tar.gz"], +- sha256 = "4cf0df69731494668bdd6460ed8cb269b68de9c19ad8c27abc24cd72605b2d5b", ++ strip_prefix = "json-3.11.2", ++ urls = ["file:///tmp/.ray_deps/nlohmann-json-3.11.2.tar.gz"], + build_file = "@com_github_ray_project_ray//bazel:BUILD.nlohmann_json", + ) + +@@ -358,16 +345,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). +- url = "https://github.com/hedronvision/bazel-compile-commands-extractor/archive/2e8b7654fa10c44b9937453fa4974ed2229d5366.tar.gz", ++ url = "file:///tmp/.ray_deps/bazel-compile-commands-extractor-2e8b7654fa10c44b9937453fa4974ed2229d5366.tar.gz", + strip_prefix = "bazel-compile-commands-extractor-2e8b7654fa10c44b9937453fa4974ed2229d5366", +- # When you first run this tool, it'll recommend a sha256 hash to put here with a message like: "DEBUG: Rule 'hedron_compile_commands' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = ..." +- sha256 = "7fbbbc05c112c44e9b406612e6a7a7f4789a6918d7aacefef4c35c105286930c", + ) + + http_archive( + name = "jemalloc", +- urls = ["https://github.com/jemalloc/jemalloc/releases/download/5.3.0/jemalloc-5.3.0.tar.bz2"], ++ urls = ["file:///tmp/.ray_deps/jemalloc-5.3.0.tar.gz"], + build_file = "@com_github_ray_project_ray//bazel:BUILD.jemalloc", +- sha256 = "2db82d1e7119df3e71b7640219b6dfe84789bc0537983c3b7ac4f7189aecfeaa", + strip_prefix = "jemalloc-5.3.0", + ) +-- +2.33.0 + diff --git a/ray-modiy-redis-quiet.patch-to-adapt-redis.patch b/ray-modiy-redis-quiet.patch-to-adapt-redis.patch new file mode 100644 index 0000000000000000000000000000000000000000..653b0f67869ab6b7af3ecd936cf2b0ac2be75d44 --- /dev/null +++ b/ray-modiy-redis-quiet.patch-to-adapt-redis.patch @@ -0,0 +1,25 @@ +From c4af2ccae27aba577a8e3f10c38c9bf8981bc39e Mon Sep 17 00:00:00 2001 +From: rpm-build +Date: Wed, 9 Apr 2025 16:13:53 +0800 +Subject: [PATCH] ray: modiy redis-quiet.patch to adapt redis + +--- + thirdparty/patches/redis-quiet.patch | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/thirdparty/patches/redis-quiet.patch b/thirdparty/patches/redis-quiet.patch +index 3a5449d..14f652c 100644 +--- a/thirdparty/patches/redis-quiet.patch ++++ b/thirdparty/patches/redis-quiet.patch +@@ -47,7 +47,7 @@ index 3bf0363d5..ea5d12cd4 100644 + jemalloc: .make-prerequisites + - @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) + + #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) +- cd jemalloc && ./configure --disable-cxx --with-version=5.3.0-0-g0 --with-lg-quantum=3 --disable-cache-oblivious --with-jemalloc-prefix=je_ CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" $(JEMALLOC_CONFIGURE_OPTS) ++ cd jemalloc && ./configure --disable-cxx --with-version=5.3.0-0-g0 --with-lg-page=12 --with-lg-quantum=3 --disable-cache-oblivious --with-jemalloc-prefix=je_ CFLAGS="$(JEMALLOC_CFLAGS)" LDFLAGS="$(JEMALLOC_LDFLAGS)" $(JEMALLOC_CONFIGURE_OPTS) + cd jemalloc && $(MAKE) lib/libjemalloc.a + + diff --git a/deps/jemalloc/Makefile.in b/deps/jemalloc/Makefile.in +-- +2.33.0 + diff --git a/ray_pack/rules_apple/rules_swift.spec b/ray_pack/rules_apple/rules_swift.spec new file mode 100644 index 0000000000000000000000000000000000000000..177cfa5c21e88a834c8cf9f40e733834a451fecd --- /dev/null +++ b/ray_pack/rules_apple/rules_swift.spec @@ -0,0 +1,55 @@ +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + + + +%define src_install_dir /usr/src/%{name} +%define base_name rules_swift +%define version_postfix 1_2 + +Name: rules_swift-%{version_postfix} +Version: 1.2.0 +Release: 0 +Summary: Swift rules for Bazel +License: Apache-2.0 +Group: Development/Tools/Building +URL: https://github.com/bazelbuild/rules_swift +Source0: %{base_name}.%{version}.tar.gz +BuildRequires: fdupes +BuildArch: noarch + +%description +Bazel rules which support building software written in Swift. + +%package source +Summary: Source code of rules_swift + +%description source +Bazel rules which support building software written in Swift. + +This package contains source code of rules_swift + +%prep +%setup -qn %{base_name}-%{version} + +%build + +%install +rm -f examples/xplatform/swift_import/import.a +mkdir -p %{buildroot}%{src_install_dir} +cp -R * %{buildroot}%{src_install_dir} +fdupes %{buildroot}%{src_install_dir} + +%files source +%{src_install_dir} + +%changelog + + diff --git a/rules_boost-modify-the-dependencies-in-ray-bazel-build.patch b/rules_boost-modify-the-dependencies-in-ray-bazel-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..57c6ef0e08a165316f8e7a09a83ae05d27a3b33f --- /dev/null +++ b/rules_boost-modify-the-dependencies-in-ray-bazel-build.patch @@ -0,0 +1,126 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..692aedfe1503dd2b06df0d1568e0f8d4dfad72ff --- /dev/null +++ b/rules_foreign_cc-add-the-patch-to-adapt-flatbuffers.patch @@ -0,0 +1,148 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..54b89cfb382e706795415e25749def894de550bf --- /dev/null +++ b/rules_foreign_cc-modify-the-dependencies-in-bazel-bu.patch @@ -0,0 +1,76 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..3641a86bbf0547e9b9b9df925360fcbf190490e4 --- /dev/null +++ b/rules_perl-modify-the-dependencies-in-ray-bazel-build.patch @@ -0,0 +1,72 @@ +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 + diff --git a/set-setup_requires-to-none-in-setup.py.patch b/set-setup_requires-to-none-in-setup.py.patch new file mode 100644 index 0000000000000000000000000000000000000000..776160dd5cabbb0f3c4285ec827106fa3deee803 --- /dev/null +++ b/set-setup_requires-to-none-in-setup.py.patch @@ -0,0 +1,25 @@ +From 7fdd9dcfac0f820bab58b76dbbf7c11b891a1d04 Mon Sep 17 00:00:00 2001 +From: wangyuhang <524413304@qq.com> +Date: Tue, 25 Mar 2025 19:54:45 +0800 +Subject: [PATCH] set setup_requires to none in setup.py + +--- + python/setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/python/setup.py b/python/setup.py +index 98f8272..9a871cb 100644 +--- a/python/setup.py ++++ b/python/setup.py +@@ -796,7 +796,7 @@ setuptools.setup( + # The BinaryDistribution argument triggers build_ext. + distclass=BinaryDistribution, + install_requires=setup_spec.install_requires, +- setup_requires=["cython >= 0.29.32", "wheel"], ++ setup_requires=[], + extras_require=setup_spec.extras, + entry_points={ + "console_scripts": [ +-- +2.33.0 +