diff --git a/MODULE.bazel b/MODULE.bazel index 3bf965d78737c..f8e588fb7febe 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -20,11 +20,13 @@ use_repo( bazel_dep(name = "gazelle", version = "0.45.0") bazel_dep(name = "abseil-cpp", version = "20250814.0") bazel_dep(name = "bazel_skylib", version = "1.8.1") +bazel_dep(name = "c-ares", version = "1.34.5.bcr.3") bazel_dep(name = "crc32c", version = "1.1.0") bazel_dep(name = "fmt", version = "9.1.0") bazel_dep(name = "googletest", version = "1.17.0") bazel_dep(name = "lexy", version = "2025.05.0") bazel_dep(name = "liburing", version = "2.5") +bazel_dep(name = "libxml2", version = "2.15.1") bazel_dep(name = "lz4", version = "1.9.4") bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "protobuf", version = "31.1") @@ -82,14 +84,12 @@ non_module_dependencies = use_extension("//bazel:extensions.bzl", "non_module_de use_repo(non_module_dependencies, "ada") use_repo(non_module_dependencies, "avro") use_repo(non_module_dependencies, "base64") -use_repo(non_module_dependencies, "c-ares") use_repo(non_module_dependencies, "hdrhistogram") use_repo(non_module_dependencies, "hwloc") use_repo(non_module_dependencies, "jsoncons") use_repo(non_module_dependencies, "krb5") use_repo(non_module_dependencies, "libpciaccess") use_repo(non_module_dependencies, "libprotobuf_mutator") -use_repo(non_module_dependencies, "libxml2") use_repo(non_module_dependencies, "lksctp") use_repo(non_module_dependencies, "openssl") use_repo(non_module_dependencies, "openssl-fips") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 2c9e570707d7d..d90e4f09089d6 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -58,6 +58,8 @@ "https://bcr.bazel.build/modules/bzip2/1.0.8.bcr.2/MODULE.bazel": "43b570f55b7479bfa7c6675b227ccc3155d56377bb7782f178b2d1733196a435", "https://bcr.bazel.build/modules/bzip2/1.0.8.bcr.2/source.json": "9789bb6c0444ae84fb7f559c9da0fbb46d39219539f8d99c13b8db55357e8cf9", "https://bcr.bazel.build/modules/bzip2/1.0.8/MODULE.bazel": "83ee443b286b0b91566e5ee77e74ba6445895f3135467893871560f9e4ebc159", + "https://bcr.bazel.build/modules/c-ares/1.34.5.bcr.3/MODULE.bazel": "4b0725c2ff6a72a2b8b62bd2d87b40378d0c8cc56fc72c328b8b72e7f4e5811e", + "https://bcr.bazel.build/modules/c-ares/1.34.5.bcr.3/source.json": "5d61d051f2f8ad413f71f7714bb6189dc19e67197e1f66a3e1f5c05e89ebde86", "https://bcr.bazel.build/modules/crc32c/1.1.0/MODULE.bazel": "f11439d063a2b4e0f19b56bb8da6a931f9691bf583bd1ec0718645bce6c62b06", "https://bcr.bazel.build/modules/crc32c/1.1.0/source.json": "aabc6ce46d4b71343d500270c2ddfd45f59cff9fd171313bdd773bf620cf2a6f", "https://bcr.bazel.build/modules/doctest/2.4.12/MODULE.bazel": "0d9d294db1af4579e9ec46aae15d6cdf8cba885de668457739b89efd679ce05b", @@ -89,6 +91,8 @@ "https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902", "https://bcr.bazel.build/modules/liburing/2.5/MODULE.bazel": "51768194b0b344123b2d7237b65928c9c119e7fc18a3f86f4870e83c0b71c00a", "https://bcr.bazel.build/modules/liburing/2.5/source.json": "1ff3e7c04563757f99cc7d33c2d4cb4900c45d6aca2cf54d58a1b199e66460ec", + "https://bcr.bazel.build/modules/libxml2/2.15.1/MODULE.bazel": "fe37d5f2d6dbb30b10435719fb958d20f1343c1435759f334c82929580666266", + "https://bcr.bazel.build/modules/libxml2/2.15.1/source.json": "d43f442e9d51d1984adf8734376204f28cc5bf83c20623fd2294b5116c47bb7a", "https://bcr.bazel.build/modules/lz4/1.9.4/MODULE.bazel": "e3d307b1d354d70f6c809167eafecf5d622c3f27e3971ab7273410f429c7f83a", "https://bcr.bazel.build/modules/lz4/1.9.4/source.json": "233f0bdfc21f254e3dda14683ddc487ca68c6a3a83b7d5db904c503f85bd089b", "https://bcr.bazel.build/modules/nlohmann_json/3.6.1/MODULE.bazel": "6f7b417dcc794d9add9e556673ad25cb3ba835224290f4f848f8e2db1e1fca74", @@ -145,7 +149,9 @@ "https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel": "2f0222a6f229f0bf44cd711dc13c858dad98c62d52bd51d8fc3a764a83125513", "https://bcr.bazel.build/modules/rules_cc/0.1.2/MODULE.bazel": "557ddc3a96858ec0d465a87c0a931054d7dcfd6583af2c7ed3baf494407fd8d0", "https://bcr.bazel.build/modules/rules_cc/0.2.0/MODULE.bazel": "b5c17f90458caae90d2ccd114c81970062946f49f355610ed89bebf954f5783c", - "https://bcr.bazel.build/modules/rules_cc/0.2.0/source.json": "5f7f4e578e950adbf194217d4b607237a8197fc53ba46c367b3d61a86ecf35c2", + "https://bcr.bazel.build/modules/rules_cc/0.2.14/MODULE.bazel": "353c99ed148887ee89c54a17d4100ae7e7e436593d104b668476019023b58df8", + "https://bcr.bazel.build/modules/rules_cc/0.2.14/source.json": "55d0a4587c5592fad350f6e698530f4faf0e7dd15e69d43f8d87e220c78bea54", + "https://bcr.bazel.build/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc", "https://bcr.bazel.build/modules/rules_foreign_cc/0.12.0/MODULE.bazel": "d850fab025ce79a845077035861034393f1cc1efc1d9d58d766272a26ba67def", "https://bcr.bazel.build/modules/rules_foreign_cc/0.12.0/source.json": "c97ddc022179fe30d1a9b94425d1e56d0a633f72332c55463e584a52ce1b38ac", "https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6", @@ -250,7 +256,7 @@ "moduleExtensions": { "//bazel:extensions.bzl%non_module_dependencies": { "general": { - "bzlTransitiveDigest": "yo0kHEo8fD7vBQzEBJoX16oBQVqC4gyLtrIHq0QNAxk=", + "bzlTransitiveDigest": "nIu0AjXk+fr4mUI2xekZwH0foKETnb3chcCyrIv7Wsc=", "usagesDigest": "FEiDyZe9eAU6yEqnarZf0XMEUk+prUyYClvq1RU1J98=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -288,15 +294,6 @@ "url": "https://vectorized-public.s3.amazonaws.com/dependencies/base64-v0.5.0.tar.gz" } }, - "c-ares": { - "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", - "attributes": { - "build_file": "@@//bazel/thirdparty:c-ares.BUILD", - "sha256": "7d935790e9af081c25c495fd13c2cfcda4792983418e96358ef6e7320ee06346", - "strip_prefix": "c-ares-1.34.5", - "url": "https://vectorized-public.s3.amazonaws.com/dependencies/c-ares-1.34.5.tar.gz" - } - }, "hdrhistogram": { "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", "attributes": { @@ -363,15 +360,6 @@ "url": "https://github.com/google/libprotobuf-mutator/archive/dc4ced337a9fb4047e2dc727268fbac55ca82f73.zip" } }, - "libxml2": { - "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", - "attributes": { - "build_file": "@@//bazel/thirdparty:libxml2.BUILD", - "sha256": "f52638e4d67135c49f676d1c8fcc4f9f35afb7ec9bfb4aee743e2e86d56e006b", - "strip_prefix": "libxml2-2.14.5", - "url": "https://vectorized-public.s3.us-west-2.amazonaws.com/dependencies/libxml2-v2.14.5.tar.gz" - } - }, "lksctp": { "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", "attributes": { @@ -485,7 +473,7 @@ }, "@@apple_support+//crosstool:setup.bzl%apple_cc_configure_extension": { "general": { - "bzlTransitiveDigest": "xcBTf2+GaloFpg7YEh/Bv+1yAczRkiCt3DGws4K7kSk=", + "bzlTransitiveDigest": "m3fZqd+xd3/Pi9m1Qh9HuzJhy5jFhctBLfI3CVXOidQ=", "usagesDigest": "39X2JjPCOAk6sThDALGv1L4q85GNjda2yfszm/phxxw=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -2013,7 +2001,7 @@ }, "@@rules_rust+//crate_universe:extension.bzl%crate": { "general": { - "bzlTransitiveDigest": "Afl/SzDNdAWElg1zkxRa2SVscsBanpQ9bVOwhHlmS9s=", + "bzlTransitiveDigest": "h0WV667OicnnCZ19MzlTPmHes6l0jUpiYIJEU/hSd1I=", "usagesDigest": "ik68B3Un/74y+E605ZBhV6WSyOt4Sb/m8ZgtWkGvm6Q=", "recordedFileInputs": { "@@//bazel/thirdparty/Cargo.lock": "ccf410ef5c36e9543e1aacb4c1a6bee1d0e93c21a7b2e23adb16ef0e81140b23", @@ -4032,6 +4020,16 @@ ], [ "rules_cc+", + "cc_compatibility_proxy", + "rules_cc++compatibility_proxy+cc_compatibility_proxy" + ], + [ + "rules_cc+", + "rules_cc", + "rules_cc+" + ], + [ + "rules_cc++compatibility_proxy+cc_compatibility_proxy", "rules_cc", "rules_cc+" ], diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 73cacc746fb27..01a797cfeb27d 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -37,14 +37,6 @@ def data_dependency(): url = "https://vectorized-public.s3.amazonaws.com/dependencies/base64-v0.5.0.tar.gz", ) - http_archive( - name = "c-ares", - build_file = "//bazel/thirdparty:c-ares.BUILD", - sha256 = "7d935790e9af081c25c495fd13c2cfcda4792983418e96358ef6e7320ee06346", - strip_prefix = "c-ares-1.34.5", - url = "https://vectorized-public.s3.amazonaws.com/dependencies/c-ares-1.34.5.tar.gz", - ) - http_archive( name = "hdrhistogram", build_file = "//bazel/thirdparty:hdrhistogram.BUILD", @@ -97,14 +89,6 @@ def data_dependency(): url = "https://github.com/google/libprotobuf-mutator/archive/dc4ced337a9fb4047e2dc727268fbac55ca82f73.zip", ) - http_archive( - name = "libxml2", - build_file = "//bazel/thirdparty:libxml2.BUILD", - sha256 = "f52638e4d67135c49f676d1c8fcc4f9f35afb7ec9bfb4aee743e2e86d56e006b", - strip_prefix = "libxml2-2.14.5", - url = "https://vectorized-public.s3.us-west-2.amazonaws.com/dependencies/libxml2-v2.14.5.tar.gz", - ) - http_archive( name = "lksctp", build_file = "//bazel/thirdparty:lksctp.BUILD", diff --git a/bazel/thirdparty/c-ares.BUILD b/bazel/thirdparty/c-ares.BUILD deleted file mode 100644 index a9ca2615eb09f..0000000000000 --- a/bazel/thirdparty/c-ares.BUILD +++ /dev/null @@ -1,24 +0,0 @@ -load("@rules_foreign_cc//foreign_cc:defs.bzl", "cmake") - -filegroup( - name = "srcs", - srcs = glob(["**"]), -) - -cmake( - name = "c-ares", - cache_entries = { - "BUILD_SHARED_LIBS": "OFF", - "CARES_SHARED": "OFF", - "CARES_STATIC": "ON", - "CMAKE_INSTALL_LIBDIR": "lib", - "CARES_BUILD_TOOLS": "OFF", - "CARES_INSTALL": "ON", - }, - generate_args = ["-GNinja"], - lib_source = ":srcs", - out_static_libs = ["libcares.a"], - visibility = [ - "//visibility:public", - ], -) diff --git a/bazel/thirdparty/libxml2.BUILD b/bazel/thirdparty/libxml2.BUILD deleted file mode 100644 index 04a1a6aacb0b6..0000000000000 --- a/bazel/thirdparty/libxml2.BUILD +++ /dev/null @@ -1,30 +0,0 @@ -load("@rules_foreign_cc//foreign_cc:defs.bzl", "configure_make") - -filegroup( - name = "srcs", - srcs = glob(["**"]), -) - -configure_make( - name = "libxml2", - autogen = True, - autoreconf = True, - autoreconf_options = ["-ivf"], - configure_in_place = True, - configure_options = [ - "--without-python", - "--disable-shared", - "--enable-static", - "--with-zlib=$$EXT_BUILD_DEPS/zlib", - "--without-lzma", - ], - lib_source = ":srcs", - out_include_dir = "include/libxml2", - out_static_libs = ["libxml2.a"], - visibility = [ - "//visibility:public", - ], - deps = [ - "@zlib", - ], -) diff --git a/bazel/thirdparty/seastar.BUILD b/bazel/thirdparty/seastar.BUILD index f17f880e360e2..0b568ed2dae9f 100644 --- a/bazel/thirdparty/seastar.BUILD +++ b/bazel/thirdparty/seastar.BUILD @@ -644,7 +644,7 @@ cc_library( "@boost//:lockfree", "@boost//:program_options", "@boost//:thread", - "@c-ares", + "@c-ares//:ares", "@fmt", "@lksctp", "@lz4", diff --git a/src/v/cloud_storage_clients/BUILD b/src/v/cloud_storage_clients/BUILD index b9906bc0dc6a1..041db9b6ac78e 100644 --- a/src/v/cloud_storage_clients/BUILD +++ b/src/v/cloud_storage_clients/BUILD @@ -56,7 +56,6 @@ redpanda_cc_library( "//src/v/ssx:sformat", "//src/v/ssx:watchdog", "//src/v/strings:string_switch", - "//src/v/thirdparty/libxml2", "//src/v/utils:base64", "//src/v/utils:log_hist", "//src/v/utils:named_type", @@ -65,6 +64,7 @@ redpanda_cc_library( "@boost//:beast", "@boost//:lexical_cast", "@boost//:property_tree", + "@libxml2", "@seastar", ], ) diff --git a/src/v/cloud_storage_clients/xml_sax_parser.h b/src/v/cloud_storage_clients/xml_sax_parser.h index 89c42888b194d..027341f157515 100644 --- a/src/v/cloud_storage_clients/xml_sax_parser.h +++ b/src/v/cloud_storage_clients/xml_sax_parser.h @@ -12,10 +12,11 @@ #pragma once #include "cloud_storage_clients/client.h" -#include "thirdparty/libxml2/parser.h" #include +#include + namespace cloud_storage_clients { class xml_parse_exception : public std::exception { diff --git a/src/v/kafka/client/BUILD b/src/v/kafka/client/BUILD index 4d6f295742ef4..b07c046624a22 100644 --- a/src/v/kafka/client/BUILD +++ b/src/v/kafka/client/BUILD @@ -208,7 +208,6 @@ redpanda_cc_library( "//src/v/random:generators", "//src/v/security", "//src/v/ssx:future_util", - "//src/v/thirdparty/c-ares", "//src/v/utils:backoff_policy", "//src/v/utils:mutex", "//src/v/utils:prefix_logger", @@ -216,6 +215,7 @@ redpanda_cc_library( "//src/v/version", "@abseil-cpp//absl/container:flat_hash_map", "@abseil-cpp//absl/container:flat_hash_set", + "@c-ares//:ares", "@fmt", "@seastar", ], @@ -359,7 +359,6 @@ redpanda_cc_library( "//src/v/ssx:semaphore", "//src/v/storage:record_batch_builder", "//src/v/strings:string_switch", - "//src/v/thirdparty/c-ares", "//src/v/utils:mutex", "//src/v/utils:prefix_logger", "//src/v/utils:retry", @@ -369,6 +368,7 @@ redpanda_cc_library( "@abseil-cpp//absl/container:flat_hash_set", "@abseil-cpp//absl/container:node_hash_map", "@abseil-cpp//absl/hash", + "@c-ares//:ares", "@fmt", "@seastar", ], diff --git a/src/v/kafka/client/broker.cc b/src/v/kafka/client/broker.cc index 7e63c1e044f07..e8b5f27a7d3f2 100644 --- a/src/v/kafka/client/broker.cc +++ b/src/v/kafka/client/broker.cc @@ -17,7 +17,6 @@ #include "security/oidc_authenticator.h" #include "security/plain_authenticator.h" #include "security/scram_authenticator.h" -#include "thirdparty/c-ares/ares.h" #include "utils/backoff_policy.h" #include "utils/unresolved_address.h" #include "version/version.h" @@ -26,6 +25,8 @@ #include #include #include + +#include using namespace std::chrono_literals; namespace { bool is_dns_failure_error(const std::system_error& e) { diff --git a/src/v/test_utils/BUILD b/src/v/test_utils/BUILD index ba441fd73c15c..c6f30a19956f8 100644 --- a/src/v/test_utils/BUILD +++ b/src/v/test_utils/BUILD @@ -57,13 +57,13 @@ redpanda_test_cc_library( "boost_result_redirect.cc", ], implementation_deps = [ - "//src/v/thirdparty/libxml2", "@abseil-cpp//absl/strings", "@abseil-cpp//absl/strings:str_format", "@abseil-cpp//absl/time", "@boost//:config", "@boost//:core", "@boost//:test", + "@libxml2", ], visibility = ["//visibility:public"], ) diff --git a/src/v/test_utils/boost_result_redirect.cc b/src/v/test_utils/boost_result_redirect.cc index a76d5592374c8..3caea5ecf12a4 100644 --- a/src/v/test_utils/boost_result_redirect.cc +++ b/src/v/test_utils/boost_result_redirect.cc @@ -10,12 +10,12 @@ #include "absl/strings/str_format.h" #include "absl/strings/str_replace.h" #include "absl/time/time.h" -#include "thirdparty/libxml2/xmlwriter.h" #include #include #include #include +#include #include diff --git a/src/v/thirdparty/c-ares/BUILD b/src/v/thirdparty/c-ares/BUILD deleted file mode 100644 index ad4de2b658080..0000000000000 --- a/src/v/thirdparty/c-ares/BUILD +++ /dev/null @@ -1,13 +0,0 @@ -load("@rules_cc//cc:cc_library.bzl", "cc_library") - -cc_library( - name = "c-ares", - hdrs = [ - "ares.h", - ], - include_prefix = "thirdparty/c-ares", - visibility = ["//visibility:public"], - deps = [ - "@c-ares", - ], -) diff --git a/src/v/thirdparty/c-ares/ares.h b/src/v/thirdparty/c-ares/ares.h deleted file mode 100644 index 625a7785837d9..0000000000000 --- a/src/v/thirdparty/c-ares/ares.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include diff --git a/src/v/thirdparty/libxml2/BUILD b/src/v/thirdparty/libxml2/BUILD deleted file mode 100644 index 577652bdef941..0000000000000 --- a/src/v/thirdparty/libxml2/BUILD +++ /dev/null @@ -1,14 +0,0 @@ -load("@rules_cc//cc:cc_library.bzl", "cc_library") - -cc_library( - name = "libxml2", - hdrs = [ - "parser.h", - "xmlwriter.h", - ], - include_prefix = "thirdparty/libxml2", - visibility = ["//visibility:public"], - deps = [ - "@libxml2", - ], -) diff --git a/src/v/thirdparty/libxml2/parser.h b/src/v/thirdparty/libxml2/parser.h deleted file mode 100644 index 4b2878afc386b..0000000000000 --- a/src/v/thirdparty/libxml2/parser.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include diff --git a/src/v/thirdparty/libxml2/xmlwriter.h b/src/v/thirdparty/libxml2/xmlwriter.h deleted file mode 100644 index ba661e3883ee2..0000000000000 --- a/src/v/thirdparty/libxml2/xmlwriter.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include diff --git a/tests/rptest/tests/cluster_features_test.py b/tests/rptest/tests/cluster_features_test.py index 52235a75b1f2b..1ac007deb26e8 100644 --- a/tests/rptest/tests/cluster_features_test.py +++ b/tests/rptest/tests/cluster_features_test.py @@ -475,7 +475,7 @@ def test_old_node_join(self): pass else: raise RuntimeError( - f"Node {old_node} joined cluster, but should have been rejected" + f"Node {old_node.name} joined cluster, but should have been rejected" ) # Restart it with a sufficiently recent version and join should succeed