stripping.po 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. msgid ""
  2. msgstr ""
  3. "Project-Id-Version: PACKAGE VERSION\n"
  4. "POT-Creation-Date: 2020-06-19 11:33+0800\n"
  5. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  6. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  7. "Language-Team: LANGUAGE <LL@li.org>\n"
  8. "Language: zh_CN\n"
  9. "MIME-Version: 1.0\n"
  10. "Content-Type: text/plain; charset=UTF-8\n"
  11. "Content-Transfer-Encoding: 8bit\n"
  12. "X-Generator: Translate Toolkit 2.2.5\n"
  13. #. type: Content of: <sect1><title>
  14. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:11
  15. msgid "Cleaning up and Saving the Temporary System"
  16. msgstr "清理和备份临时系统"
  17. #. type: Content of: <sect1><note><para>
  18. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:14
  19. msgid ""
  20. "All the steps in this section are optional. Nevertheless, as soon as you "
  21. "begin installing packages in <xref linkend=\"chapter-building-system\"/>, "
  22. "the temporary tools will be overwritten. So it may be a good idea to do a "
  23. "backup of the temporary tools as described below. The other steps are only "
  24. "needed if you are really short on disk space."
  25. msgstr ""
  26. "本节中的步骤都是可选的。不过,一旦您开始在<xref linkend="
  27. "\"chapter-building-system\"/>中安装软件包,临时工具就会被覆盖。"
  28. "因此,按照下面描述的步骤备份临时工具可能是个好主意。"
  29. "其余步骤只有在您的磁盘空间非常紧张时才需要执行。"
  30. #. type: Content of: <sect1><para>
  31. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:23
  32. msgid ""
  33. "The following steps are performed from outside the chroot environment. That "
  34. "means, you have to leave the chroot environment first before continuing. The "
  35. "reason for that is to:"
  36. msgstr ""
  37. "以下步骤在 chroot 环境之外进行。换句话说,您需要在继续操作之前退出 "
  38. "chroot 环境。这样做的主要原因是:"
  39. #. type: Content of: <sect1><para><itemizedlist><listitem><para>
  40. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:29
  41. msgid "make sure that objects are not in use while they are manipulated."
  42. msgstr "保证在操作时,目标文件不会被使用。"
  43. #. type: Content of: <sect1><para><itemizedlist><listitem><para>
  44. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:35
  45. msgid ""
  46. "get access to file system locations outside of the chroot environment to "
  47. "store/read the backup archive which should not be placed within the "
  48. "<filename class=\"directory\">$LFS</filename> hierarchy for safety reasons."
  49. msgstr ""
  50. "访问 chroot 环境之外的文件系统位置,以写入或读取备份档案,备份档案不应"
  51. "存放在 <filename class=\"directory\">$LFS</filename> 目录树中,"
  52. "以保证安全。"
  53. #. type: Content of: <sect1><para>
  54. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:46
  55. msgid ""
  56. "Leave the chroot environment and unmount the kernel virtual file systems:"
  57. msgstr ""
  58. "退出 chroot 环境,并解除挂载内核虚拟文件系统:"
  59. #. type: Content of: <sect1><note><para>
  60. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:51
  61. msgid ""
  62. "All of the following instructions are executed by <systemitem class="
  63. "\"username\">root</systemitem>. Take extra care about the commands you're "
  64. "going to run as mistakes here can modify your host system. Be aware that the "
  65. "environment variable <envar>LFS</envar> is set for user <systemitem class="
  66. "\"username\">lfs</systemitem> by default but it might <emphasis>not</"
  67. "emphasis> be set for <systemitem class=\"username\">root</systemitem>. "
  68. "Whenever commands are to be executed by <systemitem class=\"username\">root</"
  69. "systemitem>, make sure you have set <envar>LFS</envar> accordingly. This "
  70. "has been discussed in <xref linkend='ch-partitioning-aboutlfs'/>."
  71. msgstr ""
  72. "以下给出的所有步骤都以 <systemitem class=\"username\">root</systemitem> "
  73. "身份执行。请非常小心地执行命令,错误的命令可能修改您的宿主系统。"
  74. "特别注意环境变量 <envar>LFS</envar> 会自动为用户 "
  75. "<systemitem class=\"username\">lfs</systemitem> 设定,"
  76. "但可能<emphasis>没有</emphasis>为 <systemitem class=\"username\">root"
  77. "</systemitem> 设定。无论何时,只要准备以 <systemitem class=\"username\">"
  78. "root</systemitem> 身份执行命令,一定要确认 <envar>LFS</envar> 变量"
  79. "正确设定。<xref linkend='ch-partitioning-aboutlfs'/>已经讨论了这个问题。"
  80. #. type: Content of: <sect1><screen>
  81. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:65
  82. #, no-wrap
  83. msgid ""
  84. "<userinput>exit\n"
  85. "umount $LFS/dev{/pts,}\n"
  86. "umount $LFS/{sys,proc,run}</userinput>"
  87. msgstr ""
  88. "<userinput>exit\n"
  89. "umount $LFS/dev{/pts,}\n"
  90. "umount $LFS/{sys,proc,run}</userinput>"
  91. #. type: Content of: <sect1><sect2><title>
  92. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:70
  93. msgid "Stripping"
  94. msgstr "移除无用内容"
  95. #. type: Content of: <sect1><sect2><para>
  96. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:72
  97. msgid ""
  98. "If the LFS partition is rather small, it is good to know that unnecessary "
  99. "items can be removed. The executables and libraries built so far contain a "
  100. "little over 90 MB of unneeded debugging symbols."
  101. msgstr ""
  102. "如果 LFS 分区比较小,好消息是,有些无用的内容"
  103. "可以删除。到现在为止,已经构建的可执行文件和库包含大约 90MB 的无用调试符号。"
  104. #. type: Content of: <sect1><sect2><para>
  105. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:77
  106. msgid "Strip off debugging symbols from binaries:"
  107. msgstr "从二进制文件移除调试符号:"
  108. #. type: Content of: <sect1><sect2><screen>
  109. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:78
  110. #, no-wrap
  111. msgid ""
  112. "<userinput>strip --strip-debug $LFS/usr/lib/*\n"
  113. "strip --strip-unneeded $LFS/usr/{,s}bin/*\n"
  114. "strip --strip-unneeded $LFS/tools/bin/*</userinput>"
  115. msgstr ""
  116. "<userinput>strip --strip-debug $LFS/usr/lib/*\n"
  117. "strip --strip-unneeded $LFS/usr/{,s}bin/*\n"
  118. "strip --strip-unneeded $LFS/tools/bin/*</userinput>"
  119. #. Note that we use the <command>
  120. #. strip</command> program built in
  121. #. <quote>Binutils pass 2</quote>, since it is the one that knows how to strip
  122. #. our cross-compiled programs.
  123. #. type: Content of: <sect1><sect2><para>
  124. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:82
  125. msgid ""
  126. "These commands will skip a number of files reporting that it does not "
  127. "recognize their file format. Most of these are scripts instead of binaries."
  128. msgstr ""
  129. "以上命令会跳过一些文件,并报告说无法识别它们的格式。这些文件大多数都是脚本文"
  130. "件,而不是二进制文件。"
  131. #. type: Content of: <sect1><sect2><para>
  132. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:88
  133. msgid ""
  134. "Take care <emphasis>NOT</emphasis> to use <parameter>--strip-unneeded</"
  135. "parameter> on the libraries. The static ones would be destroyed and the "
  136. "toolchain packages would need to be built all over again."
  137. msgstr ""
  138. "注意<emphasis>不要</emphasis>对库文件使用 <parameter>--strip-unneeded</"
  139. "parameter> 选项。这会损坏静态库,结果工具链软件包都要重新构建。"
  140. #. type: Content of: <sect1><sect2><para>
  141. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:93
  142. msgid ""
  143. "To save more space (slightly more than 35 MB), remove the documentation:"
  144. msgstr "为了节约更多空间 (略高于 35 MB),删除文档:"
  145. #. type: Content of: <sect1><sect2><screen>
  146. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:95
  147. #, no-wrap
  148. msgid "<userinput>rm -rf $LFS/usr/share/{info,man,doc}</userinput>"
  149. msgstr "<userinput>rm -rf $LFS/usr/share/{info,man,doc}</userinput>"
  150. #. type: Content of: <sect1><sect2><para>
  151. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:97
  152. msgid ""
  153. "The libtool .la files are only useful when linking with static libraries. "
  154. "They are unneeded, and potentially harmful, when using dynamic shared "
  155. "libraries, specially when using non-autotools build systems. Remove those "
  156. "files now:"
  157. msgstr ""
  158. "libtool .la 文件仅在链接到静态库时有用,在使用动态共享库时它们是没有意义,"
  159. "甚至有害的,特别是对于非 autotools 构建系统。现在删除它们:"
  160. #. type: Content of: <sect1><sect2><screen>
  161. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:102
  162. #, no-wrap
  163. msgid "<userinput>find $LFS/usr/{lib,libexec} -name \\*.la -delete</userinput>"
  164. msgstr "<userinput>find $LFS/usr/{lib,libexec} -name \\*.la -delete</userinput>"
  165. #. type: Content of: <sect1><sect2><para>
  166. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:104
  167. msgid ""
  168. "At this point, you should have at least 5 GB of free space on the chroot "
  169. "partition that can be used to build and install Glibc and GCC in the next "
  170. "phase. If you can build and install Glibc, you can build and install the "
  171. "rest too. You can check the free disk space with the command <command>df -h "
  172. "$LFS</command>."
  173. msgstr ""
  174. "现在,您应该保证 chroot 分区有至少 5 GB 的可用空间,以在下一阶段构"
  175. "建和安装 Glibc 和 GCC 。如果空间足够构建和安装 Glibc,那么构建和安装剩余的软"
  176. "件包就不成问题。您可以使用命令 <command>df -h $LFS</command> 查询磁盘可用空间。"
  177. #. type: Content of: <sect1><sect2><title>
  178. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:113
  179. msgid "Backup"
  180. msgstr "备份"
  181. #. type: Content of: <sect1><sect2><para>
  182. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:116
  183. msgid ""
  184. "Now that the essential tools have been created, its time to think about a "
  185. "backup. When every check has passed successfully in the previously built "
  186. "packages, your temporary tools are in a good state and might be backed up "
  187. "for later reuse. In case of fatal failures in the subsequent chapters, it "
  188. "often turns out that removing everything and starting over (more carefully) "
  189. "is the best option to recover. Unfortunately, all the temporary tools will "
  190. "be removed, too. To avoid spending extra time to redo something which has "
  191. "been built successfully, prepare a backup."
  192. msgstr ""
  193. "现在已经建立了必要的工具,可以考虑备份它们。如果对之前构建的软件包进行的"
  194. "各项检查都没有发现问题,即可判定您的临时工具状态良好,可以将它们备份起来"
  195. "供以后重新使用。如果在后续章节发生了无法挽回的错误,通常来说,最好的办法是"
  196. "删除所有东西,然后 (更小心地) 从头开始。不幸的是,这也会删除所有临时工具。"
  197. "为了避免浪费时间对已经构建成功的部分进行返工,可以准备一个备份。"
  198. #. type: Content of: <sect1><sect2><para>
  199. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:127
  200. msgid ""
  201. "Make sure you have at least 600 MB free disk space (the source tarballs will "
  202. "be included in the backup archive) in the home directory of user <systemitem "
  203. "class=\"username\">root</systemitem>."
  204. msgstr ""
  205. "确认在 <systemitem class=\"username\">root</systemitem> 的主目录中,"
  206. "有至少 600 MB 的可用存储空间 (源代码压缩包也会被包含在备份档案中)。"
  207. #. type: Content of: <sect1><sect2><para>
  208. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:133
  209. msgid "Create the backup archive by running the following command:"
  210. msgstr "运行以下命令,创建备份档案:"
  211. #. type: Content of: <sect1><sect2><screen>
  212. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:136
  213. #, no-wrap
  214. msgid ""
  215. "<userinput>cd $LFS &amp;&amp;\n"
  216. "tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz .</userinput>"
  217. msgstr ""
  218. "<userinput>cd $LFS &amp;&amp;\n"
  219. "tar -cJpf $HOME/lfs-temp-tools-&version;.tar.xz .</userinput>"
  220. #. type: Content of: <sect1><sect2><screen>
  221. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:139
  222. #, no-wrap
  223. msgid ""
  224. "<userinput>cd $LFS &amp;&amp;\n"
  225. "tar -cJpf $HOME/lfs-temp-tools-&versiond;.tar.xz .</userinput>"
  226. msgstr ""
  227. "<userinput>cd $LFS &amp;&amp;\n"
  228. "tar -cJpf $HOME/lfs-temp-tools-&versiond;.tar.xz .</userinput>"
  229. #. type: Content of: <sect1><sect2><para>
  230. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:143
  231. msgid ""
  232. "Replace <envar>$HOME</envar> by a directory of your choice if you do not "
  233. "want to have the backup stored in <systemitem class=\"username\">root</"
  234. "systemitem>'s home directory."
  235. msgstr ""
  236. "如果您不想将备份存储在 <systemitem class=\"username\">root</systemitem> "
  237. "的主目录中,将 <envar>$HOME</envar> 替换为您选择的其他位置。"
  238. #. type: Content of: <sect1><sect2><title>
  239. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:150
  240. msgid "Restore"
  241. msgstr "还原"
  242. #. type: Content of: <sect1><sect2><para>
  243. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:153
  244. msgid ""
  245. "In case some mistakes have been made and you need to start over, you can use "
  246. "this backup to restore the temporary tools and save some recovery time. "
  247. "Since the sources are located under <filename class=\"directory\">$LFS</"
  248. "filename>, they are included in the backup archive as well, so they do not "
  249. "need to be downloaded again. After checking that <filename class=\"directory"
  250. "\">$LFS</filename> is set properly, restore the backup by executing the "
  251. "following commands:"
  252. msgstr ""
  253. "如果您犯下了一些错误,并不得不重新开始构建,您可以使用备份档案"
  254. "还原临时工具,节约一些工作时间。由于源代码在 "
  255. "<filename class=\"directory\">$LFS</filename> 中,"
  256. "它们也包含在备份档案内,因此不需要重新下载它们。"
  257. "在确认 <filename class=\"directory\">$LFS</filename> 设定正确后,"
  258. "运行以下命令从备份档案进行还原:"
  259. #. Make the following look different so users don't blindly run the
  260. #. restore when they don't need to.
  261. #. type: Content of: <sect1><sect2><screen>
  262. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:165
  263. #, no-wrap
  264. msgid ""
  265. "<computeroutput>cd $LFS &amp;&amp;\n"
  266. "rm -rf ./* &amp;&amp;\n"
  267. "tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz</computeroutput>"
  268. msgstr ""
  269. "<computeroutput>cd $LFS &amp;&amp;\n"
  270. "rm -rf ./* &amp;&amp;\n"
  271. "tar -xpf $HOME/lfs-temp-tools-&version;.tar.xz</computeroutput>"
  272. #. type: Content of: <sect1><sect2><screen>
  273. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:169
  274. #, no-wrap
  275. msgid ""
  276. "<computeroutput>cd $LFS &amp;&amp;\n"
  277. "rm -rf ./* &amp;&amp;\n"
  278. "tar -xpf $HOME/lfs-temp-tools-&versiond;.tar.xz</computeroutput>"
  279. msgstr ""
  280. "<computeroutput>cd $LFS &amp;&amp;\n"
  281. "rm -rf ./* &amp;&amp;\n"
  282. "tar -xpf $HOME/lfs-temp-tools-&versiond;.tar.xz</computeroutput>"
  283. #. type: Content of: <sect1><sect2><para>
  284. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:174
  285. msgid ""
  286. "Again, double check that the environment has been setup properly and "
  287. "continue building the rest of the system."
  288. msgstr ""
  289. "再一次复查环境是否配置正确,即可继续构建系统。"
  290. #. type: Content of: <sect1><sect2><important><para>
  291. #: /home/xry111/svn-repos/LFS-BOOK/chapter07/stripping.xml:180
  292. msgid ""
  293. "If you left the chroot environment either to strip off debug symbols, create "
  294. "a backup, or restart building using a restore, remember to mount the kernel "
  295. "virtual filesystems now again as described in <xref linkend='ch-tools-"
  296. "kernfs'/> and re-enter the chroot environment (see <xref linkend='ch-tools-"
  297. "chroot'/>) again before continuing."
  298. msgstr ""
  299. "如果您在移除调试符号,进行备份,或从备份进行恢复时退出了 chroot 环境,"
  300. "记得按照<xref linkend='ch-tools-kernfs'/>的描述重新挂载内核虚拟文件系统,"
  301. "并重新进入 chroot 环境 (参阅<xref linkend='ch-tools-chroot'/>),"
  302. "再继续进行构建。"