Skip to content

Commit ecc9ba7

Browse files
committed
Translated all section of systemd and non-systemd
1 parent b32d114 commit ecc9ba7

7 files changed

Lines changed: 166 additions & 364 deletions

File tree

lfs-8.0-systemd/chapter04/aboutsbus.html

Lines changed: 24 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<html xmlns="http://www.w3.org/1999/xhtml">
44
<head>
55
<meta http-equiv="Content-Type" content=
6-
"application/xhtml+xml; charset=iso-8859-1" />
6+
"application/xhtml+xml; charset=utf-8" />
77
<title>
8-
4.5.&nbsp;About SBUs
8+
4.5.&nbsp;关于时间单位 SBU
99
</title>
1010
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
1111
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
@@ -19,127 +19,94 @@ <h4>
1919
Linux From Scratch - Version 8.0-systemd
2020
</h4>
2121
<h3>
22-
Chapter&nbsp;4.&nbsp;Final Preparations
22+
第四章&nbsp;最后的准备工作
2323
</h3>
2424
<ul>
2525
<li class="prev">
2626
<a accesskey="p" href="settingenvironment.html" title=
27-
"Setting Up the Environment">Prev</a>
27+
"配置环境">上一页</a>
2828
<p>
29-
Setting Up the Environment
29+
配置环境
3030
</p>
3131
</li>
3232
<li class="next">
3333
<a accesskey="n" href="abouttestsuites.html" title=
34-
"About the Test Suites">Next</a>
34+
"关于测试套件">下一页</a>
3535
<p>
36-
About the Test Suites
36+
关于测试套件
3737
</p>
3838
</li>
3939
<li class="up">
4040
<a accesskey="u" href="chapter04.html" title=
41-
"Chapter&nbsp;4.&nbsp;Final Preparations">Up</a>
41+
"第四章&nbsp;最后的准备工作">返回</a>
4242
</li>
4343
<li class="home">
4444
<a accesskey="h" href="../index.html" title=
45-
"Linux From Scratch - Version 8.0-systemd">Home</a>
45+
"Linux From Scratch - Version 8.0-systemd ">主页</a>
4646
</li>
4747
</ul>
4848
</div>
4949
<div class="sect1" lang="en" xml:lang="en">
5050
<h1 class="sect1">
51-
<a id="prepare-aboutsbus" name="prepare-aboutsbus"></a>4.5. About
52-
SBUs
51+
<a id="prepare-aboutsbus" name="prepare-aboutsbus"></a>4.5. 关于时间单位 SBU
5352
</h1>
5453
<p>
55-
Many people would like to know beforehand approximately how long it
56-
takes to compile and install each package. Because Linux From Scratch
57-
can be built on many different systems, it is impossible to provide
58-
accurate time estimates. The biggest package (Glibc) will take
59-
approximately 20 minutes on the fastest systems, but could take up to
60-
three days on slower systems! Instead of providing actual times, the
61-
Standard Build Unit (SBU) measure will be used instead.
54+
大多数人都想知道编译和安装每个包大概需要多长时间,因为 Linux 系统可以安装在许多不同的硬件系统上,所以不可能提供准确的预估时间。比如说, 最大的软件包 (Glibc) 在最快的硬件系统上编译安装需要大约 20 分钟,但在较慢的硬件系统上可能需要长达三天的时间!在此不提供实际时间,而使用标准构建单位 (Standard Build Unit (SBU)) 来衡量。
6255
</p>
6356
<p>
64-
The SBU measure works as follows. The first package to be compiled
65-
from this book is Binutils in <a class="xref" href=
66-
"../chapter05/chapter05.html" title=
67-
"Chapter&nbsp;5.&nbsp;Constructing a Temporary System">Chapter 5</a>.
68-
The time it takes to compile this package is what will be referred to
69-
as the Standard Build Unit or SBU. All other compile times will be
70-
expressed relative to this time.
57+
SBU 的测量原理如下:本书在 <a class="xref" href="../chapter05/chapter05.html" title="第五章&nbsp;构建临时系统">第五章</a> 编译的第一个包是 Binutils ,编译这个包所需的时间被称为标准构建单位或 SBU 。所有其它包的编译时间都以此来表示。
7158
</p>
7259
<p>
73-
For example, consider a package whose compilation time is 4.5 SBUs.
74-
This means that if a system took 10 minutes to compile and install
75-
the first pass of Binutils, it will take <span class=
76-
"emphasis"><em>approximately</em></span> 45 minutes to build this
77-
example package. Fortunately, most build times are shorter than the
78-
one for Binutils.
60+
比如说,一个编译时间为 4.5 SBU 的包,这意味着如果在一个系统中花费了 10 分钟来编译和安装 Binutils ,则需要<span class="emphasis"><em>大约</em></span> 45 分钟来构建此包。不过幸运的是,大多数包构建时间都要比 Binutils 所用的短。
7961
</p>
8062
<p>
81-
In general, SBUs are not entirely accurate because they depend on
82-
many factors, including the host system's version of GCC. They are
83-
provided here to give an estimate of how long it might take to
84-
install a package, but the numbers can vary by as much as dozens of
85-
minutes in some cases.
63+
一般来说, SBU 并不完全准确。构建包所耗时间依赖许多因素,包括主机系统的 GCC 版本。在这里只是用来估计构建某个包所耗时间,但在有些情况下,误差可能多达几十分钟。
8664
</p>
8765
<div class="admon note">
8866
<img alt="[Note]" src="../images/note.png" />
8967
<h3>
90-
Note
68+
注意
9169
</h3>
9270
<p>
93-
For many modern systems with multiple processors (or cores) the
94-
compilation time for a package can be reduced by performing a
95-
"parallel make" by either setting an environment variable or
96-
telling the <span class="command"><strong>make</strong></span>
97-
program how many processors are available. For instance, a Core2Duo
98-
can support two simultaneous processes with:
71+
对于具有多个物理处理器或者多内核处理器的现代硬件系统,可以通过设置环境变量来告知 <span class="command"><strong>make</strong></span> 程序有多少处理器核心可以用来并行处理,以减少包的编译时间。例如,酷睿 2 双核处理器 (Core2Duo) 可以同时支持两个进程:
9972
</p>
10073
<pre class="userinput">
10174
<kbd class="command">export MAKEFLAGS='-j 2'</kbd>
10275
</pre>
10376
<p>
104-
or just building with:
77+
或者在编译时使用以下参数:
10578
</p>
10679
<pre class="userinput">
10780
<kbd class="command">make -j2</kbd>
10881
</pre>
10982
<p>
110-
When multiple processors are used in this way, the SBU units in the
111-
book will vary even more than they normally would. In some cases,
112-
the make step will simply fail. Analyzing the output of the build
113-
process will also be more difficult because the lines of different
114-
processes will be interleaved. If you run into a problem with a
115-
build step, revert back to a single processor build to properly
116-
analyze the error messages.
83+
当使用多线程编译编译包时,一个包的构建时间通常比本书所说明的多。在某些情况下, make 步骤将会失败。多进程同时编译,生成的日志文件也会交错出现,这使得分析包编译过程输出的日志也更加困难。如果在构建软件包时遇到了问题,请返回到单核心处理器进行编译,以便分析错误信息。
11784
</p>
11885
</div>
11986
</div>
12087
<div class="navfooter">
12188
<ul>
12289
<li class="prev">
12390
<a accesskey="p" href="settingenvironment.html" title=
124-
"Setting Up the Environment">Prev</a>
91+
"配置环境">上一页</a>
12592
<p>
126-
Setting Up the Environment
93+
配置环境
12794
</p>
12895
</li>
12996
<li class="next">
13097
<a accesskey="n" href="abouttestsuites.html" title=
131-
"About the Test Suites">Next</a>
98+
"关于测试套件">下一页</a>
13299
<p>
133-
About the Test Suites
100+
关于测试套件
134101
</p>
135102
</li>
136103
<li class="up">
137104
<a accesskey="u" href="chapter04.html" title=
138-
"Chapter&nbsp;4.&nbsp;Final Preparations">Up</a>
105+
"第四章&nbsp;最后的准备工作">返回</a>
139106
</li>
140107
<li class="home">
141108
<a accesskey="h" href="../index.html" title=
142-
"Linux From Scratch - Version 8.0-systemd">Home</a>
109+
"Linux From Scratch - Version 8.0-systemd ">主页</a>
143110
</li>
144111
</ul>
145112
</div>

lfs-8.0-systemd/chapter04/abouttestsuites.html

Lines changed: 25 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<html xmlns="http://www.w3.org/1999/xhtml">
44
<head>
55
<meta http-equiv="Content-Type" content=
6-
"application/xhtml+xml; charset=iso-8859-1" />
6+
"application/xhtml+xml; charset=utf-8" />
77
<title>
8-
4.6.&nbsp;About the Test Suites
8+
4.6.&nbsp;关于测试套件
99
</title>
1010
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
1111
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
@@ -19,118 +19,83 @@ <h4>
1919
Linux From Scratch - Version 8.0-systemd
2020
</h4>
2121
<h3>
22-
Chapter&nbsp;4.&nbsp;Final Preparations
22+
第四章&nbsp;最后的准备工作
2323
</h3>
2424
<ul>
2525
<li class="prev">
26-
<a accesskey="p" href="aboutsbus.html" title="About SBUs">Prev</a>
26+
<a accesskey="p" href="aboutsbus.html" title="关于时间单位 SBU">上一页</a>
2727
<p>
28-
About SBUs
28+
关于时间单位 SBU
2929
</p>
3030
</li>
3131
<li class="next">
3232
<a accesskey="n" href="../chapter05/chapter05.html" title=
33-
"Constructing a Temporary System">Next</a>
33+
"构建临时系统">下一页</a>
3434
<p>
35-
Constructing a Temporary System
35+
构建临时系统
3636
</p>
3737
</li>
3838
<li class="up">
3939
<a accesskey="u" href="chapter04.html" title=
40-
"Chapter&nbsp;4.&nbsp;Final Preparations">Up</a>
40+
"第四章&nbsp;最后的准备工作">返回</a>
4141
</li>
4242
<li class="home">
4343
<a accesskey="h" href="../index.html" title=
44-
"Linux From Scratch - Version 8.0-systemd">Home</a>
44+
"Linux From Scratch - Version 8.0-systemd ">主页</a>
4545
</li>
4646
</ul>
4747
</div>
4848
<div class="sect1" lang="en" xml:lang="en">
4949
<h1 class="sect1">
5050
<a id="prepare-abouttestsuites" name=
51-
"prepare-abouttestsuites"></a>4.6. About the Test Suites
51+
"prepare-abouttestsuites"></a>4.6. 关于测试套件
5252
</h1>
5353
<p>
54-
Most packages provide a test suite. Running the test suite for a
55-
newly built package is a good idea because it can provide a
56-
<span class="quote">&ldquo;<span class="quote">sanity
57-
check</span>&rdquo;</span> indicating that everything compiled
58-
correctly. A test suite that passes its set of checks usually proves
59-
that the package is functioning as the developer intended. It does
60-
not, however, guarantee that the package is totally bug free.
54+
大多数软件包都提供了一个测试套件。运行相应的测试套件,可以提供 “正确性检查” ,即检查所有的编译是否正确。这个检查是验证该软件包是否正在以开发者的意图编译运行,并不能保证这个包没有 bug 。
6155
</p>
6256
<p>
63-
Some test suites are more important than others. For example, the
64-
test suites for the core toolchain packages&mdash;GCC, Binutils, and
65-
Glibc&mdash;are of the utmost importance due to their central role in
66-
a properly functioning system. The test suites for GCC and Glibc can
67-
take a very long time to complete, especially on slower hardware, but
68-
are strongly recommended.
57+
有些测试套件比其他测试套件更重要,比如说核心工具链软件包 GCC, Binutils, 和 Glibc 。这些软件包在系统中处于非常重要的地位,因此进行测试是非常有必要的。 GCC 和 Glibc 的测试可能要花很长时间才能完成,特别是硬件运行速度较慢时,但依旧强烈推荐进行测试。
6958
</p>
7059
<div class="admon note">
7160
<img alt="[Note]" src="../images/note.png" />
7261
<h3>
73-
Note
62+
注意
7463
</h3>
7564
<p>
76-
Experience has shown that there is little to be gained from running
77-
the test suites in <a class="xref" href=
78-
"../chapter05/chapter05.html" title=
79-
"Chapter&nbsp;5.&nbsp;Constructing a Temporary System">Chapter
80-
5</a>. There can be no escaping the fact that the host system
81-
always exerts some influence on the tests in that chapter, often
82-
causing inexplicable failures. Because the tools built in <a class=
83-
"xref" href="../chapter05/chapter05.html" title=
84-
"Chapter&nbsp;5.&nbsp;Constructing a Temporary System">Chapter
85-
5</a> are temporary and eventually discarded, we do not recommend
86-
running the test suites in <a class="xref" href=
87-
"../chapter05/chapter05.html" title=
88-
"Chapter&nbsp;5.&nbsp;Constructing a Temporary System">Chapter
89-
5</a> for the average reader. The instructions for running those
90-
test suites are provided for the benefit of testers and developers,
91-
but they are strictly optional.
65+
经验表明,在 <a class="xref" href="../chapter05/chapter05.html" title="第五章&nbsp;构建临时系统">第五章</a> 中运行测试套件几乎不能完全通过。主机系统总是会对测试产生一定得影响,这极有可能会导致一些莫名其妙的错误。因为 <a class="xref" href="../chapter05/chapter05.html" title="第五章&nbsp;构建临时系统">第五章</a>构建的工具都是临时的,最后会被删掉,所以我们不建议普通读者在 <a class="xref" href="../chapter05/chapter05.html" title="第五章&nbsp;构建临时系统">第五章</a> 运行测试套件。这些测试套件是为测试人员和开发者准备的,并不是必须要运行的。
9266
</p>
93-
</div>
67+
</div>
9468
<p>
95-
A common issue with running the test suites for Binutils and GCC is
96-
running out of pseudo terminals (PTYs). This can result in a high
97-
number of failing tests. This may happen for several reasons, but the
98-
most likely cause is that the host system does not have the
99-
<code class="systemitem">devpts</code> file system set up correctly.
100-
This issue is discussed in greater detail at <a class="ulink" href=
101-
"http://www.linuxfromscratch.org/lfs/faq.html#no-ptys">http://www.linuxfromscratch.org/lfs/faq.html#no-ptys</a>.
69+
运行 Binutils 和 GCC 的测试套件时,一个常见的问题是缺少伪终端 ( PTYs ) ,这有可能会导致在测试中出现大量的错误。有多种原因可能引起这种错误,最常见的原因是 “主机系统没能正确的配置 devpts 文件系统。关于这个问题在以下链接有更详细的讨论:
70+
<p>
71+
<a class="ulink" href="http://www.linuxfromscratch.org/lfs/faq.html#no-ptys">http://www.linuxfromscratch.org/lfs/faq.html#no-ptys</a>
10272
</p>
10373
<p>
104-
Sometimes package test suites will fail, but for reasons which the
105-
developers are aware of and have deemed non-critical. Consult the
106-
logs located at <a class="ulink" href=
107-
"http://www.linuxfromscratch.org/lfs/build-logs/8.0/">http://www.linuxfromscratch.org/lfs/build-logs/8.0/</a>
108-
to verify whether or not these failures are expected. This site is
109-
valid for all tests throughout this book.
74+
有时,测试套件会报告错误,但是开发者知道并认为这是非关键性问题。请参阅位于 <a class="ulink" href="http://www.linuxfromscratch.org/lfs/build-logs/8.0/">http://www.linuxfromscratch.org/lfs/build-logs/8.0/</a> 的安装日志,以便验证这些错误是否是预期性的错误。此网站适用于本书中所有的测试。
11075
</p>
11176
</div>
11277
<div class="navfooter">
11378
<ul>
11479
<li class="prev">
115-
<a accesskey="p" href="aboutsbus.html" title="About SBUs">Prev</a>
80+
<a accesskey="p" href="aboutsbus.html" title="关于时间单位 SBU">上一页</a>
11681
<p>
117-
About SBUs
82+
关于时间单位 SBU
11883
</p>
11984
</li>
12085
<li class="next">
12186
<a accesskey="n" href="../chapter05/chapter05.html" title=
122-
"Constructing a Temporary System">Next</a>
87+
"构建临时系统">下一页</a>
12388
<p>
124-
Constructing a Temporary System
89+
构建临时系统
12590
</p>
12691
</li>
12792
<li class="up">
12893
<a accesskey="u" href="chapter04.html" title=
129-
"Chapter&nbsp;4.&nbsp;Final Preparations">Up</a>
94+
"第四章&nbsp;最后的准备工作">返回</a>
13095
</li>
13196
<li class="home">
13297
<a accesskey="h" href="../index.html" title=
133-
"Linux From Scratch - Version 8.0-systemd">Home</a>
98+
"Linux From Scratch - Version 8.0-systemd ">主页</a>
13499
</li>
135100
</ul>
136101
</div>

0 commit comments

Comments
 (0)