まずはCVSリポジトリを取得してみる。
frodo%(104)cvs -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos login
Logging in to :pserver:anonymous@cvs.sourceforge.jp:2401/cvsroot/hos
CVS password:
cvs login: failed to open /home/m-arai/.cvspass for reading: No such file or directory
cvs [login aborted]: fatal error: exiting
パスワード要求にを空のリターンで答えたら、~/.cvspassが読めないとぬかしてきた。
frodo%(105)touch ~/.cvspass
空の~/.cvspassを作ってやる。
frodo%(106)cvs -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos login
Logging in to :pserver:anonymous@cvs.sourceforge.jp:2401/cvsroot/hos
CVS password:
frodo%(107)
つつがなく完了。
frodo%(107)cvs -z3 -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos co
cvs [checkout aborted]: must specify at least one module or directory
モジュールなんて何もないんだけどな…。ディレクトリでもいいのか。
frodo%(108)cvs -z3 -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos co /
cvs server: warning: cannot make directory CVS in /: Permission denied
cvs [server aborted]: cannot make directory CVS in /: Permission denied
hosのリポジトリのルートのつもりで / にしてみたが駄目か。
frodo%(109)cvs -z3 -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos co /cvsroot/hos/
cvs server: cannot find module `/cvsroot/hos' - ignored
cvs [checkout aborted]: cannot expand modules
これでも駄目。じゃぁ、"."ならどうだ。
frodo%(110)cvs -z3 -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos co .
cvs server: Updating .
cvs server: Updating CVSROOT
U CVSROOT/checkoutlist
U CVSROOT/commitinfo
U CVSROOT/config
U CVSROOT/cvswrappers
U CVSROOT/editinfo
U CVSROOT/loginfo
U CVSROOT/modules
U CVSROOT/notify
U CVSROOT/rcsinfo
U CVSROOT/taginfo
U CVSROOT/verifymsg
frodo%(111)ls
CVS/ CVSROOT/
frodo%(114)ls -lR
total 2
drwxrwxr-x 2 m-arai staff 512 Jul 2 20:47 CVS/
drwxrwxr-x 3 m-arai staff 512 Jul 2 20:47 CVSROOT/
./CVS:
total 4
-rw-rw-r-- 1 m-arai staff 2 Jul 2 20:47 Entries
-rw-rw-r-- 1 m-arai staff 16 Jul 2 20:47 Entries.Log
-rw-rw-r-- 1 m-arai staff 2 Jul 2 20:47 Repository
-rw-rw-r-- 1 m-arai staff 51 Jul 2 20:47 Root
./CVSROOT:
total 16
drwxrwxr-x 2 m-arai staff 512 Jul 2 20:47 CVS/
-rw-rw-r-- 1 m-arai staff 493 Jul 1 12:16 checkoutlist
-rw-rw-r-- 1 m-arai staff 760 Jul 1 12:16 commitinfo
-rw-rw-r-- 1 m-arai staff 527 Jul 1 12:16 config
-rw-rw-r-- 1 m-arai staff 753 Jul 1 12:16 cvswrappers
-rw-rw-r-- 1 m-arai staff 1025 Jul 1 12:16 editinfo
-rw-rw-r-- 1 m-arai staff 1141 Jul 1 12:16 loginfo
-rw-rw-r-- 1 m-arai staff 1151 Jul 1 12:16 modules
-rw-rw-r-- 1 m-arai staff 564 Jul 1 12:16 notify
-rw-rw-r-- 1 m-arai staff 649 Jul 1 12:16 rcsinfo
-rw-rw-r-- 1 m-arai staff 879 Jul 1 12:16 taginfo
-rw-rw-r-- 1 m-arai staff 1026 Jul 1 12:16 verifymsg
./CVSROOT/CVS:
total 3
-rw-rw-r-- 1 m-arai staff 455 Jul 2 20:47 Entries
-rw-rw-r-- 1 m-arai staff 8 Jul 2 20:47 Repository
-rw-rw-r-- 1 m-arai staff 51 Jul 2 20:47 Root
frodo%(115)
取得出来た。
今度はSSH経由の…そういえば、SSHの鍵を登録していなかった。
samwise%(124)ssh-keygen
Generating public/private rsa1 key pair.
Enter file in which to save the key (/home/m-arai/.ssh/identity):
Created directory '/home/m-arai/.ssh'.
Enter passphrase (empty for no passphrase): ←パスフレーズ入力(エコー無)
Enter same passphrase again: ←パスフレーズ再入力(エコー無)
Your identification has been saved in /home/m-arai/.ssh/identity.
Your public key has been saved in /home/m-arai/.ssh/identity.pub.
The key fingerprint is:
XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX m-arai@samwise
入力されたパスフレーズから、秘密鍵(クライアント側で保持)として~/.ssh/identity、公開鍵(ログインするリモートに~/.ssh/authorized_key
に加える)として~/.ssh/identity.pubが生成された。
さて、こいつをsourceforge.jpの方に…Xを上げて、netscapeと…ログイン、
アカウント名、パスワードっと。ログイン!…何故か固まる。仕方無い。
IEからやるか。Winで再起動。よしよし。ログインはOK。アカウント管理から
公開鍵の登録と。
~/.ssh/identify.pubを持ってきて…
1024 35 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX m-arai
をコピー&ペースト。
おや、テキストエリアでは、
1024 35
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX m-arai
な風に見えるな。改行が入ってはいけないのだが。DELしても繋がらない。
きっとこういうものなのだろう。
登録と。
TTSSHでログイン確認と。多少文句を言われたがOK。Linuxだ。bashはちょっと
違和感がある…しかしchshで変更できん。
さて、FreeBSDに戻って、slogin shells.sourceforge.jpと。
frodo%(102)slogin shells.sourceforge.jp
The authenticity of host 'shells.sourceforge.jp (61.215.208.26)' can't be established.
RSA1 key fingerprint is ab:ea:b4:05:02:45:96:1a:06:f0:22:f9:a3:02:e1:33.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'shells.sourceforge.jp' (RSA1) to the list of known hosts.
Enter passphrase for RSA key 'm-arai@frodo':
Linux sf-usr-shell 2.4.17-shells1 #1 SMP Tue Feb 19 18:54:11 JST 2002 i686 unknown
Most of the programs included with the Debian GNU/Linux system are
freely redistributable; the exact distribution terms for each program
are described in the individual files in /usr/share/doc/*/copyright
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Jul 2 21:19:37 2002 from XXXX.XXXXX.XX.XX
m-arai@sf-usr-shell:~$
m-arai@sf-usr-shell:~$ set
BASH=/bin/bash
BASH_VERSINFO=([0]="2" [1]="05a" [2]="0" [3]="1" [4]="release" [5]="i386-pc-linux-gnu")
BASH_VERSION='2.05a.0(1)-release'
COLUMNS=81
DIRSTACK=()
EUID=20309
GROUPS=()
HISTFILE=/home/users/m/m-/m-arai/.bash_history
HISTFILESIZE=500
HISTSIZE=500
HOME=/home/users/m/m-/m-arai
HOSTNAME=sf-usr-shell
HOSTTYPE=i386
IFS=$' \t\n'
LANG=C
LINES=30
LOGNAME=m-arai
MACHTYPE=i386-pc-linux-gnu
MAIL=/var/mail/m-arai
MAILCHECK=60
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
PATH=/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games
PIPESTATUS=([0]="0")
PPID=8048
PS1='\u@\h:\w\$ '
PS2='> '
PS4='+ '
PWD=/home/users/m/m-/m-arai
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:histexpand:monitor:history:interactive-comments:emacs
SHLVL=1
SSH_CLIENT='XXX.XXX.XXX.XXX XXXXX XX'
SSH_TTY=/dev/pts/0
TERM=kterm
UID=20309
USER=m-arai
_=ls
m-arai@sf-usr-shell:~$
某ディレクトリを訪問。
m-arai@sf-usr-shell:/home/users/r/ry/ryuz/.ssh$ ls
authorized_keys
m-arai@sf-usr-shell:/home/users/r/ry/ryuz/.ssh$
準備は済まされたようだね。(^^)
m-arai@sf-usr-shell:/home/users/h/ha/hamayan$ cd .ssh
bash: cd: .ssh: No such file or directory
m-arai@sf-usr-shell:/home/users/h/ha/hamayan$
まだみたい。(^^)
今度は開発者としてリポジトリをゲットだぜ!
まずはCVS_RSHを設定だ。
frodo%(112)setenv CVS_RSH=ssh
frodo%(115)cvs -z3 -d:ext:m-arai@SourceForge:/cvsroot/cvs.sourceforge.jp login
cvs login: can only use `login' command with the 'pserver' method
cvs [login aborted]: CVSROOT: :ext:m-arai@SourceForge:/cvsroot/cvs.sourceforge.jp
開発者としてはloginは要らない訳か。
frodo%(120)cvs -z3 -d:ext:m-arai@SourceForge:/cvsroot/cvs.sourceforge.jp co .
cvs [checkout aborted]: cannot exec ssh=: No such file or directory
cvs [checkout aborted]: end of file from server (consult above messages if any)
ウゲッ。
frodo%(121)setenv CVS_RSH ssh
はずかし〜。
frodo%(122)cvs -z3 -d:ext:m-arai@SourceForge:/cvsroot/cvs.sourceforge.jp co .
ssh: SourceForge: No address associated with hostname
cvs [checkout aborted]: end of file from server (consult above messages if any)
そういえば、ホスト名がSourceForgeだけじゃだめだよな。それにパスがおかしいよ。
frodo%(127)cvs -z3 -d:ext:m-arai@cvs.SourceForge.jp:/cvsroot/hos co .
The authenticity of host 'cvs.sourceforge.jp (61.215.208.25)' can't be established.
RSA1 key fingerprint is 44:41:ea:c1:91:b9:0c:0c:0d:fc:58:1e:a8:ec:89:8b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'cvs.sourceforge.jp' (RSA1) to the list of known hosts.
Enter passphrase for RSA key 'm-arai@frodo':
cvs server: Updating .
cvs server: Updating CVSROOT
U CVSROOT/checkoutlist
U CVSROOT/commitinfo
U CVSROOT/config
U CVSROOT/cvswrappers
U CVSROOT/editinfo
U CVSROOT/loginfo
U CVSROOT/modules
U CVSROOT/notify
U CVSROOT/rcsinfo
U CVSROOT/taginfo
U CVSROOT/verifymsg
frodo%(128)
いけたようだ。
それでは、htdocというディレクトリを掘って、http://hos.sourceforge.jp/の
中身を入れるとしよう。
frodo%(128)mkdir htdoc
frodo%(129)ls
CVS/ CVSROOT/ htdoc/
cvs add かな。
frodo%(130)cvs add htdoc/
^Ccvs [add aborted]: received interrupt signal
おおう。ここでの操作はすぐに本体に直結するんだ。びっくりしてCtrl-Cしち
まったぜ。
まずはおとなしくupdateしてみるか。
frodo%(131)cvs update
Enter passphrase for RSA key 'm-arai@frodo':
? htdoc
cvs server: Updating .
cvs server: Updating CVSROOT
frodo%(132)
手元に謎のディレクトリhtdocがあって、本体の方には何の変更も無いと。
frodo%(132)ls htdoc/
htdoc:
chalk.jpg index.html
この二つが記念すべき最初の具。
frodo%(133)cvs add htdoc
Enter passphrase for RSA key 'm-arai@frodo':
? htdoc/chalk.jpg
? htdoc/index.html
Directory /cvsroot/hos/htdoc added to the repository
frodo%(134)cd htdoc/
frodo%(135)ls
CVS/ chalk.jpg index.html
frodo%(137)cat CVS/*
D
htdoc
:ext:m-arai@cvs.SourceForge.jp:/cvsroot/hos
frodo%(138)ls
CVS/ chalk.jpg index.html
frodo%(139)cvs add chalk.jpg index.html
Enter passphrase for RSA key 'm-arai@frodo':
cvs server: scheduling file `chalk.jpg' for addition
cvs server: scheduling file `index.html' for addition
cvs server: use 'cvs commit' to add these files permanently
frodo%(140)cd ..
addの度にRSAキーの入力を求められたが、これは自動化できる。
そいじゃ、一丁commitしてみるか!
frodo%(142)cvs commit
cvs commit: Examining .
cvs commit: Examining CVSROOT
cvs commit: Examining htdoc
Enter passphrase for RSA key 'm-arai@frodo':
エディタ(mule)が立ち上がり、ログファイルの編集。
つつがなく編集を終え、エディタを終了。
RCS file: /cvsroot/hos/htdoc/chalk.jpg,v
done
Checking in htdoc/chalk.jpg;
/cvsroot/hos/htdoc/chalk.jpg,v <-- chalk.jpg
initial revision: 1.1
done
RCS file: /cvsroot/hos/htdoc/index.html,v
done
Checking in htdoc/index.html;
/cvsroot/hos/htdoc/index.html,v <-- index.html
initial revision: 1.1
done
frodo%(143)
commit 完了?WEBで調べると…出来てる。OK。
つまるとことろ、開発者で落したリポジトリに対してファイルの作成や
編集、削除を行ない、それをcvs commitするだけだな。
ちょっとindex.htmlを修正だ。sourceforge.jpのロゴが入らなきゃならなかっ
たのだ。
ローカルのリポジトリ内のファイルを修正。
まずはupdateしてみる。
frodo%(101)cvs update
Enter passphrase for RSA key 'm-arai@frodo':
cvs server: Updating .
M index.html
index.htmlに修正が加えられているのが分る。ではcommit。
frodo%(102)cvs commit
cvs commit: Examining .
Enter passphrase for RSA key 'm-arai@frodo':
ログ編集。漢字コードはEUC。WindowsのCVSには、ログについては自動的に
SJIS→EUC変換を行なってくれるものもあるらしい。
---------------------------------------------------------------------------
sourceforge.jpのロゴを挿入
CVS: ----------------------------------------------------------------------
CVS: Enter Log. Lines beginning with `CVS:' are removed automatically
CVS:
CVS: Committing in .
CVS:
CVS: Modified Files:
CVS: index.html
CVS: ----------------------------------------------------------------------
---------------------------------------------------------------------------
編集終了
/cvsroot/hos/htdoc/index.html,v <-- index.html
new revision: 1.2; previous revision: 1.1
done
frodo%(104)
つつがなく変更が本元のリポジトリにも伝わる。
さてと、それじゃぁこいつを早速http://hos.sourceforge.jp/に反映させなきゃ
な。
まずはshells.sourceforge.jpにsshでログインして、っと。
m-arai@sf-usr-shell:~$ cd /home/groups/h/ho/hos/
プロジェクトのディレクトリに移動して…ls。
m-arai@sf-usr-shell:/home/groups/h/ho/hos/htdoc$ ls
cgi-bin htdocs
ゲゲゲッ!htdoc"s"ですかぁ!間違えた…ショボイ…し、仕方ない…まずは
やらねば。
あらかじめscpでshells.sourceforge.jpのホームに送っておいたスクリプト
を実行する。
------------- webup.sh ------------
#!/bin/sh
cvs -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos co htdoc
-----------------------------------
m-arai@sf-usr-shell:/home/groups/h/ho/hos$ sh ~/webup.sh
Logging in to :pserver:anonymous@cvs.sourceforge.jp:2401/cvsroot/hos
CVS password: ←エンター空打ち
cvs server: Updating htdoc
U htdoc/chalk.jpg
U htdoc/index.html
htdoc以下のリポジトリがプロジェクトのディレクトリに展開される。
このようにしてやれば、誰でも簡単にhtdoc以下をCVSリポジトリの最新状態に
更新することが出来る筈だ。
おっと、忘れずに
m-arai@sf-usr-shell:/home/groups/h/ho/hos$ rmdir htdocs
m-arai@sf-usr-shell:/home/groups/h/ho/hos$ ln -s htdoc htdocs
しかし…これは後で何とかしたほうが良いのだろうな…。
ん…誰でも?
m-arai@sf-usr-shell:/home/groups/h/ho/hos$ ls -lR.
:
total 8
drwxrwsr-x 2 dummy hos 4096 Jul 1 12:15 cgi-bin
drwxr-sr-x 3 m-arai hos 4096 Jul 3 18:12 htdoc
lrwxrwxrwx 1 m-arai hos 5 Jul 3 00:50 htdocs -> htdoc
./cgi-bin:
total 0
./htdoc:
total 12
drwxr-sr-x 2 m-arai hos 4096 Jul 3 18:12 CVS
-rw-r--r-- 1 m-arai hos 1472 Jul 2 23:18 chalk.jpg
-rw-r--r-- 1 m-arai hos 1125 Jul 3 00:47 index.html
./htdoc/CVS:
total 12
-rw-r--r-- 1 m-arai hos 87 Jul 3 18:12 Entries
-rw-r--r-- 1 m-arai hos 6 Jul 3 18:12 Repository
-rw-r--r-- 1 m-arai hos 51 Jul 3 18:12 Root
これじゃ、私(m-arai)しか更新できんな…
m-arai@sf-usr-shell:/home/groups/h/ho/hos$ chmod g+w *
chmod: changing permissions of `cgi-bin': Operation not permitted
cgi-binまで変更しようとして怒られちまった。でも、とにかく。
m-arai@sf-usr-shell:/home/groups/h/ho/hos$ ls -lR
.:
total 8
drwxrwsr-x 2 dummy hos 4096 Jul 1 12:15 cgi-bin
drwxrwsr-x 3 m-arai hos 4096 Jul 3 18:12 htdoc
lrwxrwxrwx 1 m-arai hos 5 Jul 3 00:50 htdocs -> htdoc
./cgi-bin:
total 0
./htdoc:
total 12
drwxrwsr-x 2 m-arai hos 4096 Jul 3 18:12 CVS
-rw-rw-r-- 1 m-arai hos 1472 Jul 2 23:18 chalk.jpg
-rw-rw-r-- 1 m-arai hos 1125 Jul 3 00:47 index.html
./htdoc/CVS:
total 12
-rw-rw-r-- 1 m-arai hos 87 Jul 3 18:12 Entries
-rw-rw-r-- 1 m-arai hos 6 Jul 3 18:12 Repository
-rw-rw-r-- 1 m-arai hos 51 Jul 3 18:12 Root
これで、hosグループに属した者なら誰でもCVSリポジトリのhtdocの最新状
態にすることが出来るようになった(筈)。
取り敢えずのまとめ。
http://hos.soourceforge.jp/の更新手続き。
1. 開発者でhosのCVSリポジトリの最新状態を取得
2. htdoc以下を更新。
ファイル追加はcvs add
ファイル削除はcvs remove
を忘れずに。
3. cvs updateでコリジョンが無いかを確認("C"が発生した場合、手作業が必
要になる。どのようなものかはまだ知りません。mOm)
3. cvs commitで更新を反映させる
4. shells.sourceforge.jpにログイン
5. 以下のコマンドを実行
$ cd /home/groups/h/ho/hos/
$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos login
$ cvs -z3 -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos co htdoc
$ chmod -R g+w htdoc
但し、以下のスクリプトを~m-arai/bin/に置いておくので、
$ ~m-arai/bin/webup.sh
でもOK。
------------- webup.sh ------------
#!/bin/sh
cd /home/groups/h/ho/hos/
cvs -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos login
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.jp:/cvsroot/hos co htdoc
chmod -R g+w htdoc
-----------------------------------
htdocをhtdocsに改名したいとか、色々文句の付け所は多いですが、暫定とい
う事で納得して下され〜。