NetworkManager/src/nm-cloud-setup
Thomas Haller 7122ef4007 curl: use CURLOPT_PROTOCOLS_STR instead of deprecated CURLOPT_PROTOCOLS
CURLOPT_PROTOCOLS [0] was deprecated in libcurl 7.85.0 with
CURLOPT_PROTOCOLS_STR [1] as a replacement.

Well, technically it was only deprecated in 7.87.0, and retroactively
marked as deprecated since 7.85.0 [2]. But CURLOPT_PROTOCOLS_STR exists
since 7.85.0, so that's what we want to use.

This causes compiler warnings and build errors:

  ../src/core/nm-connectivity.c: In function 'do_curl_request':
  ../src/core/nm-connectivity.c:770:5: error: 'CURLOPT_PROTOCOLS' is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Werror=deprecated-declarations]
    770 |     curl_easy_setopt(ehandle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
        |     ^~~~~~~~~~~~~~~~
  In file included from ../src/core/nm-connectivity.c:13:
  /usr/include/curl/curl.h:1749:3: note: declared here
   1749 |   CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
        |   ^~~~~~~~~~~~~~~~~

This patch is largely taken from systemd patch [2].

Based-on-patch-by: Frantisek Sumsal <frantisek@sumsal.cz>

[0] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS.html
[1] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS_STR.html
[2] 6967571bf2
[3] e61a4c0b7c

Fixes: 7a1734926a ('connectivity,cloud-setup: restrict curl protocols to HTTP and HTTPS')
(cherry picked from commit dabfea2fc2)
2023-01-26 09:22:43 +01:00
..
tests format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
90-nm-cloud-setup.sh cloud-setup: move from "clients/cloud-setup/" to "src/nm-cloud-setup/" 2021-03-15 17:10:53 +01:00
main.c nm-cloud-setup: simplify clearing variables in retry loop 2022-12-19 15:46:51 +01:00
meson.build cloud-setup: configure secondary ip in Aliyun cloud 2021-07-19 17:41:52 +02:00
nm-cloud-setup-utils.c nm-cloud-setup: set preserve-external-ip flag during reapply 2022-12-19 15:46:48 +01:00
nm-cloud-setup-utils.h nm-cloud-setup: set preserve-external-ip flag during reapply 2022-12-19 15:46:48 +01:00
nm-cloud-setup.service.in cloud-setup: configure secondary ip in Aliyun cloud 2021-07-19 17:41:52 +02:00
nm-cloud-setup.timer cloud-setup: move from "clients/cloud-setup/" to "src/nm-cloud-setup/" 2021-03-15 17:10:53 +01:00
nm-http-client.c curl: use CURLOPT_PROTOCOLS_STR instead of deprecated CURLOPT_PROTOCOLS 2023-01-26 09:22:43 +01:00
nm-http-client.h format: reformat source tree with clang-format 13.0 2021-11-29 09:31:09 +00:00
nmcs-provider-aliyun.c all: use internal _nm_utils_ip4_netmask_to_prefix() 2022-06-27 10:50:24 +02:00
nmcs-provider-aliyun.h cloud-setup: configure secondary ip in Aliyun cloud 2021-07-19 17:41:52 +02:00
nmcs-provider-azure.c cloud-setup: track config-task-data in iface-data 2022-05-05 08:37:29 +02:00
nmcs-provider-azure.h cloud-setup: move from "clients/cloud-setup/" to "src/nm-cloud-setup/" 2021-03-15 17:10:53 +01:00
nmcs-provider-ec2.c cloud-setup: only pass config-iface-data as user-data for async functions 2022-05-05 08:37:29 +02:00
nmcs-provider-ec2.h cloud-setup: move from "clients/cloud-setup/" to "src/nm-cloud-setup/" 2021-03-15 17:10:53 +01:00
nmcs-provider-gcp.c cloud-setup: track config-task-data in iface-data 2022-05-05 08:37:29 +02:00
nmcs-provider-gcp.h cloud-setup: move from "clients/cloud-setup/" to "src/nm-cloud-setup/" 2021-03-15 17:10:53 +01:00
nmcs-provider.c cloud-setup: use union for NMCSProviderGetConfigIfaceData.priv 2022-05-05 08:37:29 +02:00
nmcs-provider.h cloud-setup: use union for NMCSProviderGetConfigIfaceData.priv 2022-05-05 08:37:29 +02:00
README.md all: add some README.md files describing the purpose of our sources 2021-08-19 17:51:11 +02:00

nm-cloud-setup

A NetworkManager client application that aims to automatically configure the network in a cloud environment.

See:

  • man 8 nm-cloud-setup ([www])