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