Merged
统一配置ops-ras安装目录及文件权限 #93
qinhanAdd on Sep 3
统一配置ops-ras安装目录及文件权限 #93
Merged
qinhanAdd on Sep 3
qinhan
qinhan
Sep 3

描述

本 PR 主要统一了 ops-ras 安装流程中安装目录及文件的权限配置:移除散落在各脚本中的冗余 chmod/chown 操作,同时升级了 cann-cmake 第三方依赖版本, 规范权限统一的操作在cmake中实现。整体以减少冗余权限设置、统一权限基准为主,不涉及安装流程的业务逻辑改动。

关联的Issue

https://gitcode.com/cann/ops-ras/issues/29

测试

文档更新

类型标签

likedislike
Pull Request has been successfully merged by CANN-robot.
(Thank you for qinhan's contribution.)
qinhanqinhan
Sep 3 Created pull request, commit 6373d466
atomgit-bot
atomgit-bot
Sep 3 Comments:

变更摘要

本 PR 主要统一了 ops-ras 安装流程中安装目录及文件的权限配置:移除散落在各脚本中的冗余 chmod/chown 操作,并将权限统一收敛为脚本中已有的权限变量(如 INSTALL_INFO_PERM),同时升级了 cann-cmake 第三方依赖版本。整体以减少冗余权限设置、统一权限基准为主,不涉及安装流程的业务逻辑改动。

主要改动

  • 升级 cann-cmake 依赖版本: 在 cmake/third_party/fetch_cann_cmake.cmake 中将 CANN_CMAKE_TAG 由 master-015 提升为 master-055,以使用新版 cann-cmake 构建资源。
  • 统一非 root 安装信息文件权限: 在 scripts/package/ops_ras/scripts/opp_install.sh 中将非 root 场景下的 INSTALL_INFO_PERM 由 600 调整为 640,与日志文件权限(LOG_FILE_PERM)保持一致。
  • 简化 add_init_py 权限处理: 移除先通过 stat 读取目录权限、写后再恢复原权限的往返逻辑,改为对新生成的 __init__.py、dynamic/__init__.py 直接执行 chmod "${INSTALL_INFO_PERM}",权限值统一取自已有变量。
  • 删除冗余的目录与文件 chmod 操作: 在 opp_install.sh 中移除对 python 安装目录的 chmod u+w 以及 main 中对日志目录/文件、scene.info、version.info、INSTALL_INFO_FILE 的权限设置;在 install.sh 中删除对安装信息文件的 chmod 644 及对 script 目录、filelist.csv 按 root/非 root 分支的 555/444/550/440 权限设置,使权限统一收敛到权限变量定义处。
likedislike
Incorrect?
CANN-robot
CANN-robotCollaborators
Sep 3 Comments:

Hi @qinhan123, welcome to submitting your first PR to ops-ras!

PR Merge Steps

1. CLA Signing

If the current PR label includes cann-cla/yes, it means you have signed the CLA and can proceed to the next step. If the label includes cann-cla/no, please sign the CLA first. If you have any questions, please refer to the FAQ.

2. CI Check

Please comment /compile to trigger the CI pipeline check. If the CI run is successful, the PR will be tagged with ci-pipeline-passed and you can proceed to the next step. If the CI run fails, the PR will be tagged with ci-pipeline-failed, please check the CI logs to fix the issues in the PR. If you have any questions, please refer to the FAQ.

3. Code Review

After CI passes, please refer to the PR Approval Progress and proactively @ the committers in the table to review the code. After approval, committers will comment /lgtm and /approve. Once the lgtm and approved labels are successfully added, the PR will be merged automatically.

likedislike
atomgit-bot
atomgit-bot
Sep 3 Comments:

代码审查

✅ 未发现问题

likedislike
Incorrect?
CANN-robotCANN-robotCollaborators
Sep 3 Added label: cann-cla/yes
81 messages are collapsed here。 See more
CANN-robotCANN-robotCollaborators
Sep 8 Removed label: api-check-pass
CANN-robot
CANN-robotCollaborators
Sep 8 Comments:

流水线任务触发成功
任务链接 [55d7946aea134b619e95a29f2fcf49c8][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Pr ✅ SUCCESS
codecheck_codestyle ✅ SUCCESS >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>

[2026-09-08 10:18:52]    CI执行结束

likedislike
CANN-robotCANN-robotCollaborators
Sep 8 Removed label: ci-pipeline-running
CANN-robotCANN-robotCollaborators
Sep 8 Added label: ci-pipeline-passed
CANN-robotCANN-robotCollaborators
Sep 8 Merged pull request