Skip to content

Commit

Permalink
chore(push): use curl 8.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gjasny committed Dec 27, 2023
1 parent 6c161e5 commit 470bb57
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 45 deletions.
22 changes: 5 additions & 17 deletions 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")

Expand Down Expand Up @@ -46,7 +34,7 @@ cc_library(
"lib/**/*.h",
]),
copts = CURL_COPTS + [
'-DOS="os"',
"-DOS=\"os\"",
],
defines = ["CURL_STATICLIB"],
includes = [
Expand Down
29 changes: 5 additions & 24 deletions 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",
Expand All @@ -37,19 +25,14 @@ 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",
"-DHAVE_GAI_STRERROR=1",
"-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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions bazel/repositories.bzl
Expand Up @@ -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",
)
Expand Down

0 comments on commit 470bb57

Please sign in to comment.