Hello Peter,
thanks for your investigations!
Der PCFreak [2021-03-12 22:56 +0100]:
Actually the correct command to refresh is |pkcon refresh force|.
Oops, sorry, yes -- (non)intuitive syntax for the win :-/
Setting a proxy within |/etc/PackageKit/PackageKit.conf| with |ProxyHTTP=| was not even recognized or interpreted I think.
Indeed:
# strings /usr/lib64/packagekit-backend/libpk_backend_* | grep Proxy (nothing)
# strings /usr/libexec/packagekitd | grep Proxy CannotSetProxy SetProxy method called: %s, %s
/usr/share/dbus-1/interfaces/org.freedesktop.PackageKit.xml indeed offers a SetProxy() method, but `rpm -ql PackageKit | xargs grep SetProxy` does not show any binary for that -- i.e. it seems nothing implements that interface.
I followed up to https://bugzilla.redhat.com/show_bug.cgi?id=1348843 to point that out, so that other people don't get misled either.
I created an override for the packagekit.service as |/usr/lib/systemd/system/packagekit.service.d/override.conf| with the following content:
|[Service] Environment="http_proxy=http://10.11.12.13:8080/" Environment="https_proxy=http://10.11.12.13:8080/" |
Now cockpit worked but this “was not a nice approach”.
Indeed, so that is actually not a bad approach -- $http_proxy etc. are standard env variable, and injecting them into services that way is a standard approach. Of course it sucks a bit that this needs to be done for every service individually.
/etc/sysconfig/proxy:1:HTTPS_PROXY="http://10.11.12.13:8080/" /etc/sysconfig/proxy:2:HTTP_PROXY="http://10.11.12.13:8080/" /etc/sysconfig/proxy:4:PROXY="http://10.11.12.13:8080/" |
Interesting! I don't see PackageKit to even look at /sysconfig (according to `strings`), but if this works, so much the better!
It would be nice if someone could just confirm if |ProxyHTTP=| should or is really and still recognized by PackageKit or if it is only one more rumor. I think currently it is not used in any way.
Correct.. Possibly this?
Version 0.8.14 ~~~~~~~~~~~~~~ Released: 2013-12-02 [...] Deprecations and Removed Features: - Do not allow the user to specify the proxy in PackageKit.conf (Richard Hughes)
Thanks!
Martin