Management Repository

A management repository is a version control repository, that contains machine readable descriptor files (i.e. JSON) which track the state of Sync Database files and thus also of the Binary Repository they describe.

Packages are gathered by pkgbase (see PKGBUILD) and the directory structure follows a layout of <CPU architecture>/<repository>/<pkgbase>, as the same repositories may exist for several architectures.

.
└── x86_64
    ├── core
    │   └── pkgbase_a.json
    ├── core-debug
    └── extra
        └── pkgbase_b.json
    ├── extra-debug
    ├── staging
    ├── testing
    ├── community
    ├── community-debug
    ├── community-staging
    ├── community-testing
    ├── gnome-unstable
    ├── kde-unstable
    ├── multilib
    ├── multilib-debug
    ├── multilib-staging
    └── multilib-testing

JSON Schema

The JSON files contained in a Management Repository can be validated using JSON schema.

The schema is derived from pydantic models, that allow to describe various input files related to a Sync Database.

Files

This is the schema of files that belongs to an OutputPackage.

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

FilesV1

Note

This schema represents the definition of Files v1.

{
  "description": "A pydantic model to describe files in the context of 'files' files in a repository sync database (version 1).\n\nAttributes\n----------\nfiles: list[str] | None\n    An optional list of files. This is the data below a %FILES% identifier in a 'files' file, which identifies which\n    file(s) belong to a package",
  "properties": {
    "files": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Files"
    },
    "schema_version": {
      "default": 1,
      "maximum": 1,
      "minimum": 1,
      "title": "Schema Version",
      "type": "integer"
    }
  },
  "title": "FilesV1",
  "type": "object"
}

OutputBuildInfo

This is the schema for an optional subset of an OutputPackageBase representation in the Management Repository. It is a subset of the BuildInfo data, which is retrieved from parsing the contents of a package.

Note

This data is not persisted in a Sync Database and can only be retrieved per Package from a package file!

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

OutputBuildV1

Note

This schema is directly related to that of BuildInfoV1!

{
  "description": "OutputBuildInfo version 1.\n\nAttributes which are already covered by OutputPackageBase are ommitted.\nInstances of this class relate to OutputBuildInfo the same way as BuildinfoV1 relates to BuildInfo.\n\nAttributes\n----------\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\npkgbuild_sha256sum: str\n    A string representing a SHA-256 checksum for a PKGBUILD of a package\nschema_version: int\n    An integer describing a BuildInfo format version",
  "properties": {
    "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"
    },
    "pkgbuild_sha256sum": {
      "pattern": "^[a-f0-9]{64}$",
      "title": "Pkgbuild Sha256Sum",
      "type": "string"
    },
    "schema_version": {
      "default": 1,
      "maximum": 1,
      "minimum": 1,
      "title": "Schema Version",
      "type": "integer"
    }
  },
  "required": [
    "pkgbuild_sha256sum",
    "installed",
    "buildenv",
    "builddir"
  ],
  "title": "OutputBuildInfoV1",
  "type": "object"
}

OutputBuildV2

Note

This schema is directly related to that of BuildInfoV2!

{
  "description": "OutputBuildInfo version 2.\n\nAttributes which are already covered by OutputPackageBase are ommitted.\nInstances of this class relate to OutputBuildInfo the same way as BuildinfoV2 relates to BuildInfo.\n\nAttributes\n----------\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\npkgbuild_sha256sum: str\n    A string representing a SHA-256 checksum for a PKGBUILD of a package\nschema_version: int\n    An integer describing a BuildInfo format version\nstartdir: str\n    A string representing the absolute startdir directory of a package",
  "properties": {
    "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"
    },
    "pkgbuild_sha256sum": {
      "pattern": "^[a-f0-9]{64}$",
      "title": "Pkgbuild Sha256Sum",
      "type": "string"
    },
    "schema_version": {
      "default": 2,
      "maximum": 2,
      "minimum": 2,
      "title": "Schema Version",
      "type": "integer"
    },
    "startdir": {
      "title": "Startdir",
      "type": "string"
    }
  },
  "required": [
    "startdir",
    "pkgbuild_sha256sum",
    "installed",
    "buildtoolver",
    "buildtool",
    "buildenv",
    "builddir"
  ],
  "title": "OutputBuildInfoV2",
  "type": "object"
}

OutputPackageBase

This is the schema for a pkgbase file in the Management Repository.

Note

In a split package scenario, the sum of information gathered from all packages, that belong to a given pkgbase comprise an OutputPackageBase.

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

OutputPackageBaseV1

{
  "$defs": {
    "OutputBuildInfo": {
      "description": "A class tracking BuildInfo information of packages that are added to instances of OutputPackageBase.\n\nThis class is a base template class and should not be used directly.\nInstead, instantiate one of its versioned child classes using the `from_buildinfo()` classmethod.",
      "properties": {},
      "title": "OutputBuildInfo",
      "type": "object"
    },
    "OutputPackage": {
      "description": "A template class to describe all required attributes that define a package in the context of an output file.\n\nThis class should not be instantiated directly. Use one of its subclasses instead!",
      "properties": {},
      "title": "OutputPackage",
      "type": "object"
    }
  },
  "description": "A model for an output file format, that describes a list of packages based upon a pkgbase (version 1).\n\nAttributes\n----------\nbase: str\n    The attribute can be used to describe the (required) data below a %BASE% identifier in a 'desc' file, which\n    identifies a package's pkgbase\nbuildinfo: OutputBuildInfo | None\n    An optional OutputBuildInfo, which describes the build circumstances of the OutputPackageBase. The data is not\n    covered in a repository sync database and therefore optional.\nmakedepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %MAKEDEPENDS% identifier in a 'desc' file,\n    which identifies a package's makedepends\npackager: str\n    The attribute can be used to describe the (required) data below a %PACKAGER% identifier in a 'desc' file, which\n    identifies a package's packager\npackages: list[OutputPackage]\n    A list of OutputPackage instances that belong to the pkgbase identified by base\nschema_version: PositiveInt\n    A positive integer - 1 - identifying the schema version of the object\nsource_url: HttpUrl | None\n    An optional url that points at sources (defaults to None)\nversion: str\n    The attribute can be used to describe the (required) data below a %VERSION% identifier in a 'desc' file, which\n    identifies a package's version (this is the accumulation of epoch, pkgver and pkgrel)",
  "properties": {
    "base": {
      "pattern": "^[a-z\\d_@+]+[a-z\\d\\-._@+]*$",
      "title": "Base",
      "type": "string"
    },
    "buildinfo": {
      "anyOf": [
        {
          "$ref": "#/$defs/OutputBuildInfo"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "makedepends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Makedepends"
    },
    "packager": {
      "pattern": "^[\\w\\s\\-().]+\\s<(.*)>$",
      "title": "Packager",
      "type": "string"
    },
    "packages": {
      "items": {
        "$ref": "#/$defs/OutputPackage"
      },
      "title": "Packages",
      "type": "array"
    },
    "schema_version": {
      "default": 1,
      "maximum": 1,
      "minimum": 1,
      "title": "Schema Version",
      "type": "integer"
    },
    "source_url": {
      "anyOf": [
        {
          "format": "uri",
          "maxLength": 2083,
          "minLength": 1,
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Source Url"
    },
    "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",
    "packager",
    "base",
    "packages"
  ],
  "title": "OutputPackageBaseV1",
  "type": "object"
}

OutputPackage

This is the schema of a package that belongs to an OutputPackageBase. It describes all properties that are unique to the specific package and that are not also covered by the pkgbase.

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

OutputPackageV1

{
  "$defs": {
    "Files": {
      "description": "A template class to describe files in the context of 'files' files in a repository sync database.\n\nThis class should not be instantiated directly, as it only provides generic instance methods for its subclasses.\n\nNOTE: The `from_dict()` classmethod is used to create one of the versioned subclasses.",
      "properties": {},
      "title": "Files",
      "type": "object"
    }
  },
  "description": "A model describing all required attributes that define a package in the context of an output file (version 1).\n\nAttributes\n----------\narch: str\n    The attribute can be used to describe the (required) data below an %ARCH% identifier in a 'desc' file, which\n    identifies a package's architecture\nbackup: list[str] | None\n    The attribute can be used to describe the (optional) data below a %BACKUP% identifier in a 'desc' file, which\n    identifies which file(s) of a package pacman will create backups for\nbuilddate: int\n    The attribute can be used to describe the (required) data below a %BUILDDATE% identifier in a 'desc' file,\n    which identifies a package's build date (represented in seconds since the epoch)\ncheckdepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %CHECKDEPENDS% identifier in a 'desc' file,\n    which identifies a package's checkdepends\nconflicts: list[str] | None\n    The attribute can be used to describe the (optional) data below a %CONFLICTS% identifier in a 'desc' file, which\n    identifies what other package(s) a package conflicts with\ncsize: int\n    The attribute can be used to describe the (required) data below a %CSIZE% identifier in a 'desc' file, which\n    identifies a package's size\ndepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %DEPENDS% identifier in a 'desc' file, which\n    identifies what other package(s) a package depends on\ndesc: str\n    The attribute can be used to describe the (required) data below a %DESC% identifier in a 'desc' file, which\n    identifies a package's description\nfilename: str\n    The attribute can be used to describe the (required) data below a %FILENAME% identifier in a 'desc' file, which\n    identifies a package's file name\nfiles: list[str] | None\n    The attribute can be used to describe the (optional) data below a %FILES% identifier in a 'files' file, which\n    identifies which file(s) belong to a package\ngroups: list[str] | None\n    The attribute can be used to describe the (optional) data below a %GROUPS% identifier in a 'desc' file, which\n    identifies a package's groups\nisize: int\n    The attribute can be used to describe the (required) data below an %ISIZE% identifier in a 'desc' file, which\n    identifies a package's installed size\nlicense: list[str]\n    The attribute can be used to describe the (required) data below a %LICENSE% identifier in a 'desc' file, which\n    identifies a package's license(s)\nmd5sum: str\n    The attribute can be used to describe the (required) data below an %MD5SUM% identifier in a 'desc' file, which\n    identifies a package's md5 checksum\nname: str\n    The attribute can be used to describe the (required) data below a %NAME% identifier in a 'desc' file, which\n    identifies a package's name\noptdepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %OPTDEPENDS% identifier in a 'desc' file,\n    which identifies what other package(s) a package optionally depends on\npgpsig: str | None\n    The attribute can be used to describe the (required) data below a %PGPSIG% identifier in a 'desc' file, which\n    identifies a package's PGP signature\nprovides: list[str] | None\n    The attribute can be used to describe the (optional) data below a %PROVIDES% identifier in a 'desc' file, which\n    identifies what other package(s) a package provides\nreplaces: list[str] | None\n    The attribute can be used to describe the (optional) data below a %REPLACES% identifier in a 'desc' file, which\n    identifies what other package(s) a package replaces\nschema_version: PositiveInt\n    A positive integer - 1 - identifying the schema version of the object\nsha256sum: str\n    The attribute can be used to describe the (required) data below an %SHA256SUM% identifier in a 'desc' file,\n    which identifies a package's sha256 checksum\nurl: str\n    The attribute can be used to describe the (required) data below a %URL% identifier in a 'desc' file, which\n    identifies a package's URL",
  "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"
    },
    "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"
    },
    "csize": {
      "minimum": 0,
      "title": "Csize",
      "type": "integer"
    },
    "depends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Depends"
    },
    "desc": {
      "title": "Desc",
      "type": "string"
    },
    "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"
    },
    "files": {
      "anyOf": [
        {
          "$ref": "#/$defs/Files"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "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"
    },
    "md5sum": {
      "pattern": "^[a-f0-9]{32}$",
      "title": "Md5Sum",
      "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"
    },
    "pgpsig": {
      "anyOf": [
        {
          "pattern": "^[0-9A-Za-z/+]+={0,2}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Pgpsig"
    },
    "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"
    },
    "sha256sum": {
      "pattern": "^[a-f0-9]{64}$",
      "title": "Sha256Sum",
      "type": "string"
    },
    "url": {
      "format": "uri",
      "maxLength": 2083,
      "minLength": 1,
      "title": "Url",
      "type": "string"
    }
  },
  "required": [
    "url",
    "sha256sum",
    "name",
    "md5sum",
    "license",
    "isize",
    "filename",
    "desc",
    "csize",
    "builddate",
    "arch"
  ],
  "title": "OutputPackageV1",
  "type": "object"
}

OutputPackageV2

This version removes the md5sum field as the hash algorithm is unsafe and renders the pgpsig field optional to lower the size of the created Sync Database files.

{
  "$defs": {
    "Files": {
      "description": "A template class to describe files in the context of 'files' files in a repository sync database.\n\nThis class should not be instantiated directly, as it only provides generic instance methods for its subclasses.\n\nNOTE: The `from_dict()` classmethod is used to create one of the versioned subclasses.",
      "properties": {},
      "title": "Files",
      "type": "object"
    }
  },
  "description": "A model describing all required attributes that define a package in the context of an output file (version 2).\n\nAttributes\n----------\narch: str\n    The attribute can be used to describe the (required) data below an %ARCH% identifier in a 'desc' file, which\n    identifies a package's architecture\nbackup: list[str] | None\n    The attribute can be used to describe the (optional) data below a %BACKUP% identifier in a 'desc' file, which\n    identifies which file(s) of a package pacman will create backups for\nbuilddate: int\n    The attribute can be used to describe the (required) data below a %BUILDDATE% identifier in a 'desc' file,\n    which identifies a package's build date (represented in seconds since the epoch)\ncheckdepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %CHECKDEPENDS% identifier in a 'desc' file,\n    which identifies a package's checkdepends\nconflicts: list[str] | None\n    The attribute can be used to describe the (optional) data below a %CONFLICTS% identifier in a 'desc' file, which\n    identifies what other package(s) a package conflicts with\ncsize: int\n    The attribute can be used to describe the (required) data below a %CSIZE% identifier in a 'desc' file, which\n    identifies a package's size\ndepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %DEPENDS% identifier in a 'desc' file, which\n    identifies what other package(s) a package depends on\ndesc: str\n    The attribute can be used to describe the (required) data below a %DESC% identifier in a 'desc' file, which\n    identifies a package's description\nfilename: str\n    The attribute can be used to describe the (required) data below a %FILENAME% identifier in a 'desc' file, which\n    identifies a package's file name\nfiles: list[str] | None\n    The attribute can be used to describe the (optional) data below a %FILES% identifier in a 'files' file, which\n    identifies which file(s) belong to a package\ngroups: list[str] | None\n    The attribute can be used to describe the (optional) data below a %GROUPS% identifier in a 'desc' file, which\n    identifies a package's groups\nisize: int\n    The attribute can be used to describe the (required) data below an %ISIZE% identifier in a 'desc' file, which\n    identifies a package's installed size\nlicense: list[str]\n    The attribute can be used to describe the (required) data below a %LICENSE% identifier in a 'desc' file, which\n    identifies a package's license(s)\nmd5sum: str\n    The attribute can be used to describe the (required) data below an %MD5SUM% identifier in a 'desc' file, which\n    identifies a package's md5 checksum\nname: str\n    The attribute can be used to describe the (required) data below a %NAME% identifier in a 'desc' file, which\n    identifies a package's name\noptdepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %OPTDEPENDS% identifier in a 'desc' file,\n    which identifies what other package(s) a package optionally depends on\npgpsig: str | None\n    The attribute can be used to describe the (required) data below a %PGPSIG% identifier in a 'desc' file, which\n    identifies a package's PGP signature\nprovides: list[str] | None\n    The attribute can be used to describe the (optional) data below a %PROVIDES% identifier in a 'desc' file, which\n    identifies what other package(s) a package provides\nreplaces: list[str] | None\n    The attribute can be used to describe the (optional) data below a %REPLACES% identifier in a 'desc' file, which\n    identifies what other package(s) a package replaces\nschema_version: PositiveInt\n    A positive integer - 1 - identifying the schema version of the object\nsha256sum: str\n    The attribute can be used to describe the (required) data below an %SHA256SUM% identifier in a 'desc' file,\n    which identifies a package's sha256 checksum\nurl: str\n    The attribute can be used to describe the (required) data below a %URL% identifier in a 'desc' file, which\n    identifies a package's URL",
  "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"
    },
    "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"
    },
    "csize": {
      "minimum": 0,
      "title": "Csize",
      "type": "integer"
    },
    "depends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Depends"
    },
    "desc": {
      "title": "Desc",
      "type": "string"
    },
    "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"
    },
    "files": {
      "anyOf": [
        {
          "$ref": "#/$defs/Files"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "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"
    },
    "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"
    },
    "pgpsig": {
      "anyOf": [
        {
          "pattern": "^[0-9A-Za-z/+]+={0,2}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Pgpsig"
    },
    "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"
    },
    "sha256sum": {
      "pattern": "^[a-f0-9]{64}$",
      "title": "Sha256Sum",
      "type": "string"
    },
    "url": {
      "format": "uri",
      "maxLength": 2083,
      "minLength": 1,
      "title": "Url",
      "type": "string"
    }
  },
  "required": [
    "url",
    "sha256sum",
    "name",
    "license",
    "isize",
    "filename",
    "desc",
    "csize",
    "builddate",
    "arch"
  ],
  "title": "OutputPackageV2",
  "type": "object"
}

PackageDesc

This is the schema of package information found in a Desc file of a Sync Database.

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

PackageDescV1

Note

This schema represents the definition of Desc v1.

{
  "description": "A model describing all identifiers in a 'desc' file (version 1).\n\nAttributes\n----------\narch: str\n    The attribute can be used to describe the (required) data below an %ARCH% identifier in a 'desc' file, which\n    identifies a package's architecture\nbackup: list[str] | None\n    The attribute can be used to describe the (optional) data below a %BACKUP% identifier in a 'desc' file, which\n    identifies which file(s) of a package pacman will create backups for\nbase: str\n    The attribute can be used to describe the (required) data below a %BASE% identifier in a 'desc' file, which\n    identifies a package's pkgbase\nbuilddate: int\n    The attribute can be used to describe the (required) data below a %BUILDDATE% identifier in a 'desc' file,\n    which identifies a package's build date (represented in seconds since the epoch)\ncheckdepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %CHECKDEPENDS% identifier in a 'desc' file,\n    which identifies a package's checkdepends\nconflicts: list[str] | None\n    The attribute can be used to describe the (optional) data below a %CONFLICTS% identifier in a 'desc' file, which\n    identifies what other package(s) a package conflicts with\ncsize: int\n    The attribute can be used to describe the (required) data below a %CSIZE% identifier in a 'desc' file, which\n    identifies a package's size\ndepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %DEPENDS% identifier in a 'desc' file, which\n    identifies what other package(s) a package depends on\ndesc: str\n    The attribute can be used to describe the (required) data below a %DESC% identifier in a 'desc' file, which\n    identifies a package's description\nfilename: str\n    The attribute can be used to describe the (required) data below a %FILENAME% identifier in a 'desc' file, which\n    identifies a package's file name\ngroups: list[str] | None\n    The attribute can be used to describe the (optional) data below a %GROUPS% identifier in a 'desc' file, which\n    identifies a package's groups\nisize: int\n    The attribute can be used to describe the (required) data below an %ISIZE% identifier in a 'desc' file, which\n    identifies a package's installed size\nlicense: list[str]\n    The attribute can be used to describe the (required) data below a %LICENSE% identifier in a 'desc' file, which\n    identifies a package's license(s)\nmakedepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %MAKEDEPENDS% identifier in a 'desc' file,\n    which identifies a package's makedepends\nmd5sum: str\n    The attribute can be used to describe the (required) data below an %MD5SUM% identifier in a 'desc' file, which\n    identifies a package's md5 checksum\nname: str\n    The attribute can be used to describe the (required) data below a %NAME% identifier in a 'desc' file, which\n    identifies a package's name\noptdepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %OPTDEPENDS% identifier in a 'desc' file,\n    which identifies what other package(s) a package optionally depends on\npackager: str\n    The attribute can be used to describe the (required) data below a %PACKAGER% identifier in a 'desc' file, which\n    identifies a package's packager\npgpsig: str\n    The attribute can be used to describe the data below a %PGPSIG% identifier in a 'desc' file, which identifies a\n    package's PGP signature\nprovides: list[str] | None\n    The attribute can be used to describe the (optional) data below a %PROVIDES% identifier in a 'desc' file, which\n    identifies what other package(s) a package provides\nreplaces: list[str] | None\n    The attribute can be used to describe the (optional) data below a %REPLACES% identifier in a 'desc' file, which\n    identifies what other package(s) a package replaces\nschema_version: PositiveInt\n    A positive integer - 1 - identifying the schema version of the object\nsha256sum: str\n    The attribute can be used to describe the (required) data below an %SHA256SUM% identifier in a 'desc' file,\n    which identifies a package's sha256 checksum\nurl: str\n    The attribute can be used to describe the (required) data below a %URL% identifier in a 'desc' file, which\n    identifies a package's URL\nversion: str\n    The attribute can be used to describe the (required) data below a %VERSION% identifier in a 'desc' file, which\n    identifies a package's version (this is the accumulation of epoch, pkgver and pkgrel)",
  "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"
    },
    "csize": {
      "minimum": 0,
      "title": "Csize",
      "type": "integer"
    },
    "depends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Depends"
    },
    "desc": {
      "title": "Desc",
      "type": "string"
    },
    "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"
    },
    "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"
    },
    "md5sum": {
      "pattern": "^[a-f0-9]{32}$",
      "title": "Md5Sum",
      "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"
    },
    "pgpsig": {
      "anyOf": [
        {
          "pattern": "^[0-9A-Za-z/+]+={0,2}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Pgpsig"
    },
    "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"
    },
    "sha256sum": {
      "pattern": "^[a-f0-9]{64}$",
      "title": "Sha256Sum",
      "type": "string"
    },
    "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",
    "sha256sum",
    "packager",
    "name",
    "md5sum",
    "license",
    "isize",
    "filename",
    "desc",
    "csize",
    "builddate",
    "base",
    "arch"
  ],
  "title": "PackageDescV1",
  "type": "object"
}

PackageDescV2

This version removes the md5sum field as the hash algorithm is unsafe and renders the pgpsig field optional to lower the size of the created Sync Database files.

Note

This schema represents the definition of Desc v2.

{
  "description": "A model describing all identifiers in a 'desc' file (version 2).\n\nAttributes\n----------\narch: str\n    The attribute can be used to describe the (required) data below an %ARCH% identifier in a 'desc' file, which\n    identifies a package's architecture\nbackup: list[str] | None\n    The attribute can be used to describe the (optional) data below a %BACKUP% identifier in a 'desc' file, which\n    identifies which file(s) of a package pacman will create backups for\nbase: str\n    The attribute can be used to describe the (required) data below a %BASE% identifier in a 'desc' file, which\n    identifies a package's pkgbase\nbuilddate: int\n    The attribute can be used to describe the (required) data below a %BUILDDATE% identifier in a 'desc' file,\n    which identifies a package's build date (represented in seconds since the epoch)\ncheckdepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %CHECKDEPENDS% identifier in a 'desc' file,\n    which identifies a package's checkdepends\nconflicts: list[str] | None\n    The attribute can be used to describe the (optional) data below a %CONFLICTS% identifier in a 'desc' file, which\n    identifies what other package(s) a package conflicts with\ncsize: int\n    The attribute can be used to describe the (required) data below a %CSIZE% identifier in a 'desc' file, which\n    identifies a package's size\ndepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %DEPENDS% identifier in a 'desc' file, which\n    identifies what other package(s) a package depends on\ndesc: str\n    The attribute can be used to describe the (required) data below a %DESC% identifier in a 'desc' file, which\n    identifies a package's description\nfilename: str\n    The attribute can be used to describe the (required) data below a %FILENAME% identifier in a 'desc' file, which\n    identifies a package's file name\ngroups: list[str] | None\n    The attribute can be used to describe the (optional) data below a %GROUPS% identifier in a 'desc' file, which\n    identifies a package's groups\nisize: int\n    The attribute can be used to describe the (required) data below an %ISIZE% identifier in a 'desc' file, which\n    identifies a package's installed size\nlicense: list[str]\n    The attribute can be used to describe the (required) data below a %LICENSE% identifier in a 'desc' file, which\n    identifies a package's license(s)\nmakedepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %MAKEDEPENDS% identifier in a 'desc' file,\n    which identifies a package's makedepends\nname: str\n    The attribute can be used to describe the (required) data below a %NAME% identifier in a 'desc' file, which\n    identifies a package's name\noptdepends: list[str] | None\n    The attribute can be used to describe the (optional) data below a %OPTDEPENDS% identifier in a 'desc' file,\n    which identifies what other package(s) a package optionally depends on\npackager: str\n    The attribute can be used to describe the (required) data below a %PACKAGER% identifier in a 'desc' file, which\n    identifies a package's packager\npgpsig: str | None\n    The attribute can be used to describe the (optional) data below a %PGPSIG% identifier in a 'desc' file, which\n    identifies a package's PGP signature\nprovides: list[str] | None\n    The attribute can be used to describe the (optional) data below a %PROVIDES% identifier in a 'desc' file, which\n    identifies what other package(s) a package provides\nreplaces: list[str] | None\n    The attribute can be used to describe the (optional) data below a %REPLACES% identifier in a 'desc' file, which\n    identifies what other package(s) a package replaces\nschema_version: PositiveInt\n    A positive integer - 1 - identifying the schema version of the object\nsha256sum: str\n    The attribute can be used to describe the (required) data below an %SHA256SUM% identifier in a 'desc' file,\n    which identifies a package's sha256 checksum\nurl: str\n    The attribute can be used to describe the (required) data below a %URL% identifier in a 'desc' file, which\n    identifies a package's URL\nversion: str\n    The attribute can be used to describe the (required) data below a %VERSION% identifier in a 'desc' file, which\n    identifies a package's version (this is the accumulation of epoch, pkgver and pkgrel)",
  "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"
    },
    "csize": {
      "minimum": 0,
      "title": "Csize",
      "type": "integer"
    },
    "depends": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Depends"
    },
    "desc": {
      "title": "Desc",
      "type": "string"
    },
    "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"
    },
    "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"
    },
    "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"
    },
    "pgpsig": {
      "anyOf": [
        {
          "pattern": "^[0-9A-Za-z/+]+={0,2}$",
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Pgpsig"
    },
    "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"
    },
    "sha256sum": {
      "pattern": "^[a-f0-9]{64}$",
      "title": "Sha256Sum",
      "type": "string"
    },
    "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",
    "sha256sum",
    "packager",
    "name",
    "license",
    "isize",
    "filename",
    "desc",
    "csize",
    "builddate",
    "base",
    "arch"
  ],
  "title": "PackageDescV2",
  "type": "object"
}