From 3668b34161d3d0a593efad3623135180a5445107 Mon Sep 17 00:00:00 2001 From: zhaoshuang Date: Mon, 13 Sep 2021 18:45:08 +0800 Subject: [PATCH 1/3] Add a uniontech patch to fix dm-tool --- 9002-dm-tool-lock-function-patch.patch | 91 ++++++++++++++++++++++++++ lightdm.spec | 6 +- 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 9002-dm-tool-lock-function-patch.patch diff --git a/9002-dm-tool-lock-function-patch.patch b/9002-dm-tool-lock-function-patch.patch new file mode 100644 index 0000000..6046d00 --- /dev/null +++ b/9002-dm-tool-lock-function-patch.patch @@ -0,0 +1,91 @@ +From 60a7f41c675d0c99f697b1e2479feea0e78b9b0f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E6=9B=B9=E5=A8=81?= +Date: Sat, 30 May 2020 14:35:45 +0800 +Subject: [PATCH] dm-tool lock function patch + +--- + src/dm-tool.c | 60 +++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 51 insertions(+), 9 deletions(-) + +diff --git a/src/dm-tool.c b/src/dm-tool.c +index 5060109..8190aa9 100644 +--- a/src/dm-tool.c ++++ b/src/dm-tool.c +@@ -16,6 +16,41 @@ + #include + #include + ++#define LOCKFRONT_NAME "com.deepin.dde.lockFront" ++ ++static int ++handle_call_lock_front() ++{ ++ g_autoptr(GError) pLockError = NULL; ++ GDBusProxy *pLockFront = g_dbus_proxy_new_for_bus_sync( ++ G_BUS_TYPE_SESSION, ++ G_DBUS_PROXY_FLAGS_NONE, ++ NULL, ++ LOCKFRONT_NAME, ++ "/com/deepin/dde/lockFront", ++ LOCKFRONT_NAME, ++ NULL, ++ &pLockError); ++ if (!pLockFront) ++ { ++ g_printerr("something error happend. %s. %s, %d", LOCKFRONT_NAME, pLockError->message, pLockError->code); ++ return EXIT_FAILURE; ++ } ++ if (!g_dbus_proxy_call_sync( ++ pLockFront, ++ "Show", ++ g_variant_new("()"), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ NULL, ++ &pLockError)) ++ { ++ g_printerr("something error happend. %s. %s, %d", LOCKFRONT_NAME, pLockError->message, pLockError->code); ++ return EXIT_FAILURE; ++ } ++ return EXIT_SUCCESS; ++} ++ + static GBusType bus_type = G_BUS_TYPE_SYSTEM; + static GDBusProxy *dm_proxy, *seat_proxy = NULL; + +@@ -259,16 +294,23 @@ main (int argc, char **argv) + return EXIT_FAILURE; + } + +- if (!g_dbus_proxy_call_sync (get_seat_proxy (), +- "Lock", +- g_variant_new ("()"), +- G_DBUS_CALL_FLAGS_NONE, +- -1, +- NULL, +- &error)) ++ if (g_file_test("/etc/deepin-version", G_FILE_TEST_EXISTS)) + { +- g_printerr ("Unable to lock seat: %s\n", error->message); +- return EXIT_FAILURE; ++ return handle_call_lock_front(); ++ } ++ else ++ { ++ if (!g_dbus_proxy_call_sync(get_seat_proxy(), ++ "Lock", ++ g_variant_new("()"), ++ G_DBUS_CALL_FLAGS_NONE, ++ -1, ++ NULL, ++ &error)) ++ { ++ g_printerr("Unable to lock seat: %s\n", error->message); ++ return EXIT_FAILURE; ++ } + } + return EXIT_SUCCESS; + } +-- +2.20.1 + diff --git a/lightdm.spec b/lightdm.spec index 59ffb55..760a23d 100644 --- a/lightdm.spec +++ b/lightdm.spec @@ -7,7 +7,7 @@ Name: lightdm Summary: A cross-desktop Display Manager Version: 1.30.0 -Release: 10 +Release: 11 # library/bindings are LGPLv2 or LGPLv3, the rest GPLv3+ License: (LGPLv2 or LGPLv3) and GPLv3+ @@ -40,6 +40,7 @@ Patch0: lightdm-1.25.1-disable_dmrc.patch # UnionTech patchs Patch9001: 9001-multi-pipe-mode.patch +Patch9002: 9002-dm-tool-lock-function-patch.patch BuildRequires: gettext BuildRequires: gnome-common @@ -310,6 +311,9 @@ fi %changelog +* Mon Sep 13 2021 zhaoshuang - 1.30.0-11 +- Add a uniontech patch to fix dm-tool + * Fri Jul 30 2021 zhaoshuang - 1.30.0-10 - Add a uniontech patch to support multi-pipe mode From 49fcb733f9952f65cca67173132fb8b00d4cc39a Mon Sep 17 00:00:00 2001 From: liuxinhao Date: Tue, 25 Jan 2022 16:22:37 +0800 Subject: [PATCH 2/3] Fixed the problem that the PAM message returned by lightdm was not translated Signed-off-by: kylinsecos --- ...ixed-the-issue-that-lightdm-s-PAM-me.patch | 42 +++++++++++++++++++ lightdm.spec | 8 +++- 2 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 1001-fix-translator-fixed-the-issue-that-lightdm-s-PAM-me.patch diff --git a/1001-fix-translator-fixed-the-issue-that-lightdm-s-PAM-me.patch b/1001-fix-translator-fixed-the-issue-that-lightdm-s-PAM-me.patch new file mode 100644 index 0000000..6bbba57 --- /dev/null +++ b/1001-fix-translator-fixed-the-issue-that-lightdm-s-PAM-me.patch @@ -0,0 +1,42 @@ +From 817fea974287bdea8686ced43f708531148d98bc Mon Sep 17 00:00:00 2001 +From: liuxinhao +Date: Tue, 25 Jan 2022 15:41:57 +0800 +Subject: [PATCH] fix(translator): fixed the issue that lightdm's PAM messages + were not translated +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复lightdm返回的PAM消息未经过翻译,并将翻译指定为UTF-8编码,避免lightdm-qt5接口之中乱码问题 + +Signed-off-by: liuxinhao +--- + src/lightdm.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/lightdm.c b/src/lightdm.c +index 81b9117..2df2f9f 100644 +--- a/src/lightdm.c ++++ b/src/lightdm.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include "configuration.h" + #include "display-manager.h" +@@ -551,6 +552,10 @@ main (int argc, char **argv) + sigaction (SIGPIPE, &action, NULL); + sigaction (SIGHUP, &action, NULL); + ++ setlocale(LC_CTYPE,""); ++ setlocale(LC_MESSAGES,""); ++ bind_textdomain_codeset("Linux-PAM", "UTF-8"); ++ + /* When lightdm starts sessions it needs to run itself in a new mode */ + if (argc >= 2 && strcmp (argv[1], "--session-child") == 0) + return session_child_run (argc, argv); +-- +2.18.1 + diff --git a/lightdm.spec b/lightdm.spec index 760a23d..186feed 100644 --- a/lightdm.spec +++ b/lightdm.spec @@ -7,7 +7,7 @@ Name: lightdm Summary: A cross-desktop Display Manager Version: 1.30.0 -Release: 11 +Release: 12 # library/bindings are LGPLv2 or LGPLv3, the rest GPLv3+ License: (LGPLv2 or LGPLv3) and GPLv3+ @@ -42,6 +42,9 @@ Patch0: lightdm-1.25.1-disable_dmrc.patch Patch9001: 9001-multi-pipe-mode.patch Patch9002: 9002-dm-tool-lock-function-patch.patch +# kylin +Patch1001: 1001-fix-translator-fixed-the-issue-that-lightdm-s-PAM-me.patch + BuildRequires: gettext BuildRequires: gnome-common BuildRequires: gtk-doc itstool @@ -311,6 +314,9 @@ fi %changelog +* Tue Jan 25 2022 liuxinhao - 1.30.0-12 +- Fixed the problem that the PAM message returned by lightdm was not translated + * Mon Sep 13 2021 zhaoshuang - 1.30.0-11 - Add a uniontech patch to fix dm-tool From 3ca21e680bb03a437634df81069d429d50dcaf0c Mon Sep 17 00:00:00 2001 From: dwl301 Date: Thu, 24 Feb 2022 11:39:38 +0800 Subject: [PATCH 3/3] Fixed the problem that lightdm.service start with not found systemd-pam.so error. --- lightdm.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lightdm.spec b/lightdm.spec index 186feed..879d9dd 100644 --- a/lightdm.spec +++ b/lightdm.spec @@ -7,7 +7,7 @@ Name: lightdm Summary: A cross-desktop Display Manager Version: 1.30.0 -Release: 12 +Release: 13 # library/bindings are LGPLv2 or LGPLv3, the rest GPLv3+ License: (LGPLv2 or LGPLv3) and GPLv3+ @@ -70,10 +70,10 @@ BuildRequires: vala Requires: %{name}-gobject%{?_isa} = %{version}-%{release} Requires: accountsservice Requires: dbus-x11 -%if 0%{?openEuler} +%if 0%{?openEuler} Requires: polkit-js-engine %endif -Requires: systemd +Requires: systemd systemd-pam Requires: xorg-x11-xinit #Requires: (lightdm-greeter = 1.2 if xorg-x11-server-Xorg) @@ -314,6 +314,9 @@ fi %changelog +* Thu Feb 24 2022 Wenlong.Ding - 1.30.0-13 +- Fixed the problem that lightdm.service start with not found systemd-pam.so error. + * Tue Jan 25 2022 liuxinhao - 1.30.0-12 - Fixed the problem that the PAM message returned by lightdm was not translated