public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* PR25548 followup
@ 2020-03-26 15:15 Frank Ch. Eigler
  2020-03-26 15:24 ` Frank Ch. Eigler
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2020-03-26 15:15 UTC (permalink / raw)
  To: elfutils-devel

Hi -

pushed as obvious:

Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Thu Mar 26 11:12:49 2020 -0400

    PR25548: CURLOPT_PATH_AS_IS backward compatibility
    
    libcurl < 7.42 lacks the CURLOPT_PATH_AS_IS flag, but extraneous
    client-side canonicalization is mostly harmless.
    
    Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
    Reported-by: Mark Wielaard <mark@klomp.org>

diff --git a/debuginfod/ChangeLog b/debuginfod/ChangeLog
index 7518e886031c..60d912a37c47 100644
--- a/debuginfod/ChangeLog
+++ b/debuginfod/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-26  Frank Ch. Eigler  <fche@redhat.com>
+
+	* debuginfod-client.c (debuginfod_query_server): Don't
+	set CURLOPT_PATH_AS_IS on old curl.  Mostly harmless.
+
 2020-03-24  Frank Ch. Eigler  <fche@redhat.com>
 
 	* debuginfod-client.c (debuginfod_query_server): Set
diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index 251047caf53f..f1b63160a5f2 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
@@ -716,7 +716,12 @@ debuginfod_query_server (debuginfod_client *c,
       curl_easy_setopt(data[i].handle, CURLOPT_FOLLOWLOCATION, (long) 1);
       curl_easy_setopt(data[i].handle, CURLOPT_FAILONERROR, (long) 1);
       curl_easy_setopt(data[i].handle, CURLOPT_NOSIGNAL, (long) 1);
+#if CURL_AT_LEAST_VERSION(7,42,0)
       curl_easy_setopt(data[i].handle, CURLOPT_PATH_AS_IS, (long) 1);
+#else
+      /* On old curl; no big deal, canonicalization here is almost the
+         same, except perhaps for ? # type decorations at the tail. */
+#endif
       curl_easy_setopt(data[i].handle, CURLOPT_AUTOREFERER, (long) 1);
       curl_easy_setopt(data[i].handle, CURLOPT_ACCEPT_ENCODING, "");
       add_extra_headers(data[i].handle);


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PR25548 followup
  2020-03-26 15:15 PR25548 followup Frank Ch. Eigler
@ 2020-03-26 15:24 ` Frank Ch. Eigler
  2020-03-26 17:04   ` Mark Wielaard
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Ch. Eigler @ 2020-03-26 15:24 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: elfutils-devel

Hi -

Ah but that would be too easy.

Author: Frank Ch. Eigler <fche@redhat.com>
Date:   Thu Mar 26 11:12:49 2020 -0400

    PR25548: CURLOPT_PATH_AS_IS backward compatibility
    
    old libcurl lacks the CURL_AT_LEAST_VERSION macro, so use
    LIBCURL_VERSION_NUM testing instead.
    
    Signed-off-by: Frank Ch. Eigler <fche@redhat.com>

diff --git a/debuginfod/debuginfod-client.c b/debuginfod/debuginfod-client.c
index f1b63160a5f2..b0d5cb028508 100644
--- a/debuginfod/debuginfod-client.c
+++ b/debuginfod/debuginfod-client.c
@@ -716,7 +716,7 @@ debuginfod_query_server (debuginfod_client *c,
       curl_easy_setopt(data[i].handle, CURLOPT_FOLLOWLOCATION, (long) 1);
       curl_easy_setopt(data[i].handle, CURLOPT_FAILONERROR, (long) 1);
       curl_easy_setopt(data[i].handle, CURLOPT_NOSIGNAL, (long) 1);
-#if CURL_AT_LEAST_VERSION(7,42,0)
+#if LIBCURL_VERSION_NUM >= 0x072a00 /* 7.42.0 */
       curl_easy_setopt(data[i].handle, CURLOPT_PATH_AS_IS, (long) 1);
 #else
       /* On old curl; no big deal, canonicalization here is almost the


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PR25548 followup
  2020-03-26 15:24 ` Frank Ch. Eigler
@ 2020-03-26 17:04   ` Mark Wielaard
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Wielaard @ 2020-03-26 17:04 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: elfutils-devel

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

On Thu, 2020-03-26 at 11:24 -0400, Frank Ch. Eigler via Elfutils-devel
wrote:
> Ah but that would be too easy.

:)

Also make sure the new test rpms are added to EXTRA_DIST.
Pushed the attached.

Cheers,

Mark

[-- Attachment #2: 0001-tests-Add-missing-debuginfod-rpms-fedora31-hello3-.r.patch --]
[-- Type: text/x-patch, Size: 2110 bytes --]

From 12305ff528ad9365b4d4e5ebcd307373cdd5bf83 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Thu, 26 Mar 2020 18:01:29 +0100
Subject: [PATCH] tests: Add missing debuginfod-rpms/fedora31/hello3-*.rpm to
 EXTRA_DIST.

The new rpms were used in the new test. Make sure they are in the dist
tar ball.

Signed-off-by: Mark Wielaard <mark@klomp.org>
---
 tests/ChangeLog   | 10 ++++++++++
 tests/Makefile.am |  6 ++++++
 2 files changed, 16 insertions(+)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 933e6726..b7390a57 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,13 @@
+2020-03-26  Mark Wielaard  <mark@klomp.org>
+
+	* Makefile.am (EXTRA_DIST): Add
+	debuginfod-rpms/fedora31/hello3-1.0-2.src.rpm,
+	debuginfod-rpms/fedora31/hello3-1.0-2.x86_64.rpm,
+	debuginfod-rpms/fedora31/hello3-debuginfo-1.0-2.x86_64.rpm,
+	debuginfod-rpms/fedora31/hello3-debugsource-1.0-2.x86_64.rpm,
+	debuginfod-rpms/fedora31/hello3-two-1.0-2.x86_64.rpm,
+	debuginfod-rpms/fedora31/hello3-two-debuginfo-1.0-2.x86_64.rpm
+
 2020-03-24  Frank Ch. Eigler  <fche@redhat.com>
 
 	* debuginfod-rpms/hello3.spec., /fedora31/*: New files with
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 934110e0..40b1c001 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -457,6 +457,12 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh run-ar.sh \
 	     debuginfod-rpms/fedora30/hello2-debugsource-1.0-2.x86_64.rpm \
 	     debuginfod-rpms/fedora30/hello2-two-1.0-2.x86_64.rpm \
 	     debuginfod-rpms/fedora30/hello2-two-debuginfo-1.0-2.x86_64.rpm \
+	     debuginfod-rpms/fedora31/hello3-1.0-2.src.rpm \
+	     debuginfod-rpms/fedora31/hello3-1.0-2.x86_64.rpm \
+	     debuginfod-rpms/fedora31/hello3-debuginfo-1.0-2.x86_64.rpm \
+	     debuginfod-rpms/fedora31/hello3-debugsource-1.0-2.x86_64.rpm \
+	     debuginfod-rpms/fedora31/hello3-two-1.0-2.x86_64.rpm \
+	     debuginfod-rpms/fedora31/hello3-two-debuginfo-1.0-2.x86_64.rpm \
 	     debuginfod-rpms/hello2.spec. \
 	     debuginfod-rpms/rhel6/hello2-1.0-2.i686.rpm \
 	     debuginfod-rpms/rhel6/hello2-1.0-2.src.rpm \
-- 
2.18.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-03-26 17:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 15:15 PR25548 followup Frank Ch. Eigler
2020-03-26 15:24 ` Frank Ch. Eigler
2020-03-26 17:04   ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).