Skip to content

Commit 088e232

Browse files
committed
envoy: 1.34.2 -> 1.35.1
1 parent c294115 commit 088e232

File tree

6 files changed

+48
-79
lines changed

6 files changed

+48
-79
lines changed

pkgs/by-name/en/envoy/0001-nixpkgs-use-system-Python.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ index 9867dc3a46dbe780eb3c02bad8f6a22a2c7fd97e..ff8685e0e437aee447218e912f1cf3e4
4545
extra_pip_args = ["--require-hashes"],
4646
)
4747
diff --git a/bazel/repositories_extra.bzl b/bazel/repositories_extra.bzl
48-
index 7a9d3bbb53b567a8f398abaefe5ff044056d4d21..a5b75718de667883824e4320e2d563830b02f5d2 100644
48+
index 84e2a69c092fa4c824401a52b2c39a49f83d0837..e5afd5743613ad5fdbf7b28a99b6d1b5902566ac 100644
4949
--- a/bazel/repositories_extra.bzl
5050
+++ b/bazel/repositories_extra.bzl
51-
@@ -3,19 +3,11 @@ load("@bazel_features//:deps.bzl", "bazel_features_deps")
52-
load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_bazel_features")
51+
@@ -4,19 +4,11 @@ load("@com_google_protobuf//bazel/private:proto_bazel_features.bzl", "proto_baze
5352
load("@emsdk//:deps.bzl", emsdk_deps = "deps")
53+
load("@envoy_examples//bazel:env.bzl", "envoy_examples_env")
5454
load("@proxy_wasm_cpp_host//bazel/cargo/wasmtime/remote:crates.bzl", "crate_repositories")
5555
-load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_toolchains")
5656
+load("@rules_python//python:repositories.bzl", "py_repositories")
@@ -69,7 +69,7 @@ index 7a9d3bbb53b567a8f398abaefe5ff044056d4d21..a5b75718de667883824e4320e2d56383
6969
ignore_root_user_error = False):
7070
bazel_features_deps()
7171
emsdk_deps()
72-
@@ -23,13 +15,6 @@ def envoy_dependencies_extra(
72+
@@ -24,13 +16,6 @@ def envoy_dependencies_extra(
7373
crate_repositories()
7474
py_repositories()
7575

pkgs/by-name/en/envoy/0002-nixpkgs-use-system-Go.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ Signed-off-by: Luke Granger-Brown <git@lukegb.com>
1010
1 file changed, 1 insertion(+), 1 deletion(-)
1111

1212
diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl
13-
index aef33aa103dc1136e63e165fb9ee6a267f52ba54..c5aefca14b729b548c4e90857202eb82576b507d 100644
13+
index 4615eed5c9ade5279f8174cf1bd3987a8b2d52f1..10be4b0b3f65e486c1dc8419337a5cf823431774 100644
1414
--- a/bazel/dependency_imports.bzl
1515
+++ b/bazel/dependency_imports.bzl
16-
@@ -22,7 +22,7 @@ load("@rules_rust//rust:defs.bzl", "rust_common")
16+
@@ -24,7 +24,7 @@ load("@rules_rust//rust:defs.bzl", "rust_common")
1717
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains", "rust_repository_set")
1818

1919
# go version for rules_go

pkgs/by-name/en/envoy/0003-nixpkgs-use-system-C-C-toolchains.patch

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ Signed-off-by: Luke Granger-Brown <git@lukegb.com>
1010
1 file changed, 5 insertions(+), 1 deletion(-)
1111

1212
diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl
13-
index c5aefca14b729b548c4e90857202eb82576b507d..6938ce63abb53661e8d1fb71eaaab03ba0cc37c6 100644
13+
index 10be4b0b3f65e486c1dc8419337a5cf823431774..b0badb3ccab3b112043bd8616770f8014238d396 100644
1414
--- a/bazel/dependency_imports.bzl
1515
+++ b/bazel/dependency_imports.bzl
16-
@@ -30,7 +30,11 @@ YQ_VERSION = "4.24.4"
17-
BUF_VERSION = "v1.50.0"
18-
19-
def envoy_dependency_imports(go_version = GO_VERSION, jq_version = JQ_VERSION, yq_version = YQ_VERSION, buf_version = BUF_VERSION):
16+
@@ -38,7 +38,11 @@ def envoy_dependency_imports(
17+
yq_version = YQ_VERSION,
18+
buf_sha = BUF_SHA,
19+
buf_version = BUF_VERSION):
2020
- rules_foreign_cc_dependencies()
2121
+ rules_foreign_cc_dependencies(
2222
+ register_default_tools=False, # no prebuilt toolchains
23-
+ register_built_tools=False, # nor from source
24-
+ register_preinstalled_tools=True, # use host tools (default)
23+
+ register_built_tools=False, # nor from source
24+
+ register_preinstalled_tools=True, # use host tools (default)
2525
+ )
2626
go_rules_dependencies()
2727
go_register_toolchains(go_version)

pkgs/by-name/en/envoy/0004-nixpkgs-bump-rules_rust-to-0.60.0.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Signed-off-by: Luke Granger-Brown <git@lukegb.com>
99
1 file changed, 3 insertions(+), 3 deletions(-)
1010

1111
diff --git a/bazel/repository_locations.bzl b/bazel/repository_locations.bzl
12-
index 6904bc93bdda3ee2308f13d61e62295fa11d799b..e4574878a566cceb4dc2343f3cade0350ea5e5ff 100644
12+
index 1293e432c815071ed55721760e583ac0e9f40108..664f8c8e2bf4641e7862e9321fd6f91d162c3c17 100644
1313
--- a/bazel/repository_locations.bzl
1414
+++ b/bazel/repository_locations.bzl
15-
@@ -1465,8 +1465,8 @@ REPOSITORY_LOCATIONS_SPEC = dict(
15+
@@ -1528,8 +1528,8 @@ REPOSITORY_LOCATIONS_SPEC = dict(
1616
project_name = "Bazel rust rules",
1717
project_desc = "Bazel rust rules (used by Wasm)",
1818
project_url = "https://github.com/bazelbuild/rules_rust",
@@ -23,7 +23,7 @@ index 6904bc93bdda3ee2308f13d61e62295fa11d799b..e4574878a566cceb4dc2343f3cade035
2323
# Note: rules_rust should point to the releases, not archive to avoid the hassle of bootstrapping in crate_universe.
2424
# This is described in https://bazelbuild.github.io/rules_rust/crate_universe.html#setup, otherwise bootstrap
2525
# is required which in turn requires a system CC toolchains, not the bazel controlled ones.
26-
@@ -1477,7 +1477,7 @@ REPOSITORY_LOCATIONS_SPEC = dict(
26+
@@ -1540,7 +1540,7 @@ REPOSITORY_LOCATIONS_SPEC = dict(
2727
"dataplane_ext",
2828
],
2929
extensions = ["envoy.wasm.runtime.wasmtime"],

pkgs/by-name/en/envoy/package.nix

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
lib,
3-
bazel_6,
3+
bazel_7,
44
bazel-gazelle,
55
buildBazelPackage,
66
fetchFromGitHub,
@@ -16,7 +16,7 @@
1616
jdk,
1717
ninja,
1818
patchelf,
19-
python3,
19+
python312,
2020
linuxHeaders,
2121
nixosTests,
2222
runCommandLocal,
@@ -34,24 +34,26 @@ let
3434
# However, the version string is more useful for end-users.
3535
# These are contained in a attrset of their own to make it obvious that
3636
# people should update both.
37-
version = "1.34.2";
38-
rev = "c657e59fac461e406c8fdbe57ced833ddc236ee1";
39-
hash = "sha256-f9JsgHEyOg1ZoEb7d3gy3+qoovpA3oOx6O8yL0U8mhI=";
37+
version = "1.35.1";
38+
rev = "6e9539d0366baf85baf9acb3e618cb3384765f13";
39+
hash = "sha256-c1c8j/BCRrvAEqjt4EQ/d7zsM1zUe4Qr5EHzpuGblIk=";
4040
};
4141

4242
# these need to be updated for any changes to fetchAttrs
4343
depsHash =
4444
{
45-
x86_64-linux = "sha256-CczmVD/3tWR3LygXc3cTAyrMPZUTajqtRew85wBM5mY=";
46-
aarch64-linux = "sha256-GemlfXHlaHPn1/aBxj2Ve9tuwsEdlQQCU1v57378Dgs=";
45+
x86_64-linux = "sha256-E6yUSd00ngmjaMds+9UVZLtcYhzeS8F9eSIkC1mZSps=";
46+
aarch64-linux = "sha256-ivboOrV/uORKVHRL3685aopcElGvzsxgVcUmYsBwzXY=";
4747
}
4848
.${stdenv.system} or (throw "unsupported system ${stdenv.system}");
4949

50+
python3 = python312;
51+
5052
in
5153
buildBazelPackage rec {
5254
pname = "envoy";
5355
inherit (srcVer) version;
54-
bazel = bazel_6;
56+
bazel = bazel_7;
5557

5658
src = applyPatches {
5759
src = fetchFromGitHub {
@@ -97,11 +99,11 @@ buildBazelPackage rec {
9799
--replace-fail 'crate_universe_dependencies()' 'crate_universe_dependencies(rust_toolchain_cargo_template="@@//bazel/nix:cargo", rust_toolchain_rustc_template="@@//bazel/nix:rustc")' \
98100
--replace-fail 'crates_repository(' 'crates_repository(rust_toolchain_cargo_template="@@//bazel/nix:cargo", rust_toolchain_rustc_template="@@//bazel/nix:rustc",'
99101
100-
# patch rules_rust for envoy specifics, but also to support old Bazel
101-
# (Bazel 6 doesn't have ctx.watch, but ctx.path is sufficient for our use)
102+
# patch rules_rust for envoy specifics
102103
cp ${./rules_rust.patch} bazel/rules_rust.patch
103104
substituteInPlace bazel/repositories.bzl \
104-
--replace-fail ', "@envoy//bazel:rules_rust_ppc64le.patch"' ""
105+
--replace-fail ', "@envoy//bazel:rules_rust_ppc64le.patch"' "" \
106+
--replace-fail '"@envoy//bazel:emsdk.patch"' ""
105107
106108
substitute ${./rules_rust_extra.patch} bazel/nix/rules_rust_extra.patch \
107109
--subst-var-by bash "$(type -p bash)"
@@ -130,11 +132,23 @@ buildBazelPackage rec {
130132
postPatch = ''
131133
${postPatch}
132134
135+
echo "common --repository_cache=\"$bazelOut/external/repository_cache\"" >> .bazelrc
136+
133137
substituteInPlace bazel/dependency_imports.bzl \
134138
--replace-fail 'crate_universe_dependencies(' 'crate_universe_dependencies(bootstrap=True, ' \
135139
--replace-fail 'crates_repository(' 'crates_repository(generator="@@cargo_bazel_bootstrap//:cargo-bazel", '
136140
'';
137141
preInstall = ''
142+
mkdir $NIX_BUILD_TOP/empty
143+
pushd $NIX_BUILD_TOP/empty
144+
touch MODULE.bazel
145+
# Unfortunately, we need to fetch a lot of irrelevant junk to make this work.
146+
# This really bloats the size of the FOD.
147+
# TODO: lukegb - figure out how to make this suck less.
148+
bazel fetch --repository_cache="$bazelOut/external/repository_cache"
149+
bazel sync --repository_cache="$bazelOut/external/repository_cache"
150+
popd
151+
138152
# Strip out the path to the build location (by deleting the comment line).
139153
find $bazelOut/external -name requirements.bzl | while read requirements; do
140154
sed -i '/# Generated from /d' "$requirements"
@@ -151,7 +165,6 @@ buildBazelPackage rec {
151165
$bazelOut/external/rules_rust/util/process_wrapper/private/process_wrapper.sh \
152166
$bazelOut/external/rules_rust/crate_universe/src/metadata/cargo_tree_rustc_wrapper.sh
153167
154-
rm -r $bazelOut/external/go_sdk
155168
rm -r $bazelOut/external/local_jdk
156169
rm -r $bazelOut/external/bazel_gazelle_go_repository_tools/bin
157170
@@ -175,7 +188,11 @@ buildBazelPackage rec {
175188
dontUseCmakeConfigure = true;
176189
dontUseGnConfigure = true;
177190
dontUseNinjaInstall = true;
191+
bazel = null;
178192
preConfigure = ''
193+
echo "common --repository_cache=\"$bazelOut/external/repository_cache\"" >> .bazelrc
194+
echo "common --repository_disable_download" >> .bazelrc
195+
179196
# Make executables work, for the most part.
180197
find $bazelOut/external -type f -executable | while read execbin; do
181198
file "$execbin" | grep -q ': ELF .*, dynamically linked,' || continue
@@ -211,6 +228,9 @@ buildBazelPackage rec {
211228
removeLocalConfigCc = true;
212229
removeLocal = false;
213230
bazelTargets = [ "//source/exe:envoy-static" ];
231+
bazelFlags = [
232+
"--repo_env=BAZEL_HTTP_RULES_URLS_AS_DEFAULT_CANONICAL_ID=0"
233+
];
214234
bazelBuildFlags = [
215235
"-c opt"
216236
"--spawn_strategy=standalone"

pkgs/by-name/en/envoy/rules_rust.patch

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,10 @@ Subject: [PATCH] rules_rust base
55

66
Signed-off-by: Luke Granger-Brown <git@lukegb.com>
77
---
8-
cargo/private/cargo_bootstrap.bzl | 8 ++++----
9-
crate_universe/extensions.bzl | 10 +++++-----
108
crate_universe/src/lockfile.rs | 4 ++--
119
rust/private/rustc.bzl | 4 ++--
1210
4 files changed, 13 insertions(+), 13 deletions(-)
1311

14-
diff --git cargo/private/cargo_bootstrap.bzl cargo/private/cargo_bootstrap.bzl
15-
index a8021c49d62037ef32c7c64d5bb4a5efe3a8b4aa..f63d7c23ae0bddc9f3fece347a3a2b5b0afe6d8d 100644
16-
--- cargo/private/cargo_bootstrap.bzl
17-
+++ cargo/private/cargo_bootstrap.bzl
18-
@@ -173,13 +173,13 @@ def _detect_changes(repository_ctx):
19-
# 'consumed' which means changes to it will trigger rebuilds
20-
21-
for src in repository_ctx.attr.srcs:
22-
- repository_ctx.watch(src)
23-
+ repository_ctx.path(src)
24-
25-
- repository_ctx.watch(repository_ctx.attr.cargo_lockfile)
26-
- repository_ctx.watch(repository_ctx.attr.cargo_toml)
27-
+ repository_ctx.path(repository_ctx.attr.cargo_lockfile)
28-
+ repository_ctx.path(repository_ctx.attr.cargo_toml)
29-
30-
if repository_ctx.attr.cargo_config:
31-
- repository_ctx.watch(repository_ctx.attr.cargo_config)
32-
+ repository_ctx.path(repository_ctx.attr.cargo_config)
33-
34-
def _cargo_bootstrap_repository_impl(repository_ctx):
35-
# Pretend to Bazel that this rule's input files have been used, so that it will re-run the rule if they change.
36-
diff --git crate_universe/extensions.bzl crate_universe/extensions.bzl
37-
index a749b10c8d469bd316d78034059c94b1fd98dbef..8f8c84dac1ec330d5e8e6abbd930387cb6c9f29e 100644
38-
--- crate_universe/extensions.bzl
39-
+++ crate_universe/extensions.bzl
40-
@@ -957,17 +957,17 @@ def _crate_impl(module_ctx):
41-
fail("Spec specified for repo {}, but the module defined repositories {}".format(repo, local_repos))
42-
43-
for cfg in mod.tags.from_cargo + mod.tags.from_specs:
44-
- # Preload all external repositories. Calling `module_ctx.watch` will cause restarts of the implementation
45-
+ # Preload all external repositories. Calling `module_ctx.path` will cause restarts of the implementation
46-
# function of the module extension when the file has changed.
47-
if cfg.cargo_lockfile:
48-
- module_ctx.watch(cfg.cargo_lockfile)
49-
+ module_ctx.path(cfg.cargo_lockfile)
50-
if cfg.lockfile:
51-
- module_ctx.watch(cfg.lockfile)
52-
+ module_ctx.path(cfg.lockfile)
53-
if cfg.cargo_config:
54-
- module_ctx.watch(cfg.cargo_config)
55-
+ module_ctx.path(cfg.cargo_config)
56-
if hasattr(cfg, "manifests"):
57-
for m in cfg.manifests:
58-
- module_ctx.watch(m)
59-
+ module_ctx.path(m)
60-
61-
cargo_path, rustc_path = _get_host_cargo_rustc(module_ctx, host_triple, cfg.host_tools_repo)
62-
cargo_bazel_fn = new_cargo_bazel_fn(
6312
diff --git crate_universe/src/lockfile.rs crate_universe/src/lockfile.rs
6413
index 3e0ce6265fda6fbdd9e3e989e3e4e4443b615b8c..0fafcea8fbc7a590676d34d2c4ca8c413b953955 100644
6514
--- crate_universe/src/lockfile.rs

0 commit comments

Comments
 (0)