-
Notifications
You must be signed in to change notification settings - Fork 142
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
Clarification on FileName Field in SPDX 2.3 #1179
Comments
Looks good to me with one consideration:
All other relationships are what I would expect if the intent of the SPDX document is to describe the the "copied" file. |
Thank you, @goneall , for the feedback and additional information. Let’s assume that the local file I’m encountering some confusion regarding the placement of the file element: As per section 5.2.3, specifically the 4th bullet point, if a file is not part of any package, it must appear before any package information section in the SPDX document. In this scenario, since local file {
"Files": [
"SPDXRef-File-test.java"
],
"Package": {
"name": "dummy",
"files": [
"SPDXRef-File-abc.java"
]
}
} Instead of: {
"Package": {
"name": "dummy"
},
"files": [
"SPDXRef-File-abc.java",
"SPDXRef-File-test.java"
]
} Please let me know if I have misunderstood section 5.2.3. |
@jacknishanth07 - My interpretation is the position of the file is only relevant in the tag/value document and does not apply to the JSON format - although in re-reading the spec, this isn't made clear. @armintaenzertng - do you agree with my interpretation? |
Thank you @goneall for clarifying that the position of the file does not apply to the JSON format. To validate this, I converted the JSON to tag/value format using the SPDX tool and observed the following: individual files are placed immediately before the package, and files associated with a package are placed just after the respective package. Placing below for reference.
As a suggestion, we could enhance Section 5.2.3 by explicitly stating that the positional requirement is specific to the tag:value format and does not apply to other SPDX data formats. While the specification mentions that "when implementing the tag:value format, the positioning of file elements is syntactically significant," it would be helpful to clarify that this does not extend to formats like JSON or YAML. Once again, thank you @goneall for your clarification. Please feel free to close this GitHub issue. |
I need some clarification on how to correctly mention the file name in the SPDX 2.3 document. Specifically, I want to understand how to represent the file path within the codebase and the file's location inside the package.
Details
I have a file
test.java
located in./local/src/test/test.java
. This file has been taken from a third-party package "dummy" where the original filename isabc.java
present in the path./src/abc.java
within the package. I want to ensure that I am correctly representing all these file path details in the SPDX document.Example
Here is how I currently understand it:
./local/src/test/test.java
./src/abc.java
Question
I have represented both files under the package section and in the relationships section as follows:
Is this the correct way to represent the file paths in the SPDX document? If not, could you please provide the correct format and any additional details that I should include? Should the local file path be mentioned inside the package or outside the package? According to section 5.2.3 of the SPDX specification 2.3, if a file is not part of any package, it should precede any package information section reference in the SPDX document.
Please find the full SPDX document for reference :
Thanks in advance!
The text was updated successfully, but these errors were encountered: