Add PURL to Zephyr module.yml for SBoM generation

This commit is contained in:
Ralph Rooding 2026-03-12 15:04:03 +01:00
parent 7bac1d02f7
commit ae8bbbd87d
2 changed files with 28 additions and 0 deletions

View File

@ -129,6 +129,29 @@ def update_library_properties(filename):
f.write(line)
f.write('\n')
#------------------------------------------------------------------------------
def update_zephyr_module():
print('')
print('Updating zephyr/module.yml')
zephyr_module = os.path.join(etl_dir, 'zephyr', 'module.yml')
with open(zephyr_module, 'r') as f:
text = f.read().splitlines()
search_purl = 'pkg:github/ETLCPP/etl@'
for i in range(len(text)):
if search_purl in text[i]:
idx = text[i].find(search_purl)
text[i] = text[i][:idx] + search_purl + full_version
print(text[i])
with open(zephyr_module, 'w') as f:
for line in text:
f.write(line)
f.write('\n')
#------------------------------------------------------------------------------
def update_versions():
print('')
@ -149,6 +172,8 @@ def update_versions():
update_library_properties(os.path.join(etl_dir, 'library.properties'))
update_zephyr_module()
#------------------------------------------------------------------------------
if __name__ == "__main__":
update_versions()

View File

@ -2,3 +2,6 @@ name: etl
build:
cmake: zephyr
kconfig: zephyr/Kconfig
security:
external-references:
- pkg:github/ETLCPP/etl@20.46.2