From af4a053787bd672e3923a5661fb53334ffc0e89c Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Oct 23 2015 10:00:10 +0000 Subject: Add the NetworkManager 1.2 support patchset --- diff --git a/0001-nm-set-full-path-to-the-connection-editor-plugin.patch b/0001-nm-set-full-path-to-the-connection-editor-plugin.patch new file mode 100644 index 0000000..5cffcb1 --- /dev/null +++ b/0001-nm-set-full-path-to-the-connection-editor-plugin.patch @@ -0,0 +1,35 @@ +From 27dd4b8a2ef3f1fd72f70865084bb2d18a279af3 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 21 Oct 2015 12:45:50 +0200 +Subject: [PATCH 01/10] nm: set full path to the connection editor plugin + +--- + Makefile.am | 1 + + nm-strongswan-service.name.in | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 1184711..2864eb2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -13,6 +13,7 @@ nmvpnservice_DATA = nm-strongswan-service.name + nm-strongswan-service.name: $(srcdir)/nm-strongswan-service.name.in + $(AM_V_GEN) \ + sed -e 's|[@]LIBEXECDIR[@]|$(libexecdir)|' \ ++ -e 's|[@]PLUGINDIR[@]|$(libdir)/NetworkManager|g' \ + -e 's|[@]CHARON[@]|$(charon)|' $< >$@ + + EXTRA_DIST = nm-strongswan-service.name.in \ +diff --git a/nm-strongswan-service.name.in b/nm-strongswan-service.name.in +index 4120e55..ca45ff2 100644 +--- a/nm-strongswan-service.name.in ++++ b/nm-strongswan-service.name.in +@@ -5,4 +5,4 @@ program=@CHARON@ + + [GNOME] + auth-dialog=@LIBEXECDIR@/nm-strongswan-auth-dialog +-properties=libnm-strongswan-properties ++properties=@PLUGINDIR@/libnm-strongswan-properties +-- +2.4.3 + diff --git a/0002-nm-drop-some-unneeded-dependencies.patch b/0002-nm-drop-some-unneeded-dependencies.patch new file mode 100644 index 0000000..5e609ca --- /dev/null +++ b/0002-nm-drop-some-unneeded-dependencies.patch @@ -0,0 +1,44 @@ +From 078d2fe10b6f5eb634e302b9c341106b910cdba3 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 21 Oct 2015 12:35:59 +0200 +Subject: [PATCH 02/10] nm: drop some unneeded dependencies + +--- + auth-dialog/Makefile.am | 1 - + configure.ac | 8 -------- + 2 files changed, 9 deletions(-) + +diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am +index c91c624..6d3b3d6 100644 +--- a/auth-dialog/Makefile.am ++++ b/auth-dialog/Makefile.am +@@ -1,7 +1,6 @@ + libexec_PROGRAMS = nm-strongswan-auth-dialog + + nm_strongswan_auth_dialog_CPPFLAGS = \ +- $(GTHREAD_CFLAGS) \ + $(GTK_CFLAGS) \ + $(LIBGNOMEUI_CFLAGS) \ + $(GNOMEKEYRING_CFLAGS) \ +diff --git a/configure.ac b/configure.ac +index 047772d..370d555 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -42,14 +42,6 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) + IT_PROG_INTLTOOL([0.35]) + AM_GLIB_GNU_GETTEXT + +-PKG_CHECK_MODULES(GTHREAD, gthread-2.0) +-AC_SUBST(GTHREAD_CFLAGS) +-AC_SUBST(GTHREAD_LIBS) +- +-PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.30) +-AC_SUBST(DBUS_CFLAGS) +-AC_SUBST(DBUS_LIBS) +- + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6) + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) +-- +2.4.3 + diff --git a/0003-nm-drop-useless-calls-to-AC_SUBST.patch b/0003-nm-drop-useless-calls-to-AC_SUBST.patch new file mode 100644 index 0000000..9ce3bb1 --- /dev/null +++ b/0003-nm-drop-useless-calls-to-AC_SUBST.patch @@ -0,0 +1,41 @@ +From 94410692a4ce9120cbc98600cbb8fd090aee72d9 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 21 Oct 2015 10:54:18 +0200 +Subject: [PATCH 03/10] nm: drop useless calls to AC_SUBST + +PKG_CHECK_MODULES does the substitutions. +--- + configure.ac | 11 ----------- + 1 file changed, 11 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 370d555..71fcbf2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,23 +43,12 @@ IT_PROG_INTLTOOL([0.35]) + AM_GLIB_GNU_GETTEXT + + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6) +-AC_SUBST(GTK_CFLAGS) +-AC_SUBST(GTK_LIBS) +- + PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0) +-AC_SUBST(LIBGNOMEUI_CFLAGS) +-AC_SUBST(LIBGNOMEUI_LIBS) +- + PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1) +-AC_SUBST(GNOMEKEYRING_CFLAGS) +-AC_SUBST(GNOMEKEYRING_LIBS) +- + PKG_CHECK_EXISTS([libnm-glib], + [PKG_CHECK_MODULES(NM_UTILS, NetworkManager >= 0.9.0 libnm-util libnm-glib libnm-glib-vpn)], + [PKG_CHECK_MODULES(NM_UTILS, NetworkManager >= 0.9.0 libnm-util libnm_glib libnm_glib_vpn)] + ) +-AC_SUBST(NM_UTILS_CFLAGS) +-AC_SUBST(NM_UTILS_LIBS) + + AC_ARG_WITH( + [charon], +-- +2.4.3 + diff --git a/0004-nm-split-the-plugin-into-two-halves.patch b/0004-nm-split-the-plugin-into-two-halves.patch new file mode 100644 index 0000000..560abe1 --- /dev/null +++ b/0004-nm-split-the-plugin-into-two-halves.patch @@ -0,0 +1,85 @@ +From adfd0573a1d63272277e688dbd42f93fc56596ff Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 21 Oct 2015 10:36:54 +0200 +Subject: [PATCH 04/10] nm: split the plugin into two halves + +They're both the same now. We'll port the new one to libnm in follow-up commits. + +NetworkManager 1.2 (which is currently versioned as 1.1.0) is going to bring +some new ABI while still supporting the old one. There's new VPN service and UI +plugin APIs in libnm. + +There's one difficulty though -- the connection editor 1.2 will be linked +against libnm and a new libnma library it will provide (as opposed to +libnm-glib and libnm-gtk), thus will be incapable of loading of property +plugins that are linked with the old libraries (due to glib type system +limitations). + +However, we must not break support for other connection editors (GNOME control +center, older versions of nm-connection-editor, etc.) therefore we need +to build two versions of the property plugin. NetworkManager 1.2's libnm will +provide a shim that makes it easy. +--- + properties/Makefile.am | 34 ++++++++++++++++++++++++++-------- + 1 file changed, 26 insertions(+), 8 deletions(-) + +diff --git a/properties/Makefile.am b/properties/Makefile.am +index 1b7fbb9..8233ccb 100644 +--- a/properties/Makefile.am ++++ b/properties/Makefile.am +@@ -1,26 +1,44 @@ + plugindir = $(libdir)/NetworkManager +-plugin_LTLIBRARIES = libnm-strongswan-properties.la ++plugin_LTLIBRARIES = libnm-vpn-plugin-strongswan.la ++plugin_LTLIBRARIES += libnm-strongswan-properties.la + +-libnm_strongswan_properties_la_SOURCES = \ ++libnm_vpn_plugin_strongswan_la_SOURCES = \ + nm-strongswan.c \ + nm-strongswan.h + ++libnm_strongswan_properties_la_SOURCES = \ ++ $(libnm_vpn_plugin_strongswan_la_SOURCES) ++ + uidir = $(datadir)/gnome-vpn-properties/strongswan + ui_DATA = nm-strongswan-dialog.ui + +-libnm_strongswan_properties_la_CFLAGS = \ ++common_CFLAGS = \ + $(GTK_CFLAGS) \ +- $(NM_UTILS_CFLAGS) \ + -DUIDIR=\""$(uidir)"\" \ + -DG_DISABLE_DEPRECATED \ +- -DGDK_DISABLE_DEPRECATED \ +- -DVERSION=\"$(VERSION)\" ++ -DGDK_DISABLE_DEPRECATED ++ ++libnm_vpn_plugin_strongswan_la_CFLAGS = \ ++ $(NM_UTILS_CFLAGS) \ ++ $(common_CFLAGS) + +-libnm_strongswan_properties_la_LIBADD = \ ++libnm_strongswan_properties_la_CFLAGS = \ ++ -DNM_STRONGSWAN_OLD \ ++ $(NM_UTILS_CFLAGS) \ ++ $(common_CFLAGS) ++ ++libnm_vpn_plugin_strongswan_la_LIBADD = \ + $(GTK_LIBS) \ + $(NM_UTILS_LIBS) + +-libnm_strongswan_properties_la_LDFLAGS = \ ++libnm_strongswan_properties_la_LIBADD = \ ++ $(GTK_LIBS) \ ++ $(NM_UTILS_LIBS) ++ ++libnm_vpn_plugin_strongswan_la_LDFLAGS = \ + -avoid-version + ++libnm_strongswan_properties_la_LDFLAGS = \ ++ $(libnm_vpn_plugin_strongswan_la_LDFLAGS) ++ + EXTRA_DIST = $(ui_DATA) +-- +2.4.3 + diff --git a/0005-nm-check-for-libnm.patch b/0005-nm-check-for-libnm.patch new file mode 100644 index 0000000..ac159b4 --- /dev/null +++ b/0005-nm-check-for-libnm.patch @@ -0,0 +1,87 @@ +From 60e61fa8330d4bc70a44786a26b8e54639f166de Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 21 Oct 2015 10:56:23 +0200 +Subject: [PATCH 05/10] nm: check for libnm + +libnm replaces libnm-glib. This will make sense with port to libnm and is done +to reduce line noise in that commit. +--- + auth-dialog/Makefile.am | 5 ++--- + configure.ac | 9 +++++---- + properties/Makefile.am | 8 ++++---- + 3 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am +index 6d3b3d6..34f9d6b 100644 +--- a/auth-dialog/Makefile.am ++++ b/auth-dialog/Makefile.am +@@ -4,8 +4,7 @@ nm_strongswan_auth_dialog_CPPFLAGS = \ + $(GTK_CFLAGS) \ + $(LIBGNOMEUI_CFLAGS) \ + $(GNOMEKEYRING_CFLAGS) \ +- $(NETWORK_MANAGER_CFLAGS) \ +- $(NM_UTILS_CFLAGS) \ ++ $(LIBNM_GLIB_CFLAGS) \ + -DG_DISABLE_DEPRECATED \ + -DGNOME_DISABLE_DEPRECATED \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ +@@ -18,5 +17,5 @@ nm_strongswan_auth_dialog_LDADD = \ + $(GTK_LIBS) \ + $(LIBGNOMEUI_LIBS) \ + $(GNOMEKEYRING_LIBS) \ +- $(NM_UTILS_LIBS) ++ $(LIBNM_GLIB_LIBS) + +diff --git a/configure.ac b/configure.ac +index 71fcbf2..70fb42e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -45,10 +45,11 @@ AM_GLIB_GNU_GETTEXT + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6) + PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0) + PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1) +-PKG_CHECK_EXISTS([libnm-glib], +- [PKG_CHECK_MODULES(NM_UTILS, NetworkManager >= 0.9.0 libnm-util libnm-glib libnm-glib-vpn)], +- [PKG_CHECK_MODULES(NM_UTILS, NetworkManager >= 0.9.0 libnm-util libnm_glib libnm_glib_vpn)] +-) ++PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 0.9.0 libnm-util libnm-glib libnm-glib-vpn) ++ ++PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0) ++LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2" ++LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2" + + AC_ARG_WITH( + [charon], +diff --git a/properties/Makefile.am b/properties/Makefile.am +index 8233ccb..2a113c7 100644 +--- a/properties/Makefile.am ++++ b/properties/Makefile.am +@@ -19,21 +19,21 @@ common_CFLAGS = \ + -DGDK_DISABLE_DEPRECATED + + libnm_vpn_plugin_strongswan_la_CFLAGS = \ +- $(NM_UTILS_CFLAGS) \ ++ $(LIBNM_GLIB_CFLAGS) \ + $(common_CFLAGS) + + libnm_strongswan_properties_la_CFLAGS = \ + -DNM_STRONGSWAN_OLD \ +- $(NM_UTILS_CFLAGS) \ ++ $(LIBNM_GLIB_CFLAGS) \ + $(common_CFLAGS) + + libnm_vpn_plugin_strongswan_la_LIBADD = \ + $(GTK_LIBS) \ +- $(NM_UTILS_LIBS) ++ $(LIBNM_GLIB_LIBS) + + libnm_strongswan_properties_la_LIBADD = \ + $(GTK_LIBS) \ +- $(NM_UTILS_LIBS) ++ $(LIBNM_GLIB_LIBS) + + libnm_vpn_plugin_strongswan_la_LDFLAGS = \ + -avoid-version +-- +2.4.3 + diff --git a/0006-nm-port-to-libnm.patch b/0006-nm-port-to-libnm.patch new file mode 100644 index 0000000..75608ba --- /dev/null +++ b/0006-nm-port-to-libnm.patch @@ -0,0 +1,317 @@ +From 0195709af106f66bd74a6f379580ffbc8076d514 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 21 Oct 2015 11:23:57 +0200 +Subject: [PATCH 06/10] nm: port to libnm + +--- + auth-dialog/Makefile.am | 4 +-- + auth-dialog/main.c | 9 +++--- + configure.ac | 2 +- + nm-strongswan-service.name.in | 3 ++ + properties/Makefile.am | 4 +-- + properties/nm-strongswan.c | 73 +++++++++++++++++++++++++------------------ + 6 files changed, 54 insertions(+), 41 deletions(-) + +diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am +index 34f9d6b..1ebef22 100644 +--- a/auth-dialog/Makefile.am ++++ b/auth-dialog/Makefile.am +@@ -4,7 +4,7 @@ nm_strongswan_auth_dialog_CPPFLAGS = \ + $(GTK_CFLAGS) \ + $(LIBGNOMEUI_CFLAGS) \ + $(GNOMEKEYRING_CFLAGS) \ +- $(LIBNM_GLIB_CFLAGS) \ ++ $(LIBNM_CFLAGS) \ + -DG_DISABLE_DEPRECATED \ + -DGNOME_DISABLE_DEPRECATED \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ +@@ -17,5 +17,5 @@ nm_strongswan_auth_dialog_LDADD = \ + $(GTK_LIBS) \ + $(LIBGNOMEUI_LIBS) \ + $(GNOMEKEYRING_LIBS) \ +- $(LIBNM_GLIB_LIBS) ++ $(LIBNM_LIBS) + +diff --git a/auth-dialog/main.c b/auth-dialog/main.c +index b9fd886..f579fc5 100644 +--- a/auth-dialog/main.c ++++ b/auth-dialog/main.c +@@ -24,10 +24,9 @@ + #include + #include + #include +-#include +-#include +-#include +-#include ++ ++#include ++#include + + #define NM_DBUS_SERVICE_STRONGSWAN "org.freedesktop.NetworkManager.strongswan" + +@@ -95,7 +94,7 @@ static char* get_connection_type(char *uuid) + GHashTable *data = NULL, *secrets = NULL; + char *method; + +- if (!nm_vpn_plugin_utils_read_vpn_details (0, &data, &secrets)) { ++ if (!nm_vpn_service_plugin_read_vpn_details (0, &data, &secrets)) { + fprintf (stderr, "Failed to read data and secrets from stdin.\n"); + return NULL; + } +diff --git a/configure.ac b/configure.ac +index 70fb42e..4a16c5b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -45,7 +45,7 @@ AM_GLIB_GNU_GETTEXT + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6) + PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0) + PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1) +-PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 0.9.0 libnm-util libnm-glib libnm-glib-vpn) ++PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 1.1.0 libnm-util libnm-glib libnm-glib-vpn) + + PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0) + LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2" +diff --git a/nm-strongswan-service.name.in b/nm-strongswan-service.name.in +index ca45ff2..a2f71a9 100644 +--- a/nm-strongswan-service.name.in ++++ b/nm-strongswan-service.name.in +@@ -3,6 +3,9 @@ name=strongswan + service=org.freedesktop.NetworkManager.strongswan + program=@CHARON@ + ++[libnm] ++plugin=@PLUGINDIR@/libnm-vpn-plugin-strongswan.so ++ + [GNOME] + auth-dialog=@LIBEXECDIR@/nm-strongswan-auth-dialog + properties=@PLUGINDIR@/libnm-strongswan-properties +diff --git a/properties/Makefile.am b/properties/Makefile.am +index 2a113c7..116e722 100644 +--- a/properties/Makefile.am ++++ b/properties/Makefile.am +@@ -19,7 +19,7 @@ common_CFLAGS = \ + -DGDK_DISABLE_DEPRECATED + + libnm_vpn_plugin_strongswan_la_CFLAGS = \ +- $(LIBNM_GLIB_CFLAGS) \ ++ $(LIBNM_CFLAGS) \ + $(common_CFLAGS) + + libnm_strongswan_properties_la_CFLAGS = \ +@@ -29,7 +29,7 @@ libnm_strongswan_properties_la_CFLAGS = \ + + libnm_vpn_plugin_strongswan_la_LIBADD = \ + $(GTK_LIBS) \ +- $(LIBNM_GLIB_LIBS) ++ $(LIBNM_LIBS) + + libnm_strongswan_properties_la_LIBADD = \ + $(GTK_LIBS) \ +diff --git a/properties/nm-strongswan.c b/properties/nm-strongswan.c +index 4cf6864..6c59fa7 100644 +--- a/properties/nm-strongswan.c ++++ b/properties/nm-strongswan.c +@@ -1,4 +1,5 @@ + /* ++ * Copyright (C) 2015 Lubomir Rintel + * Copyright (C) 2013 Tobias Brunner + * Copyright (C) 2008 Martin Willi + * Hochschule fuer Technik Rapperswil +@@ -26,11 +27,14 @@ + #include + #include + +-#define NM_VPN_API_SUBJECT_TO_CHANGE +- ++#ifdef NM_STRONGSWAN_OLD ++#define NM_VPN_LIBNM_COMPAT + #include + #include + #include ++#else ++#include ++#endif + + #include "nm-strongswan.h" + +@@ -41,18 +45,25 @@ + + /************** plugin class **************/ + +-static void strongswan_plugin_ui_interface_init (NMVpnPluginUiInterface *iface_class); ++enum { ++ PROP_0, ++ PROP_NAME, ++ PROP_DESC, ++ PROP_SERVICE ++}; ++ ++static void strongswan_plugin_ui_interface_init (NMVpnEditorPluginInterface *iface_class); + + G_DEFINE_TYPE_EXTENDED (StrongswanPluginUi, strongswan_plugin_ui, G_TYPE_OBJECT, 0, +- G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_PLUGIN_UI_INTERFACE, ++ G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_EDITOR_PLUGIN, + strongswan_plugin_ui_interface_init)) + + /************** UI widget class **************/ + +-static void strongswan_plugin_ui_widget_interface_init (NMVpnPluginUiWidgetInterface *iface_class); ++static void strongswan_plugin_ui_widget_interface_init (NMVpnEditorInterface *iface_class); + + G_DEFINE_TYPE_EXTENDED (StrongswanPluginUiWidget, strongswan_plugin_ui_widget, G_TYPE_OBJECT, 0, +- G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_PLUGIN_UI_WIDGET_INTERFACE, ++ G_IMPLEMENT_INTERFACE (NM_TYPE_VPN_EDITOR, + strongswan_plugin_ui_widget_interface_init)) + + #define STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), STRONGSWAN_TYPE_PLUGIN_UI_WIDGET, StrongswanPluginUiWidgetPrivate)) +@@ -178,7 +189,7 @@ static gboolean + init_plugin_ui (StrongswanPluginUiWidget *self, NMConnection *connection, GError **error) + { + StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); +- NMSettingVPN *settings; ++ NMSettingVpn *settings; + GtkWidget *widget; + const char *value; + +@@ -281,7 +292,7 @@ init_plugin_ui (StrongswanPluginUiWidget *self, NMConnection *connection, GError + } + + static GObject * +-get_widget (NMVpnPluginUiWidgetInterface *iface) ++get_widget (NMVpnEditor *iface) + { + StrongswanPluginUiWidget *self = STRONGSWAN_PLUGIN_UI_WIDGET (iface); + StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); +@@ -290,13 +301,13 @@ get_widget (NMVpnPluginUiWidgetInterface *iface) + } + + static gboolean +-update_connection (NMVpnPluginUiWidgetInterface *iface, ++update_connection (NMVpnEditor *iface, + NMConnection *connection, + GError **error) + { + StrongswanPluginUiWidget *self = STRONGSWAN_PLUGIN_UI_WIDGET (iface); + StrongswanPluginUiWidgetPrivate *priv = STRONGSWAN_PLUGIN_UI_WIDGET_GET_PRIVATE (self); +- NMSettingVPN *settings; ++ NMSettingVpn *settings; + GtkWidget *widget; + gboolean active; + char *str; +@@ -386,17 +397,17 @@ update_connection (NMVpnPluginUiWidgetInterface *iface, + return TRUE; + } + +-static NMVpnPluginUiWidgetInterface * ++static NMVpnEditor * + nm_vpn_plugin_ui_widget_interface_new (NMConnection *connection, GError **error) + { +- NMVpnPluginUiWidgetInterface *object; ++ NMVpnEditor *object; + StrongswanPluginUiWidgetPrivate *priv; + char *ui_file; + + if (error) + g_return_val_if_fail (*error == NULL, NULL); + +- object = NM_VPN_PLUGIN_UI_WIDGET_INTERFACE (g_object_new (STRONGSWAN_TYPE_PLUGIN_UI_WIDGET, NULL)); ++ object = g_object_new (STRONGSWAN_TYPE_PLUGIN_UI_WIDGET, NULL); + if (!object) { + g_set_error (error, STRONGSWAN_PLUGIN_UI_ERROR, 0, "could not create strongswan object"); + return NULL; +@@ -467,7 +478,7 @@ strongswan_plugin_ui_widget_init (StrongswanPluginUiWidget *plugin) + } + + static void +-strongswan_plugin_ui_widget_interface_init (NMVpnPluginUiWidgetInterface *iface_class) ++strongswan_plugin_ui_widget_interface_init (NMVpnEditorInterface *iface_class) + { + /* interface implementation */ + iface_class->get_widget = get_widget; +@@ -475,13 +486,13 @@ strongswan_plugin_ui_widget_interface_init (NMVpnPluginUiWidgetInterface *iface_ + } + + static guint32 +-get_capabilities (NMVpnPluginUiInterface *iface) ++get_capabilities (NMVpnEditorPlugin *iface) + { + return 0; + } + +-static NMVpnPluginUiWidgetInterface * +-ui_factory (NMVpnPluginUiInterface *iface, NMConnection *connection, GError **error) ++static NMVpnEditor * ++get_editor (NMVpnEditorPlugin *iface, NMConnection *connection, GError **error) + { + return nm_vpn_plugin_ui_widget_interface_new (connection, error); + } +@@ -491,13 +502,13 @@ get_property (GObject *object, guint prop_id, + GValue *value, GParamSpec *pspec) + { + switch (prop_id) { +- case NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME: ++ case PROP_NAME: + g_value_set_string (value, STRONGSWAN_PLUGIN_NAME); + break; +- case NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC: ++ case PROP_DESC: + g_value_set_string (value, STRONGSWAN_PLUGIN_DESC); + break; +- case NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE: ++ case PROP_SERVICE: + g_value_set_string (value, STRONGSWAN_PLUGIN_SERVICE); + break; + default: +@@ -514,16 +525,16 @@ strongswan_plugin_ui_class_init (StrongswanPluginUiClass *req_class) + object_class->get_property = get_property; + + g_object_class_override_property (object_class, +- NM_VPN_PLUGIN_UI_INTERFACE_PROP_NAME, +- NM_VPN_PLUGIN_UI_INTERFACE_NAME); ++ PROP_NAME, ++ NM_VPN_EDITOR_PLUGIN_NAME); + + g_object_class_override_property (object_class, +- NM_VPN_PLUGIN_UI_INTERFACE_PROP_DESC, +- NM_VPN_PLUGIN_UI_INTERFACE_DESC); ++ PROP_DESC, ++ NM_VPN_EDITOR_PLUGIN_DESCRIPTION); + + g_object_class_override_property (object_class, +- NM_VPN_PLUGIN_UI_INTERFACE_PROP_SERVICE, +- NM_VPN_PLUGIN_UI_INTERFACE_SERVICE); ++ PROP_SERVICE, ++ NM_VPN_EDITOR_PLUGIN_SERVICE); + } + + static void +@@ -532,20 +543,20 @@ strongswan_plugin_ui_init (StrongswanPluginUi *plugin) + } + + static void +-strongswan_plugin_ui_interface_init (NMVpnPluginUiInterface *iface_class) ++strongswan_plugin_ui_interface_init (NMVpnEditorPluginInterface *iface_class) + { + /* interface implementation */ +- iface_class->ui_factory = ui_factory; ++ iface_class->get_editor = get_editor; + iface_class->get_capabilities = get_capabilities; + /* TODO: implement delete_connection to purge associated secrets */ + } + + +-G_MODULE_EXPORT NMVpnPluginUiInterface * +-nm_vpn_plugin_ui_factory (GError **error) ++G_MODULE_EXPORT NMVpnEditorPlugin * ++nm_vpn_editor_plugin_factory (GError **error) + { + if (error) + g_return_val_if_fail (*error == NULL, NULL); + +- return NM_VPN_PLUGIN_UI_INTERFACE (g_object_new (STRONGSWAN_TYPE_PLUGIN_UI, NULL)); ++ return g_object_new (STRONGSWAN_TYPE_PLUGIN_UI, NULL); + } +-- +2.4.3 + diff --git a/0007-nm-replace-libgnomeui-with-libnma-for-password-dialo.patch b/0007-nm-replace-libgnomeui-with-libnma-for-password-dialo.patch new file mode 100644 index 0000000..0531e5a --- /dev/null +++ b/0007-nm-replace-libgnomeui-with-libnma-for-password-dialo.patch @@ -0,0 +1,183 @@ +From 76deb2d6678545fab6712edf25aeb89cbaf1f062 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 21 Oct 2015 11:29:25 +0200 +Subject: [PATCH 07/10] nm: replace libgnomeui with libnma for password dialog + +libgnomeui is long deprecated. + +There's one functional difference: the choice to save the passwords is gone. +The password flags and saved password should be set in the preferences dialog, +but this commit does not fix that. +--- + auth-dialog/Makefile.am | 6 ++--- + auth-dialog/main.c | 61 ++++++++++++++++++------------------------------- + configure.ac | 2 +- + 3 files changed, 26 insertions(+), 43 deletions(-) + +diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am +index 1ebef22..4dcf1d2 100644 +--- a/auth-dialog/Makefile.am ++++ b/auth-dialog/Makefile.am +@@ -2,9 +2,9 @@ libexec_PROGRAMS = nm-strongswan-auth-dialog + + nm_strongswan_auth_dialog_CPPFLAGS = \ + $(GTK_CFLAGS) \ +- $(LIBGNOMEUI_CFLAGS) \ + $(GNOMEKEYRING_CFLAGS) \ + $(LIBNM_CFLAGS) \ ++ $(LIBNMA_CFLAGS) \ + -DG_DISABLE_DEPRECATED \ + -DGNOME_DISABLE_DEPRECATED \ + -DGNOMELOCALEDIR=\"$(datadir)/locale\" \ +@@ -15,7 +15,7 @@ nm_strongswan_auth_dialog_SOURCES = \ + + nm_strongswan_auth_dialog_LDADD = \ + $(GTK_LIBS) \ +- $(LIBGNOMEUI_LIBS) \ + $(GNOMEKEYRING_LIBS) \ +- $(LIBNM_LIBS) ++ $(LIBNM_LIBS) \ ++ $(LIBNMA_LIBS) + +diff --git a/auth-dialog/main.c b/auth-dialog/main.c +index f579fc5..d1f3096 100644 +--- a/auth-dialog/main.c ++++ b/auth-dialog/main.c +@@ -1,4 +1,5 @@ + /* ++ * Copyright (C) 2015 Lubomir Rintel + * Copyright (C) 2008-2011 Martin Willi + * Hochschule fuer Technik Rapperswil + * Copyright (C) 2004 Dan Williams +@@ -19,14 +20,16 @@ + #include + #endif + ++#include ++#include + #include + #include + #include + #include +-#include + + #include + #include ++#include + + #define NM_DBUS_SERVICE_STRONGSWAN "org.freedesktop.NetworkManager.strongswan" + +@@ -114,10 +117,10 @@ static char* get_connection_type(char *uuid) + int main (int argc, char *argv[]) + { + gboolean retry = FALSE, allow_interaction = FALSE; +- gchar *name = NULL, *uuid = NULL, *service = NULL, *keyring = NULL, *pass; ++ gchar *name = NULL, *uuid = NULL, *service = NULL, *pass; + GOptionContext *context; + char *agent, *type; +- guint32 itemid, minlen = 0; ++ guint32 minlen = 0; + GtkWidget *dialog; + GOptionEntry entries[] = { + { "reprompt", 'r', 0, G_OPTION_ARG_NONE, &retry, "Reprompt for passwords", NULL}, +@@ -166,66 +169,46 @@ int main (int argc, char *argv[]) + { + if (!strcmp(type, "eap")) + { +- dialog = gnome_password_dialog_new(_("VPN password required"), +- _("EAP password required to establish VPN connection:"), +- NULL, NULL, TRUE); +- gnome_password_dialog_set_show_remember(GNOME_PASSWORD_DIALOG(dialog), TRUE); ++ dialog = nma_vpn_password_dialog_new(_("VPN password required"), ++ _("EAP password required to establish VPN connection:"), ++ NULL); + } + else if (!strcmp(type, "key")) + { +- dialog = gnome_password_dialog_new(_("VPN password required"), +- _("Private key decryption password required to establish VPN connection:"), +- NULL, NULL, TRUE); +- gnome_password_dialog_set_show_remember(GNOME_PASSWORD_DIALOG(dialog), TRUE); ++ dialog = nma_vpn_password_dialog_new(_("VPN password required"), ++ _("Private key decryption password required to establish VPN connection:"), ++ NULL); + } + else if (!strcmp(type, "psk")) + { +- dialog = gnome_password_dialog_new(_("VPN password required"), +- _("Pre-shared key required to establish VPN connection (min. 20 characters):"), +- NULL, NULL, TRUE); +- gnome_password_dialog_set_show_remember(GNOME_PASSWORD_DIALOG(dialog), TRUE); ++ dialog = nma_vpn_password_dialog_new(_("VPN password required"), ++ _("Pre-shared key required to establish VPN connection (min. 20 characters):"), ++ NULL); + minlen = 20; + } + else /* smartcard */ + { +- dialog = gnome_password_dialog_new(_("VPN password required"), +- _("Smartcard PIN required to establish VPN connection:"), +- NULL, NULL, TRUE); +- gnome_password_dialog_set_show_remember(GNOME_PASSWORD_DIALOG(dialog), FALSE); ++ dialog = nma_vpn_password_dialog_new(_("VPN password required"), ++ _("Smartcard PIN required to establish VPN connection:"), ++ NULL); + } +- gnome_password_dialog_set_show_username(GNOME_PASSWORD_DIALOG(dialog), FALSE); + if (pass) + { +- gnome_password_dialog_set_password(GNOME_PASSWORD_DIALOG(dialog), pass); ++ nma_vpn_password_dialog_set_password(NMA_VPN_PASSWORD_DIALOG(dialog), pass); + } + ++ gtk_widget_show(dialog); + too_short_retry: +- if (!gnome_password_dialog_run_and_block(GNOME_PASSWORD_DIALOG(dialog))) ++ if (!nma_vpn_password_dialog_run_and_block(NMA_VPN_PASSWORD_DIALOG(dialog))) + { + return 1; + } + +- pass = gnome_password_dialog_get_password(GNOME_PASSWORD_DIALOG(dialog)); ++ pass = g_strdup(nma_vpn_password_dialog_get_password(NMA_VPN_PASSWORD_DIALOG(dialog))); + if (minlen && strlen(pass) < minlen) + { + goto too_short_retry; + } +- switch (gnome_password_dialog_get_remember(GNOME_PASSWORD_DIALOG(dialog))) +- { +- case GNOME_PASSWORD_DIALOG_REMEMBER_NOTHING: +- break; +- case GNOME_PASSWORD_DIALOG_REMEMBER_SESSION: +- keyring = "session"; +- /* FALL */ +- case GNOME_PASSWORD_DIALOG_REMEMBER_FOREVER: +- if (gnome_keyring_set_network_password_sync(keyring, +- g_get_user_name(), NULL, name, "password", service, NULL, 0, +- pass, &itemid) != GNOME_KEYRING_RESULT_OK) +- { +- g_warning ("storing password in keyring failed"); +- } +- break; +- } + } + if (pass) + { +diff --git a/configure.ac b/configure.ac +index 4a16c5b..823ae79 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,9 +43,9 @@ IT_PROG_INTLTOOL([0.35]) + AM_GLIB_GNU_GETTEXT + + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6) +-PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0) + PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1) + PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 1.1.0 libnm-util libnm-glib libnm-glib-vpn) ++PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0) + + PKG_CHECK_MODULES(LIBNM, libnm >= 1.1.0) + LIBNM_CFLAGS="$LIBNM_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2" +-- +2.4.3 + diff --git a/0008-nm-replace-libgnomekeyring-with-libsecret.patch b/0008-nm-replace-libgnomekeyring-with-libsecret.patch new file mode 100644 index 0000000..7d1d3a8 --- /dev/null +++ b/0008-nm-replace-libgnomekeyring-with-libsecret.patch @@ -0,0 +1,121 @@ +From a12afcc8638b06f5cdd4f05f672ca13c06ad1ec1 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 21 Oct 2015 12:20:13 +0200 +Subject: [PATCH 08/10] nm: replace libgnomekeyring with libsecret + +The former is deprecated and the newer API is nicer anyway. +--- + auth-dialog/Makefile.am | 4 ++-- + auth-dialog/main.c | 39 ++++++++------------------------------- + configure.ac | 2 +- + 3 files changed, 11 insertions(+), 34 deletions(-) + +diff --git a/auth-dialog/Makefile.am b/auth-dialog/Makefile.am +index 4dcf1d2..f57e510 100644 +--- a/auth-dialog/Makefile.am ++++ b/auth-dialog/Makefile.am +@@ -2,7 +2,7 @@ libexec_PROGRAMS = nm-strongswan-auth-dialog + + nm_strongswan_auth_dialog_CPPFLAGS = \ + $(GTK_CFLAGS) \ +- $(GNOMEKEYRING_CFLAGS) \ ++ $(LIBSECRET_CFLAGS) \ + $(LIBNM_CFLAGS) \ + $(LIBNMA_CFLAGS) \ + -DG_DISABLE_DEPRECATED \ +@@ -15,7 +15,7 @@ nm_strongswan_auth_dialog_SOURCES = \ + + nm_strongswan_auth_dialog_LDADD = \ + $(GTK_LIBS) \ +- $(GNOMEKEYRING_LIBS) \ ++ $(LIBSECRET_LIBS) \ + $(LIBNM_LIBS) \ + $(LIBNMA_LIBS) + +diff --git a/auth-dialog/main.c b/auth-dialog/main.c +index d1f3096..c8ef1e1 100644 +--- a/auth-dialog/main.c ++++ b/auth-dialog/main.c +@@ -25,7 +25,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +@@ -34,35 +34,6 @@ + #define NM_DBUS_SERVICE_STRONGSWAN "org.freedesktop.NetworkManager.strongswan" + + /** +- * lookup a password in the keyring +- */ +-static char *lookup_password(char *name, char *service) +-{ +- GList *list; +- GList *iter; +- char *pass = NULL; +- +- if (gnome_keyring_find_network_password_sync(g_get_user_name(), NULL, name, +- NULL, service, NULL, 0, &list) != GNOME_KEYRING_RESULT_OK) +- { +- return NULL; +- } +- +- for (iter = list; iter; iter = iter->next) +- { +- GnomeKeyringNetworkPasswordData *data = iter->data; +- +- if (strcmp(data->object, "password") == 0 && data->password) +- { +- pass = g_strdup(data->password); +- break; +- } +- } +- gnome_keyring_network_password_list_free(list); +- return pass; +-} +- +-/** + * Wait for quit input + */ + static void wait_for_quit (void) +@@ -164,7 +135,12 @@ int main (int argc, char *argv[]) + if (!strcmp(type, "eap") || !strcmp(type, "key") || !strcmp(type, "psk") || + !strcmp(type, "smartcard")) + { +- pass = lookup_password(name, service); ++ pass = secret_password_lookup_sync(SECRET_SCHEMA_COMPAT_NETWORK, NULL, NULL, ++ "user", g_get_user_name(), ++ "server", name, ++ "protocol", service, ++ NULL); ++ + if ((!pass || retry) && allow_interaction) + { + if (!strcmp(type, "eap")) +@@ -213,6 +189,7 @@ too_short_retry: + if (pass) + { + printf("password\n%s\n", pass); ++ g_free(pass); + } + } + else +diff --git a/configure.ac b/configure.ac +index 823ae79..4291612 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,7 +43,7 @@ IT_PROG_INTLTOOL([0.35]) + AM_GLIB_GNU_GETTEXT + + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6) +-PKG_CHECK_MODULES(GNOMEKEYRING, gnome-keyring-1) ++PKG_CHECK_MODULES(LIBSECRET, libsecret-1) + PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 1.1.0 libnm-util libnm-glib libnm-glib-vpn) + PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0) + +-- +2.4.3 + diff --git a/0009-nm-bump-to-GTK-3.0.patch b/0009-nm-bump-to-GTK-3.0.patch new file mode 100644 index 0000000..6cd2bfb --- /dev/null +++ b/0009-nm-bump-to-GTK-3.0.patch @@ -0,0 +1,26 @@ +From e0a81269e9504988e3924ab627a92053fc7f1756 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 21 Oct 2015 13:04:14 +0200 +Subject: [PATCH 09/10] nm: bump to GTK+ 3.0 + +It's been released years ago; we depend on newer stuff than that now. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 4291612..19f0022 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -42,7 +42,7 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package]) + IT_PROG_INTLTOOL([0.35]) + AM_GLIB_GNU_GETTEXT + +-PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.6) ++PKG_CHECK_MODULES(GTK, gtk+-3.0 >= 3.0) + PKG_CHECK_MODULES(LIBSECRET, libsecret-1) + PKG_CHECK_MODULES(LIBNM_GLIB, NetworkManager >= 1.1.0 libnm-util libnm-glib libnm-glib-vpn) + PKG_CHECK_MODULES(LIBNMA, libnma >= 1.1.0) +-- +2.4.3 + diff --git a/0010-nm-bump-minor-version-to-1.4.0.patch b/0010-nm-bump-minor-version-to-1.4.0.patch new file mode 100644 index 0000000..1b8d087 --- /dev/null +++ b/0010-nm-bump-minor-version-to-1.4.0.patch @@ -0,0 +1,27 @@ +From 7506fa9724613443f30ddef0c36850e7d25e63f4 Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Wed, 21 Oct 2015 13:06:42 +0200 +Subject: [PATCH 10/10] nm: bump minor version to 1.4.0 + +This is probably a good idea to do to signal there's significant changes in +dependencies to the distro package maintainers with libnm port and associated +changes. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 19f0022..3091a81 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,6 +1,6 @@ + AC_PREREQ(2.52) + +-AC_INIT(NetworkManager-strongswan, 1.3.1, martin@strongswan.org, NetworkManager-strongswan) ++AC_INIT(NetworkManager-strongswan, 1.4.0, martin@strongswan.org, NetworkManager-strongswan) + AM_INIT_AUTOMAKE([subdir-objects]) + AM_MAINTAINER_MODE + +-- +2.4.3 + diff --git a/0011-nm-install-the-.name-file-into-usr-lib-NetworkManage.patch b/0011-nm-install-the-.name-file-into-usr-lib-NetworkManage.patch new file mode 100644 index 0000000..cd37f8c --- /dev/null +++ b/0011-nm-install-the-.name-file-into-usr-lib-NetworkManage.patch @@ -0,0 +1,32 @@ +From c60ced33593dcf29e19c782905587a440329b0cf Mon Sep 17 00:00:00 2001 +From: Lubomir Rintel +Date: Fri, 23 Oct 2015 11:29:42 +0200 +Subject: [PATCH] nm: install the .name file into /usr/lib/NetworkManager/VPN + +It's a preferred location for system-provided plugins. We keep the old location +for compatibility. +--- + Makefile.am | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 2864eb2..a7a30e2 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -5,9 +5,12 @@ SUBDIRS = properties auth-dialog po + dbusservicedir = $(sysconfdir)/dbus-1/system.d + dbusservice_DATA = nm-strongswan-service.conf + +-nmvpnservicedir = $(sysconfdir)/NetworkManager/VPN ++nmvpnservicedir = $(prefix)/lib/NetworkManager/VPN + nmvpnservice_DATA = nm-strongswan-service.name + ++oldnmvpnservicedir = $(sysconfdir)/NetworkManager/VPN ++oldnmvpnservice_DATA = $(nmvpnservice_DATA) ++ + @INTLTOOL_DESKTOP_RULE@ + + nm-strongswan-service.name: $(srcdir)/nm-strongswan-service.name.in +-- +2.4.3 + diff --git a/NetworkManager-strongswan.spec b/NetworkManager-strongswan.spec index 4c31268..3bbbda4 100644 --- a/NetworkManager-strongswan.spec +++ b/NetworkManager-strongswan.spec @@ -1,22 +1,37 @@ Name: NetworkManager-strongswan Version: 1.3.1 -Release: 1%{?dist} +Release: 2.20151023libnm%{?dist} Summary: NetworkManager strongSwan IPSec VPN plug-in License: GPLv2+ Group: System Environment/Base URL: https://www.strongswan.org/ Source0: https://download.strongswan.org/NetworkManager/%{name}-%{version}.tar.bz2 +# https://github.com/strongswan/strongswan/pull/15 +Patch1: 0001-nm-set-full-path-to-the-connection-editor-plugin.patch +Patch2: 0002-nm-drop-some-unneeded-dependencies.patch +Patch3: 0003-nm-drop-useless-calls-to-AC_SUBST.patch +Patch4: 0004-nm-split-the-plugin-into-two-halves.patch +Patch5: 0005-nm-check-for-libnm.patch +Patch6: 0006-nm-port-to-libnm.patch +Patch7: 0007-nm-replace-libgnomeui-with-libnma-for-password-dialo.patch +Patch8: 0008-nm-replace-libgnomekeyring-with-libsecret.patch +Patch9: 0009-nm-bump-to-GTK-3.0.patch +Patch10: 0010-nm-bump-minor-version-to-1.4.0.patch +Patch11: 0011-nm-install-the-.name-file-into-usr-lib-NetworkManage.patch + BuildRequires: pkgconfig(gthread-2.0) BuildRequires: pkgconfig(dbus-glib-1) >= 0.30 BuildRequires: pkgconfig(gtk+-2.0) >= 2.6 -BuildRequires: pkgconfig(libgnomeui-2.0) -BuildRequires: pkgconfig(gnome-keyring-1) -BuildRequires: pkgconfig(NetworkManager) >= 0.9.0 +BuildRequires: pkgconfig(libsecret-1) +BuildRequires: pkgconfig(NetworkManager) >= 1.1.0 BuildRequires: pkgconfig(libnm-util) BuildRequires: pkgconfig(libnm-glib) BuildRequires: pkgconfig(libnm-glib-vpn) +BuildRequires: pkgconfig(libnm) >= 1.1.0 +BuildRequires: pkgconfig(libnma) >= 1.1.0 BuildRequires: intltool +BuildRequires: autoconf libtool Requires: NetworkManager Requires: %{_libexecdir}/strongswan/charon-nm @@ -44,9 +59,21 @@ with the graphical desktop. %prep %setup -q +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 %build +autoreconf -f -i %configure --disable-static --with-charon=%{_libexecdir}/strongswan/charon-nm make %{?_smp_mflags} @@ -57,18 +84,24 @@ make install DESTDIR=%{buildroot} %files -f %{name}.lang -%{_sysconfdir}/NetworkManager/VPN/nm-strongswan-service.name +%{_prefix}/lib/NetworkManager/VPN/nm-strongswan-service.name %{_sysconfdir}/dbus-1/system.d/nm-strongswan-service.conf %{_libexecdir}/nm-strongswan-auth-dialog +%{_libdir}/NetworkManager/libnm-vpn-plugin-strongswan.so +%exclude %{_libdir}/NetworkManager/libnm-vpn-plugin-strongswan.la %doc NEWS %files gnome +%{_sysconfdir}/NetworkManager/VPN/nm-strongswan-service.name %{_datadir}/gnome-vpn-properties/strongswan %{_libdir}/NetworkManager/libnm-strongswan-properties.so %exclude %{_libdir}/NetworkManager/libnm-strongswan-properties.la %changelog +* Fri Oct 23 2015 Lubomir Rintel - 1.3.1-2.20151023libnm +- Add the NetworkManager 1.2 support patchset + * Mon Oct 19 2015 Lubomir Rintel - 1.3.1-1 - Initial packaging