Add PURL to Zephyr module.yml for SBoM generation (#1344)

Co-authored-by: John Wellbelove <jwellbelove@users.noreply.github.com>
This commit is contained in:
Ralph Rooding 2026-03-12 21:39:53 +01:00 committed by GitHub
parent 78d8b82afb
commit ad6e027b08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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(line)
f.write('\n') 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(): def update_versions():
print('') print('')
@ -149,6 +172,8 @@ def update_versions():
update_library_properties(os.path.join(etl_dir, 'library.properties')) update_library_properties(os.path.join(etl_dir, 'library.properties'))
update_zephyr_module()
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
if __name__ == "__main__": if __name__ == "__main__":
update_versions() update_versions()

View File

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