I double-checked add-apt-repository and apt-key behavior on bionic (the
same doesn't work on xenial as the fix was landed for bionic only).

add-apt-proxy:

➜  ~ sudo strace -f -e connect bash -c 'HTTP_PROXY=http://192.168.1.1:3128 
HTTPS_PROXY=http://192.168.1.1:3128 add-apt-repository ppa:landscape/18.03' 
strace: Process 20044 attached
# ...

connect(3, {sa_family=AF_INET, sin_port=htons(3128), 
sin_addr=inet_addr("192.168.1.1")}, 16) = 0
 
 More info: https://launchpad.net/~landscape/+archive/ubuntu/18.03
Press [ENTER] to continue or Ctrl-c to cancel adding it.

strace: Process 20070 attached
[pid 20070] connect(5, {sa_family=AF_INET, sin_port=htons(3128), 
sin_addr=inet_addr("192.168.1.1")}, 16) = 0
[pid 20070] connect(3, {sa_family=AF_INET, sin_port=htons(3128), 
sin_addr=inet_addr("192.168.1.1")}, 16) = 0
# ...
[pid 20080] connect(3, {sa_family=AF_INET, sin_port=htons(53), 
sin_addr=inet_addr("127.0.0.53")}, 16) = 0
0% [Connecting to ru.archive.ubuntu.com] [Connecting to 
security.ubuntu.com][pid 20079] connect(3, {sa_family=AF_INET6, 
sin6_port=htons(80), inet_pton(AF_INET6, "2001:67c:1360:8001::17", &sin6_addr), 
sin6_flowinfo=htonl(0), sin6_scope_id=0}, 28) = 0
# ...


# squid
1533649727.927    237 192.168.1.100 TCP_TUNNEL/200 5539 CONNECT 
launchpad.net:443 - HIER_DIRECT/91.189.89.223 -
1533649731.841    269 192.168.1.100 TCP_TUNNEL/200 5539 CONNECT 
launchpad.net:443 - HIER_DIRECT/91.189.89.223 -
1533649732.499    625 192.168.1.100 TCP_TUNNEL/200 4549 CONNECT 
keyserver.ubuntu.com:443 - HIER_DIRECT/91.189.89.49 -
1533649732.499    625 10.10.10.125 TCP_TUNNEL/200 4549 CONNECT 
keyserver.ubuntu.com:443 - HIER_DIRECT/91.189.89.49 -


with apt-key HTTP_PROXY and HTTPS_PROXY had no effect, only --keyserver-options 
affected it:

apt-key adv --keyserver-options 'http-proxy=http://10.10.10.30:3128'
--keyserver keyserver.ubuntu.com --recv-keys
35F77D63B5CEC106C577ED856E85A86E4652B4E6

[pid  4385] connect(7, {sa_family=AF_INET, sin_port=htons(3128),
sin_addr=inet_addr("192.168.1.1")}, 16) = -1 EINPROGRESS (Operation now
in progress)

1533651214.446    148 192.168.1.100 TCP_MISS/200 1150 GET
http://keyserver.ubuntu.com:11371/pks/lookup? - HIER_DIRECT/91.189.89.49
application/pgp-keys


This makes sense as the commit below has only changed software-properties not 
apt-key to use pycurl and https for key retrieval instead of HKP:

https://git.launchpad.net/ubuntu/+source/software-
properties/commit/?id=f57935235ca0f52b32da7efe2a24cb26c7fc4573

+        return get_info_from_https(SKS_KEYSERVER %
signing_key_fingerprint, accept_json=False)

Plus, the changelog actually makes the relevant note:

"   - stop using apt-key for installing keys"

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1433761

Title:
  apt-key and add-apt-repository don't honor Acquire::http::Proxy

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1433761/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to