From fef0e61a33252250643ac8b49cdfbc523778a8c2 Mon Sep 17 00:00:00 2001 From: Prabhu Subramanian Date: Sat, 23 Aug 2025 15:26:31 +0100 Subject: [PATCH 1/2] Fixes for apk Signed-off-by: Prabhu Subramanian --- types/apk-definition.json | 53 +++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/types/apk-definition.json b/types/apk-definition.json index c05b3a3a..f8cf0498 100644 --- a/types/apk-definition.json +++ b/types/apk-definition.json @@ -1,37 +1,74 @@ { "$schema": "https://packageurl.org/schemas/purl-type-definition.schema-1.0.json", - "$id": "https://packageurl.org/types/bitbucket-definition.json", + "$id": "https://packageurl.org/types/apk-definition.json", "type": "apk", "type_name": "APK-based packages", "description": "Alpine Linux APK-based packages", "repository": { "use_repository": true, - "note": "There is no default package repository; this should be implied either from the distro qualifiers key or using a repository base url as repository_url qualifiers key." + "note": "There is no default package repository; this should be implied either from the distro qualifiers key or using a repository base url as repository_url qualifiers key." }, "namespace_definition": { "requirement": "required", "note": "The namespace is the vendor such as alpine or openwrt. It is not case sensitive and must be lowercased.", "native_name": "vendor", - "case_sensitive": false + "case_sensitive": false, + "normalization_rules": [ + "It is not case sensitive and must be lowercased." + ] }, "name_definition": { + "requirement": "required", "note": "The name is the package name. It is not case sensitive and must be lowercased.", "native_name": "name", - "case_sensitive": false + "case_sensitive": false, + "normalization_rules": [ + "It is not case sensitive and must be lowercased." + ] }, "version_definition": { - "note": "The version is a package version as expected by apk.", + "requirement": "required", + "note": "The version is a package version as expected by apk. The format is typically 'pkgver-rX', where 'pkgver' may include suffixes like '_alpha', '_p1', etc. The '-rX' release suffix is a strong convention but not strictly required for a version string to be valid.", "native_name": "version" }, "qualifiers_definition": [ { "key": "arch", - "description": "The arch is the qualifiers key for a package architecture." + "requirement": "optional", + "description": "The arch is the qualifiers key for a package architecture.", + "examples": [ + "x86", + "x86_64", + "aarch64", + "armhf", + "armv7", + "noarch" + ] + }, + { + "key": "distro", + "requirement": "optional", + "description": "The distribution name when using multiple distributions", + "examples": [ + "alpine", + "postmarketos" + ] + }, + { + "key": "repository_url", + "requirement": "optional", + "description": "Base URL for the package repository", + "examples": [ + "https://dl-cdn.alpinelinux.org/alpine/" + ] } ], "examples": [ "pkg:apk/alpine/curl@7.83.0-r0?arch=x86", - "pkg:apk/alpine/apk@2.12.9-r3?arch=x86" + "pkg:apk/alpine/apk-tools@2.12.9-r3?arch=x86_64", + "pkg:apk/alpine/openssl@1.1.1t_p1-r0?arch=x86_64", + "pkg:apk/alpine/ca-certificates@20220614-r0?arch=noarch", + "pkg:apk/postmarketos/devicepkg-base@3-r0?arch=aarch64" ], "note": "not to be confused with Android packages with a .apk extension." -} +} \ No newline at end of file From b6397b7b8267ffd767e14de9a16a2143bcce371b Mon Sep 17 00:00:00 2001 From: prabhu <7842+prabhu@users.noreply.github.com> Date: Sat, 23 Aug 2025 17:47:29 +0000 Subject: [PATCH 2/2] fix validation --- types/apk-definition.json | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/types/apk-definition.json b/types/apk-definition.json index f8cf0498..251e35e2 100644 --- a/types/apk-definition.json +++ b/types/apk-definition.json @@ -35,32 +35,17 @@ { "key": "arch", "requirement": "optional", - "description": "The arch is the qualifiers key for a package architecture.", - "examples": [ - "x86", - "x86_64", - "aarch64", - "armhf", - "armv7", - "noarch" - ] + "description": "The arch is the qualifiers key for a package architecture." }, { "key": "distro", "requirement": "optional", - "description": "The distribution name when using multiple distributions", - "examples": [ - "alpine", - "postmarketos" - ] + "description": "The distribution name when using multiple distributions" }, { "key": "repository_url", "requirement": "optional", - "description": "Base URL for the package repository", - "examples": [ - "https://dl-cdn.alpinelinux.org/alpine/" - ] + "description": "Base URL for the package repository" } ], "examples": [