- change the internal handling of Extensions in pkgAcqIndex
[ntk/apt.git] / doc / examples / configure-index
CommitLineData
50e19557 1/* This file is an index of all APT configuration directives. It should
640c5d94
MZ
2 NOT actually be used as a real config file, though it is (except for the
3 last line) a completely valid file. Most of the options have sane default
e3a1f08d 4 values, unless you have specific needs you should NOT include arbitrary
640c5d94 5 items in a custom configuration.
50e19557
AL
6
7 In some instances involving filenames it is possible to set the default
8 directory when the path is evaluated. This means you can use relative
9 paths within the sub scope.
10
11 The configuration directives are specified in a tree with {} designating
12 a subscope relative to the tag before the {}. You can further specify
13 a subscope using scope notation eg,
14 APT::Architecture "i386";
15 This is prefixed with the current scope. Scope notation must be used
16 if an option is specified on the command line with -o.
17*/
18
640c5d94 19quiet "0";
2f6557b9 20quiet::NoUpdate "true"; // never update progress information - included in -q=1
640c5d94 21
50e19557
AL
22// Options for APT in general
23APT
24{
25 Architecture "i386";
7d6f9f8f 26 Build-Essential "build-essential";
22dcc318 27
63b0c177 28 NeverAutoRemove { "linux-image.*"; }; // packages that should never
22dcc318
MV
29 // considered for autoRemove
30
50e19557
AL
31 // Options for apt-get
32 Get
33 {
7d6f9f8f 34 Arch-Only "false";
8070717c 35 AllowUnauthenticated "false";
120365ce 36 AutomaticRemove "false";
7898bd97 37 HideAutoRemove "false";
50e19557
AL
38 Download-Only "false";
39 Simulate "false";
40 Assume-Yes "false";
41 Force-Yes "false"; // I would never set this.
42 Fix-Broken "false";
43 Fix-Missing "false";
44 Show-Upgraded "false";
640c5d94 45 Show-Versions "false";
b2e465d6 46 Upgrade "true";
50e19557
AL
47 Print-URIs "false";
48 Compile "false";
b2e465d6 49 Download "true";
50e19557
AL
50 Purge "false";
51 List-Cleanup "true";
52 ReInstall "false";
53 Trivial-Only "false";
b2e465d6 54 Remove "true";
640c5d94
MZ
55 Only-Source "";
56 Diff-Only "false";
57 Tar-Only "false";
d59228b0 58 Build-Dep-Automatic "true";
ecf59bfc 59 Show-User-Simulation-Note "true";
50e19557
AL
60 };
61
62 Cache
63 {
64 Important "false";
65 AllVersions "false";
8c6e33d8 66 GivenOnly "false";
153a849d 67 RecurseDepends "false";
640c5d94
MZ
68 ShowFull "false";
69 Generate "true";
70 NamesOnly "false";
71 AllNames "false";
72 Installed "false";
50e19557
AL
73 };
74
75 CDROM
76 {
77 Rename "false";
78 NoMount "false";
79 Fast "false";
80 NoAct "false";
81 };
82
f8477782
MV
83 Update
84 {
85 Pre-Invoke {"touch /var/lib/apt/pre-update-stamp"; };
86 Post-Invoke {"touch /var/lib/apt/post-update-stamp"; };
87 };
88
e8cdc56a
MV
89 Authentication
90 {
4e0ad446 91 TrustCDROM "false"; // consider the CDROM always trusted
e8cdc56a
MV
92 };
93
50e19557
AL
94 // Some general options
95 Ignore-Hold "false";
96 Clean-Installed "true";
97 Immediate-Configure "true"; // DO NOT turn this off, see the man page
98 Force-LoopBreak "false"; // DO NOT turn this on, see the man page
dcdf1ef1
DK
99 Cache-Start "20971520";
100 Cache-Grow "1048576";
101 Cache-Limit "0";
877d310f 102 Default-Release "";
75ef8f14 103
e9ae3677
MV
104 // consider Recommends, Suggests as important dependencies that should
105 // be installed by default
50c26918 106 Install-Recommends "true";
e53ee4ca 107 Install-Suggests "false";
75ef8f14 108
92b9551f 109 // consider dependencies of packages in this section manual
cb1933df 110 Never-MarkAuto-Sections {"metapackages"; "universe/metapackages"; };
2a7e07c7 111
75ef8f14
MV
112 // Write progress messages on this fd (for stuff like base-config)
113 Status-Fd "-1";
114 // Keep the list of FDs open (normally apt closes all fds when it
115 // does a ExecFork)
116 Keep-Fds {};
ff7c76f8
OA
117
118 // control parameters for cron jobs by /etc/cron.daily/apt
119 Periodic
120 {
121 BackupArchiveInterval "0";
122 // - Backup after n-days if archive contents changed.(0=disable)
123
124 BackupLevel "3";
125 // - Backup level.(0=disable), 1 is invalid.
126
127 // APT::Archives::MaxAge "0"; (old, deprecated)
128 MaxAge "0"; // (new)
129 // - Set maximum allowed age of a cache package file. If a cache
130 // package file is older it is deleted (0=disable)
131
132 // APT::Archives::MinAge "2"; (old, deprecated)
133 MinAge "2"; // (new)
134 // - Set minimum age of a package file. If a file is younger it
135 // will not be deleted (0=disable). Usefull to prevent races
136 // and to keep backups of the packages for emergency.
137
138 // APT::Archives::MaxSize "0"; (old, deprecated)
139 MaxSize "0"; // (new)
140 // - Set maximum size of the cache in MB (0=disable). If the cache
141 // is bigger, cached package files are deleted until the size
142 // requirement is met (the biggest packages will be deleted
143 // first).
144
145 Update-Package-Lists "0";
146 // - Do "apt-get update" automatically every n-days (0=disable)
147 //
148 Download-Upgradeable-Packages "0";
149 // - Do "apt-get upgrade --download-only" every n-days (0=disable)
150 //
151 Unattended-Upgrade "0";
152 // - Run the "unattended-upgrade" security upgrade script
153 // every n-days (0=disabled)
154 // Requires the package "unattended-upgrades" and will write
155 // a log in /var/log/unattended-upgrades
156 //
157 AutocleanInterval "0";
158 // - Do "apt-get autoclean" every n-days (0=disable)
159
160 Verbose "0";
161 // - Send report mail to root
162 // 0: no report (or null string)
163 // 1: progress report (actually any string)
164 // 2: + command outputs (remove -qq, remove 2>/dev/null, add -d)
165 // 3: + trace on
166 };
50e19557
AL
167};
168
169// Options for the downloading routines
170Acquire
171{
172 Queue-Mode "host"; // host|access
173 Retries "0";
174 Source-Symlinks "true";
a722b2c5 175 ForceHash "sha256"; // hashmethod used for expected hash: sha256, sha1 or md5sum
2ac3eeb6
MV
176
177 PDiffs "true"; // try to get the IndexFile diffs
02dceb31
DK
178 PDiffs::FileLimit "4"; // don't use diffs if we would need more than 4 diffs
179 PDiffs::SizeLimit "50"; // don't use diffs if size of all patches excess
180 // 50% of the size of the original file
181
b02fffa6
DK
182 Check-Valid-Until "true";
183 Max-ValidTime "864000"; // 10 days
184 Max-ValidTime::Debian-Security "604800"; // 7 days, label specific configuration
185
50e19557
AL
186 // HTTP method configuration
187 http
188 {
189 Proxy "http://127.0.0.1:3128";
190 Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting
191 Timeout "120";
192 Pipeline-Depth "5";
09fab244
MV
193 AllowRedirect "true";
194
50e19557
AL
195 // Cache Control. Note these do not work with Squid 2.0.2
196 No-Cache "false";
197 Max-Age "86400"; // 1 Day age on index files
198 No-Store "false"; // Prevent the cache from storing archives
7c6e2dc7 199 Dl-Limit "7"; // 7Kb/sec maximum download rate
4494239c 200 User-Agent "Debian APT-HTTP/1.3";
50e19557
AL
201 };
202
c0d43847
DK
203
204
205 // HTTPS method configuration: uses the http
206 // - proxy config
207 // - cache-control values
208 // - Dl-Limit, Timout, ... values
209 // if not set explicit for https
210 //
211 // see /usr/share/doc/apt/examples/apt-https-method-example.conf.gz
212 // for more examples
213 https
714ee06c
MV
214 {
215 Verify-Peer "false";
216 SslCert "/etc/apt/some.pem";
c0d43847
DK
217 CaPath "/etc/ssl/certs";
218 Verify-Host" "true";
219 AllowRedirect "true";
220
221 Timeout "120";
222 AllowRedirect "true";
223
224 // Cache Control. Note these do not work with Squid 2.0.2
225 No-Cache "false";
226 Max-Age "86400"; // 1 Day age on index files
227 No-Store "false"; // Prevent the cache from storing archives
228 Dl-Limit "7"; // 7Kb/sec maximum download rate
4494239c 229
c0d43847 230 User-Agent "Debian APT-CURL/1.0";
714ee06c
MV
231 };
232
50e19557
AL
233 ftp
234 {
235 Proxy "ftp://127.0.0.1/";
236 Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting
237
238 /* Required script to perform proxy login. This example should work
239 for tisfwtk */
240 ProxyLogin
241 {
242 "USER $(PROXY_USER)";
243 "PASS $(PROXY_PASS)";
244 "USER $(SITE_USER)@$(SITE):$(SITE_PORT)";
245 "PASS $(SITE_PASS)";
246 };
247
248 Timeout "120";
249
250 /* Passive mode control, proxy, non-proxy and per-host. Pasv mode
e3a1f08d 251 is preferred if possible */
50e19557
AL
252 Passive "true";
253 Proxy::Passive "true";
254 Passive::http.us.debian.org "true"; // Specific per-host setting
255 };
256
257 cdrom
258 {
93adae19
MV
259 // do auto detection of the cdrom mountpoint
260 AutoDetect "true";
261
262 // cdrom mountpoint (needs to be defined in fstab if AutoDetect is not used)
640c5d94 263 mount "/cdrom";
50e19557
AL
264
265 // You need the trailing slash!
266 "/cdrom/"
267 {
268 Mount "sleep 1000";
269 UMount "sleep 500";
270 }
271 };
e75f306e
MV
272
273 gpgv
274 {
e3a1f08d 275 Options {"--ignore-time-conflict";} // not very useful on a normal system
e75f306e 276 };
8bd02d8b
DK
277
278 CompressionTypes
279 {
280 bz2 "bzip2";
281 lzma "lzma";
282 gz "gzip";
283
5d885723 284 Order { "uncompressed"; "gz"; "lzma"; "bz2"; };
8bd02d8b 285 };
45df0ad2
DK
286
287 Languages
288 {
289 "environment";
290 "de";
291 "en";
292 "none";
293 "fr";
294 };
50e19557
AL
295};
296
297// Directory layout
b2e465d6 298Dir "/"
50e19557
AL
299{
300 // Location of the state dir
b2e465d6 301 State "var/lib/apt/"
50e19557 302 {
640c5d94 303 Lists "lists/";
50e19557 304 status "/var/lib/dpkg/status";
d34690e1 305 extended_states "extended_states";
50e19557
AL
306 cdroms "cdroms.list";
307 };
308
309 // Location of the cache dir
b2e465d6 310 Cache "var/cache/apt/" {
640c5d94 311 Archives "archives/";
ff7c76f8
OA
312 // backup directory created by /etc/cron.daily/apt
313 Backup "backup/";
50e19557
AL
314 srcpkgcache "srcpkgcache.bin";
315 pkgcache "pkgcache.bin";
316 };
317
318 // Config files
b2e465d6 319 Etc "etc/apt/" {
640c5d94 320 Main "apt.conf";
592b7800 321 Netrc "auth.conf";
640c5d94 322 Parts "apt.conf.d/";
13aa7588
JAK
323 Preferences "preferences";
324 PreferencesParts "preferences.d";
5541fea3
JAK
325 SourceList "sources.list";
326 SourceParts "sources.list.d";
327 VendorList "vendors.list";
328 VendorParts "vendors.list.d";
c24f6ce2
DK
329 Trusted "trusted.gpg";
330 TrustedParts "trusted.gpg.d";
50e19557
AL
331 };
332
333 // Locations of binaries
334 Bin {
335 methods "/usr/lib/apt/methods/";
336 gzip "/bin/gzip";
8a3642bd 337 gpg "/usr/bin/gpgv";
50e19557
AL
338 dpkg "/usr/bin/dpkg";
339 dpkg-source "/usr/bin/dpkg-source";
2a065e4e 340 dpkg-buildpackage "/usr/bin/dpkg-buildpackage";
50e19557
AL
341 apt-get "/usr/bin/apt-get";
342 apt-cache "/usr/bin/apt-cache";
343 };
ff56e980
MV
344
345 // Location of the logfile
346 Log "var/log/apt" {
8da1f029 347 Terminal "term.log";
06863651 348 History "history.log";
ff56e980 349 };
ffee221b
MV
350
351 // Media
352 Media
353 {
354 // Media AutoDetect mount path
355 MountPath "/media/apt";
ff56e980 356 };
93adae19
MV
357
358 // Media
359 Media
360 {
361 // Media AutoDetect mount path
362 MountPath "/media/apt";
363 };
50e19557
AL
364};
365
366// Things that effect the APT dselect method
367DSelect
368{
369 Clean "auto"; // always|auto|prompt|never
370 Options "-f";
371 UpdateOptions "";
372 PromptAfterUpdate "no";
b2e465d6 373 CheckDir "no";
50e19557
AL
374}
375
3e9c4f70 376DPkg
50e19557 377{
3e9c4f70
DK
378 // let apt aggressivly use dpkg triggers
379 NoTriggers "true";
380 NoConfigure "true";
381 ConfigurePending "true";
382
50e19557
AL
383 // Probably don't want to use force-downgrade..
384 Options {"--force-overwrite";"--force-downgrade";}
3e9c4f70 385
50e19557
AL
386 // Auto re-mounting of a readonly /usr
387 Pre-Invoke {"mount -o remount,rw /usr";};
388 Post-Invoke {"mount -o remount,ro /usr";};
3e9c4f70
DK
389
390 Chroot-Directory "/";
391
50e19557
AL
392 // Prevents daemons from getting cwd as something mountable (default)
393 Run-Directory "/";
3e9c4f70 394
50e19557
AL
395 // Build options for apt-get source --compile
396 Build-Options "-b -uc";
397
398 // Pre-configure all packages before they are installed using debconf.
99a202d6 399 Pre-Install-Pkgs {"dpkg-preconfigure --apt --priority=low --frontend=dialog";};
8c6e33d8
AL
400
401 // Flush the contents of stdin before forking dpkg.
402 FlushSTDIN "true";
358688a8
AL
403
404 // Control the size of the command line passed to dpkg.
405 MaxBytes 1024;
406 MaxArgs 350;
c70496f9
MV
407
408 // controls if apt will apport on the first dpkg error or if it
409 // tries to install as many packages as possible
410 StopOnError "true";
50e19557
AL
411}
412
2d425135 413/* Options you can set to see some debugging text They correspond to names
50e19557
AL
414 of classes in the source code */
415Debug
416{
417 pkgProblemResolver "false";
8b4894fe 418 pkgProblemResolver::ShowScores "false";
d4c5f11f 419 pkgDepCache::AutoInstall "false"; // what packages apt install to satify dependencies
af29ffb4 420 pkgDepCache::Marker "false";
c8e572e3 421 pkgCacheGen "false";
50e19557
AL
422 pkgAcquire "false";
423 pkgAcquire::Worker "false";
5e9179a6 424 pkgAcquire::Auth "false";
50e19557 425 pkgDPkgPM "false";
75ef8f14 426 pkgDPkgProgressReporting "false";
b2e465d6 427 pkgOrderList "false";
131418cf 428 pkgPackageManager "false"; // OrderList/Configure debugging
120365ce 429 pkgAutoRemove "false"; // show information about automatic removes
efe9ba67 430 BuildDeps "false";
50e19557
AL
431 pkgInitialize "false"; // This one will dump the configuration space
432 NoLocking "false";
433 Acquire::Ftp "false"; // Show ftp command traffic
434 Acquire::Http "false"; // Show http command traffic
714ee06c 435 Acquire::Https "false"; // Show https debug
8a3642bd 436 Acquire::gpgv "false"; // Show the gpgv traffic
0c6b381f 437 Acquire::cdrom "false"; // Show cdrom debug output
50e19557 438 aptcdrom "false"; // Show found package files
640c5d94 439 IdentCdrom "false";
f1c081b6 440 acquire::netrc "false"; // netrc parser
8a3642bd 441
50e19557
AL
442}
443
6bc703c2
DK
444pkgCacheGen::Essential "native"; // other modes: all, none, installed
445
50e19557
AL
446/* Whatever you do, do not use this configuration file!! Take out ONLY
447 the portions you need! */
448This Is Not A Valid Config File