|
| 1 | +# NAME |
| 2 | + |
| 3 | +alpm-files - File format for listing files and directories contained in an **alpm-package**. |
| 4 | + |
| 5 | +# DESCRIPTION |
| 6 | + |
| 7 | +The **alpm-files** format is a textual format that lists the directories and files contained in a single **alpm-package**. |
| 8 | + |
| 9 | +Such files are named **files** and are located in **alpm-repo-database** files as well as **libalpm** databases structures. |
| 10 | +They are created by package repository management software (such as **dbscripts** [1]). |
| 11 | +Package management software (e.g. **pacman**) uses them to list and query the paths of directories and files contained in a package file. |
| 12 | + |
| 13 | +## General Format |
| 14 | + |
| 15 | +An **alpm-files** file is a UTF-8 encoded, newline-delimited file. |
| 16 | +It contains a single section header and zero or more section entries. |
| 17 | +Empty lines are ignored. |
| 18 | +Comments are not supported. |
| 19 | + |
| 20 | +The first line must be the string literal `%FILES%`, which represents the section header. |
| 21 | + |
| 22 | +All subsequent lines are interpreted as section entries, one per line, sorted in lexical order. |
| 23 | +Each section entry represents either a single file or directory path. |
| 24 | +The following formatting rules apply to the paths: |
| 25 | + |
| 26 | +- Directories are always listed with a trailing slash (`/`). |
| 27 | +- All paths are relative to the system root (i.e., `/usr/bin/foo` is represented as `usr/bin/foo`). |
| 28 | + |
| 29 | +# EXAMPLES |
| 30 | + |
| 31 | +The following is an example of a **alpm-files** file for a package named `foo`: |
| 32 | + |
| 33 | +```text |
| 34 | +%FILES% |
| 35 | +usr/ |
| 36 | +usr/bin/ |
| 37 | +usr/bin/foo |
| 38 | +usr/share/ |
| 39 | +usr/share/bash-completion/ |
| 40 | +usr/share/bash-completion/completions/ |
| 41 | +usr/share/bash-completion/completions/foo |
| 42 | +usr/share/doc/ |
| 43 | +usr/share/doc/foo/ |
| 44 | +usr/share/doc/foo/README.md |
| 45 | +usr/share/fish/ |
| 46 | +usr/share/fish/vendor_completions.d/ |
| 47 | +usr/share/fish/vendor_completions.d/foo.fish |
| 48 | +usr/share/licenses/ |
| 49 | +usr/share/licenses/foo/ |
| 50 | +usr/share/licenses/foo/LICENSE-MIT |
| 51 | +usr/share/zsh/ |
| 52 | +usr/share/zsh/site-functions/ |
| 53 | +usr/share/zsh/site-functions/_foo |
| 54 | +``` |
| 55 | + |
| 56 | +The installed package will contain a binary (`usr/bin/foo`), a README file (`usr/share/doc/foo/README.md`), and a license file (`usr/share/licenses/foo/LICENSE-MIT`), among other files such as completion scripts for various shells. |
| 57 | + |
| 58 | +# SEE ALSO |
| 59 | + |
| 60 | +**libalpm**(3), **alpm-package**(7), **alpm-repo-database**(7), **pacman**(8) |
| 61 | + |
| 62 | +# NOTES |
| 63 | + |
| 64 | +1. **dbscripts** |
| 65 | + |
| 66 | + https://gitlab.archlinux.org/archlinux/dbscripts/ |
0 commit comments