Compare commits
10 Commits
97881351fc
...
ce52eded78
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce52eded78 | ||
|
|
2e44ee976a | ||
|
|
14163107d0 | ||
|
|
e9c0bb7880 | ||
|
|
c74e01daf0 | ||
|
|
96cf222a35 | ||
|
|
ba9a9f5cdd | ||
|
|
12d27354f2 | ||
|
|
ce685ea8ec | ||
|
|
342ef5f455 |
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.
BIN
deepin-log-viewer-5.9.13.tar.gz
Normal file
BIN
deepin-log-viewer-5.9.13.tar.gz
Normal file
Binary file not shown.
@ -1,58 +1,108 @@
|
||||
%bcond_with check
|
||||
|
||||
%global with_debug 1
|
||||
%if 0%{?with_debug}
|
||||
%global debug_package %{nil}
|
||||
%define pkgrelease 2
|
||||
%if 0%{?openeuler}
|
||||
%define specrelease %{pkgrelease}
|
||||
%else
|
||||
## allow specrelease to have configurable %%{?dist} tag in other distribution
|
||||
%define specrelease %{pkgrelease}%{?dist}
|
||||
%endif
|
||||
Name: deepin-log-viewer
|
||||
Version: 5.6.1
|
||||
Release: 2
|
||||
Summary: Log Viewer is a useful tool for viewing system logs.
|
||||
|
||||
Name: deepin-log-viewer
|
||||
Version: 5.9.13
|
||||
Release: %{specrelease}
|
||||
Summary: Log Viewer is a useful tool for viewing system logs
|
||||
License: GPLv3+
|
||||
URL: https://uos-packages.deepin.com/uos/pool/main/d/deepin-log-viewer/
|
||||
Source0: %{name}-%{version}.orig.tar.xz
|
||||
URL: https://github.com/linuxdeepin/%{name}
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
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-qtbase-devel
|
||||
BuildRequires: qt5-devel
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake3
|
||||
BuildRequires: dtkcore-devel
|
||||
BuildRequires: dtkwidget-devel
|
||||
BuildRequires: dtkgui-devel
|
||||
BuildRequires: deepin-gettext-tools
|
||||
BuildRequires: qt5-linguist
|
||||
BuildRequires: qt5-qtmultimedia-devel
|
||||
BuildRequires: qt5-qtx11extras-devel
|
||||
BuildRequires: systemd-devel
|
||||
BuildRequires: libicu-devel
|
||||
BuildRequires: qt5-rpm-macros
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: qt5-qttools-devel
|
||||
BuildRequires: pkgconfig(dframeworkdbus)
|
||||
BuildRequires: gtest-devel
|
||||
BuildRequires: gmock-devel
|
||||
BuildRequires: kf5-kcodecs-devel
|
||||
BuildRequires: libzip-devel
|
||||
BuildRequires: xerces-c-devel
|
||||
BuildRequires: boost-devel
|
||||
BuildRequires: minizip-devel
|
||||
BuildRequires: rapidjson-devel
|
||||
BuildRequires: libtool-ltdl-devel
|
||||
BuildRequires: fftw-libs
|
||||
BuildRequires: qt5-qtbase-private-devel
|
||||
BuildRequires: dtkcommon-devel
|
||||
BuildRequires: qt5-qtsvg-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: polkit-qt5-1-devel
|
||||
|
||||
|
||||
%description
|
||||
Log Viewer is a useful tool for viewing system logs.
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
%autosetup -p1
|
||||
|
||||
|
||||
%build
|
||||
export PATH=$PATH:/usr/lib64/qt5/bin
|
||||
mkdir build && cd build
|
||||
%{_libdir}/qt5/bin/qmake ..
|
||||
%{__make}
|
||||
export PATH=%{_qt5_bindir}:$PATH
|
||||
sed -i "s|^cmake_minimum_required.*|cmake_minimum_required(VERSION 3.0)|" $(find . -name "CMakeLists.txt")
|
||||
mkdir build && pushd build
|
||||
%cmake -DCMAKE_BUILD_TYPE=Release ../ -DAPP_VERSION=%{version} -DVERSION=%{version}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
pushd %{_builddir}/%{name}-%{version}/build
|
||||
%make_install INSTALL_ROOT=%{buildroot}
|
||||
popd
|
||||
|
||||
%install
|
||||
%make_install -C build INSTALL_ROOT="%buildroot"
|
||||
cp %buildroot/usr/lib/deepin-daemon/log-view-service %buildroot/usr/bin/log-view-service
|
||||
|
||||
%files
|
||||
%{_bindir}/deepin-log-viewer
|
||||
%{_bindir}/logViewerAuth
|
||||
%{_datadir}/applications/deepin-log-viewer.desktop
|
||||
%{_datadir}/deepin-log-viewer/translations/deepin-log-viewer.qm
|
||||
%{_datadir}/deepin-log-viewer/translations/deepin-log-viewer_zh_CN.qm
|
||||
%{_datadir}/icons/hicolor/scalable/apps/deepin-log-viewer.svg
|
||||
%{_datadir}/polkit-1/actions/com.deepin.pkexec.logViewerAuth.policy
|
||||
%doc README.md
|
||||
%license LICENSE.txt
|
||||
%{_bindir}/%{name}
|
||||
%{_bindir}/logViewerAuth
|
||||
%{_bindir}/logViewerTruncate
|
||||
%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/%{name}/translations/*.qm
|
||||
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
|
||||
%{_datadir}/polkit-1/actions/*.policy
|
||||
%{_datadir}/deepin-manual/manual-assets/application/deepin-log-viewer/log-viewer/*
|
||||
/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.d/com.deepin.logviewer.conf
|
||||
%{_datadir}/%{name}/DocxTemplate/*.dfw
|
||||
|
||||
|
||||
%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
|
||||
- update: update to 5.8.34
|
||||
|
||||
* Tue Jul 19 2022 konglidong <konglidong@uniontech.com> - 5.8.7-1
|
||||
- update to 5.8.7
|
||||
|
||||
* Mon Feb 07 2022 liweigang <liweiganga@uniontech.com> - 5.8.0.23-2
|
||||
- fix build error
|
||||
|
||||
* Mon Jul 12 2021 weidong <weidong@uniontech.com> - 5.8.0.23-1
|
||||
- Update 5.8.0.23
|
||||
|
||||
* Fri Aug 28 2020 chenbo pan <panchenbo@uniontech.com> - 5.0.10-2
|
||||
- fix compile fail
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user