]> git.saurik.com Git - apt.git/blob - doc/examples/apt.conf
c6e506cb8fac8077f563c8c4fd34ac8b3d02089d
[apt.git] / doc / examples / apt.conf
1 // $Id: apt.conf,v 1.41 1999/10/29 04:49:37 jgg 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 a completely
4 valid file. Most of the options have sane default values, unless
5 you have specific needs you should NOT include arbitary items in a custom
6 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 // Options for APT in general
21 APT
22 {
23 Architecture "i386";
24
25 // Options for apt-get
26 Get
27 {
28 Download-Only "false";
29 Simulate "false";
30 Assume-Yes "false";
31 Force-Yes "false"; // I would never set this.
32 Fix-Broken "false";
33 Fix-Missing "false";
34 Show-Upgraded "false";
35 No-Upgrade "false";
36 Print-URIs "false";
37 Compile "false";
38 No-Download "false";
39 Purge "false";
40 List-Cleanup "true";
41 ReInstall "false";
42 Trivial-Only "false";
43 No-Remove "false";
44 };
45
46 Cache
47 {
48 Important "false";
49 AllVersions "false";
50 };
51
52 CDROM
53 {
54 Rename "false";
55 NoMount "false";
56 Fast "false";
57 NoAct "false";
58 };
59
60 // Some general options
61 Ignore-Hold "false";
62 Clean-Installed "true";
63 Immediate-Configure "true"; // DO NOT turn this off, see the man page
64 Force-LoopBreak "false"; // DO NOT turn this on, see the man page
65 Cache-Limit "4194304";
66 };
67
68 // Options for the downloading routines
69 Acquire
70 {
71 Queue-Mode "host"; // host|access
72 Retries "0";
73 Source-Symlinks "true";
74
75 // HTTP method configuration
76 http
77 {
78 Proxy "http://127.0.0.1:3128";
79 Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting
80 Timeout "120";
81
82 // Cache Control. Note these do not work with Squid 2.0.2
83 No-Cache "false";
84 Max-Age "86400"; // 1 Day age on index files
85 No-Store "false"; // Prevent the cache from storing archives
86 };
87
88 ftp
89 {
90 Proxy "ftp://127.0.0.1/";
91 Proxy::http.us.debian.org "DIRECT"; // Specific per-host setting
92
93 /* Required script to perform proxy login. This example should work
94 for tisfwtk */
95 ProxyLogin
96 {
97 "USER $(PROXY_USER)";
98 "PASS $(PROXY_PASS)";
99 "USER $(SITE_USER)@$(SITE):$(SITE_PORT)";
100 "PASS $(SITE_PASS)";
101 };
102
103 Timeout "120";
104
105 /* Passive mode control, proxy, non-proxy and per-host. Pasv mode
106 is prefered if possible */
107 Passive "true";
108 Proxy::Passive "true";
109 Passive::http.us.debian.org "true"; // Specific per-host setting
110 };
111
112 cdrom
113 {
114 Mount "/cdrom";
115
116 // You need the trailing slash!
117 "/cdrom/"
118 {
119 Mount "sleep 1000";
120 UMount "sleep 500";
121 }
122 };
123 };
124
125 // Directory layout
126 Dir
127 {
128 // Location of the state dir
129 State "/var/state/apt/"
130 {
131 lists "lists/";
132 xstatus "xstatus";
133 userstatus "status.user";
134 status "/var/lib/dpkg/status";
135 cdroms "cdroms.list";
136 };
137
138 // Location of the cache dir
139 Cache "/var/cache/apt/" {
140 archives "archives/";
141 srcpkgcache "srcpkgcache.bin";
142 pkgcache "pkgcache.bin";
143 };
144
145 // Config files
146 Etc "/etc/apt/" {
147 sourcelist "sources.list";
148 main "apt.conf";
149 };
150
151 // Locations of binaries
152 Bin {
153 methods "/usr/lib/apt/methods/";
154 gzip "/bin/gzip";
155 dpkg "/usr/bin/dpkg";
156 dpkg-source "/usr/bin/dpkg-source";
157 dpkg-buildpackage "/usr/bin/dpkg-buildpackage"
158 apt-get "/usr/bin/apt-get";
159 apt-cache "/usr/bin/apt-cache";
160 };
161 };
162
163 // Things that effect the APT dselect method
164 DSelect
165 {
166 Clean "auto"; // always|auto|prompt|never
167 Options "-f";
168 UpdateOptions "";
169 PromptAfterUpdate "no";
170 }
171
172 DPkg
173 {
174 // Probably don't want to use force-downgrade..
175 Options {"--force-overwrite";"--force-downgrade";}
176
177 // Auto re-mounting of a readonly /usr
178 Pre-Invoke {"mount -o remount,rw /usr";};
179 Post-Invoke {"mount -o remount,ro /usr";};
180
181 // Prevents daemons from getting cwd as something mountable (default)
182 Run-Directory "/";
183
184 // Build options for apt-get source --compile
185 Build-Options "-b -uc";
186
187 // Pre-configure all packages before they are installed using debconf.
188 Pre-Install-Pkgs {"dpkg-preconfig --apt --priority=low --frontend=dialog";};
189 }
190
191 /* Options you can set to see some debugging text They corrispond to names
192 of classes in the source code */
193 Debug
194 {
195 pkgProblemResolver "false";
196 pkgAcquire "false";
197 pkgAcquire::Worker "false";
198 pkgDPkgPM "false";
199
200 pkgInitialize "false"; // This one will dump the configuration space
201 NoLocking "false";
202 Acquire::Ftp "false"; // Show ftp command traffic
203 Acquire::Http "false"; // Show http command traffic
204 aptcdrom "false"; // Show found package files
205 }
206
207 /* Whatever you do, do not use this configuration file!! Take out ONLY
208 the portions you need */
209 This Is Not A Valid Config File