X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/0a8e3465cb644e380ab0fc6d66f6d1f17363b34e..565ded7b65240b25ad8551789ac388c8ce72b1f4:/doc/files.sgml diff --git a/doc/files.sgml b/doc/files.sgml index 2d4b1eac0..56c7f574d 100644 --- a/doc/files.sgml +++ b/doc/files.sgml @@ -1,10 +1,10 @@ - + APT Files Jason Gunthorpe jgg@debian.org -$Id: files.sgml,v 1.3 1998/10/02 04:39:57 jgg Exp $ +$Id: files.sgml,v 1.12 2003/04/26 23:26:13 doogie Exp $ This document describes the complete implementation and format of the @@ -13,7 +13,7 @@ views the Debian archive. -Copyright © Jason Gunthorpe, 1998. +Copyright © Jason Gunthorpe, 1998-1999.

"APT" and this document are free software; you can redistribute them and/or modify them under the terms of the GNU General Public License as published @@ -21,8 +21,8 @@ by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

-For more details, on Debian GNU/Linux systems, see the file -/usr/doc/copyright/GPL for the full license. +For more details, on Debian systems, see the file +/usr/share/common-licenses/GPL for the full license. @@ -41,36 +41,69 @@ multiple package files.

The var directory structure is as follows: - /var/state/apt/ - lists/ + /var/lib/apt/ + lists/ partial/ - xstatus + periodic/ + extended_states + cdroms.list /var/cache/apt/ - pkgcache.bin - srcpkgcache.bin archives/ partial/ + pkgcache.bin + srcpkgcache.bin /etc/apt/ - sources.list - cdromdevs.list + sources.list.d/ + apt.conf.d/ + preferences.d/ + trusted.gpg.d/ + sources.list + apt.conf + apt_preferences + trusted.gpg /usr/lib/apt/ - methods/ - cdrom - ftp - http + methods/ + bzip2 + cdrom + copy + file + ftp + gpgv + gzip + http + https + lzma + rred + rsh + ssh

-As is specified in the FHS 2.0 /var/state/apt is used for application +As is specified in the FHS 2.1 /var/lib/apt is used for application data that is not expected to be user modified. /var/cache/apt is used for regeneratable data and is where the package cache and downloaded .debs -go. +go. /etc/apt is the place where configuration should happen and +/usr/lib/apt is the place where the apt and other packages can place +binaries which can be used by the acquire system of APT. Files +Files and fragment directories in /etc/apt + +

+All files in /etc/apt are used to modify specific aspects of APT. To enable +other packages to ship needed configuration herself all these files have +a fragment directory packages can place their files in instead of mangling +with the main files. The main files are therefore considered to be only +used by the user and not by a package. The documentation omits this directories +most of the time to be easier readable, so every time the documentation includes +a reference to a main file it really means the file or the fragment directories. + + + Distribution Source list (sources.list)

@@ -80,112 +113,32 @@ support a mix of source media. The file lists one source per line, with the fastest source listed first. The format of each line is:

-type ui args +type uri args

The first item, type, indicates the format for the remainder of the line. It is designed to indicate the structure of the distribution -the line is talking about. Currently the only defined value is deb -which indicates a standard debian archive with a dists dir. - -The deb Type -

- The deb type is to be a typical two level debian distributions, - dist/distribution/component. Typically distribution - is one of stable, unstable or frozen while component is one of main, - contrib, non-free or non-us. The format for the deb line is as follows: - -

- deb uri distribution compontent - [component ...] - -

- uri for the deb type must specify the base of the - debian distribution. APT will automatically generate the proper longer - URIs to get the information it needs. distribution can specify - an exact path, in this case the components must be omitted and - distribution must end in a slash. - -

- Since only one distribution can be specified per deb line it may be - necessary to list a number of deb lines for the same URI. APT will - sort the URI list after it has generated a complete set to allow - connection reuse. It is important to order things in the sourcelist - from most prefered to least prefered (fastest to slowest). - - -URI specification -

-URIs in the source list support a large number of access schemes. - - -cdrom - The cdrom scheme is special in that If Modifed Since queries are never - performed and that APT knows how to match a cdrom to the name it - was given when first inserted. It does this by examining the date - and size of the package file. APT also knows all of the possible - prefix paths for the cdrom drives and that the user should be prompted - to insert a CD if it cannot be found. The path is relative to an - arbitary mount point (of APT's choosing) and must not start with a - slash. The first pathname component is the given name and is purely - descriptive and of the users choice. However, if a file in the root of - the cdrom is called 'cdname' its contents will be used instead of - prompting. The name serves as a tag for the cdrom and should be unique. - APT will track the CDROM's based on their tag and package file - properties. - - cdrom:Debian 1.3/debian - - -http - This scheme specifies a HTTP server for the debian archive. HTTP is prefered - over FTP because If Modified Since queries against the Package file are - possible. Newer HTTP protcols may even support reget which would make - http the protocol of choice. - - http://www.debian.org/archive - - -ftp - This scheme specifies a FTP connection to the server. FTP is limited because - there is no support for IMS and is hard to proxy over firewalls. - - ftp://ftp.debian.org/debian - - -file - The file scheme allows an arbitary directory in the file system to be - considered as a debian archive. This is usefull for NFS mounts and - local mirrors/archives. - - file:/var/debian - - -smb - A possible future expansion may be to have direct support for smb (Samba - servers). - - smb://ftp.kernel.org/pub/mirrors/debian - - - +the line is talking about. Currently the only defined values are deb +and deb-src which indicate a standard debian (source) archive with a +dists directory. More about these types and the URI specification can be found +in the sources.list manpage. Hashing the URI

-All permanent information aquired from any of the sources is stored in the +All permanent information acquired from any of the sources is stored in the lists directory. Thus, there must be a way to relate the filename in the lists directory to a line in the sourcelist. To simplify things this is done by quoting the URI and treating _'s as quoteable characters and converting / to _. The URI spec says this is done by converting a sensitive character into %xx where xx is the hexadecimal representation -from the ascii character set. Examples: +from the ASCII character set. Examples: http://www.debian.org/archive/dists/stable/binary-i386/Packages -/var/state/apt/lists/www.debian.org_archive_dists_stable_binary-i386_Packages +/var/lib/apt/lists/www.debian.org_archive_dists_stable_binary-i386_Packages cdrom:Debian 1.3/debian/Packages -/var/state/apt/info/Debian%201.3_debian_Packages +/var/lib/apt/info/Debian%201.3_debian_Packages

@@ -200,38 +153,31 @@ here as well. - + -Extra Status File (xstatus) +Extended States File (extended_states)

-The extra status file serves the same purpose as the normal dpkg status file +The extended_states file serves the same purpose as the normal dpkg status file (/var/lib/dpkg/status) except that it stores information unique to apt. -This includes the autoflag, target distribution and version and any other -uniqe features that come up over time. It duplicates nothing from the normal +This includes currently only the autoflag but is open to store more +unique data that come up over time. It duplicates nothing from the normal dpkg status file. Please see other APT documentation for a discussion -of the exact internal behavior of these fields. The Package field is -placed directly before the new fields to indicate which package they -apply to. The new fields are as follows: +of the exact internal behavior of these fields. The Package and the +Architecture field are placed directly before the new fields to indicate +which package they apply to. The new fields are as follows: -X-Auto - The Auto flag can be Yes or No and controls whether the package is in - auto mode. - -X-TargetDist - The TargetDist item indicates which distribution versions are offered for - installation from. It should be stable, unstable or frozen. - -X-TargetVersion - The target version item is set if the user selects a specific version, it - overrides the TargetDist selection if both are present. +Auto-Installed + The Auto flag can be 1 (Yes) or 0 (No) and controls whether the package + was automatical installed to satisfy a dependency or if the user requested + the installation -Binary Package Cache (pkgcache.bin) +Binary Package Cache (srcpkgcache.bin and pkgcache.bin)

Please see cache.sgml for a complete description of what this file is. The @@ -250,16 +196,20 @@ change to use a prebuilt version for greater speed.

The archives directory is where all downloaded .deb archives go. When the file transfer is initiated the deb is placed in partial. Once the file -is fully downloaded and its MD5 hash and size are verifitied it is moved +is fully downloaded and its MD5 hash and size are verified it is moved from partial into archives/. Any files found in archives/ can be assumed to be verified.

-No dirctory structure is transfered from the receiving site and all .deb +No directory structure is transferred from the receiving site and all .deb file names conform to debian conventions. No short (msdos) filename should be placed in archives. If the need arises .debs should be unpacked, scanned and renamed to their correct internal names. This is mostly to prevent -file name conflicts but other programs may depend on this if convenient. +file name conflicts but other programs may depend on this if convenient. +A conforming .deb is one of the form, name_version_arch.deb. Our archive +scripts do not handle epochs, but they are necessary and should be re-inserted. +If necessary _'s and :'s in the fields should be quoted using the % convention. +It must be possible to extract all 3 fields by examining the file name. Downloaded .debs must be found in one of the package lists with an exact name + version match.. @@ -273,69 +223,27 @@ The Methods directory is more fully described in the APT Methods interface document. - + - The Mirror List + The Configuration File (/etc/apt/apt.conf)

-The mirror list is stored on the primary debian web server (www.debian.org) -and contains a machine readable list of all known debian mirrors. It's -format and style mirror the Package file. - - -Site -This is the proper host name of the site. It should not be a host within -debian.org and generally cnames should be advoided here. - -Aliases -These list any commonly used aliases for the site. This field is used to make -sure that a site is not added twice. - -Type -This field can either be Push-Primary or leaf. -Push-Primary are authorized top level mirrors of the archive, all -other mirrors are leaf. - -Archive-[access] -The Archive field gives the path(s) to the debian archive. [access] -specifies the access method and may be one of ftp, http, rsync, nfs, or -smb. For many of the types it is possible to prefix the path with :### -indicating that an alternate port should be used. Generaly paths -start with a / and end with a /, rsync is an exception in that the -first directory component is not a path but a label. - -WWW-[access] -The WWW field gives the path(s) to the debian web site. - -CDImage-[access] -The WWW field gives the path(s) to the debian CD-ROM images - -Incoming-[access] -The Incoming field gives the path(s) to a mirror of the debian incoming -directory. - -nonUS-[access] -The nonUS field gives the path(s) to a mirror of the non-US distribution. - -Maintainer -This is the email address of the maintainer of the mirror. - -Location -Location gives the general geographical region the mirror is in. - -Sponsor -The Sponsor field indicates who owns the mirror and a URL to a web page -describing the organization. - -Comment -General free-form text. - - +The configuration file (and the associated fragments directory +/etc/apt/apt.conf.d/) is described in the apt.conf manpage. + + + + + The trusted.gpg File (/etc/apt/trusted.gpg)

-Some form of network measurement will have to be used to gauge performance -of each of the mirrors. This will be discussed later, initial versions -will use the first found URI. +The trusted.gpg file (and the files in the associated fragments directory +/etc/apt/trusted.gpg.d/) is a binary file including the keyring used +by apt to validate that the information (e.g. the Release file) it +downloads are really from the distributor it clams to be and is +unmodified and is therefore the last step in the chain of trust between +the archive and the end user. This security system is described in the +apt-secure manpage. @@ -343,7 +251,7 @@ will use the first found URI. The Release File

-This file plays and important role in how APT presents the archive to the +This file plays an important role in how APT presents the archive to the user. Its main purpose is to present a descriptive name for the source of each version of each package. It also is used to detect when new versions of debian are released. It augments the package file it is associated with @@ -365,8 +273,8 @@ This is the common name we give our archives, such as stable or unstable. Component -Referes to the sub-component of the archive, main, contrib -etc. +Refers to the sub-component of the archive, main, contrib +etc. Component may be omitted if there are no components for this archive. Version This is a version string with the same properties as in the Packages file. @@ -404,7 +312,7 @@ release, 1.3.1r6 Archive: stable -Compontent: main +Component: main Version: 1.3.1r6 Origin: Debian Label: Debian @@ -424,7 +332,7 @@ NotAutomatic: Yes And unstable, Archive: unstable -Compontent: main +Component: main Version: 2.1 Origin: Debian Label: Debian