/usr/sbin/apt-add-repository will not function with IPv6 proxies called by address
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-httplib2 (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
New
|
Undecided
|
Unassigned | ||
Jammy |
New
|
Undecided
|
Unassigned |
Bug Description
It appears that if one has an HTTP or HTTPS proxy called out specifically by IPv6 address rather than hostname, it will fail. Placing an entry in /etc/hosts, or the proxy into DNS (and calling by hostname) will function.
failure steps:
1) set proxy environment variables
export http_proxy="http://[2001:db8:
export https_proxy="http://[2001:db8:
2) Attempt to add repository (in this case, a PPA):
apt-add-
3) Enjoy the resulting stack trace:
Traceback (most recent call last):
File "/usr/bin/
sys.exit(0 if addaptrepo.main() else 1)
File "/usr/bin/
shortcut = handler(source, **shortcut_params)
File "/usr/lib/
return handler(shortcut, **kwargs)
File "/usr/lib/
if self.lpppa.
File "/usr/lib/
self._lpppa = self.lpteam.
File "/usr/lib/
self._lpteam = self.lp.
File "/usr/lib/
self._lp = login_func("%s.%s" % (self.__module__, self.__
File "/usr/lib/
return cls(
File "/usr/lib/
super(
File "/usr/lib/
self._wadl = self._browser.
File "/usr/lib/
response, content = self._request(url, media_type=
File "/usr/lib/
response, content = self._request_
File "/usr/lib/
response, content = self._connectio
File "/usr/lib/
conn = self.connection
File "/usr/lib/
self.proxy_info = proxy_info("https")
File "/usr/lib/
return proxy_info_
File "/usr/lib/
port = int(port)
ValueError: invalid literal for int() with base 10: 'db8:f00::2]:3128'
Ubuntu Release:
# lsb_release -rd
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Package version:
# apt-cache policy software-
software-
Installed: 0.99.22.6
Candidate: 0.99.22.6
Version table:
*** 0.99.22.6 500
500 http://
100 /var/lib/
0.99.22 500
500 http://
tags: |
added: jammy removed: ipv6 proxy |
affects: | software-properties (Ubuntu) → python-httplib2 (Ubuntu) |
Changed in python-httplib2 (Ubuntu): | |
status: | New → Fix Released |
tags: | added: rls-jj-incoming |
On another reading of this, it looks like the issue may end up being in dependency (and upstream package) httplib2. I'd like a sanity check on that, and I'm willing to file tickets in other packages or upstream as soon as I have cycles. I'm buried in the middle of another project right now, but I wanted to get the issue documented for any other poor souls running into it in the future.