問:我如何修改源。
答: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"