Type
Type can be either deb, or deb-src.
deb http://deb.debian.org/debian/ buster main # deb : is the Type of indexes to get , # deb is used to get indexes of binary # packages . # http:// : URI scheme . # deb.debian.org/debian/ : repository address. # buster : is the distribution . # main : is the component . deb-src http://deb.debian.org/debian/ buster main # deb-src : is the Type of indexes to get , # deb-src is used to get indexes of source # packages. # http:// : URI scheme . # deb.debian.org/debian/ : repository address. # buster : is the distribution . # main : is the component .
deb is used to indicate that we want to download indexes of binary packages. Binary packages can be either .deb or .udeb packages . .deb packages are used to install applications , commands , utilities … .udeb packages are used to add capabilities to the installer .
Indexes
of binary packages are stored in files named
Packages.[gz|xz|bz2]
on the repository
URI ,
where
gz
or
xz
or
bz2
is
the compression that is used .
For each
distribution
/
component
/
architecture
we have an index of binary packages.
# index of deb packages dists/$DIST[/folder]/$COMP/binary-$ARCH/Packages.[gz|xz] # Packages.[gz|xz] is an index of .deb packages . # dists is the dists folder under the repository . # $DIST is a folder that has the # distribution suite name # for example stable , or # codename for example buster … # [/folder] is an optional folder in the # the $DIST folder , for example it can # be updates. # $COMP is a folder with the component # name , for example contrib or main … # binary-$ARCH , is a folder where $ARCH # is the architecture name , for example # binary-amd64 , binary-mips … # As an example , the location of the # index of deb binary packages , for the # amd64 architecture , contrib component, # stable distribution suite , and # https://deb.debian.org/debian/ repository # is # https://deb.debian.org/debian/dists/stable/contrib/binary-amd64/Packages.xz # Another example , the location of the # index of deb binary packages , for the # amd64 architecture non-free component, # in the update folder of the # stable distribution suite, # in the # http://security.debian.org/debian-security repository # is # http://security.debian.org/debian-security/dists/stable/updates/non-free/binary-amd64/Packages.gz # index of udeb packages dists/$DIST[/folder]/$COMP/debian-installer/binary-$ARCH/Packages.[gz|xz] # Packages.[gz|xz] is an index of .udeb packages . # dists is the dists folder under the repository . # $DIST is a folder that has the # distribution suite name for # example stable , # or codename for example buster … # [/folder] is an optional folder in the # the $DIST folder , for example it can # be updates. # $COMP is a folder with the component # name , for example contrib or main … # debian-installer is a folder inside # the $COMP folder . # binary-$ARCH , is a folder where $ARCH # is the architecture name , for example # binary-amd64 , binary-mips … # As an example , the location of the # index of udeb binary packages , for the # amd64 architecture , contrib component, # stable distribution suite , and # https://deb.debian.org/debian/ repository # is # https://deb.debian.org/debian/dists/stable/contrib/debian-installer/binary-amd64/Packages.xz
Indexes of binary packages contain descriptions of .deb or .udeb packages . Each description consists of the Filename , Package name , Version number … The Filename contains the location from which we can download a package relative to the current repository … For example :
Package: 0ad-data Version: 0.0.23.1-1 Installed-Size: 2044173 Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org> Architecture: all Pre-Depends: dpkg (>= 1.15.6~) Suggests: 0ad Description: Real-time strategy game of ancient warfare (data files) Homepage: http://play0ad.com/ Description-md5: 26581e685027d5ae84824362a4ba59ee Tag: role::app-data Section: games Priority: optional Filename: pool/main/0/0ad-data/0ad-data_0.0.23.1-1_all.deb Size: 701878080 MD5sum: 48a0f2d3af77e4cf01638e4429bddbd8 SHA256: 0fa3fb9ef1999054d041f2425b677312e4d4e7bf43ac499665f7f69a21f8b0a9
deb-src is used to indicate that we want to download indexes of source packages . A source package is a .dsc package . .dsc packages are used to install the source code of applications , commands , utilities …
Indexes
of source packages are stored in files named
Sources.[gz|xz|bz2]
on the repository
URI ,
where
gz
or
xz
or
bz2
is
the compression that is used .
For each
distribution
/
component
we have an index of source packages.
# index of source packages dists/$DIST[/folder]/$COMP/source/Sources.[gz|xz] # Sources.[gz|xz] is an index of .dsc packages . # dists is the dists folder under the repository . # $DIST is a folder that has the # distribution suite name for example stable , # or codename for example buster … # [/folder] is an optional folder in the # the $DIST folder , for example it can # be updates. # $COMP is a folder with the component # name , for example contrib or main … # source , is a folder under the $comp # folder. # As an example , the location of the # index of dsc source packages , for the # main component, # stable distribution suite , and # https://deb.debian.org/debian/ repository # is # https://deb.debian.org/debian/dists/stable/main/source/Sources.xz # Another example , the location of the # index of dsc source packages , for the # contrib component, in the updates # folder of the oldstable distribution # suite , in the # http://security.debian.org/debian-security repository # is # http://security.debian.org/debian-security/dists/oldstable/updates/contrib/source/Sources.gz
Source packages indices contain the description of .dsc package . Each description consists of the Package name , its Version number , its Binary package , the Directory where we can download this source package relative the the current repository …
Package: 0ad Binary: 0ad Version: 0.0.23.1-2 Maintainer: Debian Games Team <pkg-games-devel@lists.alioth.debian.org> Uploaders: Vincent Cheng <vcheng@debian.org>, Ludovic Rousseau <rousseau@debian.org> Build-Depends: autoconf, debhelper (>= 10), dpkg-dev (>= 1.15.5), libboost-dev, libboost-filesystem-dev, libcurl4-gnutls-dev | libcurl4-dev, libenet-dev (>= 1.3), libgloox-dev (>= 1.0.10), libicu-dev, libminiupnpc-dev (>= 1.6), libnspr4-dev, libnvtt-dev (>= 2.0.8-1+dfsg-4~), libogg-dev, libopenal-dev, libpng-dev, libsdl2-dev (>= 2.0.2), libsodium-dev (>= 1.0.14), libvorbis-dev, libwxgtk3.0-dev | libwxgtk2.8-dev, libxcursor-dev, libxml2-dev, pkg-config, python, python3, zlib1g-dev Architecture: amd64 arm64 armhf i386 kfreebsd-amd64 kfreebsd-i386 Standards-Version: 4.1.4 Format: 3.0 (quilt) Files: 00145aa3a05b2013a7232b5c5a800a84 2473 0ad_0.0.23.1-2.dsc 4fa111410ea55de7a013406ac1013668 31922812 0ad_0.0.23.1.orig.tar.xz 1c472844ea3bf28a875b7c6031e395f3 71708 0ad_0.0.23.1-2.debian.tar.xz Vcs-Browser: https://salsa.debian.org/games-team/0ad Vcs-Git: https://salsa.debian.org/games-team/0ad.git Checksums-Sha256: 6af5313fb7c875c5aa4fdbcb6beb17131b60d6c440e59e2a14409688e8442744 2473 0ad_0.0.23.1-2.dsc 01bff7641ee08cac896c54d518d7e4b01752513105558f212e3199d747512a37 31922812 0ad_0.0.23.1.orig.tar.xz fe4a1943e2fa9fca4f9fa8f43e0e32f287bd2bbf93df1c7497b734784375fe46 71708 0ad_0.0.23.1-2.debian.tar.xz Homepage: http://play0ad.com/ Package-List: 0ad deb games optional arch=amd64,arm64,armhf,i386,kfreebsd-amd64,kfreebsd-i386 Directory: pool/main/0/0ad Priority: source Section: games
We
can pass options to
Type
. The
format of the options is
Type [ option1=value1 option2=value2 … ]
.
An option can have more than one value , separated by comma.
The specified options affects which indexes
apt
will download , and how these indexes are
downloaded .
For example the arch option specify the architecture of the indices that will be downloaded . The default architecture is the architecture that the apt program was compiled for .
# arch option , for the deb type deb [ arch=amd64,i386 ] http://deb.debian.org/debian buster main # deb : get indexes of binary packages # [ arch=amd64,i386 ] : get the indexes for # the amd64 and i386 architecture. # http:// : URI scheme. # deb.debian.org/debian : repository location. # buster : distribution . # main : component . # The .deb indexes that apt will download are : # http://deb.debian.org/debian/dists/buster/main/binary-amd64/Packages.xz # http://deb.debian.org/debian/dists/buster/main/binary-i386/Packages.xz
The by-hash option specifies how apt will download the indices . If set to yes apt will download the indices by using their hash sums and not their names if the server supports it. If the server does not support it then apt will download the indices by their names. The default value for this option is yes.
# by-hash option , for the deb type deb [ arch=amd64 by-hash=yes ] http://deb.debian.org/debian buster main # deb : get indexes of binary packages # [ arch=amd64 ] : get the indexes for # the amd64 architecture . # [ by-hash=yes ] : # download the indexes by # hash sum if the server supports it , # else download the indexes by their name. # http:// : URI scheme. # deb.debian.org/debian : repository location. # buster : distribution . # main : component . # The .deb index that apt will download, # if the server does not support by-hash : # http://deb.debian.org/debian/dists/buster/main/binary-amd64/Packages.xz # if the server supports by hash , and if # for example the md5 hash of # Packages.xz is 1f005105b180e13e020edd09044d24ed # apt will download : # http://deb.debian.org/debian/dists/buster/main/binary-amd64/by-hash/MD5Sum/1f005105b180e13e020edd09044d24ed