Skip to content

Revert "deps: migrate from p7zip-full to 7zip package"#113

Closed
wangrong1069 wants to merge 1 commit intolinuxdeepin:masterfrom
wangrong1069:pr0421
Closed

Revert "deps: migrate from p7zip-full to 7zip package"#113
wangrong1069 wants to merge 1 commit intolinuxdeepin:masterfrom
wangrong1069:pr0421

Conversation

@wangrong1069
Copy link
Copy Markdown
Contributor

@wangrong1069 wangrong1069 commented Apr 21, 2026

This reverts commit 4764b67.

Summary by Sourcery

Restore the runtime dependency on the legacy p7zip package instead of 7zip in the RPM packaging metadata.

Bug Fixes:

  • Revert the previous migration to 7zip to ensure compatibility with environments that still rely on the p7zip package.

Build:

  • Adjust RPM spec to depend on p7zip rather than 7zip.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 21, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Reverts the dependency change from the 7zip package back to p7zip in the RPM spec to restore the previous packaging requirement, aligning runtime dependencies with earlier behavior.

File-Level Changes

Change Details Files
Restore p7zip as the runtime archive dependency in the RPM packaging.
  • Change RPM spec runtime dependency from 7zip back to p7zip to match prior packaging expectations
  • Keep all other build and runtime requirements unchanged
rpm/deepin-boot-maker.spec

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

@github-actions
Copy link
Copy Markdown

  • 检测到debian目录文件有变更: debian/control

Copy link
Copy Markdown

@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 left some high level feedback:

  • If the intent is to fully revert the migration to 7zip, double‑check that all packaging targets (including the debian/control file and any build scripts) consistently depend on p7zip and no references to 7zip remain.
  • Consider expanding the commit message to briefly explain why the dependency is being reverted (e.g., compatibility or packaging issues) so future maintainers understand the rationale without digging through history.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- If the intent is to fully revert the migration to 7zip, double‑check that all packaging targets (including the debian/control file and any build scripts) consistently depend on p7zip and no references to 7zip remain.
- Consider expanding the commit message to briefly explain why the dependency is being reverted (e.g., compatibility or packaging issues) so future maintainers understand the rationale without digging through history.

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
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 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

@deepin-ci-robot
Copy link
Copy Markdown

deepin pr auto review

这段代码变更主要涉及了 deepin-boot-maker 项目的包依赖管理文件(Debian 的 control 文件和 RPM 的 spec 文件)。变更的核心是将依赖项从 7zip 修改为 p7zip-full(Debian)和 p7zip(RPM)。

以下是对该变更的详细审查意见,涵盖语法逻辑、代码质量、性能和安全性:

1. 语法逻辑与规范性

  • Debian 部分 (debian/control):

    • 变更点: 将 7zip 改为 p7zip-full
    • 分析: 这是一个正确的逻辑修正。在 Debian 及其衍生发行版(如 Ubuntu)的官方仓库中,并没有名为 7zip 的软件包。7zip 是软件本身的名称,而在 Debian 生态系统中,该工具的包名通常是 p7zip-full(提供完整的 7z 压缩/解压支持)或 p7zip(仅提供命令行工具,功能受限)。
    • 结论: 修改为 p7zip-full 是符合 Debian 包管理规范的,能够解决依赖无法满足的问题。
  • RPM 部分 (rpm/deepin-boot-maker.spec):

    • 变更点: 将 7zip 改为 p7zip
    • 分析: 在基于 RPM 的发行版(如 Fedora, openSUSE)中,包名通常为 p7zipp7zip-plugins。使用 7zip 作为包名在很多 RPM 仓库中是不存在的,会导致构建或安装失败。
    • 结论: 修改为 p7zip 符合 RPM 生态的常见命名规范。

2. 代码质量

  • 一致性: 该修改确保了跨平台(Debian 系和 RPM 系)依赖项的正确性,提高了软件包的可安装性和兼容性。
  • 完整性:
    • 在 Debian 系中,p7zip-full 包含了 7z 命令行工具及其插件,支持 7z 格式的压缩和解压。相比之下,p7zip 包通常只包含 7zr 工具(功能受限)。对于启动盘制作工具来说,可能需要处理各种 ISO 或压缩镜像,因此使用 p7zip-full 是更高质量的选择,确保功能完整。
    • 在 RPM 系中,通常 p7zip 包就包含了完整的功能,或者依赖 p7zip-plugins。目前的修改是合理的。

3. 代码性能

  • 影响: 此变更仅影响包的依赖声明,不涉及具体的代码逻辑执行,因此对运行时性能无直接影响。
  • 安装体积: p7zip-full 相比于某些轻量级替代品可能会占用稍多的磁盘空间,但考虑到其功能的必要性(处理压缩文件),这是可接受的权衡。

4. 代码安全

  • 依赖来源: p7zip (7-Zip 的 Linux 移植版) 已经有一段时间没有进行活跃的版本更新了(原版 7-Zip 在 Windows 上更新频繁,但 Linux 的 p7zip 项目维护较慢)。
  • 潜在风险: 如果上游存在未修复的安全漏洞,依赖旧版本的压缩工具可能存在风险。
  • 改进建议:
    • 考虑替代方案: 长期来看,可以考虑评估是否迁移到 zstdxz 或者维护更活跃的压缩工具后端(如果业务逻辑允许)。
    • 版本锁定: 如果 p7zip 在特定发行版中版本过旧,建议在构建脚本中检查依赖的最低版本,或者确保发行版的安全更新能够覆盖该依赖。

5. 综合改进意见

  1. RPM 依赖完整性检查:

    • 在某些较新的 RPM 发行版(如 Fedora 31+ 或 RHEL 9)中,p7zip 可能已经被移除或不再默认包含在标准仓库中,或者被 7zip(注意:部分发行版现在可能开始使用新命名的包,虽然少见)替代。
    • 建议: 确认目标 RPM 发行版(如 openSUSE, Fedora, CentOS)的仓库中确实存在 p7zip 包。如果在某些发行版中不存在,可能需要使用条件判断(%if)来区分不同发行版的依赖,或者寻找替代包(如 p7zip-plugins)。
  2. Debian 架构限制:

    • 注意到 syslinux[linux-amd64 linux-i386] 的架构限制。如果 deepin-boot-maker 计划支持 ARM 架构(如 arm64),p7zip-full 通常是可以用的,但 syslinux 的依赖需要调整(可能需要依赖 grub-efi 或其他工具)。虽然这不属于本次 diff 的范围,但值得注意。
  3. 文档更新:

    • 如果项目的 README 或安装文档中提到了 "需要安装 7zip",建议同步更新为 "需要安装 p7zip-full (Debian/Ubuntu) 或 p7zip (Fedora/RHEL)",以避免用户困惑。

总结
这是一次必要的修正,修复了包名错误导致的依赖问题。逻辑正确且符合规范。建议进一步确认目标 RPM 发行版中 p7zip 包的可用性,并关注该依赖库的长期维护状态。

@wangrong1069 wangrong1069 deleted the pr0421 branch April 21, 2026 11:17
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