Skip to content

Commit

Permalink
Translated all section of systemd and non-systemd
Browse files Browse the repository at this point in the history
  • Loading branch information
Hirozy committed Apr 6, 2017
1 parent b32d114 commit ecc9ba7
Show file tree
Hide file tree
Showing 7 changed files with 166 additions and 364 deletions.
81 changes: 24 additions & 57 deletions lfs-8.0-systemd/chapter04/aboutsbus.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content=
"application/xhtml+xml; charset=iso-8859-1" />
"application/xhtml+xml; charset=utf-8" />
<title>
4.5.&nbsp;About SBUs
4.5.&nbsp;关于时间单位 SBU
</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
Expand All @@ -19,127 +19,94 @@ <h4>
Linux From Scratch - Version 8.0-systemd
</h4>
<h3>
Chapter&nbsp;4.&nbsp;Final Preparations
第四章&nbsp;最后的准备工作
</h3>
<ul>
<li class="prev">
<a accesskey="p" href="settingenvironment.html" title=
"Setting Up the Environment">Prev</a>
"配置环境">上一页</a>
<p>
Setting Up the Environment
配置环境
</p>
</li>
<li class="next">
<a accesskey="n" href="abouttestsuites.html" title=
"About the Test Suites">Next</a>
"关于测试套件">下一页</a>
<p>
About the Test Suites
关于测试套件
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter04.html" title=
"Chapter&nbsp;4.&nbsp;Final Preparations">Up</a>
"第四章&nbsp;最后的准备工作">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 8.0-systemd">Home</a>
"Linux From Scratch - Version 8.0-systemd ">主页</a>
</li>
</ul>
</div>
<div class="sect1" lang="en" xml:lang="en">
<h1 class="sect1">
<a id="prepare-aboutsbus" name="prepare-aboutsbus"></a>4.5. About
SBUs
<a id="prepare-aboutsbus" name="prepare-aboutsbus"></a>4.5. 关于时间单位 SBU
</h1>
<p>
Many people would like to know beforehand approximately how long it
takes to compile and install each package. Because Linux From Scratch
can be built on many different systems, it is impossible to provide
accurate time estimates. The biggest package (Glibc) will take
approximately 20 minutes on the fastest systems, but could take up to
three days on slower systems! Instead of providing actual times, the
Standard Build Unit (SBU) measure will be used instead.
大多数人都想知道编译和安装每个包大概需要多长时间,因为 Linux 系统可以安装在许多不同的硬件系统上,所以不可能提供准确的预估时间。比如说, 最大的软件包 (Glibc) 在最快的硬件系统上编译安装需要大约 20 分钟,但在较慢的硬件系统上可能需要长达三天的时间!在此不提供实际时间,而使用标准构建单位 (Standard Build Unit (SBU)) 来衡量。
</p>
<p>
The SBU measure works as follows. The first package to be compiled
from this book is Binutils in <a class="xref" href=
"../chapter05/chapter05.html" title=
"Chapter&nbsp;5.&nbsp;Constructing a Temporary System">Chapter 5</a>.
The time it takes to compile this package is what will be referred to
as the Standard Build Unit or SBU. All other compile times will be
expressed relative to this time.
SBU 的测量原理如下:本书在 <a class="xref" href="../chapter05/chapter05.html" title="第五章&nbsp;构建临时系统">第五章</a> 编译的第一个包是 Binutils ,编译这个包所需的时间被称为标准构建单位或 SBU 。所有其它包的编译时间都以此来表示。
</p>
<p>
For example, consider a package whose compilation time is 4.5 SBUs.
This means that if a system took 10 minutes to compile and install
the first pass of Binutils, it will take <span class=
"emphasis"><em>approximately</em></span> 45 minutes to build this
example package. Fortunately, most build times are shorter than the
one for Binutils.
比如说,一个编译时间为 4.5 SBU 的包,这意味着如果在一个系统中花费了 10 分钟来编译和安装 Binutils ,则需要<span class="emphasis"><em>大约</em></span> 45 分钟来构建此包。不过幸运的是,大多数包构建时间都要比 Binutils 所用的短。
</p>
<p>
In general, SBUs are not entirely accurate because they depend on
many factors, including the host system's version of GCC. They are
provided here to give an estimate of how long it might take to
install a package, but the numbers can vary by as much as dozens of
minutes in some cases.
一般来说, SBU 并不完全准确。构建包所耗时间依赖许多因素,包括主机系统的 GCC 版本。在这里只是用来估计构建某个包所耗时间,但在有些情况下,误差可能多达几十分钟。
</p>
<div class="admon note">
<img alt="[Note]" src="../images/note.png" />
<h3>
Note
注意
</h3>
<p>
For many modern systems with multiple processors (or cores) the
compilation time for a package can be reduced by performing a
"parallel make" by either setting an environment variable or
telling the <span class="command"><strong>make</strong></span>
program how many processors are available. For instance, a Core2Duo
can support two simultaneous processes with:
对于具有多个物理处理器或者多内核处理器的现代硬件系统,可以通过设置环境变量来告知 <span class="command"><strong>make</strong></span> 程序有多少处理器核心可以用来并行处理,以减少包的编译时间。例如,酷睿 2 双核处理器 (Core2Duo) 可以同时支持两个进程:
</p>
<pre class="userinput">
<kbd class="command">export MAKEFLAGS='-j 2'</kbd>
</pre>
<p>
or just building with:
或者在编译时使用以下参数:
</p>
<pre class="userinput">
<kbd class="command">make -j2</kbd>
</pre>
<p>
When multiple processors are used in this way, the SBU units in the
book will vary even more than they normally would. In some cases,
the make step will simply fail. Analyzing the output of the build
process will also be more difficult because the lines of different
processes will be interleaved. If you run into a problem with a
build step, revert back to a single processor build to properly
analyze the error messages.
当使用多线程编译编译包时,一个包的构建时间通常比本书所说明的多。在某些情况下, make 步骤将会失败。多进程同时编译,生成的日志文件也会交错出现,这使得分析包编译过程输出的日志也更加困难。如果在构建软件包时遇到了问题,请返回到单核心处理器进行编译,以便分析错误信息。
</p>
</div>
</div>
<div class="navfooter">
<ul>
<li class="prev">
<a accesskey="p" href="settingenvironment.html" title=
"Setting Up the Environment">Prev</a>
"配置环境">上一页</a>
<p>
Setting Up the Environment
配置环境
</p>
</li>
<li class="next">
<a accesskey="n" href="abouttestsuites.html" title=
"About the Test Suites">Next</a>
"关于测试套件">下一页</a>
<p>
About the Test Suites
关于测试套件
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter04.html" title=
"Chapter&nbsp;4.&nbsp;Final Preparations">Up</a>
"第四章&nbsp;最后的准备工作">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 8.0-systemd">Home</a>
"Linux From Scratch - Version 8.0-systemd ">主页</a>
</li>
</ul>
</div>
Expand Down
85 changes: 25 additions & 60 deletions lfs-8.0-systemd/chapter04/abouttestsuites.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content=
"application/xhtml+xml; charset=iso-8859-1" />
"application/xhtml+xml; charset=utf-8" />
<title>
4.6.&nbsp;About the Test Suites
4.6.&nbsp;关于测试套件
</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
Expand All @@ -19,118 +19,83 @@ <h4>
Linux From Scratch - Version 8.0-systemd
</h4>
<h3>
Chapter&nbsp;4.&nbsp;Final Preparations
第四章&nbsp;最后的准备工作
</h3>
<ul>
<li class="prev">
<a accesskey="p" href="aboutsbus.html" title="About SBUs">Prev</a>
<a accesskey="p" href="aboutsbus.html" title="关于时间单位 SBU">上一页</a>
<p>
About SBUs
关于时间单位 SBU
</p>
</li>
<li class="next">
<a accesskey="n" href="../chapter05/chapter05.html" title=
"Constructing a Temporary System">Next</a>
"构建临时系统">下一页</a>
<p>
Constructing a Temporary System
构建临时系统
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter04.html" title=
"Chapter&nbsp;4.&nbsp;Final Preparations">Up</a>
"第四章&nbsp;最后的准备工作">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 8.0-systemd">Home</a>
"Linux From Scratch - Version 8.0-systemd ">主页</a>
</li>
</ul>
</div>
<div class="sect1" lang="en" xml:lang="en">
<h1 class="sect1">
<a id="prepare-abouttestsuites" name=
"prepare-abouttestsuites"></a>4.6. About the Test Suites
"prepare-abouttestsuites"></a>4.6. 关于测试套件
</h1>
<p>
Most packages provide a test suite. Running the test suite for a
newly built package is a good idea because it can provide a
<span class="quote">&ldquo;<span class="quote">sanity
check</span>&rdquo;</span> indicating that everything compiled
correctly. A test suite that passes its set of checks usually proves
that the package is functioning as the developer intended. It does
not, however, guarantee that the package is totally bug free.
大多数软件包都提供了一个测试套件。运行相应的测试套件,可以提供 “正确性检查” ,即检查所有的编译是否正确。这个检查是验证该软件包是否正在以开发者的意图编译运行,并不能保证这个包没有 bug 。
</p>
<p>
Some test suites are more important than others. For example, the
test suites for the core toolchain packages&mdash;GCC, Binutils, and
Glibc&mdash;are of the utmost importance due to their central role in
a properly functioning system. The test suites for GCC and Glibc can
take a very long time to complete, especially on slower hardware, but
are strongly recommended.
有些测试套件比其他测试套件更重要,比如说核心工具链软件包 GCC, Binutils, 和 Glibc 。这些软件包在系统中处于非常重要的地位,因此进行测试是非常有必要的。 GCC 和 Glibc 的测试可能要花很长时间才能完成,特别是硬件运行速度较慢时,但依旧强烈推荐进行测试。
</p>
<div class="admon note">
<img alt="[Note]" src="../images/note.png" />
<h3>
Note
注意
</h3>
<p>
Experience has shown that there is little to be gained from running
the test suites in <a class="xref" href=
"../chapter05/chapter05.html" title=
"Chapter&nbsp;5.&nbsp;Constructing a Temporary System">Chapter
5</a>. There can be no escaping the fact that the host system
always exerts some influence on the tests in that chapter, often
causing inexplicable failures. Because the tools built in <a class=
"xref" href="../chapter05/chapter05.html" title=
"Chapter&nbsp;5.&nbsp;Constructing a Temporary System">Chapter
5</a> are temporary and eventually discarded, we do not recommend
running the test suites in <a class="xref" href=
"../chapter05/chapter05.html" title=
"Chapter&nbsp;5.&nbsp;Constructing a Temporary System">Chapter
5</a> for the average reader. The instructions for running those
test suites are provided for the benefit of testers and developers,
but they are strictly optional.
经验表明,在 <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> 运行测试套件。这些测试套件是为测试人员和开发者准备的,并不是必须要运行的。
</p>
</div>
</div>
<p>
A common issue with running the test suites for Binutils and GCC is
running out of pseudo terminals (PTYs). This can result in a high
number of failing tests. This may happen for several reasons, but the
most likely cause is that the host system does not have the
<code class="systemitem">devpts</code> file system set up correctly.
This issue is discussed in greater detail at <a class="ulink" href=
"http://www.linuxfromscratch.org/lfs/faq.html#no-ptys">http://www.linuxfromscratch.org/lfs/faq.html#no-ptys</a>.
运行 Binutils 和 GCC 的测试套件时,一个常见的问题是缺少伪终端 ( PTYs ) ,这有可能会导致在测试中出现大量的错误。有多种原因可能引起这种错误,最常见的原因是 “主机系统没能正确的配置 devpts 文件系统。关于这个问题在以下链接有更详细的讨论:
<p>
<a class="ulink" href="http://www.linuxfromscratch.org/lfs/faq.html#no-ptys">http://www.linuxfromscratch.org/lfs/faq.html#no-ptys</a>
</p>
<p>
Sometimes package test suites will fail, but for reasons which the
developers are aware of and have deemed non-critical. Consult the
logs located at <a class="ulink" href=
"http://www.linuxfromscratch.org/lfs/build-logs/8.0/">http://www.linuxfromscratch.org/lfs/build-logs/8.0/</a>
to verify whether or not these failures are expected. This site is
valid for all tests throughout this book.
有时,测试套件会报告错误,但是开发者知道并认为这是非关键性问题。请参阅位于 <a class="ulink" href="http://www.linuxfromscratch.org/lfs/build-logs/8.0/">http://www.linuxfromscratch.org/lfs/build-logs/8.0/</a> 的安装日志,以便验证这些错误是否是预期性的错误。此网站适用于本书中所有的测试。
</p>
</div>
<div class="navfooter">
<ul>
<li class="prev">
<a accesskey="p" href="aboutsbus.html" title="About SBUs">Prev</a>
<a accesskey="p" href="aboutsbus.html" title="关于时间单位 SBU">上一页</a>
<p>
About SBUs
关于时间单位 SBU
</p>
</li>
<li class="next">
<a accesskey="n" href="../chapter05/chapter05.html" title=
"Constructing a Temporary System">Next</a>
"构建临时系统">下一页</a>
<p>
Constructing a Temporary System
构建临时系统
</p>
</li>
<li class="up">
<a accesskey="u" href="chapter04.html" title=
"Chapter&nbsp;4.&nbsp;Final Preparations">Up</a>
"第四章&nbsp;最后的准备工作">返回</a>
</li>
<li class="home">
<a accesskey="h" href="../index.html" title=
"Linux From Scratch - Version 8.0-systemd">Home</a>
"Linux From Scratch - Version 8.0-systemd ">主页</a>
</li>
</ul>
</div>
Expand Down
Loading

0 comments on commit ecc9ba7

Please sign in to comment.