The main source list file /etc/apt/sources.list, also takes /etc/apt/sources.list.d/*, and the result is in union theory.
The source list file is in line units, each line is divided into multiple fields, and the fields are separated by blanks. The pound sign (#) starts with a comment line. The sample is as follows:
Sample installation source configuration (Debian 8 jessie):
deb http://ftp.tw.debian.org/debian/ jessie main contrib non-free
deb http://ftp.tw.debian.org/debian/ jessie-updates main contrib non-free
deb http://ftp.tw.debian.org/debian/ jessie-backports main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
deb http://ftp.yzu.edu.tw/Linux/debian-multimedia/ jessie main non-free
# deb http://ftp.cn.debian.org/debian/ jessie main contrib non-free
# deb http://ftp.cn.debian.org/debian/ jessie-updates main contrib non-free
# deb http://ftp.cn.debian.org/debian/ jessie-backports main contrib non-free
# deb http://ftp.cn.debian.org/debian-security/ jessie/updates main contrib non-free
# deb http://ftp.cn.debian.org/debian-multimedia/ jessie main non-free
Description of each field
The first field indicates the packet type. The value is only "deb" and "deb-src", which correspond to binary packages and source code packages respectively. Usually only binary packages are useful.
The second field indicates the mirror site, that is, "source"!
The URL locates to a directory, and there must be two subdirectories "dists" and "pool" under the directory. Such as: http://ftp.cn.debian.org/debian/, http://ftp.sjtu.edu.cn/ubuntu/.
( adsbygoogle = window.adsbygoogle || []).push({});
The third field indicates the "version type" of the package, tentatively called "warehouse".
Open a source and enter the "dists" subdirectory to see which warehouses are in the source, that is, the subdirectories under it.
The naming format is "system release name-repository name", such as "jessie-backports" "stretch-updates" of Debian, and "vivid-updates" "wily-proposed" of Ubuntu. The one without a warehouse name is the main warehouse.
Debian's stable and testing are links to specific system releases, which will change over time. For example, the current stable is jessie, so stable-backports and jessie-backports are equivalent. But I do not suggest using stable and testing, because after the next stable is released, your source will automatically point to a new version, but you have not read the release notes of the new version and are not ready to upgrade.
The Debian repository is basically the same as Ubuntu since squeeze. In addition to the main warehouse, there are:
"Security", Ubuntu is used to refer to security updates. That is, bug fixes that affect system security. Debian is a bit special, see below.
"Updates", non-security updates. That is, bug fixes that do not affect system security.
"Proposed-updates", pre-update. Small beta version. After that, it will enter "updates" or "security". Ubuntu only uses "proposed" without the suffix "updates".
"Backports", backup. After Debian stable is released, after a certain version of Ubuntu is officially released, all its software version numbers have been frozen, and all software only fixes bugs and does not add any features. But some people may need new features, or even some newer software does not have it at all. The warehouse was set up for this reason, but it owes official maintenance, and the content may not be available until some time after the system is officially released. This warehouse is in the second priority order, and the above-mentioned warehouses are in the first priority order. The packages in the second priority order must be specifically specified to install, see the --target-release option of apt-get(8) aptitude(8).
Tip: Not all versions have all the above repositories, please open the dists directory in the source to view.
The subsequent field indicates the type of package license.
The subsequent fields are ranked in no particular order, and the final result is the union. Divided by the license of the package itself and the license of the directly dependent package. Open a warehouse, you can see several subdirectories.
Debian has up to three
"Main" itself is free software, and all dependent packages are also free software. This type of software can be called pure free software, see https://www.debian.org/distrib/packages "Debian Free Software Guidelines".
"Contrib" itself is free software, but the dependencies are not pure, that is, there is at least one instance of contrib or non-free in the dependencies.
"Non-free" is not free software itself, regardless of dependencies. Of course, the software is free to use or try. One free case https://packages.debian.org/jessie/unrar, one trial https://packages.debian.org/jessie/rar for xx days.
Ubuntu has up to four
"Main", officially maintained free software.
"Universe", free software maintained by the community.
"Restricted", device-specific driver.
"Multiverse" is the same as Debian's "non-free".
Some alternative third-party sources may not follow the above conventions. In short, open the warehouse catalog and see for yourself.
Special features:
Debian security updates
Unlike Ubuntu, which is placed in the "security" repository, it is placed in a separate source. Major mirror sites usually put general packages in the "debian" directory one level down from the root, and security updates will be put in the "debian-security" directory, if available, such as http://ftp.cn.debian.org/debian-security/.
Debian officially recommends that all security updates are only updated from the official main site. Do not use other mirror sites unless you are very confident in the mirror site, see https://www.debian.org/security/index.en.html. Therefore, many mirror sites do not provide security update sources.
The form of the third field of security update is fixed as "version name/updates", such as "wheezy/updates" and "jessie/updates".
Debian multimedia source
Some multimedia software involves copyright issues, including hardware decoders, which are not officially included in Debian. There is a website dedicated to filling the vacancy, see http://www.deb-multimedia.org.
Last advice: don't enable multiple sources at the same time, just enable one source from the same warehouse, otherwise it will easily cause confusion. The following example lists multiple sets but only activates one set.
Recommended Posts