[zypp-devel] Any better way to set proxy for libzypp

Hi, Currently, MeeGo Image Creator is using /etc/sysconfig/proxy to set proxy for libzypp, this is ok on OpenSUSE because it is a system file, but on other distros, people are complaining this is ugly and not good, i didn't find a better way to do this, anybody knows if there is a better way to set proxy for libzypp/libzypp-bindings in API level? -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org

On 04/18/2011 04:24 AM, Yi Yang wrote:
Hi,
Currently, MeeGo Image Creator is using /etc/sysconfig/proxy to set proxy for libzypp, this is ok on OpenSUSE because it is a system file, but on other distros, people are complaining this is ugly and not good, i didn't find a better way to do this, anybody knows if there is a better way to set proxy for libzypp/libzypp-bindings in API level?
Which version? libzypp now uses libproxy, and we ship a backend which use the sysconfig implementation if you are running as root. You could replace that one for your own needs. -- Duncan Mac-Vicar P. - Novell® Making IT Work As One™ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org

We used libzypp-bindings which uses libzypp, I saw libzypp is using libcurl on openSUSE 11.2, ours tool supports openSUSE 11.1, 11.2, 11.3, we depend on libzypp on host machine. -----Original Message----- From: Duncan Mac-Vicar P. [mailto:dmacvicar@suse.de] Sent: Monday, April 18, 2011 3:17 PM To: zypp-devel@opensuse.org Cc: Yang, Yi Y Subject: Re: [zypp-devel] Any better way to set proxy for libzypp On 04/18/2011 04:24 AM, Yi Yang wrote:
Hi,
Currently, MeeGo Image Creator is using /etc/sysconfig/proxy to set proxy for libzypp, this is ok on OpenSUSE because it is a system file, but on other distros, people are complaining this is ugly and not good, i didn't find a better way to do this, anybody knows if there is a better way to set proxy for libzypp/libzypp-bindings in API level?
Which version? libzypp now uses libproxy, and we ship a backend which use the sysconfig implementation if you are running as root. You could replace that one for your own needs. -- Duncan Mac-Vicar P. - Novell(r) Making IT Work As One(tm) SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org

Libzypp seems can't work with root, and PackageKit runs as root, so Zypp backend can't work well with libproxy. Thanks Xiaoqiang -----Original Message----- From: Duncan Mac-Vicar P. [mailto:dmacvicar@suse.de] Sent: Monday, April 18, 2011 3:17 PM To: zypp-devel@opensuse.org Cc: Yang, Yi Y Subject: Re: [zypp-devel] Any better way to set proxy for libzypp On 04/18/2011 04:24 AM, Yi Yang wrote:
Hi,
Currently, MeeGo Image Creator is using /etc/sysconfig/proxy to set proxy for libzypp, this is ok on OpenSUSE because it is a system file, but on other distros, people are complaining this is ugly and not good, i didn't find a better way to do this, anybody knows if there is a better way to set proxy for libzypp/libzypp-bindings in API level?
Which version? libzypp now uses libproxy, and we ship a backend which use the sysconfig implementation if you are running as root. You could replace that one for your own needs. -- Duncan Mac-Vicar P. - Novell(r) Making IT Work As One(tm) SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org

On Mon, 2011-04-18 at 17:48 +0800, Zhang, Qiang Z wrote:
Libzypp seems can't work with root, and PackageKit runs as root, so
Zypp backend can't work well with libproxy.
What? The zypp backend works *fine* with libproxy, whether you are root or not. I *think* what you're trying to say here is that you have been using a version of libproxy which was configured wrongly when you run it as root. That is nothing to do with libzypp; that's just that you have misconfigured it. If you have a libproxy that's just talking to PacRunner, everything works *fine*. -- dwmw2 -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org

On 04/18/2011 11:48 AM, Zhang, Qiang Z wrote:
Libzypp seems can't work with root, and PackageKit runs as root, so
Zypp backend can't work well with libproxy.
Thanks Xiaoqiang
Sorry, I don't understand what you just said. - libzypp does work as root (actually only as root unless you use the ReadOnlyHack) - If by ZYpp backend you mean the PackageKit zypp backend, AFAIK it also runs at root - The only thing you have to take care is that if you are using SUSE's libproxy, libzypp will use the sysconfig value when running as root. If you have your custom backends for libproxy then it will work as the backends says. Unless packagekit has its own proxy settings or something we are missing in the picture. -- Duncan Mac-Vicar P. - Novell® Making IT Work As One™ SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (5)
-
David Woodhouse
-
Duncan Mac-Vicar P.
-
Yang, Yi Y
-
Yi Yang
-
Zhang, Qiang Z