Penguin
Annotated edit history of apt-move(8) version 9, including all changes. View license author blame.
Rev Author # Line
4 CraigBox 1 apt-move - move cache of Debian packages into a mirror hierarchy.
2
3 !SYNOPSIS
4
5 __apt-move__ [[__-c__ ''conffile''] [[__-ft__] ''command''
6
7
8 !DESCRIPTION
9
10 The __apt-move__ script is used to move a collection of Debian package files into a proper archive hierarchy of the form __$LOCALDIR/dists/...__ where __LOCALDIR__ is specified in the configuration file.
11
12 It is intended as a tool to help manage the apt-get(8) file cache, but could be configured to work with any collection of Debian packages.
13
14 Additionally, using the ''sync'' and ''mirror'' commands, you can build your own local mirror of portions of a selected binary and/or source distribution.
15
16 Running __apt-move__ periodically will assist in managing the resulting partial mirror by (optionally) removing obsolete packages and creating valid local Packages.gz and Sources.gz files using dpkg-scanpackages(8) and
17 dpkg-scansources(8).
18
19 !Commands
20
21 The following commands are accepted by __apt-move__:
22
23 ; __get__ : This generates the master files using Packages and Sources files from the apt(8) cache. The master files are used to keep track of what packages are available, and where packages should be installed.
24
25 ; __getlocal__ : This is an alias of get. It may be removed in future releases.
26
27 ; __move__ : Moves a collection of packages into the local mirror tree. Uses existing master files (see ''get'') to repair any mangling done to the package names. Any packages that aren't listed in the master files will be left in the file cache directory.
28
29 ; __delete__ : Delete obsolete package files. Configurable through the ''DELETE'' and ''MAXDELETE '' settings in the __/etc/apt-move.conf__ file (see the ''CONFIGURATION'' section below).
30
31 ; __packages__ : Builds new local versions of Packages.gz and Sources.gz files.
32
9 ClaudioRisso 33 ; __fsck__ : Rebuilds all index files used to make Packages and Sources files and create symbolic links for binary-all packages. Use this if you are upgrading from an old version (<< 4.0) of apt-move, if your index files are corrupted, or if you are adding a new architecture to your mirror. This will use your existing master files, or your local Packages and Sources files if they aren't available.
4 CraigBox 34
35 ; __update__ : This is an alias, equivalent to ''get move delete packages''. This is the preferred method for moving package files from your cache into a local mirror.
36
37 ; __local__ : This is an alias, equivalent to ''move delete packages'''.
38
39 ; __localupdate__ : This is an alias for update. It may be removed in future releases.
40
41 ; __mirror__ : This command automatically runs ''get'', then uses __/usr/lib/apt-move/fetch__ and apt-get(8) to download any packages missing from your mirror. The downloaded files will be installed into the repository using ''move''. Finally, it runs ''packages'' and exits. See the ''DIST'' and ''PKGTYPE'' settings in __/etc/apt-move.conf__. %%% Before using this command, you need to set up a __$LOCALDIR/.exclude__ file containing patterns to exclude unwanted files from your mirror. See the __SAMPLE.exclude__ file for an example. See also the ''Exclude file'' section of ''NOTES '' below. Note that this command will only mirror packages for the architecture that you are running on. It will, however, mirror all source packages.
42
43 ; __sync__ : Similar to the ''mirror'' function, but only gets the packages that are currently installed on your system. It uses dpkg(8) ''--get-selections'' to find out what files to download. It will skip any files that match one of the patterns in the __$LOCALDIR/.exclude__ file (if it exists). __sync__ will get the latest versions of the packages, regardless of the version currently installed on your system (think about it).
44
45 ; __exclude__ : This command is used to test your __$LOCALDIR/.exclude__ pattern file. It will go through the master lists and print any file that matches one of the patters in __$LOCALDIR/.exclude__. %%% This will show you exactly what files you have EXCLUDED from your mirror. The __-t__ (test) flag has no affect on this command. This uses your existing master files, and does not require an internet connection.
46
47 ; __movefile__ ''files...'' : This command is similar to move. Instead of moving files from ''FILECACHE'', it will move the files specified on the command line.
48
49 ; __listbin__ [[ __mirror __| __sync __| __repo __] : This command prints a list of packages which may serve as the input to mirrorbin or mirrorsrc. If the argument is __mirror__ or __sync__, it will produce the same lists that the __mirror__ and __sync__ commands use. If the argument is __repo__, the list produced will contain the packages that are currently in the apt-move repository.
50
51 ; __mirrorbin__ : This command will fetch the list of packages specified on the standard input, and place them into he archive in the same way as __mirror__ does.
52
53 ; __mirrorsrc__ : This commands acts like __mirrorbin__, except that it fetches source packages instead of binary ones.
54
55 !Options
56
57 The following options are available from the command line:
58
59 ; __-c __ ''conffile'' : Use ''conffile'' as the configuration file instead of __/etc/apt-move.conf__.
60
61 ; __-f__ : Forces deletion of files even when the percentage of files to delete exceeds the ''MAXDELETE'' setting. This is useful if __apt-move __ aborts with an error saying that too many files would be deleted, and you want to delete the files anyway. (Use with caution.) If you get this error, using __-ft__ will show you the complete list of files, so you can verify them before you use __-f.__
62
63 ; __-t__ : Makes a 'test run' and reports what WOULD be done for __option__ but does not modify any of the cache or mirror files.
64
65
66 !CONFIGURATION
67
68 Before using __apt-move__, edit the __/etc/apt-move.conf__ file to match your local setup. Always remember to use the ''test'' parameter after any change in your configuration to make sure it will work like you want it to. You may also want to set the ''DELETE'' option to ''no'' to turn off file deletes until everything else is working successfully.
69
70 The following settings are recognized by __apt-move__ (shown here with their defaults):
71
72 ; __APTSITES=__debian.midco.net non-us.debian.org : Set this to the names of sites in your __/etc/apt/sources.list__ that you wish to mirror.
73 ; __ARCHS=__alpha arm hurd-i386 i386 m68k powerpc sparc : This is a list of the architectures that you mirror. As of potato, set to only one of: ''alpha'', ''arm'', ''hurd-i386'', ''i386'', ''m68k'', ''powerpc'' or ''sparc''. %%% Determines the creation of links to binary-all packages, as well as Packages and Sources files.
74 ; __LOCALDIR=__/mirrors/debian : This is the full (absolute) path to your debian directory (the top of your local mirror).
75 ; __DIST=__potato : Set this to a distribution name (such as slink or potato) to follow a particular distribution throughout its life cycle, or to a distribution branch (such as stable or unstable) to always mirror that branch, regardless of its current name. Your local mirror will be constructed accordingly. It is generally safer to use the code name (e.g., potato), and then create symbolic links under __LOCALDIR__.
76 ; __PKGTYPE=__binary : %%%Set this to your choice of: ''binary'', ''source'' or ''both'' to tell the ''mirror'', ''sync'' and ''movefile'' which type(s) of files to get.
77 ; __FILECACHE=__/var/cache/apt/archives : The directory where your local cache of packages are. The default will work for the apt-get(8) packages, unless you've changed the configuration in __/etc/apt/apt.conf__.
78 ; __LISTSTATE=__/var/state/apt/lists : The directory to your local cache of Packages files. The default will work for the apt-get(8) packages, unless you've changed the configuration in __/etc/apt/apt.conf__.
79 ; __DELETE=__no : Determines whether obsolete packages (packages not listed in the master file, or packages that have been superceded in the repository) are to be removed.
80 ; __MAXDELETE=__20 : Maximum percentage of files __apt-move__ is allowed to delete during a normal run. Anything exceeding this will produce an error and abort the script. I added this as a precaution so that you won't lose your entire mirror when a new distribution is released. You can override this (with caution) using the ''-f'' parameter with __apt-move__.
81 ; __STRICTMOVE=__no : If set to yes, files will only be allowed into the cache if their version without the epoch is equal to the version listed in the master file. If no version is recorded in the entry for this package in the master file, then it will still be allowed in. %%% For the ''sync'' and ''mirror'' commands to function correctly, you need to list your __apt-move__ repository at the top of __/etc/apt/sources.list__ as a __file URI__.
82
83 !FILES
84
85 ; __/usr/bin/apt-move__ : The script.
86 ;__/etc/apt-move.conf__ : Configuration file for the script.
87 ; __/usr/share/man/man8/apt-move.8.gz__ : The manpage.
88 ; __/tmp/MOVE_*__ : The temporary files created at runtime.
89 ; __/usr/lib/apt-move/fetch__ : Utility to fetch files just like ''apt-get install -d''. Except that no dependency analysis is done.
5 PerryLorier 90 ; __.apt-move/*.{binary, source}.local__: Put entries of local packages here. The fields are ``package priority section source'' for the binary file, and ``package priority section'' for the source file.
4 CraigBox 91
92 !SEE ALSO
93
94 dpkg-scanpackages(8), dpkg-scansources(8), dpkg(8), apt-get(8)
95
96 !NOTES
97
98 !Exclude file
99
100 The ''mirror'' command uses a file in the __$LOCALDIR/__ directory called '.exclude' which contains exclude patterns that are applied against the files to be mirrored. These patterns were created with the following limitation: they must work the same with with grep(1), after any '*' characters are removed. Unless you're careful setting this up, you'll get unexpected results. Run '__apt-move -t mirror__' first, to make sure you're getting the results you intended. Another way to verify your exclude file is the use the ''exclude'' command for __apt-move__ to print a list of files your are excluding from your mirror. See the sample .exclude file (SAMPLE.exclude) for an example of an .exclude file.
101
102 !WARNINGS
103
104 The __apt-move__ __mirror__ and __sync__ commands do not test for available disk space. The current potato (main binary) distribution is over 1Gb in size. Add the sources to that and it can eat up the space on a partition really fast. I would advise you to put your mirror somewhere other than the root partition. Set up your exclude file and run __apt-move -t mirror__ and examine the result.
105
106
107 !DIAGNOSTICS
108
109 __apt-move__ may exit with one of the following error messages:
110
111 ; __Could not find configuration.__ : __apt-move__ could not find the __/etc/apt-move.conf__ file. Run the install script.
112 ; __You must specify at least one APTSITES in...__ : You did not specify anything in ''APTSITES''. Which implies that there is nothing to mirror.
113 ; __Could not create directory.__ : For some reason, a necessary directory could not be created.
114 ; __You failed to select a distribution.__ : You did not configure a ''DIST'' setting in /etc/apt-move.conf.
115 ; __You specified an invalid pacakge type.__ : You can only use ''binary'', ''source'' or ''both'' for the PKGTYPE setting.
116 ; __No master files exist!__ : You need to run __apt-move__ with the __get__ command at least once in order to create the master files which determine where packages are to be installed.
117 ; __bc calculation returned invalid result__ : __apt-move__ uses the bc(1) program to determine when the number of files to delete will exceed the ''MAXDELETE'' setting in __apt-move.conf__. If you get this error, make sure that ''MAXDELETE'' is set to a number in the range of 1 to 100, without the % sign. Otherwise you need to report this as a bug.
118 ; __Too many files to delete!__ : __apt-move__ will report this error if the number of files to be deleted exceeds the ''MAXDELETE'' setting in __apt-move.conf__. You need to study the output to determine if this is normal (in which case you can override this using the ''force'' parameter), or if its due to some drastic change on the mirror site (like a new release) or possibly due to a partial download of the master Packages.gz or Sources.gz file.
119 ;__Your current mirror directory is incompatible...__ : You have just upgraded from an old version of apt-move. Update your configuration, then run ''apt-move fsck'' and finally remove __.apt-move/ancient__.
120
121 !AUTHOR
122
123 Michael Merten <mikemerten@yahoo.com> %%%
124 Herbert Xu <herbert@debian.org>
125
126 -----
127
128 User Submitted Annotations:
129
130 If it doesn't move your package, that means it's not listed in the Release file somewhere along the line. That's why you often get Ign: on Release files from 'local' repositories.
6 PerryLorier 131
7 CraigBox 132 ''So the question dying to be asked here is -- how do you stick it into a Release file? -- PerryLorier''
133
134 Wouldn't you love to know! Unfortunately, I have so far turned up a blank...
8 BobKagy 135
136 http://lists.debian.org/debian-devel/2003/debian-devel-200309/msg01538.html has a script to create the Relese files.
137 http://lists.debian.org/debian-user/2002/debian-user-200203/msg04954.html has a simpler description
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.