Merge ~ahasenack/ubuntu/+source/squid:focal-squid-drop-gopherd-dep8 into ubuntu/+source/squid:ubuntu/devel

Proposed by Andreas Hasenack
Status: Merged
Approved by: Andreas Hasenack
Approved revision: 5cf238b0a8e627a595ba0f4e6b88e889cc5217af
Merged at revision: 5cf238b0a8e627a595ba0f4e6b88e889cc5217af
Proposed branch: ~ahasenack/ubuntu/+source/squid:focal-squid-drop-gopherd-dep8
Merge into: ubuntu/+source/squid:ubuntu/devel
Diff against target: 173 lines (+23/-47)
4 files modified
debian/changelog (+9/-0)
debian/tests/control (+1/-1)
debian/tests/squid (+1/-1)
debian/tests/test-squid.py (+12/-45)
Reviewer Review Type Date Requested Status
Lucas Kanashiro (community) Approve
Canonical Server packageset reviewers Pending
Review via email: mp+377327@code.launchpad.net

Description of the change

pygopherd was removed from focal, and I didn't find any other gopher server, so let's drop the gopher test.

While running that, I saw that we also need to update the python story of the dep8 test-squid.py test, and turns out it works with python3 with minimal changes (assertEquals -> assertEqual), so I did that here as well.

Tests pass, run with autopkgtest -o dep8 -U -s -B ./squid/ -- lxd ubuntu-daily:focal

$ tail dep8/log -n 20
Test ftp ... ok
test_http_proxy (__main__.BasicTest)
Test http ... ok
test_https_proxy (__main__.BasicTest)
Test https ... ok
test_squidclient (__main__.BasicTest)
Test squidclient ... ok
test_zz_apparmor (__main__.BasicTest)
Test apparmor ... ok

----------------------------------------------------------------------
Ran 6 tests in 271.278s

OK
autopkgtest [15:45:23]: test squid: -----------------------]
autopkgtest [15:45:23]: test squid: - - - - - - - - - - results - - - - - - - - - -
squid PASS
autopkgtest [15:45:23]: @@@@@@@@@@@@@@@@@@@@ summary
upstream-test-suite PASS
squid PASS

To post a comment you must log in.
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

It also passed when using --apt-pocket=proposed

Revision history for this message
Andreas Hasenack (ahasenack) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

(This fix will help unblock openldap in excuses)

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

+1, LGTM and the Debian maintainer already merged it :)

review: Approve
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks, tagging and uploading 5cf238b0a8e627a595ba0f4e6b88e889cc5217af

$ git push pkg upload/4.9-2ubuntu2
Enumerating objects: 29, done.
Counting objects: 100% (29/29), done.
Delta compression using up to 4 threads
Compressing objects: 100% (22/22), done.
Writing objects: 100% (22/22), 2.46 KiB | 66.00 KiB/s, done.
Total 22 (delta 14), reused 0 (delta 0)
remote: Checking connectivity: 22, done.
To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/squid
 * [new tag] upload/4.9-2ubuntu2 -> upload/4.9-2ubuntu2

$ dput ubuntu ../squid_4.9-2ubuntu2_source.changes
Checking signature on .changes
gpg: ../squid_4.9-2ubuntu2_source.changes: Valid signature from AC983EB5BF6BCBA9
Checking signature on .dsc
gpg: ../squid_4.9-2ubuntu2.dsc: Valid signature from AC983EB5BF6BCBA9
Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading squid_4.9-2ubuntu2.dsc: done.
  Uploading squid_4.9-2ubuntu2.debian.tar.xz: done.
  Uploading squid_4.9-2ubuntu2_source.buildinfo: done.
  Uploading squid_4.9-2ubuntu2_source.changes: done.
Successfully uploaded packages.

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 110ec72..0fc8039 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+squid (4.9-2ubuntu2) focal; urgency=medium
7+
8+ * d/t/control, d/t/test-squid.py: remove gopher tests, as pygopherd is
9+ no longer available in Focal (LP: #1858827)
10+ * d/t/test-squid.py, d/t/squid: switch to python3
11+ * d/t/control: depend on python3-minimal
12+
13+ -- Andreas Hasenack <andreas@canonical.com> Wed, 08 Jan 2020 15:52:32 -0300
14+
15 squid (4.9-2ubuntu1) focal; urgency=medium
16
17 * Merge with Debian unstable. Remaining changes:
18diff --git a/debian/tests/control b/debian/tests/control
19index c6bad41..51cd6f5 100644
20--- a/debian/tests/control
21+++ b/debian/tests/control
22@@ -3,5 +3,5 @@ Depends: @builddeps@, fakeroot, squid
23 Restrictions: allow-stderr
24
25 Tests: squid
26-Depends: squid, squidclient, elinks, netcat, pygopherd, apparmor-utils, vsftpd, apache2, ssl-cert
27+Depends: squid, squidclient, elinks, netcat, apparmor-utils, vsftpd, apache2, ssl-cert, python3-minimal
28 Restrictions: needs-root
29diff --git a/debian/tests/squid b/debian/tests/squid
30index 015177b..45d573e 100644
31--- a/debian/tests/squid
32+++ b/debian/tests/squid
33@@ -31,4 +31,4 @@ service vsftpd restart 2>&1 > /dev/null
34 a2enmod ssl
35 a2ensite default-ssl
36 systemctl restart apache2
37-python `dirname $0`/test-squid.py 2>&1
38+python3 `dirname $0`/test-squid.py 2>&1
39diff --git a/debian/tests/test-squid.py b/debian/tests/test-squid.py
40index e7a8044..53a5af9 100644
41--- a/debian/tests/test-squid.py
42+++ b/debian/tests/test-squid.py
43@@ -1,4 +1,4 @@
44-#!/usr/bin/python
45+#!/usr/bin/python3
46 #
47 # test-squid.py quality assurance test script
48 # Copyright (C) 2008-2017 Canonical Ltd.
49@@ -58,7 +58,7 @@ class HttpdCommon(unittest.TestCase):
50 expected = 0
51 ret, report = cmd([self.initscript, 'start'])
52 result = 'Got exit code %d, expected %d\n' % (ret, expected)
53- self.assertEquals(expected, ret, result + report)
54+ self.assertEqual(expected, ret, result + report)
55 time.sleep(2)
56
57 def _stop(self):
58@@ -66,7 +66,7 @@ class HttpdCommon(unittest.TestCase):
59 expected = 0
60 ret, report = cmd([self.initscript, 'stop'])
61 result = 'Got exit code %d, expected %d\n' % (ret, expected)
62- self.assertEquals(expected, ret, result + report)
63+ self.assertEqual(expected, ret, result + report)
64
65 def _word_find(self, report, content, invert=False):
66 '''Check for a specific string'''
67@@ -90,7 +90,7 @@ class HttpdCommon(unittest.TestCase):
68 '-dump', url])
69 expected = 0
70 result = 'Got exit code %d, expected %d\n' % (ret, expected)
71- self.assertEquals(expected, ret, result + rep)
72+ self.assertEqual(expected, ret, result + rep)
73
74 if content != "":
75 self._word_find(rep, content)
76@@ -104,15 +104,12 @@ class BasicTest(HttpdCommon):
77 self._set_initscript("/etc/init.d/squid")
78 HttpdCommon._setUp(self)
79
80- self.gophermap = "/var/gopher/gophermap"
81-
82 self.aa_profile = "usr.sbin.squid"
83 self.aa_abs_profile = "/etc/apparmor.d/%s" % self.aa_profile
84
85 def tearDown(self):
86 '''Shutdown methods'''
87 HttpdCommon._tearDown(self)
88- config_restore(self.gophermap)
89
90 def test_daemons(self):
91 '''Test daemon'''
92@@ -141,43 +138,13 @@ class BasicTest(HttpdCommon):
93
94 def test_squidclient(self):
95 '''Test squidclient'''
96- urls = ['ftp://anonymous@localhost:21', 'gopher://127.0.0.1']
97- for url in urls:
98- ret, report = cmd(['squidclient', '-h', '127.0.0.1', '-p',
99- '3128', '-r', url])
100- expected = 0
101- result = 'Got exit code %d, expected %d\n' % (ret, expected)
102- self.assertEquals(expected, ret, result + report)
103-
104- def test_CVE_2011_3205(self):
105- '''Test parsing lines > 4096 in length (CVE-2011-3205)'''
106-
107- longline = "ABCDEF" * 4096
108-
109- config_replace(self.gophermap,
110- """Welcome to Pygopherd! You can place your documents
111-in /var/gopher for future use. You can remove the gophermap
112-file there to get rid of this message, or you can edit it to
113-use other things. (You'll need to do at least one of these
114-two things in order to get your own data to show up!)
115-
116-%s
117-
118-Some links to get you started:
119-
120-1Pygopherd Home /devel/gopher/pygopherd gopher.quux.org 70
121-1Quux.Org Mega Server / gopher.quux.org 70
122-1The Gopher Project /Software/Gopher gopher.quux.org 70
123-1Traditional UMN Home Gopher / gopher.tc.umn.edu 70
124-
125-Welcome to the world of Gopher and enjoy!
126-""" % (longline), append=False)
127-
128+ url = 'ftp://anonymous@localhost:21'
129 ret, report = cmd(['squidclient', '-h', '127.0.0.1', '-p',
130- '3128', '-r', "gopher://127.0.0.1"])
131+ '3128', '-r', url])
132 expected = 0
133 result = 'Got exit code %d, expected %d\n' % (ret, expected)
134- self.assertEquals(expected, ret, result + report)
135+ self.assertEqual(expected, ret, result + report)
136+
137
138 # Run this last so if we enable the profile then we don't unload it
139 def test_zz_apparmor(self):
140@@ -188,13 +155,13 @@ Welcome to the world of Gopher and enjoy!
141 ret, report = check_apparmor(self.aa_abs_profile, is_running=False)
142 expected = 1
143 result = 'Got exit code %d, expected %d\n' % (ret, expected)
144- self.assertEquals(ret, expected, result + report)
145+ self.assertEqual(ret, expected, result + report)
146
147 # Verify it is syntactically correct
148 ret, report = cmd(['apparmor_parser', '-p', self.aa_abs_profile])
149 expected = 0
150 result = 'Got exit code %d, expected %d\n' % (ret, expected)
151- self.assertEquals(ret, expected, result + report)
152+ self.assertEqual(ret, expected, result + report)
153
154 # The remaining tests try to actually load a profile
155 # skip them if securityfs isn't mounted (i.e., we are in a lxc container)
156@@ -208,7 +175,7 @@ Welcome to the world of Gopher and enjoy!
157 ret, report = cmd(['aa-enforce', self.aa_abs_profile])
158 expected = 0
159 result = 'Got exit code %d, expected %d\n' % (ret, expected)
160- self.assertEquals(ret, expected, result + report)
161+ self.assertEqual(ret, expected, result + report)
162
163 self._stop()
164 self._start()
165@@ -216,7 +183,7 @@ Welcome to the world of Gopher and enjoy!
166 ret, report = check_apparmor(self.aa_abs_profile, is_running=True)
167 expected = 1
168 result = 'Got exit code %d, expected %d\n' % (ret, expected)
169- self.assertEquals(ret, expected, result + report)
170+ self.assertEqual(ret, expected, result + report)
171
172
173 # http://www.chiark.greenend.org.uk/ucgi/~cjwatson/blosxom/2009-07-02-python-sigpipe.html

Subscribers

People subscribed via source and target branches