upgrade to version 5.9.13
(cherry picked from commit a9e96bc60023047c19b30735d9063fa8598d45d8)
This commit is contained in:
parent
34d5250370
commit
d25dcb235c
@ -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
|
||||
|
||||
Binary file not shown.
@ -7,13 +7,13 @@
|
||||
%endif
|
||||
|
||||
Name: deepin-log-viewer
|
||||
Version: 5.8.34
|
||||
Version: 5.9.13
|
||||
Release: %{specrelease}
|
||||
Summary: Log Viewer is a useful tool for viewing system logs
|
||||
License: GPLv3+
|
||||
URL: https://github.com/linuxdeepin/%{name}
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Patch0: 0001-feat-fix-build-error.patch
|
||||
Patch0: 0001-feat-round-master-function.patch
|
||||
|
||||
BuildRequires: qt5-devel
|
||||
BuildRequires: gcc-c++
|
||||
@ -41,6 +41,7 @@ BuildRequires: qt5-qtbase-private-devel
|
||||
BuildRequires: dtkcommon-devel
|
||||
BuildRequires: qt5-qtsvg-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: polkit-qt5-1-devel
|
||||
|
||||
|
||||
%description
|
||||
@ -61,10 +62,9 @@ popd
|
||||
%make_install -C build INSTALL_ROOT="%buildroot"
|
||||
|
||||
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
%license LICENSE.txt
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/logViewerAuth
|
||||
%{_bindir}/logViewerTruncate
|
||||
@ -73,14 +73,16 @@ popd
|
||||
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||
%{_datadir}/polkit-1/actions/*.policy
|
||||
%{_datadir}/deepin-manual/manual-assets/application/deepin-log-viewer/log-viewer/*
|
||||
/usr/lib/deepin-daemon/logViewerService
|
||||
/usr/lib/deepin-daemon/log-view-service
|
||||
/usr/share/dbus-1/system-services/com.deepin.logviewer.service
|
||||
/usr/share/dbus-1/system.d/com.deepin.logviewer.conf
|
||||
%{_datadir}/%{name}/DocxTemplate/*.dfw
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
* 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
|
||||
- update: update to 5.8.34
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user