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

Add PURL and CPE into the SPDX examples file #473

Closed
goneall opened this issue Sep 17, 2020 · 9 comments
Closed

Add PURL and CPE into the SPDX examples file #473

goneall opened this issue Sep 17, 2020 · 9 comments

Comments

@goneall
Copy link
Member

goneall commented Sep 17, 2020

Now that Package URL's and CPE references are supported, we should add those to the examples

@MarkusTe
Copy link

MarkusTe commented Apr 14, 2021

That would help us a lot ;-)
Even after some hours I still was unable to generate any SPDX BoM file containing CPE and PURL (for packages) that was understood by Dependency Track ...
Any valid example in any of the five formats would be a big help.

@MarkusTe
Copy link

MarkusTe commented Apr 26, 2021

Still not being successful in using PURL with SPDX.

Trying to convert this example into Tag format --> error message in the context of package mgrs.

Whatever I've tried within last weeks, I get problems with PURL, let it be Dependency Track, OSS Review Toolkit, SPDX converter, it leads to problems. I believe having examples would help all of us quite a bit.

@goneall
Copy link
Member Author

goneall commented Apr 26, 2021

@MarkusTe The error is due to issue 16 in the SPDX Java Jackson Store.

The spec isn't clear on if we should be using the Tag/Value format of PACKAGE-MANAGER or a more computer language friendly form of PACKAGE_MANAGER in the YAML and JSON versions.

It looks like ORT is using the dashes while the other SPDX tools are expecting the underscrore.

@tsteenbe @zvr any opinions on which of these formats should be used in JSON/YAML?

If the consensus is to use dashes, I can fix the Java code be compatible.

@zvr
Copy link
Member

zvr commented Apr 26, 2021

Why am I reminded of #58?

@goneall
Copy link
Member Author

goneall commented Apr 26, 2021

Good memory @zvr ! It is a bit of a pain to deal with dashes in a serialization format that doesn't support them.

Java, for examples, doesn't support dashes in enums.

@sschuberth
Copy link
Member

sschuberth commented Apr 27, 2021

It looks like ORT is using the dashes while the other SPDX tools are expecting the underscrore.

FYI, @tsteenbe fixed ORT to use underscores in oss-review-toolkit/ort#3867 some two weeks ago.

@goneall
Copy link
Member Author

goneall commented Apr 27, 2021

FYI, @tsteenbe fixed ORT to use underscores in oss-review-toolkit/ort#3867 some two weeks ago.

Based on this, I'll leave the Java implementation as is - it will be consistent with ORT

goneall added a commit that referenced this issue Apr 27, 2021
Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
goneall added a commit that referenced this issue Apr 27, 2021
…473

Signed-off-by: Gary O'Neall <gary@sourceauditor.com>
@goneall
Copy link
Member Author

goneall commented Apr 27, 2021

I just added a PR to add a purl example. Please review PR #509 and let me know if this works.

My apologies for the randomizing of the element order making the diffs rather useless - a side-effect of using tools to generate the examples.

@MarkusTe
Copy link

MarkusTe commented Apr 28, 2021

Assuming that the examples are accepted as correct, here my findings as expected

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

No branches or pull requests

5 participants