diff --git a/0001-fetcher-curl-Stop-using-CURLOPT_LOW_SPEED_TIME-_LIMI.patch b/0001-fetcher-curl-Stop-using-CURLOPT_LOW_SPEED_TIME-_LIMI.patch new file mode 100644 index 0000000..0a11303 --- /dev/null +++ b/0001-fetcher-curl-Stop-using-CURLOPT_LOW_SPEED_TIME-_LIMI.patch @@ -0,0 +1,43 @@ +From 69e00fc506e6a6d368a6e276eeb376e3d88b2fc7 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Mon, 27 Nov 2017 11:05:07 -0500 +Subject: [PATCH] fetcher/curl: Stop using CURLOPT_LOW_SPEED_TIME/_LIMIT + +They don't play nicely currently with HTTP2 where we may +have lots of requests queued. + +https://github.com/ostreedev/ostree/issues/878#issuecomment-347228854 + +In practice anyways I think issues here are better solved on a higher level - +e.g. apps today can use an overall timeout on pulls and if they exceed the limit +set the cancellable. + +Closes: #1349 +Approved by: alexlarsson +--- + src/libostree/ostree-fetcher-curl.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/src/libostree/ostree-fetcher-curl.c b/src/libostree/ostree-fetcher-curl.c +index 8a23b163..58835529 100644 +--- a/src/libostree/ostree-fetcher-curl.c ++++ b/src/libostree/ostree-fetcher-curl.c +@@ -788,8 +788,13 @@ initiate_next_curl_request (FetcherRequest *req, + curl_easy_setopt (req->easy, CURLOPT_PROGRESSFUNCTION, prog_cb); + curl_easy_setopt (req->easy, CURLOPT_FOLLOWLOCATION, 1L); + curl_easy_setopt (req->easy, CURLOPT_CONNECTTIMEOUT, 30L); +- curl_easy_setopt (req->easy, CURLOPT_LOW_SPEED_LIMIT, 1L); +- curl_easy_setopt (req->easy, CURLOPT_LOW_SPEED_TIME, 30L); ++ /* We used to set CURLOPT_LOW_SPEED_LIMIT and CURLOPT_LOW_SPEED_TIME ++ * here, but see https://github.com/ostreedev/ostree/issues/878#issuecomment-347228854 ++ * basically those options don't play well with HTTP2 at the moment ++ * where we can have lots of outstanding requests. Further, ++ * we could implement that functionality at a higher level ++ * more consistently too. ++ */ + + /* closure bindings -> task */ + curl_easy_setopt (req->easy, CURLOPT_PRIVATE, task); +-- +2.14.2 + diff --git a/ostree.spec b/ostree.spec index ebaf5bc..cc9de62 100644 --- a/ostree.spec +++ b/ostree.spec @@ -1,12 +1,13 @@ Summary: Tool for managing bootable, immutable filesystem trees Name: ostree Version: 2017.13 -Release: 3%{?dist} +Release: 4%{?dist} Source0: https://github.com/ostreedev/%{name}/releases/download/v%{version}/libostree-%{version}.tar.xz # https://bugzilla.redhat.com/show_bug.cgi?id=1451458 Source1: 91-ostree.preset # Backported from upstream Patch0: 0001-fetcher-curl-Fix-invalid-memory-access-in-finalize.patch +Patch1: 0001-fetcher-curl-Stop-using-CURLOPT_LOW_SPEED_TIME-_LIMI.patch License: LGPLv2+ URL: https://ostree.readthedocs.io/en/latest/ @@ -162,6 +163,9 @@ install -D -m 0644 %{SOURCE1} %{buildroot}%{_prefix}/lib/systemd/system-preset/9 %{_libexecdir}/libostree/ostree-trivial-httpd %changelog +* Mon Nov 27 2017 Colin Walters - 2017.13-4 +- Backport patch to drop curl low speed checks; requested by flatpak + * Tue Nov 07 2017 Kalev Lember - 2017.13-3 - Backport a patch to fix a gnome-software crash when installing flatpaks (#1497642)