Repository navigation
Conversation
1. The Arch ddm package is still 0.4.0 and predates the DaemonMessages::SessionDirs / LastLogin values that src/greeter/greeterproxy.cpp requires, so the container build failed with "'LastLogin' is not a member of 'DDM::DaemonMessages'". 2. Replace "pacman -S ddm" with extra-cmake-modules and add a "Build and Install DDM" step that clones DDM master and installs it into /usr, as the deepin workflow already does. 3. Keep that step after the treeland-protocols build, because DDM master requires TreelandProtocols >= 0.5.3 and that step installs master. Log: Fix the Arch Linux CI build failure caused by the outdated distribution DDM package Influence: 1. The "Build treeland on Arch Linux" workflow should pass again on master and on every pull request. 2. The job now builds DDM master from source, so it needs network access to github.com and the extra-cmake-modules package. 3. Installing DDM into /usr must provide /usr/include/ddm/common/Messages.h and /usr/lib/cmake/DDM/DDMConfig.cmake for the treeland configure step. ci(archlinux): Arch 构建改为源码构建 DDM 1. Arch 的 ddm 包仍是 0.4.0,缺少 src/greeter/greeterproxy.cpp 所需的 DaemonMessages::SessionDirs / LastLogin,容器构建报 "'LastLogin' is not a member of 'DDM::DaemonMessages'"。 2. 把 "pacman -S ddm" 换成 extra-cmake-modules,并新增 "Build and Install DDM" 步骤,克隆 DDM master 并安装到 /usr,与 deepin 流水线 的做法保持一致。 3. 该步骤放在 treeland-protocols 构建之后——DDM master 要求 TreelandProtocols >= 0.5.3,而前一步装的正是 master。 Log: 修复 Arch Linux CI 因发行版 DDM 版本过旧导致的编译失败 Influence: 1. "Build treeland on Arch Linux" 在 master 与所有 PR 上应恢复正常。 2. 该 job 需要访问 github.com 并安装 extra-cmake-modules 才能源码构建 DDM master。 3. DDM 安装到 /usr 后应提供 /usr/include/ddm/common/Messages.h 与 /usr/lib/cmake/DDM/DDMConfig.cmake,供 treeland configure 使用。 Multica Issue: WM-981
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: deepin-wm The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideConfigurationReplace the outdated Arch DDM package with a source build, installed after treeland-protocols so Treeland can use the required DDM messages and dependency.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
Arch Linux 的
Build treeland on Arch Linux流水线在Configure and Build treeland with ci preset步骤失败,src/greeter/greeterproxy.cpp报:这是仓库基线的依赖问题,与 #1618 的 QML 改动无关:#1575 和无关分支
xshape报的是同样的两行,master 自身最近一次构建也是失败的。根因:master
87e63ff4 fix(greeter): take session dirs and the last login from DDM之后,greeter 依赖DaemonMessages::SessionDirs/LastLogin。这两个枚举值由 ddm 仓库的ce83963 feat(config)!: migrate DDM configuration to DConfig引入,而该提交在 ddm 任何 tag 之后(git tag --contains ce83963为空),也就是说目前没有任何 DDM 发行版包含它们。Arch extra 的ddm 0.4.0-2对应上游 0.4.0 tag,头文件里没有这两个值,于是编译失败。不做编译期兼容降级的原因:
87e63ff4同时改了 Login 消息的协议载荷(原来发DDM::Session(type, name),现在发会话桌面文件路径字符串)。对着 0.4.0 的头文件做#ifdef兜底能编过,但运行期把 Login 发给 0.4.0 的 ddm 会被错误解析,登录直接坏掉。treeland master 事实上要求新版 ddm,所以正确的修法是拉高依赖,而不是把代码降级。改动
只改
.github/workflows/treeland-archlinux-build.yml(+17/−3):pacman -S ddm,改为只安装extra-cmake-modules(源码构建 DDM 需要 ECM),并在注释中写明原因。Build and Install DDM步骤:git clone --depth 1ddm master,用-DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release配置后 build + install,产出/usr/include/ddm/common/Messages.h与/usr/lib/cmake/DDM/DDMConfig.cmake。Build and Install treeland-protocols之后:ddm master 要求TreelandProtocols >= 0.5.3,前一步安装的是 master(0.9.0)。这个做法沿用仓库已有惯例:
treeland-deepin-build.yml一直是源码构建 ddm,只有 Arch 这条之前用了发行版包。验证
在
archlinux:latest容器里按 workflow 的同一套包重跑了整条链路(pacman 系统更新 → base/Qt6/graphics/DTK 依赖 → treeland-protocols master → ddm master → treeland master):Messages.h第 55/56 行正是SessionDirs/LastLogin;Dtk6的Core+Tools(/usr/lib/cmake/Dtk6Tools)由dtk6core提供,没有缺包。cmake --preset ci -DBUILD_TREELAND_PROTOCOL_TESTS=ON配置通过,DDM 识别为>= 0.2.0,1966/1966 个目标编译链接全部通过(含greeterproxy.cpp与全部协议测试)。同时说明本次没有真机运行验证:改动只涉及 CI 构建步骤,实际效果以流水线结果为准。
后续(不在本 PR 范围)
Arch 的
ddm包会一直是 0.4.0,直到 DDM 发新版本。长期正解是 ddm 把版本提到 0.5.0 后,treeland 把src/CMakeLists.txt的find_package(DDM 0.2.0)一起抬高,这样能在 configure 阶段而不是编译阶段报错。现在不能抬——ddm master 自身的project(VERSION)还写着 0.4.0。issue:WM-981
Summary by Sourcery
Build DDM from source in the Arch Linux workflow so Treeland compiles against the required daemon message definitions.
Bug Fixes:
Enhancements:
CI: