.TH "alpm-db-descv1" 5 .SH "NAME" .PP alpm\-db\-desc \- File format for the representation of metadata of ALPM based packages (version 1)\. .SH "DESCRIPTION" .PP The \fBalpm\-db\-desc\fP format is a textual format that represents the metadata of a single package\. Each file describes various properties of a package, including its name, version, dependencies, size, licensing information, and more\. For a full list of properties refer to \fBsections\fP\. .PP An operating system relying on \fBA\fPrch \fBL\fPinux \fBP\fPackage \fBM\fPanagement maintains a local \fBlibalpm\fP database with one \fBalpm\-db\-desc\fP file per package, each named \fIdesc\fP and located in a unique, per\-package directory\. .PP The accumulation of all \fBalpm\-db\-desc\fP files in a \fBlibalpm\fP database describe the current state of the system (i\.e\. which packages have been installed when, under what circumstances)\. More specifically, package management software such as \fBpacman\fP and related tools use this file format e\.g\. to resolve dependencies and to display package information\. .PP The data in an \fBalpm\-db\-desc\fP file is derived from an \fBalpm\-package\fP\. Here, most of the metadata originates from the package's \fBPKGINFO\fP data\. .PP The \fBalpm\-db\-desc\fP file format must not be confused with the \fBalpm\-repo\-desc\fP file format, which is used in the context of an \fBalpm\-repo\-database\fP and carries a different set of metadata, but is usually also named \fIdesc\fP\. .PP The \fBalpm\-db\-desc\fP format exists in multiple versions\. This document describes version 1, which is a legacy version and has been available since the release of \fBpacman\fP 5\.1\.0 on 2018\-05\-28\. For the latest specification, refer to \fBalpm\-db\-desc\fP\. .SS "General Format" .PP An \fBalpm\-db\-desc\fP file is a UTF\-8 encoded, newline\-delimited file consisting of a series of \fBsections\fP\. .PP Each section starts with a unique \fIsection header line\fP\. The section header line is followed by one or more lines with a \fIsection\-specific value\fP each\. All \fIsection\-specific values\fP must consist of \fBprintable ASCII characters\fP[1] unless stated otherwise\. A section ends when another section header line is encountered or the end of the file is reached\. .PP Empty lines between sections are ignored\. .SS "Sections" .PP Each \fIsection header line\fP contains the \fIsection name\fP in all capital letters, surrounded by percent signs (e\.g\. `\f[CR]%NAME%\fP`)\. \fISection names\fP serve as key for each \fIsection\-specific value\fP\. .PP Each section allows for a single \fIsection\-specific value\fP, following the \fIsection header line\fP\. As exemption to this rule the `\f[CR]%LICENSE%\fP`, `\f[CR]%GROUPS%\fP`, `\f[CR]%DEPENDS%\fP`, `\f[CR]%OPTDEPENDS%\fP`, `\f[CR]%REPLACES%\fP`, `\f[CR]%CONFLICTS%\fP` and `\f[CR]%PROVIDES%\fP` sections may have more than one \fIsection\-specific value\fP\. .SB "%NAME%" .PP An \fBalpm\-package\-name\fP, which represents the name of a package (e\.g\. `\f[CR]example\fP`)\. .SB "%VERSION%" .PP An \fBalpm\-package\-version\fP (\fIfull\fP or \fIfull with epoch\fP) which represents the version of a package (e\.g\. `\f[CR]1\.0\-1\fP`)\. .SB "%BASE%" .PP An \fBalpm\-package\-base\fP which represents the package base from which a package originates\. If a package is not an \fBalpm\-split\-package\fP, the value is the same as that of the `\f[CR]%NAME%\fP` section\. If a package is an \fBalpm\-split\-package\fP, the value may be different from that in the `\f[CR]%NAME%\fP` section\. .SB "%DESC%" .PP The description of the package\. The value is a UTF\-8 string, zero or more characters long (e\.g\. `\f[CR]A project used for something\fP`)\. .SB "%URL%" .PP The URL for the project of the package\. The value is a valid URL or an empty string (e\.g\. `\f[CR]https://example\.org\fP`)\. .SB "%ARCH%" .PP The architecture of the package (see \fBalpm\-architecture\fP for further information)\. The value must be covered by the set of alphanumeric characters and '_' (e\.g\. `\f[CR]x86_64\fP` or `\f[CR]any\fP`)\. .SB "%BUILDDATE%" .PP The date at which the build of the package started\. The value must be numeric and represent the seconds since the Epoch, aka\. 'Unix time' (e\.g\. `\f[CR]1729181726\fP`)\. .SB "%INSTALLDATE%" .PP The date at which the package has been installed on the system\. The value must be numeric and represent the seconds since the Epoch, aka\. 'Unix time' (e\.g\. `\f[CR]1729181726\fP`)\. .SB "%PACKAGER%" .PP The User ID of the entity, that built the package\. The value is meant to be used for identity lookups and represents an \fBOpenPGP User ID\fP[2]\. As such, the value is a UTF\-8\-encoded string, that is conventionally composed of a name and an e\-mail address, which aligns with the format described in \fBRFC 2822\fP[3] (e\.g\. `\f[CR]John Doe \fP`)\. .SB "%SIZE%" .PP The optional size of the (uncompressed and unpacked) package contents in bytes\. The value is a non\-negative integer representing the absolute size of the contents of the package, with multiple hardlinked files counted only once (e\.g\. `\f[CR]181849963\fP`)\. If the package has no size (e\.g\. because it is an \fBalpm\-meta\-package\fP) the section is omitted\. .SB "%GROUPS%" .PP An \fBalpm\-package\-group\fP that denotes a distribution\-wide group the package is in\. Values may be present one or more times\. If the package is not in a group, the section is omitted\. .PP The value is represented by a UTF\-8 string\. Although it is possible to use a UTF\-8 string, it is highly recommended to rely on the \fBalpm\-package\-name\fP format for the value instead, as package managers may use a package group to install an entire group of packages\. .SB "%REASON%" .PP An optional value representing the reason why the package is installed\. The value must be a non\-negative integer: .RS .Bl .IP \(bu 4 `\f[CR]0\fP`: Explicitly installed .El .Bl .IP \(bu 4 `\f[CR]1\fP`: Installed as a dependency .El .RE .PP If the package is explicitly installed (value `\f[CR]0\fP`), the section is omitted\. .SB "%LICENSE%" .PP An optional set of license identifiers that apply for the package\. Values may be present one or more times\. If there is no license identifier, the section is omitted\. .PP Each value represents a license identifier, which is a string of non\-zero length (e\.g\. `\f[CR]GPL\fP`)\. Although no specific restrictions are enforced for the value aside from its length, it is highly recommended to rely on SPDX license expressions (e\.g\. `\f[CR]GPL\-3\.0\-or\-later\fP` or `\f[CR]Apache\-2\.0 OR MIT\fP`)\. See \fBSPDX License List\fP[4] for further information\. .SB "%VALIDATION%" .PP The validation method used during installation of the package ensuring its authenticity\. The value must be one of the following: .RS .Bl .IP \(bu 4 `\f[CR]none\fP`: The package integrity and authenticity is not validated\. .El .Bl .IP \(bu 4 `\f[CR]md5\fP`: The package is validated against an accompanying MD\-5 hash digest in an \fBalpm\-repo\-database\fP that belongs to the repository from which the package is installed\. .El .Bl .IP \(bu 4 `\f[CR]sha256\fP`: The package is validated against an accompanying SHA\-256 hash digest in the \fBalpm\-repo\-database\fP that belongs to the repository from which the package is installed\. .El .Bl .IP \(bu 4 `\f[CR]pgp\fP`: The package's authenticity and integrity is validated using a detached \fBOpenPGP signature\fP[5] and a system\-wide collection of \fBOpenPGP certificates\fP[6]\. .El .RE .SB "%REPLACES%" .PP Another \fIvirtual component\fP or \fIpackage\fP, that the package replaces upon installation\. Values may be present one or more times\. If the package does not replace anything, the section is omitted\. The value is an \fBalpm\-package\-relation\fP of type \fBreplacement\fP (e\.g\. `\f[CR]example\fP` or `\f[CR]example=1\.0\.0\fP`)\. .SB "%DEPENDS%" .PP A run\-time dependency of the package (\fIvirtual component\fP or \fIpackage\fP)\. Values may be present one or more times\. If the package has no run\-time dependency, the section is omitted\. The value is an \fBalpm\-package\-relation\fP of type \fBrun\-time dependency\fP (e\.g\. `\f[CR]example\fP` or `\f[CR]example=1\.0\.0\fP`)\. .SB "%OPTDEPENDS%" .PP An optional dependency of the package (`\f[CR]virtual component\fP` or `\f[CR]package\fP`)\. Values may be present one or more times\. If the package has no optional dependency, the section is omitted\. The value is an \fBalpm\-package\-relation\fP of type \fBoptional dependency\fP (e\.g\. `\f[CR]example\fP` or `\f[CR]example: this is a description\fP`)\. .SB "%CONFLICTS%" .PP Another \fIvirtual component\fP or \fIpackage\fP, that the package conflicts with\. Values may be present one or more times\. If the package does not conflict with anything, the section is omitted\. The value is an \fBalpm\-package\-relation\fP of type \fBconflict\fP (e\.g\. `\f[CR]example\fP` or `\f[CR]example=1\.0\.0\fP`)\. .SB "%PROVIDES%" .PP Another \fIvirtual component\fP or \fIpackage\fP, that the package provides\. Values may be present one or more times\. If the package does not provide anything, the section is omitted\. The value is an \fBalpm\-package\-relation\fP of type \fBprovision\fP (e\.g\. `\f[CR]example\fP` or `\f[CR]example=1\.0\.0\fP`)\. .SH "EXAMPLES" .PP An example \fBalpm\-db\-desc\fP file for a package named `\f[CR]example\fP` in version `\f[CR]1\.0\.0\-1\fP`: .RS .PP .nf %NAME% example %VERSION% 1\.0\.0\-1 %BASE% example %DESC% An example package %URL% https://example\.org %ARCH% x86_64 %BUILDDATE% 1733737242 %INSTALLDATE% 1733737243 %PACKAGER% Foobar McFooface %SIZE% 4 %LICENSE% MIT Apache\-2\.0 %VALIDATION% pgp %DEPENDS% gcc\-libs .fi .RE .SH "SEE ALSO" .PP \fBlibalpm\fP(3), \fBBUILDINFO\fP(5), \fBPKGBUILD\fP(5), \fBPKGINFO\fP(5), \fBalpm\-repo\-desc\fP(5), \fBalpm\-architecture\fP(7), \fBalpm\-package\fP(7), \fBalpm\-package\-file\-name\fP(7), \fBalpm\-package\-name\fP(7), \fBalpm\-package\-relation\fP(7), \fBalpm\-package\-version\fP(7), \fBalpm\-repo\-database\fP(7), \fBalpm\-split\-package\fP(7), \fBpacman\fP(8) .SH "NOTES" .RS .Bl .IP 1. 4 printable ASCII characters .sp https://en\.wikipedia\.org/wiki/ASCII#Printable_characters .El .Bl .IP 2. 4 OpenPGP User ID .sp https://openpgp\.dev/book/certificates\.html#user\-ids .El .Bl .IP 3. 4 RFC 2822 .sp https://www\.rfc\-editor\.org/rfc/rfc2822 .El .Bl .IP 4. 4 SPDX License List .sp https://spdx\.org/licenses/ .El .Bl .IP 5. 4 OpenPGP signature .sp https://openpgp\.dev/book/signing_data\.html#detached\-signatures .El .Bl .IP 6. 4 OpenPGP certificates .sp https://openpgp\.dev/book/certificates\.html .El .RE