Skip to content

fix: add login.defs to Build-Depends for cmake UID detection - #122

Merged
Groveer merged 1 commit into
linuxdeepin:masterfrom
wineee:deb
Nov 12, 2026
Merged

Groveer merged 1 commit into
linuxdeepin:masterfrom
wineee:deb

Conversation

@wineee

@wineee wineee commented Nov 12, 2026 •

Copy link
Copy Markdown
Member
  1. CMake fails with "Could not find login.defs at /etc/login.defs" because the build chroot lacks the login.defs package
  2. Add login.defs to Build-Depends so the file is present during build

Log: No user-facing changes

Influence:

  1. Run sbuild/dpkg-buildpackage and confirm CMake configure passes
  2. Verify UID_MIN/UID_MAX are autodetected from /etc/login.defs
  3. Confirm no lintian warning about login.defs in Build-Depends

fix: 在 Build-Depends 中添加 login.defs 以支持 cmake 的 UID 探测

  1. 构建 chroot 缺少 login.defs 包,导致 CMake 报错 "Could not find login.defs at /etc/login.defs"
  2. 在 Build-Depends 中添加 login.defs,确保构建时该文件存在

Log: 无用户可见变化

Influence:

  1. 执行 sbuild/dpkg-buildpackage,确认 CMake 配置阶段通过
  2. 验证 UID_MIN/UID_MAX 能从 /etc/login.defs 自动探测
  3. 确认 login.defs 出现在 Build-Depends 不会引发 lintian 告警

Summary by Sourcery

Bug Fixes:

  • Add login.defs to the Debian build dependencies so CMake can detect UID_MIN and UID_MAX during package configuration.

1. CMake fails with "Could not find login.defs at /etc/login.defs"
   because the build chroot lacks the login.defs package
2. Add login.defs to Build-Depends so the file is present during build

Log: No user-facing changes

Influence:
1. Run sbuild/dpkg-buildpackage and confirm CMake configure passes
2. Verify UID_MIN/UID_MAX are autodetected from /etc/login.defs
3. Confirm no lintian warning about login.defs in Build-Depends

fix: 在 Build-Depends 中添加 login.defs 以支持 cmake 的 UID 探测

1. 构建 chroot 缺少 login.defs 包,导致 CMake 报错
   "Could not find login.defs at /etc/login.defs"
2. 在 Build-Depends 中添加 login.defs,确保构建时该文件存在

Log: 无用户可见变化

Influence:
1. 执行 sbuild/dpkg-buildpackage,确认 CMake 配置阶段通过
2. 验证 UID_MIN/UID_MAX 能从 /etc/login.defs 自动探测
3. 确认 login.defs 出现在 Build-Depends 不会引发 lintian 告警
@sourcery-ai

sourcery-ai Bot commented Nov 12, 2026

Copy link
Copy Markdown

Reviewer's Guide

Configuration

Add login.defs to the build dependencies so CMake can detect UID limits during configuration.

  • debian/control L11

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

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

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 ✨

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 100 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次变更在 debian/control 的 Build-Depends 列表中新增 login.defs 依赖,以解决 cmake 构建时 UID 检测问题。变更仅一行,语法正确、位置合理(按字母序插入),无安全风险,无性能影响,代码质量良好。

🔍 详细分析

1. 语法逻辑 ✅

评价: 语法正确,逻辑清晰 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


2. 代码质量 ✅

评价: 代码结构清晰,注释完整 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


3. 代码性能 ✅

评价: 性能良好,资源使用合理 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


4. 代码安全 🔒

评价: 存在0个安全漏洞 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: []


💡 改进建议代码示例


本报告由 AI 代码审查工具自动生成

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Groveer, wineee

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

@Groveer
Groveer merged commit 0d86f6b into linuxdeepin:master Nov 12, 2026
8 checks passed
@wineee
wineee deleted the deb branch November 12, 2026 11:21
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