OSDN Git Service

153455c7fa68ddf710c46edf2201b074c6d88ba8
[lfsbookja/lfsja-git.git] / src / chapter07 / createfiles.ch
1 %
2 % This is part of LFSbookja package.
3 %
4 % This is a CTIE change file for the original XML source of the LFSbook.
5 %
6 @x
7 <?xml version="1.0" encoding="ISO-8859-1"?>
8 @y
9 <?xml version="1.0" encoding="UTF-8"?>
10 @z
11
12 @x
13   <title>Creating Essential Files and Symlinks</title>
14 @y
15   <title>重要なファイルとシンボリックリンクの生成</title>
16 @z
17
18 %@x
19 %  <para>Some programs use hard-wired paths to programs which do not exist yet.
20 %  In order to satisfy these programs, create a number of symbolic links which
21 %  will be replaced by real files throughout the course of this chapter after the
22 %  software has been installed:</para>
23 %@y
24 %  <para>
25 %  プログラムの中には固定的に他のプログラムへのパスを保持しているものがあります。
26 %  そのパスは今の時点ではまだ存在していません。
27 %  このようなプログラムを正しく動作させるため、シンボリックリンクをいくつか作成します。
28 %  このリンクは本章の作業を通じて各種ソフトウェアをインストールしていくことで、 その実体であるファイルに置き換えられていきます。
29 %  </para>
30 %@z
31
32 %@x
33 %    <title>The purpose of each link:</title>
34 %@y
35 %    <title>各リンクの目的</title>
36 %@z
37
38 %@x /bin/bash
39 %        <para>Many <command>bash</command> scripts specify
40 %        <filename>/bin/bash</filename>.</para>
41 %@y
42 %        <para>
43 %        <command>bash</command> スクリプトはたいてい <filename>/bin/bash</filename> として記述されます。
44 %        </para>
45 %@z
46
47 %@x /bin/cat
48 %        <para>This pathname is hard-coded into Glibc's configure script.</para>
49 %@y
50 %        <para>
51 %        このパス名は Glibc の configure スクリプトにてハードコーディングされています。
52 %        </para>
53 %@z
54
55 %@x /bin/dd
56 %        <para>The path to <filename>dd</filename> will be hard-coded into the
57 %        <filename>/usr/bin/libtool</filename> utility.</para>
58 %@y
59 %        <para>
60 %        <filename>dd</filename> へのパスが <filename>/usr/bin/libtool</filename> ユーティリティーにハードコーディングされます。
61 %        </para>
62 %@z
63
64 %@x /bin/echo
65 %        <para>This is to satisfy one of the tests in Glibc's test suite, which
66 %        expects <filename>/bin/echo</filename>.</para>
67 %@y
68 %        <para>
69 %        Glibc のテストスイートの中に <filename>/bin/echo</filename> を用いているものがあり、これを成功させるためです。
70 %        </para>
71 %@z
72
73 %@x /usr/bin/env
74 %        <para>This pathname is hard-coded into some packages build procedures.
75 %        <!-- systemd  This may not be needed if we move sysd to the end--></para>
76 %@y
77 %        <para>
78 %        このパスは、パッケージのビルドを通じてハードコーディングされることがあります。
79 %        <!-- systemd  This may not be needed if we move sysd to the end-->
80 %        </para>
81 %@z
82
83 %@x /usr/bin/install
84 %        <para>The path to <filename>install</filename> will be hard-coded into
85 %        the <filename>/usr/lib/bash/Makefile.inc</filename> file.</para>
86 %@y
87 %        <para>
88 %        <filename>install</filename> へのパスが <filename>/usr/lib/bash/Makefile.inc</filename> ファイル内にてハードコーディングされます。
89 %        </para>
90 %@z
91
92 %@x /bin/ln
93 %        <para>The path to <filename>ln</filename> will be hard-coded into the
94 %        <filename>/usr/lib/perl5/&perl-version;/&lt;target-triplet&gt;/Config_heavy.pl</filename>
95 %         file.</para>
96 %@y
97 %        <para>
98 %        <filename>ln</filename> へのパスが <filename>/usr/lib/perl5/&perl-version;/&lt;target-triplet&gt;/Config_heavy.pl</filename> ファイル内にてハードコーディングされます。
99 %        </para>
100 %@z
101
102 %@x /bin/pwd
103 %        <para>Some <command>configure</command> scripts, particularly Glibc's,
104 %        have this pathname hard-coded.</para>
105 %@y
106 %        <para>
107 %        特に Glibc などの <command>configure</command> スクリプトにて、このパス名がハードコーディングされています。
108 %        </para>
109 %@z
110
111 %@x /bin/rm
112 %        <para>The path to <filename>rm</filename> will be hard-coded into the
113 %        <filename>/usr/lib/perl5/&perl-version;/&lt;target-triplet&gt;/Config_heavy.pl</filename>
114 %         file.</para>
115 %@y
116 %        <para>
117 %        <filename>rm</filename> へのパスが <filename>/usr/lib/perl5/&perl-version;/&lt;target-triplet&gt;/Config_heavy.pl</filename> ファイル内にてハードコーディングされます。
118 %        </para>
119 %@z
120
121 %@x /bin/stty
122 %        <para>This pathname is hard-coded into Expect, therefore it is needed
123 %        for Binutils and GCC test suites to pass.</para>
124 %@y
125 %        <para>
126 %        このパス名は Expect にてハードコーディングされています。
127 %        したがって Binutils と GCC のテストスイートを成功させるために必要となります。
128 %        </para>
129 %@z
130
131 %@x /usr/bin/perl
132 %        <para>Many Perl scripts hard-code this path to the
133 %        <command>perl</command> program.</para>
134 %@y
135 %        <para>
136 %        <command>perl</command> コマンドに対して Perl スクリプトはたいていこのパス名を用いています。
137 %        </para>
138 %@z
139
140 %@x /usr/lib/libgcc_s.so
141 %        <para>Glibc needs this for the pthreads library to work.</para>
142 %@y
143 %        <para>
144 %        pthreads ライブラリが正常動作するように Glibc にとって必要となります。
145 %        </para>
146 %@z
147
148 %@x /usr/lib/libstdc++{,.6}
149 %        <para>This is needed by several tests in Glibc's test suite, as well as
150 %        for C++ support in GMP.</para>
151 %@y
152 %        <para>
153 %        Glibc のテストスイート、例えば GMP における C++ サポートなどにおいて、これを必要とするものがあります。
154 %        </para>
155 %@z
156
157 %@x /bin/sh
158 %        <para>Many shell scripts hard-code <filename>/bin/sh</filename>.</para>
159 %@y
160 %        <para>
161 %        シェルスクリプトはたいてい <filename>/bin/sh</filename> がハードコーディングされています。
162 %        </para>
163 %@z
164
165 %@x /usr/lib/lib{blkid,fdisk,mount,uuid}.so*, /usr/include/{blkid,libfdisk,libmount,uuid}, /usr/lib/pkgconfig/{blkid,fdisk,mount,uuid}.pc
166 %        <para>These links and files allow
167 %        <phrase revision="sysv">eudev</phrase>
168 %        <phrase revision="systemd">systemd</phrase> to find the
169 %        util-linux libraries installed in chapter 5, without creating
170 %        wrong references to /tools. The uuid library is also needed for
171 %        building a python module.</para>
172 %@y
173 %        <para>
174 %        このリンクやファイルにより、
175 %        <phrase revision="sysv">eudev</phrase>
176 %        <phrase revision="systemd">systemd</phrase>
177 %        が第 5 章にてインストールした util-linux のライブラリを探し出せるようにします。
178 %        ここで /tools への誤った参照は作らないようにしています。
179 %        また python モジュールをビルドできるようにするため uuid ライブラリも必要となります。
180 %        </para>
181 %@z
182
183 %@x /tools/lib/locale/locale-archive
184 %        <para>Some programs built in chapter 5 look for installed
185 %        locale descriptions in this file. The locale descriptions will be
186 %        installed in <filename>/usr/lib/locale/locale-archive</filename>
187 %        after building the final glibc. The symlink allows those programs
188 %        to use the installed locales.</para>
189 %@y
190 %        <para>
191 %        第 5 章にてビルドしたプログラムの中には、インストール済のこのファイル内のロケール記述を検索するものがあります。
192 %        そのロケール記述は、最終的な glibc がビルドされた後は <filename>/usr/lib/locale/locale-archive</filename> にインストールされます。
193 %        以下のシンボリックリンクを作成することで、現在インストールされているロケール記述をそういったプログラムが利用できるようにします。
194 %        </para>
195 %@z
196
197 @x
198   <para>Historically, Linux maintains a list of the mounted file systems in the
199   file <filename>/etc/mtab</filename>. Modern kernels maintain this list
200   internally and expose it to the user via the <filename
201   class="directory">/proc</filename> filesystem. To satisfy utilities that
202   expect the presence of <filename>/etc/mtab</filename>, create the following
203   symbolic link:</para>
204 @y
205   <para>
206   Linux のこれまでの経緯として、マウントされているファイルシステムの情報は <filename>/etc/mtab</filename> ファイルに保持されています。
207   最新の Linux であれば、内部的にこのファイルを管理し、ユーザーに対しては <filename
208   class="directory">/proc</filename> ファイルシステムを通じて情報提示しています。
209   <filename>/etc/mtab</filename> ファイルの存在を前提としているプログラムが正常動作するように、以下のシンボリックリンクを作成します。
210   </para>
211 @z
212
213 @x
214   <para>Create a basic <filename>/etc/hosts</filename> file to be
215   referenced in some test suites, and in one of Perl's configuration files
216   as well:</para>
217 @y
218   <para>
219   テストスイートの中に <filename>/etc/hosts</filename> ファイルを参照するものがあるので、単純なものをここで生成します。
220   これは Perl の設定ファイルにおいても参照されます。
221   </para>
222 @z
223
224 @x
225   <para>In order for user <systemitem class="username">root</systemitem> to be
226   able to login and for the name <quote>root</quote> to be recognized, there
227   must be relevant entries in the <filename>/etc/passwd</filename> and
228   <filename>/etc/group</filename> files.</para>
229 @y
230   <para>
231   <systemitem class="username">root</systemitem> ユーザーがログインできるように、またその<quote>root</quote>という名称を認識できるように <filename>/etc/passwd</filename> ファイルと <filename>/etc/group</filename> ファイルには該当する情報が登録されている必要があります。
232   </para>
233 @z
234
235 @x
236   <para>Create the <filename>/etc/passwd</filename> file by running the following
237   command:</para>
238 @y
239   <para>
240   以下のコマンドを実行して <filename>/etc/passwd</filename> ファイルを生成します。
241   </para>
242 @z
243
244 @x
245   <para>The actual password for <systemitem class="username">root</systemitem>
246   will be set later.</para>
247 @y
248   <para>
249   <systemitem class="username">root</systemitem> ユーザーに対する本当のパスワードは後に定めます。
250   </para>
251 @z
252
253 @x
254   <para>Create the <filename>/etc/group</filename> file by running the following
255   command:</para>
256 @y
257   <para>
258   以下のコマンドを実行して <filename>/etc/group</filename> ファイルを生成します。
259   </para>
260 @z
261
262 @x
263   <para>The created groups are not part of any standard&mdash;they are groups
264   decided on in part by the requirements of the Udev configuration in Chapter
265   9, and in part by common convention employed by a number of existing Linux
266   distributions. In addition, some test suites rely on specific users or
267   groups.  The Linux Standard Base (LSB, available at <ulink
268   url="http://refspecs.linuxfoundation.org/lsb.shtml"/>) only recommends that,
269   besides the group <systemitem class="groupname">root</systemitem> with a
270   Group ID (GID) of 0, a group <systemitem class="groupname">bin</systemitem>
271   with a GID of 1 be present. All other group names and GIDs can be chosen
272   freely by the system administrator since well-written programs do not depend
273   on GID numbers, but rather use the group's name.</para>
274 @y
275   <para>
276   作成するグループは何かの標準に基づいたものではありません。
277   一部は 9 章の udev の設定に必要となるものですし、一部は既存の Linux ディストリビューションが採用している慣用的なものです。
278   またテストスイートにて特定のユーザーやグループを必要としているものがあります。
279   Linux Standard Base (<ulink url="http://www.linuxbase.org"/> 参照) では <systemitem
280   class="groupname">root</systemitem> グループのグループID (GID) は 0、<systemitem
281   class="groupname">bin</systemitem> グループの GID は 1 を定めているにすぎません。
282   他のグループとその GID はシステム管理者が自由に取り決めることができます。
283   というのも通常のプログラムであれば GID の値に依存することはなく、あくまでグループ名を用いてプログラミングされているからです。
284   </para>
285 @z
286
287 @x
288   <para>Some tests in <xref linkend="chapter-building-system"/> need a regular
289   user. We add this user here and delete this account at the end of that
290   chapter.</para>
291 @y
292   <para>
293   <xref linkend="chapter-building-system"/> におけるテストの中には、通常のユーザーを必要とするものがあります。
294   ここでそういったユーザーをここで追加し、その章の最後には削除します。
295   </para>
296 @z
297
298 @x
299   <para>To remove the <quote>I have no name!</quote> prompt, start a new
300   shell. Since the
301   <filename>/etc/passwd</filename> and <filename>/etc/group</filename>
302   files have been created, user name and group name resolution will now
303   work:</para>
304 @y
305   <para>
306   プロンプトの<quote>I have no name!</quote>を取り除くために新たなシェルを起動します。
307   <filename>/etc/passwd</filename> ファイルと <filename>/etc/group</filename> ファイルを作ったので、ユーザー名とグループ名の名前解決が適切に動作します。
308   </para>
309 @z
310
311 @x
312   <para>The <command>login</command>, <command>agetty</command>, and
313   <command>init</command> programs (and others) use a number of log
314   files to record information such as who was logged into the system and
315   when. However, these programs will not write to the log files if they
316   do not already exist. Initialize the log files and give them
317   proper permissions:</para>
318 @y
319   <para>
320   <command>login</command>、<command>agetty</command>、<command>init</command> といったプログラム (あるいは他のプログラム) は、システムに誰がいつログインしたかといった情報を多くのログファイルに記録します。
321   しかしログファイルがあらかじめ存在していない場合は、ログファイルの出力が行われません。
322   そこでそのようなログファイルを作成し、適切なパーミッションを与えます。
323   </para>
324 @z
325
326 @x
327   <para>The <filename>/var/log/wtmp</filename> file records all logins and
328   logouts. The <filename>/var/log/lastlog</filename> file records when each
329   user last logged in. The <filename>/var/log/faillog</filename> file records
330   failed login attempts.  The <filename>/var/log/btmp</filename> file records
331   the bad login attempts.</para>
332 @y
333   <para>
334   <filename>/var/log/wtmp</filename> ファイルはすべてのログイン、ログアウトの情報を保持します。
335   <filename>/var/log/lastlog</filename> ファイルは各ユーザーが最後にログインした情報を保持します。
336   <filename>/var/log/faillog</filename> ファイルはログインに失敗した情報を保持します。
337   <filename>/var/log/btmp</filename> ファイルは不正なログイン情報を保持します。
338   </para>
339 @z
340
341 @x
342   <note><para>The <filename>/run/utmp</filename> file records the users that
343   are currently logged in.  This file is created dynamically in the boot
344   scripts.</para></note>
345 @y
346   <note><para>
347   <filename>/run/utmp</filename> ファイルは現在ログインしているユーザーの情報を保持します。
348   このファイルはブートスクリプトが動的に生成します。
349   </para></note>
350 @z