Skip to content

Conversation

@18202781743
Copy link
Contributor

  1. Replaced BUILD_WITH_QT6 option with DTK5 option for unified DTK5/DTK6
    build control
  2. Updated project configuration to support both DTK5 (Qt5) and DTK6
    (Qt6) versions
  3. Modified version handling to use DTK_VERSION (5.y.z or 6.y.z) instead
    of PROJECT_VERSION
  4. Updated library naming: dtklog for DTK5 and dtk6log for DTK6
  5. Enhanced Debian packaging to generate separate packages for DTK5
    and DTK6
  6. Added Build-Profiles support (nodtk5, nodtk6) for selective package
    building
  7. Updated installation paths to include dtk5/ and dtk6/ subdirectories
  8. Modified CMake config files to use DTK_NAME_SUFFIX for proper target
    naming

Log: Updated build system to support both DTK5 and DTK6 versions

Influence:

  1. Test building with DTK5=ON (default) to ensure Qt5 compatibility
  2. Test building with DTK5=OFF to ensure Qt6 compatibility
  3. Verify library naming: libdtklog.so for DTK5, libdtk6log.so for DTK6
  4. Check installation paths: include/dtk5/ for DTK5, include/dtk6/ for
    DTK6
  5. Test Debian package building with different profiles (nodtk5, nodtk6)
  6. Verify CMake config files generate correct target names (DtkLog vs
    Dtk6Log)
  7. Ensure pkg-config files have correct dependencies (Qt5Core vs
    Qt6Core)

refactor: 重构CMake构建系统以支持统一的DTK5/DTK6构建

  1. 将BUILD_WITH_QT6选项替换为DTK5选项,用于统一的DTK5/DTK6构建控制
  2. 更新项目配置以同时支持DTK5(Qt5)和DTK6(Qt6)版本
  3. 修改版本处理逻辑,使用DTK_VERSION(5.y.z或6.y.z)替代PROJECT_VERSION
  4. 更新库命名:DTK5使用dtklog,DTK6使用dtk6log
  5. 增强Debian打包系统,为DTK5和DTK6生成独立的软件包
  6. 添加Build-Profiles支持(nodtk5, nodtk6)用于选择性构建软件包
  7. 更新安装路径,包含dtk5/和dtk6/子目录
  8. 修改CMake配置文件以使用DTK_NAME_SUFFIX进行正确的目标命名

Log: 更新构建系统以同时支持DTK5和DTK6版本

Influence:

  1. 测试使用DTK5=ON(默认)构建,确保Qt5兼容性
  2. 测试使用DTK5=OFF构建,确保Qt6兼容性
  3. 验证库命名:DTK5使用libdtklog.so,DTK6使用libdtk6log.so
  4. 检查安装路径:DTK5使用include/dtk5/,DTK6使用include/dtk6/
  5. 测试使用不同配置文件(nodtk5, nodtk6)构建Debian软件包
  6. 验证CMake配置文件生成正确的目标名称(DtkLog vs Dtk6Log)
  7. 确保pkg-config文件具有正确的依赖关系(Qt5Core vs Qt6Core)

deepin-ci-robot added a commit to linuxdeepin/dtk6log that referenced this pull request Dec 29, 2025
Synchronize source files from linuxdeepin/dtklog.

Source-pull-request: linuxdeepin/dtklog#23
@github-actions
Copy link
Contributor

  • 检测到debian目录文件有变更: debian/libdtk6log-dev.install,debian/libdtk6log.install,debian/control,debian/libdtklog-dev.install,debian/libdtklog.install,debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "a": [
                "export QT_SELECT = qt5",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
            ]
        }
    }
}

@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 13,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ]
}

deepin-ci-robot added a commit to linuxdeepin/dtk6log that referenced this pull request Dec 29, 2025
Synchronize source files from linuxdeepin/dtklog.

Source-pull-request: linuxdeepin/dtklog#23
@github-actions
Copy link
Contributor

  • 检测到debian目录文件有变更: debian/libdtk6log-dev.install,debian/libdtk6log.install,debian/control,debian/libdtklog-dev.install,debian/libdtklog.install,debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "a": [
                "export QT_SELECT = qt5",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
            ]
        }
    }
}

@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 13,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ]
}

deepin-ci-robot added a commit to linuxdeepin/dtk6log that referenced this pull request Dec 29, 2025
Synchronize source files from linuxdeepin/dtklog.

Source-pull-request: linuxdeepin/dtklog#23
@github-actions
Copy link
Contributor

  • 检测到debian目录文件有变更: debian/libdtk6log-dev.install,debian/libdtk6log.install,debian/control,debian/libdtklog-dev.install,debian/libdtklog.install,debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "a": [
                "export QT_SELECT = qt5",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
            ]
        }
    }
}

@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 13,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ]
}

deepin-ci-robot added a commit to linuxdeepin/dtk6log that referenced this pull request Dec 29, 2025
Synchronize source files from linuxdeepin/dtklog.

Source-pull-request: linuxdeepin/dtklog#23
@github-actions
Copy link
Contributor

  • 检测到debian目录文件有变更: debian/libdtk6log-dev.install,debian/libdtk6log.install,debian/control,debian/libdtklog-dev.install,debian/libdtklog.install,debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "a": [
                "export QT_SELECT = qt5",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
            ]
        }
    }
}

@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 13,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ]
}

deepin-ci-robot added a commit to linuxdeepin/dtk6log that referenced this pull request Dec 30, 2025
Synchronize source files from linuxdeepin/dtklog.

Source-pull-request: linuxdeepin/dtklog#23
@github-actions
Copy link
Contributor

  • 检测到debian目录文件有变更: debian/libdtk6log-dev.install,debian/libdtk6log.install,debian/control,debian/libdtklog-dev.install,debian/libdtklog.install,debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "a": [
                "export QT_SELECT = qt5",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
            ]
        }
    }
}

@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 13,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ]
}

@asterwyx
Copy link
Contributor

commit标题改一下,refactor重复了。

@18202781743 18202781743 requested a review from asterwyx December 31, 2025 06:14
deepin-ci-robot added a commit to linuxdeepin/dtk6log that referenced this pull request Dec 31, 2025
Synchronize source files from linuxdeepin/dtklog.

Source-pull-request: linuxdeepin/dtklog#23
@github-actions
Copy link
Contributor

  • 检测到debian目录文件有变更: debian/libdtk6log-dev.install,debian/libdtk6log.install,debian/control,debian/libdtklog-dev.install,debian/libdtklog.install,debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "a": [
                "export QT_SELECT = qt5",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
            ]
        }
    }
}

@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到2个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 13,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ],
    "archlinux/PKGBUILD": [
        {
            "line": "url=\"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 9,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ]
}

deepin-ci-robot added a commit to linuxdeepin/dtk6log that referenced this pull request Dec 31, 2025
Synchronize source files from linuxdeepin/dtklog.

Source-pull-request: linuxdeepin/dtklog#23
@github-actions
Copy link
Contributor

  • 检测到debian目录文件有变更: debian/libdtk6log-dev.install,debian/libdtk6log.install,debian/control,debian/libdtklog-dev.install,debian/libdtklog.install,debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "a": [
                "export QT_SELECT = qt5",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
            ]
        }
    }
}

@github-actions
Copy link
Contributor

  • 敏感词检查失败, 检测到2个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 13,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ],
    "archlinux/PKGBUILD": [
        {
            "line": "url=\"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 9,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ]
}

Comment on lines +17 to +34
SET (BUILD_WITH_SYSTEMD OFF CACHE BOOL "Build with systemd")

option(DTK5 "Build DTK5." ON)
if(DTK5)
set(DTK_VERSION_MAJOR "5")
set(DTK_NAME_SUFFIX "")
else()
set(DTK_VERSION_MAJOR "6")
set(DTK_NAME_SUFFIX "6")
endif()

set(DTK_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(DTK_VERSION_PATCH ${PROJECT_VERSION_PATCH})
# Set so version like 0.x.y, it's required for DTK library ABI compatibility.
set(DTK_VERSION "0.${DTK_VERSION_MINOR}.${DTK_VERSION_PATCH}")
set(QT_VERSION_MAJOR ${DTK_VERSION_MAJOR})

SET (DLog "Dtk${DTK_NAME_SUFFIX}Log")
Copy link
Contributor

Choose a reason for hiding this comment

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

这里的命令有时候大写有时候小写,风格太不统一了,看起来费劲。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这种下波让ai全部统一改下写法吧,只改语法的那种,

VERSION ${CMAKE_PROJECT_VERSION}
SOVERSION ${CMAKE_PROJECT_VERSION_MAJOR}
VERSION ${DTK_VERSION}
SOVERSION "0"
Copy link
Contributor

Choose a reason for hiding this comment

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

我觉得这里还是让他们改比较好。soversion很少有为0的,最少也是1。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个版本不能随便动,如果要动的话,也可以之后统一去弄,现在这阶段保证两者统一构建后能兼容,

1. Replaced BUILD_WITH_QT6 option with DTK5 option for unified DTK5/DTK6
build control
2. Updated project configuration to support both DTK5 (Qt5) and DTK6
(Qt6) versions
3. Modified version handling to use DTK_VERSION (5.y.z or 6.y.z) instead
of PROJECT_VERSION
4. Updated library naming: dtklog for DTK5 and dtk6log for DTK6
5. Enhanced Debian packaging to generate separate packages for DTK5
and DTK6
6. Added Build-Profiles support (nodtk5, nodtk6) for selective package
building
7. Updated installation paths to include dtk5/ and dtk6/ subdirectories
8. Modified CMake config files to use DTK_NAME_SUFFIX for proper target
naming

Log: Updated build system to support both DTK5 and DTK6 versions

Influence:
1. Test building with DTK5=ON (default) to ensure Qt5 compatibility
2. Test building with DTK5=OFF to ensure Qt6 compatibility
3. Verify library naming: libdtklog.so for DTK5, libdtk6log.so for DTK6
4. Check installation paths: include/dtk5/ for DTK5, include/dtk6/ for
DTK6
5. Test Debian package building with different profiles (nodtk5, nodtk6)
6. Verify CMake config files generate correct target names (DtkLog vs
Dtk6Log)
7. Ensure pkg-config files have correct dependencies (Qt5Core vs
Qt6Core)

refactor: 重构CMake构建系统以支持统一的DTK5/DTK6构建

1. 将BUILD_WITH_QT6选项替换为DTK5选项,用于统一的DTK5/DTK6构建控制
2. 更新项目配置以同时支持DTK5(Qt5)和DTK6(Qt6)版本
3. 修改版本处理逻辑,使用DTK_VERSION(5.y.z或6.y.z)替代PROJECT_VERSION
4. 更新库命名:DTK5使用dtklog,DTK6使用dtk6log
5. 增强Debian打包系统,为DTK5和DTK6生成独立的软件包
6. 添加Build-Profiles支持(nodtk5, nodtk6)用于选择性构建软件包
7. 更新安装路径,包含dtk5/和dtk6/子目录
8. 修改CMake配置文件以使用DTK_NAME_SUFFIX进行正确的目标命名

Log: 更新构建系统以同时支持DTK5和DTK6版本

Influence:
1. 测试使用DTK5=ON(默认)构建,确保Qt5兼容性
2. 测试使用DTK5=OFF构建,确保Qt6兼容性
3. 验证库命名:DTK5使用libdtklog.so,DTK6使用libdtk6log.so
4. 检查安装路径:DTK5使用include/dtk5/,DTK6使用include/dtk6/
5. 测试使用不同配置文件(nodtk5, nodtk6)构建Debian软件包
6. 验证CMake配置文件生成正确的目标名称(DtkLog vs Dtk6Log)
7. 确保pkg-config文件具有正确的依赖关系(Qt5Core vs Qt6Core)
deepin-ci-robot added a commit to linuxdeepin/dtk6log that referenced this pull request Jan 5, 2026
Synchronize source files from linuxdeepin/dtklog.

Source-pull-request: linuxdeepin/dtklog#23
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

  • 检测到debian目录文件有变更: debian/libdtk6log-dev.install,debian/libdtk6log.install,debian/control,debian/libdtklog-dev.install,debian/libdtklog.install,debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "a": [
                "export QT_SELECT = qt5",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
            ]
        }
    }
}

@18202781743 18202781743 requested a review from asterwyx January 5, 2026 07:40
@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

  • 敏感词检查失败, 检测到2个文件存在敏感词
详情
{
    "CMakeLists.txt": [
        {
            "line": "  HOMEPAGE_URL \"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 13,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ],
    "archlinux/PKGBUILD": [
        {
            "line": "url=\"https://github.com/linuxdeepin/dtklog\"",
            "line_number": 9,
            "rule": "S35",
            "reason": "Url link | 6fabe13a51"
        }
    ]
}

@deepin-ci-robot
Copy link

deepin pr auto review

这个diff主要包含了对DTK日志库的构建系统的重大改进,让我详细分析一下:

  1. 版本管理改进:
  • 优点:引入了更规范的版本管理机制,使用DTK5/DTK6选项来区分Qt5和Qt6版本
  • 建议:可以考虑使用语义化版本(Semantic Versioning)来更好地管理版本号
  1. 构建系统优化:
  • 优点:
    • 分离了DTK5和DTK6的构建配置
    • 使用了更清晰的命名约定
    • 改进了CMake配置文件的结构
  • 建议:
    • 可以考虑添加更多的构建选项,如测试覆盖率分析
    • 建议添加静态库构建选项
  1. 包管理改进:
  • 优点:
    • 更新了Debian包配置,支持DTK5和DTK6并行安装
    • 改进了依赖关系管理
    • 添加了更详细的包描述
  • 建议:
    • 可以考虑添加开发包的调试符号包
    • 建议添加文档包
  1. 安全性改进:
  • 优点:
    • 移除了不安全的编译选项(-Ofast)
    • 添加了更多的安全编译标志
    • 改进了链接选项
  • 建议:
    • 可以考虑添加更多安全检查选项
    • 建议添加FORTIFY_SOURCE支持
  1. 跨平台兼容性:
  • 优点:
    • 改进了Qt5/Qt6的兼容性处理
    • 更好的路径处理
  • 建议:
    • 可以添加对更多平台的支持
    • 考虑添加Windows平台的构建支持
  1. 性能优化:
  • 优点:
    • 优化了构建过程
    • 改进了依赖管理
  • 建议:
    • 可以考虑添加并行构建支持
    • 建议添加预编译头文件支持
  1. 代码质量:
  • 优点:
    • 更清晰的配置文件结构
    • 更好的变量命名
    • 改进了注释
  • 建议:
    • 可以添加更多的文档说明
    • 建议添加配置文件的验证
  1. 其他建议:
  • 添加CI/CD配置文件
  • 考虑添加代码格式化配置
  • 添加单元测试框架支持
  • 考虑添加内存检查工具支持

这些改进整体上提升了项目的可维护性、安全性和可用性。建议在实施这些更改时,确保向后兼容性,并添加适当的测试来验证新功能。

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

  • 检测到debian目录文件有变更: debian/libdtk6log-dev.install,debian/libdtk6log.install,debian/control,debian/libdtklog-dev.install,debian/libdtklog.install,debian/rules

  • 检测到敏感词export变动

详情
    {
    "export": {
        "debian/rules": {
            "a": [
                "export QT_SELECT = qt5",
                "export DEB_CXXFLAGS_MAINT_APPEND = -Ofast"
            ]
        }
    }
}

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, asterwyx, mhduiy

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

@18202781743 18202781743 merged commit ccf87e3 into linuxdeepin:master Jan 6, 2026
10 of 12 checks passed
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.

4 participants