[arch-commits] Commit in network-manager-applet/trunk (2 files)

Jan Steffens heftig at archlinux.org
Fri Dec 22 20:14:34 UTC 2017


    Date: Friday, December 22, 2017 @ 20:14:34
  Author: heftig
Revision: 313546

1.8.11dev+7+ga52ccb2f-1

Modified:
  network-manager-applet/trunk/PKGBUILD
Deleted:
  network-manager-applet/trunk/0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch

-----------------------------------------------------------------+
 0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch |   66 ----------
 PKGBUILD                                                        |   15 --
 2 files changed, 5 insertions(+), 76 deletions(-)

Deleted: 0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch
===================================================================
--- 0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch	2017-12-22 18:16:59 UTC (rev 313545)
+++ 0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch	2017-12-22 20:14:34 UTC (rev 313546)
@@ -1,66 +0,0 @@
-From 313649cccb8aa137ef7135f69dc56fd6fcf1a1db Mon Sep 17 00:00:00 2001
-Message-Id: <313649cccb8aa137ef7135f69dc56fd6fcf1a1db.1513881566.git.jan.steffens at gmail.com>
-From: "Jan Alexander Steffens (heftig)" <jan.steffens at gmail.com>
-Date: Thu, 21 Dec 2017 18:22:55 +0100
-Subject: [PATCH] shared/compat: Fix memory handling of
- nm_setting_vpn_get_*_keys (v2)
-
-The compat implementations return a (transfer none) strv instead of a
-(transfer container) one. This has caused double frees in nm-applet:
-https://bugs.archlinux.org/task/56772
-
-We still need to copy the keys because nm_setting_vpn_foreach_* provides
-us with copies that are freed after the iteration.
-
-Fix this by handing out a duplicate of the array.
-
-Fixes: 272439cb2077a889485dd195bb6b99ca91d3e3bf
----
- shared/nm-utils/nm-compat.c | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/shared/nm-utils/nm-compat.c b/shared/nm-utils/nm-compat.c
-index 22ab675de8373639..b470e804c08441b4 100644
---- a/shared/nm-utils/nm-compat.c
-+++ b/shared/nm-utils/nm-compat.c
-@@ -44,25 +44,32 @@ _get_keys (NMSettingVpn *setting,
- 
- 	nm_assert (NM_IS_SETTING_VPN (setting));
- 
--	a = g_ptr_array_new ();
-+	if (is_secrets)
-+		len = nm_setting_vpn_get_num_secrets (setting);
-+	else
-+		len = nm_setting_vpn_get_num_data_items (setting);
-+
-+	a = g_ptr_array_new_full (len + 1, (GDestroyNotify) g_free);
-+
- 	if (is_secrets)
- 		nm_setting_vpn_foreach_secret (setting, _get_keys_cb, a);
- 	else
- 		nm_setting_vpn_foreach_data_item (setting, _get_keys_cb, a);
-+
- 	len = a->len;
- 
--	if (a->len) {
-+	if (len) {
- 		g_ptr_array_sort (a, nm_strcmp_p);
- 		g_ptr_array_add (a, NULL);
--		keys = (const char **) g_ptr_array_free (g_steal_pointer (&a), FALSE);
-+		keys = g_memdup (a->pdata, a->len * sizeof *keys);
- 
- 		/* we need to cache the keys *somewhere*. */
- 		g_object_set_qdata_full (G_OBJECT (setting),
- 		                         is_secrets
- 		                         ? NM_CACHED_QUARK ("libnm._nm_setting_vpn_get_secret_keys")
- 		                         : NM_CACHED_QUARK ("libnm._nm_setting_vpn_get_data_keys"),
--		                         keys,
--		                         (GDestroyNotify) g_strfreev);
-+		                         g_ptr_array_ref (a),
-+		                         (GDestroyNotify) g_ptr_array_unref);
- 	}
- 
- 	NM_SET_OUT (out_length, len);
--- 
-2.15.1
-

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-12-22 18:16:59 UTC (rev 313545)
+++ PKGBUILD	2017-12-22 20:14:34 UTC (rev 313546)
@@ -10,18 +10,16 @@
 pkgname=(nm-connection-editor network-manager-applet)
 pkgdesc="Applet for managing network connections"
 url="https://wiki.gnome.org/Projects/NetworkManager/"
-pkgver=1.8.10
-pkgrel=5
+pkgver=1.8.11dev+7+ga52ccb2f
+pkgrel=1
 arch=(x86_64)
 license=(GPL2 LGPL2.1)
 depends=(libnm-glib libgudev gtk3 mobile-broadband-provider-info iso-codes gcr)
 makedepends=(libsecret libnotify libmm-glib intltool gobject-introspection git gtk-doc meson)
 options=(!emptydirs)
-_commit=79bd00df3c1b7eb69db0f890ddb38516d7b4db5e  # tags/1.8.10^0
-source=("git+https://git.gnome.org/browse/network-manager-applet#commit=$_commit"
-        0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch)
-sha256sums=('SKIP'
-            'da92d8988face3cf9ec618326151d44459df122b320801782e267af721ad9eb2')
+_commit=a52ccb2fe170558fc0aab4dd1d15ba8808b10951  # master
+source=("git+https://git.gnome.org/browse/network-manager-applet#commit=$_commit")
+sha256sums=('SKIP')
 
 pkgver() {
   cd $pkgbase
@@ -32,9 +30,6 @@
   mkdir -p build nma/etc/xdg nma/usr/bin \
     nma/usr/share/{applications,icons/hicolor/22x22/apps,man/man1,nm-applet}
   cd $pkgbase
-
-  # https://bugs.archlinux.org/task/56772
-  patch -Np1 -i ../0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch
 }
 
 build() {



More information about the arch-commits mailing list