ALPM-DB-FILES(5)
π alpm-db-files(5) π
okay so this is the alpm-db-files(5) page from the File Formats Manual, and it's lowkey iconic because it explains the file format that lists files, directories and backup metadata inside an installed alpm-package. π
πΈ NAME πΈ
alpm-db-files β file format for listing files, directories and backup metadata contained in an installed alpm-package. π
π«Ά DESCRIPTION π«Ά
Picture this: the alpm-db-files format is a textual format that lists the directories and files contained in a single alpm-package. It also squirrels away the checksum for any file in a package that should be backed up in case it gets changed on the target system (see the backup keyword in PKGBUILD, PKGINFO and SRCINFO for the relevant functionality). β¨
Files like this are literally named files and live in alpm-db structures. Package management software (e.g. pacman) creates them from the contents of alpm-package files β and for the backup functionality, PKGINFO helps out. Package management software then uses them to list and query the paths of directories and files contained in a package file, and to track the state of files that should be backed up in case they are changed on the target system. π¦
okay but important: do not confusealpm-db-fileswithalpm-repo-files, which uses the same file name (files) but is used in the context of analpm-repo-db. iykyk β same name, different main character energy. π
β¨ General Format β¨
An alpm-db-files file is UTF-8 encoded and newline-delimited β that's the format vibe. π
The file may be empty, or contain one or two section headers with one or more section entries each. Empty lines are ignored. Comments are not supported. π
π Sections π
Each section header line contains the section name in all capital letters, surrounded by percent signs (e.g. %FILES%). Section names serve as key for each section-specific value. π
Each section allows for one or more section-specific values, following the section header line. π
Heads up: if a package tracks no files (e.g. alpm-meta-package), then none of the following sections are present, and the alpm-db-files file is empty. π«Ά
%FILES%
Every value in this section represents either a single file or directory path. The following formatting rules apply to the paths:
- Directories are always listed with a trailing slash (
/). πΈ - All paths are relative to the system root (i.e.,
/usr/bin/foois represented asusr/bin/foo). π§
%BACKUP%
Every value in this section is represented by a single file path, a tab and the MD-5(1) hash digest of the file as found in the alpm-package that the alpm-db-files file describes (e.g. etc/foo.conf d41d8cd98f00b204e9800998ecf8427e). π₯
All file paths must be relative to the system root (i.e., /usr/bin/foo is represented as usr/bin/foo). π
This section can only be present, if the%FILES%section is also present and each file path is expected to also be present as a value in the%FILES%section. π
π EXAMPLES π
The following is an example of an alpm-db-files file for a package named foo:
%FILES%
etc/
etc/foo.conf
usr/
usr/bin/
usr/bin/foo
usr/share/
usr/share/doc/
usr/share/doc/foo/
usr/share/doc/foo/README.md
%BACKUP%
etc/foo.conf d41d8cd98f00b204e9800998ecf8427e
The %FILES% section lists the files and directory paths that belong to the package, while the %BACKUP% section captures the MD-5 hash digest of a configuration file as found in the package file. π
π₯ SEE ALSO π₯
PKGBUILD(5), PKGINFO(5), SRCINFO(5), alpm-repo-files(5), alpm-db(7), alpm-meta-package(7), alpm-package(7), alpm-package-name(7), alpm-repo-db(7), pacman(8) π
π NOTES π
- MD-5
https://en.wikipedia.org/wiki/MD5
π cute sign-off: this is the alpm-db-files(5) page from the File Formats Manual; the footer is only (5), and there's no source/version or date listed, so that's the whole page, bestie β periodt. π«Άβ¨
π¦ where this page comes from
- arch rolling: alpm-db 0.3.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