Merge ~paride/ubuntu/+source/simplestreams:simplestreams-sru-lp1908452-focal into ubuntu/+source/simplestreams:ubuntu/focal-devel

Proposed by Paride Legovini
Status: Merged
Merge reported by: Christian Ehrhardt 
Merged at revision: 98bca275e18613bb1961c4c5ca39986b72dfca50
Proposed branch: ~paride/ubuntu/+source/simplestreams:simplestreams-sru-lp1908452-focal
Merge into: ubuntu/+source/simplestreams:ubuntu/focal-devel
Diff against target: 75 lines (+55/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/0001-Add-10s-timeout-to-out-going-requests.patch (+46/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
dann frazier (community) Approve
Canonical Server Pending
git-ubuntu developers Pending
Review via email: mp+404202@code.launchpad.net
To post a comment you must log in.
Revision history for this message
dann frazier (dannf) wrote :

Code looks good to me - however we'll need to also uploads for hirsute and groovy so that an upgrade is not a regression. That means we'll probably need to use a different version string for focal. I'd suggest the following stringe for hirsute, groovy and focal - respectively:

0.1.0-30-g3cc8988a-0ubuntu1.21.04.1
0.1.0-30-g3cc8988a-0ubuntu1.20.10.1
0.1.0-30-g3cc8988a-0ubuntu1.20.04.1

or, alternatively, if you'd like to treat it like a backport:

0.1.0-30-g3cc8988a-0ubuntu1.1 (hirsute)
0.1.0-30-g3cc8988a-0ubuntu1.1~20.10.1 (groovy)
0.1.0-30-g3cc8988a-0ubuntu1.1~20.04.1 (focal)
In this case, I'd suggest keeping the hirsute changelog entry in both the groovy/focal changelogs, but adding a new "Backport to {groovy, focal}" entry on top for the backport targets.

review: Needs Fixing
Revision history for this message
dann frazier (dannf) wrote :

Uploaded, cheers!

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

 simplestreams | 0.1.0-30-g3cc8988a-0ubuntu1.21.04.1 | hirsute-updates/universe | all
 simplestreams | 0.1.0-30-g3cc8988a-0ubuntu1.20.10.1 | groovy-updates/universe | all
 simplestreams | 0.1.0-30-g3cc8988a-0ubuntu1.20.04.1 | focal-updates/universe | all

Those are copmplete, setting them to "merged"

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index a0a278e..fbef426 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+simplestreams (0.1.0-30-g3cc8988a-0ubuntu1.20.04.1) focal; urgency=medium
7+
8+ * Add 10s timeout to out-going requests to avoid blocking.
9+ - Via: d/patches/0001-Add-10s-timeout-to-out-going-requests.patch
10+ Upstream cherry-pick. Thanks: Adam Collard. (LP: #1908452)
11+
12+ -- Paride Legovini <paride.legovini@ubuntu.com> Fri, 11 Jun 2021 16:51:14 +0200
13+
14 simplestreams (0.1.0-30-g3cc8988a-0ubuntu1) focal; urgency=medium
15
16 * New upstream snapshot.
17diff --git a/debian/patches/0001-Add-10s-timeout-to-out-going-requests.patch b/debian/patches/0001-Add-10s-timeout-to-out-going-requests.patch
18new file mode 100644
19index 0000000..0bbb5fd
20--- /dev/null
21+++ b/debian/patches/0001-Add-10s-timeout-to-out-going-requests.patch
22@@ -0,0 +1,46 @@
23+From: Adam Collard <adam.collard@canonical.com>
24+Date: Tue, 2 Feb 2021 17:31:06 +0000
25+Origin: upstream, https://git.launchpad.net/simplestreams/commit/?id=f37d2ed20bbe65f561cfad61fdaf32a7f376edaf
26+Bug: https://bugs.launchpad.net/ubuntu/+source/simplestreams/+bug/1908452
27+Subject: [PATCH] Add 10s timeout to out-going requests to avoid blocking.
28+
29+Fixes LP:1908452
30+---
31+ simplestreams/contentsource.py | 7 +++++--
32+ 1 file changed, 5 insertions(+), 2 deletions(-)
33+
34+diff --git a/simplestreams/contentsource.py b/simplestreams/contentsource.py
35+index 40bf9d0..b54e898 100644
36+--- a/simplestreams/contentsource.py
37++++ b/simplestreams/contentsource.py
38+@@ -32,6 +32,7 @@ else:
39+ urllib_error = urllib_request
40+
41+ READ_BUFFER_SIZE = 1024 * 10
42++TIMEOUT = 10
43+
44+ try:
45+ # We try to use requests because we can do gzip encoding with it.
46+@@ -338,7 +339,7 @@ class Urllib2UrlReader(UrlReader):
47+ req.add_header('User-Agent', user_agent)
48+ if offset is not None:
49+ req.add_header('Range', 'bytes=%d-' % offset)
50+- self.req = opener(req)
51++ self.req = opener(req, timeout=TIMEOUT)
52+ except urllib_error.HTTPError as e:
53+ if e.code == 404:
54+ myerr = IOError("Unable to open %s" % url)
55+@@ -378,7 +379,9 @@ class RequestsUrlReader(UrlReader):
56+ if headers == {}:
57+ headers = None
58+
59+- self.req = requests.get(url, stream=True, auth=auth, headers=headers)
60++ self.req = requests.get(
61++ url, stream=True, auth=auth, headers=headers, timeout=TIMEOUT
62++ )
63+ self.r_iter = None
64+ if buflen is None:
65+ buflen = READ_BUFFER_SIZE
66+--
67+2.31.1
68+
69diff --git a/debian/patches/series b/debian/patches/series
70new file mode 100644
71index 0000000..eca0699
72--- /dev/null
73+++ b/debian/patches/series
74@@ -0,0 +1 @@
75+0001-Add-10s-timeout-to-out-going-requests.patch

Subscribers

People subscribed via source and target branches