From 470bb5790a91dc9a021a132ee641cc93e1c35ab3 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Wed, 27 Dec 2023 14:55:20 +0100 Subject: [PATCH] chore(push): use curl 8.5.0 --- bazel/curl.BUILD | 22 +++++----------------- bazel/curl.bzl | 29 +++++------------------------ bazel/repositories.bzl | 8 ++++---- 3 files changed, 14 insertions(+), 45 deletions(-) diff --git a/bazel/curl.BUILD b/bazel/curl.BUILD index 59b30d4d..f66082de 100644 --- a/bazel/curl.BUILD +++ b/bazel/curl.BUILD @@ -1,20 +1,8 @@ -# Copyright 2017, OpenCensus Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 -# copied from: https://github.com/census-instrumentation/opencensus-cpp/blob/master/WORKSPACE - -licenses(["notice"]) # MIT/X derivative license +# Builds CURL from a distribution. +# copied from: https://github.com/open-telemetry/opentelemetry-cpp/blob/main/bazel/curl.BUILD load("@com_github_jupp0r_prometheus_cpp//bazel:curl.bzl", "CURL_COPTS") @@ -46,7 +34,7 @@ cc_library( "lib/**/*.h", ]), copts = CURL_COPTS + [ - '-DOS="os"', + "-DOS=\"os\"", ], defines = ["CURL_STATICLIB"], includes = [ diff --git a/bazel/curl.bzl b/bazel/curl.bzl index 796fe41e..e5ab5397 100644 --- a/bazel/curl.bzl +++ b/bazel/curl.bzl @@ -1,27 +1,15 @@ -# Copyright 2018, OpenCensus Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright The OpenTelemetry Authors +# SPDX-License-Identifier: Apache-2.0 # Compiler options for building libcurl. -# copied from: https://github.com/census-instrumentation/opencensus-cpp/blob/master/opencensus/curl.bzl +# copied from: https://github.com/open-telemetry/opentelemetry-cpp/blob/main/bazel/curl.bzl BASE_CURL_COPTS = [ # Disable everything else except HTTP protocol. "-DHTTP_ONLY=1", "-DENABLE_IPV6=1", "-DGETHOSTNAME_TYPE_ARG2=size_t", - "-DGETSERVBYPORT_R_ARGS=6", - "-DGETSERVBYPORT_R_BUFSIZE=4096", + "-DHAVE_ALARM=1", "-DHAVE_ALARM=1", "-DHAVE_ALLOCA_H=1", "-DHAVE_ARPA_INET_H=1", @@ -37,9 +25,7 @@ BASE_CURL_COPTS = [ "-DHAVE_FCNTL=1", "-DHAVE_FCNTL_H=1", "-DHAVE_FCNTL_O_NONBLOCK=1", - "-DHAVE_FDOPEN=1", "-DHAVE_FREEADDRINFO=1", - "-DHAVE_FREEIFADDRS=1", "-DHAVE_FSETXATTR=1", "-DHAVE_FSETXATTR_5=1", "-DHAVE_FTRUNCATE=1", @@ -47,9 +33,6 @@ BASE_CURL_COPTS = [ "-DHAVE_GETADDRINFO=1", "-DHAVE_GETADDRINFO_THREADSAFE=1", "-DHAVE_GETEUID=1", - "-DHAVE_GETHOSTBYADDR=1", - "-DHAVE_GETHOSTBYADDR_R=1", - "-DHAVE_GETHOSTBYADDR_R_8=1", "-DHAVE_GETHOSTBYNAME=1", "-DHAVE_GETHOSTBYNAME_R=1", "-DHAVE_GETHOSTBYNAME_R_6=1", @@ -59,7 +42,6 @@ BASE_CURL_COPTS = [ "-DHAVE_GETPWUID=1", "-DHAVE_GETPWUID_R=1", "-DHAVE_GETRLIMIT=1", - "-DHAVE_GETSERVBYPORT_R=1", "-DHAVE_GETTIMEOFDAY=1", "-DHAVE_GMTIME_R=1", "-DHAVE_IFADDRS_H=1", @@ -96,13 +78,12 @@ BASE_CURL_COPTS = [ "-DHAVE_SETLOCALE=1", "-DHAVE_SETRLIMIT=1", "-DHAVE_SETSOCKOPT=1", - "-DHAVE_SGTTY_H=1", "-DHAVE_SIGACTION=1", "-DHAVE_SIGINTERRUPT=1", "-DHAVE_SIGNAL=1", "-DHAVE_SIGNAL_H=1", "-DHAVE_SIGSETJMP=1", - "-DHAVE_SIG_ATOMIC_T=1", + "-DHAVE_SNPRINTF=1", "-DHAVE_SOCKADDR_IN6_SIN6_SCOPE_ID=1", "-DHAVE_SOCKET=1", "-DHAVE_SOCKETPAIR=1", diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index bf9f88c9..45082820 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -26,11 +26,11 @@ def prometheus_cpp_repositories(): maybe( http_archive, name = "com_github_curl", - sha256 = "dfb8582a05a893e305783047d791ffef5e167d295cf8d12b9eb9cfa0991ca5a9", - strip_prefix = "curl-7.88.0", + sha256 = "05fc17ff25b793a437a0906e0484b82172a9f4de02be5ed447e0cab8c3475add", + strip_prefix = "curl-8.5.0", urls = [ - "https://github.com/curl/curl/releases/download/curl-7_88_0/curl-7.88.0.tar.gz", - "https://curl.haxx.se/download/curl-7.88.0.tar.gz", + "https://github.com/curl/curl/releases/download/curl-8_5_0/curl-8.5.0.tar.gz", + "https://curl.haxx.se/download/curl-8.5.0.tar.gz", ], build_file = "@com_github_jupp0r_prometheus_cpp//bazel:curl.BUILD", )