Debian、Ubuntu 源列表說明

轉載:http://forum.ubuntu.org.cn/viewtopic.php?t=366506php

概貌:
源列表主文件爲 /etc/apt/sources.list,另兼取 /etc/apt/sources.list.d/*,最終結果以並集論。
源列表文件以行爲單位,每行分多個字段,字段間以空白符分隔。井號(#)開頭行爲註釋行。
ubuntu


字段說明:
第一字段,指示包類型。
取值只有「deb」「deb-src」兩個,分別對應二進制包和源碼包。一般只有二進制包對咱們有用。
第二字段,指示鏡像站點,即「源」!
URL 一般須要定位到某個目錄,通常是打開該目錄就能看到有「dists」「pool」兩個子目錄。看看
http://ftp.cn.debian.org/debianhttp://ftp.sjtu.edu.cn/ubuntu/
第三字段,指示包的「版本」,姑且稱爲「倉庫」。
打開一個源,再進入「dists」子目錄可見該「源」中有哪些「版本」可用,就是那些子目錄。一般都是大小版本用減號(-)連在一塊兒命名。
很明顯大版本號即系統的版本名稱,好比「squeeze」「wheezy」。沒有減號鏈接小版本的就是主版本。
Debian 的小版本名稱自 squeeze 起與 Ubuntu 基本相同。除主版本外,小版本有
「security」,Ubuntu 用於指安全性更新。即影響系統安全的 bug 修補。對此,Debian 特殊一些,見下文。
「updates」,非安全性更新。即不影響到系統安全的 bug 修補。
「proposed-updates」,預更新。小 beta 版。事後會進入「updates」或「security」。Ubuntu 僅用「proposed」,無後綴「updates」。
「backports」,後備。某系統版本自正式發行後,其全部軟件便會凍結版本號(按原始軟件發佈時間論),全部軟件只修 bug,不增長任何功能。但有些人可能須要更新的版本所提供的新功能,甚至某些較新的軟件根本就沒有。該倉庫正所以而設,但欠官方維護,且可能在系統正式發佈以後過一段時間纔有效。此倉庫版本處於第二優先順序,除非特別指明或原來沒有的軟件,不然不會被安裝。其他版本都處於第一優先順序。
後續字段,指示包許可類型。
後續字段排名不分前後,最終結果取其並集。
按包自己的許可及所直接依賴的包的許可劃分。打開一個源,進入「dists」子目錄,而後再進入某個版本目錄,又可見幾個子目錄。
Debian 最多有三種
「main」,自己是自由軟件,且全部直接依賴的包也都是自由軟件。
「contrib」,自己是自由軟件,但直接依賴的包中有某個是非自由軟件。
「non-free」,自己並不是自由軟件,不管依賴如何。固然,該軟件自己是能夠無償使用的。
Ubuntu 最多有四種
「main」,官方維護的自由軟件。
「universe」,社區維護的自由軟件。
「restricted」,設備專有驅動。
「multiverse」,同 Debian 的「non-free」。
某些另類的第三方源,不排除存在上述幾種以外的可能。總之,打開倉庫目錄本身看。
特別之處:
Debian 安全性更新
不像 Ubuntu 放在「security」倉庫,而是放在單獨一個源中。各大鏡像站一般都把通常的包放在根下來一級的「debian」目錄中,而安全性更新則會放在「debian-security」目錄中,若是有的話。
Debian 官方建議,全部安全性更新,只從官方(
http://security.debian.org/debian-security)更新,不要用其它的鏡像站,除非你對它很是放心。
安全性更新的第三字段形式固定爲「版本名/updates」,好比「squeeze/updates」「wheezy/updates」。
Debian 多媒體源
一些多媒體軟件因牽涉到版權問題,Debian 官方並未收錄,有一網站專門填補該空缺,見
http://www.deb-multimedia.org
最後忠告:
不要啓用太多的源,同一「版本」的源啓用一個便可,不然容易引發混亂。
實例:
Debian 7 wheezy
安全

#deb http://ftp.tw.debian.org/debian wheezy main contrib non-free
#deb http://security.debian.org/debian-security wheezy/updates main contrib non-free
#deb http://ftp.tw.debian.org/debian wheezy-updates main contrib non-free
## deb http://ftp.tw.debian.org/debian wheezy-proposed-updates main contrib non-free
#deb http://ftp.tw.debian.org/debian-multimedia wheezy main non-free
#deb http://ftp.tw.debian.org/debian wheezy-backports main contrib non-free
deb http://ftp.cn.debian.org/debian wheezy main contrib non-free
deb http://ftp.cn.debian.org/debian-security wheezy/updates main contrib non-free
deb http://ftp.cn.debian.org/debian wheezy-updates main contrib non-free
# deb http://ftp.cn.debian.org/debian wheezy-proposed-updates main contrib non-free
deb http://ftp.cn.debian.org/debian-multimedia wheezy main non-free
deb http://ftp.cn.debian.org/debian wheezy-backports main contrib non-free
#deb http://ftp.sjtu.edu.cn/debian wheezy main contrib non-free
#deb http://security.debian.org/debian-security wheezy/updates main contrib non-free
#deb http://ftp.sjtu.edu.cn/debian wheezy-updates main contrib non-free
## deb http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main contrib non-free
#deb http://ftp.cn.debian.org/debian-multimedia wheezy main non-free
#deb http://ftp.sjtu.edu.cn/debian wheezy-backports main contrib non-free
#deb http://ftp.debian.org/debian wheezy main contrib non-free
#deb http://security.debian.org/debian-security wheezy/updates main contrib non-free
#deb http://ftp.debian.org/debian wheezy-updates main contrib non-free
## deb http://ftp.debian.org/debian wheezy-proposed-updates main contrib non-free
#deb http://www.deb-multimedia.org wheezy main non-free
#deb http://ftp.debian.org/debian wheezy-backports main contrib non-free

Ubuntu 13.04 raring網站

deb http://debian.ustc.edu.cn/ubuntu/ raring main universe restricted multiverse
deb http://debian.ustc.edu.cn/ubuntu/ raring-security main universe restricted multiverse
deb http://debian.ustc.edu.cn/ubuntu/ raring-updates main universe restricted multiverse
# deb http://debian.ustc.edu.cn/ubuntu/ raring-proposed main universe restricted multiverse
deb http://debian.ustc.edu.cn/ubuntu/ raring-backports main universe restricted multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ raring main universe restricted multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ raring-security main universe restricted multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ raring-updates main universe restricted multiverse
## deb http://ftp.sjtu.edu.cn/ubuntu/ raring-proposed main universe restricted multiverse
#deb http://ftp.sjtu.edu.cn/ubuntu/ raring-backports main universe restricted multiverse
#deb http://mirrors.163.com/ubuntu/ raring main universe restricted multiverse
#deb http://mirrors.163.com/ubuntu/ raring-security main universe restricted multiverse
#deb http://mirrors.163.com/ubuntu/ raring-updates main universe restricted multiverse
## deb http://mirrors.163.com/ubuntu/ raring-proposed main universe restricted multiverse
#deb http://mirrors.163.com/ubuntu/ raring-backports main universe restricted multiverse
相關文章
相關標籤/搜索