diff --git a/0002-fix-ukui-notification-daemon-SIGSEGV.patch b/0002-fix-ukui-notification-daemon-SIGSEGV.patch new file mode 100644 index 0000000..398a933 --- /dev/null +++ b/0002-fix-ukui-notification-daemon-SIGSEGV.patch @@ -0,0 +1,28 @@ +From 0e06e1110a0ea4fcff9ff3380ad657d80db95305 Mon Sep 17 00:00:00 2001 +From: peijiankang +Date: Fri, 21 Jul 2023 17:19:50 +0800 +Subject: [PATCH] fix ukui-notification-daemon SIGSEGV + +--- + src/main.cpp | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/main.cpp b/src/main.cpp +index 0309f7b..0bc1028 100644 +--- a/src/main.cpp ++++ b/src/main.cpp +@@ -36,6 +36,11 @@ + + int getScreenWidth() { + Display *disp = XOpenDisplay(NULL); ++ if (disp == NULL) { ++ fprintf(stderr, "Cannot connect to X server\n"); ++ return 0; ++ } ++ + Screen *scrn = DefaultScreenOfDisplay(disp); + if (NULL == scrn) { + return 0; +-- +2.33.0 + diff --git a/ukui-notification-daemon.spec b/ukui-notification-daemon.spec index 671fd4e..48ea95d 100644 --- a/ukui-notification-daemon.spec +++ b/ukui-notification-daemon.spec @@ -1,11 +1,12 @@ Name: ukui-notification-daemon Version: 3.3.1 -Release: 4 +Release: 5 Summary: daemon to display passive popup notifications License: GPL-3+ URL: https://github.com/ukui/ukui-notification-daemon Source0: %{name}-%{version}.tar.gz Patch01: 0001-add-translations-file.patch +Patch02: 0002-fix-ukui-notification-daemon-SIGSEGV.patch BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qtsvg-devel @@ -38,6 +39,7 @@ Desktop Notifications spec. %prep %setup -q %patch01 -p1 +%patch02 -p1 %build export PATH=%{_qt5_bindir}:$PATH @@ -63,6 +65,12 @@ popd %{_datadir}/ukui-notification-daemon/ukui-notification-daemon_zh_CN.qm %changelog +* Fri Jul 21 2023 peijiankang - 3.3.1-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add Patch2: 0002-fix-ukui-notification-daemon-SIGSEGV.patch + * Tue Mar 14 2023 douyan - 3.3.1-4 - add Provides: desktop-notification-daemon