Skip to content

refactor: switch ddm IPC to Qt Remote Objects#926

Open
zccrs wants to merge 1 commit into
linuxdeepin:masterfrom
zccrs:qremoteobject-ddm-ipc
Open

refactor: switch ddm IPC to Qt Remote Objects#926
zccrs wants to merge 1 commit into
linuxdeepin:masterfrom
zccrs:qremoteobject-ddm-ipc

Conversation

@zccrs
Copy link
Copy Markdown
Member

@zccrs zccrs commented Jun 2, 2026

Summary

  • replace the treeland DDM Wayland global with a Qt Remote Objects source
  • only start the DDM remote host while treeland is actually connected to ddm
  • restrict the local remote host with QLocalServer::UserAccessOption

Dependencies

Testing

  • cmake -S . -B build-qro-manualrepc -G Ninja -DTreelandProtocols_DIR=/tmp/treeland-protocols-install/share/cmake/TreelandProtocols
  • cmake --build build-qro-manualrepc

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.

Sorry @zccrs, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: zccrs

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

@zccrs zccrs force-pushed the qremoteobject-ddm-ipc branch 3 times, most recently from 8e45a63 to 9abb442 Compare June 3, 2026 02:47
Comment thread src/greeter/greeterproxy.cpp
Comment thread src/modules/ddm/ddminterfacev1.cpp Outdated
namespace {
constexpr auto remoteObjectName = "TreelandDDMRemote";
constexpr auto remoteObjectSocketName = "org.deepin.TreelandDDMRemote";
constexpr auto ddmServiceCgroup = "/ddm.service";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不用判断service文件或pid,只需要设置好socket文件的权限,只允许root和treeland所在用户访问即可

Comment thread src/modules/ddm/ddminterfacev1.cpp Outdated
}

wl_global *DDMInterfaceV1Private::global() const
DDMInterfaceV1Private::DDMInterfaceV1Private(DDMInterfaceV1 *_q)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要复用这个interface文件,很奇怪,搞个新的,旧的删除就行

@zccrs zccrs force-pushed the qremoteobject-ddm-ipc branch 2 times, most recently from b35594b to 532987b Compare June 3, 2026 04:07
@zccrs
Copy link
Copy Markdown
Member Author

zccrs commented Jun 3, 2026

已按这轮 review 收口:

  • 按评论要求,不再复用旧的 ddminterfacev1.*;QRO 服务端已拆到新的 ddmremoteobjectv1.*,旧文件已删除。
  • 连接鉴权不再依赖 pid + cgroup 校验,改为只依赖本地 socket 文件权限控制;QLocalServer 继续使用 UserAccessOption
  • treelandddmremote.rep 已删掉未使用的 activateSession/deactivateSession/enableRender/disableRender,只保留当前 DDM 实际调用的切换接口。
  • 新增文件的 SPDX 年份已按 CI 规则改成单年,Check-SPDX-Copyright 已重新触发。

这轮 force-push 后我会继续盯 CI,确认全部变绿。

Comment thread src/modules/ddm/CMakeLists.txt Outdated
set(TREELAND_DDM_REMOTE_SOURCE_HEADER
${CMAKE_CURRENT_BINARY_DIR}/rep_treelandddmremote_source.h
)
add_custom_command(
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

为啥用自定义command?怎么不用 qt_add_repc_replicas?

Replace the old DDM Wayland interface with a Qt Remote Objects host and source while keeping the peer validation around the local socket transport.

Refresh the commit message body so the branch satisfies the repository commitlint policy after rebasing review feedback.
@zccrs zccrs force-pushed the qremoteobject-ddm-ipc branch from 532987b to 084edb8 Compare June 3, 2026 10:36
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