From patchwork Tue Jan 10 22:23:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: dichen at redhat dot com X-Patchwork-Id: 62923 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2FF0D3858D33 for ; Tue, 10 Jan 2023 22:23:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FF0D3858D33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673389434; bh=vg67hkKwElHuQX2tq+8LdkQRILjGO/DWCHZDAmFr2ok=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Help:List-Subscribe:From:Reply-To:From; b=JA5sv/cLX/stN6adY6twahKOmaxuK4tTC/HgahZMh8oT3rDgfAqu5S1uFDX/cxRvu 92H/uRR2ajcanvmO9TN9vEuKnif/miBGHSiswTw+bxZVVC5hkq/G52j2l9iWk0jDrs /lVna0zIsjeXxBH/k2S+E3OuLfLMmVWc5tf+3nOw= X-Original-To: elfutils-devel@sourceware.org Delivered-To: elfutils-devel@sourceware.org Received: by sourceware.org (Postfix, from userid 48) id 9242A3858C2D; Tue, 10 Jan 2023 22:23:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9242A3858C2D To: elfutils-devel@sourceware.org Subject: [Bug debuginfod/29926] debuginfod using deprecated curl (since 7.55.0) API, fails to build with 7.87.0 Date: Tue, 10 Jan 2023 22:23:44 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: debuginfod X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: REOPENED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: resolution cc cf_reconfirmed_on bug_status everconfirmed Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-Patchwork-Original-From: mark at klomp dot org via Elfutils-devel From: dichen at redhat dot com Reply-To: mark at klomp dot org Errors-To: elfutils-devel-bounces+patchwork=sourceware.org@sourceware.org Sender: "Elfutils-devel" https://sourceware.org/bugzilla/show_bug.cgi?id=29926 Mark Wielaard changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- CC| |mark at klomp dot org Last reconfirmed| |2023-01-10 Status|RESOLVED |REOPENED Ever confirmed|0 |1 --- Comment #4 from Mark Wielaard --- Does the following work for you? https://code.wildebeest.org/git/user/mjw/elfutils/commit/?h=protocols_str diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c index a16165bd..1ce45632 100644 --- a/debuginfod/debuginfod-client.c +++ b/debuginfod/debuginfod-client.c @@ -1336,8 +1336,13 @@ debuginfod_query_server (debuginfod_client *c, /* Only allow http:// + https:// + file:// so we aren't being redirected to some unsupported protocol. */ +#if CURL_AT_LEAST_VERSION(7, 85, 0) + curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS_STR, + "http,https,file"); +#else curl_easy_setopt_ck(data[i].handle, CURLOPT_PROTOCOLS, (CURLPROTO_HTTP | CURLPROTO_HTTPS | CURLPROTO_FILE)); +#endif curl_easy_setopt_ck(data[i].handle, CURLOPT_URL, data[i].url); if (vfd >= 0) curl_easy_setopt_ck(data[i].handle, CURLOPT_ERRORBUFFER,