|
| 1 | +From eafef305a09bcc1903676ca40de7206d431630ff Mon Sep 17 00:00:00 2001 |
| 2 | +From: Matti Picus <matti.picus@gmail.com> |
| 3 | +Date: Thu, 31 Jul 2025 17:55:03 +1000 |
| 4 | +Subject: [PATCH] do not build redis, openssl |
| 5 | + |
| 6 | +--- |
| 7 | + BUILD.bazel | 26 -------- |
| 8 | + bazel/ray_deps_build_all.bzl | 2 - |
| 9 | + bazel/ray_deps_setup.bzl | 33 ---------- |
| 10 | + thirdparty/patches/redis-quiet.patch | 91 ---------------------------- |
| 11 | + 4 files changed, 152 deletions(-) |
| 12 | + delete mode 100644 thirdparty/patches/redis-quiet.patch |
| 13 | + |
| 14 | +diff --git a/BUILD.bazel b/BUILD.bazel |
| 15 | +index f4d1f1dec7..0e1b2dd9e2 100644 |
| 16 | +--- a/BUILD.bazel |
| 17 | ++++ b/BUILD.bazel |
| 18 | +@@ -1003,22 +1003,6 @@ filegroup( |
| 19 | + ]), |
| 20 | + ) |
| 21 | + |
| 22 | +-alias( |
| 23 | +- name = "redis-server", |
| 24 | +- actual = select({ |
| 25 | +- "@platforms//os:windows": "@com_github_tporadowski_redis_bin//:redis-server.exe", |
| 26 | +- "//conditions:default": "@com_github_antirez_redis//:redis-server", |
| 27 | +- }), |
| 28 | +-) |
| 29 | +- |
| 30 | +-alias( |
| 31 | +- name = "redis-cli", |
| 32 | +- actual = select({ |
| 33 | +- "@platforms//os:windows": "@com_github_tporadowski_redis_bin//:redis-cli.exe", |
| 34 | +- "//conditions:default": "@com_github_antirez_redis//:redis-cli", |
| 35 | +- }), |
| 36 | +-) |
| 37 | +- |
| 38 | + filegroup( |
| 39 | + name = "all_py_proto", |
| 40 | + srcs = [ |
| 41 | +@@ -1077,15 +1061,6 @@ copy_to_workspace( |
| 42 | + dstdir = "python/ray/serve/generated", |
| 43 | + ) |
| 44 | + |
| 45 | +-copy_to_workspace( |
| 46 | +- name = "cp_redis", |
| 47 | +- srcs = [ |
| 48 | +- ":redis-cli", |
| 49 | +- ":redis-server", |
| 50 | +- ], |
| 51 | +- dstdir = "python/ray/core/src/ray/thirdparty/redis/src", |
| 52 | +-) |
| 53 | +- |
| 54 | + copy_to_workspace( |
| 55 | + name = "cp_raylet", |
| 56 | + srcs = [":raylet"], |
| 57 | +@@ -1138,7 +1113,6 @@ genrule( |
| 58 | + ":cp_raylet_so", |
| 59 | + ":python_sources", |
| 60 | + ":install_py_proto", |
| 61 | +- ":cp_redis", |
| 62 | + ":cp_raylet", |
| 63 | + ":cp_gcs_server", |
| 64 | + ] + select({ |
| 65 | +diff --git a/bazel/ray_deps_build_all.bzl b/bazel/ray_deps_build_all.bzl |
| 66 | +index a8597dd184..00899db55a 100644 |
| 67 | +--- a/bazel/ray_deps_build_all.bzl |
| 68 | ++++ b/bazel/ray_deps_build_all.bzl |
| 69 | +@@ -7,7 +7,6 @@ load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") |
| 70 | + load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_toolchains") |
| 71 | + load("@com_github_johnynek_bazel_jar_jar//:jar_jar.bzl", "jar_jar_repositories") |
| 72 | + load("@rules_foreign_cc//foreign_cc:repositories.bzl", "rules_foreign_cc_dependencies") |
| 73 | +-load("@rules_foreign_cc_thirdparty//openssl:openssl_setup.bzl", "openssl_setup") |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +@@ -21,4 +20,3 @@ def ray_deps_build_all(): |
| 78 | + rules_proto_grpc_toolchains() |
| 79 | + jar_jar_repositories() |
| 80 | + rules_foreign_cc_dependencies() |
| 81 | +- openssl_setup() |
| 82 | +diff --git a/bazel/ray_deps_setup.bzl b/bazel/ray_deps_setup.bzl |
| 83 | +index e98895248d..05b8c45283 100644 |
| 84 | +--- a/bazel/ray_deps_setup.bzl |
| 85 | ++++ b/bazel/ray_deps_setup.bzl |
| 86 | +@@ -102,20 +102,6 @@ def ray_deps_setup(): |
| 87 | + patch_args = ["-p1"], |
| 88 | + ) |
| 89 | + |
| 90 | +- # NOTE(lingxuan.zlx): 3rd party dependencies could be accessed, so it suggests |
| 91 | +- # all of http/git_repository should add prefix for patches defined in ray directory. |
| 92 | +- auto_http_archive( |
| 93 | +- name = "com_github_antirez_redis", |
| 94 | +- build_file = "@com_github_ray_project_ray//bazel:redis.BUILD", |
| 95 | +- patch_args = ["-p1"], |
| 96 | +- url = "https://github.com/redis/redis/archive/refs/tags/7.2.3.tar.gz", |
| 97 | +- sha256 = "afd656dbc18a886f9a1cc08a550bf5eb89de0d431e713eba3ae243391fb008a6", |
| 98 | +- patches = [ |
| 99 | +- "@com_github_ray_project_ray//thirdparty/patches:redis-quiet.patch", |
| 100 | +- ], |
| 101 | +- workspace_file_content = 'workspace(name = "com_github_antirez_redis")', |
| 102 | +- ) |
| 103 | +- |
| 104 | + auto_http_archive( |
| 105 | + name = "com_github_redis_hiredis", |
| 106 | + build_file = "@com_github_ray_project_ray//bazel:hiredis.BUILD", |
| 107 | +@@ -269,16 +255,6 @@ def ray_deps_setup(): |
| 108 | + ], |
| 109 | + ) |
| 110 | + |
| 111 | +- http_archive( |
| 112 | +- name = "openssl", |
| 113 | +- strip_prefix = "openssl-1.1.1f", |
| 114 | +- sha256 = "186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35", |
| 115 | +- urls = [ |
| 116 | +- "https://openssl.org/source/old/1.1.1/openssl-1.1.1f.tar.gz", |
| 117 | +- ], |
| 118 | +- build_file = "@rules_foreign_cc_thirdparty//openssl:BUILD.openssl.bazel", |
| 119 | +- ) |
| 120 | +- |
| 121 | + http_archive( |
| 122 | + name = "rules_foreign_cc", |
| 123 | + sha256 = "2a4d07cd64b0719b39a7c12218a3e507672b82a97b98c6a89d38565894cf7c51", |
| 124 | +@@ -286,15 +262,6 @@ def ray_deps_setup(): |
| 125 | + url = "https://github.com/bazelbuild/rules_foreign_cc/archive/refs/tags/0.9.0.tar.gz", |
| 126 | + ) |
| 127 | + |
| 128 | +- # Using shallow_since allows the rule to clone down fewer commits. |
| 129 | +- # Reference: https://bazel.build/rules/lib/repo/git |
| 130 | +- git_repository( |
| 131 | +- name = "rules_perl", |
| 132 | +- remote = "https://github.com/bazelbuild/rules_perl.git", |
| 133 | +- commit = "022b8daf2bb4836ac7a50e4a1d8ea056a3e1e403", |
| 134 | +- shallow_since = "1663780239 -0700", |
| 135 | +- ) |
| 136 | +- |
| 137 | + http_archive( |
| 138 | + name = "rules_foreign_cc_thirdparty", |
| 139 | + sha256 = "2a4d07cd64b0719b39a7c12218a3e507672b82a97b98c6a89d38565894cf7c51", |
| 140 | +diff --git a/thirdparty/patches/redis-quiet.patch b/thirdparty/patches/redis-quiet.patch |
| 141 | +deleted file mode 100644 |
| 142 | +index 3a5449dacd..0000000000 |
| 143 | +--- a/thirdparty/patches/redis-quiet.patch |
| 144 | ++++ /dev/null |
| 145 | +@@ -1,91 +0,0 @@ |
| 146 | +-diff --git a/deps/Makefile b/deps/Makefile |
| 147 | +-index 3bf0363d5..ea5d12cd4 100644 |
| 148 | +---- a/deps/Makefile |
| 149 | +-+++ b/deps/Makefile |
| 150 | +-@@ -51,25 +51,25 @@ ifneq (,$(filter $(BUILD_TLS),yes module)) |
| 151 | +- endif |
| 152 | +- |
| 153 | +- hiredis: .make-prerequisites |
| 154 | +-- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 155 | +-+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 156 | +- cd hiredis && $(MAKE) static $(HIREDIS_MAKE_FLAGS) |
| 157 | +- |
| 158 | +- .PHONY: hiredis |
| 159 | +- |
| 160 | +- linenoise: .make-prerequisites |
| 161 | +-- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 162 | +-+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 163 | +- cd linenoise && $(MAKE) |
| 164 | +- |
| 165 | +- .PHONY: linenoise |
| 166 | +- |
| 167 | +- hdr_histogram: .make-prerequisites |
| 168 | +-- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 169 | +-+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 170 | +- cd hdr_histogram && $(MAKE) |
| 171 | +- |
| 172 | +- .PHONY: hdr_histogram |
| 173 | +- |
| 174 | +- fpconv: .make-prerequisites |
| 175 | +-- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 176 | +-+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 177 | +- cd fpconv && $(MAKE) |
| 178 | +- |
| 179 | +- .PHONY: fpconv |
| 180 | +-@@ -98,7 +98,7 @@ AR=ar |
| 181 | +- ARFLAGS=rc |
| 182 | +- |
| 183 | +- lua: .make-prerequisites |
| 184 | +-- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 185 | +-+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 186 | +- cd lua/src && $(MAKE) all CFLAGS="$(LUA_CFLAGS)" MYLDFLAGS="$(LUA_LDFLAGS)" AR="$(AR) $(ARFLAGS)" |
| 187 | +- |
| 188 | +- .PHONY: lua |
| 189 | +-@@ -111,7 +111,7 @@ JEMALLOC_CONFIGURE_OPTS += --host=$(DEB_HOST_GNU_TYPE) |
| 190 | +- endif |
| 191 | +- |
| 192 | +- jemalloc: .make-prerequisites |
| 193 | +-- @printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 194 | +-+ #@printf '%b %b\n' $(MAKECOLOR)MAKE$(ENDCOLOR) $(BINCOLOR)$@$(ENDCOLOR) |
| 195 | +- 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) |
| 196 | +- cd jemalloc && $(MAKE) lib/libjemalloc.a |
| 197 | +- |
| 198 | +-diff --git a/deps/jemalloc/Makefile.in b/deps/jemalloc/Makefile.in |
| 199 | +-index 1193cd859..140995eb5 100644 |
| 200 | +---- a/deps/jemalloc/Makefile.in |
| 201 | +-+++ b/deps/jemalloc/Makefile.in |
| 202 | +-@@ -496,7 +496,7 @@ $(objroot)include/jemalloc/internal/private_namespace_jet.gen.h: $(C_JET_SYMS) |
| 203 | +- $(SHELL) $(srcroot)include/jemalloc/internal/private_namespace.sh $^ > $@ |
| 204 | +- |
| 205 | +- %.h: %.gen.h |
| 206 | +-- @if ! `cmp -s $< $@` ; then echo "cp $< $@"; cp $< $@ ; fi |
| 207 | +-+ @if ! `cmp -s $< $@` ; then cp $< $@ ; fi |
| 208 | +- |
| 209 | +- $(CPP_OBJS) $(CPP_PIC_OBJS) $(TESTS_CPP_OBJS): %.$(O): |
| 210 | +- @mkdir -p $(@D) |
| 211 | +-diff --git a/src/Makefile b/src/Makefile |
| 212 | +-index ecbd2753d..737a14777 100644 |
| 213 | +---- a/src/Makefile |
| 214 | +-+++ b/src/Makefile |
| 215 | +-@@ -116,7 +116,7 @@ endif |
| 216 | +- # Override default settings if possible |
| 217 | +- -include .make-settings |
| 218 | +- |
| 219 | +--FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) |
| 220 | +-+FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) $(CPPFLAGS) |
| 221 | +- FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) |
| 222 | +- FINAL_LIBS=-lm |
| 223 | +- DEBUG=-g -ggdb |
| 224 | +-@@ -355,9 +355,9 @@ REDIS_CHECK_AOF_NAME=redis-check-aof$(PROG_SUFFIX) |
| 225 | +- ALL_SOURCES=$(sort $(patsubst %.o,%.c,$(REDIS_SERVER_OBJ) $(REDIS_CLI_OBJ) $(REDIS_BENCHMARK_OBJ))) |
| 226 | +- |
| 227 | +- all: $(REDIS_SERVER_NAME) $(REDIS_SENTINEL_NAME) $(REDIS_CLI_NAME) $(REDIS_BENCHMARK_NAME) $(REDIS_CHECK_RDB_NAME) $(REDIS_CHECK_AOF_NAME) $(TLS_MODULE) |
| 228 | +-- @echo "" |
| 229 | +-- @echo "Hint: It's a good idea to run 'make test' ;)" |
| 230 | +-- @echo "" |
| 231 | +-+ #@echo "" |
| 232 | +-+ #@echo "Hint: It's a good idea to run 'make test' ;)" |
| 233 | +-+ #@echo "" |
| 234 | +- |
| 235 | +- Makefile.dep: |
| 236 | +- -$(REDIS_CC) -MM $(ALL_SOURCES) > Makefile.dep 2> /dev/null || true |
| 237 | +-- |
| 238 | +2.39.5 (Apple Git-154) |
| 239 | + |
0 commit comments