BUILDINFOV1(5)
π BUILDINFO(5) β the build-info glow-up π
okay so this is BUILDINFO, and it lives in section 5 of the File Formats Manual. bestie, it's the receipts file for how a package got built. let's get into it π«Ά
β¨ NAME β¨
BUILDINFO β literally all the tea about package build environments, for ALPM based packages (version 1). π
πΈ DESCRIPTION πΈ
The BUILDINFO format is a textual format β yes, plain text, we love a readable icon β that describes a package's build environment. These files sit at the root of ALPM packages, they're named .BUILDINFO, and they're usually used to reproduce the environment in which a package has been built. For further information refer to Arch Linux's reproducible builds effort[1].
The BUILDINFO format exists in multiple versions. This document describes version 1, which is a legacy version and was introduced with the release of pacman 5.1.0 on 2018-05-28. For the latest specification, refer to BUILDINFO.
heads up bestie: version 1 is the legacy one π if you want the current spec, go read plain BUILDINFO instead.
π General Format π
A BUILDINFO file consists of a series of lines, each providing information on an aspect of the build environment of a package, or the file format itself. Leading whitespace is always ignored. (slay, whitespace tolerance)
Unless noted otherwise, the information contained in a BUILDINFO file is considered to be covered by the set of the 95 printable ASCII characters.
π¦ 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.
By default, exactly one keyword assignment must be present per keyword in a BUILDINFO. As exception to this rule, the keywords buildenv, options and installed may be provided zero or more times. (those three are the β¨ repeat offenders β¨)
format
The BUILDINFO file format version. Should be the first keyword in the BUILDINFO file. The value must be a plain positive integer. This must be 1 for BUILDINFO version 1.
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).
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, i'm begging π
pkgarch
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).
pkgbuild_sha256sum
The hex representation of the SHA-256 checksum of the PKGBUILD used to build the package. The value must be covered by the set of hexadecimal characters and must be 64 characters long (e.g. 946d8362de3cebe3c86765cb36671a1dfd70993ac73e12892ac7ac5e6ff7ef95). count them if you want, there are exactly 64, no cap π₯
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].
builddate
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. 1729181726).
builddir
The absolute directory path in which the package has been built by the build tool (e.g. makepkg). The value is a UTF-8-encoded string and must represent a valid absolute directory (e.g. /builddir).
buildenv
A build environment used by the package build tool (i.e. makepkg, defined in BUILDENV of makepkg.conf) when building the package. This keyword may be assigned zero or more times. The value must be a unique word, optionally prefixed by a single !, which indicates the negation of the environment (e.g. color or !color).
options
An option used by the package build tool (i.e. makepkg, defined in OPTIONS of makepkg.conf) when building the package. This keyword may be assigned zero or more times. The value must be a unique word, optionally prefixed by a single !, which indicates the negation of the option (e.g. debug or !debug).
installed
The information about an installed package during build time of the package. This keyword may be assigned zero or more times. The value represents a composite string, composed of an alpm-package-name, directly followed by a - sign, directly followed by an alpm-package-version (in full or in full in epoch form), directly followed by a - sign, followed by an alpm-architecture (e.g. example-1:1.0.0-1-x86_64). it's giving stacked. it's giving hyphenated. we love her π
π EXAMPLES π
look at this gorgeous little file, i'm obsessed:
format = 1
pkgname = example
pkgbase = example
pkgver = 1:1.0.0-1
pkgarch = any
pkgbuild_sha256sum = b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c
packager = John Doe <john@example.org>
builddate = 1729181726
builddir = /build
buildenv = !color
buildenv = check
options = !strip
options = staticlibs
installed = other-package-1:0.5.0-3-any
installed = package2-2.1.0-6-x86_64
π§ SEE ALSO π§
alpm-buildinfo(1)PKGBUILD(5)makepkg.conf(5)alpm-architecture(7)alpm-package-name(7)alpm-package-version(7)alpm-pkgver(7)makepkg(8)pacman(8)
go read them, i'll wait π
π NOTES π
- Arch Linux's Reproducible Builds effort
https://wiki.archlinux.org/title/Reproducible_builds
- OpenPGP User ID
https://openpgp.dev/book/certificates.html#user-ids
https://www.rfc-editor.org/rfc/rfc2822
and that's the whole page, bestie π this was section 5 of the File Formats Manual β iykyk β go build something reproducible, periodt. βππ
π¦ where this page comes from
- arch rolling: alpm-buildinfo 0.6.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