From: Jelle Licht <jlicht@fsfe.org>
To: 36542@debbugs.gnu.org
Subject: [bug#36542] [PATCH 1/6] gnu: network-manager: Fix plugin loading problem.
Date: Sun, 7 Jul 2019 21:28:43 +0200 [thread overview]
Message-ID: <20190707192848.10049-1-jlicht@fsfe.org> (raw)
In-Reply-To: <875zodk5lw.fsf@jlicht.xyz>
From: Tomáš Čech <sleep_walker@gnu.org>
* gnu/packages/patches/nm-plugin-path.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/gnome.scm (network-manager)[source](patches): New field.
---
gnu/local.mk | 1 +
gnu/packages/gnome.scm | 1 +
gnu/packages/patches/nm-plugin-path.patch | 51 +++++++++++++++++++++++
3 files changed, 53 insertions(+)
create mode 100644 gnu/packages/patches/nm-plugin-path.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 734676f45a..4fa04937ca 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1115,6 +1115,7 @@ dist_patch_DATA = \
%D%/packages/patches/netsurf-longer-test-timeout.patch \
%D%/packages/patches/nfs-utils-missing-headers.patch \
%D%/packages/patches/ngircd-handle-zombies.patch \
+ %D%/packages/patches/nm-plugin-path.patch \
%D%/packages/patches/nss-increase-test-timeout.patch \
%D%/packages/patches/nss-pkgconfig.patch \
%D%/packages/patches/ntfs-3g-CVE-2019-9755.patch \
diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 4b1dbbdb49..a4e6375542 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -5298,6 +5298,7 @@ users.")
(uri (string-append "mirror://gnome/sources/NetworkManager/"
(version-major+minor version) "/"
"NetworkManager-" version ".tar.xz"))
+ (patches (search-patches "nm-plugin-path.patch"))
(sha256
(base32
"1jn3g0f2x1irc88awqp8m3gnpdx1whqqqbdgkbgr4x55s702jki4"))
diff --git a/gnu/packages/patches/nm-plugin-path.patch b/gnu/packages/patches/nm-plugin-path.patch
new file mode 100644
index 0000000000..505ae31534
--- /dev/null
+++ b/gnu/packages/patches/nm-plugin-path.patch
@@ -0,0 +1,51 @@
+From d3026a6d331298003ccc6cd9d2e20dcb7fa9ae1d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20=C4=8Cech?= <sleep_walker@gnu.org>
+Date: Wed, 3 Jul 2019 13:31:54 +0200
+Subject: [PATCH] respect NM_VPN_PLUGIN_DIR
+
+---
+ src/vpn/nm-vpn-manager.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+diff --git a/src/vpn/nm-vpn-manager.c b/src/vpn/nm-vpn-manager.c
+index d063916..d779166 100644
+--- a/src/vpn/nm-vpn-manager.c
++++ b/src/vpn/nm-vpn-manager.c
+@@ -223,6 +223,7 @@ nm_vpn_manager_init (NMVpnManager *self)
+ GSList *infos, *info;
+ const char *conf_dir_etc = _nm_vpn_plugin_info_get_default_dir_etc ();
+ const char *conf_dir_lib = _nm_vpn_plugin_info_get_default_dir_lib ();
++ const char *conf_dir_user = _nm_vpn_plugin_info_get_default_dir_user ();
+
+ /* Watch the VPN directory for changes */
+ file = g_file_new_for_path (conf_dir_lib);
+@@ -241,6 +242,14 @@ nm_vpn_manager_init (NMVpnManager *self)
+ G_CALLBACK (vpn_dir_changed), self);
+ }
+
++ file = g_file_new_for_path (conf_dir_user);
++ priv->monitor_etc = g_file_monitor_directory (file, G_FILE_MONITOR_NONE, NULL, NULL);
++ g_object_unref (file);
++ if (priv->monitor_etc) {
++ priv->monitor_id_etc = g_signal_connect (priv->monitor_etc, "changed",
++ G_CALLBACK (vpn_dir_changed), self);
++ }
++
+ /* first read conf_dir_lib. The name files are not really user configuration, but
+ * plugin configuration. Hence we expect ~newer~ plugins to install their files
+ * in /usr/lib/NetworkManager. We want to prefer those files.
+@@ -255,6 +264,11 @@ nm_vpn_manager_init (NMVpnManager *self)
+ try_add_plugin (self, info->data);
+ g_slist_free_full (infos, g_object_unref);
+
++ infos = _nm_vpn_plugin_info_list_load_dir (conf_dir_user, TRUE, 0, NULL, NULL);
++ for (info = infos; info; info = info->next)
++ try_add_plugin (self, info->data);
++ g_slist_free_full (infos, g_object_unref);
++
+ priv->active_services = g_hash_table_new_full (nm_str_hash, g_str_equal, g_free, NULL);
+ }
+
+--
+2.22.0
+
--
2.22.0
next prev parent reply other threads:[~2019-07-07 19:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-07 19:27 [bug#36542] [PATCH 0/6] Fix network-manager vpn plugins Jelle Licht
2019-07-07 19:28 ` Jelle Licht [this message]
2019-07-07 19:28 ` [bug#36542] [PATCH 2/6] services: network-manager: Properly load " Jelle Licht
2019-07-07 19:28 ` [bug#36542] [PATCH 3/6] services: network-manager: Clear default OpenVPN user Jelle Licht
2019-07-07 19:28 ` [bug#36542] [PATCH 4/6] gnu: network-manager-openvpn: Pass '--localstatedir=/var' Jelle Licht
2019-07-07 19:28 ` [bug#36542] [PATCH 5/6] gnu: network-manager-openvpn: Patch hardcoded paths Jelle Licht
2019-07-07 19:28 ` [bug#36542] [PATCH 6/6] gnu: Add network-manager-vpnc Jelle Licht
2019-07-13 9:54 ` [bug#36542] [PATCH 1/6] gnu: network-manager: Fix plugin loading problem Ludovic Courtès
2019-07-17 9:30 ` bug#36542: " Jelle Licht
2019-07-07 21:35 ` [bug#36542] [PATCH 0/6] Fix network-manager vpn plugins Pierre Langlois
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190707192848.10049-1-jlicht@fsfe.org \
--to=jlicht@fsfe.org \
--cc=36542@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).