diff --git a/PURL-TYPES.rst b/PURL-TYPES.rst index 27e747c..a47af59 100644 --- a/PURL-TYPES.rst +++ b/PURL-TYPES.rst @@ -521,6 +521,34 @@ swift pkg:swift/github.com/Alamofire/Alamofire@5.4.3 pkg:swift/github.com/RxSwiftCommunity/RxFlow@2.12.4 +vcpkg +----- +``vcpkg`` for `vcpkg `_ C and C++ packages: + +- By default, vcpkg will build C and C++ dependencies from source, using configurations compatible with the user's project. For this and other reasons, it uses different terminology, documented here. + + - **port** - A package, along with it's build scripts and possibly minor modifications. + - **registry** - A collection of ports, possibly private to the user. Analogous to **repository**. + +- ``namespace``: Currently reserved for future use and should be empty. +- ``name``: The case-sensitive name of the port. **Required** +- ``version``: The upstream version of the port (excluding the port file revision). **Required** +- ``subpath``: Currently reserved for future use and should be empty. +- Qualifier ``repository_url``: The absolute URL of the vcpkg registry where the package is available (optional). If omitted, ``https://github.com/microsoft/vcpkg`` as default registry is assumed. For filesystem registries or [overlay ports](https://learn.microsoft.com/vcpkg/concepts/overlay-ports), the URI will have a `file` URI scheme. +- Qualifier ``port_revision``: A string specifying the [port file revision](https://learn.microsoft.com/vcpkg/reference/vcpkg-json#port-version) (optional). +- Qualifier ``repository_revision``: The commit hash of the vcpkg registry, potentially abbreviated (optional). +- Additional qualifiers may be present on the purl that provide additional information about the context in which the package is being used, such as build configuration or platform information. These additional qualifiers must be tolerated during parsing and can be ignored if the parser does not expect them. +- Examples:: + + Microsoft GSL version 4.0.0 from the default registry with port file revision 4 + pkg:vcpkg/ms-gsl@4.0.0?port_revision=4 + ffmpeg version 5.1.2 from the azure-sdk registry + pkg:vcpkg/ffmpeg@5.1.2?repository_url=https://github.com/azure-sdk/vcpkg + LLVM from a filesystem registry + pkg:vcpkg/llvm@15.0.7?repository_url=file:///C:/local-registry/vcpkg + + + Other candidate types to define: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/test-suite-data.json b/test-suite-data.json index a819fc8..31bc492 100644 --- a/test-suite-data.json +++ b/test-suite-data.json @@ -347,6 +347,66 @@ "subpath": null, "is_invalid": true }, + { + "description": "simple vcpkg purl", + "purl": "pkg:vcpkg/ms-gsl@4.0.0", + "canonical_purl": "pkg:vcpkg/ms-gsl@4.0.0", + "type": "vcpkg", + "namespace": null, + "name": "ms-gsl", + "version": "4.0.0", + "qualifiers": null, + "subpath": null, + "is_invalid": false + }, + { + "description": "vcpkg with port_revision", + "purl": "pkg:vcpkg/ms-gsl@4.0.0?port_revision=4", + "canonical_purl": "pkg:vcpkg/ms-gsl@4.0.0?port_revision=4", + "type": "vcpkg", + "namespace": null, + "name": "ms-gsl", + "version": "4.0.0", + "qualifiers": {"port_revision": "4"}, + "subpath": null, + "is_invalid": false + }, + { + "description": "vcpkg non-default git registry", + "purl": "pkg:vcpkg/ffmpeg@5.1.2?repository_url=https://github.com/azure-sdk/vcpkg&port_revision=3", + "canonical_purl": "pkg:vcpkg/ffmpeg@5.1.2?repository_url=https://github.com/azure-sdk/vcpkg&port_revision=3", + "type": "vcpkg", + "namespace": null, + "name": "ffmpeg", + "version": "5.1.2", + "qualifiers": {"repository_url": "https://github.com/azure-sdk/vcpkg", "port_revision": "3"}, + "subpath": null, + "is_invalid": false + }, + { + "description": "vcpkg filesystem registry or overlay port", + "purl": "pkg:vcpkg/llvm@15.0.7?repository_url=file:///C:/local-registry/vcpkg&port_revision=3", + "canonical_purl": "pkg:vcpkg/llvm@15.0.7?repository_url=file:///C:/local-registry/vcpkg&port_revision=3", + "type": "vcpkg", + "namespace": null, + "name": "llvm", + "version": "15.0.7", + "qualifiers": {"repository_url": "file:///C:/local-registry/vcpkg", "port_revision": "3"}, + "subpath": null, + "is_invalid": false + }, + { + "description": "vcpkg with additional qualifiers", + "purl": "pkg:vcpkg/ms-gsl@4.0.0?port_revision=4&repository_revision=42301df395&os=Linux&os_arch=x64&build_type=Debug&linkage=dynamic", + "canonical_purl": "pkg:vcpkg/ms-gsl@4.0.0?port_revision=4&repository_revision=42301df395&os=Linux&os_arch=x64&build_type=Debug&linkage=dynamic", + "type": "vcpkg", + "namespace": null, + "name": "ms-gsl", + "version": "4.0.0", + "qualifiers": {"port_revision": "4", "repository_revision": "42301df395", "os": "Linux", "os_arch": "x64", "build_type": "Debug", "linkage": "dynamic"}, + "subpath": null, + "is_invalid": false + }, { "description": "valid conda purl with qualifiers", "purl": "pkg:conda/absl-py@0.4.1?build=py36h06a4308_0&channel=main&subdir=linux-64&type=tar.bz2",