sync by openEuler-22.03-LTS-SP3
Signed-off-by: layne yang <yangxiaoxuan@uniontech.com>
This commit is contained in:
parent
14163107d0
commit
2e44ee976a
@ -1,25 +0,0 @@
|
|||||||
From eadfea3fd7c194759aa2a2633989a08c72eb25c8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: leeffo <leeffo@yeah.net>
|
|
||||||
Date: Fri, 31 Mar 2023 16:27:25 +0800
|
|
||||||
Subject: [PATCH] feat: fix build error
|
|
||||||
|
|
||||||
---
|
|
||||||
tests/src/stub.h | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/tests/src/stub.h b/tests/src/stub.h
|
|
||||||
index 76d6606..79bf963 100644
|
|
||||||
--- a/tests/src/stub.h
|
|
||||||
+++ b/tests/src/stub.h
|
|
||||||
@@ -16,6 +16,8 @@
|
|
||||||
#include <cstring>
|
|
||||||
//c++
|
|
||||||
#include <map>
|
|
||||||
+#include <iostream>
|
|
||||||
+using namespace std;
|
|
||||||
|
|
||||||
|
|
||||||
#define ADDR(CLASS_NAME,MEMBER_NAME) (&CLASS_NAME::MEMBER_NAME)
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
||||||
51
0001-feat-round-master-function.patch
Normal file
51
0001-feat-round-master-function.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
From 9e6687c11f63ae25a3f4520dc22d44cdf94f776a Mon Sep 17 00:00:00 2001
|
||||||
|
From: leeffo <leeffo@yeah.net>
|
||||||
|
Date: Wed, 1 Mar 2023 13:33:26 +0800
|
||||||
|
Subject: [PATCH] feat: round master function
|
||||||
|
|
||||||
|
---
|
||||||
|
application/loglistview.cpp | 2 +-
|
||||||
|
logViewerService/logviewerservice.cpp | 11 ++++++++++-
|
||||||
|
2 files changed, 11 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/application/loglistview.cpp b/application/loglistview.cpp
|
||||||
|
index 7631e03..bbcb19b 100644
|
||||||
|
--- a/application/loglistview.cpp
|
||||||
|
+++ b/application/loglistview.cpp
|
||||||
|
@@ -146,7 +146,7 @@ void LogListView::initUI()
|
||||||
|
const QVariant VListViewItemMargin = QVariant::fromValue(ListViweItemMargin);
|
||||||
|
Dtk::Core::DSysInfo::UosEdition edition = Dtk::Core::DSysInfo::uosEditionType();
|
||||||
|
//等于服务器行业版或欧拉版(centos)
|
||||||
|
- bool isCentos = Dtk::Core::DSysInfo::UosEuler == edition || Dtk::Core::DSysInfo::UosEnterpriseC == edition;
|
||||||
|
+ bool isCentos = Dtk::Core::DSysInfo::UosEuler == edition || Dtk::Core::DSysInfo::UosEnterpriseC == edition || Dtk::Core::DSysInfo::UosMilitaryS == edition;
|
||||||
|
m_pModel = new QStandardItemModel(this);
|
||||||
|
QStandardItem *item = nullptr;
|
||||||
|
QString systemName = DBusManager::getSystemInfo();
|
||||||
|
diff --git a/logViewerService/logviewerservice.cpp b/logViewerService/logviewerservice.cpp
|
||||||
|
index 63cb9db..c1ecd75 100644
|
||||||
|
--- a/logViewerService/logviewerservice.cpp
|
||||||
|
+++ b/logViewerService/logviewerservice.cpp
|
||||||
|
@@ -40,10 +40,19 @@ LogViewerService::~LogViewerService()
|
||||||
|
*/
|
||||||
|
QString LogViewerService::readLog(const QString &filePath)
|
||||||
|
{
|
||||||
|
+ if (!isValidInvoker()) {
|
||||||
|
+ return " ";
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
//增加服务黑名单,只允许通过提权接口读取/var/log下,家目录下和临时目录下的文件
|
||||||
|
- if ((!filePath.startsWith("/var/log/") && !filePath.startsWith("/tmp") && !filePath.startsWith("/home")) || filePath.contains("..") || !isValidInvoker()) {
|
||||||
|
+ if ((!filePath.startsWith("/var/log/") &&
|
||||||
|
+ !filePath.startsWith("/tmp") &&
|
||||||
|
+ !filePath.startsWith("/home") &&
|
||||||
|
+ !filePath.startsWith("/root")) ||
|
||||||
|
+ filePath.contains("..")) {
|
||||||
|
return " ";
|
||||||
|
}
|
||||||
|
+
|
||||||
|
m_process.start("cat", QStringList() << filePath);
|
||||||
|
m_process.waitForFinished(-1);
|
||||||
|
QByteArray byte = m_process.readAllStandardOutput();
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
22
0001-fix-xorg-application-log-problem.patch
Normal file
22
0001-fix-xorg-application-log-problem.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From 5bfbde1f2b01d7d5a30b5343c72bac7b76b92467 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Super User <root@localhost.localdomain>
|
||||||
|
Date: Thu, 21 Sep 2023 16:41:47 +0800
|
||||||
|
Subject: [PATCH] fix xorg application log problem
|
||||||
|
|
||||||
|
---
|
||||||
|
logViewerService/assets/data/com.deepin.logviewer.service | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/logViewerService/assets/data/com.deepin.logviewer.service b/logViewerService/assets/data/com.deepin.logviewer.service
|
||||||
|
index 41f0cca..d331f89 100755
|
||||||
|
--- a/logViewerService/assets/data/com.deepin.logviewer.service
|
||||||
|
+++ b/logViewerService/assets/data/com.deepin.logviewer.service
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
[D-BUS Service]
|
||||||
|
Name=com.deepin.logviewer
|
||||||
|
-Exec=/usr/lib/deepin-daemon/log-view-service
|
||||||
|
+Exec=/usr/bin/log-view-service
|
||||||
|
User=root
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
43
0002-add-boot.log-file-judge.patch
Normal file
43
0002-add-boot.log-file-judge.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
From 0446e0e9e20e2deac880600053fc79a23ba5340e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Super User <root@localhost.localdomain>
|
||||||
|
Date: Thu, 21 Sep 2023 18:32:29 +0800
|
||||||
|
Subject: [PATCH 2/2] add boot.log file judge
|
||||||
|
|
||||||
|
---
|
||||||
|
application/loglistview.cpp | 20 +++++++++++---------
|
||||||
|
1 file changed, 11 insertions(+), 9 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/application/loglistview.cpp b/application/loglistview.cpp
|
||||||
|
index 1e44d72..e426367 100644
|
||||||
|
--- a/application/loglistview.cpp
|
||||||
|
+++ b/application/loglistview.cpp
|
||||||
|
@@ -197,15 +197,17 @@ void LogListView::initUI()
|
||||||
|
m_pModel->appendRow(item);
|
||||||
|
m_logTypes.push_back(BOOT_KLU_TREE_DATA);
|
||||||
|
} else {
|
||||||
|
- item = new QStandardItem(QIcon::fromTheme("dp_start"), DApplication::translate("Tree", "Boot Log"));
|
||||||
|
- setIconSize(QSize(ICON_SIZE, ICON_SIZE));
|
||||||
|
- item->setToolTip(DApplication::translate("Tree", "Boot Log")); // add by Airy for bug 16245
|
||||||
|
- item->setData(BOOT_TREE_DATA, ITEM_DATE_ROLE);
|
||||||
|
- item->setSizeHint(QSize(ITEM_WIDTH, ITEM_HEIGHT));
|
||||||
|
- item->setData(VListViewItemMargin, Dtk::MarginsRole);
|
||||||
|
- item->setAccessibleText("Boot Log");
|
||||||
|
- m_pModel->appendRow(item);
|
||||||
|
- m_logTypes.push_back(BOOT_TREE_DATA);
|
||||||
|
+ if (isFileExist("/var/log/boot.log")) {
|
||||||
|
+ item = new QStandardItem(QIcon::fromTheme("dp_start"), DApplication::translate("Tree", "Boot Log"));
|
||||||
|
+ setIconSize(QSize(ICON_SIZE, ICON_SIZE));
|
||||||
|
+ item->setToolTip(DApplication::translate("Tree", "Boot Log")); // add by Airy for bug 16245
|
||||||
|
+ item->setData(BOOT_TREE_DATA, ITEM_DATE_ROLE);
|
||||||
|
+ item->setSizeHint(QSize(ITEM_WIDTH, ITEM_HEIGHT));
|
||||||
|
+ item->setData(VListViewItemMargin, Dtk::MarginsRole);
|
||||||
|
+ item->setAccessibleText("Boot Log");
|
||||||
|
+ m_pModel->appendRow(item);
|
||||||
|
+ m_logTypes.push_back(BOOT_TREE_DATA);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
if (isCentos) {
|
||||||
|
item = new QStandardItem(QIcon::fromTheme("dp_d"), DApplication::translate("Tree", "dnf Log"));
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
|||||||
# deepin-log-viewer
|
|
||||||
|
|
||||||
#### Description
|
|
||||||
deepin log viewer
|
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create Feat_xxx branch
|
|
||||||
3. Commit your code
|
|
||||||
4. Create Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
|||||||
# deepin-log-viewer
|
|
||||||
|
|
||||||
#### 介绍
|
|
||||||
deepin log viewer
|
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 码云特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
|
||||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
Binary file not shown.
@ -1,4 +1,4 @@
|
|||||||
%define pkgrelease 1
|
%define pkgrelease 2
|
||||||
%if 0%{?openeuler}
|
%if 0%{?openeuler}
|
||||||
%define specrelease %{pkgrelease}
|
%define specrelease %{pkgrelease}
|
||||||
%else
|
%else
|
||||||
@ -7,13 +7,15 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: deepin-log-viewer
|
Name: deepin-log-viewer
|
||||||
Version: 5.8.34
|
Version: 5.9.13
|
||||||
Release: %{specrelease}
|
Release: %{specrelease}
|
||||||
Summary: Log Viewer is a useful tool for viewing system logs
|
Summary: Log Viewer is a useful tool for viewing system logs
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: https://github.com/linuxdeepin/%{name}
|
URL: https://github.com/linuxdeepin/%{name}
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Patch0: 0001-feat-fix-build-error.patch
|
Patch0: 0001-feat-round-master-function.patch
|
||||||
|
Patch1: 0001-fix-xorg-application-log-problem.patch
|
||||||
|
Patch2: 0002-add-boot.log-file-judge.patch
|
||||||
|
|
||||||
BuildRequires: qt5-devel
|
BuildRequires: qt5-devel
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -41,6 +43,7 @@ BuildRequires: qt5-qtbase-private-devel
|
|||||||
BuildRequires: dtkcommon-devel
|
BuildRequires: dtkcommon-devel
|
||||||
BuildRequires: qt5-qtsvg-devel
|
BuildRequires: qt5-qtsvg-devel
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
|
BuildRequires: polkit-qt5-1-devel
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -49,22 +52,23 @@ Log Viewer is a useful tool for viewing system logs.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export PATH=%{_qt5_bindir}:$PATH
|
export PATH=%{_qt5_bindir}:$PATH
|
||||||
sed -i "s|^cmake_minimum_required.*|cmake_minimum_required(VERSION 3.0)|" $(find . -name "CMakeLists.txt")
|
sed -i "s|^cmake_minimum_required.*|cmake_minimum_required(VERSION 3.0)|" $(find . -name "CMakeLists.txt")
|
||||||
mkdir build && pushd build
|
mkdir build && pushd build
|
||||||
%cmake -DCMAKE_BUILD_TYPE=Release ../ -DAPP_VERSION=%{version} -DVERSION=%{version}
|
%cmake -DCMAKE_BUILD_TYPE=Release ../ -DAPP_VERSION=%{version} -DVERSION=%{version}
|
||||||
%make_build
|
%make_build
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install -C build INSTALL_ROOT="%buildroot"
|
%make_install -C build INSTALL_ROOT="%buildroot"
|
||||||
|
cp %buildroot/usr/lib/deepin-daemon/log-view-service %buildroot/usr/bin/log-view-service
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
%license LICENSE.txt
|
||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_bindir}/logViewerAuth
|
%{_bindir}/logViewerAuth
|
||||||
%{_bindir}/logViewerTruncate
|
%{_bindir}/logViewerTruncate
|
||||||
@ -73,14 +77,20 @@ popd
|
|||||||
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||||
%{_datadir}/polkit-1/actions/*.policy
|
%{_datadir}/polkit-1/actions/*.policy
|
||||||
%{_datadir}/deepin-manual/manual-assets/application/deepin-log-viewer/log-viewer/*
|
%{_datadir}/deepin-manual/manual-assets/application/deepin-log-viewer/log-viewer/*
|
||||||
/usr/lib/deepin-daemon/logViewerService
|
/usr/bin/log-view-service
|
||||||
|
/usr/lib/deepin-daemon/log-view-service
|
||||||
/usr/share/dbus-1/system-services/com.deepin.logviewer.service
|
/usr/share/dbus-1/system-services/com.deepin.logviewer.service
|
||||||
/usr/share/dbus-1/system.d/com.deepin.logviewer.conf
|
/usr/share/dbus-1/system.d/com.deepin.logviewer.conf
|
||||||
%{_datadir}/%{name}/DocxTemplate/*.dfw
|
%{_datadir}/%{name}/DocxTemplate/*.dfw
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 21 2023 hanshuang <hanshuang@uniontech.com> - 5.9.13-2
|
||||||
|
- fix xorg application log problem
|
||||||
|
|
||||||
|
* Wed Jul 26 2023 leeffo <liweiganga@uniontech.com> - 5.9.13-1
|
||||||
|
- upgrade to version 5.9.13
|
||||||
|
|
||||||
* Fri Mar 31 2023 liweiganga <liweiganga@uniontech.com> - 5.8.34-1
|
* Fri Mar 31 2023 liweiganga <liweiganga@uniontech.com> - 5.8.34-1
|
||||||
- update: update to 5.8.34
|
- update: update to 5.8.34
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user