aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJory Pratt <anarchy@gentoo.org>2020-12-16 21:12:30 -0600
committerJory Pratt <anarchy@gentoo.org>2020-12-16 21:12:30 -0600
commite0e6e12e5e31690ce996a3ae71f4ecfde7cd4565 (patch)
tree8eda00090079cefd3b36782f35fb383a9d40446e /net-misc
parentsys-devel/lld: Version bump current stable (diff)
downloadmusl-e0e6e12e5e31690ce996a3ae71f4ecfde7cd4565.tar.gz
musl-e0e6e12e5e31690ce996a3ae71f4ecfde7cd4565.tar.bz2
musl-e0e6e12e5e31690ce996a3ae71f4ecfde7cd4565.zip
net-misc/networkmanager: sync with stable ::gentoo
Package-Manager: Portage-3.0.12, Repoman-3.0.2 Signed-off-by: Jory Pratt <anarchy@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/networkmanager/Manifest2
-rw-r--r--net-misc/networkmanager/files/networkmanager-1.26.4-iwd-fixes-pr640.patch169
-rw-r--r--net-misc/networkmanager/networkmanager-1.26.4.ebuild (renamed from net-misc/networkmanager/networkmanager-1.26.0-r1.ebuild)9
3 files changed, 177 insertions, 3 deletions
diff --git a/net-misc/networkmanager/Manifest b/net-misc/networkmanager/Manifest
index db1ec14..a11544c 100644
--- a/net-misc/networkmanager/Manifest
+++ b/net-misc/networkmanager/Manifest
@@ -1 +1 @@
-DIST NetworkManager-1.26.0.tar.xz 4956796 BLAKE2B 752b6b47387bac5787d06be7f31cc7387798d0c917977c8e72d6d21538a86c167003901d628e596109aec28816f56fd8cd6bf2b46a8d4918a7e6cf1946586550 SHA512 46035fda8f154497ba4a634e4bf7f0a11f579d0d3f4ffdcea7d47ea0bde6dd0183885491f5453255af7b163ae3db4f0c62c3161913a8c30c35b6475887235b6d
+DIST NetworkManager-1.26.4.tar.xz 5051424 BLAKE2B 53a8fd9f9a061b9ac6b117f431e72b1967cfd2fffb539e0dc9335c37a3a59dc33562e81f7887019c3460f403a95b96e8105b1ae41b00c8488ae12a370a3d82ff SHA512 91e865c83a6ae694c9f6aa50e7f938dfa55bfddac32a6dfb73e6edb34b2539068ff9f83bf662bb2d689bd3c66cf53d7fa015930940cf7bda2d4a16561cf02328
diff --git a/net-misc/networkmanager/files/networkmanager-1.26.4-iwd-fixes-pr640.patch b/net-misc/networkmanager/files/networkmanager-1.26.4-iwd-fixes-pr640.patch
new file mode 100644
index 0000000..b3b6375
--- /dev/null
+++ b/net-misc/networkmanager/files/networkmanager-1.26.4-iwd-fixes-pr640.patch
@@ -0,0 +1,169 @@
+Backport of https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/640
+
+--- a/src/devices/wifi/nm-device-iwd.c
++++ b/src/devices/wifi/nm-device-iwd.c
+@@ -1905,38 +1905,39 @@ schedule_periodic_scan (NMDeviceIwd *self, gboolean initial_scan)
+ {
+ NMDeviceIwdPrivate *priv = NM_DEVICE_IWD_GET_PRIVATE (self);
+ GVariant *value;
+- gboolean disconnected;
++ gboolean disconnected = TRUE;
+ guint interval;
+
+- if (!priv->can_scan || priv->scan_requested)
+- return;
+-
+- value = g_dbus_proxy_get_cached_property (priv->dbus_station_proxy, "State");
+- disconnected = nm_streq0 (get_variant_state (value), "disconnected");
+- g_variant_unref (value);
++ if (priv->can_scan) {
++ value = g_dbus_proxy_get_cached_property (priv->dbus_station_proxy, "State");
++ disconnected = nm_streq0 (get_variant_state (value), "disconnected");
++ g_variant_unref (value);
++ }
+
+ /* Start scan immediately after a disconnect, mode change or
+- * device UP, otherwise wait a period dependent on the current
+- * state.
++ * device UP, otherwise wait 10 seconds. When connected, update
++ * AP list mainly on UI requests.
+ *
+ * (initial_scan && disconnected) override priv->scanning below
+ * because of an IWD quirk where a device will often be in the
+ * autoconnect state and scanning at the time of our initial_scan,
+- * but our logic will the send it a Disconnect() causeing IWD to
++ * but our logic will then send it a Disconnect() causing IWD to
+ * exit autoconnect and interrupt the ongoing scan, meaning that
+ * we still want a new scan ASAP.
+ */
+- if (initial_scan && disconnected)
++ if (!priv->can_scan || !disconnected || priv->scan_requested || priv->scanning)
++ interval = -1;
++ else if (initial_scan)
+ interval = 0;
+- else if (!priv->periodic_scan_id && !priv->scanning)
+- interval = disconnected ? 10 : 20;
++ else if (!priv->periodic_scan_id)
++ interval = 10;
+ else
+ return;
+
+ nm_clear_g_source (&priv->periodic_scan_id);
+- priv->periodic_scan_id = g_timeout_add_seconds (interval,
+- periodic_scan_timeout_cb,
+- self);
++
++ if (interval != (guint) -1)
++ priv->periodic_scan_id = g_timeout_add_seconds (interval, periodic_scan_timeout_cb, self);
+ }
+
+ static void
+@@ -2331,7 +2332,6 @@ powered_changed (NMDeviceIwd *self, gboolean new_powered)
+ update_aps (self);
+ } else {
+ set_can_scan (self, FALSE);
+- nm_clear_g_source (&priv->periodic_scan_id);
+ priv->scanning = FALSE;
+ priv->scan_requested = FALSE;
+ priv->can_connect = FALSE;
+@@ -2537,17 +2537,7 @@ dispose (GObject *object)
+
+ nm_clear_g_cancellable (&priv->cancellable);
+
+- nm_clear_g_source (&priv->periodic_scan_id);
+-
+- cleanup_association_attempt (self, TRUE);
+-
+- g_clear_object (&priv->dbus_device_proxy);
+- g_clear_object (&priv->dbus_station_proxy);
+- g_clear_object (&priv->dbus_ap_proxy);
+- g_clear_object (&priv->dbus_adhoc_proxy);
+- g_clear_object (&priv->dbus_obj);
+-
+- remove_all_aps (self);
++ nm_device_iwd_set_dbus_object(self, NULL);
+
+ G_OBJECT_CLASS (nm_device_iwd_parent_class)->dispose (object);
+
+--- a/src/devices/wifi/nm-iwd-manager.c
++++ b/src/devices/wifi/nm-iwd-manager.c
+@@ -622,6 +622,38 @@ interface_removed (GDBusObjectManager *object_manager, GDBusObject *object,
+ }
+ }
+
++static void
++object_added(GDBusObjectManager *object_manager, GDBusObject *object, gpointer user_data)
++{
++ GList *interfaces, *iter;
++
++ interfaces = g_dbus_object_get_interfaces(object);
++
++ for (iter = interfaces; iter; iter = iter->next) {
++ GDBusInterface *interface = G_DBUS_INTERFACE(iter->data);
++
++ interface_added(NULL, object, interface, user_data);
++ }
++
++ g_list_free_full(interfaces, g_object_unref);
++}
++
++static void
++object_removed(GDBusObjectManager *object_manager, GDBusObject *object, gpointer user_data)
++{
++ GList *interfaces, *iter;
++
++ interfaces = g_dbus_object_get_interfaces(object);
++
++ for (iter = interfaces; iter; iter = iter->next) {
++ GDBusInterface *interface = G_DBUS_INTERFACE(iter->data);
++
++ interface_removed(NULL, object, interface, user_data);
++ }
++
++ g_list_free_full(interfaces, g_object_unref);
++}
++
+ static void
+ connection_removed (NMSettings *settings,
+ NMSettingsConnection *sett_conn,
+@@ -682,22 +714,6 @@ _om_has_name_owner (GDBusObjectManager *object_manager)
+ return !!name_owner;
+ }
+
+-static void
+-object_added (NMIwdManager *self, GDBusObject *object)
+-{
+- GList *interfaces, *iter;
+-
+- interfaces = g_dbus_object_get_interfaces (object);
+-
+- for (iter = interfaces; iter; iter = iter->next) {
+- GDBusInterface *interface = G_DBUS_INTERFACE (iter->data);
+-
+- interface_added (NULL, object, interface, self);
+- }
+-
+- g_list_free_full (interfaces, g_object_unref);
+-}
+-
+ static void
+ release_object_manager (NMIwdManager *self)
+ {
+@@ -836,12 +852,16 @@ got_object_manager (GObject *object, GAsyncResult *result, gpointer user_data)
+ G_CALLBACK (interface_added), self);
+ g_signal_connect (priv->object_manager, "interface-removed",
+ G_CALLBACK (interface_removed), self);
++ g_signal_connect (priv->object_manager, "object-added",
++ G_CALLBACK(object_added), self);
++ g_signal_connect (priv->object_manager, "object-removed",
++ G_CALLBACK(object_removed), self);
+
+ g_hash_table_remove_all (priv->known_networks);
+
+ objects = g_dbus_object_manager_get_objects (object_manager);
+ for (iter = objects; iter; iter = iter->next)
+- object_added (self, G_DBUS_OBJECT (iter->data));
++ object_added (NULL, G_DBUS_OBJECT(iter->data), self);
+
+ g_list_free_full (objects, g_object_unref);
+
diff --git a/net-misc/networkmanager/networkmanager-1.26.0-r1.ebuild b/net-misc/networkmanager/networkmanager-1.26.4.ebuild
index 243c99d..ff6099b 100644
--- a/net-misc/networkmanager/networkmanager-1.26.0-r1.ebuild
+++ b/net-misc/networkmanager/networkmanager-1.26.4.ebuild
@@ -27,7 +27,7 @@ REQUIRED_USE="
?? ( elogind systemd )
"
-KEYWORDS="amd64 arm arm64 ppc ppc64 x86"
+KEYWORDS="amd64 arm arm64 ~ppc ~ppc64 x86"
# gobject-introspection-0.10.3 is needed due to gnome bug 642300
# wpa_supplicant-0.7.3-r3 is needed due to bug 359271
@@ -100,7 +100,7 @@ DEPEND="${COMMON_DEPEND}
)
"
-PATCHES=(
+PATCHES=( "${FILESDIR}"/${PN}-1.26.4-iwd-fixes-pr640.patch
# Required to build on musl
"${FILESDIR}"/musl-basic.patch
"${FILESDIR}"/musl-network-support.patch
@@ -166,6 +166,11 @@ src_prepare() {
use vala && vala_src_prepare
gnome2_src_prepare
+
+ sed -i \
+ -e 's#/usr/bin/sed#/bin/sed#' \
+ data/84-nm-drivers.rules \
+ || die
}
multilib_src_configure() {