Skip to content

Conversation

@deepin-mozart
Copy link
Contributor

@deepin-mozart deepin-mozart commented Nov 5, 2025

…iles

Log:
Change-Id: I063521901d7b64e0a96bb4dd8887be31c9d07491

Summary by Sourcery

Refresh Debian packaging with updated build dependencies and enhanced security hardening flags, and simplify CMakeLists by removing manual rpath and CXX_FLAGS settings

Enhancements:

  • Remove custom CMAKE_INSTALL_RPATH and CMAKE_CXX_FLAGS definitions from CMakeLists to defer flag management to the packaging system

Build:

  • Update Debian control and rules to bump build dependencies and enable distribution-managed security flags

…iles

Log:
Change-Id: I063521901d7b64e0a96bb4dd8887be31c9d07491
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

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

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "b": [
                "export DEB_BUILD_MAINT_OPTIONS = hardening=+all",
                "export DEB_CFLAGS_MAINT_APPEND = -Wall -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=1 -fPIC",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Wall -fPIE -fstack-protector-strong -D_FORTIFY_SOURCE=1 -fPIC",
                "export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -pie"
            ]
        }
    }
}

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 there - I've reviewed your changes - here's some feedback:

  • Commenting out the -fPIE and -Wl,--as-needed flags removes important security hardening—please clarify why they were removed or reapply them per-target via target_compile_options.
  • Disabling CMAKE_INSTALL_RPATH may break runtime library lookups on install; if you’re switching to a different rpath strategy, please document the new approach.
  • Instead of tweaking CMAKE_CXX_FLAGS globally, consider using target_compile_options to apply compiler/linker flags only to the targets that need them.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Commenting out the -fPIE and -Wl,--as-needed flags removes important security hardening—please clarify why they were removed or reapply them per-target via target_compile_options.
- Disabling CMAKE_INSTALL_RPATH may break runtime library lookups on install; if you’re switching to a different rpath strategy, please document the new approach.
- Instead of tweaking CMAKE_CXX_FLAGS globally, consider using target_compile_options to apply compiler/linker flags only to the targets that need them.

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.

@sourcery-ai
Copy link

sourcery-ai bot commented Nov 5, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR refines the CMake build setup by removing hard-coded RPATH and explicit PIE flags, and brings Debian packaging in line with updated build dependencies and security hardening requirements.

File-Level Changes

Change Details Files
Disable custom RPATH insertion in CMakeLists
  • Comment out CMAKE_INSTALL_RPATH assignment
  • Comment out corresponding status output
CMakeLists.txt
Remove explicit CXX build flags in CMakeLists
  • Comment out setting of CMAKE_CXX_FLAGS including -g -Wall -Wl,--as-need -fPIE
CMakeLists.txt
Align debian/control Build-Depends with project requirements
  • Add missing libraries and tooling to Build-Depends
  • Remove obsolete or redundant dependencies
  • Bump required cmake version
debian/control
Enhance security hardening in debian/rules
  • Inject hardening linker flags (-Wl,-z,relro,-z,now) into dh_auto_configure
  • Ensure PIE and stack protection flags are applied
  • Update override targets to pass custom CXXFLAGS/LDFLAGS
debian/rules

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

github-actions bot commented Nov 5, 2025

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "debian/control": [
        {
            "line": "Homepage: http://www.deepin.org",
            "line_number": 49,
            "rule": "S35",
            "reason": "Url link | 6fe814dfb7"
        }
    ]
}

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: deepin-mozart

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

The pull request process is described 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-mozart
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Nov 5, 2025

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit 9c95b5d into linuxdeepin:master Nov 5, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants