]> git.saurik.com Git - apt.git/blob - doc/examples/configure-index
merged from the debian-sid branch
[apt.git] / doc / examples / configure-index
1 // $Id: configure-index,v 1.10 2004/07/17 19:37:16 mdz Exp $
2 /* This file is an index of all APT configuration directives. It should
3 NOT actually be used as a real config file, though it is (except for the
4 last line) a completely valid file. Most of the options have sane default
5 values, unless you have specific needs you should NOT include arbitrary
6 items in a custom configuration.
7
8 In some instances involving filenames it is possible to set the default
9 directory when the path is evaluated. This means you can use relative
10 paths within the sub scope.
11
12 The configuration directives are specified in a tree with {} designating
13 a subscope relative to the tag before the {}. You can further specify
14 a subscope using scope notation eg,
15 APT::Architecture "i386";
16 This is prefixed with the current scope. Scope notation must be used
17 if an option is specified on the command line with -o.
18 */
19
20 quiet "0";
21
22 // Options for APT in general
23 APT
24 {
25 Architecture "i386";
26 Build-Essential "build-essential";
27
28 NeverAutoRemove { "linux-kernel.*"; }; // packages that should never
29 // considered for autoRemove
30
31 // Options for apt-get
32 Get
33 {
34 Arch-Only "false";
35 AutomaticRemove "false";
36 HideAutoRemove "false";
37 Download-Only "false";
38 Simulate "false";
39 Assume-Yes "false";
40 Force-Yes "false"; // I would never set this.
41 Fix-Broken "false";
42 Fix-Missing "false";
43 Show-Upgraded "false";
44 Show-Versions "false";
45 Upgrade "true";
46 Print-URIs "false";
47 Compile "false";
48 Download "true";
49 Purge "false";
50 List-Cleanup "true";
51 ReInstall "false";
52 Trivial-Only "false";
53 Remove "true";
54 Only-Source "";
55 Diff-Only "false";
56 Tar-Only "false";
57 };
58
59 Cache
60 {
61 Important "false";
62 AllVersions "false";
63 GivenOnly "false";
64 RecurseDepends "false";
65 ShowFull "false";
66 Generate "true";
67 NamesOnly "false";
68 AllNames "false";
69 Installed "false";
70 };
71
72 CDROM
73 {
74 Rename "false";
75 NoMount "false";
76 Fast "false";
77 NoAct "false";
78 };
79
80 Update
81 {
82 Pre-Invoke {"touch /var/lib/apt/pre-update-stamp"; };
83 Post-Invoke {"touch /var/lib/apt/post-update-stamp"; };
84 };
85
86 Authentication
87 {
88 TrustCDROM "false"; // consider the CDROM always trusted
89 };
90
91 GPGV
92 {
93 TrustedKeyring "/etc/apt/trusted.gpg";
94 };
95
96 // Some general options
97 Ignore-Hold "false";
98 Clean-Installed "true";
99 Immediate-Configure "true"; // DO NOT turn this off, see the man page
100 Force-LoopBreak "false"; // DO NOT turn this on, see the man page
101 Cache-Limit "4194304";
102 Default-Release "";
103
104 // consider Recommends, Suggests as important dependencies that should
105 // be installed by default
106 Install-Recommends "false";
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 // 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 };
167 };
168
169 // Options for the downloading routines
170 Acquire
171 {
172 Queue-Mode "host"; // host|access
173 Retries "0";
174 Source-Symlinks "true";
175
176 PDiffs "true"; // try to get the IndexFile diffs
177
178 // HTTP method configuration
179 http
180 {
181 Proxy "http://127.0.0.1:3128";
182 Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting
183 Timeout "120";
184 Pipeline-Depth "5";
185
186 // Cache Control. Note these do not work with Squid 2.0.2
187 No-Cache "false";
188 Max-Age "86400"; // 1 Day age on index files
189 No-Store "false"; // Prevent the cache from storing archives
190 Dl-Limit "7"; // 7Kb/sec maximum download rate
191 };
192
193 // HTTPS method configuration:
194 // - uses the http proxy config
195 // - uses the http cache-control values
196 // - uses the http Dl-Limit values
197 https
198 {
199 Verify-Peer "false";
200 SslCert "/etc/apt/some.pem";
201 CaPath "/etc/ssl/certs";
202 Verify-Host" "2";
203 };
204
205 ftp
206 {
207 Proxy "ftp://127.0.0.1/";
208 Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting
209
210 /* Required script to perform proxy login. This example should work
211 for tisfwtk */
212 ProxyLogin
213 {
214 "USER $(PROXY_USER)";
215 "PASS $(PROXY_PASS)";
216 "USER $(SITE_USER)@$(SITE):$(SITE_PORT)";
217 "PASS $(SITE_PASS)";
218 };
219
220 Timeout "120";
221
222 /* Passive mode control, proxy, non-proxy and per-host. Pasv mode
223 is preferred if possible */
224 Passive "true";
225 Proxy::Passive "true";
226 Passive::http.us.debian.org "true"; // Specific per-host setting
227 };
228
229 cdrom
230 {
231 mount "/cdrom";
232
233 // You need the trailing slash!
234 "/cdrom/"
235 {
236 Mount "sleep 1000";
237 UMount "sleep 500";
238 }
239 };
240
241 gpgv
242 {
243 Options {"--ignore-time-conflict";} // not very useful on a normal system
244 };
245 };
246
247 // Directory layout
248 Dir "/"
249 {
250 // Location of the state dir
251 State "var/lib/apt/"
252 {
253 Lists "lists/";
254 xstatus "xstatus";
255 userstatus "status.user";
256 status "/var/lib/dpkg/status";
257 cdroms "cdroms.list";
258 };
259
260 // Location of the cache dir
261 Cache "var/cache/apt/" {
262 Archives "archives/";
263 // backup directory created by /etc/cron.daily/apt
264 Backup "backup/";
265 srcpkgcache "srcpkgcache.bin";
266 pkgcache "pkgcache.bin";
267 };
268
269 // Config files
270 Etc "etc/apt/" {
271 SourceList "sources.list";
272 Main "apt.conf";
273 Preferences "preferences";
274 Parts "apt.conf.d/";
275 };
276
277 // Locations of binaries
278 Bin {
279 methods "/usr/lib/apt/methods/";
280 gzip "/bin/gzip";
281 gpg "/usr/bin/gpgv";
282 dpkg "/usr/bin/dpkg";
283 dpkg-source "/usr/bin/dpkg-source";
284 dpkg-buildpackage "/usr/bin/dpkg-buildpackage";
285 apt-get "/usr/bin/apt-get";
286 apt-cache "/usr/bin/apt-cache";
287 };
288
289 // Location of the logfile
290 Log "var/log/apt" {
291 Terminal "term.log";
292 };
293 };
294
295 // Things that effect the APT dselect method
296 DSelect
297 {
298 Clean "auto"; // always|auto|prompt|never
299 Options "-f";
300 UpdateOptions "";
301 PromptAfterUpdate "no";
302 CheckDir "no";
303 }
304
305 DPkg
306 {
307 // Probably don't want to use force-downgrade..
308 Options {"--force-overwrite";"--force-downgrade";}
309
310 // Auto re-mounting of a readonly /usr
311 Pre-Invoke {"mount -o remount,rw /usr";};
312 Post-Invoke {"mount -o remount,ro /usr";};
313
314 // Prevents daemons from getting cwd as something mountable (default)
315 Run-Directory "/";
316
317 // Build options for apt-get source --compile
318 Build-Options "-b -uc";
319
320 // Pre-configure all packages before they are installed using debconf.
321 Pre-Install-Pkgs {"dpkg-preconfigure --apt --priority=low --frontend=dialog";};
322
323 // Flush the contents of stdin before forking dpkg.
324 FlushSTDIN "true";
325
326 // Control the size of the command line passed to dpkg.
327 MaxBytes 1024;
328 MaxArgs 350;
329
330 // controls if apt will apport on the first dpkg error or if it
331 // tries to install as many packages as possible
332 StopOnError "true";
333 }
334
335 /* Options you can set to see some debugging text They correspond to names
336 of classes in the source code */
337 Debug
338 {
339 pkgProblemResolver "false";
340 pkgDepCache::AutoInstall "false"; // what packages apt install to satify dependencies
341 pkgAcquire "false";
342 pkgAcquire::Worker "false";
343 pkgAcquire::Auth "false";
344 pkgDPkgPM "false";
345 pkgDPkgProgressReporting "false";
346 pkgOrderList "false";
347 pkgAutoRemove "false"; // show information about automatic removes
348 BuildDeps "false";
349 pkgInitialize "false"; // This one will dump the configuration space
350 NoLocking "false";
351 Acquire::Ftp "false"; // Show ftp command traffic
352 Acquire::Http "false"; // Show http command traffic
353 Acquire::Https "false"; // Show https debug
354 Acquire::gpgv "false"; // Show the gpgv traffic
355 aptcdrom "false"; // Show found package files
356 IdentCdrom "false";
357
358 }
359
360 /* Whatever you do, do not use this configuration file!! Take out ONLY
361 the portions you need! */
362 This Is Not A Valid Config File