- Merge the following from the English version:

r43886 -> r44016	head/ja_JP.eucJP/books/handbook/ports/chapter.xml
This commit is contained in:
Ryusuke SUZUKI 2014-12-24 08:20:54 +00:00
parent 7ca200b383
commit 10f113a58c
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=46119

View file

@ -1640,6 +1640,171 @@ The deinstallation will free 229 kB
</sect2>
</sect1>
<sect1 xml:id="ports-poudriere">
<title><application>Poudriere</application> を用いた
package の構築</title>
<para><application>Poudriere</application> は、&os; jails を用いて、
独立したコンパイル環境を構築します。
この中で、ports は、通常の &man.make.1; ターゲットおよび &man.pkg.8;
によってコンパイルされ、package 化されます。</para>
<sect2 xml:id="poudriere-installation-and-configuration">
<title>インストールと設定</title>
<para>Ports Collection
(<package role="port">ports-mgmt/poudriere</package>)
から <application>Poudriere</application>
をインストールしてください。</para>
<para>設定ファイルは、
<filename>/usr/local/etc/poudriere.conf</filename>
<filename>/usr/local/etc/poudriere.d/</filename> です。
設定例は
<filename>/usr/local/etc/poudriere.conf.sample</filename>
に用意されています。</para>
<para>必ずしも <acronym>ZFS</acronym> を使う必要はありませんが、
有用です。<acronym>ZFS</acronym> を使う際には、
<application>Poudriere</application><varname>ZPOOL</varname>
を指定する必要があります。
<varname>FREEBSD_HOST</varname> を最も近いミラーに設定してください。
他の値はデフォルトの値で十分です。
<varname>CCACHE_DIR</varname> を定義することで、
<package role="port">devel/ccache</package>
を使ったコンパイルのキャッシュが可能となり、
コンパイルで頻繁に使われるコードの構築時間を短縮できます。
<application>Poudriere</application> データセットを
<filename class="directory">/poudriere</filename>
にマウントされた独立したツリーに置くと良いでしょう。
これは機能的な変更ではなく、趣味の問題です。</para>
<para>同時に走らせるコンパイル数の定義には、
認識されたコアプロセッサの数が用いられます。
<acronym>RAM</acronym>
もしくはスワップ空間のどちらかの仮想メモリを十分用意してください。
もし、仮想メモリを使い切ってしまったら、jail の構築は中断し、
<!-- 壊れてしまい、-->
異常なメッセージが表示されることでしょう。</para>
</sect2>
<sect2 xml:id="poudriere-initialization">
<title>Jails および Port ツリーの初期化</title>
<para>最初は、&os; ツリーと ports ツリーをインストールすれば十分です。
<option>-j</option> および <option>-v</option>
で名前とバージョンを与えるだけで簡単にセットアップできます。
&os;/&arch.amd64; システムでは、
<option>-a</option> を使ってアーキテクチャに
<literal>i386</literal> または <literal>amd64</literal>
を設定できます。
デフォルトは、
<command>uname</command> で表示されるアーキテクチャが設定されます。</para>
<screen>&prompt.root; <userinput>poudriere jail -c -j <replaceable>10amd64</replaceable> -v <replaceable>10.0-RELEASE</replaceable></userinput>
====&gt;&gt; Creating 10amd64 fs... done
====&gt;&gt; Fetching base.txz for FreeBSD 10.0-RELEASE amd64
/poudriere/jails/10amd64/fromftp/base.txz 100% of 59 MB 1470 kBps 00m42s
====&gt;&gt; Extracting base.txz... done
====&gt;&gt; Fetching src.txz for FreeBSD 10.0-RELEASE amd64
/poudriere/jails/10amd64/fromftp/src.txz 100% of 107 MB 1476 kBps 01m14s
====&gt;&gt; Extracting src.txz... done
====&gt;&gt; Fetching games.txz for FreeBSD 10.0-RELEASE amd64
/poudriere/jails/10amd64/fromftp/games.txz 100% of 865 kB 734 kBps 00m01s
====&gt;&gt; Extracting games.txz... done
====&gt;&gt; Fetching lib32.txz for FreeBSD 10.0-RELEASE amd64
/poudriere/jails/10amd64/fromftp/lib32.txz 100% of 14 MB 1316 kBps 00m12s
====&gt;&gt; Extracting lib32.txz... done
====&gt;&gt; Cleaning up... done
====&gt;&gt; Jail 10amd64 10.0-RELEASE amd64 is ready to be used</screen>
<screen>&prompt.root; <userinput>poudriere ports -c -p <replaceable>local</replaceable></userinput>
====&gt;&gt; Creating local fs... done
====&gt;&gt; Extracting portstree "local"...
Looking up portsnap.FreeBSD.org mirrors... 7 mirrors found.
Fetching public key from ec2-eu-west-1.portsnap.freebsd.org... done.
Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... done.
Fetching snapshot metadata... done.
Fetching snapshot generated at Tue Feb 11 01:07:15 CET 2014:
94a3431f0ce567f6452ffde4fd3d7d3c6e1da143efec76100% of 69 MB 1246 kBps 00m57s
Extracting snapshot... done.
Verifying snapshot integrity... done.
Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... done.
Fetching snapshot metadata... done.
Updating from Tue Feb 11 01:07:15 CET 2014 to Tue Feb 11 16:05:20 CET 2014.
Fetching 4 metadata patches... done.
Applying metadata patches... done.
Fetching 0 metadata files... done.
Fetching 48 patches.
(48/48) 100.00% done.
done.
Applying patches...
done.
Fetching 1 new ports or files... done.
/poudriere/ports/tester/CHANGES
/poudriere/ports/tester/COPYRIGHT
[...]
Building new INDEX files... done.</screen>
<para>一つのコンピュータ上で、
複数の設定、複数の jails、異なる port ツリーから
<application>Poudriere</application> は port をビルドできます。
これらのコンビネーションのカスタム設定は
<emphasis>セット</emphasis> と呼ばれます。
詳細は &man.poudriere.8; の CUSTOMIZATION の章をご覧下さい。</para>
<para>ここで示される基本設定では、jail, ports そしてセット固有の
<filename>make.conf</filename><filename
class="directory">/usr/local/etc/poudriere.d</filename>
に置いてください。
この例でのファイル名
<filename><replaceable>10amd64-local-workstation</replaceable>-make.conf</filename>
は、jail 名、port 名そして、セット名の組み合わせで付けられています。
システムの <filename>make.conf</filename>
と、この新しいファイルは、ビルド時に結合され、構築した jail
で用いられる <filename>make.conf</filename> を作成します。</para>
<para>ビルドする package を
<filename><replaceable>10amd64-local-workstation</replaceable>-pkglist</filename> に記載してください。</para>
<programlisting>editors/emacs
devel/git
ports-mgmt/pkg
...</programlisting>
<para>オプションや依存関係の ports を設定してください。</para>
<screen>&prompt.root; <userinput>poudriere options -j <replaceable>10amd64</replaceable> -p <replaceable>local</replaceable> -z <replaceable>workstation</replaceable> -f <replaceable>workstation-pkglist</replaceable></userinput></screen>
<para>最後に packages を構築し、
&man.pkg.8; リポジトリを生成してください。</para>
<screen>&prompt.root; <userinput>poudriere bulk -j <replaceable>10amd64</replaceable> -p <replaceable>local</replaceable> -z <replaceable>workstation</replaceable> -f <replaceable>workstation-pkglist</replaceable></userinput></screen>
<para><keycombo
action="simul"><keycap>Ctrl</keycap><keycap>t</keycap></keycombo>
は現在の状況を表示します。
<application>Poudriere</application>
<filename>/poudriere/logs/bulk/<replaceable>jailname</replaceable>
</filename>
にあるファイルも構築します。
このファイルをウェブサーバと共に使うことで、
ビルド情報を表示できます。</para>
<para><application>Poudriere</application>
リポジトリから package
をインストールに利用できるようになりました。</para>
<para><application>Poudriere</application>
に関するより多くの情報については
&man.poudriere.8; およびメインのウェブサイトである <link
xlink:href="https://fossil.etoilebsd.net/poudriere/doc/trunk/doc/index.wiki"></link>
を参照してください。</para>
</sect2>
</sect1>
<sect1 xml:id="ports-nextsteps">
<title>インストール後の作業</title>