/[ddp]/manpages/english/apt-move/apt-move.8
ViewVC logotype

Contents of /manpages/english/apt-move/apt-move.8

Parent Directory Parent Directory | Revision Log Revision Log


Revision 38 - (show annotations) (download)
Tue Oct 8 06:00:55 2002 UTC (10 years, 8 months ago) by louis
File size: 13512 byte(s)
manpage update
1 .\" Copyright (c) 1999 Michael Merten <mikemerten@yahoo.com>
2 .\" Copyright (c) 2000-2002 Herbert Xu <herbert@debian.org>
3 .\" May be distributed under the terms of version 2 of the
4 .\" GNU GPL. See the LICENSE file included with this package.
5 .\" $Id: apt-move.8,v 1.15 2002/10/07 09:08:22 herbert Exp $
6 .TH APT\-MOVE 8 "2002 Oct 7th" "APT-MOVE"
7
8 .SH NAME
9 apt\-move \- move cache of Debian packages into a mirror hierarchy.
10
11 .SH SYNOPSIS
12
13 .B apt\-move
14 .RB [ \-c
15 .IR conffile ]
16 .RB [ \-fqt ]
17 .I command
18
19
20 .SH DESCRIPTION
21
22 The
23 .B apt\-move
24 script is used to move a collection of Debian package files into a proper
25 archive hierarchy of the form
26 .B $LOCALDIR/pool/...
27 where
28 .B LOCALDIR
29 is specified in the configuration file.
30 It is intended as a tool to help manage the
31 .BR apt\-get (8)
32 file cache, but could be configured to work with any collection
33 of Debian packages.
34
35 .PP
36 Additionally, using the
37 .I sync
38 and
39 .I mirror
40 commands, you can build your own local mirror of portions of a selected
41 binary and/or source distribution.
42
43 .PP
44 Running
45 .B apt\-move
46 periodically will assist in managing the resulting partial mirror
47 by (optionally) removing obsolete packages and creating valid local
48 Packages.gz and Sources.gz.
49
50 .SS "Commands"
51 The following commands are accepted by
52 .BR apt\-move :
53
54 .TP
55 .B get \fR[ \fIdir \fR]
56 This generates the master files using Packages and Sources files from the
57 .BR apt (8)
58 cache. The master files are used to keep track of what packages are
59 available, and where packages should be installed. If
60 .I dir
61 is specified, it will be used in lieu of the
62 .B LISTSTATE
63 variable.
64
65 .TP
66 .B getlocal \fR[ \fIdir \fR]
67 This is an alias of get. It may be removed in future releases.
68
69 .TP
70 .B move
71 Moves a collection of packages into the local mirror tree. Uses existing
72 master files (see
73 .IR get )
74 to repair any mangling done to the package names. Any packages that aren't
75 listed in the master files will be left in the file cache directory.
76
77 .TP
78 .B delete
79 Delete obsolete package files. Configurable through the
80 .I DELETE
81 and
82 .I MAXDELETE
83 settings in the
84 .B /etc/apt\-move.conf
85 file (see the
86 .I CONFIGURATION
87 section below).
88
89 .TP
90 .B packages
91 Builds new local versions of Packages.gz and Sources.gz files.
92
93 .TP
94 .B fsck
95 Rebuilds all index files used to make Packages and Sources files and reprocess
96 all packages in the archive by calling
97 .B movefile
98 on them. Use this if you are upgrading from an old version (<< 4.2) of
99 .BR apt-move .
100
101 .TP
102 .B update
103 This is an alias, equivalent to
104 .RI ' get
105 .I move
106 .I delete
107 .IR packages '.
108 This is the preferred method for moving package files from your
109 cache into a local mirror.
110
111 .TP
112 .B local
113 This is an alias, equivalent to
114 .RI ' move
115 .I delete
116 .IR packages '.
117
118 .TP
119 .B localupdate
120 This is an alias for update. It may be removed in future releases.
121
122 .TP
123 .B mirror
124 This command automatically runs
125 .IR get ,
126 then uses
127 .B /usr/lib/apt-move/fetch
128 and
129 .BR apt-get (8)
130 to download any packages missing from your mirror. The downloaded files will
131 be installed into the repository using
132 .IR move .
133 Finally, it runs
134 .I packages
135 and exits.
136 See the
137 .I DIST
138 and
139 .I PKGTYPE
140 settings in
141 .BR /etc/apt\-move.conf .
142 Before using this command, you need to set up a
143 .B $LOCALDIR/.exclude
144 file containing patterns to exclude
145 unwanted files from your mirror. See the
146 .B SAMPLE.exclude
147 file for an example. See also the
148 .I "Exclude file"
149 section of
150 .I NOTES
151 below. Note that this command will only mirror packages for the architecture
152 that you are running on. It will, however, mirror all source packages.
153
154 .TP
155 .B sync
156 Similar to the
157 .I mirror
158 function, but only gets the packages that are currently installed on
159 your system. It uses
160 .BR dpkg (8)
161 .I \-\-get\-selections
162 to find out what files to download. It will skip any files that
163 match one of the patterns in the
164 .B $LOCALDIR/.exclude
165 file (if it exists).
166 .B sync
167 will get the latest versions of the packages, regardless of the
168 version currently installed on your system (think about it).
169
170 .TP
171 .B exclude
172 This command is used to test your
173 .B $LOCALDIR/.exclude
174 pattern file. It will
175 go through the master lists and print any file that matches one
176 of the patters in
177 .BR $LOCALDIR/.exclude .
178 This will show you exactly what
179 files you have EXCLUDED from your mirror. The
180 .B \-t
181 (test) flag has no affect on this command. This
182 uses your existing master files, and does not require an internet
183 connection.
184
185 .TP
186 .BI movefile \ files...
187 This command is similar to move. Instead of moving files from
188 .IR FILECACHE ,
189 it will move the files specified on the command line.
190
191 .TP
192 \fBlistbin \fR[ \fBmirror \fR| \fBsync \fR| \fBrepo \fR]
193 This command prints a list of packages which may serve as the input to
194 mirrorbin or mirrorsrc. If the argument is
195 .B mirror
196 or
197 .BR sync ,
198 it will produce the same lists that the
199 .B mirror
200 and
201 .B sync
202 commands use. If the argument is
203 .BR repo ,
204 the list produced will contain the packages that are currently in the
205 apt-move repository.
206
207 .TP
208 .B mirrorbin
209 This command will fetch the list of packages specified on the standard input,
210 and place them into the archive in the same way as
211 .B mirror
212 does.
213
214 .TP
215 .B mirrorsrc
216 This commands acts like
217 .BR mirrorbin ,
218 except that it fetches source packages instead of binary ones.
219
220 .SS Options
221 The following options are available from the command line:
222
223 .TP
224 \fB\-c \fIconffile
225 Use
226 .I conffile
227 as the configuration file instead of
228 .BR /etc/apt\-move.conf .
229
230 .TP
231 .B \-f
232 Forces deletion of files even when the percentage of files to
233 delete exceeds the
234 .I MAXDELETE
235 setting. This is useful if
236 .B apt\-move
237 aborts with an error saying that too many files would be deleted, and you
238 want to delete the files anyway. (Use with caution.) If you get this error,
239 using
240 .B \-ft
241 will show you the complete list of files, so you can verify them before
242 you use
243 .BR \-f.
244
245 .TP
246 .B \-q
247 Suppresses normal output. This option is useful when
248 .B apt\-move
249 is used in a non-interactive script.
250
251 .TP
252 .B \-t
253 Makes a 'test run' and reports what WOULD be done for
254 .B option
255 but does not modify any of the cache or mirror files.
256
257 .SH CONFIGURATION
258
259 Before using
260 .BR apt\-move ,
261 edit the
262 .B /etc/apt\-move.conf
263 file to match your local setup. Always remember to use the
264 .I test
265 parameter after any change in your configuration to make sure it will
266 work like you want it to. You may also want to set the
267 .I DELETE
268 option to
269 .I no
270 to turn off file deletes until everything else is working successfully.
271
272 .PP
273 The following settings are recognized by
274 .B apt-move
275 (shown here with their defaults):
276
277 .TP
278 .BR APTSITES= """debian.midco.net non-us.debian.org"""
279 Set this to the names of sites in your
280 .B /etc/apt/sources.list
281 that you wish to mirror.
282
283 .TP
284 .BR ARCHS= """alpha arm hurd-i386 i386 m68k powerpc sparc"""
285 This is a list of the architectures that you mirror.
286 As of potato, set to only one of:
287 .IR alpha ,
288 .IR arm ,
289 .IR hurd\-i386 ,
290 .IR i386 ,
291 .IR m68k ,
292 .I powerpc
293 or
294 .IR sparc .
295 Determines the creation of links to binary-all packages, as well as Packages
296 and Sources files.
297
298 .TP
299 .BR LOCALDIR= /mirrors/debian
300 This is the full (absolute) path to your debian directory (the top of your
301 local mirror).
302
303 .TP
304 .BR DIST= stable
305 This is the default distribution for source packages. It is also used for
306 binary packages when the
307 .I Release
308 file is missing.
309
310 .TP
311 .BR PKGTYPE= binary
312 Set this to your choice of:
313 .IR binary ,
314 .I source
315 or
316 .I both
317 to tell the
318 .IR mirror ,
319 .I sync
320 and
321 .I movefile
322 which type(s) of files to get.
323
324 .TP
325 .BR FILECACHE= /var/cache/apt/archives
326 The directory where your local cache of packages are. The default will work
327 for the
328 .BR apt-get (8)
329 packages, unless you've changed the configuration in
330 .BR /etc/apt/apt.conf .
331
332 .TP
333 .BR LISTSTATE= /var/state/apt/lists
334 The directory to your local cache of Packages files. The default will work
335 for the
336 .BR apt-get (8)
337 packages, unless you've changed the configuration in
338 .BR /etc/apt/apt.conf .
339
340 .TP
341 .BR DELETE= no
342 Determines whether obsolete packages (packages not listed in the master file,
343 or packages that have been superceded in the repository) are to be removed.
344
345 .TP
346 .BR MAXDELETE= 20
347 Maximum percentage of files
348 .B apt\-move
349 is allowed to delete during a normal run. Anything exceeding this will
350 produce an error and abort the script. I added this as a precaution
351 so that you won't lose your entire mirror when a new distribution is
352 released. You can override this (with caution) using the
353 .I \-f
354 parameter with
355 .BR apt\-move .
356
357 .TP
358 .BR COPYONLY= no
359 If this is set to yes, then
360 .B move
361 and
362 .B movefile
363 will copy instead of move. That is, the originals will be left alone.
364
365 .TP
366 .BR PKGCOMP= gzip
367 This should be set to a list of compression formats that apt-move should
368 provide when generating Packages and Sources files. The possible values
369 are
370 .BR none ,
371 .B gzip
372 and
373 .BR bzip2 .
374
375 .PP
376 For the
377 .I sync
378 and
379 .I mirror
380 commands to function correctly, you need to list your
381 .B apt\-move
382 repository at the top of
383 .BR /etc/apt/sources.list
384 as a
385 .BR file\ URI .
386
387 .SH FILES
388
389 .TP
390 .B /usr/bin/apt\-move
391 The script.
392
393 .TP
394 .B /etc/apt\-move.conf
395 Configuration file for the script.
396
397 .TP
398 .B /usr/share/man/man8/apt\-move.8.gz
399 The manpage.
400
401 .TP
402 .B /tmp/MOVE_*
403 The temporary files created at runtime.
404
405 .TP
406 .B /usr/lib/apt-move/fetch
407 Utility to fetch files just like
408 .IR "apt-get install -d" .
409 Except that no dependency analysis is done.
410
411 .TP
412 .B .apt-move/*.{binary, source}.local
413 Put entries of local packages here. The fields are
414 ``package priority section source version task'' for the binary file, and
415 ``package priority section version'' for the source file. The
416 .B version
417 field may be set to a single dash to refer to the latest version in the
418 archive. Blank lines and lines beginning with a hash are ignored.
419
420 .SH "SEE ALSO"
421
422 .BR dpkg (8),
423 .BR apt\-get (8)
424
425 .SH NOTES
426 .SS "Exclude file"
427 The
428 .I mirror
429 command uses a file in the
430 .B $LOCALDIR/
431 directory called '.exclude' which contains
432 exclude patterns that are applied against the files to be mirrored.
433 These patterns were created with the following limitation: they must work
434 the same with with
435 .BR grep (1),
436 after any '*' characters are removed. Unless you're careful setting this up,
437 you'll get unexpected results. Run
438 .RB "'" apt-move
439 .B \-t
440 .BR mirror "'"
441 first, to make sure you're getting the results you intended. Another way to
442 verify your exclude file is the use the
443 .I exclude
444 command for
445 .B apt\-move
446 to print a list of files your are excluding from your mirror. See the sample
447 .exclude file (SAMPLE.exclude) for an example of an .exclude file.
448
449 .SS Mirroring
450 The
451 .B apt\-move
452 .B mirror
453 and
454 .B sync
455 commands
456 do not test for available disk space. The current
457 potato (main binary) distribution is over 1Gb in size. Add the sources to
458 that and it can eat up the space on a partition really fast. I would advise you
459 to put your mirror somewhere other than the root partition. Set up your
460 exclude file and run
461 .BR "apt\-move -t mirror"
462 and examine the result.
463
464 .SH DIAGNOSTICS
465
466 .B apt\-move
467 may exit with one of the following error messages:
468
469 .TP
470 .B "Could not read configuration."
471 .B apt\-move
472 could not find the
473 .B /etc/apt-move.conf
474 file. Run the install script.
475
476 .TP
477 .B "Could not create directory."
478 For some reason, a necessary directory could not be created.
479
480 .TP
481 .B "You failed to select a distribution."
482 You did not configure a
483 .I DIST
484 setting in /etc/apt-move.conf.
485
486 .TP
487 .B "You specified an invalid pacakge type."
488 You can only use
489 .IR binary ,
490 .I source
491 or
492 .I both
493 for the PKGTYPE setting.
494
495 .TP
496 .B "No master files exist!"
497 You need to run
498 .B apt-\move
499 with the
500 .B get
501 command at least once in order to create the master files which determine
502 where packages are to be installed.
503
504 .TP
505 .B "bc calculation returned invalid result"
506 .B apt\-move
507 uses the
508 .BR bc (1)
509 program to determine when the number of files to delete will exceed the
510 .I MAXDELETE
511 setting in
512 .BR apt\-move.conf .
513 If you get this error, make sure that
514 .I MAXDELETE
515 is set to a number in the range of 1 to 100, without the % sign. Otherwise
516 you need to report this as a bug.
517
518 .TP
519 .B "Too many files to delete!"
520 .B apt\-move
521 will report this error if the number of files to be deleted exceeds the
522 .I MAXDELETE
523 setting in
524 .BR apt\-move.conf .
525 You need to study the output to determine if this is normal (in which case
526 you can override this using the
527 .I force
528 parameter), or if its due to some drastic change on the mirror site (like
529 a new release) or possibly due to a partial download of the master
530 Packages.gz or Sources.gz file.
531
532 .TP
533 .B "Your current mirror directory is incompatible..."
534 You have just upgraded from an old version of apt-move. Update your
535 configuration, then run
536 .I apt-move fsck
537 and finally remove
538 .BR .apt-move/ancient .
539
540 .TP
541 .B "Could not read Release files."
542 .B apt\-move
543 could not read the release files needed to build the master files. Make sure
544 you have run
545 .I apt-get update
546 and try again.
547
548 .TP
549 .B "Failed to remove original files."
550 .B apt\-move
551 could not remove the original copies of files that have just entered the
552 .B apt\-move
553 archive. Make sure that you have permission to delete those files.
554
555 .TP
556 .B "Please remove $LOCALDIR/backup."
557 You must remove
558 .B LOCALDIR/backup
559 before running the
560 .B fsck
561 command.
562
563 .SH BUGS
564
565 The exclusion system was designed prior to the introduction to the package
566 pools. Hence its content still relates to the old structure of the Debian
567 archive. This is confusing and it should be replaced with a new exclusion
568 system.
569
570 .SH AUTHOR
571
572 Michael Merten <mikemerten@yahoo.com>
573
574 Herbert Xu <herbert@debian.org>

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.5