2012-09-19

CVSUP

FreeBSD安裝完之後之後最重要的是日後 src、ports的安裝維護,FreeBSD本身提供一個CVSUP的這好用的工具。
一、安裝 cvsup
# cd /usr/ports/net/cvsup-without-gui
# make;make install;make clean

二、修改 /etc/make.conf來設定 cvsup的環境
# vi /etc/make.conf 加入
SUP_UPDATE= yes
SUP= /usr/local/bin/cvsup
SUPFLAGS= -g -L 2
# cvsup本身提供範例檔在 /usr/share/examples/cvsup 底下可直接引用
SUPFILE= /usr/share/examples/cvsup/stable-supfile # 升級 stable的cvsup檔
PORTSSUPFILE= /usr/share/examples/cvsup/ports-supfile # 升級 port tree的cvsup檔
DOCSUPFILE= /usr/share/examples/cvsup/doc-supfile # 升級 document的cvsup檔
# 國內cvsup連線的主機
SUPHOST= cvsup.tw.FreeBSD.org
#
國內主要的 FreeBSD distfiles mirror 站台MASTER_SITE_BACKUP?= \
ftp://ftp.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp5.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp10.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp2.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp3.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp4.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp7.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp8.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp9.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp11.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://ftp12.tw.freebsd.org/pub/FreeBSD/distfiles/${DIST_SUBDIR}/\
ftp://freebsd.nsysu.edu.tw/FreeBSD/ports/distfiles/${DIST_SUBDIR}/\
ftp://ftp.freebsd.org/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/

MASTER_SITE_OVERRIDE?= ${MASTER_SITE_BACKUP}
找到上述三個 SUPFILE 修改裡面的
*default host= cvsup.tw.FreeBSD.org

三、升級
升級 ports tree
# cd /usr/ports
# make update
升級 src
# cd /usr/src
# make update

沒有留言: