Register new PURL type: spack - #898
Conversation
Signed-off-by: Tim Haines <thaines.astro@gmail.com>
c155144 to
c9453d4
Compare
spack is currently being considered for inclusion: package-url/purl-spec#898 Signed-off-by: Tim Haines <thaines.astro@gmail.com>
|
|
||
| ## Version definition | ||
|
|
||
| - **Requirement:** Optional |
There was a problem hiding this comment.
I think the namespace and version should be required -- we obviously have the information if we have a Spack spec, and it's hard to claim we know what spec it is without it.
Then the purl can be given by spack find --format "pkg:spack/{namespace}/{name}@{version}?sha={hash}"
There was a problem hiding this comment.
I think the namespace and version should be required -- we obviously have the information if we have a Spack spec, and it's hard to claim we know what spec it is without it.
The SHA is required. Modulo perfectly reproducible builds, my perception is that this uniquely identifies a build. I don't have any objections to requiring a namespace and version. My only hesitation would be that some folks might not know that there is a default namespace, so using a PURL to identify a package would then have a possible sharp edge (maybe not too sharp). Certainly for generating the PURLs inside spack, this is a non-issue.
There was a problem hiding this comment.
I don't think it's possible for the version or hash to be required in PURL. That would prohibit talking about the package in general without referring to a specific version. See #157
There was a problem hiding this comment.
@matt-phylum Michael noted that a qualifier key can be required, but should be rare (#895 (comment)). From 5.6.3 of the standard,
The namespace is optional, unless required by the package's type definition.
so we can enforce a namespace. The standard does not make the same exception for a version- it is always stated as optional, so we should follow that.
I will revisit the standard and see if I can get any more clarity.
There was a problem hiding this comment.
The only exception for 'required' qualifiers keys to date is for the Julia UUID and there was a long and deep discussion in the Julia community for this. It would be better to require a namespace instead if that is reasonable for spack.
There was a problem hiding this comment.
The current structure is
- namespace is required
- version is optional
- sha is optional
This makes it consistent with my reading of the standard and with other purls that I've seen in test cases for osv-scanner.
I didn't find a mechanism for running the tests in the Makefile or the CI workflows. Am I missing something?
If this is accepted, is the next step to make a PR in the website repo to add the logo?
closes #895
Implementation for #895
TODO