Skip to content

refactor: Service safety rectification#181

Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
wangrong1069:pr1024
Oct 30, 2025
Merged

refactor: Service safety rectification#181
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
wangrong1069:pr1024

Conversation

@wangrong1069
Copy link
Contributor

  • Replace com.deepin.diskmanager policy with com.deepin.pkexec.deepin-diskmanager
  • Update all translation files to reflect new policy filename
  • Modify CMakeLists.txt to use deepin-policy-ts-convert for policy file generation
  • Update desktop file handling with deepin-desktop-ts-convert
  • Change authorization check in diskmanagerservice.cpp to use new action ID
  • Update debian/control to include pkexec dependency and deepin-gettext-tools
  • Fix installation paths for USB scripts from openconnect to deepin-diskmanager
  • Remove hardcoded translations from policy file, rely on translation system
  • Update DBus configuration to remove own policy requirement

This migration improves security and follows modern authentication best practices.

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @wangrong1069, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

lzwind
lzwind previously approved these changes Oct 27, 2025
- Replace com.deepin.diskmanager policy with com.deepin.pkexec.deepin-diskmanager
- Update all translation files to reflect new policy filename
- Modify CMakeLists.txt to use deepin-policy-ts-convert for policy file generation
- Update desktop file handling with deepin-desktop-ts-convert
- Change authorization check in diskmanagerservice.cpp to use new action ID
- Update debian/control to include pkexec dependency and deepin-gettext-tools
- Fix installation paths for USB scripts from openconnect to deepin-diskmanager
- Remove hardcoded translations from policy file, rely on translation system
- Update DBus configuration to remove own policy requirement

This migration improves security and follows modern authentication best practices.
@deepin-ci-robot
Copy link

deepin pr auto review

我来分析一下这个 Git diff 的内容,主要涉及许可证文件格式更新、构建系统修改和权限策略调整。

  1. 许可证文件格式更新:
  • .reuse/dep5 改为 REUSE.toml
  • 新格式使用了更现代的 TOML 格式
  • 保持了相同的许可证声明和版权信息
  • 改进:新格式更易维护和解析
  1. 构建系统修改:
  • CMakeLists.txt 中增加了自动生成翻译文件的步骤
  • 使用 deepin-desktop-ts-convertdeepin-policy-ts-convert 工具
  • 改进:自动化处理翻译文件,减少手动维护
  1. 权限策略调整:
  • 策略文件从 com.deepin.diskmanager.policy 改为 com.deepin.pkexec.deepin-diskmanager.policy
  • 移除了所有内嵌的翻译文本,改为从外部文件加载
  • 改进:策略文件更简洁,翻译更容易维护
  1. 安装路径调整:
  • USB 脚本从 /usr/libexec/openconnect/ 移至 /usr/libexec/deepin-diskmanager/
  • systemd 服务文件安装路径从 /lib/systemd/system/ 改为 lib/systemd/system/
  • 改进:路径更符合 FHS 标准
  1. 依赖关系更新:
  • debian/control 中添加了 deepin-gettext-toolspkexec 依赖
  • 改进:确保必要的工具可用
  1. 安全性改进:
  • DBus 配置中移除了 allow own 权限
  • 改进:遵循最小权限原则
  1. 翻译文件更新:
  • 所有翻译文件中的 location 标识符更新为新的策略文件名
  • 改进:保持翻译文件与策略文件同步

总体建议:

  1. 这些改动都是积极的,提高了代码的可维护性和安全性
  2. 建议确保所有依赖的工具在目标系统上都可用
  3. 建议测试新的权限策略是否正确工作
  4. 建议验证安装路径更改是否会影响现有系统

没有发现明显的性能问题或安全隐患。改动主要涉及构建和部署流程的优化。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: lzwind, wangrong1069

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wangrong1069
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Oct 30, 2025

This pr force merged! (status: unstable)

@deepin-bot deepin-bot bot merged commit 39a7722 into linuxdeepin:master Oct 30, 2025
16 of 19 checks passed
@wangrong1069 wangrong1069 deleted the pr1024 branch December 18, 2025 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants