[NetworkManager-openconnect] bump to 0.9.2.0, split out david's patches to the upstream commits

Adam Williamson adamwill at fedoraproject.org
Sat Nov 12 01:15:00 UTC 2011


commit 6a59252cab540cea32c913e0c651ed234840fe06
Author: Adam Williamson <awilliam at redhat.com>
Date:   Fri Nov 11 17:14:12 2011 -0800

    bump to 0.9.2.0, split out david's patches to the upstream commits

 .gitignore                                         |    1 +
 ...ailure-include-glib.h-not-glib-gtypes.h-d.patch |    4 +-
 ...ckage.patch => 0002-Switch-to-gtk_box_new.patch |   98 +++++++-------------
 0003-Drop-g_thread_init.patch                      |   24 +++++
 ...id-premature-GCond-and-GMutex-API-breakag.patch |   52 ++++++++++
 ...e-g_thread_new-instead-of-g_thread_create.patch |   39 ++++++++
 NetworkManager-openconnect.spec                    |   25 ++++--
 sources                                            |    2 +-
 8 files changed, 169 insertions(+), 76 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0a96b42..e32505c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ NetworkManager-openconnect-0.8.1.tar.bz2
 /NetworkManager-openconnect-0.8.1.git20110326.tar.bz2
 /NetworkManager-openconnect-0.8.1.git20110418.tar.bz2
 /NetworkManager-openconnect-0.8.1.git20110419.tar.bz2
+/NetworkManager-openconnect-0.9.2.0.tar.xz
diff --git a/0001-Fix-build-failure-include-glib.h-not-glib-gtypes.h-d.patch b/0001-Fix-build-failure-include-glib.h-not-glib-gtypes.h-d.patch
index 5164823..023886f 100644
--- a/0001-Fix-build-failure-include-glib.h-not-glib-gtypes.h-d.patch
+++ b/0001-Fix-build-failure-include-glib.h-not-glib-gtypes.h-d.patch
@@ -1,7 +1,7 @@
 From ca8a39d1bb999ba98ead45e53041fc3ea28ecd5c Mon Sep 17 00:00:00 2001
 From: David Woodhouse <David.Woodhouse at intel.com>
 Date: Thu, 10 Nov 2011 23:19:32 +0000
-Subject: [PATCH] Fix build failure: include <glib.h>, not <glib/gtypes.h>
+Subject: [PATCH 1/5] Fix build failure: include <glib.h>, not <glib/gtypes.h>
  directly.
 
 ---
@@ -23,5 +23,5 @@ index e454f82..684a5b3 100644
  
  #define NM_TYPE_OPENCONNECT_PLUGIN            (nm_openconnect_plugin_get_type ())
 -- 
-1.7.7
+1.7.7.2
 
diff --git a/fix-glib-fuckage.patch b/0002-Switch-to-gtk_box_new.patch
similarity index 52%
rename from fix-glib-fuckage.patch
rename to 0002-Switch-to-gtk_box_new.patch
index abffb81..387b268 100644
--- a/fix-glib-fuckage.patch
+++ b/0002-Switch-to-gtk_box_new.patch
@@ -1,21 +1,31 @@
---- NetworkManager-openconnect-0.9.0/auth-dialog/main.c.glibfuckage	2011-08-19 21:56:01.000000000 +0100
-+++ NetworkManager-openconnect-0.9.0/auth-dialog/main.c	2011-11-11 00:57:59.968414386 +0000
-@@ -110,6 +110,12 @@ typedef struct auth_ui_data {
+From b2a5782abc44710345ad6f907b7d855d81061ee5 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse at intel.com>
+Date: Thu, 10 Nov 2011 23:52:55 +0000
+Subject: [PATCH 2/5] Switch to gtk_box_new()
+
+---
+ auth-dialog/main.c |   36 ++++++++++++++++++++++++++++++++++++
+ 1 files changed, 36 insertions(+), 0 deletions(-)
+
+diff --git a/auth-dialog/main.c b/auth-dialog/main.c
+index ecf7d77..9892a3c 100644
+--- a/auth-dialog/main.c
++++ b/auth-dialog/main.c
+@@ -134,7 +134,11 @@ static void ssl_box_add_error(auth_ui_data *ui_data, const char *msg)
+ {
+ 	GtkWidget *hbox, *text, *image;
  
- 	GCond *cert_response_changed;
- 	enum certificate_response cert_response;
-+
-+#if GLIB_CHECK_VERSION (2,31,0)
-+	/* Ick. FFS, why does glib deprecate stuff so quickly? */
-+	GCond _gconds[3];
-+	GMutex _gmutex;
++#if GTK_CHECK_VERSION(3,1,6)
++	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
++#else
+ 	hbox = gtk_hbox_new(FALSE, 8);
 +#endif
- } auth_ui_data;
+ 	gtk_box_pack_start(GTK_BOX(ui_data->ssl_box), hbox, FALSE, FALSE, 0);
  
- enum {
-@@ -136,7 +142,11 @@ static void ssl_box_add_error(auth_ui_da
+ 	image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_ERROR,
+@@ -151,7 +155,11 @@ static void ssl_box_add_notice(auth_ui_data *ui_data, const char *msg)
+ {
  	GtkWidget *hbox, *text, *image;
- 	int width;
  
 +#if GTK_CHECK_VERSION(3,1,6)
 +	hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
@@ -24,8 +34,8 @@
 +#endif
  	gtk_box_pack_start(GTK_BOX(ui_data->ssl_box), hbox, FALSE, FALSE, 0);
  
- 	image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_ERROR,
-@@ -276,7 +286,11 @@ static gboolean ui_write_prompt (ui_frag
+ 	image = gtk_image_new_from_stock(GTK_STOCK_DIALOG_WARNING,
+@@ -291,7 +299,11 @@ static gboolean ui_write_prompt (ui_fragment_data *data)
  		visible = (data->opt->type == OC_FORM_OPT_TEXT);
  	}
  
@@ -37,7 +47,7 @@
  	gtk_box_pack_start(GTK_BOX(data->ui_data->ssl_box), hbox, FALSE, FALSE, 0);
  
  	text = gtk_label_new(label);
-@@ -308,7 +322,11 @@ static gboolean ui_add_select (ui_fragme
+@@ -323,7 +335,11 @@ static gboolean ui_add_select (ui_fragment_data *data)
  	struct oc_form_opt_select *sopt = (void *)data->opt;
  	int i;
  
@@ -49,20 +59,7 @@
  	gtk_box_pack_start(GTK_BOX(data->ui_data->ssl_box), hbox, FALSE, FALSE, 0);
  
  	text = gtk_label_new(data->opt->label);
-@@ -1125,8 +1143,12 @@ static void connect_host(auth_ui_data *u
- 	g_hash_table_insert (ui_data->success_secrets, g_strdup("lasthost"),
- 			     g_strdup(host->hostname));
- 
-+#if GLIB_CHECK_VERSION(2,31,0)
-+	thread = g_thread_new("obtain_cookie", (GThreadFunc)obtain_cookie, ui_data);
-+#else
- 	thread = g_thread_create((GThreadFunc)obtain_cookie, ui_data,
- 				 FALSE, NULL);
-+#endif
- 	(void)thread;
- }
- 
-@@ -1197,12 +1219,20 @@ static void build_main_dialog(auth_ui_da
+@@ -1219,12 +1235,20 @@ static void build_main_dialog(auth_ui_data *ui_data)
  				 G_CALLBACK(gtk_main_quit), NULL);
  	g_free(title);
  
@@ -83,7 +80,7 @@
  	gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0);
  	gtk_widget_show(hbox);
  
-@@ -1238,7 +1268,11 @@ static void build_main_dialog(auth_ui_da
+@@ -1260,7 +1284,11 @@ static void build_main_dialog(auth_ui_data *ui_data)
  	gtk_widget_set_size_request(frame, -1, -1);
  	gtk_widget_show(frame);
  
@@ -95,7 +92,7 @@
  	gtk_container_set_border_width(GTK_CONTAINER(frame_box), 8);
  	gtk_container_add(GTK_CONTAINER(frame), frame_box);
  	gtk_widget_show(frame_box);
-@@ -1252,11 +1286,19 @@ static void build_main_dialog(auth_ui_da
+@@ -1274,11 +1302,19 @@ static void build_main_dialog(auth_ui_data *ui_data)
  	gtk_widget_set_sensitive(ui_data->getting_form_label, FALSE);
  	gtk_box_pack_start(GTK_BOX(frame_box), ui_data->getting_form_label, FALSE, FALSE, 0);
  
@@ -115,35 +112,6 @@
  	gtk_box_pack_end(GTK_BOX(frame_box), hbox, FALSE, FALSE, 0);
  	gtk_widget_show(hbox);
  
-@@ -1307,10 +1349,21 @@ static auth_ui_data *init_ui_data (char
- 	ui_data->retval = 1;
- 
- 	ui_data->form_entries = g_queue_new();
-+#if GLIB_CHECK_VERSION(2,31,0)
-+	ui_data->form_mutex = &ui_data->_gmutex;
-+	ui_data->form_retval_changed = &ui_data->_gconds[0];
-+	ui_data->form_shown_changed = &ui_data->_gconds[1];
-+	ui_data->cert_response_changed = &ui_data->_gconds[2];
-+	g_mutex_init(ui_data->form_mutex);
-+	g_cond_init(ui_data->form_retval_changed);
-+	g_cond_init(ui_data->form_shown_changed);
-+	g_cond_init(ui_data->cert_response_changed);
-+#else
- 	ui_data->form_mutex = g_mutex_new();
- 	ui_data->form_retval_changed = g_cond_new();
- 	ui_data->form_shown_changed = g_cond_new();
- 	ui_data->cert_response_changed = g_cond_new();
-+#endif
- 	ui_data->vpn_name = vpn_name;
- 	ui_data->options = options;
- 	ui_data->secrets = secrets;
-@@ -1402,7 +1455,9 @@ int main (int argc, char **argv)
- 		return 1;
- 	}
- 
-+#if !GLIB_CHECK_VERSION(2,31,0)
- 	g_thread_init (NULL);
-+#endif
- 	gtk_init(0, NULL);
- 
- 	_ui_data = init_ui_data(vpn_name, options, secrets);
+-- 
+1.7.7.2
+
diff --git a/0003-Drop-g_thread_init.patch b/0003-Drop-g_thread_init.patch
new file mode 100644
index 0000000..89d301c
--- /dev/null
+++ b/0003-Drop-g_thread_init.patch
@@ -0,0 +1,24 @@
+From c6d92c3e64898ea62789def04b86752dec904326 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse at intel.com>
+Date: Thu, 10 Nov 2011 23:53:58 +0000
+Subject: [PATCH 3/5] Drop g_thread_init()
+
+---
+ auth-dialog/main.c |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/auth-dialog/main.c b/auth-dialog/main.c
+index 9892a3c..1a09c2f 100644
+--- a/auth-dialog/main.c
++++ b/auth-dialog/main.c
+@@ -1460,7 +1460,6 @@ int main (int argc, char **argv)
+ 		return 1;
+ 	}
+ 
+-	g_thread_init (NULL);
+ 	gtk_init(0, NULL);
+ 
+ 	_ui_data = init_ui_data(vpn_name, options, secrets);
+-- 
+1.7.7.2
+
diff --git a/0004-Handle-stupid-premature-GCond-and-GMutex-API-breakag.patch b/0004-Handle-stupid-premature-GCond-and-GMutex-API-breakag.patch
new file mode 100644
index 0000000..f290d2f
--- /dev/null
+++ b/0004-Handle-stupid-premature-GCond-and-GMutex-API-breakag.patch
@@ -0,0 +1,52 @@
+From 50af1fcf4fdb34b45799bbaa07be68b8adc8007b Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse at intel.com>
+Date: Fri, 11 Nov 2011 00:23:38 +0000
+Subject: [PATCH 4/5] Handle stupid premature GCond and GMutex API breakage
+
+Gr.
+---
+ auth-dialog/main.c |   17 +++++++++++++++++
+ 1 files changed, 17 insertions(+), 0 deletions(-)
+
+diff --git a/auth-dialog/main.c b/auth-dialog/main.c
+index 1a09c2f..0b5b5d1 100644
+--- a/auth-dialog/main.c
++++ b/auth-dialog/main.c
+@@ -109,6 +109,12 @@ typedef struct auth_ui_data {
+ 
+ 	GCond *cert_response_changed;
+ 	enum certificate_response cert_response;
++
++#if GLIB_CHECK_VERSION (2,31,0)
++	/* Ick. FFS, why does glib deprecate stuff so quickly? */
++	GCond _gconds[3];
++	GMutex _gmutex;
++#endif
+ } auth_ui_data;
+ 
+ enum {
+@@ -1365,10 +1371,21 @@ static auth_ui_data *init_ui_data (char *vpn_name, GHashTable *options, GHashTab
+ 	ui_data->retval = 1;
+ 
+ 	ui_data->form_entries = g_queue_new();
++#if GLIB_CHECK_VERSION(2,31,0)
++	ui_data->form_mutex = &ui_data->_gmutex;
++	ui_data->form_retval_changed = &ui_data->_gconds[0];
++	ui_data->form_shown_changed = &ui_data->_gconds[1];
++	ui_data->cert_response_changed = &ui_data->_gconds[2];
++	g_mutex_init(ui_data->form_mutex);
++	g_cond_init(ui_data->form_retval_changed);
++	g_cond_init(ui_data->form_shown_changed);
++	g_cond_init(ui_data->cert_response_changed);
++#else
+ 	ui_data->form_mutex = g_mutex_new();
+ 	ui_data->form_retval_changed = g_cond_new();
+ 	ui_data->form_shown_changed = g_cond_new();
+ 	ui_data->cert_response_changed = g_cond_new();
++#endif
+ 	ui_data->vpn_name = vpn_name;
+ 	ui_data->options = options;
+ 	ui_data->secrets = secrets;
+-- 
+1.7.7.2
+
diff --git a/0005-Use-g_thread_new-instead-of-g_thread_create.patch b/0005-Use-g_thread_new-instead-of-g_thread_create.patch
new file mode 100644
index 0000000..bf1ff43
--- /dev/null
+++ b/0005-Use-g_thread_new-instead-of-g_thread_create.patch
@@ -0,0 +1,39 @@
+From e95980d9a4b96ac72c20740a35f411ceaca61312 Mon Sep 17 00:00:00 2001
+From: David Woodhouse <David.Woodhouse at intel.com>
+Date: Fri, 11 Nov 2011 01:00:32 +0000
+Subject: [PATCH 5/5] Use g_thread_new() instead of g_thread_create()
+
+---
+ auth-dialog/main.c |    7 +++++++
+ 1 files changed, 7 insertions(+), 0 deletions(-)
+
+diff --git a/auth-dialog/main.c b/auth-dialog/main.c
+index 0b5b5d1..83e42eb 100644
+--- a/auth-dialog/main.c
++++ b/auth-dialog/main.c
+@@ -1169,8 +1169,12 @@ static void connect_host(auth_ui_data *ui_data)
+ 	g_hash_table_insert (ui_data->success_secrets, g_strdup("lasthost"),
+ 			     g_strdup(host->hostname));
+ 
++#if GLIB_CHECK_VERSION(2,31,0)
++	thread = g_thread_new("obtain_cookie", (GThreadFunc)obtain_cookie, ui_data);
++#else
+ 	thread = g_thread_create((GThreadFunc)obtain_cookie, ui_data,
+ 				 FALSE, NULL);
++#endif
+ 	(void)thread;
+ }
+ 
+@@ -1477,6 +1481,9 @@ int main (int argc, char **argv)
+ 		return 1;
+ 	}
+ 
++#if !GLIB_CHECK_VERSION(2,31,0)
++	g_thread_init (NULL);
++#endif
+ 	gtk_init(0, NULL);
+ 
+ 	_ui_data = init_ui_data(vpn_name, options, secrets);
+-- 
+1.7.7.2
+
diff --git a/NetworkManager-openconnect.spec b/NetworkManager-openconnect.spec
index a8a5115..79d84cd 100644
--- a/NetworkManager-openconnect.spec
+++ b/NetworkManager-openconnect.spec
@@ -1,22 +1,25 @@
-%define nm_version          1:0.8.998
+%define nm_version          1:0.9.2
 %define dbus_version        1.1
 %define gtk3_version        3.0.0
 %define openconnect_version 3.00
 
 %define snapshot %{nil}
-%define realversion 0.9.0
+%define realversion 0.9.2.0
 
 Summary:   NetworkManager VPN integration for openconnect
 Name:      NetworkManager-openconnect
-Version:   0.9.0
-Release:   5%{snapshot}%{?dist}
+Version:   0.9.2.0
+Release:   1%{snapshot}%{?dist}
 License:   GPLv2+, LGPLv2.1
 Group:     System Environment/Base
 URL:       http://www.gnome.org/projects/NetworkManager/
-Source:    %{name}-%{realversion}%{snapshot}.tar.bz2
-Patch0:    0001-Look-for-openconnect-binary-in-usr-sbin-too.patch
+Source:    ftp://ftp.gnome.org/pub/GNOME/sources/NetworkManager-openconnect/0.9/%{name}-%{realversion}%{snapshot}.tar.xz
+# all from David Woodhouse, upstream: fix for glib/GTK+ deprecations
 Patch1:    0001-Fix-build-failure-include-glib.h-not-glib-gtypes.h-d.patch
-Patch2:    fix-glib-fuckage.patch
+Patch2:    0002-Switch-to-gtk_box_new.patch
+Patch3:    0003-Drop-g_thread_init.patch
+Patch4:    0004-Handle-stupid-premature-GCond-and-GMutex-API-breakag.patch
+Patch5:    0005-Use-g_thread_new-instead-of-g_thread_create.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 
@@ -48,9 +51,11 @@ with NetworkManager and the GNOME desktop
 
 %prep
 %setup -q -n NetworkManager-openconnect-%{realversion}
-%patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %build
 autoreconf
@@ -107,6 +112,10 @@ fi
 %{_datadir}/gnome-vpn-properties/openconnect/nm-openconnect-dialog.ui
 
 %changelog
+* Thu Nov 10 2011 Adam Williamson <awilliam at redhat.com> - 0.9.2.0-1
+- bump to 0.9.2.0
+- pull david's patches properly from upstream
+
 * Tue Nov 08 2011 David Woodhouse <David.Woodhouse at intel.com> - 0.9.0-5
 - Deal with stupid premature glib API breakage.
 
diff --git a/sources b/sources
index 2e40b29..468069f 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-22afdb05b327842d885fd72df78e8dbc  NetworkManager-openconnect-0.9.0.tar.bz2
+0648741b560dedfa5ffe1b974d16007f  NetworkManager-openconnect-0.9.2.0.tar.xz


More information about the scm-commits mailing list