1
0

pkgmgt.po 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467
  1. msgid ""
  2. msgstr ""
  3. "X-Pootle-Revision: 9999999\n"
  4. "X-Pootle-Path: /zh_CN/lfs/chapter08/pkgmgt.po\n"
  5. "Project-Id-Version: PACKAGE VERSION\n"
  6. "POT-Creation-Date: 2020-08-08 19:28+0800\n"
  7. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  8. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  9. "Language-Team: LANGUAGE <LL@li.org>\n"
  10. "Language: zh_CN\n"
  11. "MIME-Version: 1.0\n"
  12. "Content-Type: text/plain; charset=UTF-8\n"
  13. "Content-Transfer-Encoding: 8bit\n"
  14. "X-Generator: Translate Toolkit 2.2.5\n"
  15. #. type: Content of: <sect1><title>
  16. msgid "Package Management"
  17. msgstr "软件包管理"
  18. #. type: Content of: <sect1><para>
  19. msgid ""
  20. "Package Management is an often requested addition to the LFS Book. A Package "
  21. "Manager allows tracking the installation of files making it easy to remove "
  22. "and upgrade packages. As well as the binary and library files, a package "
  23. "manager will handle the installation of configuration files. Before you "
  24. "begin to wonder, NO&mdash;this section will not talk about nor recommend any "
  25. "particular package manager. What it provides is a roundup of the more "
  26. "popular techniques and how they work. The perfect package manager for you "
  27. "may be among these techniques or may be a combination of two or more of "
  28. "these techniques. This section briefly mentions issues that may arise when "
  29. "upgrading packages."
  30. msgstr ""
  31. "经常有人请求将软件包管理加入 LFS 手册。包管理器可以跟踪文件的安装过程,简化移"
  32. "除或升级软件包的工作。如同处理二进制程序和库文件一样,包管理器也会处理配置文"
  33. "件的安装过程。在您开始想入非非前,不 —— 本节不会讨论或者推荐任何一个特定的包"
  34. "管理器。本节对软件包管理的流行技术及其工作原理进行综述。对您来说,完美的包管"
  35. "理器可能是其中的某个技术,也可能是几个技术的结合。本节还会简要介绍在升级软件"
  36. "包时可能遇到的问题。"
  37. #. type: Content of: <sect1><para>
  38. msgid ""
  39. "Some reasons why no package manager is mentioned in LFS or BLFS include:"
  40. msgstr "LFS 或 BLFS 不介绍任何包管理器的原因包括:"
  41. #. type: Content of: <sect1><itemizedlist><listitem><para>
  42. msgid ""
  43. "Dealing with package management takes the focus away from the goals of these "
  44. "books&mdash;teaching how a Linux system is built."
  45. msgstr "处理软件包管理会偏离这两本手册的目标 —— 讲述如何构建 Linux 系统。"
  46. #. type: Content of: <sect1><itemizedlist><listitem><para>
  47. msgid ""
  48. "There are multiple solutions for package management, each having its "
  49. "strengths and drawbacks. Including one that satisfies all audiences is "
  50. "difficult."
  51. msgstr ""
  52. "存在多种软件包管理的解决方案,它们各有优缺点。很难找到一种让所有读者满意的方"
  53. "案。"
  54. #. type: Content of: <sect1><para>
  55. msgid ""
  56. "There are some hints written on the topic of package management. Visit the "
  57. "<ulink url=\"&hints-root;\">Hints Project</ulink> and see if one of them "
  58. "fits your need."
  59. msgstr ""
  60. "已经有人写了一些关于软件包管理这一主题的短文。您可以访问 <ulink url=\"&hints-"
  61. "root;\">Hints Project</ulink> 并看一看是否有符合您的需求的方案。"
  62. #. type: Content of: <sect1><sect2><title>
  63. msgid "Upgrade Issues"
  64. msgstr "升级问题"
  65. #. type: Content of: <sect1><sect2><para>
  66. msgid ""
  67. "A Package Manager makes it easy to upgrade to newer versions when they are "
  68. "released. Generally the instructions in the LFS and BLFS books can be used "
  69. "to upgrade to the newer versions. Here are some points that you should be "
  70. "aware of when upgrading packages, especially on a running system."
  71. msgstr ""
  72. "使用包管理器可以在软件包新版本发布后容易地完成升级。一般来说,使用 LFS 或者 "
  73. "BLFS 手册给出的构建方法即可升级软件包。下面是您在升级时必须注意的重点,特别是"
  74. "升级正在运行的系统时。"
  75. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  76. msgid ""
  77. "If Glibc needs to be upgraded to a newer version, (e.g. from glibc-2.31 to "
  78. "glibc-2.32), it is safer to rebuild LFS. Though you <emphasis>may</"
  79. "emphasis> be able to rebuild all the packages in their dependency order, we "
  80. "do not recommend it."
  81. msgstr ""
  82. "如果需要升级 Glibc (例如从 Glibc-2.31 升级到 Glibc-2.32),最安全的方法是重新"
  83. "构建 LFS。尽管您<emphasis>或许</emphasis>能按依赖顺序重新构建所有软件包,但我"
  84. "们不推荐这样做。"
  85. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  86. msgid ""
  87. "If a package containing a shared library is updated, and if the name of the "
  88. "library changes, then any the packages dynamically linked to the library "
  89. "need to be recompiled in order to link against the newer library. (Note "
  90. "that there is no correlation between the package version and the name of the "
  91. "library.) For example, consider a package foo-1.2.3 that installs a shared "
  92. "library with name <filename class='libraryfile'>libfoo.so.1</filename>. If "
  93. "you upgrade the package to a newer version foo-1.2.4 that installs a shared "
  94. "library with name <filename class='libraryfile'>libfoo.so.2</filename>. In "
  95. "this case, any packages that are dynamically linked to <filename "
  96. "class='libraryfile'>libfoo.so.1</filename> need to be recompiled to link "
  97. "against <filename class='libraryfile'>libfoo.so.2</filename> in order to use "
  98. "the new library version. You should not remove the previous libraries unless "
  99. "all the dependent packages are recompiled."
  100. msgstr ""
  101. "如果更新了一个包含共享库的软件包,而且共享库的名称发生改变,那么所有动态链接"
  102. "到这个库的软件包都需要重新编译,以链接到新版本的库。(注意软件包的版本和共享库"
  103. "的名称没有关系。) 例如,考虑一个软件包 foo-1.2.3 安装了名为 <filename "
  104. "class='libraryfile'>libfoo.so.1</filename> 的共享库,如果您把该软件包升级到了"
  105. "新版本 foo-1.2.4,它安装了名为 <filename class='libraryfile'>libfoo.so.2</"
  106. "filename> 的共享库。那么,所有链接到 <filename class='libraryfile'>libfoo."
  107. "so.1</filename> 的软件包都要重新编译以链接到 <filename "
  108. "class='libraryfile'>libfoo.so.2</filename>。注意,您不能删除旧版本的库,直到"
  109. "将所有依赖它的软件包都重新编译完成。"
  110. #. type: Content of: <sect1><sect2><title>
  111. msgid "Package Management Techniques"
  112. msgstr "软件包管理技术"
  113. #. type: Content of: <sect1><sect2><para>
  114. msgid ""
  115. "The following are some common package management techniques. Before making a "
  116. "decision on a package manager, do some research on the various techniques, "
  117. "particularly the drawbacks of the particular scheme."
  118. msgstr ""
  119. "以下是几种常见的软件包管理技术。在决定使用某种包管理器前,请研读这些技术,特"
  120. "别是要了解特定技术的不足。"
  121. #. type: Content of: <sect1><sect2><sect3><title>
  122. msgid "It is All in My Head!"
  123. msgstr "这都在我的脑袋里!"
  124. #. type: Content of: <sect1><sect2><sect3><para>
  125. msgid ""
  126. "Yes, this is a package management technique. Some folks do not find the need "
  127. "for a package manager because they know the packages intimately and know "
  128. "what files are installed by each package. Some users also do not need any "
  129. "package management because they plan on rebuilding the entire system when a "
  130. "package is changed."
  131. msgstr ""
  132. "没错,这是一种包管理技术。有些人觉得不需要管理软件包,因为他们十分了解软件"
  133. "包,知道每个软件包安装了什么文件。有的用户则计划每次有软件包发生变动时就重新"
  134. "构建系统,所以不需要管理软件包。"
  135. #. type: Content of: <sect1><sect2><sect3><title>
  136. msgid "Install in Separate Directories"
  137. msgstr "安装到独立目录"
  138. #. type: Content of: <sect1><sect2><sect3><para>
  139. msgid ""
  140. "This is a simplistic package management that does not need any extra package "
  141. "to manage the installations. Each package is installed in a separate "
  142. "directory. For example, package foo-1.1 is installed in <filename "
  143. "class='directory'>/usr/pkg/foo-1.1</filename> and a symlink is made from "
  144. "<filename>/usr/pkg/foo</filename> to <filename class='directory'>/usr/pkg/"
  145. "foo-1.1</filename>. When installing a new version foo-1.2, it is installed "
  146. "in <filename class='directory'>/usr/pkg/foo-1.2</filename> and the previous "
  147. "symlink is replaced by a symlink to the new version."
  148. msgstr ""
  149. "这是一种最简单的软件包管理方式,它不需要任何额外的软件来控制软件包的安装。每"
  150. "个软件包都被安装在单独的目录中。例如,软件包 foo-1.1 将会被安装在 <filename "
  151. "class='directory'>/usr/pkg/foo-1.1</filename>,然后创建一个符号链接 "
  152. "<filename>/usr/pkg/foo</filename> 指向 <filename class='directory'>/usr/pkg/"
  153. "foo-1.1</filename>。在安装新版本 foo-1.2 的时候,把它安装到 <filename "
  154. "class='directory'>/usr/pkg/foo-1.2</filename>,然后把之前的符号链接替换为指向"
  155. "新版本的符号链接。"
  156. #. type: Content of: <sect1><sect2><sect3><para>
  157. msgid ""
  158. "Environment variables such as <envar>PATH</envar>, <envar>LD_LIBRARY_PATH</"
  159. "envar>, <envar>MANPATH</envar>, <envar>INFOPATH</envar> and <envar>CPPFLAGS</"
  160. "envar> need to be expanded to include <filename>/usr/pkg/foo</filename>. For "
  161. "more than a few packages, this scheme becomes unmanageable."
  162. msgstr ""
  163. "<envar>PATH</envar>、<envar>LD_LIBRARY_PATH</envar>、<envar>MANPATH</envar>、"
  164. "<envar>INFOPATH</envar> 和 <envar>CPPFLAGS</envar> 等环境变量需要被扩充,以包"
  165. "含 <filename>/usr/pkg/foo</filename>。一旦软件包的数量较多,这种架构就会变得"
  166. "无法管理。"
  167. #. type: Content of: <sect1><sect2><sect3><title>
  168. msgid "Symlink Style Package Management"
  169. msgstr "符号链接风格的软件包管理"
  170. #. type: Content of: <sect1><sect2><sect3><para>
  171. msgid ""
  172. "This is a variation of the previous package management technique. Each "
  173. "package is installed similar to the previous scheme. But instead of making "
  174. "the symlink, each file is symlinked into the <filename class='directory'>/"
  175. "usr</filename> hierarchy. This removes the need to expand the environment "
  176. "variables. Though the symlinks can be created by the user to automate the "
  177. "creation, many package managers have been written using this approach. A few "
  178. "of the popular ones include Stow, Epkg, Graft, and Depot."
  179. msgstr ""
  180. "这是前一种软件包管理技术的变种。和前一种方式一样,将各个软件包同样安装在独立"
  181. "的目录中。但不是建立目录的符号链接,而是把其中的每个文件符号链接到 <filename "
  182. "class='directory'>/usr</filename> 目录树中对应的位置。这样就不需要修改环境变"
  183. "量。虽然这些符号链接可以由用户自己创建,但已经有许多包管理器能够自动化这一过"
  184. "程。一些流行的包管理器如 Stow、Epkg、Graft 和 Depot 使用这种管理方式。"
  185. #. type: Content of: <sect1><sect2><sect3><para>
  186. msgid ""
  187. "The installation needs to be faked, so that the package thinks that it is "
  188. "installed in <filename class=\"directory\">/usr</filename> though in reality "
  189. "it is installed in the <filename class=\"directory\">/usr/pkg</filename> "
  190. "hierarchy. Installing in this manner is not usually a trivial task. For "
  191. "example, consider that you are installing a package libfoo-1.1. The "
  192. "following instructions may not install the package properly:"
  193. msgstr ""
  194. "安装过程需要伪装,使得软件包认为它处于 <filename class=\"directory\">/usr</"
  195. "filename> 中,尽管它实际上被安装在 <filename class=\"directory\">/usr/pkg</"
  196. "filename> 目录结构中。这种安装过程一般是超出常规的。例如,考虑安装软件包 "
  197. "libfoo-1.1。下面的指令可能不能正确安装该软件包:"
  198. #. type: Content of: <sect1><sect2><sect3><screen>
  199. #, no-wrap
  200. msgid ""
  201. "<userinput>./configure --prefix=/usr/pkg/libfoo/1.1\n"
  202. "make\n"
  203. "make install</userinput>"
  204. msgstr ""
  205. "<userinput>./configure --prefix=/usr/pkg/libfoo/1.1\n"
  206. "make\n"
  207. "make install</userinput>"
  208. #. type: Content of: <sect1><sect2><sect3><para>
  209. msgid ""
  210. "The installation will work, but the dependent packages may not link to "
  211. "libfoo as you would expect. If you compile a package that links against "
  212. "libfoo, you may notice that it is linked to <filename class='libraryfile'>/"
  213. "usr/pkg/libfoo/1.1/lib/libfoo.so.1</filename> instead of <filename "
  214. "class='libraryfile'>/usr/lib/libfoo.so.1</filename> as you would expect. The "
  215. "correct approach is to use the <envar>DESTDIR</envar> strategy to fake "
  216. "installation of the package. This approach works as follows:"
  217. msgstr ""
  218. "尽管安装过程本身可以顺利进行,但依赖于它的软件包可能不会像您期望的那样链接 "
  219. "libfoo 库。如果要编译一个依赖于 libfoo 的软件包,您可能发现它链接到了 "
  220. "<filename class='libraryfile'>/usr/pkg/libfoo/1.1/lib/libfoo.so.1</filename> "
  221. "而不是您期望的 <filename class='libraryfile'>/usr/lib/libfoo.so.1</"
  222. "filename>。正确的做法是使用 <envar>DESTDIR</envar> 策略伪装软件包的安装过程。"
  223. "就像下面这样做:"
  224. #. type: Content of: <sect1><sect2><sect3><screen>
  225. #, no-wrap
  226. msgid ""
  227. "<userinput>./configure --prefix=/usr\n"
  228. "make\n"
  229. "make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput>"
  230. msgstr ""
  231. "<userinput>./configure --prefix=/usr\n"
  232. "make\n"
  233. "make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput>"
  234. #. type: Content of: <sect1><sect2><sect3><para>
  235. msgid ""
  236. "Most packages support this approach, but there are some which do not. For "
  237. "the non-compliant packages, you may either need to manually install the "
  238. "package, or you may find that it is easier to install some problematic "
  239. "packages into <filename class='directory'>/opt</filename>."
  240. msgstr ""
  241. "多数软件包可以这样安装,但有些不能。对于那些不兼容的软件包,您要么亲自动手安"
  242. "装,要么更简单地把一些出问题的软件包安装在 <filename class='directory'>/opt</"
  243. "filename>中。"
  244. #. type: Content of: <sect1><sect2><sect3><title>
  245. msgid "Timestamp Based"
  246. msgstr "基于时间戳的方案"
  247. #. type: Content of: <sect1><sect2><sect3><para>
  248. msgid ""
  249. "In this technique, a file is timestamped before the installation of the "
  250. "package. After the installation, a simple use of the <command>find</command> "
  251. "command with the appropriate options can generate a log of all the files "
  252. "installed after the timestamp file was created. A package manager written "
  253. "with this approach is install-log."
  254. msgstr ""
  255. "在这种技巧中,安装一个软件包之前,为它创建一个时间戳文件。在安装后,用一行简"
  256. "单的 <command>find</command> 命令,加上正确的参数,就能生成安装日志,包含在时"
  257. "间戳文件创建以后安装的所有文件。有一个采用这个方案的包管理器叫做 install-"
  258. "log。"
  259. #. type: Content of: <sect1><sect2><sect3><para>
  260. msgid ""
  261. "Though this scheme has the advantage of being simple, it has two drawbacks. "
  262. "If, during installation, the files are installed with any timestamp other "
  263. "than the current time, those files will not be tracked by the package "
  264. "manager. Also, this scheme can only be used when one package is installed at "
  265. "a time. The logs are not reliable if two packages are being installed on two "
  266. "different consoles."
  267. msgstr ""
  268. "尽管这种方式很简单,但它有两个缺点。如果在安装过程中,某些文件没有以当前时间"
  269. "作为时间戳安装,它们就不能被包管理器跟踪。另外,只有每次只安装一个软件包时才"
  270. "能使用这种技术。如果在两个终端中同时安装两个不同的软件包,它们的安装日志就不"
  271. "可靠了。"
  272. #. type: Content of: <sect1><sect2><sect3><title>
  273. msgid "Tracing Installation Scripts"
  274. msgstr "追踪安装脚本"
  275. #. type: Content of: <sect1><sect2><sect3><para>
  276. msgid ""
  277. "In this approach, the commands that the installation scripts perform are "
  278. "recorded. There are two techniques that one can use:"
  279. msgstr "在这种方式中,安装脚本执行的命令被记录下来。有两种技术可以进行记录:"
  280. #. type: Content of: <sect1><sect2><sect3><para>
  281. msgid ""
  282. "The <envar>LD_PRELOAD</envar> environment variable can be set to point to a "
  283. "library to be preloaded before installation. During installation, this "
  284. "library tracks the packages that are being installed by attaching itself to "
  285. "various executables such as <command>cp</command>, <command>install</"
  286. "command>, <command>mv</command> and tracking the system calls that modify "
  287. "the filesystem. For this approach to work, all the executables need to be "
  288. "dynamically linked without the suid or sgid bit. Preloading the library may "
  289. "cause some unwanted side-effects during installation. Therefore, it is "
  290. "advised that one performs some tests to ensure that the package manager does "
  291. "not break anything and logs all the appropriate files."
  292. msgstr ""
  293. "在安装前设置 <envar>LD_PRELOAD</envar> 环境变量,将其指向一个库以在安装过程中"
  294. "预加载它。在安装过程中,这个库附加在 <command>cp</command>、"
  295. "<command>install</command>、<command>mv</command> 等可执行文件上,跟踪修改文"
  296. "件系统的系统调用。如果要使用这种方法,所有需要跟踪的可执行文件必须是动态链接"
  297. "的,且没有设定 suid 和 sgid 位。预加载动态库可能在安装过程中导致不希望的副作"
  298. "用。因此,建议在实际使用前进行一些测试,以确保包管理器不会造成破坏,并且记录"
  299. "了所有应该记录的文件。"
  300. #. type: Content of: <sect1><sect2><sect3><para>
  301. msgid ""
  302. "The second technique is to use <command>strace</command>, which logs all "
  303. "system calls made during the execution of the installation scripts."
  304. msgstr ""
  305. "第二种技术是使用 <command>strace</command>,它能够记录安装脚本执行过程中的所"
  306. "有系统调用。"
  307. #. type: Content of: <sect1><sect2><sect3><title>
  308. msgid "Creating Package Archives"
  309. msgstr "创建软件包档案"
  310. #. type: Content of: <sect1><sect2><sect3><para>
  311. msgid ""
  312. "In this scheme, the package installation is faked into a separate tree as "
  313. "described in the Symlink style package management. After the installation, a "
  314. "package archive is created using the installed files. This archive is then "
  315. "used to install the package either on the local machine or can even be used "
  316. "to install the package on other machines."
  317. msgstr ""
  318. "在这种架构中,软件包被伪装安装到一个独立的目录树中,就像软链接风格的软件包管"
  319. "理那样。在安装后,使用被安装的文件创建一个软件包档案。它可以被用来在本地机器"
  320. "甚至其他机器上安装该软件包。"
  321. #. type: Content of: <sect1><sect2><sect3><para>
  322. msgid ""
  323. "This approach is used by most of the package managers found in the "
  324. "commercial distributions. Examples of package managers that follow this "
  325. "approach are RPM (which, incidentally, is required by the <ulink url="
  326. "\"http://refspecs.linuxfoundation.org/lsb.shtml\">Linux Standard Base "
  327. "Specification</ulink>), pkg-utils, Debian's apt, and Gentoo's Portage "
  328. "system. A hint describing how to adopt this style of package management for "
  329. "LFS systems is located at <ulink url=\"&hints-root;fakeroot.txt\"/>."
  330. msgstr ""
  331. "大多数商业发行版的包管理器采用这种策略。例如 RPM (值得一提的是,它被 <ulink "
  332. "url=\"http://refspecs.linuxfoundation.org/lsb.shtml\">Linux Standard Base 规"
  333. "则</ulink>所要求)、pkg-utils、Debian 的 apt,以及 Gentoo 的 Portage 系统等。"
  334. "LFS Hint 中的一篇短文描述了如何为 LFS 系统适用这种管理方式:<ulink url="
  335. "\"&hints-root;fakeroot.txt\"/>。"
  336. #. type: Content of: <sect1><sect2><sect3><para>
  337. msgid ""
  338. "Creation of package files that include dependency information is complex and "
  339. "is beyond the scope of LFS."
  340. msgstr "创建包含依赖关系信息的软件包文件十分复杂,超出了 LFS 的范畴。"
  341. #. type: Content of: <sect1><sect2><sect3><para>
  342. msgid ""
  343. "Slackware uses a <command>tar</command> based system for package archives. "
  344. "This system purposely does not handle package dependencies as more complex "
  345. "package managers do. For details of Slackware package management, see "
  346. "<ulink url=\"http://www.slackbook.org/html/package-management.html\"/>."
  347. msgstr ""
  348. "Slackware 使用一个基于 <command>tar</command> 的系统创建软件包档案。和更复杂"
  349. "的包管理器不同,该系统有意地没有涉及软件包依赖关系。如果想了解 Slackware 包管"
  350. "理器的详细信息,阅读 <ulink url=\"http://www.slackbook.org/html/package-"
  351. "management.html\"/>。"
  352. #. type: Content of: <sect1><sect2><sect3><title>
  353. msgid "User Based Management"
  354. msgstr "基于用户的软件包管理"
  355. #. type: Content of: <sect1><sect2><sect3><para>
  356. msgid ""
  357. "This scheme, unique to LFS, was devised by Matthias Benkmann, and is "
  358. "available from the <ulink url=\"&hints-root;\">Hints Project</ulink>. In "
  359. "this scheme, each package is installed as a separate user into the standard "
  360. "locations. Files belonging to a package are easily identified by checking "
  361. "the user ID. The features and shortcomings of this approach are too complex "
  362. "to describe in this section. For the details please see the hint at <ulink "
  363. "url=\"&hints-root;more_control_and_pkg_man.txt\"/>."
  364. msgstr ""
  365. "这种架构是 LFS 特有的,由 Matthias Benkmann 提出,可以在 <ulink url=\"&hints-"
  366. "root;\">Hints Project</ulink> 查阅。在该架构中,每个软件包都由一个单独的用户"
  367. "安装到标准位置。只要检查文件所有者,就能找出属于一个软件包的所有文件。它的优"
  368. "缺点十分复杂,无法在本节讨论。如果想详细了解,请访问 <ulink url=\"&hints-"
  369. "root;more_control_and_pkg_man.txt\"/> 阅读。"
  370. #. type: Content of: <sect1><sect2><title>
  371. msgid "Deploying LFS on Multiple Systems"
  372. msgstr "在多个系统上部署 LFS"
  373. #. type: Content of: <sect1><sect2><para>
  374. msgid ""
  375. "One of the advantages of an LFS system is that there are no files that "
  376. "depend on the position of files on a disk system. Cloning an LFS build to "
  377. "another computer with the same architecture as the base system is as simple "
  378. "as using <command>tar</command> on the LFS partition that contains the root "
  379. "directory (about 250MB uncompressed for a base LFS build), copying that file "
  380. "via network transfer or CD-ROM to the new system and expanding it. From "
  381. "that point, a few configuration files will have to be changed. "
  382. "Configuration files that may need to be updated include: <filename>/etc/"
  383. "hosts</filename>, <filename>/etc/fstab</filename>, <filename>/etc/passwd</"
  384. "filename>, <filename>/etc/group</filename>, <phrase revision=\"systemd\"> "
  385. "<filename>/etc/shadow</filename>, and <filename>/etc/ld.so.conf</filename>. "
  386. "</phrase> <phrase revision=\"sysv\"> <filename>/etc/shadow</filename>, "
  387. "<filename>/etc/ld.so.conf</filename>, <filename>/etc/sysconfig/rc.site</"
  388. "filename>, <filename>/etc/sysconfig/network</filename>, and <filename>/etc/"
  389. "sysconfig/ifconfig.eth0</filename>. </phrase>"
  390. msgstr ""
  391. "LFS 系统的一项优势是,没有依赖于磁盘系统中文件位置的文件。将构建好的 LFS 系统"
  392. "复制到另一台具有相同硬件架构的计算机很简单,只要用 <command>tar</command> 命"
  393. "令把包含根目录的 LFS 分区打包 (未压缩的情况下,一个基本的 LFS 系统需要 250 "
  394. "MB),然后通过网络或者 CD-ROM 复制到新的系统上,再展开即可。这时,个别配置文件"
  395. "需要修改。可能需要更新的配置文件有:<filename>/etc/hosts</filename>,"
  396. "<filename>/etc/fstab</filename>,<filename>/etc/passwd</filename>,"
  397. "<filename>/etc/group</filename>,<phrase revision=\"systemd\"><filename>/etc/"
  398. "shadow</filename>,以及 <filename>/etc/ld.so.conf</filename>。</"
  399. "phrase><phrase revision=\"sysv\"><filename>/etc/shadow</filename>,"
  400. "<filename>/etc/ld.so.conf</filename>,<filename>/etc/sysconfig/rc.site</"
  401. "filename>,<filename>/etc/sysconfig/network</filename>,以及 <filename>/etc/"
  402. "sysconfig/ifconfig.eth0</filename>。</phrase>"
  403. #. type: Content of: <sect1><sect2><para>
  404. msgid ""
  405. "A custom kernel may need to be built for the new system depending on "
  406. "differences in system hardware and the original kernel configuration."
  407. msgstr "由于系统硬件和原始内核配置的区别,可能需要为新系统重新配置并构建内核。"
  408. #. type: Content of: <sect1><sect2><note><para>
  409. msgid ""
  410. "There have been some reports of issues when copying between similar but not "
  411. "identical architectures. For instance, the instruction set for an Intel "
  412. "system is not identical with an AMD processor and later versions of some "
  413. "processors may have instructions that are unavailable in earlier versions."
  414. msgstr ""
  415. "有一些报告反映称,在架构相近但不完全一致的计算机之间拷贝 LFS 系统时出现问题。"
  416. "例如,Intel 系统使用的指令集和 AMD 处理器不完全相同,且较新的处理器可能包含旧"
  417. "处理器没有的指令。"
  418. #. type: Content of: <sect1><sect2><para>
  419. msgid ""
  420. "Finally the new system has to be made bootable via <xref linkend=\"ch-"
  421. "bootable-grub\"/>."
  422. msgstr ""
  423. "最后,按照<xref linkend=\"ch-bootable-grub\"/>中的说明,为新系统配置引导加载"
  424. "器。"