2 % This is part of LFSbookja package.
4 % This is a CTIE change file for the original XML source of the LFSbook.
7 <?xml version="1.0" encoding="ISO-8859-1"?>
9 <?xml version="1.0" encoding="UTF-8"?>
13 <title>Creating Essential Files and Symlinks</title>
15 <title>重要なファイルとシンボリックリンクの生成</title>
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>
25 % プログラムの中には固定的に他のプログラムへのパスを保持しているものがあります。
26 % そのパスは今の時点ではまだ存在していません。
27 % このようなプログラムを正しく動作させるため、シンボリックリンクをいくつか作成します。
28 % このリンクは本章の作業を通じて各種ソフトウェアをインストールしていくことで、 その実体であるファイルに置き換えられていきます。
33 % <title>The purpose of each link:</title>
35 % <title>各リンクの目的</title>
39 % <para>Many <command>bash</command> scripts specify
40 % <filename>/bin/bash</filename>.</para>
43 % <command>bash</command> スクリプトはたいてい <filename>/bin/bash</filename> として記述されます。
48 % <para>This pathname is hard-coded into Glibc's configure script.</para>
51 % このパス名は Glibc の configure スクリプトにてハードコーディングされています。
56 % <para>The path to <filename>dd</filename> will be hard-coded into the
57 % <filename>/usr/bin/libtool</filename> utility.</para>
60 % <filename>dd</filename> へのパスが <filename>/usr/bin/libtool</filename> ユーティリティーにハードコーディングされます。
65 % <para>This is to satisfy one of the tests in Glibc's test suite, which
66 % expects <filename>/bin/echo</filename>.</para>
69 % Glibc のテストスイートの中に <filename>/bin/echo</filename> を用いているものがあり、これを成功させるためです。
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>
78 % このパスは、パッケージのビルドを通じてハードコーディングされることがあります。
79 % <!-- systemd This may not be needed if we move sysd to the end-->
84 % <para>The path to <filename>install</filename> will be hard-coded into
85 % the <filename>/usr/lib/bash/Makefile.inc</filename> file.</para>
88 % <filename>install</filename> へのパスが <filename>/usr/lib/bash/Makefile.inc</filename> ファイル内にてハードコーディングされます。
93 % <para>The path to <filename>ln</filename> will be hard-coded into the
94 % <filename>/usr/lib/perl5/&perl-version;/<target-triplet>/Config_heavy.pl</filename>
98 % <filename>ln</filename> へのパスが <filename>/usr/lib/perl5/&perl-version;/<target-triplet>/Config_heavy.pl</filename> ファイル内にてハードコーディングされます。
103 % <para>Some <command>configure</command> scripts, particularly Glibc's,
104 % have this pathname hard-coded.</para>
107 % 特に Glibc などの <command>configure</command> スクリプトにて、このパス名がハードコーディングされています。
112 % <para>The path to <filename>rm</filename> will be hard-coded into the
113 % <filename>/usr/lib/perl5/&perl-version;/<target-triplet>/Config_heavy.pl</filename>
117 % <filename>rm</filename> へのパスが <filename>/usr/lib/perl5/&perl-version;/<target-triplet>/Config_heavy.pl</filename> ファイル内にてハードコーディングされます。
122 % <para>This pathname is hard-coded into Expect, therefore it is needed
123 % for Binutils and GCC test suites to pass.</para>
126 % このパス名は Expect にてハードコーディングされています。
127 % したがって Binutils と GCC のテストスイートを成功させるために必要となります。
132 % <para>Many Perl scripts hard-code this path to the
133 % <command>perl</command> program.</para>
136 % <command>perl</command> コマンドに対して Perl スクリプトはたいていこのパス名を用いています。
140 %@x /usr/lib/libgcc_s.so
141 % <para>Glibc needs this for the pthreads library to work.</para>
144 % pthreads ライブラリが正常動作するように Glibc にとって必要となります。
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>
153 % Glibc のテストスイート、例えば GMP における C++ サポートなどにおいて、これを必要とするものがあります。
158 % <para>Many shell scripts hard-code <filename>/bin/sh</filename>.</para>
161 % シェルスクリプトはたいてい <filename>/bin/sh</filename> がハードコーディングされています。
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>
175 % <phrase revision="sysv">eudev</phrase>
176 % <phrase revision="systemd">systemd</phrase>
177 % が第 5 章にてインストールした util-linux のライブラリを探し出せるようにします。
178 % ここで /tools への誤った参照は作らないようにしています。
179 % また python モジュールをビルドできるようにするため uuid ライブラリも必要となります。
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>
191 % 第 5 章にてビルドしたプログラムの中には、インストール済のこのファイル内のロケール記述を検索するものがあります。
192 % そのロケール記述は、最終的な glibc がビルドされた後は <filename>/usr/lib/locale/locale-archive</filename> にインストールされます。
193 % 以下のシンボリックリンクを作成することで、現在インストールされているロケール記述をそういったプログラムが利用できるようにします。
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>
206 Linux のこれまでの経緯として、マウントされているファイルシステムの情報は <filename>/etc/mtab</filename> ファイルに保持されています。
207 最新の Linux であれば、内部的にこのファイルを管理し、ユーザーに対しては <filename
208 class="directory">/proc</filename> ファイルシステムを通じて情報提示しています。
209 <filename>/etc/mtab</filename> ファイルの存在を前提としているプログラムが正常動作するように、以下のシンボリックリンクを作成します。
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
219 テストスイートの中に <filename>/etc/hosts</filename> ファイルを参照するものがあるので、単純なものをここで生成します。
220 これは Perl の設定ファイルにおいても参照されます。
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>
231 <systemitem class="username">root</systemitem> ユーザーがログインできるように、またその<quote>root</quote>という名称を認識できるように <filename>/etc/passwd</filename> ファイルと <filename>/etc/group</filename> ファイルには該当する情報が登録されている必要があります。
236 <para>Create the <filename>/etc/passwd</filename> file by running the following
240 以下のコマンドを実行して <filename>/etc/passwd</filename> ファイルを生成します。
245 <para>The actual password for <systemitem class="username">root</systemitem>
246 will be set later.</para>
249 <systemitem class="username">root</systemitem> ユーザーに対する本当のパスワードは後に定めます。
254 <para>Create the <filename>/etc/group</filename> file by running the following
258 以下のコマンドを実行して <filename>/etc/group</filename> ファイルを生成します。
263 <para>The created groups are not part of any standard—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>
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 の値に依存することはなく、あくまでグループ名を用いてプログラミングされているからです。
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
293 <xref linkend="chapter-building-system"/> におけるテストの中には、通常のユーザーを必要とするものがあります。
294 ここでそういったユーザーをここで追加し、その章の最後には削除します。
299 <para>To remove the <quote>I have no name!</quote> prompt, start a new
301 <filename>/etc/passwd</filename> and <filename>/etc/group</filename>
302 files have been created, user name and group name resolution will now
306 プロンプトの<quote>I have no name!</quote>を取り除くために新たなシェルを起動します。
307 <filename>/etc/passwd</filename> ファイルと <filename>/etc/group</filename> ファイルを作ったので、ユーザー名とグループ名の名前解決が適切に動作します。
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>
320 <command>login</command>、<command>agetty</command>、<command>init</command> といったプログラム (あるいは他のプログラム) は、システムに誰がいつログインしたかといった情報を多くのログファイルに記録します。
321 しかしログファイルがあらかじめ存在していない場合は、ログファイルの出力が行われません。
322 そこでそのようなログファイルを作成し、適切なパーミッションを与えます。
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>
334 <filename>/var/log/wtmp</filename> ファイルはすべてのログイン、ログアウトの情報を保持します。
335 <filename>/var/log/lastlog</filename> ファイルは各ユーザーが最後にログインした情報を保持します。
336 <filename>/var/log/faillog</filename> ファイルはログインに失敗した情報を保持します。
337 <filename>/var/log/btmp</filename> ファイルは不正なログイン情報を保持します。
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>
347 <filename>/run/utmp</filename> ファイルは現在ログインしているユーザーの情報を保持します。
348 このファイルはブートスクリプトが動的に生成します。