2011年6月27日 星期一

更新 ports tree

用csup更新port tree

//建立設定檔

#ee /etc/make.conf

//加入下列文字

DISTDIR = "/usr/home/distfiles"
MASTER_SITE_BACKUP?=    \
 http://ftp.tw.freebsd.org/FreeBSD/distfiles/${DIST_SUBDIR}/ \
 ftp://ftp1.tw.freebsd.org/pub/distfiles/${DIST_SUBDIR}/     \
 ftp://ftp.tku.edu.tw/OS/FreeBSD/distfiles/${DIST_SUBDIR}/       \
 ftp://cvsup.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/

MASTER_SITE_OVERRIDE?=  ${MASTER_SITE_BACKUP}


SUP_UPDATE= yes
SUP=        /usr/bin/csup
SUPFLAGS=   -4 -L 2 -z
SUPHOST=    cvsup4.tw.freebsd.org (換伺服器更新,可解決版本問題)
SUPFILE=     /usr/share/examples/cvsup/stable-supfile
PORTSSUPFILE=   /usr/share/examples/cvsup/ports-supfile

//更新方法一

cd /usr/src
cp /usr/share/examples/cvsup/stable-supfile .
ee stable-supfile
更改此行 *default host=cvsup.tw.FreeBSD.org

cp /usr/share/examples/cvsup/ports-supfile .
ee ports-supfile
更改此行 *default host=cvsup6.tw.FreeBSD.org

要更新 /src 內容, 直接執行
csup stable-supfile
要更新 ports , 直接執行
csup ports-supfile 或 csup -h cvsup6.tw.FreeBSD.org ports-supfile (-h 指定站台)

//更新方法二
//更新ports tree
# cd /usr/ports
# make update

//更新src
# cd /usr/src
# make update

沒有留言: