From 3edd68407346b7d0d04f66d5aee9389a3d0e344b Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sun, 6 Mar 2022 18:43:06 -0500 Subject: [PATCH] Backport fix to get sddm to log to the journal more --- 1526.patch | 25 +++++++++++++++++++++++++ sddm.spec | 9 ++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 1526.patch diff --git a/1526.patch b/1526.patch new file mode 100644 index 0000000..d22555c --- /dev/null +++ b/1526.patch @@ -0,0 +1,25 @@ +From 38eb9a807a79aeb365b48e7ec1323fdd885d1f58 Mon Sep 17 00:00:00 2001 +From: Aleix Pol +Date: Fri, 4 Mar 2022 18:28:36 +0100 +Subject: [PATCH] MessageHandler: Also use journald if the process is run by + sddm + +This way we don't end up in the awkward position of having to fish for +the logs somewhere in /var +--- + src/common/MessageHandler.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/common/MessageHandler.h b/src/common/MessageHandler.h +index 47ab0af0..db6c5387 100644 +--- a/src/common/MessageHandler.h ++++ b/src/common/MessageHandler.h +@@ -126,7 +126,7 @@ namespace SDDM { + #ifdef HAVE_JOURNALD + // don't log to journald if running interactively, this is likely + // the case when running sddm in test mode +- static bool isInteractive = isatty(STDIN_FILENO); ++ static bool isInteractive = isatty(STDIN_FILENO) && qgetenv("USER") != "sddm"; + if (!isInteractive) { + // log to journald + journaldLogger(type, context, logMessage); diff --git a/sddm.spec b/sddm.spec index bf67332..ae0d075 100644 --- a/sddm.spec +++ b/sddm.spec @@ -20,7 +20,7 @@ Name: sddm Version: 0.19.0%{?commitdate:^git%{commitdate}.%{shortcommit}} -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Summary: QML based desktop and login manager @@ -53,6 +53,10 @@ Patch11: 0001-Delay-for-logind-and-fallback-to-seat0.patch # https://bugzilla.redhat.com/show_bug.cgi?id=2057419 Patch12: 1522.patch +# https://github.com/sddm/sddm/pull/1526 +# Try to get sddm to log to the journal more +Patch13: 1526.patch + ## downstream patches Patch101: sddm-0.20.0-fedora_config.patch @@ -304,6 +308,9 @@ fi %changelog +* Sun Mar 06 2022 Neal Gompa - 0.19.0^git20220228.c257a40-3 +- Backport fix to get sddm to log to the journal more + * Mon Feb 28 2022 Adam Williamson - 0.19.0^git20220228.c257a40-2 - Backport PR#1522 to try and fix crash after login (#2057419)