Skip to content

fix: add rar depends to extrart long-filename file#361

Closed
LiHua000 wants to merge 1 commit intolinuxdeepin:release/eaglefrom
LiHua000:release/eagle
Closed

fix: add rar depends to extrart long-filename file#361
LiHua000 wants to merge 1 commit intolinuxdeepin:release/eaglefrom
LiHua000:release/eagle

Conversation

@LiHua000
Copy link
Contributor

@LiHua000 LiHua000 commented Feb 6, 2026

Log: as title

Bug: https://pms.uniontech.com/bug-view-343139.html

Summary by Sourcery

Update Debian packaging metadata related to dependencies for handling RAR archives with long filenames.

Bug Fixes:

  • Ensure required RAR dependency is declared so long-filename RAR archives can be extracted correctly.

Build:

  • Adjust Debian control file to include the appropriate RAR dependency for archive extraction.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 6, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR updates the Debian packaging metadata to add a missing RAR-related dependency required to correctly extract long-filename files.

File-Level Changes

Change Details Files
Add missing RAR extraction dependency to Debian packaging so long-filename RAR files can be handled correctly.
  • Update the debian/control package dependency list to include a RAR-related package required for handling long filenames in RAR archives
  • Ensure the new dependency is declared in the appropriate binary package stanza so it is pulled in at install time
debian/control

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: LiHua000

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

@deepin-ci-robot
Copy link

deepin pr auto review

针对这段 debian/control 文件的 diff 内容,我从语法逻辑、代码质量、代码性能和代码安全四个方面进行了审查,以下是详细的改进意见:

1. 语法逻辑

  • 架构限制语法unar[i386 amd64]unrar[i386 amd64] 的写法是符合 Debian 控制文件语法的,表示这些依赖包仅在 i386amd64 架构下生效。新增的 rar[i386 amd64] 保持了这一逻辑的一致性,语法上是正确的。

2. 代码质量

  • 依赖冗余与冲突风险
    • unrarrar 的关系:通常 unrar 是 RAR 格式的解压器(免费版),而 rar 是 WinRAR 的官方 Linux 命令行工具(通常是共享软件或专有软件),它包含解压和压缩功能。
    • 潜在冲突:在某些发行版或仓库中,unrar 包和 rar 包可能会安装相同的二进制文件(如 /usr/bin/unrar)或相互冲突。如果两者同时安装,可能会导致文件覆盖或包管理器报错。
    • 建议:请确认目标发行版(如 Deepin/UOS)的仓库中 unrarrar 是否可以共存。如果 rar 包已经包含了完整的解压功能,可以考虑移除 unrar,或者仅保留 unrar(如果只需要解压功能)。如果必须同时存在,请确保它们不会产生文件冲突。

3. 代码性能

  • 包体积与启动时间
    • 添加 rar 依赖可能会增加最终安装包的大小。虽然这对性能影响微乎其微,但对于追求轻量级的系统来说,引入非必要的专有工具可能不是最优解。
    • 如果 rar 仅用于创建 RAR 格式的压缩包,而用户主要使用解压功能,建议将 rarDepends(强依赖)移动到 SuggestsRecommends(建议依赖)。这样用户在安装基础包时不会被强制安装较大的专有工具,只有在需要创建 RAR 时才会提示安装。

4. 代码安全

  • 专有软件风险
    • rar 通常不是开源软件,而是专有软件。在开源发行版(如 Debian、Deepin)中,将专有软件作为强依赖(Depends)通常是不被推荐的,因为这违反了自由软件原则,且用户无法审计其源代码。
    • 许可合规性:请确认引入 rar 包是否符合项目的开源协议策略以及发行版的合规性要求。
  • 维护性风险
    • 如果上游 rar 停止更新或出现安全漏洞,由于它是强依赖,这会直接影响 deepin-compressor 的安全性。

综合改进建议

  1. 调整依赖关系
    如果是为了支持 RAR 格式的创建而添加 rar,建议将其降级为推荐依赖,除非该软件的核心功能就是创建 RAR 文件。

    建议修改如下:

    -Depends: ${shlibs:Depends}, ${misc:Depends}, p7zip-full, deepin-shortcut-viewer, unar[i386 amd64], unrar[i386 amd64], rar[i386 amd64], pigz
    +Depends: ${shlibs:Depends}, ${misc:Depends}, p7zip-full, deepin-shortcut-viewer, unar[i386 amd64], unrar[i386 amd64], pigz
    +Recommends: uos-reporter, deepin-event-log, rar[i386 amd64]
  2. 检查冲突
    在提交更改前,请在测试环境中验证同时安装 unarunrarrar 是否会产生文件冲突。

  3. 架构列表
    目前的写法 rar[i386 amd64] 限制性较强。如果 rar 包也存在于 arm64mips64 等架构下,且软件需要支持这些架构,应考虑添加相应的架构限定,或者如果该包在所有支持的架构中都存在,可以去掉架构限制(视仓库情况而定)。

总结:虽然语法正确,但引入专有的 rar 作为强依赖存在安全和合规风险,且可能与 unrar 冲突。建议将其移至 RecommendsSuggests,并确认包之间的共存关系。

@LiHua000 LiHua000 closed this Feb 6, 2026
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.

2 participants