Skip to content

Conversation

@wangrong1069
Copy link
Contributor

@wangrong1069 wangrong1069 commented Dec 26, 2025

Summary by Sourcery

Bug Fixes:

  • Stop creating or relying on the deprecated deepin-anything system user and group during package installation.

The deepin-anything user was initially introduced to address dbus
security issues. This fix was later replaced, and the remaining
deepin-anything user is unnecessary, let's remove it.
As title.

Log: Update version to 6.2.11
@github-actions
Copy link

TAG Bot

TAG: 6.2.11
EXISTED: no
DISTRIBUTION: unstable

@sourcery-ai
Copy link

sourcery-ai bot commented Dec 26, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR updates the Debian packaging scripts to stop creating or managing the dedicated deepin-anything system user and group during package installation, aligning the package behavior with the new requirements.

File-Level Changes

Change Details Files
Stop managing the deepin-anything system user and group in the Debian post-installation script.
  • Remove logic that creates or ensures the existence of the deepin-anything system user.
  • Remove logic that creates or ensures the existence of the deepin-anything system group.
  • Clean up any conditional checks or branches that depended on the deepin-anything user or group.
debian/postinst
Document the removal of the deepin-anything user and group in the Debian changelog.
  • Add a new changelog entry describing the removal of the deepin-anything user and group management.
  • Bump the package version or distribution stanza to reflect the new release.
debian/changelog

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

@deepin-ci-robot
Copy link

deepin pr auto review

我来对这个diff进行仔细的审查:

  1. 语法逻辑:
  • 代码语法正确,符合shell脚本规范
  • 条件判断结构清晰,使用了标准的configure检查
  • 命令执行顺序合理:先删除用户,再删除用户组
  1. 代码质量:
  • 添加了适当的注释,提高了可读性
  • 使用了getent命令来检查用户和组的存在性,这是推荐的做法
  • 添加了echo输出,便于调试和日志记录
  • 使用|| true来避免脚本因命令失败而中断
  1. 代码性能:
  • 代码执行效率良好,没有不必要的操作
  • 使用了轻量级的检查命令
  1. 代码安全:
  • 删除用户和组之前会先检查是否存在,避免不必要的错误
  • 使用了|| true来确保即使删除失败也不会中断脚本执行
  • 删除顺序正确(先用户后组),避免了潜在的依赖问题

改进建议:

  1. 虽然代码已经很完善,但建议在删除用户时添加-r选项来同时删除用户的家目录和邮件池:
userdel -r deepin-anything || true
  1. 建议在删除操作前添加确认机制,特别是在生产环境中:
if [ "$1" = "configure" ]; then
    if [ "$REMOVE_DEEPIN_ANYTHING" = "yes" ]; then
        # 删除操作
    fi
fi
  1. 建议添加日志记录,便于后续追踪:
logger "Removing deepin-anything user and group..."
  1. 考虑添加一个清理函数,使代码更加模块化:
cleanup_deepin_anything() {
    # 清理操作
}
if [ "$1" = "configure" ]; then
    cleanup_deepin_anything
fi

总体来说,这是一个质量较高的patch,主要改进点是删除用户和组的操作,代码逻辑清晰,安全性考虑周全。建议的改进主要是为了提高代码的可维护性和安全性。

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: max-lvs, 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 Dec 29, 2025

This pr force merged! (status: unstable)

@deepin-bot deepin-bot bot merged commit 9d0d2b4 into linuxdeepin:master Dec 29, 2025
17 of 19 checks passed
@wangrong1069 wangrong1069 deleted the pr1226 branch December 29, 2025 02:12
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