Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scripts: zephyr_module: Add URL, PURL and version to SPDX #67913

Conversation

tgagneret-embedded
Copy link
Contributor

Improve the SPDX with the current values:

  • URL: extracted from git remote. If more than one remote, URL is not set.
  • Version: extracted from git rev-parse (commit id).
  • PURL: generated from URL and Version.

For zephyr, the tag is extracted, if present, and replace the commit id for the version field.
Since official modules does not have tags, tags are not yet extracted for modules.

This PR follows this issue and PR #66182 and #66495.

@tgagneret-embedded
Copy link
Contributor Author

@mbolivar-ampere I don't understand why the pipeline fails. I've updated files containing zephyr_modules.py call with the --zephyr-base parameters (which is now required), including twister.yaml.

Could you help me ?

Thanks

@tgagneret-embedded
Copy link
Contributor Author

tgagneret-embedded commented Jan 23, 2024

If you think --zephyr-base parameter should not be required, let me know (it would solve the pipeline issue).

Since there is this line of code, it seems that it should be provided each time:

# Avoid including Zephyr base project as module.
if project == zephyr_base:
continue

@tgagneret-embedded tgagneret-embedded force-pushed the feature/add_url_version_spdx branch 3 times, most recently from 71a0628 to d34ffdf Compare January 23, 2024 15:32
@tgagneret-embedded
Copy link
Contributor Author

--zephyr-base parameters in zephyr_module.py should be required but Github actions seems to use external twtister.yaml (and not the one from my branch) for the pipeline which do not provide --zephyr-base parameter.

I added the --zephyr-base arguments everywhere, so it can be marked as required in zephyr_module.py when twister.yaml from this PR is merged (and used in CI).

@tgagneret-embedded tgagneret-embedded force-pushed the feature/add_url_version_spdx branch from d34ffdf to 147563f Compare January 24, 2024 09:48
@tgagneret-embedded
Copy link
Contributor Author

Forget all I said about --zephyr-base, it might be more complicated that I thought and this should not be in this PR, so I removed this modification from the PR.

Sorry about this.

@tgagneret-embedded tgagneret-embedded force-pushed the feature/add_url_version_spdx branch 2 times, most recently from 7c55cbc to ddde9b0 Compare January 24, 2024 15:49
@tgagneret-embedded tgagneret-embedded marked this pull request as draft January 24, 2024 15:56
Improve the SPDX with the current values:
 - URL: extracted from `git remote`. If more than one remote, URL is not
 set.
 - Version: extracted from `git rev-parse` (commit id).
 - PURL and CPE for Zephyr: generated from URL and version.

For zephyr, the tag is extracted, if present, and replace the commit id for
the version field.
Since official modules does not have tags, tags are not yet extracted for
modules.

Fix: SPDX relations were missing when adding modules to zephyr.spdx.

Signed-off-by: Thomas Gagneret <[email protected]>
@tgagneret-embedded tgagneret-embedded force-pushed the feature/add_url_version_spdx branch from ddde9b0 to 897adb6 Compare January 24, 2024 17:29
@tgagneret-embedded
Copy link
Contributor Author

PR was splited but everything is now present in the same PR.
Closed in favor of PR #66495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants