openubmc-bingo 0.6.61__py3-none-any.whl → 0.6.63__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 +1 -1
- bmcgo/tasks/task_hpm_envir_prepare.py +32 -53
- {openubmc_bingo-0.6.61.dist-info → openubmc_bingo-0.6.63.dist-info}/METADATA +1 -1
- {openubmc_bingo-0.6.61.dist-info → openubmc_bingo-0.6.63.dist-info}/RECORD +7 -7
- {openubmc_bingo-0.6.61.dist-info → openubmc_bingo-0.6.63.dist-info}/WHEEL +0 -0
- {openubmc_bingo-0.6.61.dist-info → openubmc_bingo-0.6.63.dist-info}/entry_points.txt +0 -0
- {openubmc_bingo-0.6.61.dist-info → openubmc_bingo-0.6.63.dist-info}/top_level.txt +0 -0
bmcgo/__init__.py
CHANGED
|
@@ -13,42 +13,11 @@ import os
|
|
|
13
13
|
import subprocess
|
|
14
14
|
import time
|
|
15
15
|
from multiprocessing import Process
|
|
16
|
+
|
|
16
17
|
from bmcgo.tasks.task import Task
|
|
17
18
|
from bmcgo import errors
|
|
18
19
|
|
|
19
20
|
|
|
20
|
-
class SignProcess(Process):
|
|
21
|
-
def __init__(self, work: Task):
|
|
22
|
-
super().__init__()
|
|
23
|
-
self.work = work
|
|
24
|
-
self.config = self.work.config
|
|
25
|
-
|
|
26
|
-
def run(self):
|
|
27
|
-
self.work.work_name = "sign_rootfs_image"
|
|
28
|
-
self.work.chdir(self.config.build_path)
|
|
29
|
-
if self.config.self_sign:
|
|
30
|
-
self.work.signature(f"{self.config.work_out}/rootfs_BMC.img",
|
|
31
|
-
f"{self.config.work_out}/rootfs_BMC.img.cms",
|
|
32
|
-
f"{self.config.work_out}/cms.crl",
|
|
33
|
-
f"{self.config.work_out}/rootca.der")
|
|
34
|
-
else:
|
|
35
|
-
out_file = f"{self.config.work_out}/rootfs_BMC.img.cms"
|
|
36
|
-
self.work.tools.pipe_command([f"echo 'cms placeholder'"], out_file=out_file)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
class TarImageProcess(Process):
|
|
40
|
-
def __init__(self, work):
|
|
41
|
-
super().__init__()
|
|
42
|
-
self.work: Task = work
|
|
43
|
-
self.config = self.work.config
|
|
44
|
-
|
|
45
|
-
def run(self):
|
|
46
|
-
self.work.work_name = "tar_rootfs_image"
|
|
47
|
-
self.work.chdir(self.config.work_out)
|
|
48
|
-
self.work.run_command("tar --format=gnu --exclude BMC_rootfs.tar.gz -czf rootfs_BMC.tar.gz rootfs_BMC.img")
|
|
49
|
-
self.work.success("tar BMC_rootfs.tar.gz successfully")
|
|
50
|
-
|
|
51
|
-
|
|
52
21
|
class TaskClass(Task):
|
|
53
22
|
skip_post_hpm = False
|
|
54
23
|
|
|
@@ -94,26 +63,36 @@ class TaskClass(Task):
|
|
|
94
63
|
f"sed -i \"/^Version=/s/{curr_ver}/{ver}/g\" update.cfg")
|
|
95
64
|
self.run_command("chmod +x . -R")
|
|
96
65
|
|
|
97
|
-
def
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
66
|
+
def sign_img(self):
|
|
67
|
+
if self.config.self_sign:
|
|
68
|
+
self.self_sign()
|
|
69
|
+
else:
|
|
70
|
+
self.online_sign()
|
|
71
|
+
|
|
72
|
+
# 自签名函数,继承类可扩展,不能变更方法名,重要!!!
|
|
73
|
+
def self_sign(self):
|
|
74
|
+
self.signature(
|
|
75
|
+
f"{self.config.work_out}/rootfs_BMC.img",
|
|
76
|
+
f"{self.config.work_out}/rootfs_BMC.img.cms",
|
|
77
|
+
f"{self.config.work_out}/cms.crl",
|
|
78
|
+
f"{self.config.work_out}/rootca.der",
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
# 在线签名函数,继承类可扩展,不能变更方法名,重要!!!
|
|
82
|
+
def online_sign(self):
|
|
83
|
+
# bingo无需在线签名逻辑,仅占位满足后续流程即可
|
|
84
|
+
out_file = f"{self.config.work_out}/rootfs_BMC.img.cms"
|
|
85
|
+
self.pipe_command([f"echo 'cms placeholder'"], out_file=out_file)
|
|
86
|
+
|
|
87
|
+
def tar_img(self):
|
|
88
|
+
self.run_command("tar --format=gnu --exclude BMC_rootfs.tar.gz -czf rootfs_BMC.tar.gz rootfs_BMC.img")
|
|
89
|
+
self.success("tar BMC_rootfs.tar.gz successfully")
|
|
101
90
|
|
|
91
|
+
def run(self):
|
|
92
|
+
# 签名
|
|
93
|
+
self.chdir(self.config.build_path)
|
|
94
|
+
self.sign_img()
|
|
102
95
|
self.prepare_hpm()
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
tar.start()
|
|
107
|
-
while True:
|
|
108
|
-
if not sign.is_alive():
|
|
109
|
-
if sign.exitcode is not None and sign.exitcode != 0:
|
|
110
|
-
raise errors.BmcGoException(f"签名进程发生错误, 返回值: {sign.exitcode}")
|
|
111
|
-
break
|
|
112
|
-
time.sleep(0.1)
|
|
113
|
-
while True:
|
|
114
|
-
if not tar.is_alive():
|
|
115
|
-
if tar.exitcode is not None and tar.exitcode != 0:
|
|
116
|
-
raise errors.BmcGoException(f"打包进程发生错误, 返回值: {tar.exitcode}")
|
|
117
|
-
break
|
|
118
|
-
time.sleep(0.1)
|
|
119
|
-
|
|
96
|
+
# 压缩
|
|
97
|
+
self.chdir(self.config.work_out)
|
|
98
|
+
self.tar_img()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
bmcgo/__init__.py,sha256=
|
|
1
|
+
bmcgo/__init__.py,sha256=43ixOvkIh39o4ZhQabt-Iqd-IW0mIERU1M3-k75tKt8,562
|
|
2
2
|
bmcgo/bmcgo.py,sha256=uD4TsfjrFB5aQPIS6WRUVc9ShXX-dSImY9ezkB13g1w,685
|
|
3
3
|
bmcgo/bmcgo_config.py,sha256=-KYhC3jNqWkCWu6YkyxDZlyC3floXIHaibGpmyB6YWQ,11873
|
|
4
4
|
bmcgo/errors.py,sha256=QW1ndrJcJ2Ws7riOznPKVvZsNlrYk73eZol7w8gJTPU,3076
|
|
@@ -232,7 +232,7 @@ bmcgo/tasks/task_buildhpm_ext4.py,sha256=DBZnmU_eb14J0CW_wVoCc9VKnssFF1vXmRhLJQ6
|
|
|
232
232
|
bmcgo/tasks/task_create_interface_config.py,sha256=rkFRGLrUgYCics-n1CKwCoQscU2BaRQkH7KP3zwJ6FI,5393
|
|
233
233
|
bmcgo/tasks/task_download_buildtools.py,sha256=QZpsrm2eaoJ0z5PkdSuHXg1n7L9qPz2s3XAVCnQi-hA,4292
|
|
234
234
|
bmcgo/tasks/task_download_dependency.py,sha256=2AW4awv_njlTrKy11ygKWekFBXLyS18FLcws8cVXGz0,3169
|
|
235
|
-
bmcgo/tasks/task_hpm_envir_prepare.py,sha256=
|
|
235
|
+
bmcgo/tasks/task_hpm_envir_prepare.py,sha256=KVxiYeLtONpWe6Sh2l7hj09HD3NydrSTx3ycrpT6gLg,3457
|
|
236
236
|
bmcgo/tasks/task_packet_to_supporte.py,sha256=5VSnC9typxiShCxt8YWWyBVojJ6MaXvgPHiIf6bObuA,4351
|
|
237
237
|
bmcgo/tasks/task_prepare.py,sha256=K1cb_3lhclRkCYa2wgp5E2FMOd3pC7VHBnm_4L_nrRE,6704
|
|
238
238
|
bmcgo/tasks/task_sign_and_pack_hpm.py,sha256=dLXTea5zfYg9UwYzhpl6o3eYd4Zg3vyB5GED4QcTvT0,2238
|
|
@@ -264,8 +264,8 @@ bmcgo/utils/installations/install_plans/qemu.yml,sha256=lT7aKag60QUH6hTGFKa3hGRq
|
|
|
264
264
|
bmcgo/utils/installations/install_plans/studio.yml,sha256=AEspVgsVAnmUdvqZYNCb7SPoUEq_0i61dfpauyguLa4,229
|
|
265
265
|
bmcgo/utils/installations/installers/apt_installer.py,sha256=nPaCb4cobSi9InN_aHsEPtQ0k4FgsCUWE5_VgBPvcRE,3769
|
|
266
266
|
bmcgo/utils/installations/installers/pip_installer.py,sha256=dDdios1EQ7fzt90r02pZeoM3jCmjslLzkSvzd2hgRVM,3241
|
|
267
|
-
openubmc_bingo-0.6.
|
|
268
|
-
openubmc_bingo-0.6.
|
|
269
|
-
openubmc_bingo-0.6.
|
|
270
|
-
openubmc_bingo-0.6.
|
|
271
|
-
openubmc_bingo-0.6.
|
|
267
|
+
openubmc_bingo-0.6.63.dist-info/METADATA,sha256=Cu1hBuatPipUUr2RecPDKy_Q3yClsDgiN6LnVJJ9IjA,1010
|
|
268
|
+
openubmc_bingo-0.6.63.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
|
|
269
|
+
openubmc_bingo-0.6.63.dist-info/entry_points.txt,sha256=UUoUP-vAWTgg9vEYbRwYqOBHgpRtkngdzMPb-ocz90g,42
|
|
270
|
+
openubmc_bingo-0.6.63.dist-info/top_level.txt,sha256=9AcvCAt1nZcOgMsGt6T07mg2Bgtdet-3mHTwg91axgI,6
|
|
271
|
+
openubmc_bingo-0.6.63.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|