From 169f951c1f2272791b19bed04cf6b28b47641cb7 Mon Sep 17 00:00:00 2001 From: Laurent Goderre Date: Tue, 2 Apr 2024 10:23:13 -0400 Subject: [PATCH 1/2] Add PHP PECL type --- PURL-TYPES.rst | 12 +++++++++++- test-suite-data.json | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/PURL-TYPES.rst b/PURL-TYPES.rst index 64a1342..9d496d0 100644 --- a/PURL-TYPES.rst +++ b/PURL-TYPES.rst @@ -499,6 +499,17 @@ including container images built by Docker and others: pkg:oci/static@sha256%3A244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest pkg:oci/hello-wasm@sha256%3A244fd47e07d10?tag=v1 +pecl +---- +``pecl`` for PECL PHP packages: + +- The default repository is ``https://pecl.php.net/``. +- The ``namespace`` is empty. +- The ``name`` is not case sensitive +- Examples: + + pkg:pecl/APCu@5.1.23 + pub ---- ``pub`` for Dart and Flutter packages: @@ -623,7 +634,6 @@ Other candidate types to define: - ``osgi`` for OSGi bundle packages: - ``p2`` for Eclipse p2 packages: - ``pear`` for Pear PHP packages: -- ``pecl`` for PECL PHP packages: - ``perl6`` for Perl 6 module packages: - ``platformio`` for PlatformIO packages: - ``ebuild`` for Gentoo Linux portage packages: diff --git a/test-suite-data.json b/test-suite-data.json index 689741a..dfa0718 100644 --- a/test-suite-data.json +++ b/test-suite-data.json @@ -622,5 +622,29 @@ "qualifiers": null, "subpath": null, "is_invalid": false + }, + { + "description": "valid pecl purl", + "purl": "pkg:pecl/APCu@5.1.23", + "canonical_purl": "pkg:pecl/APCu@5.1.23", + "type": "pecl", + "namespace": null, + "name": "APCu", + "version": "5.1.23", + "qualifiers": null, + "subpath": null, + "is_invalid": false + }, + { + "description": "valid pecl purl without version", + "purl": "pkg:pecl/APCu", + "canonical_purl": "pkg:pecl/APCu", + "type": "pecl", + "namespace": null, + "name": "APCu", + "version": null, + "qualifiers": null, + "subpath": null, + "is_invalid": false } ] From ddbd30f36f536b1d291725aabaf67af66220fed5 Mon Sep 17 00:00:00 2001 From: Laurent Goderre Date: Fri, 12 Apr 2024 12:14:03 -0400 Subject: [PATCH 2/2] Unify PHP PEAR and PECL --- PURL-TYPES.rst | 15 ++++++++------- test-suite-data.json | 32 ++++++++++++++++++++++---------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/PURL-TYPES.rst b/PURL-TYPES.rst index 9d496d0..15f4121 100644 --- a/PURL-TYPES.rst +++ b/PURL-TYPES.rst @@ -499,16 +499,18 @@ including container images built by Docker and others: pkg:oci/static@sha256%3A244fd47e07d10?repository_url=gcr.io/distroless/static&tag=latest pkg:oci/hello-wasm@sha256%3A244fd47e07d10?tag=v1 -pecl +pear ---- -``pecl`` for PECL PHP packages: +``pear`` for PEAR and PECL PHP packages: -- The default repository is ``https://pecl.php.net/``. -- The ``namespace`` is empty. -- The ``name`` is not case sensitive +- The default repository for PEAR is ``https://pear.php.net``. The default repository for PECL is ``https://pecl.php.net/``. +- The ``namespace`` is the channel of the package. The domain portion of the channel MUST be lowercased. +- The ``name`` is case sensitive +- The ``version`` is the version of the package - Examples: - pkg:pecl/APCu@5.1.23 + pkg:pear/pear.php.net/Text_Password@1.2.1 + pkg:pear/pecl.php.net/APCu@5.1.23 pub ---- @@ -633,7 +635,6 @@ Other candidate types to define: - ``openwrt`` for OpenWRT packages: - ``osgi`` for OSGi bundle packages: - ``p2`` for Eclipse p2 packages: -- ``pear`` for Pear PHP packages: - ``perl6`` for Perl 6 module packages: - ``platformio`` for PlatformIO packages: - ``ebuild`` for Gentoo Linux portage packages: diff --git a/test-suite-data.json b/test-suite-data.json index dfa0718..a6b58d7 100644 --- a/test-suite-data.json +++ b/test-suite-data.json @@ -624,11 +624,11 @@ "is_invalid": false }, { - "description": "valid pecl purl", - "purl": "pkg:pecl/APCu@5.1.23", - "canonical_purl": "pkg:pecl/APCu@5.1.23", - "type": "pecl", - "namespace": null, + "description": "valid php pecl purl", + "purl": "pkg:pear/pecl.php.net/APCu@5.1.23", + "canonical_purl": "pkg:pear/pecl.php.net/APCu@5.1.23", + "type": "pear", + "namespace": "pecl.php.net", "name": "APCu", "version": "5.1.23", "qualifiers": null, @@ -636,15 +636,27 @@ "is_invalid": false }, { - "description": "valid pecl purl without version", - "purl": "pkg:pecl/APCu", - "canonical_purl": "pkg:pecl/APCu", - "type": "pecl", - "namespace": null, + "description": "valid php pecl purl without version", + "purl": "pkg:pear/pecl.php.net/APCu", + "canonical_purl": "pkg:pear/pecl.php.net/APCu", + "type": "pear", + "namespace": "pecl.php.net", "name": "APCu", "version": null, "qualifiers": null, "subpath": null, "is_invalid": false + }, + { + "description": "valid php pear purl", + "purl": "pkg:pear/pear.php.net/Text_Password@1.2.1", + "canonical_purl": "pkg:pear/pear.php.net/Text_Password@1.2.1", + "type": "pear", + "namespace": "pear.php.net", + "name": "Text_Password", + "version": "1.2.1", + "qualifiers": null, + "subpath": null, + "is_invalid": false } ]