FreeBSD/CVSup

FreeBSD

dokuwiki.fl8.jp転載済

CVSupでPortsを最新にする。

portsは非常に便利なシステムですが、アプリケーションのアップグレードに関しては弱い部分があります。
CVSupはportsを管理することが可能で、どのアプリケーションが新しくなっているかを調べたりアプリケーションをアップグレードできます。
また、portsのインストールをより簡単に行うことが可能です。

インストール

# cd /usr/ports/net/cvsup-without-gui
# make clean
===>  Cleaning for libiconv-1.9.2_1
===>  Cleaning for gettext-0.14.5
===>  Cleaning for gmake-3.80_2
===>  Cleaning for libtool-1.5.20
===>  Cleaning for ezm3-1.2
===>  Cleaning for cvsup-without-gui-16.1h_2
# make install

ports-supfileを用意

# cp /usr/share/examples/cvsup/ports-supfile /etc/ports-supfile

/etc/ports-supfileを修正

# vi /etc/ports-supfile
---------------------------------
*default host=CHANGE_THIS.FreeBSD.org
              ↓
*default host=cvsup.jp.FreeBSD.org

どのバージョンのものが欲しいのか?

cvsup では,cvs で管理されているファイルの全てのバージョンのソースファイルを取得する事が可能です.
その為,バージョンを明確にしないと,どのバージョンのファイルを渡せばよいのかサーバ側で判断が出来なくなってしまいます.
バージョンの指定には,tag= 及び date= のフィールドを使用して指定する事が可能です.通常の場合は tag= フィールドのみを利用するのが一般的でしょう.
tag= フィールドで指定する場合,次のような感じで指定します.
ports システムで指定可能な tag は tag=. のみになる事に注意して下さい.

FreeBSD-currenttag=.
FreeBSD-6.1-RELEASEtag=RELENG_6_1_RELEASE
FreeBSD-6.1-STABLEtag=RELENG_6_1
FreeBSD-6-STABLEtag=RELENG_6
portstag=.

実行してみる

# cvsup -g -L 2 /etc/supfile
---------------------------------
.
.
.
.
.
.
 Edit ports/x11-wm/tpager/Makefile
  Add delta 1.5 2005.10.26.16.28.18 flz
 Edit ports/x11-wm/windowmaker/Makefile
  Add delta 1.127 2005.10.29.07.13.29 dougb
 Edit ports/x11-wm/xcompmgr/Makefile
  Add delta 1.4 2005.11.03.03.34.06 anholt
 Edit ports/x11-wm/xcompmgr/distinfo
  Add delta 1.3 2005.11.03.03.34.06 anholt
Shutting down connection to server
Finished successfully

自動設定

# crontab -e
---------------------------------
00 6 * * * root /usr/local/bin/cvsup -g -L 2 /etc/ports-supfile