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

packageVerificationCodeExcludedFile filename prefix #910

Closed
ilans opened this issue Nov 13, 2024 · 6 comments · Fixed by #913
Closed

packageVerificationCodeExcludedFile filename prefix #910

ilans opened this issue Nov 13, 2024 · 6 comments · Fixed by #913
Labels
Profile:Core Core Profile and related matters RDF/OWL/SHACL RDF graph, schema, ontology, constraint
Milestone

Comments

@ilans
Copy link
Collaborator

ilans commented Nov 13, 2024

From /Core/packageVerificationCodeExcludedFile:
"In general, every filename is preceded with a ./, see RFC 3986 ..."

Why use "In general" if the summary clearly states that this is "The relative file name...".
Shouldn't it always preceded with ./?

If that's correct, I'll include a SHACL rule.

@bact
Copy link
Collaborator

bact commented Nov 13, 2024

Because RFC 3986 also has another kind of relative reference that begins with //.

A relative reference that begins with two slash characters is termed a network-path reference; such references are rarely used.

See "4.2. Relative Reference" in https://datatracker.ietf.org/doc/rfc3986/

Although it is rare, but it may possible to occur. So I think if there will be a validation rule, the rule should allow its occurrence.

--

To avoid confusion, we may like to add a small notes on this in the description, in packageVerificationCodeExcludedFile, may be in 3.0.2?

@bact bact added this to the 3.0.1 milestone Nov 13, 2024
@bact bact added Profile:Core Core Profile and related matters RDF/OWL/SHACL RDF graph, schema, ontology, constraint labels Nov 13, 2024
@zvr
Copy link
Member

zvr commented Nov 13, 2024

We're talking about filenames, not URIs. So, there should only be "relative-path" references (to follow the nomenclature of RFC3986).

I don't even understand why there is a reference to this RFC. I'd rewrite the whole sentence as simply:

Every filename starts with ./.

@zvr zvr changed the title [SHACL] packageVerificationCodeExcludedFile filename prefix packageVerificationCodeExcludedFile filename prefix Nov 13, 2024
@bact
Copy link
Collaborator

bact commented Nov 13, 2024

Will "absolute-path" with a single slash (/) prefix (also from 4.2. Relative Reference) possible in this context?

@zvr
Copy link
Member

zvr commented Nov 13, 2024

I don't think so, since we're talking about which files inside a package should be excluded when computing the verification hash. It makes no sense to use absolute paths for these .

But probably @goneall should be the one to decide, since he's more proficient in this SPDXv2 verification stuff.

@bact
Copy link
Collaborator

bact commented Nov 13, 2024

Thanks. Would be great if it can be simplified.

For reference, the RFC reference is from https://spdx.github.io/spdx-spec/v2.3/package-information/#742-intent .
The description there does not have "in general".
The description also only mentioned about sub-directory name when discussed about the prefix.

@ilans
Copy link
Collaborator Author

ilans commented Nov 14, 2024

Created a PR: #913

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Profile:Core Core Profile and related matters RDF/OWL/SHACL RDF graph, schema, ontology, constraint
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants