From b2b0baccf77bf659c330d4982a9c6a3758af4204 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 11 Feb 2024 20:44:32 +0100 Subject: [PATCH] Backport F40 changes Resolves: RHEL-30223 --- .gitignore | 3 + ...Work-around-failing-fingerprint-auth.patch | 30 ++-- ...board-Add-a-catch-around-reload-call.patch | 35 ----- ...Load-keyboard-from-system-settings-i.patch | 130 ------------------ ...Use-gnome-desktop-API-for-getting-de.patch | 125 ----------------- gnome-shell-favourite-apps-firefox.patch | 17 +-- gnome-shell.spec | 14 +- sources | 2 +- 8 files changed, 31 insertions(+), 325 deletions(-) delete mode 100644 0001-status-keyboard-Add-a-catch-around-reload-call.patch delete mode 100644 0002-status-keyboard-Load-keyboard-from-system-settings-i.patch delete mode 100644 0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch diff --git a/.gitignore b/.gitignore index 0fbb334..45e7102 100644 --- a/.gitignore +++ b/.gitignore @@ -222,3 +222,6 @@ gnome-shell-2.31.5.tar.bz2 /gnome-shell-45.1.tar.xz /gnome-shell-45.2.tar.xz /gnome-shell-46.alpha.tar.xz +/gnome-shell-46.beta.tar.xz +/gnome-shell-46.rc.tar.xz +/gnome-shell-46.0.tar.xz diff --git a/0001-gdm-Work-around-failing-fingerprint-auth.patch b/0001-gdm-Work-around-failing-fingerprint-auth.patch index caac09f..2baa7b6 100644 --- a/0001-gdm-Work-around-failing-fingerprint-auth.patch +++ b/0001-gdm-Work-around-failing-fingerprint-auth.patch @@ -1,4 +1,4 @@ -From 22df9fa5e3c973d5a194f2bbdbcdd4a64511bc93 Mon Sep 17 00:00:00 2001 +From ff73f820b1398e5d60b8984b0003db46ad70b8ec Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Wed, 28 Apr 2021 16:50:03 +0200 Subject: [PATCH] gdm: Work around failing fingerprint auth @@ -13,29 +13,29 @@ failure instead. 1 file changed, 18 insertions(+) diff --git a/js/gdm/util.js b/js/gdm/util.js -index b02cd4d73..118a05100 100644 +index 97df6d687e..371953cb25 100644 --- a/js/gdm/util.js +++ b/js/gdm/util.js -@@ -157,6 +157,7 @@ var ShellUserVerifier = class { - null, - null, - Gio.DBusProxyFlags.DO_NOT_LOAD_PROPERTIES); +@@ -109,6 +109,7 @@ export class ShellUserVerifier extends Signals.EventEmitter { + this._defaultService = null; + this._preemptingService = null; + this._fingerprintReaderType = FingerprintReaderType.NONE; + this._fprintStartTime = -1; - this._smartcardManager = SmartcardManager.getSmartcardManager(); - // We check for smartcards right away, since an inserted smartcard -@@ -543,6 +544,10 @@ var ShellUserVerifier = class { - async _startService(serviceName) { + this._messageQueue = []; + this._messageQueueTimeoutId = 0; +@@ -669,6 +670,10 @@ export class ShellUserVerifier extends Signals.EventEmitter { this._hold.acquire(); try { -+ if (serviceName == FINGERPRINT_SERVICE_NAME) { + this._activeServices.add(serviceName); ++ ++ if (serviceName == FINGERPRINT_SERVICE_NAME) + this._fprintStartTime = GLib.get_monotonic_time(); -+ } + if (this._userName) { await this._userVerifier.call_begin_verification_for_user( serviceName, this._userName, this._cancellable); -@@ -624,6 +629,7 @@ var ShellUserVerifier = class { +@@ -763,6 +768,7 @@ export class ShellUserVerifier extends Signals.EventEmitter { const cancellable = this._cancellable; this._fingerprintFailedId = GLib.timeout_add(GLib.PRIORITY_DEFAULT, FINGERPRINT_ERROR_TIMEOUT_WAIT, () => { @@ -43,7 +43,7 @@ index b02cd4d73..118a05100 100644 this._fingerprintFailedId = 0; if (!cancellable.is_cancelled()) this._verificationFailed(serviceName, false); -@@ -689,6 +695,18 @@ var ShellUserVerifier = class { +@@ -829,6 +835,18 @@ export class ShellUserVerifier extends Signals.EventEmitter { if (serviceName === FINGERPRINT_SERVICE_NAME) { if (this._fingerprintFailedId) GLib.source_remove(this._fingerprintFailedId); @@ -63,5 +63,5 @@ index b02cd4d73..118a05100 100644 // For Not Listed / enterprise logins, immediately reset -- -2.31.1 +2.43.2 diff --git a/0001-status-keyboard-Add-a-catch-around-reload-call.patch b/0001-status-keyboard-Add-a-catch-around-reload-call.patch deleted file mode 100644 index a7f9964..0000000 --- a/0001-status-keyboard-Add-a-catch-around-reload-call.patch +++ /dev/null @@ -1,35 +0,0 @@ -From e34033a9b9dca9bba9162f29e67d97e20843eff7 Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Wed, 16 Aug 2023 18:46:54 -0400 -Subject: [PATCH 1/3] status/keyboard: Add a catch around reload call - -Now that system input settings can get used in the user session -they're getting seen by the tests and the tests are complaining: - -Unhandled promise rejection. To suppress this warning, add an -error handler to your promise chain with .catch() or a try-catch block -around your await expression. - -This commit adds the catch it's asking for. ---- - js/ui/status/keyboard.js | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js -index 8d98e16de9..7277c6d099 100644 ---- a/js/ui/status/keyboard.js -+++ b/js/ui/status/keyboard.js -@@ -198,7 +198,9 @@ class InputSourceSystemSettings extends InputSourceSettings { - this._variants = ''; - this._options = ''; - -- this._reload(); -+ this._reload().catch(error => { -+ logError(error, 'Could not reload system input settings'); -+ }); - - Gio.DBus.system.signal_subscribe(this._BUS_NAME, - this._BUS_PROPS_IFACE, --- -2.43.0 - diff --git a/0002-status-keyboard-Load-keyboard-from-system-settings-i.patch b/0002-status-keyboard-Load-keyboard-from-system-settings-i.patch deleted file mode 100644 index e25e1ea..0000000 --- a/0002-status-keyboard-Load-keyboard-from-system-settings-i.patch +++ /dev/null @@ -1,130 +0,0 @@ -From 2298cfa0c9083fef432b9c51341f5ee75e7ebacb Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Wed, 16 Aug 2023 11:13:39 -0400 -Subject: [PATCH 2/3] status/keyboard: Load keyboard from system settings if - gsettings unconfigured - -Right now if a user hasn't configured their input sources, the code falls back to -using the current layout on Xorg and the mutter default with wayland. - -This commit changes the code to instead fall back to using the system -default (as configured by localed). ---- - js/ui/status/keyboard.js | 58 +++++++++++++++++++++++++++++++--------- - 1 file changed, 45 insertions(+), 13 deletions(-) - -diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js -index 7277c6d099..97e35d482c 100644 ---- a/js/ui/status/keyboard.js -+++ b/js/ui/status/keyboard.js -@@ -22,6 +22,9 @@ import * as Util from '../../misc/util.js'; - export const INPUT_SOURCE_TYPE_XKB = 'xkb'; - export const INPUT_SOURCE_TYPE_IBUS = 'ibus'; - -+const DESKTOP_INPUT_SOURCES_SCHEMA = 'org.gnome.desktop.input-sources'; -+const KEY_INPUT_SOURCES = 'sources'; -+ - export const LayoutMenuItem = GObject.registerClass( - class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem { - _init(displayName, shortName) { -@@ -263,17 +266,15 @@ class InputSourceSystemSettings extends InputSourceSettings { - } - - class InputSourceSessionSettings extends InputSourceSettings { -- constructor() { -+ constructor(settings) { - super(); - -- this._DESKTOP_INPUT_SOURCES_SCHEMA = 'org.gnome.desktop.input-sources'; -- this._KEY_INPUT_SOURCES = 'sources'; - this._KEY_MRU_SOURCES = 'mru-sources'; - this._KEY_KEYBOARD_OPTIONS = 'xkb-options'; - this._KEY_PER_WINDOW = 'per-window'; - -- this._settings = new Gio.Settings({schema_id: this._DESKTOP_INPUT_SOURCES_SCHEMA}); -- this._settings.connect(`changed::${this._KEY_INPUT_SOURCES}`, this._emitInputSourcesChanged.bind(this)); -+ this._settings = settings; -+ this._settings.connect(`changed::${KEY_INPUT_SOURCES}`, this._emitInputSourcesChanged.bind(this)); - this._settings.connect(`changed::${this._KEY_KEYBOARD_OPTIONS}`, this._emitKeyboardOptionsChanged.bind(this)); - this._settings.connect(`changed::${this._KEY_PER_WINDOW}`, this._emitPerWindowChanged.bind(this)); - } -@@ -291,7 +292,7 @@ class InputSourceSessionSettings extends InputSourceSettings { - } - - get inputSources() { -- return this._getSourcesList(this._KEY_INPUT_SOURCES); -+ return this._getSourcesList(KEY_INPUT_SOURCES); - } - - get mruSources() { -@@ -342,12 +343,6 @@ export class InputSourceManager extends Signals.EventEmitter { - Meta.KeyBindingFlags.IS_REVERSED, - Shell.ActionMode.ALL, - this._switchInputSource.bind(this)); -- if (Main.sessionMode.isGreeter) -- this._settings = new InputSourceSystemSettings(); -- else -- this._settings = new InputSourceSessionSettings(); -- this._settings.connect('input-sources-changed', this._inputSourcesChanged.bind(this)); -- this._settings.connect('keyboard-options-changed', this._keyboardOptionsChanged.bind(this)); - - this._xkbInfo = KeyboardManager.getXkbInfo(); - this._keyboardManager = KeyboardManager.getKeyboardManager(); -@@ -359,16 +354,53 @@ export class InputSourceManager extends Signals.EventEmitter { - this._ibusManager.connect('property-updated', this._ibusPropertyUpdated.bind(this)); - this._ibusManager.connect('set-content-type', this._ibusSetContentType.bind(this)); - -+ this._inputSettings = new Gio.Settings({schema_id: DESKTOP_INPUT_SOURCES_SCHEMA}); -+ this._setupInputSettings(); -+ - global.display.connect('modifiers-accelerator-activated', this._modifiersSwitcher.bind(this)); - - this._sourcesPerWindow = false; - this._focusWindowNotifyId = 0; -- this._settings.connect('per-window-changed', this._sourcesPerWindowChanged.bind(this)); - this._sourcesPerWindowChanged(); - this._disableIBus = false; - this._reloading = false; - } - -+ _sessionHasNoInputSettings() { -+ return this._inputSettings.get_user_value(KEY_INPUT_SOURCES) === null; -+ } -+ -+ _reloadInputSettings() { -+ const hadNoSessionInputSettings = this._hasNoSessionInputSettings; -+ -+ if (Main.sessionMode.isGreeter) -+ this._hasNoSessionInputSettings = true; -+ else -+ this._hasNoSessionInputSettings = this._sessionHasNoInputSettings(); -+ -+ if (this._settings && hadNoSessionInputSettings === this._hasNoSessionInputSettings) -+ return; -+ -+ this._settings?.disconnectObject(this); -+ -+ if (this._hasNoSessionInputSettings) -+ this._settings = new InputSourceSystemSettings(); -+ else -+ this._settings = new InputSourceSessionSettings(this._inputSettings); -+ -+ this._settings.connectObject('input-sources-changed', this._inputSourcesChanged.bind(this), -+ 'keyboard-options-changed', this._keyboardOptionsChanged.bind(this), -+ 'per-window-changed', this._sourcesPerWindowChanged.bind(this), this); -+ this.reload(); -+ } -+ -+ _setupInputSettings() { -+ if (!Main.sessionMode.isGreeter) -+ this._inputSettings.connect(`changed::${KEY_INPUT_SOURCES}`, this._reloadInputSettings.bind(this)); -+ -+ this._reloadInputSettings(); -+ } -+ - reload() { - this._reloading = true; - this._keyboardManager.setKeyboardOptions(this._settings.keyboardOptions); --- -2.43.0 - diff --git a/0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch b/0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch deleted file mode 100644 index 73ef555..0000000 --- a/0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 42355d8e9fc41b011a69e739ba536871483d41c6 Mon Sep 17 00:00:00 2001 -From: Ray Strode -Date: Wed, 16 Aug 2023 14:09:50 -0400 -Subject: [PATCH 3/3] status/keyboard: Use gnome-desktop API for getting - default input sources list - -At the moment, gnome-shell tries to figure out the default input sources -from localed. It fails to take into account the system locale and input -methods. - -This commit switches it to use a new function in gnome-desktop, -gnome_get_default_input_sources, which does most of the heavy -lifting itself, instead. ---- - js/ui/status/keyboard.js | 56 ++++++++++++++++++---------------------- - 1 file changed, 25 insertions(+), 31 deletions(-) - -diff --git a/js/ui/status/keyboard.js b/js/ui/status/keyboard.js -index 97e35d482c..8a2f1d2f7d 100644 ---- a/js/ui/status/keyboard.js -+++ b/js/ui/status/keyboard.js -@@ -3,6 +3,7 @@ - import Clutter from 'gi://Clutter'; - import Gio from 'gi://Gio'; - import GLib from 'gi://GLib'; -+import GnomeDesktop from 'gi://GnomeDesktop'; - import GObject from 'gi://GObject'; - import IBus from 'gi://IBus'; - import Meta from 'gi://Meta'; -@@ -25,6 +26,8 @@ export const INPUT_SOURCE_TYPE_IBUS = 'ibus'; - const DESKTOP_INPUT_SOURCES_SCHEMA = 'org.gnome.desktop.input-sources'; - const KEY_INPUT_SOURCES = 'sources'; - -+Gio._promisify(GnomeDesktop, 'get_default_input_sources'); -+ - export const LayoutMenuItem = GObject.registerClass( - class LayoutMenuItem extends PopupMenu.PopupBaseMenuItem { - _init(displayName, shortName) { -@@ -197,9 +200,9 @@ class InputSourceSystemSettings extends InputSourceSettings { - this._BUS_IFACE = 'org.freedesktop.locale1'; - this._BUS_PROPS_IFACE = 'org.freedesktop.DBus.Properties'; - -- this._layouts = ''; -- this._variants = ''; -- this._options = ''; -+ this._inputSourceIds = []; -+ this._inputSourceTypes = []; -+ this._options = []; - - this._reload().catch(error => { - logError(error, 'Could not reload system input settings'); -@@ -215,29 +218,20 @@ class InputSourceSystemSettings extends InputSourceSettings { - } - - async _reload() { -- let props; -+ let inputSourceIds; -+ let inputSourceTypes; -+ let options; - try { -- const result = await Gio.DBus.system.call( -- this._BUS_NAME, -- this._BUS_PATH, -- this._BUS_PROPS_IFACE, -- 'GetAll', -- new GLib.Variant('(s)', [this._BUS_IFACE]), -- null, Gio.DBusCallFlags.NONE, -1, null); -- [props] = result.deepUnpack(); -+ [inputSourceIds, inputSourceTypes, options] = await GnomeDesktop.get_default_input_sources (null); - } catch (e) { -- log(`Could not get properties from ${this._BUS_NAME}`); -+ logError(e, 'Could not get default input sources'); - return; - } - -- const layouts = props['X11Layout'].unpack(); -- const variants = props['X11Variant'].unpack(); -- const options = props['X11Options'].unpack(); -- -- if (layouts !== this._layouts || -- variants !== this._variants) { -- this._layouts = layouts; -- this._variants = variants; -+ if (inputSourceIds !== this._inputSourceIds || -+ inputSourceTypes !== this._inputSourceTypes) { -+ this._inputSourceIds = inputSourceIds; -+ this._inputSourceTypes = inputSourceTypes; - this._emitInputSourcesChanged(); - } - if (options !== this._options) { -@@ -247,21 +241,21 @@ class InputSourceSystemSettings extends InputSourceSettings { - } - - get inputSources() { -- let sourcesList = []; -- let layouts = this._layouts.split(','); -- let variants = this._variants.split(','); -- -- for (let i = 0; i < layouts.length && !!layouts[i]; i++) { -- let id = layouts[i]; -- if (variants[i]) -- id += `+${variants[i]}`; -- sourcesList.push({type: INPUT_SOURCE_TYPE_XKB, id}); -+ let sourcesList; -+ -+ if (this._inputSourceIds) { -+ sourcesList = this._inputSourceIds.map((id, index) => { -+ return { type: this._inputSourceTypes[index], id }; -+ }); -+ } else { -+ sourcesList = []; - } -+ - return sourcesList; - } - - get keyboardOptions() { -- return this._options.split(','); -+ return this._options; - } - } - --- -2.43.0 - diff --git a/gnome-shell-favourite-apps-firefox.patch b/gnome-shell-favourite-apps-firefox.patch index 4cfe18f..326f827 100644 --- a/gnome-shell-favourite-apps-firefox.patch +++ b/gnome-shell-favourite-apps-firefox.patch @@ -1,4 +1,4 @@ -From a2e62e671260576d23f18c22c10a48ac4a8504af Mon Sep 17 00:00:00 2001 +From 551b8979483e127471c726fd1db1d52e063a7d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 17 Sep 2014 07:11:12 +0200 Subject: [PATCH] Replace Web with Firefox in default favorites @@ -9,23 +9,23 @@ Subject: [PATCH] Replace Web with Firefox in default favorites 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/data/org.gnome.shell.gschema.xml.in b/data/org.gnome.shell.gschema.xml.in -index cd6a2356d..b8a13a9cc 100644 +index f4fa86d013..86b4bf85ee 100644 --- a/data/org.gnome.shell.gschema.xml.in +++ b/data/org.gnome.shell.gschema.xml.in @@ -50,7 +50,7 @@ -- [ 'org.gnome.Epiphany.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ] -+ [ 'org.mozilla.firefox.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ] +- [ 'org.gnome.Epiphany.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'org.gnome.TextEditor.desktop'] ++ [ 'org.mozilla.firefox.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'org.gnome.TextEditor.desktop'] List of desktop file IDs for favorite applications The applications corresponding to these identifiers diff --git a/js/ui/appFavorites.js b/js/ui/appFavorites.js -index a876727ed..24ce16f81 100644 +index 576df3800d..1f55a3c881 100644 --- a/js/ui/appFavorites.js +++ b/js/ui/appFavorites.js -@@ -52,6 +52,7 @@ const RENAMED_DESKTOP_IDS = { +@@ -51,6 +51,7 @@ const RENAMED_DESKTOP_IDS = { 'gnotski.desktop': 'org.gnome.Klotski.desktop', 'gtali.desktop': 'org.gnome.Tali.desktop', 'iagno.desktop': 'org.gnome.Reversi.desktop', @@ -33,5 +33,6 @@ index a876727ed..24ce16f81 100644 'nautilus.desktop': 'org.gnome.Nautilus.desktop', 'org.gnome.gnome-2048.desktop': 'org.gnome.TwentyFortyEight.desktop', 'org.gnome.taquin.desktop': 'org.gnome.Taquin.desktop', --- -2.30.1 +-- +2.43.0 + diff --git a/gnome-shell.spec b/gnome-shell.spec index 3ce9a2c..67d883e 100644 --- a/gnome-shell.spec +++ b/gnome-shell.spec @@ -2,7 +2,7 @@ %global major_version %%(cut -d "." -f 1 <<<%{tarball_version}) Name: gnome-shell -Version: 46~alpha +Version: 46.0 Release: %autorelease Summary: Window management and application launching for GNOME @@ -20,10 +20,6 @@ Patch: optional-portal-helper.patch # downstream patch to stop trying on configuration errors. Patch: 0001-gdm-Work-around-failing-fingerprint-auth.patch -Patch: 0001-status-keyboard-Add-a-catch-around-reload-call.patch -Patch: 0002-status-keyboard-Load-keyboard-from-system-settings-i.patch -Patch: 0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch - %define eds_version 3.45.1 %define gnome_desktop_version 44.0-7 %define glib2_version 2.56.0 @@ -31,9 +27,9 @@ Patch: 0003-status-keyboard-Use-gnome-desktop-API-for-getting-de.patch %define gjs_version 1.73.1 %define gtk4_version 4.0.0 %define adwaita_version 1.0.0 -%define mutter_version 46~alpha +%define mutter_version 46.0 %define polkit_version 0.100 -%define gsettings_desktop_schemas_version 42~beta +%define gsettings_desktop_schemas_version 46~beta %define ibus_version 1.5.2 %define gnome_bluetooth_version 1:42.3 %define gstreamer_version 1.4.5 @@ -230,10 +226,6 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/org.gnome.Shell.Porta %{_userunitdir}/org.gnome.Shell.target %{_userunitdir}/org.gnome.Shell@wayland.service %{_userunitdir}/org.gnome.Shell@x11.service -# Co own directory instead of pulling in xdg-desktop-portal - we -# are providing a backend to the portal, not depending on it -%dir %{_datadir}/xdg-desktop-portal/portals/ -%{_datadir}/xdg-desktop-portal/portals/gnome-shell.portal %{_libdir}/gnome-shell/ %{_libexecdir}/gnome-shell-calendar-server %{_libexecdir}/gnome-shell-perf-helper diff --git a/sources b/sources index a20d2c9..1eec4d2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (gnome-shell-46.alpha.tar.xz) = 41b6a2c8cc857d304ac1aade16b539d8ae2b0acef90f3cf3baeb965aa96d4cd5cd9286bd1e3244e503441d1372e0418bbbca76c734653e6311586d0544b98af1 +SHA512 (gnome-shell-46.0.tar.xz) = e07d44ff7a3d2570834f814555ada706958055a1358825207f5168c26b402fd4912672d05c7902b788bb76bf4e2ef729ae0eb55d44dd3807f46094a04a8b12d3