From 6f43c476bc8ede8813a5a3abfd98c87e120d5a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 6 Sep 2023 21:05:02 +0200 Subject: [PATCH] Support OWE networks Resolves: #2236665 --- gnome-shell.spec | 7 ++- owe-support.patch | 107 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 owe-support.patch diff --git a/gnome-shell.spec b/gnome-shell.spec index caee0c4..664ccea 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -2,7 +2,7 @@ Name: gnome-shell Version: 40.10 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Window management and application launching for GNOME License: GPLv2+ @@ -56,6 +56,7 @@ Patch52: 0001-osk-layouts-Replace-SS-extra-key-with.patch Patch53: 0001-po-Update-translations.patch Patch54: 0001-st-icon-Only-get-resource-scale-after-peeking-theme-.patch Patch55: 0001-window-tracker-Only-emit-tracked-windows-changed-on-.patch +Patch56: owe-support.patch %define eds_version 3.33.1 %define gnome_desktop_version 3.35.91 @@ -275,6 +276,10 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de %{_mandir}/man1/gnome-shell.1* %changelog +* Wed Sep 06 2023 Florian Müllner - 40.10-14 +- Support OWE networks + Resolves: #2236665 + * Mon May 15 2023 Ray Strode - 40.10-13 - Don't reset smartcard conversation twice when smartcard is inserted. Resolves: #2140898 diff --git a/owe-support.patch b/owe-support.patch new file mode 100644 index 0000000..4dcb66f --- /dev/null +++ b/owe-support.patch @@ -0,0 +1,107 @@ +From ad431c28788ac1a4ec815cc4985cdb09a1a82226 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Mon, 11 Sep 2023 19:20:14 +0200 +Subject: [PATCH 1/2] status/network: Fix fallback SSID label + +We currently only return the fallback label if the string returned +from the ssid was invalid or couldn't be transformed to UTF-8. + +If the ssid parameter itself is empty, we throw an error. + +Handle this case as well, as callers otherwise would need to duplicate +the existing error path themselves. +--- + js/ui/status/network.js | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/js/ui/status/network.js b/js/ui/status/network.js +index 1f17ca8f97..99a8d51f82 100644 +--- a/js/ui/status/network.js ++++ b/js/ui/status/network.js +@@ -67,7 +67,9 @@ function signalToIcon(value) { + } + + function ssidToLabel(ssid) { +- let label = NM.utils_ssid_to_utf8(ssid.get_data()); ++ let label; ++ if (ssid) ++ label = NM.utils_ssid_to_utf8(ssid.get_data()); + if (!label) + label = _(""); + return label; +-- +2.41.0 + + +From 0409f18446cb55a45187e00feadb12e4389381dd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Wed, 30 Aug 2023 01:47:00 +0200 +Subject: [PATCH 2/2] status/network: Use connection name with hidden AP + +When connected to an OWE transition network, NetworkManager +reports the connected API with a hidden SSID. + +Handle this by using the active connection's name before +ultimately falling back to the device name. + +https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6918 + +Part-of: + +--- + js/ui/status/network.js | 28 +++++++++++++++++++--------- + 1 file changed, 19 insertions(+), 9 deletions(-) + +diff --git a/js/ui/status/network.js b/js/ui/status/network.js +index 99a8d51f82..b407d8e78d 100644 +--- a/js/ui/status/network.js ++++ b/js/ui/status/network.js +@@ -1395,26 +1395,36 @@ var NMDeviceWireless = class { + _getStatus() { + let ap = this._device.active_access_point; + +- if (this._isHotSpotMaster()) ++ if (this._isHotSpotMaster()) { + /* Translators: %s is a network identifier */ + return _("%s Hotspot Active").format(this._description); +- else if (this._device.state >= NM.DeviceState.PREPARE && +- this._device.state < NM.DeviceState.ACTIVATED) ++ } else if (this._device.state >= NM.DeviceState.PREPARE && ++ this._device.state < NM.DeviceState.ACTIVATED) { + /* Translators: %s is a network identifier */ + return _("%s Connecting").format(this._description); +- else if (ap) +- return ssidToLabel(ap.get_ssid()); +- else if (!this._client.wireless_hardware_enabled) ++ } else if (ap) { ++ const ssid = ap.get_ssid(); ++ if (ssid) ++ return ssidToLabel(ssid); ++ ++ // Use connection name when connected to hidden AP ++ const activeConnection = this._device.get_active_connection(); ++ if (activeConnection) ++ return activeConnection.connection.get_id(); ++ ++ return ssidToLabel(null); ++ } else if (!this._client.wireless_hardware_enabled) { + /* Translators: %s is a network identifier */ + return _("%s Hardware Disabled").format(this._description); +- else if (!this._client.wireless_enabled) ++ } else if (!this._client.wireless_enabled) { + /* Translators: %s is a network identifier */ + return _("%s Off").format(this._description); +- else if (this._device.state == NM.DeviceState.DISCONNECTED) ++ } else if (this._device.state == NM.DeviceState.DISCONNECTED) { + /* Translators: %s is a network identifier */ + return _("%s Not Connected").format(this._description); +- else ++ } else { + return ''; ++ } + } + + _getMenuIcon() { +-- +2.41.0 +