[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pkgsrc/doc/guide/files/using.xml: 1.21 -> 1.22



以下のページの更新をしました。ツッコミをお願いします。

pkgsrc/doc/guide/files/using.xml: 1.21 -> 1.22

> revision 1.22
> date: 2006/07/29 15:57:04;  author: rillig;  state: Exp;  lines: +132 -16
> Moved all the pkgsrc documentation from outside the pkgsrc guide to
> here. There's still much to do to avoid repetition and such, but
> the first steps are done.

追加された部分は、
htdocs/Documentation/software/packages.xml と同じなので、
訳も流用しています。

火曜日までに異議がなければ、 commit します。

以下、訳と原文それぞれの新旧の差分です。

--- using.xml.orig	2006-12-09 01:44:56.000000000 +0900
+++ using.xml	2006-12-09 01:44:56.000000000 +0900
@@ -1,6 +1,6 @@
-<!-- $NetBSD: using.xml,v 1.21 2006/07/29 14:14:23 rillig Exp $ -->
+<!-- $NetBSD: using.xml,v 1.22 2006/07/29 15:57:04 rillig Exp $ -->
 <!-- Based on english version: -->
-<!-- NetBSD: using.xml,v 1.21 2006/07/29 14:14:23 rillig Exp   -->
+<!-- NetBSD: using.xml,v 1.22 2006/07/29 15:57:04 rillig Exp   -->
 
 <chapter id="using"> <?dbhtml filename="using.html"?>
 <title>pkgsrc を使う</title>
@@ -161,6 +161,65 @@
 
 </sect2>
 
+<sect2 id="vulnerabilities">
+<title>インストール済パッケージの脆弱性チェック</title>
+
+<para>
+NetBSD セキュリティーオフィサーとパッケージグループでは、
+pkgsrc に含まれる (あるいは含まれていた) パッケージの既知の脆弱性のリストを
+保守しています。このリストは、 NetBSD FTP サイトの
+<ulink url="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/vulnerabilities"/>
+から入手できます
+</para>
+
+<para>
+<filename role="pkg">security/audit-packages</filename> を使うと、
+このリストを自動的にダウンロードし、
+システムにインストールされているパッケージすべてについて
+セキュリティー検証をすることができます。
+</para>
+
+<para>
+<filename role="pkg">security/audit-packages</filename>
+は、ふたつの部分からできています。
+ひとつは <quote>download-vulnerability-list</quote> で、 NetBSD FTP サイトから
+脆弱性のリストをダウンロードするものです。もうひとつは
+<quote>audit-packages</quote> で、インストールされているパッケージに脆弱性が
+ないかどうか検証するものです。脆弱性のあるパッケージがあった場合、
+次のように出力してくれます:
+</para>
+
+<screen>Package samba-2.0.9 has a local-root-shell vulnerability, see
+http://www.samba.org/samba/whatsnew/macroexploit.html</screen>
+
+<para>
+<filename 
+role="pkg">security/audit-packages</filename>
+では、
+<ulink url="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/vulnerabilities">vulnerabilities</ulink>
+ファイルを毎日ダウンロードして、さらに、パッケージの検証を
+daily security script で行なうように設定することができます。
+これについての詳細は、 <filename role="pkg">security/audit-packages</filename> の <ulink
+url="http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/security/audit-packages/MESSAGE?rev=HEAD&amp;content-type=text/x-cvsweb-markup">MESSAGE</ulink>
+ファイルに書かれています。
+</para>
+</sect2>
+
+<sect2 id="pkg_versions">
+<title>インストール済パッケージのより新しいバージョンが pkgsrc にあるかどうか調べる</title>
+<para>
+インストール済パッケージが最新かどうかを確認するには、
+<filename role="pkg">pkgtools/pkglint</filename> をインストールして、
+<command>lintpkgsrc</command> に <quote>-i</quote> を付けて実行します。たとえば以下のようになります。
+</para>
+<screen><prompt>%</prompt> <userinput>lintpkgsrc -i</userinput>
+...
+Version mismatch: 'tcsh' 6.09.00 vs 6.10.00</screen>
+<para>このようになった場合、パッケージを更新し、そのパッケージに依存しているパッケージをすべて再構築するために、
+<command>make update</command> を使うことができます。
+</para>
+</sect2>
+
 <sect2 id="using.pkg_admin">
 <title>その他の管理用機能</title>
 
@@ -188,7 +247,23 @@
   <sect1 id="building-packages-from-source">
     <title>ソースからパッケージを構築する</title>
 
-    <para> ここでは、パッケージがすでに pkgsrc に含まれていると仮定
+<para>
+pkgsrc を入手すると、 <filename>pkgsrc</filename> ディレクトリーには、
+カテゴリー別に整理されたパッケージ一式が含まれます。
+オンラインでパッケージの索引を見られますし、また、 <filename>pkgsrc</filename>
+ディレクトリーで <command>make readme</command> してローカルで <filename>README.html</filename>
+を作って、 <filename role="pkg">www/lynx</filename> や
+<filename role="pkg">www/mozilla</filename> などの好みの
+web ブラウザーで見られるようにすることもできます。</para>
+
+<para>パッケージのインストール先の<emphasis>プレフィックス</emphasis>は、
+デフォルトでは <filename>/usr/pkg</filename> です。これを変えたい場合は、
+<filename>mk.conf</filename> で <varname>LOCALBASE</varname>
+を設定してください。一つのシステム内で複数の
+<varname>LOCALBASE</varname> を定義して使い分けるようなことはしないでください
+(chroot 環境内は除く)。 </para>
+
+    <para>以下、本章では、パッケージがすでに pkgsrc に含まれていると仮定
       しています。もし、そうでなれば、<xref linkend="developers-guide"/>で、
       パッケージを新たに作る方法をご覧ください。 </para>
 
@@ -212,6 +287,16 @@
       のダウンロードです。配布ファイルがまだダウンロードされていない場合、
       pkgsrc は自動的に配布ファイルを取得します。</para>
 
+<para>
+<filename>distfiles</filename> ディレクトリー
+に必要なファイルが
+すでに存在していれば、インターネットに接続する必要はありません。
+CD-ROMなどにdistfilesがある場合には、CD-ROMを <filename>/cdrom</filename> にmountし、
+<screen>DISTDIR=/cdrom/pkgsrc/distfiles</screen>
+を <filename>mk.conf</filename>
+に加えて、使うことができます。
+</para>
+
       <para>主要な配布サイトをあなたのところに近いサイトで上書きす
         ることができます。
         <filename>pkgsrc/mk/defaults/mk.conf</filename>の例の、特に<varname>MASTER_SORT</varname>,
@@ -224,18 +309,29 @@
         <filename>/etc/mk.conf</filename>
         ファイルにその定義を書き加えておくこともできます。</para>
 
-      <para>もし、インターネットへ常時接続しておらず、ダウンロードするファイルを知りた
-        い場合は、<command>make fetch-list</command>を実行すれば、必要なファイルがわかります。それ
-        らの配布ファイルを
-        <filename>/usr/pkgsrc/distfiles</filename>に置いてください。</para>
+<para>
+パッケージが他のパッケージ(例えば <filename role="pkg">meta-pkgs/kde3</filename> など)
+に依存している場合、
+ダウンロードとコンパイルを交互に繰り返すことがあります。
+最初に必要なすべてのソースを確実にダウンロードするには、
+次のコマンドを使用します:
+<screen><prompt>%</prompt> <userinput>make fetch-list | sh</userinput></screen>
+このコマンドは必要なファイルを取ってきて<filename>distfiles</filename> ディレクトリー
+に保存するためのシェルコマンドを出力、実行します。必要なファイルを手動で
+ダウンロードするという方法もあります。
+</para>
+
     </sect2>
 
     <sect2 id="how-to-build-and-install">
       <title>構築とインストール方法</title>
 
-      <para>配布ファイルは取得ずみと仮定します (前節参照)。
-        root になって、パッケージのディレクトリーに移動し、
-        <command>make</command> を実行します。</para>
+<para>
+ソフトウェアがダウンロードされると、パッチが適用された上で、
+コンパイルされます。それにかかる時間はあなたのコンピューターによりますし、
+そのソフトウェアが依存している他のパッケージの数とそれらのコンパイルに
+かかる時間にもよります。
+</para>
 
       <note><para>bootstrap または pkgsrc を NetBSD 以外のシステムで使う場合は、
         この手引きで例示されている <quote>make</quote> ではなく
@@ -246,14 +342,38 @@
       <screen>&cprompt; <userinput>cd misc/figlet</userinput>
 &cprompt; <userinput>make</userinput></screen>
 
-      <para>とします。
-        また、パッケージの各構成要素をシステムの適切な場所にインストールするには、</para>
+      <para>とします。</para>
+
+	<para>次は新たにコンパイルされたプログラムを、
+	実際にあなたのシステムにインストールします。
+	インストールしようとしているパッケージのディレクトリーにいる間に
+
+<screen>
+    <prompt>%</prompt> <userinput>make install</userinput>
+</screen>
 
-      <screen>&rprompt; <userinput>make install</userinput></screen>
+	と入力してください。</para>
 
-      <para>とします。パッケージをシステムにインストールするには root 権限が必要なことがあります。
+	<para>パッケージをシステムにインストールするには root 権限が必要なことがあります。
         ただし、pkgsrc には<emphasis>必要な時のみ  su する</emphasis>機能があり、
-        実際のインストール時にのみ root になることができます</para>
+        実際のインストール時にのみ root になることができます。</para>
+
+<para>そのソフトウェアは今まさにインストールされ、
+使用できるようにセットアップされたことになります。
+もうこれ以上コンパイル後の作業ファイルは必要とされないので、
+
+<screen>
+    <prompt>%</prompt> <userinput>make clean</userinput>
+</screen>
+
+	と入力し作業ディレクトリー内のファイルを削除してしまってもかまいません。
+	もし、プログラムをコンパイルするときに、
+	依存関係により他のパッケージがコンパイル/インストールされたならば、
+	それらも次のコマンドにより、きちんと削除することができます。</para>
+
+<screen>
+    <prompt>%</prompt> <userinput>make clean-depends</userinput>
+</screen>
 
       <para>figlet ユーティリティーを例にあげると、<xref linkend="logs"/>のように構築することに
         より、システムにインストールすることができます。</para>
@@ -398,5 +518,6 @@
         </varlistentry>
       </variablelist>
     </sect2>
-  </sect1>
+
+</sect1>
 </chapter>
Index: using.xml
===================================================================
RCS file: /cvsroot/pkgsrc/doc/guide/files/using.xml,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- using.xml	29 Jul 2006 14:14:23 -0000	1.21
+++ using.xml	29 Jul 2006 15:57:04 -0000	1.22
@@ -1,4 +1,4 @@
-<!-- $NetBSD: using.xml,v 1.21 2006/07/29 14:14:23 rillig Exp $ -->
+<!-- $NetBSD: using.xml,v 1.22 2006/07/29 15:57:04 rillig Exp $ -->
 
 <chapter id="using"> <?dbhtml filename="using.html"?>
 <title>Using pkgsrc</title>
@@ -151,6 +151,62 @@
 
 </sect2>
 
+<sect2 id="vulnerabilities">
+<title>Checking for security vulnerabilities in installed packages</title>
+
+<para>
+The NetBSD Security-Officer and Packages Groups maintain a list of
+known security vulnerabilities to packages which are (or have been)
+included in pkgsrc.  The list is available from the NetBSD
+FTP site at <ulink url="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/vulnerabilities"/>.
+</para>
+
+<para>
+Through <filename role="pkg">security/audit-packages</filename>, 
+this list can be downloaded
+automatically, and a security audit of all packages installed on a system
+can take place.
+</para>
+
+<para>
+There are two components to 
+<filename role="pkg">security/audit-packages</filename>.  The first
+component, <quote>download-vulnerability-list</quote>, is for downloading
+the list of vulnerabilities from the NetBSD FTP site.  The second
+component, <quote>audit-packages</quote>, checks to see if any of your
+installed packages are vulnerable.  If a package is vulnerable, you
+will see output similar to the following:
+</para>
+
+<screen>Package samba-2.0.9 has a local-root-shell vulnerability, see
+http://www.samba.org/samba/whatsnew/macroexploit.html</screen>
+
+<para>
+One can set up <filename 
+role="pkg">security/audit-packages</filename> to download the
+<ulink url="ftp://ftp.NetBSD.org/pub/pkgsrc/distfiles/vulnerabilities">vulnerabilities</ulink>
+file daily, and include a package audit in the daily security script.
+Details on this are located in the <ulink
+url="http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/security/audit-packages/MESSAGE?rev=HEAD&amp;content-type=text/x-cvsweb-markup">MESSAGE</ulink>
+file for <filename role="pkg">security/audit-packages</filename>.
+</para>
+</sect2>
+
+<sect2 id="pkg_versions">
+<title>Finding if newer versions of your installed packages are in pkgsrc</title>
+<para>
+Install <filename role="pkg">pkgtools/pkglint</filename> and run 
+<command>lintpkgsrc</command> with the <quote>-i</quote>
+argument to check if your packages are up-to-date, e.g.
+</para>
+<screen><prompt>%</prompt> <userinput>lintpkgsrc -i</userinput>
+...
+Version mismatch: 'tcsh' 6.09.00 vs 6.10.00</screen>
+<para>You can then use <command>make update</command> to update the
+package on your system and rebuild any dependencies.
+</para>
+</sect2>
+
 <sect2 id="using.pkg_admin">
 <title>Other administrative functions</title>
 
@@ -181,7 +237,23 @@
   <sect1 id="building-packages-from-source">
     <title>Building packages from source</title>
 
-    <para> This assumes that the package is already in pkgsrc. If it
+<para>
+After obtaining pkgsrc, the <filename>pkgsrc</filename> directory
+now contains a set of packages, organized into categories. You can browse
+the online index of packages, or run <command>make readme</command>
+from the <filename>pkgsrc</filename> directory to build local
+<filename>README.html</filename> files for all packages, viewable with any web browser such as
+<filename role="pkg">www/lynx</filename> or 
+<filename role="pkg">www/mozilla</filename>.</para>
+
+<para>The default <emphasis>prefix</emphasis> for installed packages is
+<filename>/usr/pkg</filename>. If you wish to change this, you should do
+so by setting <varname>LOCALBASE</varname> in
+<filename>mk.conf</filename>. You should not try to use multiple
+different <varname>LOCALBASE</varname> definitions on the same system
+(inside a chroot is an exception). </para>
+
+    <para>The rest of this chapter assumes that the package is already in pkgsrc. If it
       is not, see <xref linkend="developers-guide"/> for instructions
       how to create your own packages.</para>
 
@@ -205,6 +277,15 @@
       distfiles (i.e. the unmodified source). If they have not yet been
       downloaded, pkgsrc will fetch them automatically.</para>
 
+<para>
+If you have all files that you need in the
+<filename>distfiles</filename> directory,
+you don't need to connect. If the distfiles are on CD-ROM, you can
+mount the CD-ROM on <filename>/cdrom</filename> and add:
+<screen>DISTDIR=/cdrom/pkgsrc/distfiles</screen>
+to your <filename>mk.conf</filename>.
+</para>
+
       <para>You can overwrite some of the major distribution sites to fit to sites
         that are close to your own.  Have a look at
         <filename>pkgsrc/mk/defaults/mk.conf</filename> to find some examples
@@ -218,18 +299,29 @@
         <filename>/etc/mk.conf</filename> file,
         and adding the definitions there.</para>
 
-      <para>If you don't have a permanent Internet connection and you want to know
-        which files to download, <command>make fetch-list</command> will tell you
-        what you'll need. Put these distfiles into
-        <filename>/usr/pkgsrc/distfiles</filename>.</para>
+<para>
+If a package depends on many other packages (such as
+<filename role="pkg">meta-pkgs/kde3</filename>), the build process may 
+alternate between periods of
+downloading source, and compiling. To ensure you have all the source
+downloaded initially you can run the command:
+<screen><prompt>%</prompt> <userinput>make fetch-list | sh</userinput></screen>
+which will output and run a set of shell commands to fetch the
+necessary files into the <filename>distfiles</filename> directory.  You can
+also choose to download the files manually.
+</para>
+
     </sect2>
 
     <sect2 id="how-to-build-and-install">
       <title>How to build and install</title>
 
-      <para>Assuming that the distfile has been fetched (see previous section), become
-        root and change into the relevant directory and run
-        <command>make</command>.</para>
+<para>
+Once the software has downloaded, any patches will be applied, then it
+will be compiled for you. This may take some time depending on your
+computer, and how many other packages the software depends on and their
+compile time.
+</para>
 
       <note><para>If using bootstrap or pkgsrc on a non-NetBSD system,
         use the pkgsrc <command>bmake</command> command instead of
@@ -241,15 +333,38 @@
 &cprompt; <userinput>make</userinput></screen>
 
       <para>at the shell prompt to build the various components of the
-        package, and</para>
+        package.</para>
+
+	<para>The next stage is to actually install the newly compiled
+	program onto your system. Do this by entering:
+
+<screen>
+    <prompt>%</prompt> <userinput>make install</userinput>
+</screen>
 
-      <screen>&rprompt; <userinput>make install</userinput></screen>
+	while you are still in the directory for whatever package you
+	are installing.</para>
 
-      <para>to install the various components into the correct places
-        on your system. Installing the package on your system requires
-        you to be root.  However, pkgsrc has a
+	<para>Installing the package on your system may require you to
+	be root.  However, pkgsrc has a
         <emphasis>just-in-time-su</emphasis> feature, which allows you
-        to only become root for the actual installation step</para>
+        to only become root for the actual installation step.</para>
+
+<para>That's it, the software should now be installed and setup for use.
+You can now enter:
+
+<screen>
+    <prompt>%</prompt> <userinput>make clean</userinput>
+</screen>
+
+	to remove the compiled files in the work directory, as you shouldn't need
+	them any more. If other packages were also added to your system
+	(dependencies) to allow your program to compile, you can tidy these up
+	also with the command:</para>
+
+<screen>
+    <prompt>%</prompt> <userinput>make clean-depends</userinput>
+</screen>
 
       <para>Taking the figlet utility as an example, we can install it on our
         system by building as shown in <xref linkend="logs"/>.</para>
@@ -399,5 +514,6 @@
         </varlistentry>
       </variablelist>
     </sect2>
-  </sect1>
+
+</sect1>
 </chapter>