added coding standard
[pacman-ng.git] / doc / pacman.conf.5.txt
bloba9c5db367d70f3d7cab51be4cf0dbae0a881a976
1 /////
2 vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
3 /////
4 pacman.conf(5)
5 ==============
7 Name
8 ----
9 pacman.conf - pacman package manager configuration file
12 Synopsis
13 --------
14 {sysconfdir}/pacman.conf
17 Description
18 -----------
19 Pacman, using linkman:libalpm[3], will attempt to read pacman.conf each time it
20 is invoked. This configuration file is divided into sections or repositories.
21 Each section defines a package repository that pacman can use when searching
22 for packages in '\--sync' mode. The exception to this is the options section,
23 which defines global options.
26 Example
27 -------
29 --------
31 # pacman.conf
33 [options]
34 NoUpgrade = etc/passwd etc/group etc/shadow
35 NoUpgrade = etc/fstab
37 [core]
38 Include = /etc/pacman.d/core
40 [custom]
41 Server = file:///home/pkgs
42 --------
44 NOTE: Each directive must be in CamelCase. If the case isn't respected, the
45 directive won't be recognized. For example. noupgrade or NOUPGRADE will not
46 work.
48 Options
49 -------
50 *RootDir =* path/to/root::
51         Set the default root directory for pacman to install to. This option is
52         used if you want to install a package on a temporary mounted partition
53         which is "owned" by another system, or for a chroot install.
54         *NOTE*: If database path or logfile are not specified on either the
55         command line or in linkman:pacman.conf[5], their default location will
56         be inside this root path.
58 *DBPath =* path/to/db/dir::
59         Overrides the default location of the toplevel database directory.  A
60         typical default is +{localstatedir}/lib/pacman/+. Most users will not need to set
61         this option. *NOTE*: if specified, this is an absolute path and the root
62         path is not automatically prepended.
64 *CacheDir =* path/to/cache/dir::
65         Overrides the default location of the package cache directory. A typical
66         default is +{localstatedir}/cache/pacman/pkg/+. Multiple cache directories can be
67         specified, and they are tried in the order they are listed in the config
68         file. If a file is not found in any cache directory, it will be downloaded
69         to the first cache directory with write access. *NOTE*: this is an absolute
70         path, the root path is not automatically prepended.
72 *GPGDir =* path/to/gpg/dir::
73         Overrides the default location of the directory containing configuration
74         files for GnuPG. A typical default is +{sysconfdir}/pacman.d/gnupg/+.
75         This directory should contain two files: `pubring.gpg` and `trustdb.gpg`.
76         `pubring.gpg` holds the public keys of all packagers. `trustdb.gpg`
77         contains a so-called trust database, which specifies that the keys are
78         authentic and trusted.
79         *NOTE*: this is an absolute path, the root path is not automatically
80         prepended.
82 *LogFile =* '/path/to/file'::
83         Overrides the default location of the pacman log file. A typical default
84         is +{localstatedir}/log/pacman.log+. This is an absolute path and the root directory
85         is not prepended.
87 *HoldPkg =* package ...::
88         If a user tries to '\--remove' a package that's listed in `HoldPkg`,
89         pacman will ask for confirmation before proceeding. Shell-style glob
90         patterns are allowed.
92 *IgnorePkg =* package ...::
93         Instructs pacman to ignore any upgrades for this package when performing
94         a '\--sysupgrade'. Shell-style glob patterns are allowed.
96 *IgnoreGroup =* group ...::
97         Instructs pacman to ignore any upgrades for all packages in this
98         group when performing a '\--sysupgrade'. Shell-style glob patterns are
99         allowed.
101 *Include =* path::
102         Include another config file. This file can include repositories or
103         general configuration options. Wildcards in the specified paths will get
104         expanded based on linkman:glob[7] rules.
106 *Architecture =* auto | i686 | x86_64 | ...::
107         If set, pacman will only allow installation of packages of the given
108         architecture (e.g. 'i686', 'x86_64', etc). The special value 'auto' will
109         use the system architecture, provided by in ``uname -m''.  If unset, no
110         architecture checks are made. *NOTE*: packages with the special
111         architecture 'any' can always be installed, as they are meant to be
112         architecture independent.
114 *XferCommand =* /path/to/command %u::
115         If set, an external program will be used to download all remote files.
116         All instances of `%u` will be replaced with the download URL. If present,
117         instances of `%o` will be replaced with the local filename, plus a
118         ``.part'' extension, which allows programs like wget to do file resumes
119         properly.
120         +
121         This option is useful for users who experience problems with built-in
122         http/ftp support, or need the more advanced proxy support that comes with
123         utilities like wget.
125 *NoUpgrade =* file ...::
126         All files listed with a `NoUpgrade` directive will never be touched during
127         a package install/upgrade, and the new files will be installed with a
128         '.pacnew' extension.
129         These files refer to files in the package archive, so do not include the
130         leading slash (the RootDir) when specifying them. Shell-style glob patterns
131         are allowed.
133 *NoExtract =* file ...::
134         All files listed with a `NoExtract` directive will never be extracted from
135         a package into the filesystem. This can be useful when you don't want part
136         of a package to be installed. For example, if your httpd root uses an
137         'index.php', then you would not want the 'index.html' file to be extracted
138         from the 'apache' package.
139         These files refer to files in the package archive, so do not include the
140         leading slash (the RootDir) when specifying them. Shell-style glob patterns
141         are allowed.
143 *CleanMethod =* KeepInstalled &| KeepCurrent::
144         If set to `KeepInstalled` (the default), the '-Sc' operation will clean
145         packages that are no longer installed (not present in the local database).
146         If set to `KeepCurrent`, '-Sc' will clean outdated packages (not present in
147         any sync database).
148         The second behavior is useful when the package cache is shared among
149         multiple machines, where the local databases are usually different, but the
150         sync databases in use could be the same. If both values are specified,
151         packages are only cleaned if not installed locally and not present in any
152         known sync database.
154 *SigLevel =* ...::
155         Set the default signature verification level. For more information, see
156         <<SC,Package and Database Signature Checking>> below.
158 *UseSyslog*::
159         Log action messages through syslog(). This will insert log entries into
160         +{localstatedir}/log/messages+ or equivalent.
162 *UseDelta* [= ratio]::
163         Download delta files instead of complete packages if possible. Requires
164         the `xdelta3` program to be installed. If a ratio is specified (e.g.,
165         `0.5`), then it is used as a cutoff for determining whether to use deltas.
166         Allowed values are between `0.0` and `2.0`; sensible values are between
167         `0.2` and `0.9`.  Using a value above `1.0` is not recommended.  The
168         default is `0.7` if left unspecified.
170 *TotalDownload*::
171         When downloading, display the amount downloaded, download rate, ETA,
172         and completed percentage of the entire download list rather
173         than the percent of each individual download target. The progress
174         bar is still based solely on the current file download.
176 *CheckSpace*::
177         Performs an approximate check for adequate available disk space before
178         installing packages.
180 *VerbosePkgLists*::
181         Displays name, version and size of target packages formatted
182         as a table for upgrade, sync and remove operations.
184 Repository Sections
185 -------------------
186 Each repository section defines a section name and at least one location where
187 the packages can be found. The section name is defined by the string within
188 square brackets (the two above are 'current'  and  'custom'). Locations are
189 defined with the 'Server' directive and follow a URL naming structure. If you
190 want to use a local directory, you can specify the full path with a ``file://''
191 prefix, as shown above.
193 A common way to define DB locations utilizes the 'Include' directive. For each
194 repository defined in the configuration file, a single 'Include' directive can
195 contain a file that lists the servers for that repository.
197 --------
198 [core]
199 # use this server first
200 Server = ftp://ftp.archlinux.org/$repo/os/$arch
201 # next use servers as defined in the mirrorlist below
202 Include = {sysconfdir}/pacman.d/mirrorlist
203 --------
205 The order of repositories in the configuration files matters; repositories
206 listed first will take precedence over those listed later in the file when
207 packages in two repositories have identical names, regardless of version
208 number.
210 *Include =* path::
211         Include another config file. This file can include repositories or
212         general configuration options. Wildcards in the specified paths will get
213         expanded based on linkman:glob[7] rules.
215 *Server =* url::
216         A full URL to a location where the database, packages, and signatures (if
217         available) for this repository can be found.
219 During parsing, pacman will define the `$repo` variable to the name of the
220 current section. This is often utilized in files specified using the 'Include'
221 directive so all repositories can use the same mirrorfile. pacman also defines
222 the `$arch` variable to the value of `Architecture`, so the same mirrorfile can
223 even be used for different architectures.
225 *SigLevel =* ...::
226         Set the signature verification level for this repository. For more
227         information, see <<SC,Package and Database Signature Checking>> below.
229 Package and Database Signature Checking
230 ---------------------------------------
231 The 'SigLevel' directive is valid in both the `[options]` and repository
232 sections. If used in `[options]`, it sets a default value for any repository
233 that does not provide the setting.
235 * If set to *Never*, no signature checking will take place.
236 * If set to *Optional* , signatures will be checked when present, but unsigned
237   databases and packages will also be accepted.
238 * If set to *Required*, signatures will be required on all packages and
239   databases.
241 Alternatively, you can get more fine-grained control by combining some of
242 the options and prefixes described below. All options in a config file are
243 processed in top-to-bottom, left-to-right fashion, where later options override
244 and/or supplement earlier ones. If 'SigLevel' is specified in a repository
245 section, the starting value is that from the `[options]` section, or the
246 built-in system default as shown below if not specified.
248 The options are split into two main groups, described below. Terms used such as
249 ``marginally trusted'' are terms used by GnuPG, for more information please
250 consult linkman:gpg[1].
252 When to Check::
253         These options control if and when signature checks should take place.
255         *Never*;;
256                 All signature checking is suppressed, even if signatures are present.
258         *Optional* (default);;
259                 Signatures are checked if present; absence of a signature is not an
260                 error. An invalid signature is a fatal error, as is a signature from a
261                 key not in the keyring.
263         *Required*;;
264                 Signatures are required; absence of a signature or an invalid signature
265                 is a fatal error, as is a signature from a key not in the keyring.
267 What is Allowed::
268         These options control what signatures are viewed as permissible. Note that
269         neither of these options allows acceptance of invalid or expired
270         signatures, or those from revoked keys.
272         *TrustedOnly* (default);;
273                 If a signature is checked, it must be in the keyring and fully trusted;
274                 marginal trust does not meet this criteria.
276         *TrustAll*;;
277                 If a signature is checked, it must be in the keyring, but is not
278                 required to be assigned a trust level (e.g., unknown or marginal
279                 trust).
281 Options in both groups can additionally be prefixed with either *Package* or
282 *Database*, which will cause it to only take effect on the specified object
283 type. For example, `PackageTrustAll` would allow marginal and unknown trust
284 level signatures for packages.
286 The built-in default is the following:
288 --------
289 SigLevel = Optional TrustedOnly
290 --------
292 Using Your Own Repository
293 -------------------------
294 If you have numerous custom packages of your own, it is often easier to generate
295 your own custom local repository than install them all with the '\--upgrade'
296 option. All you need to do is generate a compressed package database in the
297 directory with these packages so pacman can find it when run with '\--refresh'.
299         repo-add /home/pkgs/custom.db.tar.gz /home/pkgs/*.pkg.tar.gz
301 The above command will generate a compressed database named
302 '/home/pkgs/custom.db.tar.gz'. Note that the database must be of the form
303 '\{treename\}.db.tar.{ext}', where '\{treename\}' is the name of the section
304 defined in the configuration file and '\{ext\}' is a valid compression type as
305 documented in linkman:repo-add[8]. That's it! Now configure your custom section
306 in the configuration file as shown in the config example above. Pacman will now
307 use your package repository. If you add new packages to the repository,
308 remember to re-generate the database and use pacman's '\--refresh' option.
310 For more information on the repo-add command, see ``repo-add \--help'' or
311 linkman:repo-add[8].
314 See Also
315 --------
316 linkman:pacman[8], linkman:libalpm[3]
318 include::footer.txt[]