Package Contents

A package contains files that are installed on a target system as well as additionals, which are only relevant for the package manager and the repository management software (e.g. to create entries in the Management Repository and Sync Database).

Package

The metadata contained in a package is described by several components, which are described in more detail in the sections for .MTREE, .BUILDINFO and .PKGINFO.

Package files are read and their contents parsed, which can subsequently be described by a JSON schema.

Below is a list of currently understood versions of the schema.

PackageV1

{
  "$defs": {
    "BuildInfo": {
      "description": "The representation of a .BUILDINFO file.\n\nThis is a template class and should not be used directly. Instead instantiate one of the classes derived from it.",
      "properties": {},
      "title": "BuildInfo",
      "type": "object"
    },
    "MTree": {
      "description": "A class to describe an mtree file.\n\nAttributes\n----------\nfiles: list[File]\n    A list of File instances, representing the entries in an mtree file",
      "properties": {
        "entries": {
          "items": {
            "$ref": "#/$defs/MTreeEntry"
          },
          "title": "Entries",
          "type": "array"
        }
      },
      "required": [
        "entries"
      ],
      "title": "MTree",
      "type": "object"
    },
    "MTreeEntry": {
      "description": "An entry in an MTree.\n\nThis is a template class and should not be used directly. Instead instantiate one of the classes derived from it.",
      "properties": {},
      "title": "MTreeEntry",
      "type": "object"
    },
    "PkgInfo": {
      "description": "The representation of a .PKGINFO file.\n\nThis is a template class and should not be used directly. Instead instatiate one of the classes derived from it.",
      "properties": {},
      "title": "PkgInfo",
      "type": "object"
    }
  },
  "description": "Package representation version 1.\n\nAttributes\n----------\nbuildinfo: BuildInfo\n    A .BUILDINFO file representation\ncsize: CSize\n    The file size of the Package\nfilename: FileName\n    The filename of the Package\nmd5sum: str\n    An MD5 checksum for the package\nmtree: MTree\n    An .MTREE file representation\npgpsig: str | None\n    An optional PGP signature (in base64 representation) for the package\npkginfo: PkgInfo\n    A .PKGINFO file representation\nsha256sum: str\n    A SHA256 checksum for the package",
  "properties": {
    "buildinfo": {
      "$ref": "#/$defs/BuildInfo"
    },
    "csize": {
      "minimum": 0,
      "title": "Csize",
      "type": "integer"
    },
    "filename": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*-([1-9]+[0-9]*:|)([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*-[1-9]+[0-9]*(|[.]{1}[1-9]+[0-9]*)-(aarch64|any|arm|armv6h|armv7h|i486|i686|pentium4|riscv32|riscv64|x86_64|x86_64_v2|x86_64_v3|x86_64_v4)(.pkg.tar)(|\\.bz2|\\.gz|\\.xz|\\.zst)$",
      "title": "Filename",
      "type": "string"
    },
    "md5sum": {
      "pattern": "^[a-f0-9]{32}$",
      "title": "Md5Sum",
      "type": "string"
    },
    "mtree": {
      "$ref": "#/$defs/MTree"
    },
    "pgpsig": {
      "anyOf": [
        {
          "pattern": "^[0-9A-Za-z/+]+={0,2}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Pgpsig"
    },
    "pkginfo": {
      "$ref": "#/$defs/PkgInfo"
    },
    "sha256sum": {
      "pattern": "^[a-f0-9]{64}$",
      "title": "Sha256Sum",
      "type": "string"
    }
  },
  "required": [
    "sha256sum",
    "md5sum",
    "filename",
    "csize",
    "buildinfo",
    "mtree",
    "pkginfo"
  ],
  "title": "PackageV1",
  "type": "object"
}

PackageV2

This version removes the md5sum field as the hash algorithm is unsafe.

{
  "$defs": {
    "BuildInfo": {
      "description": "The representation of a .BUILDINFO file.\n\nThis is a template class and should not be used directly. Instead instantiate one of the classes derived from it.",
      "properties": {},
      "title": "BuildInfo",
      "type": "object"
    },
    "MTree": {
      "description": "A class to describe an mtree file.\n\nAttributes\n----------\nfiles: list[File]\n    A list of File instances, representing the entries in an mtree file",
      "properties": {
        "entries": {
          "items": {
            "$ref": "#/$defs/MTreeEntry"
          },
          "title": "Entries",
          "type": "array"
        }
      },
      "required": [
        "entries"
      ],
      "title": "MTree",
      "type": "object"
    },
    "MTreeEntry": {
      "description": "An entry in an MTree.\n\nThis is a template class and should not be used directly. Instead instantiate one of the classes derived from it.",
      "properties": {},
      "title": "MTreeEntry",
      "type": "object"
    },
    "PkgInfo": {
      "description": "The representation of a .PKGINFO file.\n\nThis is a template class and should not be used directly. Instead instatiate one of the classes derived from it.",
      "properties": {},
      "title": "PkgInfo",
      "type": "object"
    }
  },
  "description": "Package representation version 2.\n\nAttributes\n----------\nbuildinfo: BuildInfo\n    A .BUILDINFO file representation\ncsize: CSize\n    The file size of the Package\nfilename: FileName\n    The filename of the Package\nmtree: MTree\n    An .MTREE file representation\npgpsig: str | None\n    An optional PGP signature (in base64 representation) for the package\npkginfo: PkgInfo\n    A .PKGINFO file representation\nsha256sum: str\n    A SHA256 checksum for the package",
  "properties": {
    "buildinfo": {
      "$ref": "#/$defs/BuildInfo"
    },
    "csize": {
      "minimum": 0,
      "title": "Csize",
      "type": "integer"
    },
    "filename": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*-([1-9]+[0-9]*:|)([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*-[1-9]+[0-9]*(|[.]{1}[1-9]+[0-9]*)-(aarch64|any|arm|armv6h|armv7h|i486|i686|pentium4|riscv32|riscv64|x86_64|x86_64_v2|x86_64_v3|x86_64_v4)(.pkg.tar)(|\\.bz2|\\.gz|\\.xz|\\.zst)$",
      "title": "Filename",
      "type": "string"
    },
    "mtree": {
      "$ref": "#/$defs/MTree"
    },
    "pgpsig": {
      "anyOf": [
        {
          "pattern": "^[0-9A-Za-z/+]+={0,2}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Pgpsig"
    },
    "pkginfo": {
      "$ref": "#/$defs/PkgInfo"
    },
    "sha256sum": {
      "pattern": "^[a-f0-9]{64}$",
      "title": "Sha256Sum",
      "type": "string"
    }
  },
  "required": [
    "sha256sum",
    "filename",
    "csize",
    "buildinfo",
    "mtree",
    "pkginfo"
  ],
  "title": "PackageV2",
  "type": "object"
}

.MTREE

The .MTREE files contained in a package are mtree files, which describe the contents of a package. Entities such as directories, files and symlinks are described in a binary format that lists their ownership, permissions, creation date and various checksums.

Not all mtree keywords are used during package creation, which means that only a subset of them are available in the eventual .MTREE file.

MTreeEntry

The entries of an .MTREE file are parsed and can subsequently be described by a JSON schema.

Below is a list of currently understood versions of the schema.

MTreeEntryV1

{
  "description": "An entry in an MTree (version 1).\n\nAttributes\n----------\ngid: int\n    A group ID >0, <1000\nlink: str | None\n    An optional string representing a relative or absolute file\nmd5: str | None\n    A optional string representing an MD5 checksum\nmode: str\n    A three or four digit long string, consisting only of valid file modes\nname: str\n    A string representing an absolute file location in mtree format\nschema_version: int\n    A schema version (defaults to 1)\nsha256:\n    An optional string representing a SHA-256 checksum\nsize: int\n    A non-negative integer describing a file size in bytes\ntime: float\n    A float > 0 representing a unix timestamp (seconds since the epoch)\ntype_: str\n    A string representing a valid mtree type (one of block, char, dir, fifo, file, link or socket)\nuid: int\n    A user ID >0, <1000",
  "properties": {
    "gid": {
      "exclusiveMaximum": 1000,
      "minimum": 0,
      "title": "Gid",
      "type": "integer"
    },
    "link": {
      "anyOf": [
        {
          "pattern": "^([A-Za-z0-9.,:;/_()@\\\\&$?!+%~{}<>*\\-\\\"\\'\\[\\]\\`^|]+|/[A-Za-z0-9.,:;/_()@\\\\&$?!+%~{}<>*\\-\\\"\\'\\[\\]\\`^|]+)$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Link"
    },
    "md5": {
      "anyOf": [
        {
          "pattern": "^^[a-f0-9]{32}$$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Md5"
    },
    "mode": {
      "pattern": "^[01234567]{3,4}$",
      "title": "Mode",
      "type": "string"
    },
    "name": {
      "pattern": "^/[A-Za-z0-9.,:;/_()@\\\\&$?!+%~{}<>*\\-\\\"\\'\\[\\]\\`^|]+$",
      "title": "Name",
      "type": "string"
    },
    "schema_version": {
      "default": 1,
      "maximum": 1,
      "minimum": 1,
      "title": "Schema Version",
      "type": "integer"
    },
    "sha256": {
      "anyOf": [
        {
          "pattern": "^^[a-f0-9]{64}$$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Sha256"
    },
    "size": {
      "anyOf": [
        {
          "minimum": 0,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Size"
    },
    "time": {
      "minimum": 0.0,
      "title": "Time",
      "type": "number"
    },
    "type_": {
      "pattern": "^(block|char|dir|fifo|file|link|socket)$",
      "title": "Type ",
      "type": "string"
    },
    "uid": {
      "exclusiveMaximum": 1000,
      "minimum": 0,
      "title": "Uid",
      "type": "integer"
    }
  },
  "required": [
    "uid",
    "gid",
    "time",
    "type_",
    "name",
    "mode"
  ],
  "title": "MTreeEntryV1",
  "type": "object"
}

.BUILDINFO

The .BUILDINFO files contained in packages are BUILDINFO files, which describe aspects of the build environment present during the creation of a package.

Formats for the file are specified by makepkg. Its write_buildinfo() function implements only the latest version of the available formats.

BuildInfo

The entries in a .BUILDINFO file are parsed and can subsequently be described by a JSON schema.

Below is a list of currently understood versions of the schema.

BuildInfoV1

{
  "description": "The representation of a .BUILDINFO file (version 1).\n\nAttributes\n----------\nbuilddate: NonNegativeInt\n    A number >= 0\nbuilddir: str\n    A string representing an absolute directory\nbuildenv: list[str]\n    A list of strings as described by makepkg.conf's BUILDENV option\ninstalled: list[str]\n    A list of strings representing <package_name>-<epoch><version>-<pkgrel>-<architecture> of packages installed\n    during the creation of a package\noptions: list[str]\n    A list of strings representing makepkg.conf OPTIONS used during the creation of a package\npackager: str\n    A string representing a packager UID (e.g. \"First Last <mail@example.tld>\")\npkgarch: str\n    A valid CPU architecture for a package\npkgbase: str\n    A string representing a valid pkgbase for a package\npkgbuild_sha256sum: str\n    A string representing a SHA-256 checksum for a PKGBUILD of a package\npkgname: str\n    A string representing a valid pkgname of a package\npkgver: str\n    A valid package version string which includes epoch, version and pkgrel\nschema_version: int\n    1 - representing `format = 1` in the .BUILDINFO file; schema_version is chosen for uniformity",
  "properties": {
    "builddate": {
      "minimum": 0,
      "title": "Builddate",
      "type": "integer"
    },
    "builddir": {
      "title": "Builddir",
      "type": "string"
    },
    "buildenv": {
      "items": {
        "pattern": "^(!|)[\\w\\-.]+$",
        "type": "string"
      },
      "title": "Buildenv",
      "type": "array"
    },
    "installed": {
      "items": {
        "pattern": "^([a-z\\d_@+]+[a-z\\d\\-._@+]*)-([1-9]+[0-9]*:|)([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*-[1-9]+[0-9]*(|[.]{1}[1-9]+[0-9]*)-(aarch64|any|arm|armv6h|armv7h|i486|i686|pentium4|riscv32|riscv64|x86_64|x86_64_v2|x86_64_v3|x86_64_v4)$",
        "type": "string"
      },
      "title": "Installed",
      "type": "array"
    },
    "options": {
      "anyOf": [
        {
          "items": {
            "pattern": "^(!|)[\\w\\-.]+$",
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Options"
    },
    "packager": {
      "pattern": "^[\\w\\s\\-().]+\\s<(.*)>$",
      "title": "Packager",
      "type": "string"
    },
    "pkgarch": {
      "pattern": "^(aarch64|any|arm|armv6h|armv7h|i486|i686|pentium4|riscv32|riscv64|x86_64|x86_64_v2|x86_64_v3|x86_64_v4)$",
      "title": "Pkgarch",
      "type": "string"
    },
    "pkgbase": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
      "title": "Pkgbase",
      "type": "string"
    },
    "pkgbuild_sha256sum": {
      "pattern": "^[a-f0-9]{64}$",
      "title": "Pkgbuild Sha256Sum",
      "type": "string"
    },
    "pkgname": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
      "title": "Pkgname",
      "type": "string"
    },
    "pkgver": {
      "pattern": "^([1-9]+[0-9]*:|)([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*-[1-9]+[0-9]*(|[.]{1}[1-9]+[0-9]*)$",
      "title": "Pkgver",
      "type": "string"
    },
    "schema_version": {
      "default": 1,
      "maximum": 1,
      "minimum": 1,
      "title": "Schema Version",
      "type": "integer"
    }
  },
  "required": [
    "pkgver",
    "pkgname",
    "pkgbuild_sha256sum",
    "pkgbase",
    "pkgarch",
    "packager",
    "installed",
    "buildenv",
    "builddir",
    "builddate"
  ],
  "title": "BuildInfoV1",
  "type": "object"
}

BuildInfoV2

Note

If devtools has been used as buildtool, the buildtoolver has to be of the form <optional_epoch><pkgver>-<pkgrel>-<arch> (e.g. 20220207-1-any)!

{
  "description": "The representation of a .BUILDINFO file (version 2).\n\nAttributes\n----------\nbuilddate: NonNegativeInt\n    A number >= 0\nbuilddir: str\n    A string representing an absolute directory\nbuildenv: list[str]\n    A list of strings as described by makepkg.conf's BUILDENV option\nbuildtool: str\n    The package name of the build tool used to create a package\nbuildtoolver: str\n    The version of the build tool used to create a package\ninstalled: list[str]\n    A list of strings representing <package_name>-<epoch><version>-<pkgrel>-<architecture> of packages installed\n    during the creation of a package\noptions: list[str]\n    A list of strings representing makepkg.conf OPTIONS used during the creation of a package\npackager: str\n    A string representing a packager UID (e.g. \"First Last <mail@example.tld>\")\npkgarch: str\n    A valid CPU architecture for a package\npkgbase: str\n    A string representing a valid pkgbase for a package\npkgbuild_sha256sum: str\n    A string representing a SHA-256 checksum for a PKGBUILD of a package\npkgname: str\n    A string representing a valid pkgname of a package\npkgver: str\n    A valid package version string which includes epoch, version and pkgrel\nschema_version: int\n    2 - representing `format = 2` in the .BUILDINFO file; schema_version is chosen for uniformity\nstartdir: str\n    A string representing the absolute startdir directory of a package",
  "properties": {
    "builddate": {
      "minimum": 0,
      "title": "Builddate",
      "type": "integer"
    },
    "builddir": {
      "title": "Builddir",
      "type": "string"
    },
    "buildenv": {
      "items": {
        "pattern": "^(!|)[\\w\\-.]+$",
        "type": "string"
      },
      "title": "Buildenv",
      "type": "array"
    },
    "buildtool": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
      "title": "Buildtool",
      "type": "string"
    },
    "buildtoolver": {
      "title": "Buildtoolver",
      "type": "string"
    },
    "installed": {
      "items": {
        "pattern": "^([a-z\\d_@+]+[a-z\\d\\-._@+]*)-([1-9]+[0-9]*:|)([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*-[1-9]+[0-9]*(|[.]{1}[1-9]+[0-9]*)-(aarch64|any|arm|armv6h|armv7h|i486|i686|pentium4|riscv32|riscv64|x86_64|x86_64_v2|x86_64_v3|x86_64_v4)$",
        "type": "string"
      },
      "title": "Installed",
      "type": "array"
    },
    "options": {
      "anyOf": [
        {
          "items": {
            "pattern": "^(!|)[\\w\\-.]+$",
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Options"
    },
    "packager": {
      "pattern": "^[\\w\\s\\-().]+\\s<(.*)>$",
      "title": "Packager",
      "type": "string"
    },
    "pkgarch": {
      "pattern": "^(aarch64|any|arm|armv6h|armv7h|i486|i686|pentium4|riscv32|riscv64|x86_64|x86_64_v2|x86_64_v3|x86_64_v4)$",
      "title": "Pkgarch",
      "type": "string"
    },
    "pkgbase": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
      "title": "Pkgbase",
      "type": "string"
    },
    "pkgbuild_sha256sum": {
      "pattern": "^[a-f0-9]{64}$",
      "title": "Pkgbuild Sha256Sum",
      "type": "string"
    },
    "pkgname": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
      "title": "Pkgname",
      "type": "string"
    },
    "pkgver": {
      "pattern": "^([1-9]+[0-9]*:|)([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*-[1-9]+[0-9]*(|[.]{1}[1-9]+[0-9]*)$",
      "title": "Pkgver",
      "type": "string"
    },
    "schema_version": {
      "default": 2,
      "maximum": 2,
      "minimum": 2,
      "title": "Schema Version",
      "type": "integer"
    },
    "startdir": {
      "title": "Startdir",
      "type": "string"
    }
  },
  "required": [
    "startdir",
    "pkgver",
    "pkgname",
    "pkgbuild_sha256sum",
    "pkgbase",
    "pkgarch",
    "packager",
    "installed",
    "buildtoolver",
    "buildtool",
    "buildenv",
    "builddir",
    "builddate"
  ],
  "title": "BuildInfoV2",
  "type": "object"
}

.PKGINFO

The .PKGINFO files contained in packages describe their metadata.

Formats for the file are specified by makepkg. Its write_pkginfo() function implements only the latest version of the available formats.

PkgInfo

The entries in a .PKGINFO file are parsed and can subsequently be described by a JSON schema.

Below is a list of currently understood versions of the schema.

PkgInfoV1

{
  "description": "A PkgInfo version 1.\n\nAttributes\n----------\narch: str\n    A string representing a CPU architecture\nbackup: list[str] | None\n    An optional list of strings representing relative file paths\nbase: str\n    A string representing a pkgbase\nbuilddate: int\n    A number representing a build date (in seconds since the epoch)\ncheckdepends: list[str] | None\n    An optional list of strings representing package names a package requires for tests\nconflicts: list[str] | None\n    An optional list of strings representing package names a package conflicts with\ndepends: list[str] | None\n    An optional list of strings representing package names a package depends on\ndesc: str\n    A string that serves as description for a package\nfakeroot_version: str\n    A string representing a version of fakeroot\ngroups: list[str] | None\n    An optional list of strings representing group names a package belongs to\nisize: int\n    A number representing the installed sized of a package in bytes\npackager: str\n    A string describing the UID of a package's packager\nlicense: list[str]\n    A list of strings describing the license identifiers that apply to a package\nmakedepends: list[str] | None\n    An optional list of strings representing package names a package requires for building\nmakepkg_version: str\n    A string representing a version of makepkg\nname: str\n    A string representing the name of a package\noptdepends: list[str] | None\n    An optional list of strings representing package names a package requires optionally\nprovides: list[str] | None\n    An optional list of strings representing package names a package provides\nreplaces: list[str] | None\n    An optional list of strings representing package names a package replaces\nurl: str\n    A string representing the upstream URL of a package\nversion: str\n    A string representing the full version (optional epoch, version and pkgrel) of a package",
  "properties": {
    "arch": {
      "pattern": "^(aarch64|any|arm|armv6h|armv7h|i486|i686|pentium4|riscv32|riscv64|x86_64|x86_64_v2|x86_64_v3|x86_64_v4)$",
      "title": "Arch",
      "type": "string"
    },
    "backup": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Backup"
    },
    "base": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
      "title": "Base",
      "type": "string"
    },
    "builddate": {
      "minimum": 0,
      "title": "Builddate",
      "type": "integer"
    },
    "checkdepends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Checkdepends"
    },
    "conflicts": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Conflicts"
    },
    "depends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Depends"
    },
    "desc": {
      "title": "Desc",
      "type": "string"
    },
    "fakeroot_version": {
      "pattern": "^(([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*)$",
      "title": "Fakeroot Version",
      "type": "string"
    },
    "groups": {
      "anyOf": [
        {
          "items": {
            "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Groups"
    },
    "isize": {
      "minimum": 0,
      "title": "Isize",
      "type": "integer"
    },
    "license": {
      "items": {
        "type": "string"
      },
      "title": "License",
      "type": "array"
    },
    "makedepends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Makedepends"
    },
    "makepkg_version": {
      "pattern": "^(([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*)$",
      "title": "Makepkg Version",
      "type": "string"
    },
    "name": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
      "title": "Name",
      "type": "string"
    },
    "optdepends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Optdepends"
    },
    "packager": {
      "pattern": "^[\\w\\s\\-().]+\\s<(.*)>$",
      "title": "Packager",
      "type": "string"
    },
    "provides": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Provides"
    },
    "replaces": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Replaces"
    },
    "schema_version": {
      "default": 1,
      "maximum": 1,
      "minimum": 1,
      "title": "Schema Version",
      "type": "integer"
    },
    "url": {
      "format": "uri",
      "maxLength": 2083,
      "minLength": 1,
      "title": "Url",
      "type": "string"
    },
    "version": {
      "pattern": "^([1-9]+[0-9]*:|)([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*-[1-9]+[0-9]*(|[.]{1}[1-9]+[0-9]*)$",
      "title": "Version",
      "type": "string"
    }
  },
  "required": [
    "version",
    "url",
    "name",
    "makepkg_version",
    "license",
    "packager",
    "isize",
    "fakeroot_version",
    "desc",
    "builddate",
    "base",
    "arch"
  ],
  "title": "PkgInfoV1",
  "type": "object"
}

PkgInfoV2

In this version the optional xdata attribute has been introduced.

{
  "$defs": {
    "PkgType": {
      "description": "A package type.\n\nAttributes\n----------\npkgtype: PkgTypeEnum\n    A member of PkgTypeEnum representing a valid package type",
      "properties": {
        "pkgtype": {
          "$ref": "#/$defs/PkgTypeEnum"
        }
      },
      "required": [
        "pkgtype"
      ],
      "title": "PkgType",
      "type": "object"
    },
    "PkgTypeEnum": {
      "description": "An Enum to distinguish different package types.\n\nThe member values represents the name of a possible repod.files.pkginfo.PkgType value\n\nAttributes\n----------\nPKG: str\n    A default package\nDEBUG: str\n    A debug package\nSOURCE: str\n    A source package\nSPLIT: str\n    A split package",
      "enum": [
        "pkg",
        "debug",
        "src",
        "split"
      ],
      "title": "PkgTypeEnum",
      "type": "string"
    }
  },
  "description": "A PkgInfo version 2.\n\nAttributes\n----------\narch: str\n    A string representing a CPU architecture\nbackup: list[str] | None\n    An optional list of strings representing relative file paths\nbase: str\n    A string representing a pkgbase\nbuilddate: int\n    A number representing a build date (in seconds since the epoch)\ncheckdepends: list[str] | None\n    An optional list of strings representing package names a package requires for tests\nconflicts: list[str] | None\n    An optional list of strings representing package names a package conflicts with\ndepends: list[str] | None\n    An optional list of strings representing package names a package depends on\ndesc: str\n    A string that serves as description for a package\nfakeroot_version: str\n    A string representing a version of fakeroot\ngroups: list[str] | None\n    An optional list of strings representing group names a package belongs to\nisize: int\n    A number representing the installed sized of a package in bytes\npackager: str\n    A string describing the UID of a package's packager\nlicense: list[str]\n    A list of strings describing the license identifiers that apply to a package\nmakedepends: list[str] | None\n    An optional list of strings representing package names a package requires for building\nmakepkg_version: str\n    A string representing a version of makepkg\nname: str\n    A string representing the name of a package\noptdepends: list[str] | None\n    An optional list of strings representing package names a package requires optionally\nprovides: list[str] | None\n    An optional list of strings representing package names a package provides\nreplaces: list[str] | None\n    An optional list of strings representing package names a package replaces\nurl: str\n    A string representing the upstream URL of a package\nversion: str\n    A string representing the full version (optional epoch, version and pkgrel) of a package\nxdata: list[PkgType] | None\n    An optional list of extra data",
  "properties": {
    "arch": {
      "pattern": "^(aarch64|any|arm|armv6h|armv7h|i486|i686|pentium4|riscv32|riscv64|x86_64|x86_64_v2|x86_64_v3|x86_64_v4)$",
      "title": "Arch",
      "type": "string"
    },
    "backup": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Backup"
    },
    "base": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
      "title": "Base",
      "type": "string"
    },
    "builddate": {
      "minimum": 0,
      "title": "Builddate",
      "type": "integer"
    },
    "checkdepends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Checkdepends"
    },
    "conflicts": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Conflicts"
    },
    "depends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Depends"
    },
    "desc": {
      "title": "Desc",
      "type": "string"
    },
    "fakeroot_version": {
      "pattern": "^(([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*)$",
      "title": "Fakeroot Version",
      "type": "string"
    },
    "groups": {
      "anyOf": [
        {
          "items": {
            "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Groups"
    },
    "isize": {
      "minimum": 0,
      "title": "Isize",
      "type": "integer"
    },
    "license": {
      "items": {
        "type": "string"
      },
      "title": "License",
      "type": "array"
    },
    "makedepends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Makedepends"
    },
    "makepkg_version": {
      "pattern": "^(([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*)$",
      "title": "Makepkg Version",
      "type": "string"
    },
    "name": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
      "title": "Name",
      "type": "string"
    },
    "optdepends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Optdepends"
    },
    "packager": {
      "pattern": "^[\\w\\s\\-().]+\\s<(.*)>$",
      "title": "Packager",
      "type": "string"
    },
    "provides": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Provides"
    },
    "replaces": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Replaces"
    },
    "schema_version": {
      "default": 2,
      "maximum": 2,
      "minimum": 2,
      "title": "Schema Version",
      "type": "integer"
    },
    "url": {
      "format": "uri",
      "maxLength": 2083,
      "minLength": 1,
      "title": "Url",
      "type": "string"
    },
    "version": {
      "pattern": "^([1-9]+[0-9]*:|)([A-Za-z\\d]+)[_+.]?[A-Za-z\\d_+.]*-[1-9]+[0-9]*(|[.]{1}[1-9]+[0-9]*)$",
      "title": "Version",
      "type": "string"
    },
    "xdata": {
      "default": [],
      "items": {
        "$ref": "#/$defs/PkgType"
      },
      "title": "Xdata",
      "type": "array"
    }
  },
  "required": [
    "version",
    "url",
    "name",
    "makepkg_version",
    "license",
    "packager",
    "isize",
    "fakeroot_version",
    "desc",
    "builddate",
    "base",
    "arch"
  ],
  "title": "PkgInfoV2",
  "type": "object"
}