envoy: 1.26.4 -> 1.27.1

+170 -63
+28 -16
pkgs/servers/http/envoy/0001-nixpkgs-use-system-Python.patch
··· 1 - From 1b6ad143c0f5f96c42f603bb93a72f788b88b622 Mon Sep 17 00:00:00 2001 1 + From 4a9739da420b9584d5b9582c19cf3f86a6a90609 Mon Sep 17 00:00:00 2001 2 2 From: Luke Granger-Brown <git@lukegb.com> 3 3 Date: Fri, 12 May 2023 08:12:04 +0100 4 - Subject: [PATCH 1/2] nixpkgs: use system Python 4 + Subject: [PATCH 1/3] nixpkgs: use system Python 5 5 6 6 --- 7 - bazel/python_dependencies.bzl | 4 ---- 8 - bazel/repositories_extra.bzl | 13 +------------ 9 - 2 files changed, 1 insertion(+), 16 deletions(-) 7 + bazel/python_dependencies.bzl | 11 ++++------- 8 + bazel/repositories_extra.bzl | 16 ---------------- 9 + 2 files changed, 4 insertions(+), 23 deletions(-) 10 10 11 11 diff --git a/bazel/python_dependencies.bzl b/bazel/python_dependencies.bzl 12 - index 37c0183664..0bee5feb7e 100644 12 + index ea50bf30ba..b82f374720 100644 13 13 --- a/bazel/python_dependencies.bzl 14 14 +++ b/bazel/python_dependencies.bzl 15 - @@ -1,24 +1,20 @@ 15 + @@ -1,27 +1,24 @@ 16 16 load("@rules_python//python:pip.bzl", "pip_parse") 17 - -load("@python3_10//:defs.bzl", "interpreter") 17 + -load("@python3_11//:defs.bzl", "interpreter") 18 + -load("@envoy_toolshed//:packages.bzl", "load_packages") 18 19 19 20 def envoy_python_dependencies(): 21 + - # TODO(phlax): rename base_pip3 -> pip3 and remove this 22 + - load_packages() 23 + + pip_parse( 24 + + name = "pip3", 25 + + requirements_lock = "@envoy_toolshed//:requirements.txt", 26 + + ) 20 27 pip_parse( 21 28 name = "base_pip3", 22 29 - python_interpreter_target = interpreter, ··· 38 45 extra_pip_args = ["--require-hashes"], 39 46 ) 40 47 diff --git a/bazel/repositories_extra.bzl b/bazel/repositories_extra.bzl 41 - index 9d1b31c5d6..ac5605eb30 100644 48 + index 40d348073f..17b98b1ea1 100644 42 49 --- a/bazel/repositories_extra.bzl 43 50 +++ b/bazel/repositories_extra.bzl 44 - @@ -1,23 +1,12 @@ 51 + @@ -1,29 +1,13 @@ 45 52 load("@emsdk//:deps.bzl", emsdk_deps = "deps") 46 53 -load("@rules_python//python:repositories.bzl", "python_register_toolchains") 47 54 load("@proxy_wasm_cpp_host//bazel/cargo/wasmtime:crates.bzl", "wasmtime_fetch_remote_crates") 48 55 load("//bazel/external/cargo:crates.bzl", "raze_fetch_remote_crates") 49 56 load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") 50 57 58 + -def _python_minor_version(python_version): 59 + - return "_".join(python_version.split(".")[:-1]) 60 + - 51 61 -# Python version for `rules_python` 52 - -PYTHON_VERSION = "3.10.2" 62 + -PYTHON_VERSION = "3.11.3" 63 + -PYTHON_MINOR_VERSION = _python_minor_version(PYTHON_VERSION) 53 64 - 54 65 # Envoy deps that rely on a first stage of dependency loading in envoy_dependencies(). 55 - -def envoy_dependencies_extra(python_version = PYTHON_VERSION): 56 - +def envoy_dependencies_extra(): 66 + def envoy_dependencies_extra( 67 + - python_version = PYTHON_VERSION, 68 + ignore_root_user_error = False): 57 69 emsdk_deps() 58 70 raze_fetch_remote_crates() 59 71 wasmtime_fetch_remote_crates() 60 72 61 73 - # Registers underscored Python minor version - eg `python3_10` 62 74 - python_register_toolchains( 63 - - name = "python%s" % ("_".join(python_version.split(".")[:-1])), 75 + - name = "python%s" % _python_minor_version(python_version), 64 76 - python_version = python_version, 65 - - ignore_root_user_error = True, 77 + - ignore_root_user_error = ignore_root_user_error, 66 78 - ) 67 79 - 68 80 aspect_bazel_lib_dependencies() 69 81 -- 70 - 2.40.0 82 + 2.42.0 71 83
+12 -12
pkgs/servers/http/envoy/0002-nixpkgs-use-system-Go.patch
··· 1 - From 30e059d652bd4e352e2c1dc3c44d03a1e42ff912 Mon Sep 17 00:00:00 2001 1 + From 10e577a3c300f76ead5a5512f2fe970f12e46592 Mon Sep 17 00:00:00 2001 2 2 From: Luke Granger-Brown <git@lukegb.com> 3 3 Date: Fri, 12 May 2023 08:13:21 +0100 4 - Subject: [PATCH 2/2] nixpkgs: use system Go 4 + Subject: [PATCH 2/3] nixpkgs: use system Go 5 5 6 6 --- 7 7 bazel/dependency_imports.bzl | 29 +---------------------------- ··· 9 9 2 files changed, 1 insertion(+), 31 deletions(-) 10 10 11 11 diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl 12 - index 681617f1b8..a10c560baf 100644 12 + index b743a1936d..afa04ef5c0 100644 13 13 --- a/bazel/dependency_imports.bzl 14 14 +++ b/bazel/dependency_imports.bzl 15 - @@ -17,7 +17,7 @@ load("@aspect_bazel_lib//lib:repositories.bzl", "register_jq_toolchains", "regis 16 - load("@com_google_cel_cpp//bazel:deps.bzl", "parser_deps") 15 + @@ -18,7 +18,7 @@ load("@com_google_cel_cpp//bazel:deps.bzl", "parser_deps") 16 + load("@com_github_chrusty_protoc_gen_jsonschema//:deps.bzl", protoc_gen_jsonschema_go_dependencies = "go_dependencies") 17 17 18 18 # go version for rules_go 19 19 -GO_VERSION = "1.18" ··· 22 22 JQ_VERSION = "1.6" 23 23 YQ_VERSION = "4.24.4" 24 24 @@ -27,7 +27,6 @@ def envoy_dependency_imports(go_version = GO_VERSION, jq_version = JQ_VERSION, y 25 - rules_foreign_cc_dependencies(register_default_tools = False, register_built_tools = False) 25 + rules_foreign_cc_dependencies() 26 26 go_rules_dependencies() 27 27 go_register_toolchains(go_version) 28 28 - envoy_download_go_sdks(go_version) 29 29 gazelle_dependencies(go_sdk = "go_sdk") 30 30 apple_rules_dependencies() 31 31 pip_dependencies() 32 - @@ -146,29 +145,3 @@ def envoy_dependency_imports(go_version = GO_VERSION, jq_version = JQ_VERSION, y 33 - # use_category = ["api"], 34 - # source = "https://github.com/bufbuild/protoc-gen-validate/blob/v0.6.1/dependencies.bzl#L23-L28" 32 + @@ -148,29 +147,3 @@ def envoy_dependency_imports(go_version = GO_VERSION, jq_version = JQ_VERSION, y 35 33 ) 34 + 35 + protoc_gen_jsonschema_go_dependencies() 36 36 - 37 37 -def envoy_download_go_sdks(go_version): 38 38 - go_download_sdk( ··· 60 60 - version = go_version, 61 61 - ) 62 62 diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl 63 - index 6d2cf2014c..a8375bcdef 100644 63 + index 71667227f7..b10a47d344 100644 64 64 --- a/bazel/repositories.bzl 65 65 +++ b/bazel/repositories.bzl 66 - @@ -196,9 +196,6 @@ def _go_deps(skip_targets): 66 + @@ -215,9 +215,6 @@ def _go_deps(skip_targets): 67 67 if "io_bazel_rules_go" not in skip_targets: 68 68 external_http_archive( 69 69 name = "io_bazel_rules_go", ··· 74 74 external_http_archive("bazel_gazelle") 75 75 76 76 -- 77 - 2.40.0 77 + 2.42.0 78 78
+29
pkgs/servers/http/envoy/0003-nixpkgs-use-system-C-C-toolchains.patch
··· 1 + From 6175deb13a2df8bd25a56021ba8754e4be445219 Mon Sep 17 00:00:00 2001 2 + From: Luke Granger-Brown <git@lukegb.com> 3 + Date: Fri, 13 Oct 2023 21:42:51 +0000 4 + Subject: [PATCH 3/3] nixpkgs: use system C/C++ toolchains 5 + 6 + --- 7 + bazel/dependency_imports.bzl | 6 +++++- 8 + 1 file changed, 5 insertions(+), 1 deletion(-) 9 + 10 + diff --git a/bazel/dependency_imports.bzl b/bazel/dependency_imports.bzl 11 + index afa04ef5c0..a5ffaf4ff3 100644 12 + --- a/bazel/dependency_imports.bzl 13 + +++ b/bazel/dependency_imports.bzl 14 + @@ -24,7 +24,11 @@ JQ_VERSION = "1.6" 15 + YQ_VERSION = "4.24.4" 16 + 17 + def envoy_dependency_imports(go_version = GO_VERSION, jq_version = JQ_VERSION, yq_version = YQ_VERSION): 18 + - rules_foreign_cc_dependencies() 19 + + rules_foreign_cc_dependencies( 20 + + register_default_tools=False, # no prebuilt toolchains 21 + + register_built_tools=False, # nor from source 22 + + register_preinstalled_tools=True, # use host tools (default) 23 + + ) 24 + go_rules_dependencies() 25 + go_register_toolchains(go_version) 26 + gazelle_dependencies(go_sdk = "go_sdk") 27 + -- 28 + 2.42.0 29 +
+8 -5
pkgs/servers/http/envoy/default.nix
··· 24 24 # However, the version string is more useful for end-users. 25 25 # These are contained in a attrset of their own to make it obvious that 26 26 # people should update both. 27 - version = "1.26.4"; 28 - rev = "cfa32deca25ac57c2bbecdad72807a9b13493fc1"; 27 + version = "1.27.1"; 28 + rev = "6b9db09c69965d5bfb37bdd29693f8b7f9e9e9ec"; 29 29 }; 30 30 in 31 31 buildBazelPackage rec { ··· 36 36 owner = "envoyproxy"; 37 37 repo = "envoy"; 38 38 inherit (srcVer) rev; 39 - hash = "sha256-j5QyqT+9tpChg5JxdSw21rtb9AI036vIiAmzCNzGWGc="; 39 + hash = "sha256-eZ3UCVqQbtK2GbawUVef5+BMSQbqe+owtwH+b887mQE="; 40 40 41 41 postFetch = '' 42 42 chmod -R +w $out ··· 59 59 60 60 # use system Go, not bazel-fetched binary Go 61 61 ./0002-nixpkgs-use-system-Go.patch 62 + 63 + # use system C/C++ tools 64 + ./0003-nixpkgs-use-system-C-C-toolchains.patch 62 65 ]; 63 66 64 67 nativeBuildInputs = [ ··· 80 83 81 84 fetchAttrs = { 82 85 sha256 = { 83 - x86_64-linux = "sha256-MvY4cLdLOeb7+Zt7Oz7Kzz1+dsUceemP/V02egvHg+M="; 84 - aarch64-linux = "sha256-U5mnAq8RHDygxiYeNc0HDeOgoaGyrd0MPjHKdyUkM0A="; 86 + x86_64-linux = "sha256-bBi+3sAwtj5qu1npFpNMK2C99Q0ZI3zaSmMsTcreD8Y="; 87 + aarch64-linux = "sha256-piIekotpxB02COglAon9w7a+1jXlHX29/VkrgKFsQ3c="; 85 88 }.${stdenv.system} or (throw "unsupported system ${stdenv.system}"); 86 89 dontUseCmakeConfigure = true; 87 90 dontUseGnConfigure = true;
+93 -30
pkgs/servers/http/envoy/protobuf.patch
··· 1 1 diff --git a/BUILD.bazel b/BUILD.bazel 2 - index 0f6e41e3a..c0d2bbccf 100644 2 + index 637882c49..2cb08f1b0 100644 3 3 --- a/BUILD.bazel 4 4 +++ b/BUILD.bazel 5 - @@ -138,7 +138,7 @@ cc_library( 5 + @@ -165,6 +165,8 @@ alias( 6 6 visibility = ["//visibility:public"], 7 - deps = [":protobuf_lite"] + select({ 8 - "//build_defs:config_msvc": [], 9 - - "//conditions:default": ["@zlib//:zlib"], 10 - + "//conditions:default": ["//external:zlib"], 11 - }), 12 7 ) 13 8 14 - @@ -755,7 +820,7 @@ cc_test( 15 - "@com_google_googletest//:gtest_main", 16 - ] + select({ 17 - "//build_defs:config_msvc": [], 18 - - "//conditions:default": ["@zlib//:zlib"], 19 - + "//conditions:default": ["//external:zlib"], 20 - }), 9 + +# Envoy: Patch 10 + + 11 + cc_binary( 12 + name = "protoc", 13 + copts = COPTS, 14 + @@ -173,6 +175,14 @@ cc_binary( 15 + deps = ["//src/google/protobuf/compiler:protoc_lib"], 21 16 ) 22 17 18 + +alias( 19 + + name = "protobuf_python_genproto", 20 + + actual = "//python:well_known_types_py_pb2_genproto", 21 + + visibility = ["//visibility:public"], 22 + +) 23 + + 24 + +# /Envoy: Patch 25 + + 26 + cc_binary( 27 + name = "protoc_static", 28 + copts = COPTS, 23 29 diff --git a/python/google/protobuf/__init__.py b/python/google/protobuf/__init__.py 24 - index e7555ee10..a93beb1c5 100644 30 + index 88de4cf8a..b3e046997 100755 25 31 --- a/python/google/protobuf/__init__.py 26 32 +++ b/python/google/protobuf/__init__.py 27 33 @@ -31,3 +31,10 @@ 28 34 # Copyright 2007 Google Inc. All Rights Reserved. 29 35 30 - __version__ = '4.21.12' 36 + __version__ = '4.23.1' 31 37 + 32 38 + 33 39 +if __name__ != '__main__': ··· 35 41 + __import__('pkg_resources').declare_namespace(__name__) 36 42 + except ImportError: 37 43 + __path__ = __import__('pkgutil').extend_path(__path__, __name__) 38 - diff --git a/src/google/protobuf/generated_message_tctable_lite.cc b/src/google/protobuf/generated_message_tctable_lite.cc 39 - index 9993811dc..d80006af7 100644 40 - --- a/src/google/protobuf/generated_message_tctable_lite.cc 41 - +++ b/src/google/protobuf/generated_message_tctable_lite.cc 42 - @@ -343,11 +343,6 @@ const char* TcParser::MiniParse(PROTOBUF_TC_PARAM_DECL) { 44 + diff --git a/src/google/protobuf/compiler/BUILD.bazel b/src/google/protobuf/compiler/BUILD.bazel 45 + index a2171c806..8aec6187f 100644 46 + --- a/src/google/protobuf/compiler/BUILD.bazel 47 + +++ b/src/google/protobuf/compiler/BUILD.bazel 48 + @@ -306,7 +306,7 @@ cc_library( 49 + srcs = ["retention.cc"], 50 + hdrs = ["retention.h"], 51 + include_prefix = "google/protobuf/compiler", 52 + - visibility = ["//src/google/protobuf:__subpackages__"], 53 + + visibility = ["//visibility:public"], 54 + deps = [ 55 + "//src/google/protobuf:protobuf_nowkt", 56 + "@com_google_absl//absl/types:span", 57 + diff --git a/src/google/protobuf/io/BUILD.bazel b/src/google/protobuf/io/BUILD.bazel 58 + index 8f39625c2..2c2c73dcd 100644 59 + --- a/src/google/protobuf/io/BUILD.bazel 60 + +++ b/src/google/protobuf/io/BUILD.bazel 61 + @@ -142,7 +142,7 @@ cc_library( 62 + "@com_google_absl//absl/log:absl_log", 63 + ] + select({ 64 + "//build_defs:config_msvc": [], 65 + - "//conditions:default": ["@zlib//:zlib"], 66 + + "//conditions:default": ["//external:zlib"], 67 + }), 68 + ) 69 + 70 + diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h 71 + index 869ebf100..fec92e2b1 100644 72 + --- a/src/google/protobuf/map.h 73 + +++ b/src/google/protobuf/map.h 74 + @@ -883,7 +883,7 @@ class KeyMapBase : public UntypedMapBase { 75 + TreeConvert(b); 76 + } 77 + ABSL_DCHECK(TableEntryIsTree(b)) 78 + - << (void*)table_[b] << " " << (uintptr_t)table_[b]; 79 + + << reinterpret_cast<void*>(table_[b]) << " " << static_cast<uintptr_t>(table_[b]); 80 + InsertUniqueInTree(b, node); 81 + index_of_first_non_null_ = (std::min)(index_of_first_non_null_, b); 82 + } 83 + diff --git a/src/google/protobuf/map_field.h b/src/google/protobuf/map_field.h 84 + index 70b12b1e7..b8f46db45 100644 85 + --- a/src/google/protobuf/map_field.h 86 + +++ b/src/google/protobuf/map_field.h 87 + @@ -345,7 +345,7 @@ class PROTOBUF_EXPORT MapFieldBase : public MapFieldBaseForParse { 88 + 89 + protected: 90 + // "protected" stops users from deleting a `MapFieldBase *` 91 + - ~MapFieldBase(); 92 + + virtual ~MapFieldBase(); 43 93 44 - namespace { 94 + public: 95 + // Returns reference to internal repeated field. Data written using 96 + diff --git a/src/google/protobuf/port_def.inc b/src/google/protobuf/port_def.inc 97 + index 1c6a24945..6186c2ad1 100644 98 + --- a/src/google/protobuf/port_def.inc 99 + +++ b/src/google/protobuf/port_def.inc 100 + @@ -1004,7 +1004,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), 101 + #pragma clang diagnostic ignored "-Wshorten-64-to-32" 102 + // Turn on -Wdeprecated-enum-enum-conversion. This deprecation comes in C++20 103 + // via http://wg21.link/p1120r0. 104 + -#pragma clang diagnostic error "-Wdeprecated-enum-enum-conversion" 105 + +// #pragma clang diagnostic error "-Wdeprecated-enum-enum-conversion" 106 + // This error has been generally flaky, but we need to disable it specifically 107 + // to fix https://github.com/protocolbuffers/protobuf/issues/12313 108 + #pragma clang diagnostic ignored "-Wunused-parameter" 109 + @@ -1062,6 +1062,7 @@ static_assert(PROTOBUF_ABSL_MIN(20230125, 3), 110 + #pragma warning(disable: 4125) 111 + #endif 45 112 46 - -// Offset returns the address `offset` bytes after `base`. 47 - -inline void* Offset(void* base, uint32_t offset) { 48 - - return static_cast<uint8_t*>(base) + offset; 49 - -} 50 - - 51 - // InvertPacked changes tag bits from the given wire type to length 52 - // delimited. This is the difference expected between packed and non-packed 53 - // repeated fields. 113 + +#pragma GCC diagnostic ignored "-Wundef" 114 + #if PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII 115 + #define PROTOBUF_DEBUG true 116 + #else