Backport F40 changes

Resolves: RHEL-30223
This commit is contained in:
Florian Müllner 2024-02-11 20:44:32 +01:00 committed by Florian Müllner
parent d24c775fb2
commit b2b0baccf7
No known key found for this signature in database
8 changed files with 31 additions and 325 deletions

3
.gitignore vendored
View File

@ -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

View File

@ -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 <bberg@redhat.com>
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

View File

@ -1,35 +0,0 @@
From e34033a9b9dca9bba9162f29e67d97e20843eff7 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
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

View File

@ -1,130 +0,0 @@
From 2298cfa0c9083fef432b9c51341f5ee75e7ebacb Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
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

View File

@ -1,125 +0,0 @@
From 42355d8e9fc41b011a69e739ba536871483d41c6 Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
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

View File

@ -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?= <fmuellner@gnome.org>
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 @@
</description>
</key>
<key name="favorite-apps" type="as">
- <default>[ 'org.gnome.Epiphany.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
+ <default>[ 'org.mozilla.firefox.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop' ]</default>
- <default>[ 'org.gnome.Epiphany.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'org.gnome.TextEditor.desktop']</default>
+ <default>[ 'org.mozilla.firefox.desktop', 'org.gnome.Calendar.desktop', 'org.gnome.Music.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'org.gnome.TextEditor.desktop']</default>
<summary>List of desktop file IDs for favorite applications</summary>
<description>
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

View File

@ -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

View File

@ -1 +1 @@
SHA512 (gnome-shell-46.alpha.tar.xz) = 41b6a2c8cc857d304ac1aade16b539d8ae2b0acef90f3cf3baeb965aa96d4cd5cd9286bd1e3244e503441d1372e0418bbbca76c734653e6311586d0544b98af1
SHA512 (gnome-shell-46.0.tar.xz) = e07d44ff7a3d2570834f814555ada706958055a1358825207f5168c26b402fd4912672d05c7902b788bb76bf4e2ef729ae0eb55d44dd3807f46094a04a8b12d3