Merge ~cjwatson/software-properties:new-ppa-domains into software-properties:ubuntu/master

Proposed by Colin Watson
Status: Merged
Merge reported by: Brian Murray
Merged at revision: c5f4e0e4c1186778ff6223d73aea2f6ed7233f9f
Proposed branch: ~cjwatson/software-properties:new-ppa-domains
Merge into: software-properties:ubuntu/master
Diff against target: 88 lines (+21/-9)
5 files modified
debian/changelog (+6/-0)
softwareproperties/ppa.py (+9/-3)
tests/test_add_apt_repository.py (+1/-1)
tests/test_dbus.py (+1/-1)
tests/test_shortcuts.py (+4/-4)
Reviewer Review Type Date Requested Status
Ubuntu Core Development Team Pending
Review via email: mp+414567@code.launchpad.net

Commit message

Use new HTTPS-capable PPA domains

To post a comment you must log in.
Revision history for this message
Brian Murray (brian-murray) wrote :

When I run the autopkgtests for this package with squid.internal as the proxy server some of them end up failing, despite my having added launchpadcontent.net to the no_proxy environment variable. So there might be something else going, but I haven't investigated it thoroughly.

Revision history for this message
Colin Watson (cjwatson) wrote :
Revision history for this message
Brian Murray (brian-murray) wrote :

I merged and uploaded this but managed to lose the commit id.

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 fa86942..7b489bc 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,9 @@
6+software-properties (0.99.17) UNRELEASED; urgency=medium
7+
8+ * Use new HTTPS-capable PPA domains (LP: #1959015).
9+
10+ -- Colin Watson <cjwatson@ubuntu.com> Tue, 25 Jan 2022 15:36:29 +0000
11+
12 software-properties (0.99.16) jammy; urgency=medium
13
14 * Show Ubuntu Pro banner on Livepatch page (LP: #1934439)
15diff --git a/softwareproperties/ppa.py b/softwareproperties/ppa.py
16index 3d95d29..0e1bff1 100644
17--- a/softwareproperties/ppa.py
18+++ b/softwareproperties/ppa.py
19@@ -33,9 +33,15 @@ from softwareproperties.uri import URIShortcutHandler
20 from urllib.parse import urlparse
21
22
23-PPA_URI_FORMAT = 'http://ppa.launchpad.net/{team}/{ppa}/ubuntu/'
24-PRIVATE_PPA_URI_FORMAT = 'https://private-ppa.launchpad.net/{team}/{ppa}/ubuntu/'
25-PPA_VALID_HOSTNAMES = [urlparse(PPA_URI_FORMAT).hostname, urlparse(PRIVATE_PPA_URI_FORMAT).hostname]
26+PPA_URI_FORMAT = 'https://ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/'
27+PRIVATE_PPA_URI_FORMAT = 'https://private-ppa.launchpadcontent.net/{team}/{ppa}/ubuntu/'
28+PPA_VALID_HOSTNAMES = [
29+ urlparse(PPA_URI_FORMAT).hostname,
30+ urlparse(PRIVATE_PPA_URI_FORMAT).hostname,
31+ # Old hostnames.
32+ 'ppa.launchpad.net',
33+ 'private-ppa.launchpad.net',
34+]
35
36 PPA_VALID_COMPS = ['main', 'main/debug']
37
38diff --git a/tests/test_add_apt_repository.py b/tests/test_add_apt_repository.py
39index 2d68e4c..45f4de7 100755
40--- a/tests/test_add_apt_repository.py
41+++ b/tests/test_add_apt_repository.py
42@@ -45,7 +45,7 @@ ARCHIVE_FILENAME_URI = re.sub(r'[:/.]+', '_', ARCHIVE_URI)
43 ARCHIVE_FILENAME = f'archive_uri-{ARCHIVE_FILENAME_URI}-{CODENAME}.list'
44
45 PPA_NAME = 'ubuntu-support-team/software-properties-autopkgtest'
46-PPA_URI = f'http://ppa.launchpad.net/{PPA_NAME}/ubuntu/'
47+PPA_URI = f'https://ppa.launchpadcontent.net/{PPA_NAME}/ubuntu/'
48 PPA_FILENAME = f'ubuntu-support-team-ubuntu-software-properties-autopkgtest-{CODENAME}.list'
49 PPA_TRUSTED_FILENAME = 'ubuntu-support-team-ubuntu-software-properties-autopkgtest.gpg'
50 PPA_TRUSTED_FINGERPRINT = 'A17A D76F CBB7 A7D5 73C4 DF43 1E03 2FCE 2F88 6048'
51diff --git a/tests/test_dbus.py b/tests/test_dbus.py
52index 0759d45..2b77c62 100755
53--- a/tests/test_dbus.py
54+++ b/tests/test_dbus.py
55@@ -298,7 +298,7 @@ class TestDBus(unittest.TestCase):
56 res = self.iface.AddSourceFromLine("xxx")
57 self.assertFalse(res)
58 # add real
59- s = "deb http://ppa.launchpad.net/ foo bar"
60+ s = "deb https://ppa.launchpadcontent.net/ foo bar"
61 self.iface.AddSourceFromLine(s)
62 self.assertIn(s, self.sourceslist)
63 self.assertIn(s.replace("deb", "# deb-src"), self.sourceslist)
64diff --git a/tests/test_shortcuts.py b/tests/test_shortcuts.py
65index 058b820..7c1fe14 100644
66--- a/tests/test_shortcuts.py
67+++ b/tests/test_shortcuts.py
68@@ -29,16 +29,16 @@ DISTRO = get_distro()
69 CODENAME = DISTRO.codename
70
71 # These must match the ppa used in the VALID_PPAS
72-PPA_LINE = f"deb http://ppa.launchpad.net/ddstreet/ppa/ubuntu/ {CODENAME} main"
73+PPA_LINE = f"deb https://ppa.launchpadcontent.net/ddstreet/ppa/ubuntu/ {CODENAME} main"
74 PPA_FILEBASE = "ddstreet-ubuntu-ppa"
75 PPA_SOURCEFILE = f"{PPA_FILEBASE}-{CODENAME}.list"
76 PPA_TRUSTEDFILE = f"{PPA_FILEBASE}.gpg"
77 PPA_NETRCFILE = f"{PPA_FILEBASE}.conf"
78
79 PRIVATE_PPA_PASSWORD = "thisisnotarealpassword"
80-PRIVATE_PPA_LINE = f"deb https://private-ppa.launchpad.net/ddstreet/ppa/ubuntu/ {CODENAME} main"
81-PRIVATE_PPA_NETRCCONTENT = f"machine private-ppa.launchpad.net/ddstreet/ppa/ubuntu/ login ddstreet password {PRIVATE_PPA_PASSWORD}"
82-PRIVATE_PPA_SUBSCRIPTION_URLS = [f"https://ddstreet:{PRIVATE_PPA_PASSWORD}@private-ppa.launchpad.net/ddstreet/ppa/ubuntu/"]
83+PRIVATE_PPA_LINE = f"deb https://private-ppa.launchpadcontent.net/ddstreet/ppa/ubuntu/ {CODENAME} main"
84+PRIVATE_PPA_NETRCCONTENT = f"machine private-ppa.launchpadcontent.net/ddstreet/ppa/ubuntu/ login ddstreet password {PRIVATE_PPA_PASSWORD}"
85+PRIVATE_PPA_SUBSCRIPTION_URLS = [f"https://ddstreet:{PRIVATE_PPA_PASSWORD}@private-ppa.launchpadcontent.net/ddstreet/ppa/ubuntu/"]
86
87 # These must match the uca used in VALID_UCAS
88 UCA_CANAME = "train"

Subscribers

People subscribed via source and target branches