-
Notifications
You must be signed in to change notification settings - Fork 295
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 SPDX 2.2.1 support (SBOM) #296
Conversation
140c546
to
ea355cc
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
ea355cc
to
c157e31
Compare
This is an incredible amount of code for just updating to SPDX 2.2.1; what's actually going on here? |
c157e31
to
41bdf76
Compare
7e88c85
to
934c870
Compare
src/vcpkg/spdx.cpp
Outdated
} | ||
|
||
static bool is_cmake_whitespace(int ch) { return ch == ' ' || ch == '\n' || ch == '\t' || ch == '\r'; } | ||
static bool is_cmake_identifier(int ch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this for? this function does not include all of CMake's "identifiers" (by which I assume you mean "identifiers that can be included in ${...}
syntax"). It is missing /_+-
, and escape sequences.
edit: oh, identifier
is what CMake calls their command names. I'd like a comment here if possible.
Also, this should take a char32_t
or raw char
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My intent with these "heuristics" was entirely as a point-in-time/proof-of-concept stop gap until our standard helpers can be instrumented to emit resource documents. At that point, these heuristics should be retired since they're hopelessly outclassed (can't handle variable substitution, can't detect data-dependent paths).
Therefore I wanted to minimize sharing and refactoring of other parts of the codebase, since I hope to delete these entirely.
obj.insert("downloadLocation", "NONE"); | ||
obj.insert("licenseConcluded", conclude_license(cpgh.license.value_or(""))); | ||
obj.insert("licenseDeclared", noassert); | ||
obj.insert("copyrightText", noassert); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this include <installed>/share/<port>/copyright
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now I wanted to get basic stuff in place and see what additional data is required after. For example, maybe we can use the SPDX license "go look in that file" instead of having to copy the entire text.
fc23fd9
to
72c5ab1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve with nits fixed
See https://spdx.github.io/spdx-spec/ for more details.
Depends on #323