CEP XXXX: Defining Package-URLs (PURLs) for conda packages - #159
CEP XXXX: Defining Package-URLs (PURLs) for conda packages#159chenghlee wants to merge 7 commits into
Conversation
| - `checksum`: Optional qualifier, with no default value. If provided, its value MUST consist of | ||
| one or more checksum specifications, with consecutive checksum specifications separated by a | ||
| single, unencoded ASCII "," (comma) character. Each checksum specification is defined as the | ||
| concatenating of the lowercase checksum algorithm name (e.g., "md5", "sha256"); a single, | ||
| unencoded ":" (colon) character; and the lowercase, hex-encoded checksum value. | ||
|
|
||
| The lowercase checksum algorithm name MUST only contain the ASCII lowercase characters `a-z` and | ||
| digits `0-9`. The recommended way to specify checksum algorithms whose names are commonly | ||
| written with upper case and/or non-alphanumeric characters such as dashes (e.g., "SHA-1", | ||
| "SHA-256") is to simply remove any non-alphanumeric characters in the commonly-written name and | ||
| lowercase the remaining string. | ||
|
|
||
| The lowercase hex-encoded checksum value MUST only contain the ASCII lowercase characters `a-f` | ||
| and digits `0-9`. The checksum value is explicitly understood to be a hexadecimal value, so | ||
| commonly-used prefixes and postfixes (e.g., "0x" and "_16", respectively) MUST NOT be included as | ||
| part of the checksum value. | ||
|
|
||
| Historically, the conda ecosystem has used the MD5 and SHA-256 algorithms for checksumming | ||
| packages; see, e.g., [CEP 16][CEP16], [CEP 32][CEP32], and [CEP 36][CEP36]. Given this and the | ||
| sub-optimal security properties of MD5, the RECOMMENDED algorithm for the `checksum` qualifier is | ||
| SHA-256. |
There was a problem hiding this comment.
Having thought about it for a bit, I'm open to rewriting this checksum qualifier specification to only support MD5, SHA256, and/or [some other finite set of checksum algorithms], mostly so this and other CEPs don't have to think about support PURLs using, e.g., crc8 or xkcd221, as one of their named checksum algorithms.
- Add link to GitHub PR discussion - Change wording from "Section" to "Clause" to match ECMA-427 language - Properly escape an underscore
jaimergp
left a comment
There was a problem hiding this comment.
Thanks, Cheng! I love to see such a thorough review of the PURL standards so we can submit edits to their team.
I added a few comments about typos and suggestions for the flow, but there's one point I want to emphasize: the version component must only be a literal. Anything else that may potentially identify more than one version needs to be in vers.
|
@jaimergp @chenghlee The issue template for requesting changes to a registered PURL type is: |
- Provide an example in the "Motivation" section to clarify why the existing conda PURL specification is insufficient for the ecosystem - Clarify wording for "scheme" and "type" components - Simplify handling of "version" component and "vers" qualifiers by explicitly prohibiting their simultaneous use, rather than trying to define de-confliction/precedence rules. - Fix various typos and minor language mistakes
beckermr
left a comment
There was a problem hiding this comment.
There are many instances of must in the text that I think should be MUST. We should clean that up for clarity.
|
@chenghlee Are you still working on this? There are a number of review comments that seem unaddressed for a while. No rush, just checking the status. :) |
|
@conda/steering-council, the RFC period has officially opened for this CEP. It will last two weeks, so please place your comments before 2026-08-20 EOD AoE. In there are no blocking concerns, a vote will start immediately after the RFC period. |
jaimergp
left a comment
There was a problem hiding this comment.
Excellent CEP, @chenghlee. I did a more thorough pass and came up with some suggestions. My two main concerns are:
- PURLs can be used to identify package requirements (e.g. as we are trying to do in PEP 725 / 804), so I'm not sure there's much value in forbidding virtual packages here.
- The version field should be a literal string, to be processed with exact equality only. All other use cases (trailing zeros, globs, ranges, etc) belong in
vers.
I'm also curious: what happens in the PURL spec body refuses to accept some of these decisions? Do we withdraw the CEP and try again? Update it? What's the intended lifecycle once approved? Do we defer to future revisions of the PURL spec if there are conflict with this (historic) document?
On the editorial side, I've observed some instances of [emphasis], double space after period, and double newline before headings. Those have not been common in previous CEPs, and I don't feel particularly strongly about it, but if you don't care either, let's make it consistent: _emphasis_, single-space after period, single newline before headings.
| ## Abstract | ||
|
|
||
| This CEP describes the Package-URL type definition for conda packages in a way that conforms to | ||
| other relevant standards, including other CEPs and ECMA-427. |
There was a problem hiding this comment.
| other relevant standards, including other CEPs and ECMA-427. | |
| other relevant standards, including other CEPs and [ECMA-427][ECMA427]. |
|
|
||
| ## Abstract | ||
|
|
||
| This CEP describes the Package-URL type definition for conda packages in a way that conforms to |
There was a problem hiding this comment.
| This CEP describes the Package-URL type definition for conda packages in a way that conforms to | |
| This CEP describes the Package URL type definition for conda packages in a way that conforms to |
Other instances in the text don't use a dash 🤔
| <tr><td> Status </td><td> Draft </td></tr> | ||
| <tr><td> Author(s) </td><td> Cheng H. Lee <clee@anaconda.com> </td></tr> | ||
| <tr><td> Created </td><td> 2026-04-02 </td></tr> | ||
| <tr><td> Updated </td><td> 2026-04-08 </td></tr> |
There was a problem hiding this comment.
| <tr><td> Updated </td><td> 2026-04-08 </td></tr> | |
| <tr><td> Updated </td><td> 2026-08-10 </td></tr> |
| <tr><td> Author(s) </td><td> Cheng H. Lee <clee@anaconda.com> </td></tr> | ||
| <tr><td> Created </td><td> 2026-04-02 </td></tr> | ||
| <tr><td> Updated </td><td> 2026-04-08 </td></tr> | ||
| <tr><td> Discussion </td><td> https://github.com/conda/ceps/pull/159 </td></tr> |
There was a problem hiding this comment.
| <tr><td> Discussion </td><td> https://github.com/conda/ceps/pull/159 </td></tr> | |
| <tr><td> Discussion </td><td> https://github.com/conda/ceps/pull/159, https://github.com/package-url/purl-spec/issues/868 </td></tr> |
| PURLs to identify conda packages in various contexts, including but not limited to, software bills | ||
| of materials (SBOMs), vulnerability reporting, and cross-ecosystem compatibility. | ||
|
|
||
| However, the [existing conda PURL definition][purl-conda-def] fails to properly capture the |
There was a problem hiding this comment.
| However, the [existing conda PURL definition][purl-conda-def] fails to properly capture the | |
| However, the [existing conda PURL definition][purl-conda-def] (as of v1.0.1) fails to properly capture the |
|
|
||
| ## Examples | ||
|
|
||
| - `pkg:conda/main/python`: basic usage, identifying [all] `python` packages from Anaconda |
There was a problem hiding this comment.
| - `pkg:conda/main/python`: basic usage, identifying [all] `python` packages from Anaconda | |
| - `pkg:conda/main/python`: basic usage, identifying _all_ `python` packages from Anaconda |
Missing link or emphasis?
|
|
||
| - `pkg:conda/main/python`: basic usage, identifying [all] `python` packages from Anaconda | ||
| - `pkg:conda/conda-forge/python@3.13.12?build=hc97d973_100_cp313&subdir=linux-64`: basic usage, | ||
| identifying a specific `python` build from conda-forge. |
There was a problem hiding this comment.
| identifying a specific `python` build from conda-forge. | |
| identifying exactly one specific `python` build from conda-forge. |
| `https://conda.anaconda.org`. | ||
| - The requirement property of the `namespace` component has changed from "prohibited" to | ||
| "optional", with additional rules as described above. | ||
| - `channel` is no longer an accepted qualifier for conda PURLs. |
There was a problem hiding this comment.
Shall we say "forbidden"? It's rejected now, isn't it?
| - Simple PURLs like `pkg:conda/python` and `pkg:conda/python?channel=conda-forge` are accepted | ||
| under the existing conda PURL definition but cannot be used to identify actual package artifacts, | ||
| as that definition's default values produces non-existent URLs. The existing conda PURL | ||
| definition effectively requires that _every_ conda PURL explicitly provide a `repository_url` |
There was a problem hiding this comment.
| definition effectively requires that _every_ conda PURL explicitly provide a `repository_url` | |
| definition effectively requires that _every_ conda PURL explicitly provides a `repository_url` |
| - The prohibition of a `namespace` component in the existing conda PURL definition means | ||
| commonly-used patterns in the conda ecosystem (e.g., `channel::package=version`) cannot be | ||
| translated to "intuitive"-/similar-looking PURLs (e.g., `pkg:conda/channel/package@version`). | ||
| Coupled with the previously-noted choice of [existing] default values, this creates an unwanted |
There was a problem hiding this comment.
| Coupled with the previously-noted choice of [existing] default values, this creates an unwanted | |
| Coupled with the previously-noted choice of existing default values, this creates an unwanted |
Checklist for submitter
cep-0000.mdnamedcep-XXXX.mdin the root level.Checklist for CEP approvals
${greatest-number-in-main} + 1.cep-XXXX.mdfile has been renamed accordingly.# CEP XXXX -header has been edited accordingly.pre-commitchecks are passing.