如何配置gentoo的源

問:我如何修改源?

答:Gentoo中沒有源的概念。portage 與 distfiles 合起來可以跟源的概念等問。
portage裏裝的是ebuild, 可以說是軟件包的數據庫,指導portage從哪裏下載源碼包以及從何外下載。

distfile裏就是源碼包了。一般的源碼包會被放在gentoo服務器中的distfiles文件夾中。
其他有些特殊的源碼包(協議或體積大小等關係),要從軟件的官方網站下載,
這可以由ebuild指定。再有些,必須簽定用戶協議的,portage會提示用戶手動到官網下載,
並放置於 /usr/portage/distfiles 中。

portage對應的就是SYNC鏡像,distfiles對應的就是GENTOO_MIRRORS。
可以通過修改 /etc/make.conf 中的 SYNC 和 GENTOO_MIRRORS 變量進行指定。我現在的配置文件:

代碼:
SYNC="rsync://64.127.121.98/gentoo-portage" GENTOO_MIRRORS="ftp://gentoo.anheng.com.cn/gentoo/ ftp://ftp.linuxforum.net/gentoo http://mirror.uni-c.dk/pub/gentoo/ http://mirror.gentoo.gr.jp/ http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO ftp://ftp.twaren.net/Linux/Gentoo/ ftp://ftp.ecc.u-tokyo.ac.jp/GENTOO"

======================================================================

實際上只要把/etc/make.conf文件寫成如下形式即可(蘭大gentoo源):
# These settings were set by the catalyst build script that automatically
# built this stage.
# Please consult /usr/share/portage/config/make.conf.example for a more
# detailed example.
#CFLAGS="-O2 -march=i686 -pipe"
#CXXFLAGS="${CFLAGS}"
# WARNING: Changing your CHOST is not something that should be done lightly.
# Please consult http://www.gentoo.org/doc/en/change-chost.xml before changing.
#CHOST="i686-pc-linux-gnu"

GENTOO_MIRRORS="ftp://mirror.lzu.edu.cn/gentoo"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章