From a9802fd4b576b95a6b6aa9b6c75fb6de09c8b561 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 24 2021 04:23:28 +0000 Subject: import gnome-shell-3.32.2-33.el8 --- diff --git a/SOURCES/0001-shellEntry-Disconnect-handler-on-destroy.patch b/SOURCES/0001-shellEntry-Disconnect-handler-on-destroy.patch new file mode 100644 index 0000000..abf32bd --- /dev/null +++ b/SOURCES/0001-shellEntry-Disconnect-handler-on-destroy.patch @@ -0,0 +1,36 @@ +From fd8c4dc073b121b1093d68472cac3292d2c6605c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Mon, 14 Jun 2021 17:59:39 +0200 +Subject: [PATCH] shellEntry: Disconnect handler on destroy + +Actors will get unmapped on destroy, so unless we disconnect from +the notify::mapped signal, the handler will run one last time and +try to access methods/properties on the invalidated actor. +--- + js/ui/shellEntry.js | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/js/ui/shellEntry.js b/js/ui/shellEntry.js +index 4a30b22f7..53bd1daa1 100644 +--- a/js/ui/shellEntry.js ++++ b/js/ui/shellEntry.js +@@ -186,7 +186,7 @@ class CapsLockWarning extends St.Label { + this._keymap = Clutter.get_default_backend().get_keymap(); + this._stateChangedId = 0; + +- this.connect('notify::mapped', () => { ++ const mappedId = this.connect('notify::mapped', () => { + if (this.is_mapped()) { + this._stateChangedId = this._keymap.connect('state-changed', + () => this._sync(true)); +@@ -201,6 +201,7 @@ class CapsLockWarning extends St.Label { + this.connect('destroy', () => { + if (this._stateChangedId) + this._keymap.disconnect(this._stateChangedId); ++ this.disconnect(mappedId); + }); + } + +-- +2.31.1 + diff --git a/SOURCES/fix-login-lock-screen.patch b/SOURCES/fix-login-lock-screen.patch new file mode 100644 index 0000000..f714a38 --- /dev/null +++ b/SOURCES/fix-login-lock-screen.patch @@ -0,0 +1,161 @@ +From 214c4f390faa40199c03a80594313760ffe9c5a6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Fri, 20 Sep 2019 13:17:40 +0200 +Subject: [PATCH 1/2] unlockDialog: Use inheritance instead of composition + +The screen shield creates the unlock dialog based on the session mode. + +However since commit 0c0d76f7d6990 turned LoginDialog into an actor +subclass (while UnlockDialog kept using the delegate pattern), it is +no longer possible to handle both objects the same way without warnings. + +Allow this again by turning UnlockDialog into an actor subclass as well. + +https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/736 +--- + js/ui/unlockDialog.js | 46 ++++++++++++++++++++++++------------------- + 1 file changed, 26 insertions(+), 20 deletions(-) + +diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js +index 4b0470f4b..55abb652d 100644 +--- a/js/ui/unlockDialog.js ++++ b/js/ui/unlockDialog.js +@@ -1,8 +1,7 @@ + // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- + + const { AccountsService, Atk, Clutter, +- Gdm, Gio, GLib, Meta, Shell, St } = imports.gi; +-const Signals = imports.signals; ++ Gdm, Gio, GLib, GObject, Meta, Shell, St } = imports.gi; + + const Layout = imports.ui.layout; + const Main = imports.ui.main; +@@ -12,15 +11,19 @@ const AuthPrompt = imports.gdm.authPrompt; + // The timeout before going back automatically to the lock screen (in seconds) + const IDLE_TIMEOUT = 2 * 60; + +-var UnlockDialog = class { +- constructor(parentActor) { +- this.actor = new St.Widget({ accessible_role: Atk.Role.WINDOW, +- style_class: 'login-dialog', +- layout_manager: new Clutter.BoxLayout(), +- visible: false }); ++var UnlockDialog = GObject.registerClass({ ++ Signals: { 'failed': {} }, ++}, class UnlockDialog extends St.Widget { ++ _init(parentActor) { ++ super._init({ ++ accessible_role: Atk.Role.WINDOW, ++ style_class: 'login-dialog', ++ layout_manager: new Clutter.BoxLayout(), ++ visible: false, ++ }); + +- this.actor.add_constraint(new Layout.MonitorConstraint({ primary: true })); +- parentActor.add_child(this.actor); ++ this.add_constraint(new Layout.MonitorConstraint({ primary: true })); ++ parentActor.add_child(this); + + this._userManager = AccountsService.UserManager.get_default(); + this._userName = GLib.get_user_name(); +@@ -31,7 +34,7 @@ var UnlockDialog = class { + y_align: Clutter.ActorAlign.CENTER, + x_expand: true, + y_expand: true }); +- this.actor.add_child(this._promptBox); ++ this.add_child(this._promptBox); + + this._gdmClient = new Gdm.Client(); + +@@ -70,10 +73,12 @@ var UnlockDialog = class { + this._authPrompt.reset(); + this._updateSensitivity(true); + +- Main.ctrlAltTabManager.addGroup(this.actor, _("Unlock Window"), 'dialog-password-symbolic'); ++ Main.ctrlAltTabManager.addGroup(this, _("Unlock Window"), 'dialog-password-symbolic'); + + this._idleMonitor = Meta.IdleMonitor.get_core(); + this._idleWatchId = this._idleMonitor.add_idle_watch(IDLE_TIMEOUT * 1000, this._escape.bind(this)); ++ ++ this.connect('destroy', this._onDestroy.bind(this)); + } + + _updateSensitivity(sensitive) { +@@ -112,9 +117,8 @@ var UnlockDialog = class { + this._authPrompt.cancel(); + } + +- destroy() { ++ _onDestroy() { + this.popModal(); +- this.actor.destroy(); + + if (this._idleWatchId) { + this._idleMonitor.remove_watch(this._idleWatchId); +@@ -137,13 +141,16 @@ var UnlockDialog = class { + } + + open(timestamp) { +- this.actor.show(); ++ this.show(); + + if (this._isModal) + return true; + +- if (!Main.pushModal(this.actor, { timestamp: timestamp, +- actionMode: Shell.ActionMode.UNLOCK_SCREEN })) ++ let modalParams = { ++ timestamp, ++ actionMode: Shell.ActionMode.UNLOCK_SCREEN, ++ }; ++ if (!Main.pushModal(this, modalParams)) + return false; + + this._isModal = true; +@@ -153,9 +160,8 @@ var UnlockDialog = class { + + popModal(timestamp) { + if (this._isModal) { +- Main.popModal(this.actor, timestamp); ++ Main.popModal(this, timestamp); + this._isModal = false; + } + } +-}; +-Signals.addSignalMethods(UnlockDialog.prototype); ++}); +-- +2.31.1 + + +From cddeb2f4e38928e0d5e0f3a852961f639536aff3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Fri, 20 Sep 2019 13:14:40 +0200 +Subject: [PATCH 2/2] screenShield: Stop using deprecated actor property + +Both LoginDialog and UnlockDialog are now actor subclasses, so stop +using the deprecated actor delegate that will trigger a warning. + +https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/736 +--- + js/ui/screenShield.js | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js +index 2d0a429be..f97a9288a 100644 +--- a/js/ui/screenShield.js ++++ b/js/ui/screenShield.js +@@ -917,8 +917,8 @@ var ScreenShield = class { + this._lockScreenGroup.hide(); + + if (this._dialog) { +- this._dialog.actor.grab_key_focus(); +- this._dialog.actor.navigate_focus(null, St.DirectionType.TAB_FORWARD, false); ++ this._dialog.grab_key_focus(); ++ this._dialog.navigate_focus(null, St.DirectionType.TAB_FORWARD, false); + } + } + +-- +2.31.1 + diff --git a/SOURCES/gdm-networking.patch b/SOURCES/gdm-networking.patch new file mode 100644 index 0000000..4f5e2fc --- /dev/null +++ b/SOURCES/gdm-networking.patch @@ -0,0 +1,246 @@ +From ed0699886f49e5dd8d6ca9ffb60ba17cd76a810f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Mon, 7 Jun 2021 17:49:57 +0200 +Subject: [PATCH 1/5] status/network: Disable modem connection when windows + aren't allowed + +The item launches the corresponding Settings panel when activated, which +doesn't work when windows are disabled by the session mode. Rather than +failing silently, turn the item insensitive. +--- + js/ui/status/network.js | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/js/ui/status/network.js b/js/ui/status/network.js +index b3bb7589c..3ad7b04dd 100644 +--- a/js/ui/status/network.js ++++ b/js/ui/status/network.js +@@ -514,6 +514,10 @@ var NMDeviceModem = class extends NMConnectionDevice { + this._iconChanged(); + }); + } ++ ++ this._sessionUpdatedId = ++ Main.sessionMode.connect('updated', this._sessionUpdated.bind(this)); ++ this._sessionUpdated(); + } + + get category() { +@@ -525,6 +529,10 @@ var NMDeviceModem = class extends NMConnectionDevice { + 'connect-3g', this._device.get_path()]); + } + ++ _sessionUpdated() { ++ this._autoConnectItem.sensitive = Main.sessionMode.hasWindows; ++ } ++ + destroy() { + if (this._operatorNameId) { + this._mobileDevice.disconnect(this._operatorNameId); +@@ -534,6 +542,10 @@ var NMDeviceModem = class extends NMConnectionDevice { + this._mobileDevice.disconnect(this._signalQualityId); + this._signalQualityId = 0; + } ++ if (this._sessionUpdatedId) { ++ Main.sessionMode.disconnect(this._sessionUpdatedId); ++ this._sessionUpdatedId = 0; ++ } + + super.destroy(); + } +-- +2.31.1 + + +From 59d52e1591e1522fff22320c657496ca978a7926 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Mon, 7 Jun 2021 18:28:32 +0200 +Subject: [PATCH 2/5] status/network: Only list wifi networks that can be + activated + +Setting up a connection for an Enterprise WPA(2) encrypted wireless +network requires Settings. That's not available when windows are +disabled via the session mode, so filter out affected entries. +--- + js/ui/status/network.js | 29 ++++++++++++++++++++++++++++- + 1 file changed, 28 insertions(+), 1 deletion(-) + +diff --git a/js/ui/status/network.js b/js/ui/status/network.js +index 3ad7b04dd..c023022a7 100644 +--- a/js/ui/status/network.js ++++ b/js/ui/status/network.js +@@ -1,5 +1,5 @@ + // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- +-const { Clutter, Gio, GLib, GObject, NM, St } = imports.gi; ++const { Clutter, Gio, GLib, GObject, Meta, NM, St } = imports.gi; + const Mainloop = imports.mainloop; + const Signals = imports.signals; + +@@ -751,6 +751,11 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog { + this._scanTimeoutId = 0; + } + ++ if (this._syncVisibilityId) { ++ Meta.later_remove(this._syncVisibilityId); ++ this._syncVisibilityId = 0; ++ } ++ + super.destroy(); + } + +@@ -1081,9 +1086,31 @@ var NMWirelessDialog = class extends ModalDialog.ModalDialog { + this._itemBox.insert_child_at_index(network.item.actor, newPos); + } + ++ this._queueSyncItemVisibility(); + this._syncView(); + } + ++ _queueSyncItemVisibility() { ++ if (this._syncVisibilityId) ++ return; ++ ++ this._syncVisibilityId = Meta.later_add( ++ Meta.LaterType.BEFORE_REDRAW, ++ () => { ++ const { hasWindows } = Main.sessionMode; ++ const { WPA2_ENT, WPA_ENT } = NMAccessPointSecurity; ++ ++ for (const network of this._networks) { ++ const [firstAp] = network.accessPoints; ++ network.item.visible = ++ hasWindows || ++ network.connections.length > 0 || ++ (firstAp._secType !== WPA2_ENT && firstAp._secType !== WPA_ENT); ++ } ++ return GLib.SOURCE_REMOVE; ++ }); ++ } ++ + _accessPointRemoved(device, accessPoint) { + let res = this._findExistingNetwork(accessPoint); + +-- +2.31.1 + + +From 9d204cdb38bcfee214dbe0b0bf9c2073dc50fe93 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Tue, 8 Jun 2021 00:17:48 +0200 +Subject: [PATCH 3/5] status/network: Consider network-control action + +NetworkManager installs a `network-control` polkit action that can +be used to disallow network configuration, except that we happily +ignore it. Add it to the conditions that turn a network section +insensitive. +--- + js/ui/status/network.js | 20 +++++++++++++++++--- + 1 file changed, 17 insertions(+), 3 deletions(-) + +diff --git a/js/ui/status/network.js b/js/ui/status/network.js +index c023022a7..79729e01b 100644 +--- a/js/ui/status/network.js ++++ b/js/ui/status/network.js +@@ -1,5 +1,5 @@ + // -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*- +-const { Clutter, Gio, GLib, GObject, Meta, NM, St } = imports.gi; ++const { Clutter, Gio, GLib, GObject, Meta, NM, Polkit, St } = imports.gi; + const Mainloop = imports.mainloop; + const Signals = imports.signals; + +@@ -1683,11 +1683,25 @@ var NMApplet = class extends PanelMenu.SystemIndicator { + this._client.connect('connection-removed', this._connectionRemoved.bind(this)); + + Main.sessionMode.connect('updated', this._sessionUpdated.bind(this)); +- this._sessionUpdated(); ++ ++ this._configPermission = null; ++ Polkit.Permission.new( ++ 'org.freedesktop.NetworkManager.network-control', null, null, ++ (o, res) => { ++ try { ++ this._configPermission = Polkit.Permission.new_finish(res); ++ } catch (e) { ++ log('No permission to control network connections: %s'.format(e.toString())); ++ } ++ this._sessionUpdated(); ++ }); + } + + _sessionUpdated() { +- let sensitive = !Main.sessionMode.isLocked && !Main.sessionMode.isGreeter; ++ const sensitive = ++ !Main.sessionMode.isLocked && ++ !Main.sessionMode.isGreeter && ++ this._configPermission && this._configPermission.allowed; + this.menu.setSensitive(sensitive); + } + +-- +2.31.1 + + +From 7d2c8aabb86b9942c99ae9b7157dbffb875acde9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Thu, 10 Jun 2021 23:12:27 +0200 +Subject: [PATCH 4/5] sessionMode: Enable networkAgent on login screen + +We will soon enable the network sections in the status menu on the +login screen, so enable the network agent to handle authentication +requests (like wifi/VPN passwords). +--- + js/ui/sessionMode.js | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js +index 25aa75a3d..fa7f83416 100644 +--- a/js/ui/sessionMode.js ++++ b/js/ui/sessionMode.js +@@ -43,7 +43,9 @@ const _modes = { + isGreeter: true, + isPrimary: true, + unlockDialog: imports.gdm.loginDialog.LoginDialog, +- components: ['polkitAgent'], ++ components: Config.HAVE_NETWORKMANAGER ++ ? ['networkAgent', 'polkitAgent'] ++ : ['polkitAgent'], + panel: { + left: [], + center: ['dateMenu'], +-- +2.31.1 + + +From 07ce899bcb9d30991262d6c484508e6c5fa14c85 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +Date: Tue, 8 Jun 2021 00:19:26 +0200 +Subject: [PATCH 5/5] status/network: Do not disable on login screen + +We currently disable all network items on both the lock- and login +screen. While it makes sense to be very restrictive on the lock screen, +there are some (fringe) use cases for being more permissive on the +login screen (like remote home directories only accessible via VPN). + +There's precedence with the power-off/restart actions to be less +restrictive on the login screen, and since we started respecting +the `network-control` polkit action, it's possible to restore the +old behavior if desired. +--- + js/ui/status/network.js | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/js/ui/status/network.js b/js/ui/status/network.js +index 79729e01b..914dbbd99 100644 +--- a/js/ui/status/network.js ++++ b/js/ui/status/network.js +@@ -1700,7 +1700,6 @@ var NMApplet = class extends PanelMenu.SystemIndicator { + _sessionUpdated() { + const sensitive = + !Main.sessionMode.isLocked && +- !Main.sessionMode.isGreeter && + this._configPermission && this._configPermission.allowed; + this.menu.setSensitive(sensitive); + } +-- +2.31.1 + diff --git a/SPECS/gnome-shell.spec b/SPECS/gnome-shell.spec index b3eb970..475ba96 100644 --- a/SPECS/gnome-shell.spec +++ b/SPECS/gnome-shell.spec @@ -1,6 +1,6 @@ Name: gnome-shell Version: 3.32.2 -Release: 30%{?dist} +Release: 33%{?dist} Summary: Window management and application launching for GNOME Group: User Interface/Desktops @@ -26,6 +26,9 @@ Patch18: 0001-gdm-add-AuthList-control.patch Patch19: 0002-gdmUtil-enable-support-for-GDM-s-ChoiceList-PAM-exte.patch Patch20: wake-up-on-deactivate.patch Patch21: caps-lock-warning.patch +Patch22: gdm-networking.patch +Patch23: 0001-shellEntry-Disconnect-handler-on-destroy.patch +Patch24: fix-login-lock-screen.patch # Misc. Patch30: 0001-shellDBus-Add-a-DBus-method-to-load-a-single-extensi.patch @@ -253,9 +256,23 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de %{_mandir}/man1/%{name}.1.gz %changelog -* Mon Feb 22 2021 Carlos Garnacho - 3.32.2-30 +* Mon Jun 14 2021 Florian Müllner - 3.32.2-33 +- Fix warnings on unlock + Resolves: #1971534 +- Fix gdm lock screen + Resolves: #1971507 + +* Thu Jun 10 2021 Florian Müllner - 3.32.2-32 +- Fix network secret requests on login screen + Related: #1935261 + +* Wed Jun 09 2021 Florian Müllner - 3.32.2-31 - Backport of touch mode - Resolves: #1833787 + Resolves: #1937866 + +* Tue Jun 08 2021 Florian Müllner - 3.32.2-30 +- Do not disable network actions on login screen + Resolves: #1935261 * Mon Feb 01 2021 Florian Müllner - 3.32.2-29 - Refuse to override system extensions