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