Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 29 additions & 7 deletions types/apk-definition.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,59 @@
{
"$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."
]
Comment on lines +24 to +27
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"case_sensitive": false,
"normalization_rules": [
"It is not case sensitive and must be lowercased."
]
"case_sensitive": true
ERROR: unable to select packages:
  FIGLET (no such package):
    required by: world[FIGLET]
/ # apk add figlet
(1/1) Installing figlet (2.2.5-r3)
Executing busybox-1.37.0-r18.trigger
OK: 8 MiB in 17 packages

},
"version_definition": {
"note": "The version is a package version as expected by apk.",
"requirement": "required",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"requirement": "required",

Installed packages have versions, but I don't understand why the PURL spec should be limited to talking about only specific versions of installed packages, especially if vers is going to be a related standard. How would you use vers if you can't name the package?

"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",
"requirement": "optional",
"description": "The arch is the qualifiers key for a package architecture."
},
{
"key": "distro",
"requirement": "optional",
"description": "The distribution name when using multiple distributions"
},
Comment on lines +40 to +44
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't make sense. I don't know if the problem is just that it's not defined properly. The distribution goes in the namespace. What does it mean if a PURL has a distribution in the namespace and in the qualifier? If it makes sense for there two be two distributions, what if there are more than two?

{
"key": "repository_url",
"requirement": "optional",
"description": "Base URL for the package repository"
}
],
"examples": [
"pkg:apk/alpine/[email protected]?arch=x86",
"pkg:apk/alpine/[email protected]?arch=x86"
"pkg:apk/alpine/[email protected]?arch=x86_64",
"pkg:apk/alpine/[email protected]_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."
}
}