[arch-commits] Commit in network-manager-applet/repos/extra-x86_64 (4 files)
Jan Steffens
heftig at archlinux.org
Thu Dec 21 18:41:57 UTC 2017
Date: Thursday, December 21, 2017 @ 18:41:56
Author: heftig
Revision: 313499
archrelease: copy trunk to extra-x86_64
Added:
network-manager-applet/repos/extra-x86_64/0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch
(from rev 313498, network-manager-applet/trunk/0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch)
network-manager-applet/repos/extra-x86_64/PKGBUILD
(from rev 313498, network-manager-applet/trunk/PKGBUILD)
Deleted:
network-manager-applet/repos/extra-x86_64/0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch
network-manager-applet/repos/extra-x86_64/PKGBUILD
-----------------------------------------------------------------+
0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch | 113 ++++---
PKGBUILD | 160 +++++-----
2 files changed, 146 insertions(+), 127 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-21 18:41:17 UTC (rev 313498)
+++ 0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch 2017-12-21 18:41:56 UTC (rev 313499)
@@ -1,47 +0,0 @@
-From d4dee89e97952dff63a65ea850ab7aeac2d1f9c0 Mon Sep 17 00:00:00 2001
-Message-Id: <d4dee89e97952dff63a65ea850ab7aeac2d1f9c0.1513880568.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 | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/shared/nm-utils/nm-compat.c b/shared/nm-utils/nm-compat.c
-index 22ab675de8373639..ba50a509a3a5f530 100644
---- a/shared/nm-utils/nm-compat.c
-+++ b/shared/nm-utils/nm-compat.c
-@@ -54,15 +54,15 @@ _get_keys (NMSettingVpn *setting,
- if (a->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
-
Copied: network-manager-applet/repos/extra-x86_64/0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch (from rev 313498, 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 (rev 0)
+++ 0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch 2017-12-21 18:41:56 UTC (rev 313499)
@@ -0,0 +1,66 @@
+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
+
Property changes on: network-manager-applet/repos/extra-x86_64/0001-shared-compat-Fix-memory-handling-of-nm_setting_vpn_.patch
___________________________________________________________________
Added: svn:mergeinfo
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2017-12-21 18:41:17 UTC (rev 313498)
+++ PKGBUILD 2017-12-21 18:41:56 UTC (rev 313499)
@@ -1,80 +0,0 @@
-# $Id$
-# Maintainer: Jan de Groot <jgc at archlinux.org>
-# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
-# Contributor: Arjan Timmerman <arjan at archlinux.org>
-# Contributor: Wael Nasreddine <gandalf at siemens-mobiles.org>
-# Contributor: Tor Krill <tor at krill.nu>
-# Contributor: Will Rea <sillywilly at gmail.com>
-
-pkgbase=network-manager-applet
-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=4
-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'
- '34a9e2232dc93be3f35c5e25ed26f7a687063a55d3a21e05f77e52f469f8b71a')
-
-pkgver() {
- cd $pkgbase
- git describe --tags | sed 's/-dev/dev/;s/-/+/g'
-}
-
-prepare() {
- 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() {
- cd build
- arch-meson ../$pkgbase -Dselinux=false
- ninja
-}
-
-check() {
- cd build
- meson test
-}
-
-package_nm-connection-editor() {
- pkgdesc="NetworkManager GUI connection editor and widgets"
- provides=("libnm-gtk=$pkgver-$pkgrel" "libnma=$pkgver-$pkgrel")
- conflicts=(libnm-gtk)
- replaces=(libnm-gtk)
-
- cd build
- DESTDIR="$pkgdir" ninja install
-
-### Split network-manager-applet
- cd ../nma
- mv "$pkgdir"/etc/xdg/autostart etc/xdg/
- mv "$pkgdir"/usr/bin/nm-applet usr/bin/
- mv "$pkgdir"/usr/share/GConf usr/share/
-
- cd usr/share
- mv "$pkgdir"/usr/share/applications/nm-applet.desktop applications/
- mv "$pkgdir"/usr/share/man/man1/nm-applet.1 man/man1/
-
- cd icons/hicolor/22x22
- mv "$pkgdir"/usr/share/icons/hicolor/22x22/apps/nm-{adhoc,mb-roam,wwan-tower}.png apps/
- mv "$pkgdir"/usr/share/icons/hicolor/22x22/apps/nm-{secure,vpn-active}-lock.png apps/
- mv "$pkgdir"/usr/share/icons/hicolor/22x22/apps/nm-{signal,tech}-*.png apps/
- mv "$pkgdir"/usr/share/icons/hicolor/22x22/apps/nm-*connecting*.png apps/
-}
-
-package_network-manager-applet() {
- depends=(nm-connection-editor libmm-glib libnotify libsecret networkmanager)
- mv nma/* "$pkgdir"
-}
Copied: network-manager-applet/repos/extra-x86_64/PKGBUILD (from rev 313498, network-manager-applet/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2017-12-21 18:41:56 UTC (rev 313499)
@@ -0,0 +1,80 @@
+# $Id$
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens at gmail.com>
+# Contributor: Arjan Timmerman <arjan at archlinux.org>
+# Contributor: Wael Nasreddine <gandalf at siemens-mobiles.org>
+# Contributor: Tor Krill <tor at krill.nu>
+# Contributor: Will Rea <sillywilly at gmail.com>
+
+pkgbase=network-manager-applet
+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
+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')
+
+pkgver() {
+ cd $pkgbase
+ git describe --tags | sed 's/-dev/dev/;s/-/+/g'
+}
+
+prepare() {
+ 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() {
+ cd build
+ arch-meson ../$pkgbase -Dselinux=false
+ ninja
+}
+
+check() {
+ cd build
+ meson test
+}
+
+package_nm-connection-editor() {
+ pkgdesc="NetworkManager GUI connection editor and widgets"
+ provides=("libnm-gtk=$pkgver-$pkgrel" "libnma=$pkgver-$pkgrel")
+ conflicts=(libnm-gtk)
+ replaces=(libnm-gtk)
+
+ cd build
+ DESTDIR="$pkgdir" ninja install
+
+### Split network-manager-applet
+ cd ../nma
+ mv "$pkgdir"/etc/xdg/autostart etc/xdg/
+ mv "$pkgdir"/usr/bin/nm-applet usr/bin/
+ mv "$pkgdir"/usr/share/GConf usr/share/
+
+ cd usr/share
+ mv "$pkgdir"/usr/share/applications/nm-applet.desktop applications/
+ mv "$pkgdir"/usr/share/man/man1/nm-applet.1 man/man1/
+
+ cd icons/hicolor/22x22
+ mv "$pkgdir"/usr/share/icons/hicolor/22x22/apps/nm-{adhoc,mb-roam,wwan-tower}.png apps/
+ mv "$pkgdir"/usr/share/icons/hicolor/22x22/apps/nm-{secure,vpn-active}-lock.png apps/
+ mv "$pkgdir"/usr/share/icons/hicolor/22x22/apps/nm-{signal,tech}-*.png apps/
+ mv "$pkgdir"/usr/share/icons/hicolor/22x22/apps/nm-*connecting*.png apps/
+}
+
+package_network-manager-applet() {
+ depends=(nm-connection-editor libmm-glib libnotify libsecret networkmanager)
+ mv nma/* "$pkgdir"
+}
Property changes on: network-manager-applet/repos/extra-x86_64/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: svn:mergeinfo
More information about the arch-commits
mailing list