openubmc-bingo 0.5.242__py3-none-any.whl → 0.5.243__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of openubmc-bingo might be problematic. Click here for more details.

bmcgo/__init__.py CHANGED
@@ -9,4 +9,4 @@
9
9
  # MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
10
  # See the Mulan PSL v2 for more details.
11
11
 
12
- __version__ = '0.5.242'
12
+ __version__ = '0.5.243'
bmcgo/bmcgo_config.py CHANGED
@@ -72,6 +72,7 @@ class BmcgoConfig(object):
72
72
  self.bmcgo_local_config = configparser.ConfigParser()
73
73
  self.bmcgo_config_list = {}
74
74
  self._bmcgo_config_load()
75
+ self.conf_path = os.path.join(self.bmcgo_path, "cli", "config.yaml")
75
76
 
76
77
  @functools.cached_property
77
78
  def partner_mode(self):
bmcgo/cli/cli.py CHANGED
@@ -411,8 +411,6 @@ class Command(object):
411
411
  log.info(f"导入模块 {module_name} 失败")
412
412
 
413
413
  def _gen_command_group_base(self):
414
- if not self.bconfig.partner_mode:
415
- self.inte_cmds[misc.ANALYSIS] = misc.ANALYSIS
416
414
  self._load_functional(self.bconfig.functional_path)
417
415
 
418
416
  def _get_command_group(self):
bmcgo/cli/config.yaml ADDED
@@ -0,0 +1,9 @@
1
+ comp_type:
2
+ - conan_index
3
+ - component
4
+ - manifest
5
+ dt_dependencies:
6
+ dtframeforlua: dtframeforlua
7
+ luaunit: luaunit/3.2
8
+ luacov: luacov/[>=0.16.2]
9
+ luafilesystem: luafilesystem/1.8.0.B022
bmcgo/component/deploy.py CHANGED
@@ -12,6 +12,7 @@
12
12
  import os
13
13
  import shutil
14
14
  import stat
15
+ import yaml
15
16
 
16
17
  from mako.lookup import TemplateLookup
17
18
 
@@ -25,12 +26,6 @@ from bmcgo import misc
25
26
  log = Logger("deploy")
26
27
 
27
28
  cwd_script = os.path.split(os.path.realpath(__file__))[0]
28
- DT_DEPENDENCIES = {
29
- "dtframeforlua": "dtframeforlua", # 目前定义在部分组件的service.json
30
- "luaunit": "luaunit/3.2",
31
- "luacov": "luacov/[>=0.16.2]",
32
- "luafilesystem": "luafilesystem/1.8.0.B022",
33
- }
34
29
 
35
30
 
36
31
  class DeployComp():
@@ -45,11 +40,14 @@ class DeployComp():
45
40
  user_channel = ComponentHelper.get_user_channel(self.info.stage)
46
41
  # DT专用的依赖,只在部署时添加
47
42
  dependencies = []
48
- lua_run_deps = [DT_DEPENDENCIES.get("luaunit")]
43
+ with open(self.bconfig.conf_path, "r") as fp:
44
+ config = yaml.safe_load(fp)
45
+ dt_dependencies = config.get("dt_dependencies", {})
46
+ lua_run_deps = [dt_dependencies.get("luaunit")]
49
47
  # 只有lua需要添加依赖
50
48
  if not os.path.isdir("test_package") and self.info.coverage:
51
- lua_run_deps.append(DT_DEPENDENCIES.get("luacov"))
52
- lua_run_deps.append(DT_DEPENDENCIES.get("luafilesystem"))
49
+ lua_run_deps.append(dt_dependencies.get("luacov"))
50
+ lua_run_deps.append(dt_dependencies.get("luafilesystem"))
53
51
  for dep in lua_run_deps:
54
52
  for build_dep in self.info.build_dependencies:
55
53
  if build_dep.startswith(dep.split("/", -1)[0]):
bmcgo/target/personal.yml CHANGED
@@ -21,6 +21,10 @@ subworks:
21
21
  klass: bmcgo.tasks.task_build_conan
22
22
  wait:
23
23
  - work.build.download
24
+ - name: work.build_wbd_up
25
+ klass: bmcgo.tasks.task_build_wbd_up
26
+ wait:
27
+ - work.build.conan
24
28
  - name: work.task_build_rootfs_img
25
29
  klass: bmcgo.tasks.task_build_rootfs_img
26
30
  subworks:
@@ -46,6 +50,7 @@ subworks:
46
50
  ignore_not_exist: true
47
51
  wait:
48
52
  - work.build.conan
53
+ - work.build_wbd_up
49
54
  - task_download_dependency
50
55
  - name: work.create_interface_config
51
56
  klass: bmcgo.tasks.task_create_interface_config
bmcgo/target/publish.yml CHANGED
@@ -15,6 +15,10 @@
15
15
  klass: bmcgo.tasks.task_build_conan
16
16
  wait:
17
17
  - work.build.download
18
+ - name: work.build_wbd_up
19
+ klass: bmcgo.tasks.task_build_wbd_up
20
+ wait:
21
+ - work.build.app
18
22
  - name: work.task_build_rootfs_img
19
23
  klass: bmcgo.tasks.task_build_rootfs_img
20
24
  subworks:
@@ -42,4 +46,5 @@
42
46
  - work.task_build_qemu_rootfs
43
47
  ignore_not_exist: true
44
48
  wait:
49
+ - work.build_wbd_up
45
50
  - work.build.app
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env python3
2
+ # coding: utf-8
3
+ # Copyright (c) 2025 Huawei Technologies Co., Ltd.
4
+ # openUBMC is licensed under Mulan PSL v2.
5
+ # You can use this software according to the terms and conditions of the Mulan PSL v2.
6
+ # You may obtain a copy of Mulan PSL v2 at:
7
+ # http://license.coscl.org.cn/MulanPSL2
8
+ # THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
9
+ # EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
10
+ # MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
11
+ # See the Mulan PSL v2 for more details.
12
+ import os
13
+ import shutil
14
+
15
+ from bmcgo.tasks.task import Task
16
+
17
+
18
+ class TaskClass(Task):
19
+ def __init__(self, config, work_name=""):
20
+ super(TaskClass, self).__init__(config, work_name=work_name)
21
+ self.wbd_build_dir = os.path.join(self.config.build_path, "wbd_build_dir")
22
+
23
+ def get_wbd_file_config(self):
24
+ wbd_up_file_config = None
25
+ if self.config.tosupporte_code:
26
+ wbd_config_path = f"tosupporte/{self.config.tosupporte_code}/wbd_up_files"
27
+ wbd_up_file_config = self.get_manufacture_config(wbd_config_path)
28
+ elif self.config.manufacture_code:
29
+ wbd_config_path = f"manufacture/{self.config.manufacture_code}/wbd_up_files"
30
+ wbd_up_file_config = self.get_manufacture_config(wbd_config_path)
31
+ else:
32
+ pass
33
+
34
+ wbd_up_file_config = wbd_up_file_config or self.get_manufacture_config("wbd_up_files")
35
+ return wbd_up_file_config
36
+
37
+
38
+ def generate_wbd_package(self, wbd_up_file_config):
39
+ self.chdir(self.wbd_build_dir)
40
+
41
+ if "repo" in wbd_up_file_config and "tag" in wbd_up_file_config:
42
+ repo = wbd_up_file_config.get("repo")
43
+ tag = wbd_up_file_config.get("tag")
44
+ if not repo.startswith("https"):
45
+ self.info("建议使用 https 协议的仓库地址")
46
+ self.run_command(f"git clone {repo} -b {tag} --depth=1")
47
+
48
+ # 复制manifest.yml中配置的文件到build目录
49
+ files = wbd_up_file_config.get("files")
50
+ self.copy_manifest_files(files)
51
+
52
+ # 约定压缩打包wbd_up_file目录
53
+ self.run_command(f"tar --format=gnu -zcvf wbd_up_file.tar.gz wbd_up_file")
54
+ rootfs_wbd_path = os.path.join(self.config.rootfs_path, "opt/bmc/white_branding")
55
+ self.run_command(f"mkdir -p {rootfs_wbd_path}", sudo=True)
56
+ self.run_command(f"cp -f wbd_up_file.tar.gz {rootfs_wbd_path}", sudo=True)
57
+
58
+ def run(self):
59
+ wbd_up_file_config = self.get_wbd_file_config()
60
+ if not wbd_up_file_config:
61
+ self.info("未在manifest.yml中找到 wbd_up_files 配置, 跳过白牌打包")
62
+ return
63
+
64
+ shutil.rmtree(self.wbd_build_dir, ignore_errors=True)
65
+ os.makedirs(self.wbd_build_dir, exist_ok=True)
66
+
67
+ self.info(f"----打包 {self.config.board_name} wbd_up_file.tar.gz 到BMC hpm包中 ------------> [开始]")
68
+ self.generate_wbd_package(wbd_up_file_config)
69
+ self.info(f"----打包 {self.config.board_name}wbd_up_file.tar.gz 到BMC hpm包中 ----------> [结束]")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: openubmc-bingo
3
- Version: 0.5.242
3
+ Version: 0.5.243
4
4
  Summary: Tools provided by openubmc
5
5
  Home-page: https://openubmc.cn
6
6
  Classifier: Programming Language :: Python :: 3
@@ -1,13 +1,14 @@
1
- bmcgo/__init__.py,sha256=-zMsR8qKvI9uoI1hptUjoq3NpnC3IvYhDRauW2t6Ww4,562
1
+ bmcgo/__init__.py,sha256=j61yD8530dkhtOSYxj6bRJgrYaVdQ8HGZyRhYPdFVf0,562
2
2
  bmcgo/bmcgo.py,sha256=uD4TsfjrFB5aQPIS6WRUVc9ShXX-dSImY9ezkB13g1w,685
3
- bmcgo/bmcgo_config.py,sha256=q8JtOHFVB5io-VHbUiazpidN1fkLHxDAagGuIl60mb8,7308
3
+ bmcgo/bmcgo_config.py,sha256=DoFzuYJjqYLJ7rVmAq3kNjj5ZQZ931oLQTry8uovF3E,7385
4
4
  bmcgo/errors.py,sha256=QW1ndrJcJ2Ws7riOznPKVvZsNlrYk73eZol7w8gJTPU,3076
5
5
  bmcgo/frame.py,sha256=OUIlplOGD9NXHdubhXSfmR4s5e29AsMyLUkkiWrdRsg,10378
6
6
  bmcgo/logger.py,sha256=4TPOkBA80Z00rSCOdEv_WkwE5Kr3HCDt-HuVe9waXck,6645
7
7
  bmcgo/misc.py,sha256=VukODl7BdMZz8sZyQ5o0wHj9ixJfPZmmeLuDHoCiSBg,3430
8
8
  bmcgo/worker.py,sha256=-KxZIW4dziej5wCY-v5XEmtY-CDCL2-FO3VHFovlFbM,15228
9
9
  bmcgo/cli/__init__.py,sha256=BDXz8BcSlCkfo5UYt6j2rm89-HiYA1ZzfpFhy99MH-0,538
10
- bmcgo/cli/cli.py,sha256=hN5cQJuGorIgo3ZlPAQWGH3n7GLwQiqMudhK5cujHC4,21620
10
+ bmcgo/cli/cli.py,sha256=pqAkvjrk4F7x58-fYeGn0TydT3szZ2pM7guYwDoU2Ew,21520
11
+ bmcgo/cli/config.yaml,sha256=tbnFhz2TTrl2-ALpHHujbXB1ymZpjGC4f0zTfqfUZfM,194
11
12
  bmcgo/codegen/__init__.py,sha256=eplRBfR_obzVWMQtIeX1RRq6DOEezBx_l1EqcZYLRPM,775
12
13
  bmcgo/codegen/c/__init__.py,sha256=tmBG8c6sfxgIj__lyyU5mydWeKBdqbDuIQkLI38lwjI,522
13
14
  bmcgo/codegen/c/annotation.py,sha256=c4NiF6b9R-HbwbBGNhnH5zrfcPAYBkhWq30PT9CKzw4,1987
@@ -156,7 +157,7 @@ bmcgo/component/__init__.py,sha256=BDXz8BcSlCkfo5UYt6j2rm89-HiYA1ZzfpFhy99MH-0,5
156
157
  bmcgo/component/build.py,sha256=LG7NwlEctiKaMhbluUV-8vMx4efFFkbwTPuAYxeNWkw,9621
157
158
  bmcgo/component/component_dt_version_parse.py,sha256=KyrfyjbrszU-hhG1Hr6TzKuSabmGIK51b_3KuVBv5-g,14139
158
159
  bmcgo/component/component_helper.py,sha256=VmLsmvWTJT5861ec70VC0lEIPZI9njMtn3Zo3L6hamM,4146
159
- bmcgo/component/deploy.py,sha256=PBriI_P4_gfhXH6pP6AXhfTbaJTLNTDJ9dI7rYwRmgs,4622
160
+ bmcgo/component/deploy.py,sha256=EO0hSZzXYPG-1SQOhNMkqLQWSeqkU3RxKemsqfWrgBE,4569
160
161
  bmcgo/component/gen.py,sha256=RVWfwiUWXyqbTW5Xj5rtVD7SA05D4sXf5Ea0T7gCfO0,7234
161
162
  bmcgo/component/package_info.py,sha256=5xh3yCXXcuCpEY3j_81K3639IQLx8idnAoxLwtQ5npE,10479
162
163
  bmcgo/component/test.py,sha256=kC8QsM3PypcDDy9VhBNQ4iutyBbPztMtlFHGY8a82FE,43332
@@ -199,14 +200,15 @@ bmcgo/ipmigen/template/ipmi.c.mako,sha256=LNrJmXQut4923aQkkkuHFp9tTR9ExrBi0WYfxV
199
200
  bmcgo/ipmigen/template/ipmi.h.mako,sha256=veZ42lJq4hljyNH5uL_yesHpoANF3pprTL1VwTlflqs,2006
200
201
  bmcgo/target/app.yml,sha256=OaCk1YntS6h_cKUt8rvJ7fkqXMFjK5v4Iu2Nhx66ZFY,469
201
202
  bmcgo/target/install_sdk.yml,sha256=jgE_pkkIfiSIoDI91qxoHHjXFx9zcBUDQD-FfDaxcZg,540
202
- bmcgo/target/personal.yml,sha256=4sQyorfQF65fihzF_8CFST6Koy06a-9-W-wrz5IVmFA,1823
203
- bmcgo/target/publish.yml,sha256=4V6oWdMkJP_hmqiTnOH7EM5GTAS-nNzSUCfTSaxYmRA,1497
203
+ bmcgo/target/personal.yml,sha256=o2PEQIcHe7v8J5-WHiQlgTEgiisQx_vCkgLlKDLkzh4,1953
204
+ bmcgo/target/publish.yml,sha256=WvaJAUZ0_6CMV3O1p1t6dagHe-DdLcXqLxKP11_ki1E,1615
204
205
  bmcgo/tasks/__init__.py,sha256=VapgzhPMmB7dzPIRohoVm1jjfVn_v97cYNCRmkxScaU,539
205
206
  bmcgo/tasks/download_buildtools_hm.py,sha256=f4UxStARc8Z8DnT_5O6ONajQ7P0sKyJ8brixr43fHVQ,5988
206
207
  bmcgo/tasks/misc.py,sha256=GK_bSDLGZW0FxywB2ICG1iIEz2y2QoCb1YQQk8SYOIA,711
207
208
  bmcgo/tasks/task.py,sha256=e7GL0fh4vXwhwq5Hv-SixCw-lbNPJtdivhUmvHrfWI8,15788
208
209
  bmcgo/tasks/task_build_conan.py,sha256=3BtapZXt09cKWcR_Wa8fXhrQDCvKWQtYjxG5RSC8F-U,32823
209
210
  bmcgo/tasks/task_build_rootfs_img.py,sha256=uFrMfrpaAHB_2QQdEo46P8TgFrGMTG-xfZUlxzJLSQ0,30443
211
+ bmcgo/tasks/task_build_wbd_up.py,sha256=VlmjKX17L6fSoFRAL4LppzufXFWlMXYh1y_iGeTazo8,3122
210
212
  bmcgo/tasks/task_buildgppbin.py,sha256=Xjfw6j8OsyS_XRiOt4vqIK1rDQ4sNKG__eurDu-M9bo,6341
211
213
  bmcgo/tasks/task_buildhpm_ext4.py,sha256=DBZnmU_eb14J0CW_wVoCc9VKnssFF1vXmRhLJQ6kR28,3482
212
214
  bmcgo/tasks/task_create_interface_config.py,sha256=rkFRGLrUgYCics-n1CKwCoQscU2BaRQkH7KP3zwJ6FI,5393
@@ -236,8 +238,8 @@ bmcgo/utils/installations/version_util.py,sha256=xyubh5rwD8_xqLgL8mL5ecz83T98M94
236
238
  bmcgo/utils/installations/install_plans/bingo.yml,sha256=S7h9dDNQYGkmC0h3tVJIR53iLB99oV1v6FUeFnXqDks,286
237
239
  bmcgo/utils/installations/installers/apt_installer.py,sha256=vvKEN6R7GWd8N5axsm0FFDMMzR7UhtOu_N_Tk3HcLmA,6741
238
240
  bmcgo/utils/installations/installers/pip_installer.py,sha256=hZtTB5KyhNp3pquBl0k5Xjp5_0RvrG_0jwnG9yGDXmk,1869
239
- openubmc_bingo-0.5.242.dist-info/METADATA,sha256=xKxy8toQckcQfnYYVFjMATtbV9VHNB1YIdHij5hKvZo,904
240
- openubmc_bingo-0.5.242.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
241
- openubmc_bingo-0.5.242.dist-info/entry_points.txt,sha256=UUoUP-vAWTgg9vEYbRwYqOBHgpRtkngdzMPb-ocz90g,42
242
- openubmc_bingo-0.5.242.dist-info/top_level.txt,sha256=9AcvCAt1nZcOgMsGt6T07mg2Bgtdet-3mHTwg91axgI,6
243
- openubmc_bingo-0.5.242.dist-info/RECORD,,
241
+ openubmc_bingo-0.5.243.dist-info/METADATA,sha256=tQwFvGnRA9J7suBvS521fEC8vowrq6C6fS6t6fH_31c,904
242
+ openubmc_bingo-0.5.243.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
243
+ openubmc_bingo-0.5.243.dist-info/entry_points.txt,sha256=UUoUP-vAWTgg9vEYbRwYqOBHgpRtkngdzMPb-ocz90g,42
244
+ openubmc_bingo-0.5.243.dist-info/top_level.txt,sha256=9AcvCAt1nZcOgMsGt6T07mg2Bgtdet-3mHTwg91axgI,6
245
+ openubmc_bingo-0.5.243.dist-info/RECORD,,