已合并
feat:deb包devlib软链创建 #3602
yelongjian创建于 6月18日
feat:deb包devlib软链创建 #3602
已合并
yelongjian创建于 6月18日
共 12 个文件变更+155-15
@@ -98,7 +98,7 @@ chmod_end() {
98 chmod_single_dir "$default_dir/ascend_install.info" 640 file 2> /dev/null98 chmod_single_dir "$default_dir/ascend_install.info" 640 file 2> /dev/null
99 chmod_single_dir "$default_dir/version.info" 440 file 2> /dev/null99 chmod_single_dir "$default_dir/version.info" 440 file 2> /dev/null
100 chmod_single_dir "$default_dir/scene.info" 640 file 2> /dev/null100 chmod_single_dir "$default_dir/scene.info" 640 file 2> /dev/null
101- chmod_single_dir "$default_dir" 550 dir 2> /dev/null101+ chmod_single_dir "$default_dir" 750 dir 2> /dev/null
102 chmod_single_dir "$default_dir/script" 550 dir 2> /dev/null102 chmod_single_dir "$default_dir/script" 550 dir 2> /dev/null
103 chmod_recur "$default_dir/script" 550 file 2> /dev/null103 chmod_recur "$default_dir/script" 550 file 2> /dev/null
104 chown -R "$username":"$usergroup" "$default_dir" 2> /dev/null104 chown -R "$username":"$usergroup" "$default_dir" 2> /dev/null
@@ -15,7 +15,7 @@
15 <GE_COMPILER_VERSION>$(ASCEND_VER)</GE_COMPILER_VERSION>15 <GE_COMPILER_VERSION>$(ASCEND_VER)</GE_COMPILER_VERSION>
16 <GE_COMPILER_TIMESTAMP>$(TIMESTAMP_NO)</GE_COMPILER_TIMESTAMP>16 <GE_COMPILER_TIMESTAMP>$(TIMESTAMP_NO)</GE_COMPILER_TIMESTAMP>
17 </generate_info>17 </generate_info>
18- <generate_info value="scene.info" dst_path="share/info/ge-compiler" install_path="share/info/ge-compiler" install_mod="440">18+ <generate_info value="scene.info" dst_path="share/info/ge-compiler" install_path="share/info/ge-compiler" install_mod="640">
19 <os>$(OS_NAME)</os>19 <os>$(OS_NAME)</os>
20 <os_version>$(OS_VER)</os_version>20 <os_version>$(OS_VER)</os_version>
21 <arch>$(ARCH)</arch>21 <arch>$(ARCH)</arch>
@@ -23,7 +23,7 @@
23 <version_info install="true" install_path="ge-compiler" install_own="$username:$usergroup" install_mod="440"/>23 <version_info install="true" install_path="ge-compiler" install_own="$username:$usergroup" install_mod="440"/>
24 <file_info value="ge-compiler_script" copy_type="source" dst_path="share/info/ge-compiler" install_path="share/info/ge-compiler">24 <file_info value="ge-compiler_script" copy_type="source" dst_path="share/info/ge-compiler" install_path="share/info/ge-compiler">
25 <file value="script" entity="true"/>25 <file value="script" entity="true"/>
26- <file value="version.info"/>26+ <file value="version.info" install_mod="440"/>
27 </file_info>27 </file_info>
28 <block_info dependtree="false" dst_path="$(TARGET_ENV)" block_conf_path="ascend">28 <block_info dependtree="false" dst_path="$(TARGET_ENV)" block_conf_path="ascend">
29 <block name="EngineeringCommon"/>29 <block name="EngineeringCommon"/>
@@ -10,7 +10,7 @@
10# -----------------------------------------------------------------------------------------------------------10# -----------------------------------------------------------------------------------------------------------
11 11 
12sourcedir="${INSTALL_PATH}"12sourcedir="${INSTALL_PATH}"
13-pkg_arch_name=$(uname -m)13+pkg_arch_name="${PKG_ARCH_NAME}"
14# WHL_INSTALL_DIR_PATH=$(python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))" 2>/dev/null)14# WHL_INSTALL_DIR_PATH=$(python3 -c "import sysconfig; print(sysconfig.get_path('purelib'))" 2>/dev/null)
15WHL_INSTALL_DIR_PATH="${sourcedir}/python/site-packages"15WHL_INSTALL_DIR_PATH="${sourcedir}/python/site-packages"
16unset PYTHONPATH16unset PYTHONPATH
@@ -40,4 +40,31 @@ if [ -f "${WHL_GE_PY}" ]; then
40 fi40 fi
41fi41fi
42 42 
43-exit 043+stub_libs="
44+libacl_op_compiler.so
45+libfmk_onnx_parser.so
46+libfmk_parser.so
47+libge_compiler.so
48+libge_runner.so
49+libge_runner_v2.so"
50+ 
51+sourcedir="${INSTALL_PATH}"
52+pkg_arch_name="${PKG_ARCH_NAME}"
53+ 
54+create_stub_softlink() {
55+ local install_path="${sourcedir}"
56+ if [ ! -d "$install_path" ]; then
57+ return
58+ fi
59+ local devlibdir="${install_path}/${pkg_arch_name}-linux/devlib"
60+ ([ -d "${devlibdir}" ] && cd "${devlibdir}" && {
61+ chmod u+w . && \
62+ for lib in ${stub_libs}; do
63+ lib="linux/${pkg_arch_name}/$lib"
64+ [ -f "$lib" ] && ln -sf "$lib" "$(basename $lib)"
65+ done
66+ chmod u-w .
67+ })
68+}
69+ 
70+create_stub_softlink
@@ -24,4 +24,38 @@ rm -fr "${WHL_INSTALL_DIR_PATH}/ge/passes/python_pass_artifacts" 2>/dev/null
24rm -f "${WHL_INSTALL_DIR_PATH}/ge/passes/_ge_pass_native.so" 2>/dev/null24rm -f "${WHL_INSTALL_DIR_PATH}/ge/passes/_ge_pass_native.so" 2>/dev/null
25rm -fr "${WHL_INSTALL_DIR_PATH}/ge_py_pass_bridge-"*.dist-info 2>/dev/null25rm -fr "${WHL_INSTALL_DIR_PATH}/ge_py_pass_bridge-"*.dist-info 2>/dev/null
26 26 
27-exit 027+stub_libs="
28+libacl_op_compiler.so
29+libfmk_onnx_parser.so
30+libfmk_parser.so
31+libge_compiler.so
32+libge_runner.so
33+libge_runner_v2.so"
34+ 
35+sourcedir="${INSTALL_PATH}"
36+pkg_arch_name="$(PKG_ARCH_NAME)"
37+ 
38+remove_stub_softlink() {
39+ local install_path="${sourcedir}"
40+ if [ ! -d "$install_path" ]; then
41+ return
42+ fi
43+ local devlibdir="${install_path}/${pkg_arch_name}-linux/devlib"
44+ ([ -d "${devlibdir}" ] && cd "${devlibdir}" && {
45+ chmod u+w . && echo "${stub_libs}" | xargs --no-run-if-empty rm -rf
46+ chmod u-w .
47+ })
48+}
49+ 
50+remove_stub_softlink
51+ 
52+remove_empty_dir() {
53+ local dir="$1"
54+ local parent
55+ parent=$(dirname "${dir}")
56+ [ -d "${dir}" ] || return 0
57+ rmdir "${dir}" 2>/dev/null && chmod +w "${parent}" 2>/dev/null
58+}
59+ 
60+remove_empty_dir "${WHL_INSTALL_DIR_PATH}"
61+remove_empty_dir "${sourcedir}/python"
@@ -124,7 +124,7 @@ chmod_end() {
124 chmod_single_dir "$default_dir/ascend_install.info" 640 file 2> /dev/null124 chmod_single_dir "$default_dir/ascend_install.info" 640 file 2> /dev/null
125 chmod_single_dir "$default_dir/version.info" 440 file 2> /dev/null125 chmod_single_dir "$default_dir/version.info" 440 file 2> /dev/null
126 chmod_single_dir "$default_dir/scene.info" 640 file 2> /dev/null126 chmod_single_dir "$default_dir/scene.info" 640 file 2> /dev/null
127- chmod_single_dir "$default_dir" 550 dir 2> /dev/null127+ chmod_single_dir "$default_dir" 750 dir 2> /dev/null
128 chmod_single_dir "$default_dir/script" 550 dir 2> /dev/null128 chmod_single_dir "$default_dir/script" 550 dir 2> /dev/null
129 chmod_recur "$default_dir/script" 550 file 2> /dev/null129 chmod_recur "$default_dir/script" 550 file 2> /dev/null
130 chown -R "$username":"$usergroup" "$default_dir" 2> /dev/null130 chown -R "$username":"$usergroup" "$default_dir" 2> /dev/null
@@ -15,7 +15,7 @@
15 <GE_EXECUTOR_VERSION>$(ASCEND_VER)</GE_EXECUTOR_VERSION>15 <GE_EXECUTOR_VERSION>$(ASCEND_VER)</GE_EXECUTOR_VERSION>
16 <GE_EXECUTOR_TIMESTAMP>$(TIMESTAMP_NO)</GE_EXECUTOR_TIMESTAMP>16 <GE_EXECUTOR_TIMESTAMP>$(TIMESTAMP_NO)</GE_EXECUTOR_TIMESTAMP>
17 </generate_info>17 </generate_info>
18- <generate_info value="scene.info" dst_path="share/info/ge-executor" install_path="share/info/ge-executor" install_mod="440">18+ <generate_info value="scene.info" dst_path="share/info/ge-executor" install_path="share/info/ge-executor" install_mod="640">
19 <os>$(OS_NAME)</os>19 <os>$(OS_NAME)</os>
20 <os_version>$(OS_VER)</os_version>20 <os_version>$(OS_VER)</os_version>
21 <arch>$(ARCH)</arch>21 <arch>$(ARCH)</arch>
@@ -23,7 +23,7 @@
23 <version_info install="true" install_path="ge-executor" install_own="$username:$usergroup" install_mod="440"/>23 <version_info install="true" install_path="ge-executor" install_own="$username:$usergroup" install_mod="440"/>
24 <file_info value="ge-executor_script" copy_type="source" dst_path="share/info/ge-executor" install_path="share/info/ge-executor">24 <file_info value="ge-executor_script" copy_type="source" dst_path="share/info/ge-executor" install_path="share/info/ge-executor">
25 <file value="script" entity="true"/>25 <file value="script" entity="true"/>
26- <file value="version.info"/>26+ <file value="version.info" install_mod="440"/>
27 </file_info>27 </file_info>
28 <block_info dependtree="false" dst_path="$(TARGET_ENV)" block_conf_path="ascend">28 <block_info dependtree="false" dst_path="$(TARGET_ENV)" block_conf_path="ascend">
29 <block name="EngineeringCommon"/>29 <block name="EngineeringCommon"/>
@@ -0,0 +1,42 @@
1+#!/bin/bash
2+# -----------------------------------------------------------------------------------------------------------
3+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
4+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
5+# CANN Open Software License Agreement Version 2.0 (the "License").
6+# Please refer to the License for details. You may not use this file except in compliance with the License.
7+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
8+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
9+# See LICENSE in the root of the software repository for the full text of the License.
10+# -----------------------------------------------------------------------------------------------------------
11+ 
12+stub_libs="
13+libacl_cblas.so
14+libacl_mdl.so
15+libacl_op_executor.so
16+libge_common.so
17+libgert.so
18+libgraph.so
19+libhybrid_executor.so
20+liblowering.so
21+libregister.so"
22+ 
23+sourcedir="${INSTALL_PATH}"
24+pkg_arch_name="${PKG_ARCH_NAME}"
25+ 
26+create_stub_softlink() {
27+ local install_path="${sourcedir}"
28+ if [ ! -d "$install_path" ]; then
29+ return
30+ fi
31+ local devlibdir="${install_path}/${pkg_arch_name}-linux/devlib"
32+ ([ -d "${devlibdir}" ] && cd "${devlibdir}" && {
33+ chmod u+w . && \
34+ for lib in ${stub_libs}; do
35+ lib="linux/${pkg_arch_name}/$lib"
36+ [ -f "$lib" ] && ln -sf "$lib" "$(basename $lib)"
37+ done
38+ chmod u-w .
39+ })
40+}
41+ 
42+create_stub_softlink
@@ -0,0 +1,38 @@
1+#!/bin/bash
2+# -----------------------------------------------------------------------------------------------------------
3+# Copyright (c) 2026 Huawei Technologies Co., Ltd.
4+# This program is free software, you can redistribute it and/or modify it under the terms and conditions of
5+# CANN Open Software License Agreement Version 2.0 (the "License").
6+# Please refer to the License for details. You may not use this file except in compliance with the License.
7+# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
8+# INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
9+# See LICENSE in the root of the software repository for the full text of the License.
10+# -----------------------------------------------------------------------------------------------------------
11+ 
12+stub_libs="
13+libacl_cblas.so
14+libacl_mdl.so
15+libacl_op_executor.so
16+libge_common.so
17+libgert.so
18+libgraph.so
19+libhybrid_executor.so
20+liblowering.so
21+libregister.so"
22+ 
23+sourcedir="${INSTALL_PATH}"
24+pkg_arch_name="${PKG_ARCH_NAME}"
25+ 
26+remove_stub_softlink() {
27+ local install_path="${sourcedir}"
28+ if [ ! -d "$install_path" ]; then
29+ return
30+ fi
31+ local devlibdir="${install_path}/${pkg_arch_name}-linux/devlib"
32+ ([ -d "${devlibdir}" ] && cd "${devlibdir}" && {
33+ chmod u+w . && echo "${stub_libs}" | xargs --no-run-if-empty rm -rf
34+ chmod u-w .
35+ })
36+}
37+ 
38+remove_stub_softlink
@@ -98,7 +98,7 @@ chmod_end() {
98 chmod_single_dir "$default_dir/ascend_install.info" 640 file 2> /dev/null98 chmod_single_dir "$default_dir/ascend_install.info" 640 file 2> /dev/null
99 chmod_single_dir "$default_dir/version.info" 440 file 2> /dev/null99 chmod_single_dir "$default_dir/version.info" 440 file 2> /dev/null
100 chmod_single_dir "$default_dir/scene.info" 640 file 2> /dev/null100 chmod_single_dir "$default_dir/scene.info" 640 file 2> /dev/null
101- chmod_single_dir "$default_dir" 550 dir 2> /dev/null101+ chmod_single_dir "$default_dir" 750 dir 2> /dev/null
102 chmod_single_dir "$default_dir/script" 550 dir 2> /dev/null102 chmod_single_dir "$default_dir/script" 550 dir 2> /dev/null
103 chmod_recur "$default_dir/script" 550 file 2> /dev/null103 chmod_recur "$default_dir/script" 550 file 2> /dev/null
104 chown -R "$username":"$usergroup" "$default_dir" 2> /dev/null104 chown -R "$username":"$usergroup" "$default_dir" 2> /dev/null
@@ -9,9 +9,8 @@
9 <path value="$(TARGET_ENV)/include/acl" install_mod="555"/>9 <path value="$(TARGET_ENV)/include/acl" install_mod="555"/>
10 <path value="$(TARGET_ENV)/include/acl/error_codes" install_mod="555"/>10 <path value="$(TARGET_ENV)/include/acl/error_codes" install_mod="555"/>
11 <path value="$(TARGET_ENV)/include/parser" install_mod="555"/>11 <path value="$(TARGET_ENV)/include/parser" install_mod="555"/>
12- <path value="python" install_mod="555"/>12+ <path value="python" install_mod="750"/>
13- <path value="python/site-packages" install_mod="555"/>13+ <path value="python/site-packages" install_mod="750"/>
14- <path value="python/site-packages/autofuse" install_mod="555"/>
15 <path value="$(TARGET_ENV)/lib64" install_mod="555"/>14 <path value="$(TARGET_ENV)/lib64" install_mod="555"/>
16 <path value="$(TARGET_ENV)/lib64/plugin" install_mod="555"/>15 <path value="$(TARGET_ENV)/lib64/plugin" install_mod="555"/>
17 <path value="$(TARGET_ENV)/lib64/plugin/nnengine/ge_config" install_mod="555"/>16 <path value="$(TARGET_ENV)/lib64/plugin/nnengine/ge_config" install_mod="555"/>
@@ -1,7 +1,7 @@
1<?xml version="1.0" encoding="UTF-8"?>1<?xml version="1.0" encoding="UTF-8"?>
2<block name="GeExecutorSo" copy_type="delivery" src_path="" dst_path="" install_path="" install_own="$username:$usergroup" install_mod="750" install_type="all">2<block name="GeExecutorSo" copy_type="delivery" src_path="" dst_path="" install_path="" install_own="$username:$usergroup" install_mod="750" install_type="all">
3 <dir_info value="GeExecutorSo">3 <dir_info value="GeExecutorSo">
4- <path value="$(TARGET_ENV)/lib64"/>4+ <path value="$(TARGET_ENV)/lib64" install_mod="550"/>
5 <path value="$(TARGET_ENV)/devlib/minios" install_type="devel" install_mod="550"/>5 <path value="$(TARGET_ENV)/devlib/minios" install_type="devel" install_mod="550"/>
6 <path value="$(TARGET_ENV)/devlib/minios/aarch64" install_type="devel" install_mod="550"/>6 <path value="$(TARGET_ENV)/devlib/minios/aarch64" install_type="devel" install_mod="550"/>
7 </dir_info>7 </dir_info>
@@ -602,7 +602,7 @@ TEST_F(configuration_ut, get_opsstoreinfo_vectorcore)
602 }602 }
603}603}
604 604 
605-TEST_F(configuration_ut, getgraphfilepath_vectorcore)605+TEST_F(configuration_ut, DISABLED_getgraphfilepath_vectorcore)
606{606{
607 string graph_file_path;607 string graph_file_path;
608 Configuration config(fe::VECTOR_CORE_NAME);608 Configuration config(fe::VECTOR_CORE_NAME);