purl-spec icon indicating copy to clipboard operation
purl-spec copied to clipboard

Add `cos` package type

Open alowayed opened this issue 8 months ago • 1 comments

The Container-Optimized OS (COS) is a Google provided operating system that is optimized to run containers. "Container-Optimized OS does not include a package manager; as such, you'll be unable to install software packages directly on an instance" source. The pre-installed packages can be found by inspecting etc/cos-package-info.json. These packages are maintained by Google. The repository is not publicly accessible, hence no default repository.

Example of what cos-package-info.json looks like:

{
    "installedPackages": [
        {
            "category": "dev-lang",
            "name": "python-exec",
            "version": "17162.336.16",
            "ebuild_version": "2.0.1-r1"
        },
        ...
    ],
    "buildTimePackages": [
        {
            "category": "app-admin",
            "name": "eselect",
            "version": "17162.336.16",
            "ebuild_version": "1.4.8"
        },
        ...
    ],
}

Packages also depend on the COS version which can be found in etc/os-release similar to other OSes like Debian, Ubuntu, etc. Hence the inclusion of the distro qualifier similar to deb's distro qualifier.

It's unclear if category or ebuild_version should be included in the PURL qualifiers for completeness. And if the PURL should contain info on whether this is an installed or build time package. That doesn't have to be part of the official spec.

alowayed avatar Nov 10 '23 20:11 alowayed