This change has been reverted with critical issue of 15949 Peter
> -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of Zhang Qiang > Sent: Tuesday, April 12, 2011 5:14 PM > To: [email protected] > Subject: [meego-commits] 16080: Changes to Trunk:Testing/PackageKit > > Hi, > I have made the following changes to PackageKit in project Trunk:Testing. > Please review and accept ASAP. > > Thank You, > Zhang Qiang > > [This message was auto-generated] > > --- > > Request #16080: > > submit: devel:packagemanagement/PackageKit(r100) -> > Trunk:Testing/PackageKit > > > Message: > backport an upstream patch 0026-no_proxy-support.patch to adds the > proxy_https, proxy_socks, no_proxy and pac attributes to the DBus method. It > breaks DBus interface API, but is careful to maintain packagekit-glib and > packagekit-qt API and ABI compatibility. fix BMC#15670 Add > 0027-zypp-enable-no_proxy-support.patch to enable no_proxy for pkcon > command and zypp backend. fix BMC#15670, BMC#15746 > > State: new 2011-04-12T02:13:24 xiaoqiang > Comment: None > > > > changes files: > -------------- > --- PackageKit.changes > +++ PackageKit.changes > @@ -0,0 +1,8 @@ > +* Fri Apr 8 2011 Zhang Qiang<[email protected]> - 0.6.11 > +- backport an upstream patch 0026-no_proxy-support.patch to > + adds the proxy_https, proxy_socks, no_proxy and pac attributes to the > + DBus method. It breaks DBus interface API, but is careful to maintain > + packagekit-glib and packagekit-qt API and ABI compatibility. fix BMC#15670 > +- Add 0027-zypp-enable-no_proxy-support.patch to enable no_proxy > + for pkcon command and zypp backend. fix BMC#15670,BMC#15746 > + > > new: > ---- > 0026-no_proxy-support.patch > 0027-zypp-enable-no_proxy-support.patch > > spec files: > ----------- > --- PackageKit.spec > +++ PackageKit.spec > @@ -38,6 +38,8 @@ > Patch23: 0023-Add-repo-validation-check.patch > Patch24: 0024-untrust-packages-install-support.patch > Patch25: 0025-zypp-reload-rpmdb-when-removing-packages.patch > +Patch26: 0026-no_proxy-support.patch > +Patch27: 0027-zypp-enable-no_proxy-support.patch > > Requires: PackageKit-zypp = %{version}-%{release} > Requires: shared-mime-info > @@ -282,6 +284,8 @@ > %patch23 -p1 > %patch24 -p1 > %patch25 -p1 > +%patch26 -p1 > +%patch27 -p1 > > %build > %configure \ > > other changes: > -------------- > > ++++++ 0026-no_proxy-support.patch (new) > --- 0026-no_proxy-support.patch > +++ 0026-no_proxy-support.patch > +diff -uNr PackageKit-0.6.11/etc/PackageKit.conf.in > PackageKit-0.6.11.new/etc/PackageKit.conf.in > +--- PackageKit-0.6.11/etc/PackageKit.conf.in 2011-04-12 > 15:53:43.687394354 +0800 > ++++ PackageKit-0.6.11.new/etc/PackageKit.conf.in 2011-04-08 > 11:17:23.128973499 +0800 > +@@ -109,7 +109,11 @@ > + # They are in the format username:password@server:port > + # > + # ProxyHTTP=username:[email protected]:8080 > ++# ProxyHTTPS=username:[email protected]:8080 > + # ProxyFTP=server.lan:21 > ++# ProxySOCKS=server.lan:21 > ++# NoProxy=internal.webserver > ++# PAC=/etc/proxy.pac > + > + # Scan installed desktop files when we update or install packages > + # > +diff -uNr PackageKit-0.6.11/lib/packagekit-glib2/pk-control.c > PackageKit-0.6.11.new/lib/packagekit-glib2/pk-control.c > +--- PackageKit-0.6.11/lib/packagekit-glib2/pk-control.c 2011-04-12 > 15:53:43.688394176 +0800 > ++++ PackageKit-0.6.11.new/lib/packagekit-glib2/pk-control.c 2011-04-08 > 11:17:23.160581699 +0800 > +@@ -723,21 +723,33 @@ > + } > + > + /** > +- * pk_control_set_proxy_async: > ++ * pk_control_set_proxy2_async: > + * @control: a valid #PkControl instance > +- * @proxy_http: a HTTP proxy string such as > "username:[email protected]:8080" > +- * @proxy_ftp: a FTP proxy string such as "server.lan:8080" > ++ * @proxy_http: a HTTP proxy string such as > "username:[email protected]:8080", or %NULL > ++ * @proxy_https: a HTTPS proxy string such as > "username:[email protected]:8080", or %NULL > ++ * @proxy_ftp: a FTP proxy string such as "server.lan:8080", or %NULL > ++ * @proxy_socks: a SOCKS proxy string such as "server.lan:8080", or %NULL > ++ * @no_proxy: a list of download IPs that shouldn't go through the proxy, > or %NULL > ++ * @pac: a PAC string, or %NULL > + * @cancellable: a #GCancellable or %NULL > + * @callback: the function to run on completion > + * @user_data: the data to pass to @callback > + * > + * Set a proxy on the PK daemon > + * > +- * Since: 0.5.2 > ++ * Since: 0.6.13 > + **/ > + void > +-pk_control_set_proxy_async (PkControl *control, const gchar *proxy_http, > const gchar *proxy_ftp, GCancellable *cancellable, > +- GAsyncReadyCallback callback, gpointer user_data) > ++pk_control_set_proxy2_async (PkControl *control, > ++ const gchar *proxy_http, > ++ const gchar *proxy_https, > ++ const gchar *proxy_ftp, > ++ const gchar *proxy_socks, > ++ const gchar *no_proxy, > ++ const gchar *pac, > ++ GCancellable *cancellable, > ++ GAsyncReadyCallback callback, > ++ gpointer user_data) > + { > + GSimpleAsyncResult *res; > + PkControlState *state; > +@@ -769,7 +781,11 @@ > + state->call = dbus_g_proxy_begin_call (control->priv->proxy, "SetProxy", > + (DBusGProxyCallNotify) > pk_control_set_proxy_cb, state, NULL, > + G_TYPE_STRING, proxy_http, > ++ G_TYPE_STRING, proxy_https, > + G_TYPE_STRING, proxy_ftp, > ++ G_TYPE_STRING, proxy_socks, > ++ G_TYPE_STRING, no_proxy, > ++ G_TYPE_STRING, pac, > + G_TYPE_INVALID); > + if (state->call == NULL) > + g_error ("failed to setup call, maybe OOM or no connection"); > +@@ -782,6 +798,42 @@ > + } > + > + /** > ++ * pk_control_set_proxy_async: > ++ * @control: a valid #PkControl instance > ++ * @proxy_http: a HTTP proxy string such as > "username:[email protected]:8080" > ++ * @proxy_ftp: a FTP proxy string such as "server.lan:8080" > ++ * @cancellable: a #GCancellable or %NULL > ++ * @callback: the function to run on completion > ++ * @user_data: the data to pass to @callback > ++ * > ++ * Set a proxy on the PK daemon > ++ * > ++ * NOTE: This is just provided for backwards compatibility. > ++ * Clients should really be using pk_control_set_proxy2_async(). > ++ * > ++ * Since: 0.5.2 > ++ **/ > ++void > ++pk_control_set_proxy_async (PkControl *control, > ++ const gchar *proxy_http, > ++ const gchar *proxy_ftp, > ++ GCancellable *cancellable, > ++ GAsyncReadyCallback callback, > ++ gpointer user_data) > ++{ > ++ pk_control_set_proxy2_async (control, > ++ proxy_http, > ++ NULL, > ++ proxy_ftp, > ++ NULL, > ++ NULL, > ++ NULL, > ++ cancellable, > ++ callback, > ++ user_data); > ++} > ++ > ++/** > + * pk_control_set_proxy_finish: > + * @control: a valid #PkControl instance > + * @res: the #GAsyncResult > +diff -uNr PackageKit-0.6.11/lib/packagekit-glib2/pk-control.h > PackageKit-0.6.11.new/lib/packagekit-glib2/pk-control.h > +--- PackageKit-0.6.11/lib/packagekit-glib2/pk-control.h 2011-04-12 > 15:53:43.689394170 +0800 > ++++ PackageKit-0.6.11.new/lib/packagekit-glib2/pk-control.h 2011-04-08 > 11:17:23.161582207 +0800 > +@@ -119,6 +119,16 @@ > + GCancellable > *cancellable, > + GAsyncReadyCallback > callback, > + gpointer > user_data); > ++void pk_control_set_proxy2_async (PkControl > *control, > ++ const gchar > *proxy_http, > ++ const gchar > *proxy_https, > ++ const gchar > *proxy_ftp, > ++ const gchar > *proxy_socks, > ++ const gchar > *no_proxy, > ++ const gchar > *pac, > ++ GCancellable > *cancellable, > ++ GAsyncReadyCallback > callback, > ++ gpointer > user_data); > + gboolean pk_control_set_proxy_finish (PkControl > *control, > + GAsyncResult > *res, > + GError > **error); > +diff -uNr PackageKit-0.6.11/lib/packagekit-glib2/pk-control-sync.c > PackageKit-0.6.11.new/lib/packagekit-glib2/pk-control-sync.c > +--- PackageKit-0.6.11/lib/packagekit-glib2/pk-control-sync.c 2011-04-12 > 15:53:43.690393888 +0800 > ++++ PackageKit-0.6.11.new/lib/packagekit-glib2/pk-control-sync.c > 2011-04-08 11:17:23.129519045 +0800 > +@@ -259,7 +259,7 @@ > + } > + > + /** > +- * pk_control_set_proxy: > ++ * pk_control_set_proxy2: > + * @control: a valid #PkControl instance > + * @proxy_http: the HTTP proxy server > + * @proxy_ftp: the FTP proxy server > +@@ -272,10 +272,18 @@ > + * > + * Return value: %TRUE if the proxy was set correctly > + * > +- * Since: 0.6.3 > ++ * Since: 0.6.13 > + **/ > + gboolean > +-pk_control_set_proxy (PkControl *control, const gchar *proxy_http, const > gchar *proxy_ftp, GCancellable *cancellable, GError **error) > ++pk_control_set_proxy2 (PkControl *control, > ++ const gchar *proxy_http, > ++ const gchar *proxy_https, > ++ const gchar *proxy_ftp, > ++ const gchar *proxy_socks, > ++ const gchar *no_proxy, > ++ const gchar *pac, > ++ GCancellable *cancellable, > ++ GError **error) > + { > + gboolean ret; > + PkControlHelper *helper; > +@@ -289,8 +297,16 @@ > + helper->error = error; > + > + /* run async method */ > +- pk_control_set_proxy_async (control, proxy_http, proxy_ftp, > +- cancellable, (GAsyncReadyCallback) > pk_control_set_proxy_cb, helper); > ++ pk_control_set_proxy2_async (control, > ++ proxy_http, > ++ proxy_https, > ++ proxy_ftp, > ++ proxy_socks, > ++ no_proxy, > ++ pac, > ++ cancellable, > ++ (GAsyncReadyCallback) > pk_control_set_proxy_cb, > ++ helper); > + g_main_loop_run (helper->loop); > + > + ret = helper->ret; > +@@ -302,3 +318,40 @@ > + return ret; > + } > + > ++ > ++/** > ++ * pk_control_set_proxy: > ++ * @control: a valid #PkControl instance > ++ * @proxy_http: the HTTP proxy server > ++ * @proxy_ftp: the FTP proxy server > ++ * @cancellable: a #GCancellable or %NULL > ++ * @error: A #GError or %NULL > ++ * > (1117 more lines skipped) > > ++++++ 0027-zypp-enable-no_proxy-support.patch (new) > --- 0027-zypp-enable-no_proxy-support.patch > +++ 0027-zypp-enable-no_proxy-support.patch > +diff -uNr PackageKit-0.6.11/backends/zypp/pk-backend-zypp.cpp > PackageKit-0.6.11.new/backends/zypp/pk-backend-zypp.cpp > +--- PackageKit-0.6.11/backends/zypp/pk-backend-zypp.cpp 2011-04-08 > 11:21:43.809394045 +0800 > ++++ PackageKit-0.6.11.new/backends/zypp/pk-backend-zypp.cpp > 2011-04-08 15:05:36.403581507 +0800 > +@@ -2242,8 +2242,12 @@ > + pk_backend_transaction_start (PkBackend *backend) > + { > + gchar *proxy_http; > ++ gchar *proxy_https; > + gchar *proxy_ftp; > + gchar *uri; > ++ gchar *proxy_socks; > ++ gchar *no_proxy; > ++ gchar *pac; > + > + /* http_proxy */ > + proxy_http = pk_backend_get_proxy_http (backend); > +@@ -2253,6 +2257,14 @@ > + g_free (uri); > + } > + > ++ /* https_proxy */ > ++ proxy_https = pk_backend_get_proxy_https (backend); > ++ if (!egg_strzero (proxy_https)) { > ++ uri = pk_backend_spawn_convert_uri (proxy_https); > ++ g_setenv ("https_proxy", uri, TRUE); > ++ g_free (uri); > ++ } > ++ > + /* ftp_proxy */ > + proxy_ftp = pk_backend_get_proxy_ftp (backend); > + if (!egg_strzero (proxy_ftp)) { > +@@ -2261,8 +2273,34 @@ > + g_free (uri); > + } > + > ++ /* socks_proxy */ > ++ proxy_socks = pk_backend_get_proxy_socks (backend); > ++ if (!egg_strzero (proxy_socks)) { > ++ uri = pk_backend_spawn_convert_uri (proxy_socks); > ++ g_setenv ("socks_proxy", uri, TRUE); > ++ g_free (uri); > ++ } > ++ > ++ /* no_proxy */ > ++ no_proxy = pk_backend_get_no_proxy (backend); > ++ if (!egg_strzero (no_proxy)) { > ++ g_setenv ("no_proxy", no_proxy, TRUE); > ++ } > ++ > ++ /* pac */ > ++ pac = pk_backend_get_pac (backend); > ++ if (!egg_strzero (pac)) { > ++ uri = pk_backend_spawn_convert_uri (pac); > ++ g_setenv ("pac", uri, TRUE); > ++ g_free (uri); > ++ } > ++ > + g_free (proxy_http); > ++ g_free (proxy_https); > + g_free (proxy_ftp); > ++ g_free (proxy_socks); > ++ g_free (no_proxy); > ++ g_free (pac); > + } > + > + /** > +@@ -2274,6 +2312,10 @@ > + /* unset proxy info for this transaction */ > + g_unsetenv ("http_proxy"); > + g_unsetenv ("ftp_proxy"); > ++ g_unsetenv ("https_proxy"); > ++ g_unsetenv ("no_proxy"); > ++ g_unsetenv ("socks_proxy"); > ++ g_unsetenv ("pac"); > + } > + > + > +diff -uNr PackageKit-0.6.11/client/pk-console.c > PackageKit-0.6.11.new/client/pk-console.c > +--- PackageKit-0.6.11/client/pk-console.c 2011-03-25 10:33:38.062456479 > +0800 > ++++ PackageKit-0.6.11.new/client/pk-console.c 2011-04-08 > 14:04:40.256581340 +0800 > +@@ -1281,7 +1281,11 @@ > + gchar *summary = NULL; > + const gchar *mode; > + const gchar *http_proxy; > ++ const gchar *https_proxy; > + const gchar *ftp_proxy; > ++ const gchar *socks_proxy; > ++ const gchar *no_proxy; > ++ const gchar *pac; > + const gchar *value = NULL; > + const gchar *details = NULL; > + const gchar *parameter = NULL; > +@@ -1403,10 +1407,14 @@ > + > + /* set the proxy */ > + http_proxy = g_getenv ("http_proxy"); > ++ https_proxy = g_getenv ("https_proxy"); > ++ no_proxy = g_getenv ("no_proxy"); > ++ socks_proxy = g_getenv ("socks_proxy"); > + ftp_proxy = g_getenv ("ftp_proxy"); > ++ pac = g_getenv ("pac"); > + if (http_proxy != NULL || > + ftp_proxy != NULL) { > +- ret = pk_control_set_proxy (control, http_proxy, ftp_proxy, > NULL, > &error_local); > ++ ret = pk_control_set_proxy2 (control, http_proxy, https_proxy, > ftp_proxy, socks_proxy, no_proxy, pac, NULL, &error_local); > + if (!ret) { > + /* TRANSLATORS: The user specified an incorrect filter > */ > + error = g_error_new (1, 0, "%s: %s", _("The proxy could > not be > set"), error_local->message); > > _______________________________________________ > MeeGo-commits mailing list > [email protected] > http://lists.meego.com/listinfo/meego-commits _______________________________________________ MeeGo-packaging mailing list [email protected] http://lists.meego.com/listinfo/meego-packaging
