Skip to content

Commit

Permalink
chore: Add older gnome-shell & kf5-kio for Fedora 39 switcheroo
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo committed May 2, 2024
1 parent 4db7c2a commit f693019
Show file tree
Hide file tree
Showing 12 changed files with 3,522 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
From 22df9fa5e3c973d5a194f2bbdbcdd4a64511bc93 Mon Sep 17 00:00:00 2001
From: Benjamin Berg <[email protected]>
Date: Wed, 28 Apr 2021 16:50:03 +0200
Subject: [PATCH] gdm: Work around failing fingerprint auth

On Fedora we have the problem that fingerprint auth fails immediately if
the PAM configuration has not been updated and no prints are enrolled.

So, consider a verification failure within one second to be a service
failure instead.
---
js/gdm/util.js | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

diff --git a/js/gdm/util.js b/js/gdm/util.js
index b02cd4d73..118a05100 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);
+ 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._hold.acquire();
try {
+ 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 {
const cancellable = this._cancellable;
this._fingerprintFailedId = GLib.timeout_add(GLib.PRIORITY_DEFAULT,
FINGERPRINT_ERROR_TIMEOUT_WAIT, () => {
+ log("Generating _verificationFailed!");
this._fingerprintFailedId = 0;
if (!cancellable.is_cancelled())
this._verificationFailed(serviceName, false);
@@ -689,6 +695,18 @@ var ShellUserVerifier = class {
if (serviceName === FINGERPRINT_SERVICE_NAME) {
if (this._fingerprintFailedId)
GLib.source_remove(this._fingerprintFailedId);
+
+ // On Fedora we have the problem that fingerprint auth fails
+ // immediately if the PAM configuration has not been updated and no
+ // prints are enrolled.
+ // So, consider a verification failure within one second to be a service
+ // failure instead.
+ if (this._fprintStartTime > GLib.get_monotonic_time() - GLib.USEC_PER_SEC) {
+ log("Fingerprint service failed almost immediately, considering it unavailable.");
+ log("Please fix your configuration by running: authselect select --force sssd with-fingerprint with-silent-lastlog");
+ this._onServiceUnavailable(this._client, serviceName, null);
+ return;
+ }
}

// For Not Listed / enterprise logins, immediately reset
--
2.31.1

Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
From 01b465beae325c88fe6539303ddbdf1cc1cb80a7 Mon Sep 17 00:00:00 2001
From: Ray Strode <[email protected]>
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 8d98e16de..7277c6d09 100644
--- a/js/ui/status/keyboard.js
+++ b/js/ui/status/keyboard.js
@@ -171,61 +171,63 @@ class InputSourceSettings extends Signals.EventEmitter {
get mruSources() {
return [];
}

set mruSources(sourcesList) {
// do nothing
}

get keyboardOptions() {
return [];
}

get perWindow() {
return false;
}
}

class InputSourceSystemSettings extends InputSourceSettings {
constructor() {
super();

this._BUS_NAME = 'org.freedesktop.locale1';
this._BUS_PATH = '/org/freedesktop/locale1';
this._BUS_IFACE = 'org.freedesktop.locale1';
this._BUS_PROPS_IFACE = 'org.freedesktop.DBus.Properties';

this._layouts = '';
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,
'PropertiesChanged',
this._BUS_PATH,
null,
Gio.DBusSignalFlags.NONE,
this._reload.bind(this));
}

async _reload() {
let props;
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();
} catch (e) {
log(`Could not get properties from ${this._BUS_NAME}`);
return;
}

const layouts = props['X11Layout'].unpack();
const variants = props['X11Variant'].unpack();
const options = props['X11Options'].unpack();

--
2.41.0.rc2

Loading

0 comments on commit f693019

Please sign in to comment.