PKGINFOV2(5)
π¦ PKGINFO(5) π¦
okay so this page lives in the File Formats Manual (section 5, if the number at the bottom of the page was confusing you β that's what it means, bestie π
) and it's all about PKGINFO, the info file for ALPM based packages, version 2.
β¨ NAME β¨
PKGINFO β Information on ALPM based packages (version 2). literally that's the whole vibe.
π DESCRIPTION π
The PKGINFO format is a textual format that describes package metadata. no cap, that's its whole job π«Ά
These files live at the root of ALPM packages and they're named .PKGINFO. Package managers use them e.g. to evaluate and present the context for a package within its ecosystem. Use-cases include the representation of common metadata and the relation to other packages. so yeah, it's giving "package resume" energy πβ¨
The PKGINFO format exists in multiple versions. The information in this document is for version 2, which is the current version and has been introduced with the release of pacman 6.1.0 on 2024-03-04. mark your calendars ποΈ
π General Format π
A PKGINFO file consists of a series of lines, each providing information on an aspect of a package. super straightforward.
Lines starting with a # sign are comments and are always ignored. Leading whitespace is always ignored too β she's flexible like that πββοΈ
Unless noted otherwise, the information contained in a PKGINFO file is considered to be covered by the set of the 95 printable ASCII characters[1]. (yes, the notes section at the bottom has the receipts π)
π¦ Changes since the last version π¦
The new keyword xdata has been added to track extra data for a package. new keyword just dropped π
π Keywords π
Each line encodes information that represents one keyword assignment. All keyword assignments consist of a key from the following list immediately followed by a whitespace, an = sign, another whitespace and a value. so like, key = value shaped, fr fr.
By default, exactly one keyword assignment must be present per keyword in a PKGINFO. As exception to this rule, the keywords license, replaces, group, conflict, provides, backup, depend, optdepend, makedepend and checkdepend may be provided zero or more times. As additional exception, the keyword xdata is provided one or more times. it's giving "the popular girls get to repeat themselves" π
π pkgname
The name of the package. The value is an alpm-package-name (e.g. example).
π pkgbase
The alpm-package-base of the package. The value is an alpm-package-base (e.g. example).
π xdata
The extra data associated with the package. This keyword must be assigned once to define a specific value, but may be provided several times after that to provide further extra data. The value is a UTF-8-encoded string, that represents another key-value pair, delimited by a = sign (e.g. key=value).
A PKGINFO must contain an xdata keyword assignment that defines a pkgtype assignment in its value (e.g. pkgtype=pkg). The valid pkgtype values are debug (for debug packages), pkg (for single packages), src (for source packages) and split (for split packages). pick your fighter β¨
Additional xdata keyword assignments may be provided following the general rules around formatting of its values.
π pkgver
The full version of the package. Note, that this is not to be confused with alpm-pkgver, which only represents a subset of this keyword! The value is an alpm-package-version, either in full or in full with epoch form (e.g. 1.0.0-1 or 1:1.0.0-1, respectively). don't mix them up bestie, they are not the same girl π
π pkgdesc
The description of the package. The value is a UTF-8 string, zero or more characters long (e.g. A project used for something).
Package descriptions must have no leading or trailing whitespaces, must contain no whitespace characters except space " " and no successive spaces. It is also suggested to be "short" and to not contain the package name (see pkgname). keep it cute and concise π
π url
The URL for the project of the package. The value is a valid URL or an empty string (e.g. https://example.org).
π builddate
The date at which the build of the package started. The value must be numeric and must represent the seconds since the Epoch, aka. 'Unix time' (e.g. 1729181726).
π packager
The User ID of the entity that built the package. The value is meant to be used for identity lookups and represents an OpenPGP User ID[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 RFC 2822[3]. put your name on it, you built this π
π size
The 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. 181849963). hardlinks don't get double-charged, we're not scamming anyone π«Ά
π arch
The architecture of the package (see alpm-architecture for further information). The value must be covered by the set of alphanumeric characters and _ (e.g. x86_64 or any).
π license
A license that applies for the package. This keyword may be assigned zero or more times. The value represents a license identifier, which is a string of non-zero length (e.g. GPL).
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. GPL-3.0-or-later or Apache-2.0 OR MIT). See SPDX License List[4] for further information. do it properly, it's free β¨
π replaces
Another virtual component or package, that the package replaces upon installation. This keyword may be assigned zero or more times. The value is an alpm-package-relation of type replacement (e.g. example or example=1.0.0).
π group
An arbitrary string, that denotes a distribution-wide group the package is in. Groups are made use of e.g. by package managers to group packages and allow to bulk install them, or by other software to display information on these related packages. This keyword may be assigned zero or more times.
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 pkgname format for the value instead, as package managers may use group to install an entire group of packages. bulk install era π₯
π conflict
Another virtual component or package, that the package conflicts with. This keyword may be assigned zero or more times. The value is an alpm-package-relation of type conflict (e.g. example or example=1.0.0). drama, but make it metadata π
π provides
Another virtual component or package, that the package provides. This keyword may be assigned zero or more times. The value is an alpm-package-relation of type provision (e.g. example or example=1.0.0). generous queen π
π backup
A relative file path of a file in the package, that denotes a file for the package manager to keep backups for in case it changes or is deleted during a package update action (see pacman .pacnew and .pacsave files). This keyword may be assigned zero or more times. The value must be a valid relative Unix file path (e.g. etc/package.conf). your configs are safe with me π
π depend
A run-time dependency of the package (virtual component or package). This keyword may be assigned zero or more times. The value is an alpm-package-relation of type run-time dependency (e.g. example or example=1.0.0).
π optdepend
An optional dependency of the package (virtual component or package). This keyword may be assigned zero or more times. The value is an alpm-package-relation of type optional dependency (e.g. example or example: this is a description). yes you can add a whole description after the colon, we love a bonus β¨
π makedepend
A build time dependency of the package (virtual component or package). This keyword may be assigned zero or more times. The value is an alpm-package-relation of type build dependency (e.g. example or example=1.0.0).
π checkdepend
A dependency for running tests of the package's upstream project. This keyword may be assigned zero or more times. The value is an alpm-package-relation of type test dependency (e.g. example or example=1.0.0). test your code bestie, it's the bare minimum π§
π₯ EXAMPLES π₯
here's a full example, copy-able and iconic:
pkgname = example
pkgbase = example
xdata = pkgtype=pkg
pkgver = 1:1.0.0-1
pkgdesc = A project that does something
url = https://example.org
builddate = 1729181726
packager = John Doe <john@example.org>
size = 181849963
arch = any
license = GPL-3.0-or-later
license = LGPL-3.0-or-later
replaces = other-package>0.9.0-3
group = package-group
group = other-package-group
conflict = conflicting-package<1.0.0
conflict = other-conflicting-package<1.0.0
provides = some-component
provides = some-other-component=1:1.0.0-1
backup = etc/example/config.toml
backup = etc/example/other-config.txt
depend = glibc
depend = gcc-libs
optdepend = python: for special-python-script.py
optdepend = ruby: for special-ruby-script.rb
makedepend = cmake
makedepend = python-sphinx
checkdepend = extra-test-tool
checkdepend = other-extra-test-tool
πΈ SEE ALSO πΈ
go read these next, bestie, iykyk:
alpm-pkginfo(1)PKGBUILD(5)makepkg.conf(5)alpm-architecture(7)alpm-comparison(7)alpm-package-name(7)alpm-package-relation(7)alpm-package-version(7)alpm-pkgver(7)makepkg(8)pacman(8)
π NOTES π
- printable ASCII characters
https://en.wikipedia.org/wiki/ASCII#Printable_characters
- OpenPGP User ID
https://openpgp.dev/book/certificates.html#user-ids
https://www.rfc-editor.org/rfc/rfc2822
- SPDX License List
ok that's the whole page π«Ά every flag-shaped thing, every keyword, every example β all still here, just with better vibes.
and that's a wrap! this was PKGINFO(5) from the File Formats Manual, and the page literally signs itself off with a lone (5) at the bottom β section 5 main character energy only π
β¨ bye bestie, go build something iconic π¦
π¦ where this page comes from
- arch rolling: alpm-pkginfo 0.7.0-1 Β· Apache-2.0 OR MIT AND CC-BY-SA-4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms