ALPM-DB-FILES(5)

πŸ“¦ version 0.3.0, in arch rolling

πŸ’– 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 confuse alpm-db-files with alpm-repo-files, which uses the same file name (files) but is used in the context of an alpm-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/foo is represented as usr/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 πŸ’€

  1. 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