summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOskari Rauta2016-09-07 20:32:48 +0300
committerOskari Rauta2016-09-07 20:32:48 +0300
commit2b235872fea266249156f657547c94b4e07e7ab8 (patch)
treeb114d027f5cad2f68739394078af0e28913a039d
downloadaur-2b235872fea266249156f657547c94b4e07e7ab8.tar.gz
Initial commit
-rw-r--r--.SRCINFO48
-rw-r--r--0001-nm-set-full-path-to-the-connection-editor-plugin.patch35
-rw-r--r--0002-nm-drop-some-unneeded-dependencies.patch44
-rw-r--r--0003-nm-drop-useless-calls-to-AC_SUBST.patch41
-rw-r--r--0004-nm-split-the-plugin-into-two-halves.patch85
-rw-r--r--0005-nm-check-for-libnm.patch87
-rw-r--r--0006-nm-port-to-libnm.patch317
-rw-r--r--0007-nm-replace-libgnomeui-with-libnma-for-password-dialo.patch183
-rw-r--r--0008-nm-replace-libgnomekeyring-with-libsecret.patch121
-rw-r--r--0009-nm-bump-to-GTK-3.0.patch26
-rw-r--r--0010-nm-bump-minor-version-to-1.4.1.patch27
-rw-r--r--0011-nm-install-the-.name-file-into-usr-lib-NetworkManage.patch32
-rw-r--r--0012-nm-save-password-locally.patch11
-rw-r--r--PKGBUILD80
-rw-r--r--fix-vbox-parent.patch19
15 files changed, 1156 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..bd4f01783ae6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,48 @@
+pkgbase = networkmanager-strongswan-passwordstore
+ pkgdesc = Strongswan NetworkManager plugin with default setting to save vpn password in keyfile
+ pkgver = 1.4.1
+ pkgrel = 1
+ url = http://wiki.strongswan.org/projects/strongswan/wiki/NetworkManager
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = intltool
+ depends = nm-connection-editor>=1.4.0
+ depends = libsecret
+ depends = strongswan
+ optdepends = network-manager-applet>=1.4.0:
+ optdepends = Graphical
+ optdepends = configuration
+ provides = networkmanager-strongswan=1.4.1
+ conflicts = networmanager-strongswan
+ source = http://download.strongswan.org/NetworkManager/NetworkManager-strongswan-1.3.1.tar.gz
+ source = fix-vbox-parent.patch
+ source = 0001-nm-set-full-path-to-the-connection-editor-plugin.patch
+ source = 0002-nm-drop-some-unneeded-dependencies.patch
+ source = 0003-nm-drop-useless-calls-to-AC_SUBST.patch
+ source = 0004-nm-split-the-plugin-into-two-halves.patch
+ source = 0005-nm-check-for-libnm.patch
+ source = 0006-nm-port-to-libnm.patch
+ source = 0007-nm-replace-libgnomeui-with-libnma-for-password-dialo.patch
+ source = 0008-nm-replace-libgnomekeyring-with-libsecret.patch
+ source = 0009-nm-bump-to-GTK-3.0.patch
+ source = 0010-nm-bump-minor-version-to-1.4.1.patch
+ source = 0011-nm-install-the-.name-file-into-usr-lib-NetworkManage.patch
+ source = 0012-nm-save-password-locally.patch
+ sha256sums = 8f67bf0e7281ee8dfb1c7fe28ef8d06774744e2135682f4ddae4342fd103d46a
+ sha256sums = c9f7f6819753ff2834015ba18ffed39c4b5ae5e0e71c377ee49c105f0d9b1f99
+ sha256sums = c2dd38ae4bc91e882d0a6c41dbb45f91fc3bf2124c33ca457c0d569c160d87ee
+ sha256sums = dd5a5ecb2bdf90b99bdc5deb037cd0ad83e8e212ae853abb505b117871972865
+ sha256sums = 4e9f5b7d889c596135e8cef6ca1b36ed96392479302e70ca6af258bd6b9279d3
+ sha256sums = d6baefb23c17a9ac0717ac9d1e81b4935f79270923f57ccf0d5259ae67f2f6b4
+ sha256sums = 2ea1cac933f5a4c09940bb77499b4d300e3726438185726448faa1bd8d0a2370
+ sha256sums = f2f64460fb5f94e9625f519e9a6886efd1fc5adfc664d46ec54ecfd65532bd8f
+ sha256sums = 6e1a0d0dc979d69efc5e4f112d2306d0ff8e94d00bd9a8fb0e150ecaf6145bbb
+ sha256sums = ec5aa3f85d7ef42e9ecdfd1cdf1b7c6bdc32b8586afb72b8fafdd5b2b53b9bbc
+ sha256sums = 0a06dd9ed6bf715a6229b30ad399eeab410510fa7eb3a49340b65040e7434328
+ sha256sums = 149967427c6e66b0666c233cdd2c7ea734ee9032f820f148212841b2ffe79188
+ sha256sums = 8f1bc53c5de2d431e1ce7c3370241e8ea1f815e7289aed1bfd00a059359655c6
+ sha256sums = 35180eb253c0bd55f1ef1c70d9a7d89290d659d568c7a2e05093c1f95e5eee35
+
+pkgname = networkmanager-strongswan-passwordstore
+
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 000000000000..5cffcb151b6e
--- /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 <lkundrak@v3.sk>
+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 000000000000..5e609ca490d5
--- /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 <lkundrak@v3.sk>
+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 000000000000..9ce3bb12b678
--- /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 <lkundrak@v3.sk>
+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 000000000000..560abe15ff2c
--- /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 <lkundrak@v3.sk>
+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 000000000000..ac159b4d396d
--- /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 <lkundrak@v3.sk>
+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 000000000000..75608bac501c
--- /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 <lkundrak@v3.sk>
+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 <gtk/gtk.h>
+ #include <gnome-keyring.h>
+ #include <libgnomeui/libgnomeui.h>
+-#include <nm-vpn-plugin.h>
+-#include <nm-setting-vpn.h>
+-#include <nm-setting-connection.h>
+-#include <nm-vpn-plugin-utils.h>
++
++#include <NetworkManager.h>
++#include <nm-vpn-service-plugin.h>
+
+ #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 <glib/gi18n-lib.h>
+ #include <gtk/gtk.h>
+
+-#define NM_VPN_API_SUBJECT_TO_CHANGE
+-
++#ifdef NM_STRONGSWAN_OLD
++#define NM_VPN_LIBNM_COMPAT
+ #include <nm-vpn-plugin-ui-interface.h>
+ #include <nm-setting-vpn.h>
+ #include <nm-setting-connection.h>
++#else
++#include <NetworkManager.h>
++#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 000000000000..0531e5a2a3ad
--- /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 <lkundrak@v3.sk>
+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 <config.h>
+ #endif
+
++#include <errno.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <glib/gi18n.h>
+ #include <gtk/gtk.h>
+ #include <gnome-keyring.h>
+-#include <libgnomeui/libgnomeui.h>
+
+ #include <NetworkManager.h>
+ #include <nm-vpn-service-plugin.h>
++#include <nma-vpn-password-dialog.h>
+
+ #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 000000000000..7d1d3a875c7b
--- /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 <lkundrak@v3.sk>
+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 <string.h>
+ #include <glib/gi18n.h>
+ #include <gtk/gtk.h>
+-#include <gnome-keyring.h>
++#include <libsecret/secret.h>
+
+ #include <NetworkManager.h>
+ #include <nm-vpn-service-plugin.h>
+@@ -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 000000000000..6cd2bfbdf617
--- /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 <lkundrak@v3.sk>
+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.1.patch b/0010-nm-bump-minor-version-to-1.4.1.patch
new file mode 100644
index 000000000000..3be8fbcebfcf
--- /dev/null
+++ b/0010-nm-bump-minor-version-to-1.4.1.patch
@@ -0,0 +1,27 @@
+From 7506fa9724613443f30ddef0c36850e7d25e63f4 Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak@v3.sk>
+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.1, 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 000000000000..cd37f8c83a98
--- /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 <lkundrak@v3.sk>
+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/0012-nm-save-password-locally.patch b/0012-nm-save-password-locally.patch
new file mode 100644
index 000000000000..c08c0022afec
--- /dev/null
+++ b/0012-nm-save-password-locally.patch
@@ -0,0 +1,11 @@
+--- NetworkManager-strongswan-1.3.1/properties/nm-strongswan.c.orig 2016-09-07 01:29:42.639436118 +0300
++++ NetworkManager-strongswan-1.3.1/properties/nm-strongswan.c 2016-09-07 01:30:02.432769728 +0300
+@@ -391,7 +391,7 @@
+ nm_setting_vpn_add_data_item (settings, "ipcomp", active ? "yes" : "no");
+
+ nm_setting_set_secret_flags (NM_SETTING (settings), "password",
+- NM_SETTING_SECRET_FLAG_AGENT_OWNED, NULL);
++ NM_SETTING_SECRET_FLAG_NONE, NULL);
+
+ nm_connection_add_setting (connection, NM_SETTING (settings));
+ return TRUE;
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7ba6834420d2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,80 @@
+# Maintainer: Jan Hicken <firstname [dot] lastname [at] hotmail [dot] de>
+# Contributor: Oskari Rauta <oskari.rauta@gmail.com>
+
+pkgname=networkmanager-strongswan-passwordstore
+_pkgname=NetworkManager-strongswan
+pkgver=1.4.1
+_pkgver=1.3.1
+pkgrel=1
+pkgdesc="Strongswan NetworkManager plugin with default setting to save vpn password in keyfile"
+arch=('i686' 'x86_64')
+url="http://wiki.strongswan.org/projects/strongswan/wiki/NetworkManager"
+license=('GPL')
+provides=("networkmanager-strongswan=$pkgver")
+conflicts=("networmanager-strongswan")
+depends=("nm-connection-editor>=1.4.0" "libsecret" "strongswan")
+optdepends=("network-manager-applet>=1.4.0": Graphical configuration)
+makedepends=('intltool')
+source=("http://download.strongswan.org/NetworkManager/$_pkgname-$_pkgver.tar.gz"
+ 'fix-vbox-parent.patch'
+ '0001-nm-set-full-path-to-the-connection-editor-plugin.patch'
+ '0002-nm-drop-some-unneeded-dependencies.patch'
+ '0003-nm-drop-useless-calls-to-AC_SUBST.patch'
+ '0004-nm-split-the-plugin-into-two-halves.patch'
+ '0005-nm-check-for-libnm.patch'
+ '0006-nm-port-to-libnm.patch'
+ '0007-nm-replace-libgnomeui-with-libnma-for-password-dialo.patch'
+ '0008-nm-replace-libgnomekeyring-with-libsecret.patch'
+ '0009-nm-bump-to-GTK-3.0.patch'
+ '0010-nm-bump-minor-version-to-1.4.1.patch'
+ '0011-nm-install-the-.name-file-into-usr-lib-NetworkManage.patch'
+ '0012-nm-save-password-locally.patch')
+sha256sums=('8f67bf0e7281ee8dfb1c7fe28ef8d06774744e2135682f4ddae4342fd103d46a'
+ 'c9f7f6819753ff2834015ba18ffed39c4b5ae5e0e71c377ee49c105f0d9b1f99'
+ 'c2dd38ae4bc91e882d0a6c41dbb45f91fc3bf2124c33ca457c0d569c160d87ee'
+ 'dd5a5ecb2bdf90b99bdc5deb037cd0ad83e8e212ae853abb505b117871972865'
+ '4e9f5b7d889c596135e8cef6ca1b36ed96392479302e70ca6af258bd6b9279d3'
+ 'd6baefb23c17a9ac0717ac9d1e81b4935f79270923f57ccf0d5259ae67f2f6b4'
+ '2ea1cac933f5a4c09940bb77499b4d300e3726438185726448faa1bd8d0a2370'
+ 'f2f64460fb5f94e9625f519e9a6886efd1fc5adfc664d46ec54ecfd65532bd8f'
+ '6e1a0d0dc979d69efc5e4f112d2306d0ff8e94d00bd9a8fb0e150ecaf6145bbb'
+ 'ec5aa3f85d7ef42e9ecdfd1cdf1b7c6bdc32b8586afb72b8fafdd5b2b53b9bbc'
+ '0a06dd9ed6bf715a6229b30ad399eeab410510fa7eb3a49340b65040e7434328'
+ '149967427c6e66b0666c233cdd2c7ea734ee9032f820f148212841b2ffe79188'
+ '8f1bc53c5de2d431e1ce7c3370241e8ea1f815e7289aed1bfd00a059359655c6'
+ '35180eb253c0bd55f1ef1c70d9a7d89290d659d568c7a2e05093c1f95e5eee35')
+
+prepare() {
+ cd "$_pkgname-$_pkgver"
+ patch -p1 -i ../fix-vbox-parent.patch
+ patch -p1 -i ../0001-nm-set-full-path-to-the-connection-editor-plugin.patch
+ patch -p1 -i ../0002-nm-drop-some-unneeded-dependencies.patch
+ patch -p1 -i ../0003-nm-drop-useless-calls-to-AC_SUBST.patch
+ patch -p1 -i ../0004-nm-split-the-plugin-into-two-halves.patch
+ patch -p1 -i ../0005-nm-check-for-libnm.patch
+ patch -p1 -i ../0006-nm-port-to-libnm.patch
+ patch -p1 -i ../0007-nm-replace-libgnomeui-with-libnma-for-password-dialo.patch
+ patch -p1 -i ../0008-nm-replace-libgnomekeyring-with-libsecret.patch
+ patch -p1 -i ../0009-nm-bump-to-GTK-3.0.patch
+ patch -p1 -i ../0010-nm-bump-minor-version-to-1.4.1.patch
+ patch -p1 -i ../0011-nm-install-the-.name-file-into-usr-lib-NetworkManage.patch
+ patch -p1 -i ../0012-nm-save-password-locally.patch
+}
+
+build() {
+ cd "$_pkgname-$_pkgver"
+
+ export CFLAGS="$CFLAGS -Wno-error=deprecated-declarations"
+ autoreconf -f -i
+ ./configure --sysconfdir=/etc --prefix=/usr \
+ --libexecdir=/usr/lib/networkmanager \
+ --with-charon=/usr/lib/strongswan/charon-nm
+ make
+}
+
+package() {
+ cd "$_pkgname-$_pkgver"
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/fix-vbox-parent.patch b/fix-vbox-parent.patch
new file mode 100644
index 000000000000..f016af8d4120
--- /dev/null
+++ b/fix-vbox-parent.patch
@@ -0,0 +1,19 @@
+--- NetworkManager-strongswan-1.3.1/properties/nm-strongswan-dialog.ui
+@@ -1,10 +1,6 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <interface>
+ <!-- interface-requires gtk+ 2.12 -->
+- <object class="GtkWindow" id="strongswan-widget">
+- <property name="can_focus">False</property>
+- <property name="title" translatable="yes">window1</property>
+- <child>
+ <object class="GtkVBox" id="strongswan-vbox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+@@ -374,6 +370,4 @@
+ </packing>
+ </child>
+ </object>
+- </child>
+- </object>
+ </interface>