問:我如何修改源?
答: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 變量進行指定。我現在的配置文件:
======================================================================
實際上只要把/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"