Back to Howawan's Homepage to index to Yahoo's Homepage

nbsd03-0807072156/CVSの使い方 ......

inhalts

nbsd03-0807072156@以下は、 pserver方式のcvsはこのあたりにある文書。始めて成功したが、pserver式且ルートでだけで成功した。$ではだめだった。そのあとpkgsrcはchown -R masaにしてみたが。_SSHは成功しなかった。
●バイナリー配布
pkgsrc で提供しているバイナリーパッケージを使えば、ソースからすべてのものをコンパイルする必要はありません。NetBSD には、バイナリーパッケージ管理用のツールがあらかじめ附属しています。他のプラットフォームでは、パッケージ管理ツールをインストールするために、 pkgsrc をブートストラップする必要があります。パッケージの一覧は、 ここ で見られます (バイナリーパッケージへのリンクもあります)。
バイナリーパッケージは、ftp.NetBSD.org とミラーサイトの /pub/pkgsrc/packages/ ディレクトリーにあります (詳細は the pkgsrc guide をご覧ください)。お使いのプラットフォームに、バイナリーパッケージ管理用のツールがない場合、あるいはツールが古すぎる場合は、バイナリーパッケージと同じ場所にある bootstrap.tar.gz というアーカイブにツールが入っています。このアーカイブは、/ ディレクトリーに展開する必要があります。展開後は、/usr/pkg/sbin/pkg_add を実行してバイナリーパッケージをインストールすることができるようになります。詳しい説明は、the pkgsrc guide をご覧ください。
●ソース配布
anoncvs の使用 (top)
ここでは暗号化されていない anoncvs 接続について説明します。暗号化プロトコルを使いたい場合は、 後述の項目を参照してください。

  1. devel/scmcvs をインストールします。 もし NetBSD が 2000-09-04 以降の -current のソースから構築されていれば、 cvs はすでにインストールされています。
  2. 環境変数 CVSROOT を お好きな anoncvs サーバーを指すように設定します。 * csh(1) または shells/tcsh ユーザーの方:
    # setenv CVSROOT :pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot
    * For sh(1), ksh(1), または shells/bash2 ユーザーの方: $ CVSROOT= :pserver:anoncvs@anoncvs.NetBSD.org:/cvsroot; export CVSROOT
  3. $ cd /usr
    $ cvs login
    (パスワードとして "anoncvs" を使用してください)
    最初の checkout の際にはディレクトリーに対する書き込み権限が必要です。その後、ソースツリーの所有者を他のユーザーに変更できます。一つの方法は最初のチェックアウトは root で行ない、その後の使用のためにソースツリー全体を他のユーザーの所有に変更することです。 anoncvs over ssh の利用 (top)
    anoncvs の利用で説明した方法は、取り寄せたソースが正しいものであることを保証するため、 ssh 上でも使うことができます。ただし、そうすることで anoncvs サーバーにはかなりのオーバーヘッドがかかります。
    ミラー一覧に載っている ssh 接続に対応したサーバーでは、各項目ごとに、必要な情報を列挙しています。
    通常、 cvsroot の冒頭の ':pserver:' を削除し、お使いのシェルに応じた方法で、変数 CVS_RSH を 'ssh' に設定します。
    anoncvs を用いた NetBSD-current の追跡 (top) セットアップ

    * カーネルのみをチェックアウトする
    $ cd /usr
    $ cvs checkout -P src/sys
    これにより、カーネルのソースは /usr/src/sys に用意されます。 カーネルの作り方に関する情報は別のページで提供されています。 * ソースツリー全体をチェックアウトする(カーネルも含みます)

    $ cd /usr
    $ cvs checkout -P src
    これにより、NetBSD ソースの全体が /usr/src に用意されます。 注意
    最初に「ソース全体」のチェックアウトをするときは、 tarball を FTP で取得してローカルで展開するほうが、たいてい速くなります。こちらのほうがネットワークリンクをもっともよく使うからです。そうした後に cvs checkout/update を使うと、変更部分のみを送ることになり、送られるバイト数が最小限になります。
    * パーミッションの修正
    もしソースツリーを root 以外のユーザーの所有にしたければ (root で)次のようにして下さい。
    以上の英文(最後にcvsの使い方)
    # chown -R user /usr/src
    The primary download location for all pkgsrc files is ftp://ftp.NetBSD.org/pub/pkgsrc/. There are a number of subdirectories for different purposes, which are described in detail in Appendix C, Directory layout of the pkgsrc FTP server.
    The tar file for the current branch is in the directory current and is called pkgsrc.tar.gz. It is autogenerated daily.
    The tar file for the stable branch 2007Q4 is in the directory pkgsrc-2007Q4 and is also called pkgsrc-2007Q4.tar.gz.
    To download a pkgsrc stable tarball, run:
    $ ftp ftp://ftp.NetBSD.org/pub/pkgsrc/pkgsrc-200xQy/pkgsrc-200xQy.tar.gz
    Where pkgsrc-200xQy is the stable branch to be downloaded, for example, “pkgsrc-2007Q4”.
    Then, extract it with:
    $ tar -xzf pkgsrc-200xQy.tar.gz -C /usr
    This will create the directory pkgsrc/ in /usr/ and all the package source will be stored under /usr/pkgsrc/.
    To download pkgsrc-current, run:
    $ ftp ftp://ftp.NetBSD.org/pub/pkgsrc/current/pkgsrc.tar.gz
    2.1.2. Via SUP
    As an alternative to the tar file, you can get pkgsrc via the Software Update Protocol, SUP. To do so, make sure your supfile has a line
    release= pkgsrc
    in it, see the examples in /usr/share/examples/supfiles, and that the /usr/pkgsrc directory exists. Then, simply run:
    $ sup -v /path/to/your/supfile.
    2.1.3. Via anonymous CVS
    To do an initial (full) checkout of pkgsrc, you first have to set some environment variables. For the C-Shell, type:
    % setenv CVSROOT anoncvs@anoncvs.NetBSD.org:/cvsroot
    % setenv CVS_RSH ssh Or,
    the same for the bourne shell:
    $ export CVSROOT= "anoncvs@anoncvs.NetBSD.org:/cvsroot" $ export CVS_RSH= "ssh"
    By default, CVS doesn't do things like most people would expect it to do. But there is a way to convince CVS, by creating a file called .cvsrc in your home directory and saving the following lines to it. This file will save you lots of headache and some bug reports, so we strongly recommend it. You can find an explanation of this file in the CVS documentation.
    # recommended CVS configuration file from the pkgsrc guide
    checkout -P
    update -dP
    release -d
    diff -upN
    cvs -q -z3
    rdiff -u
    To fetch a specific pkgsrc stable branch from scratch, run:
    $ cd /usr
    $ cvs checkout -r pkgsrc-200xQy -P pkgsrc
    Where pkgsrc-200xQy is the stable branch to be checked out, for example, “pkgsrc-2007Q4”
    This will create the directory pkgsrc/ in your /usr/ directory and all the package source will be stored under /usr/pkgsrc/.
    To fetch the pkgsrc current branch, run:

    $ cd /usr
    $ cvs checkout -P pkgsrc
    2.2. Keeping pkgsrc up-to-date
    The preferred way to keep pkgsrc up-to-date is via CVS (which also works if you have first installed it via a tar file). It saves bandwidth and hard disk activity, compared to downloading the tar file again.
    2.2.1. Via tar files
    Warning
    When updating from a tar file, you first need to completely remove the old pkgsrc directory. Otherwise those files that have been removed from pkgsrc in the mean time will not be removed on your local disk, resulting in inconsistencies. When removing the old files, any changes that you have done to the pkgsrc files will be lost after updating. Therefore updating via CVS is strongly recommended.
    Note that by default the distfiles and the binary packages are saved in the pkgsrc tree, so don't forget to rescue them before updating. You can also configure pkgsrc to use other than the default directories by setting the DISTDIR and PACKAGES variables. See Chapter 5, Configuring pkgsrc for the details.
    To update pkgsrc from a tar file, download the tar file as explained above. Then, make sure that you have not made any changes to the files in the pkgsrc directory. Remove the pkgsrc directory and extract the new tar file. Done.
    2.2.2. Via CVS
    To update pkgsrc via CVS, make sure the environment variable CVS_RSH is set as above. Then, change to the pkgsrc directory and run cvs:
    $ cd /usr/pkgsrc
    $ cvs update -dP