Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions services/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
configure_file(ddm.service.in ddm.service)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ddm.service" DESTINATION "${SYSTEMD_SYSTEM_UNIT_DIR}")

configure_file(ddm-sysuser.conf.in ddm-sysuser.conf)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ddm-sysuser.conf" DESTINATION "${SYSTEMD_SYSUSERS_DIR}" RENAME dde.conf)

# systemd-tmpfiles can be used standalone without other systemd parts
if(DEFINED SYSTEMD_TMPFILES_DIR)
configure_file(ddm-tmpfiles.conf.in ddm-tmpfiles.conf)
Expand All @@ -12,6 +9,14 @@ endif()

if(EXISTS "/etc/debian_version")
Copy link
Member

Choose a reason for hiding this comment

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

不应该这样做,应该添加一个cmake参数,在debian/rules 打包时关闭这些能力,而且要在readme里说明。不过这个提交不用改,可以新起一个。

install(FILES debian.ddm.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME ddm)

# In debian-based systems, seatd uses video group instead of seat
# group, avoid creating seat group mistakenly by specifying
# different sysuser.conf
configure_file(debian.ddm-sysuser.conf.in debian.ddm-sysuser.conf)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/debian.ddm-sysuser.conf" DESTINATION "${SYSTEMD_SYSUSERS_DIR}" RENAME dde.conf)
Comment on lines 10 to +17
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The Debian vs non-Debian selection is based on if(EXISTS "/etc/debian_version"), which is evaluated on the build host. This can produce incorrect install artifacts when cross-compiling or building Debian packages in a non-Debian environment/container. Consider making this an explicit CMake option (overridable by packagers) or using a more target-oriented detection mechanism.

中文:这里用 if(EXISTS "/etc/debian_version") 在构建机上判断 Debian/非 Debian,这在交叉编译或在非 Debian 环境/容器里构建 Debian 包时可能生成错误的安装产物。建议改为可由打包者覆盖的 CMake 选项,或使用更面向目标系统的检测方式。

Copilot uses AI. Check for mistakes.
else()
install(FILES ddm.pam DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/pam.d RENAME ddm)
configure_file(ddm-sysuser.conf.in ddm-sysuser.conf)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ddm-sysuser.conf" DESTINATION "${SYSTEMD_SYSUSERS_DIR}" RENAME dde.conf)
endif()
6 changes: 6 additions & 0 deletions services/debian.ddm-sysuser.conf.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Type Name ID GECOS Home directory Shell
u dde - "DDM Greeter Account" ${STATE_DIR} -
Comment on lines +1 to +2
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

New file debian.ddm-sysuser.conf.in doesn’t include an SPDX license identifier header. Project guidelines require newly added files to carry an SPDX line (typically GPL-2.0-or-later), so please add it at the top of this file.

中文:新添加的文件 debian.ddm-sysuser.conf.in 缺少 SPDX 许可证标识头。项目规范要求新增文件包含 SPDX 行(通常为 GPL-2.0-or-later),请在文件开头补充。

Copilot uses AI. Check for mistakes.
g dde -
m dde dde
m dde video
m dde render