Public bug reported: 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:f00::2]:3128/" export https_proxy="http://[2001:db8:f00::2]:3128/" 2) Attempt to add repository (in this case, a PPA): apt-add-repository ppa:ansible/ansible 3) Enjoy the resulting stack trace: Traceback (most recent call last): File "/usr/bin/apt-add-repository", line 364, in <module> sys.exit(0 if addaptrepo.main() else 1) File "/usr/bin/apt-add-repository", line 347, in main shortcut = handler(source, **shortcut_params) File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler return handler(shortcut, **kwargs) File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 82, in __init__ if self.lpppa.publish_debug_symbols: File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 120, in lpppa self._lpppa = self.lpteam.getPPAByName(name=self.ppaname) File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 107, in lpteam self._lpteam = self.lp.people(self.teamname) File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 98, in lp self._lp = login_func("%s.%s" % (self.__module__, self.__class__.__name__), File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 494, in login_anonymously return cls( File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 230, in __init__ super(Launchpad, self).__init__( File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 472, in __init__ self._wadl = self._browser.get_wadl_application(self._root_uri) File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 447, in get_wadl_application response, content = self._request(url, media_type=wadl_type) File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 389, in _request response, content = self._request_and_retry( File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 359, in _request_and_retry response, content = self._connection.request( File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1578, in request conn = self.connections[conn_key] = connection_type( File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1095, in __init__ self.proxy_info = proxy_info("https") File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 926, in proxy_info_from_environment return proxy_info_from_url(url, method, noproxy=None) File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 950, in proxy_info_from_url 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-properties-common software-properties-common: Installed: 0.99.22.6 Candidate: 0.99.22.6 Version table: *** 0.99.22.6 500 500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages 100 /var/lib/dpkg/status 0.99.22 500 500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages ** Affects: software-properties (Ubuntu) Importance: Undecided Status: New ** Tags: ipv6 proxy -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to software-properties in Ubuntu. https://bugs.launchpad.net/bugs/2013545 Title: /usr/sbin/apt-add-repository will not function with IPv6 proxies called by address Status in software-properties package in Ubuntu: New 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:f00::2]:3128/" export https_proxy="http://[2001:db8:f00::2]:3128/" 2) Attempt to add repository (in this case, a PPA): apt-add-repository ppa:ansible/ansible 3) Enjoy the resulting stack trace: Traceback (most recent call last): File "/usr/bin/apt-add-repository", line 364, in <module> sys.exit(0 if addaptrepo.main() else 1) File "/usr/bin/apt-add-repository", line 347, in main shortcut = handler(source, **shortcut_params) File "/usr/lib/python3/dist-packages/softwareproperties/shortcuts.py", line 40, in shortcut_handler return handler(shortcut, **kwargs) File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 82, in __init__ if self.lpppa.publish_debug_symbols: File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 120, in lpppa self._lpppa = self.lpteam.getPPAByName(name=self.ppaname) File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 107, in lpteam self._lpteam = self.lp.people(self.teamname) File "/usr/lib/python3/dist-packages/softwareproperties/ppa.py", line 98, in lp self._lp = login_func("%s.%s" % (self.__module__, self.__class__.__name__), File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 494, in login_anonymously return cls( File "/usr/lib/python3/dist-packages/launchpadlib/launchpad.py", line 230, in __init__ super(Launchpad, self).__init__( File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 472, in __init__ self._wadl = self._browser.get_wadl_application(self._root_uri) File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 447, in get_wadl_application response, content = self._request(url, media_type=wadl_type) File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 389, in _request response, content = self._request_and_retry( File "/usr/lib/python3/dist-packages/lazr/restfulclient/_browser.py", line 359, in _request_and_retry response, content = self._connection.request( File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1578, in request conn = self.connections[conn_key] = connection_type( File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 1095, in __init__ self.proxy_info = proxy_info("https") File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 926, in proxy_info_from_environment return proxy_info_from_url(url, method, noproxy=None) File "/usr/lib/python3/dist-packages/httplib2/__init__.py", line 950, in proxy_info_from_url 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-properties-common software-properties-common: Installed: 0.99.22.6 Candidate: 0.99.22.6 Version table: *** 0.99.22.6 500 500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages 100 /var/lib/dpkg/status 0.99.22 500 500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/2013545/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp