sync 23.09 to master

This commit is contained in:
peijiankang 2023-09-15 16:59:30 +08:00
parent 59720750c8
commit 2b53906bc2
5 changed files with 227 additions and 10 deletions

View File

@ -0,0 +1,43 @@
From a5af2ea9613c8c0defc175911468ee185f2e188f Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Fri, 21 Jul 2023 15:45:25 +0800
Subject: [PATCH] fix ukui-settings-daemon SIGABRT
---
daemon/main.cpp | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/daemon/main.cpp b/daemon/main.cpp
index 1db2eb6..e56fc7c 100644
--- a/daemon/main.cpp
+++ b/daemon/main.cpp
@@ -107,23 +107,13 @@ int main (int argc, char* argv[])
USD_LOG(LOG_INFO, "manager start error!");
return 0;
}
-/*
QObject::connect(&app,&QCoreApplication::aboutToQuit,[&]{
- //PluginManager::getInstance()->managerStop();
- //managerStop()执行时间过长导致注销时所有插件未完全Daectivity就已经强行关闭系统最终导致SIGSEGV、SIGABRT
+ manager->managerStop();//注销时释放资源
+ exit(0);
- app.processEvents();
- //QTimer timer;
- // Wait until the event loop starts
- QTimer::singleShot(500, [=](){
- //make sure program exit
- exit(0);
});
- qApp->quit();
- exit(0);
- });
-*/
+
USD_LOG(LOG_INFO, "ukui-settings-daemon started!");
return app.exec();
}
--
2.33.0

View File

@ -0,0 +1,48 @@
From 13693e16771b266448e084cd9cdb3a4e62a38563 Mon Sep 17 00:00:00 2001
From: peijiankang <peijiankang@kylinos.cn>
Date: Tue, 18 Jul 2023 09:23:41 +0800
Subject: [PATCH] fix ukui-settings-daemon about color
---
daemon/main.cpp | 4 ++--
plugins/color/color-manager.cpp | 2 ++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/daemon/main.cpp b/daemon/main.cpp
index 64148a7..90adce1 100644
--- a/daemon/main.cpp
+++ b/daemon/main.cpp
@@ -106,7 +106,7 @@ int main (int argc, char* argv[])
USD_LOG(LOG_INFO, "manager start error!");
return 0;
}
-
+/*
QObject::connect(&app,&QCoreApplication::aboutToQuit,[&]{
//PluginManager::getInstance()->managerStop();
@@ -124,7 +124,7 @@ int main (int argc, char* argv[])
qApp->quit();
exit(0);
});
-
+*/
USD_LOG(LOG_INFO, "ukui-settings-daemon started!");
return app.exec();
}
diff --git a/plugins/color/color-manager.cpp b/plugins/color/color-manager.cpp
index 227cfbe..b877b76 100644
--- a/plugins/color/color-manager.cpp
+++ b/plugins/color/color-manager.cpp
@@ -84,6 +84,8 @@ ColorManager::ColorManager()
disabled_until_tmw = false;
datetime_override = NULL;
geoclue_enabled = true;
+ geoclue_client = nullptr;
+ geoclue_simple = nullptr;
smooth_enabled = true;
cached_sunrise = -1.f;
cached_sunset = -1.f;
--
2.33.0

40
session.patch Normal file
View File

@ -0,0 +1,40 @@
diff -Naur ukui-settings-daemon-3.1.2/daemon/main.cpp ukui-settings-daemon-3.1.2~/daemon/main.cpp
--- ukui-settings-daemon-3.1.2/daemon/main.cpp 2023-07-11 15:31:29.785135187 +0800
+++ ukui-settings-daemon-3.1.2~/daemon/main.cpp 2023-07-11 15:30:40.694366917 +0800
@@ -56,6 +56,14 @@
QApplication::exit(15);
}
+void handlerB(int no)
+{
+ USD_LOG(LOG_DEBUG,"catch SIGSEGV signal, with exitcode %d",no);
+
+// manager->managerStop();
+ QApplication::exit(15);
+}
+
int main (int argc, char* argv[])
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
@@ -74,6 +82,7 @@
signal(SIGTERM, &handler);
signal(SIGABRT, &handlerA);
+ signal(SIGSEGV, &handlerB);
QApplication::setQuitOnLastWindowClosed(false);
QTranslator translator;
@@ -108,10 +117,11 @@
//QTimer timer;
// Wait until the event loop starts
QTimer::singleShot(500, [=](){
-
+ //make sure program exit
exit(0);
});
-
+ qApp->quit();
+ exit(0);
});
USD_LOG(LOG_INFO, "ukui-settings-daemon started!");

View File

@ -0,0 +1,59 @@
diff -Naur ukui-settings-daemon-3.1.2/daemon/main.cpp ukui-settings-daemon-3.1.2~/daemon/main.cpp
--- ukui-settings-daemon-3.1.2/daemon/main.cpp 2022-04-15 11:36:50.000000000 +0800
+++ ukui-settings-daemon-3.1.2~/daemon/main.cpp 2023-07-06 17:50:20.704690501 +0800
@@ -31,7 +31,8 @@
#include <sys/types.h>
#include <signal.h>
-
+#include <syslog.h>
+#include <QTimer>
static void print_help ();
static void parse_args (int argc, char *argv[]);
static void stop_daemon ();
@@ -46,6 +47,15 @@
QApplication::exit(15);
}
+void handlerA(int no)
+{
+ USD_LOG(LOG_DEBUG,"catch SIGABRT signal, with exitcode %d",no);
+
+
+// manager->managerStop();
+ QApplication::exit(15);
+}
+
int main (int argc, char* argv[])
{
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
@@ -63,6 +73,7 @@
signal(SIGTERM, &handler);
+ signal(SIGABRT, &handlerA);
QApplication::setQuitOnLastWindowClosed(false);
QTranslator translator;
@@ -88,6 +99,21 @@
return 0;
}
+ QObject::connect(&app,&QCoreApplication::aboutToQuit,[&]{
+
+ //PluginManager::getInstance()->managerStop();
+ //managerStop()执行时间过长导致注销时所有插件未完全Daectivity就已经强行关闭系统最终导致SIGSEGV、SIGABRT
+
+ app.processEvents();
+ //QTimer timer;
+ // Wait until the event loop starts
+ QTimer::singleShot(500, [=](){
+
+ exit(0);
+ });
+
+ });
+
USD_LOG(LOG_INFO, "ukui-settings-daemon started!");
return app.exec();
}

View File

@ -1,13 +1,18 @@
Name: ukui-settings-daemon
Version: 3.1.2
Release: 6
Release: 9
Summary: daemon handling the UKUI session settings
License: GPL-2.0-or-later and GPL-3.0-or-later and LGPL-2.0-or-later
URL: http://www.ukui.org
Source0: %{name}-%{version}.tar.gz
Patch1: 0001-modify-compile-error-of-ukui-settings-daemon.patch
Patch2: Fix-the-failure-of-shortcut-key-to-open-terminal.patch
Patch3: fix-build-error-of-libkscreen-qt5-5.27.6.patch
Patch4: ukui-settings-daemon-3.1.2-kylin-fix-coredump.patch
Patch5: session.patch
Patch6: fix-ukui-settings-daemon-SIGSEGV.patch
Patch7: fix-ukui-settings-daemon-SIGABRT.patch
Patch100: fix-build-error-of-libkscreen-qt5-5.27.6.patch
BuildRequires: pkgconf-pkg-config
BuildRequires: intltool
BuildRequires: qtchooser
@ -88,8 +93,12 @@ Summary: daemon handling the UKUI session settings (common files)
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch100 -p1
%build
%{qmake_qt5}
%{make_build}
@ -134,18 +143,36 @@ glib-compile-schemas /usr/share/glib-2.0/schemas/ &> /dev/null || :
%changelog
* Thu Aug 17 2023 douyan <douyan@kylinos.cn> - 3.1.2-6
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: rebuild
* Wed Aug 16 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-5
* Wed Aug 16 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-9
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: add fix-build-error-of-libkscreen-qt5-5.27.6.patch
* Fri Jul 21 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-8
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add Patch7:fix-ukui-settings-daemon-SIGABRT.patch
* Tue Jul 18 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-7
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add Patch6:fix-ukui-settings-daemon-SIGSEGV.patch
* Tue Jul 11 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-6
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add Patch5:session.patch
* Mon Jul 10 2023 huayadong <huayadong@kylinos.cn> - 3.1.2-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add Patch4:ukui-settings-daemon-3.1.2-kylin-fix-coredump.patch
* Sun Jun 25 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.2-4
- Type:bugfix
- ID:NA