diff --git a/MODULE.bazel b/MODULE.bazel index 7b9106086414d..33ddff144073b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -33,6 +33,7 @@ single_version_override( ], ) +bazel_dep(name = "libxml2", version = "2.15.2") bazel_dep(name = "lz4", version = "1.9.4") bazel_dep(name = "platforms", version = "1.0.0") bazel_dep(name = "protobuf", version = "33.5") @@ -99,7 +100,6 @@ 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 06132df3333f6..510aa129704b7 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -107,6 +107,8 @@ "https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902", "https://bcr.bazel.build/modules/liburing/2.14/MODULE.bazel": "83a452082f02c8fc4a19a8b379356d8a990fe4b2a2cd33beb6478a1a6611c1bc", "https://bcr.bazel.build/modules/liburing/2.14/source.json": "8af2769c7cd50cc015eb1a20ed85c721f5b5422d67d7d8dd281099bfccea28aa", + "https://bcr.bazel.build/modules/libxml2/2.15.2/MODULE.bazel": "21d1714e5b8416649cab195083b411c897a1052fcb88da9926ef933c2e846ced", + "https://bcr.bazel.build/modules/libxml2/2.15.2/source.json": "17c76aa0d1c8bb6e674c5f50621a97d4368e1dd31c5d973a7bd4935cd8e8e076", "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.11.3/MODULE.bazel": "87023db2f55fc3a9949c7b08dc711fae4d4be339a80a99d04453c4bb3998eefc", @@ -182,6 +184,7 @@ "https://bcr.bazel.build/modules/rules_cc/0.2.13/MODULE.bazel": "eecdd666eda6be16a8d9dc15e44b5c75133405e820f620a234acc4b1fdc5aa37", "https://bcr.bazel.build/modules/rules_cc/0.2.17/MODULE.bazel": "1849602c86cb60da8613d2de887f9566a6d354a6df6d7009f9d04a14402f9a84", "https://bcr.bazel.build/modules/rules_cc/0.2.17/source.json": "3832f45d145354049137c0090df04629d9c2b5493dc5c2bf46f1834040133a07", + "https://bcr.bazel.build/modules/rules_cc/0.2.9/MODULE.bazel": "34263f1dca62ea664265438cef714d7db124c03e1ed55ebb4f1dc860164308d1", "https://bcr.bazel.build/modules/rules_foreign_cc/0.10.1/MODULE.bazel": "b9527010e5fef060af92b6724edb3691970a5b1f76f74b21d39f7d433641be60", "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", @@ -304,7 +307,7 @@ "moduleExtensions": { "//bazel:extensions.bzl%non_module_dependencies": { "general": { - "bzlTransitiveDigest": "wLKvpZbW0I9xXgkrj1e5pRqR6N6bLiXc2VZIyW0KEr8=", + "bzlTransitiveDigest": "jLVsqIO34YP2a08gX3nxYU+4L3Ube8ezmAVI3qQ6s1c=", "usagesDigest": "FEiDyZe9eAU6yEqnarZf0XMEUk+prUyYClvq1RU1J98=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -418,15 +421,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": "2769234c4fe2fab9b0b043e891c2af0f1ae51c8d4b94799472981e676ed8009e", - "strip_prefix": "libxml2-2.15.2", - "url": "https://vectorized-public.s3.us-west-2.amazonaws.com/dependencies/libxml2-v2.15.2.tar.gz" - } - }, "lksctp": { "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", "attributes": { diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index b593cec86ce52..87601cc859623 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -100,14 +100,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 = "2769234c4fe2fab9b0b043e891c2af0f1ae51c8d4b94799472981e676ed8009e", - strip_prefix = "libxml2-2.15.2", - url = "https://vectorized-public.s3.us-west-2.amazonaws.com/dependencies/libxml2-v2.15.2.tar.gz", - ) - http_archive( name = "lksctp", build_file = "//bazel/thirdparty:lksctp.BUILD", 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/src/v/cloud_storage_clients/BUILD b/src/v/cloud_storage_clients/BUILD index 6ae62383da6d2..bb3a9c373eef8 100644 --- a/src/v/cloud_storage_clients/BUILD +++ b/src/v/cloud_storage_clients/BUILD @@ -70,7 +70,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", @@ -82,6 +81,7 @@ redpanda_cc_library( "@boost//:beast", "@boost//:lexical_cast", "@boost//:property_tree", + "@libxml2", "@rapidjson", "@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/test_utils/BUILD b/src/v/test_utils/BUILD index ffd89a246ce6a..3747b869bc9e0 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/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