pkgmgt.po 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401
  1. # SOME DESCRIPTIVE TITLE
  2. # Copyright (C) YEAR Free Software Foundation, Inc.
  3. # This file is distributed under the same license as the PACKAGE package.
  4. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
  5. #
  6. #, fuzzy
  7. msgid ""
  8. msgstr ""
  9. "Project-Id-Version: PACKAGE VERSION\n"
  10. "POT-Creation-Date: 2020-06-17 12:44+0800\n"
  11. "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  12. "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  13. "Language-Team: LANGUAGE <LL@li.org>\n"
  14. "Language: \n"
  15. "MIME-Version: 1.0\n"
  16. "Content-Type: text/plain; charset=UTF-8\n"
  17. "Content-Transfer-Encoding: 8bit\n"
  18. #. type: Content of: <sect1><title>
  19. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:11
  20. msgid "Package Management"
  21. msgstr ""
  22. #. type: Content of: <sect1><para>
  23. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:13
  24. msgid ""
  25. "Package Management is an often requested addition to the LFS Book. A Package "
  26. "Manager allows tracking the installation of files making it easy to remove "
  27. "and upgrade packages. As well as the binary and library files, a package "
  28. "manager will handle the installation of configuration files. Before you "
  29. "begin to wonder, NO&mdash;this section will not talk about nor recommend any "
  30. "particular package manager. What it provides is a roundup of the more "
  31. "popular techniques and how they work. The perfect package manager for you "
  32. "may be among these techniques or may be a combination of two or more of "
  33. "these techniques. This section briefly mentions issues that may arise when "
  34. "upgrading packages."
  35. msgstr ""
  36. #. type: Content of: <sect1><para>
  37. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:24
  38. msgid "Some reasons why no package manager is mentioned in LFS or BLFS include:"
  39. msgstr ""
  40. #. type: Content of: <sect1><itemizedlist><listitem><para>
  41. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:29
  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 ""
  46. #. type: Content of: <sect1><itemizedlist><listitem><para>
  47. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:34
  48. msgid ""
  49. "There are multiple solutions for package management, each having its "
  50. "strengths and drawbacks. Including one that satisfies all audiences is "
  51. "difficult."
  52. msgstr ""
  53. #. type: Content of: <sect1><para>
  54. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:40
  55. msgid ""
  56. "There are some hints written on the topic of package management. Visit the "
  57. "<ulink url=\"&hints-index;\">Hints Project</ulink> and see if one of them "
  58. "fits your need."
  59. msgstr ""
  60. #. type: Content of: <sect1><sect2><title>
  61. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:45
  62. msgid "Upgrade Issues"
  63. msgstr ""
  64. #. type: Content of: <sect1><sect2><para>
  65. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:47
  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. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  73. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:54
  74. msgid ""
  75. "If Glibc needs to be upgraded to a newer version, (e.g. from glibc-2.31 to "
  76. "glibc-2.32), it is safer to rebuild LFS. Though you "
  77. "<emphasis>may</emphasis> be able to rebuild all the packages in their "
  78. "dependency order, we do not recommend it."
  79. msgstr ""
  80. #. type: Content of: <sect1><sect2><itemizedlist><listitem><para>
  81. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:60
  82. msgid ""
  83. "If a package containing a shared library is updated, and if the name of the "
  84. "library changes, then any the packages dynamically linked to the library "
  85. "need to be recompiled in order to link against the newer library. (Note "
  86. "that there is no correlation between the package version and the name of the "
  87. "library.) For example, consider a package foo-1.2.3 that installs a shared "
  88. "library with name <filename class='libraryfile'>libfoo.so.1</filename>. If "
  89. "you upgrade the package to a newer version foo-1.2.4 that installs a shared "
  90. "library with name <filename class='libraryfile'>libfoo.so.2</filename>. In "
  91. "this case, any packages that are dynamically linked to <filename "
  92. "class='libraryfile'>libfoo.so.1</filename> need to be recompiled to link "
  93. "against <filename class='libraryfile'>libfoo.so.2</filename> in order to use "
  94. "the new library version. You should not remove the previous libraries unless "
  95. "all the dependent packages are recompiled."
  96. msgstr ""
  97. #. type: Content of: <sect1><sect2><title>
  98. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:79
  99. msgid "Package Management Techniques"
  100. msgstr ""
  101. #. type: Content of: <sect1><sect2><para>
  102. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:81
  103. msgid ""
  104. "The following are some common package management techniques. Before making a "
  105. "decision on a package manager, do some research on the various techniques, "
  106. "particularly the drawbacks of the particular scheme."
  107. msgstr ""
  108. #. type: Content of: <sect1><sect2><sect3><title>
  109. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:86
  110. msgid "It is All in My Head!"
  111. msgstr ""
  112. #. type: Content of: <sect1><sect2><sect3><para>
  113. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:88
  114. msgid ""
  115. "Yes, this is a package management technique. Some folks do not find the need "
  116. "for a package manager because they know the packages intimately and know "
  117. "what files are installed by each package. Some users also do not need any "
  118. "package management because they plan on rebuilding the entire system when a "
  119. "package is changed."
  120. msgstr ""
  121. #. type: Content of: <sect1><sect2><sect3><title>
  122. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:97
  123. msgid "Install in Separate Directories"
  124. msgstr ""
  125. #. type: Content of: <sect1><sect2><sect3><para>
  126. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:99
  127. msgid ""
  128. "This is a simplistic package management that does not need any extra package "
  129. "to manage the installations. Each package is installed in a separate "
  130. "directory. For example, package foo-1.1 is installed in <filename "
  131. "class='directory'>/usr/pkg/foo-1.1</filename> and a symlink is made from "
  132. "<filename>/usr/pkg/foo</filename> to <filename "
  133. "class='directory'>/usr/pkg/foo-1.1</filename>. When installing a new version "
  134. "foo-1.2, it is installed in <filename "
  135. "class='directory'>/usr/pkg/foo-1.2</filename> and the previous symlink is "
  136. "replaced by a symlink to the new version."
  137. msgstr ""
  138. #. type: Content of: <sect1><sect2><sect3><para>
  139. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:109
  140. msgid ""
  141. "Environment variables such as <envar>PATH</envar>, "
  142. "<envar>LD_LIBRARY_PATH</envar>, <envar>MANPATH</envar>, "
  143. "<envar>INFOPATH</envar> and <envar>CPPFLAGS</envar> need to be expanded to "
  144. "include <filename>/usr/pkg/foo</filename>. For more than a few packages, "
  145. "this scheme becomes unmanageable."
  146. msgstr ""
  147. #. type: Content of: <sect1><sect2><sect3><title>
  148. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:118
  149. msgid "Symlink Style Package Management"
  150. msgstr ""
  151. #. type: Content of: <sect1><sect2><sect3><para>
  152. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:120
  153. msgid ""
  154. "This is a variation of the previous package management technique. Each "
  155. "package is installed similar to the previous scheme. But instead of making "
  156. "the symlink, each file is symlinked into the <filename "
  157. "class='directory'>/usr</filename> hierarchy. This removes the need to expand "
  158. "the environment variables. Though the symlinks can be created by the user to "
  159. "automate the creation, many package managers have been written using this "
  160. "approach. A few of the popular ones include Stow, Epkg, Graft, and Depot."
  161. msgstr ""
  162. #. type: Content of: <sect1><sect2><sect3><para>
  163. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:129
  164. msgid ""
  165. "The installation needs to be faked, so that the package thinks that it is "
  166. "installed in <filename class=\"directory\">/usr</filename> though in reality "
  167. "it is installed in the <filename class=\"directory\">/usr/pkg</filename> "
  168. "hierarchy. Installing in this manner is not usually a trivial task. For "
  169. "example, consider that you are installing a package libfoo-1.1. The "
  170. "following instructions may not install the package properly:"
  171. msgstr ""
  172. #. type: Content of: <sect1><sect2><sect3><screen>
  173. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:137
  174. #, no-wrap
  175. msgid ""
  176. "<userinput>./configure --prefix=/usr/pkg/libfoo/1.1\n"
  177. "make\n"
  178. "make install</userinput>"
  179. msgstr ""
  180. #. type: Content of: <sect1><sect2><sect3><para>
  181. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:141
  182. msgid ""
  183. "The installation will work, but the dependent packages may not link to "
  184. "libfoo as you would expect. If you compile a package that links against "
  185. "libfoo, you may notice that it is linked to <filename "
  186. "class='libraryfile'>/usr/pkg/libfoo/1.1/lib/libfoo.so.1</filename> instead "
  187. "of <filename class='libraryfile'>/usr/lib/libfoo.so.1</filename> as you "
  188. "would expect. The correct approach is to use the <envar>DESTDIR</envar> "
  189. "strategy to fake installation of the package. This approach works as "
  190. "follows:"
  191. msgstr ""
  192. #. type: Content of: <sect1><sect2><sect3><screen>
  193. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:150
  194. #, no-wrap
  195. msgid ""
  196. "<userinput>./configure --prefix=/usr\n"
  197. "make\n"
  198. "make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput>"
  199. msgstr ""
  200. #. type: Content of: <sect1><sect2><sect3><para>
  201. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:154
  202. msgid ""
  203. "Most packages support this approach, but there are some which do not. For "
  204. "the non-compliant packages, you may either need to manually install the "
  205. "package, or you may find that it is easier to install some problematic "
  206. "packages into <filename class='directory'>/opt</filename>."
  207. msgstr ""
  208. #. type: Content of: <sect1><sect2><sect3><title>
  209. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:162
  210. msgid "Timestamp Based"
  211. msgstr ""
  212. #. type: Content of: <sect1><sect2><sect3><para>
  213. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:164
  214. msgid ""
  215. "In this technique, a file is timestamped before the installation of the "
  216. "package. After the installation, a simple use of the <command>find</command> "
  217. "command with the appropriate options can generate a log of all the files "
  218. "installed after the timestamp file was created. A package manager written "
  219. "with this approach is install-log."
  220. msgstr ""
  221. #. type: Content of: <sect1><sect2><sect3><para>
  222. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:170
  223. msgid ""
  224. "Though this scheme has the advantage of being simple, it has two "
  225. "drawbacks. If, during installation, the files are installed with any "
  226. "timestamp other than the current time, those files will not be tracked by "
  227. "the package manager. Also, this scheme can only be used when one package is "
  228. "installed at a time. The logs are not reliable if two packages are being "
  229. "installed on two different consoles."
  230. msgstr ""
  231. #. type: Content of: <sect1><sect2><sect3><title>
  232. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:180
  233. msgid "Tracing Installation Scripts"
  234. msgstr ""
  235. #. type: Content of: <sect1><sect2><sect3><para>
  236. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:182
  237. msgid ""
  238. "In this approach, the commands that the installation scripts perform are "
  239. "recorded. There are two techniques that one can use:"
  240. msgstr ""
  241. #. type: Content of: <sect1><sect2><sect3><para>
  242. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:185
  243. msgid ""
  244. "The <envar>LD_PRELOAD</envar> environment variable can be set to point to a "
  245. "library to be preloaded before installation. During installation, this "
  246. "library tracks the packages that are being installed by attaching itself to "
  247. "various executables such as <command>cp</command>, "
  248. "<command>install</command>, <command>mv</command> and tracking the system "
  249. "calls that modify the filesystem. For this approach to work, all the "
  250. "executables need to be dynamically linked without the suid or sgid bit. "
  251. "Preloading the library may cause some unwanted side-effects during "
  252. "installation. Therefore, it is advised that one performs some tests to "
  253. "ensure that the package manager does not break anything and logs all the "
  254. "appropriate files."
  255. msgstr ""
  256. #. type: Content of: <sect1><sect2><sect3><para>
  257. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:197
  258. msgid ""
  259. "The second technique is to use <command>strace</command>, which logs all "
  260. "system calls made during the execution of the installation scripts."
  261. msgstr ""
  262. #. type: Content of: <sect1><sect2><sect3><title>
  263. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:203
  264. msgid "Creating Package Archives"
  265. msgstr ""
  266. #. type: Content of: <sect1><sect2><sect3><para>
  267. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:205
  268. msgid ""
  269. "In this scheme, the package installation is faked into a separate tree as "
  270. "described in the Symlink style package management. After the installation, a "
  271. "package archive is created using the installed files. This archive is then "
  272. "used to install the package either on the local machine or can even be used "
  273. "to install the package on other machines."
  274. msgstr ""
  275. #. type: Content of: <sect1><sect2><sect3><para>
  276. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:211
  277. msgid ""
  278. "This approach is used by most of the package managers found in the "
  279. "commercial distributions. Examples of package managers that follow this "
  280. "approach are RPM (which, incidentally, is required by the <ulink "
  281. "url=\"http://refspecs.linuxfoundation.org/lsb.shtml\">Linux Standard Base "
  282. "Specification</ulink>), pkg-utils, Debian's apt, and Gentoo's Portage "
  283. "system. A hint describing how to adopt this style of package management for "
  284. "LFS systems is located at <ulink url=\"&hints-root;fakeroot.txt\"/>."
  285. msgstr ""
  286. #. type: Content of: <sect1><sect2><sect3><para>
  287. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:220
  288. msgid ""
  289. "Creation of package files that include dependency information is complex and "
  290. "is beyond the scope of LFS."
  291. msgstr ""
  292. #. type: Content of: <sect1><sect2><sect3><para>
  293. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:223
  294. msgid ""
  295. "Slackware uses a <command>tar</command> based system for package archives. "
  296. "This system purposely does not handle package dependencies as more complex "
  297. "package managers do. For details of Slackware package management, see "
  298. "<ulink url=\"http://www.slackbook.org/html/package-management.html\"/>."
  299. msgstr ""
  300. #. type: Content of: <sect1><sect2><sect3><title>
  301. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:231
  302. msgid "User Based Management"
  303. msgstr ""
  304. #. type: Content of: <sect1><sect2><sect3><para>
  305. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:233
  306. msgid ""
  307. "This scheme, unique to LFS, was devised by Matthias Benkmann, and is "
  308. "available from the <ulink url=\"&hints-index;\">Hints Project</ulink>. In "
  309. "this scheme, each package is installed as a separate user into the standard "
  310. "locations. Files belonging to a package are easily identified by checking "
  311. "the user ID. The features and shortcomings of this approach are too complex "
  312. "to describe in this section. For the details please see the hint at <ulink "
  313. "url=\"&hints-root;more_control_and_pkg_man.txt\"/>."
  314. msgstr ""
  315. #. type: Content of: <sect1><sect2><title>
  316. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:246
  317. msgid "Deploying LFS on Multiple Systems"
  318. msgstr ""
  319. #. type: Content of: <sect1><sect2><para>
  320. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:248
  321. msgid ""
  322. "One of the advantages of an LFS system is that there are no files that "
  323. "depend on the position of files on a disk system. Cloning an LFS build to "
  324. "another computer with the same architecture as the base system is as simple "
  325. "as using <command>tar</command> on the LFS partition that contains the root "
  326. "directory (about 250MB uncompressed for a base LFS build), copying that file "
  327. "via network transfer or CD-ROM to the new system and expanding it. From "
  328. "that point, a few configuration files will have to be changed. "
  329. "Configuration files that may need to be updated include: "
  330. "<filename>/etc/hosts</filename>, <filename>/etc/fstab</filename>, "
  331. "<filename>/etc/passwd</filename>, <filename>/etc/group</filename>, <phrase "
  332. "revision=\"systemd\"> <filename>/etc/shadow</filename>, and "
  333. "<filename>/etc/ld.so.conf</filename>. </phrase> <phrase revision=\"sysv\"> "
  334. "<filename>/etc/shadow</filename>, <filename>/etc/ld.so.conf</filename>, "
  335. "<filename>/etc/sysconfig/rc.site</filename>, "
  336. "<filename>/etc/sysconfig/network</filename>, and "
  337. "<filename>/etc/sysconfig/ifconfig.eth0</filename>. </phrase>"
  338. msgstr ""
  339. #. type: Content of: <sect1><sect2><para>
  340. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:273
  341. msgid ""
  342. "A custom kernel may need to be built for the new system depending on "
  343. "differences in system hardware and the original kernel configuration."
  344. msgstr ""
  345. #. type: Content of: <sect1><sect2><note><para>
  346. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:277
  347. msgid ""
  348. "There have been some reports of issues when copying between similar but not "
  349. "identical architectures. For instance, the instruction set for an Intel "
  350. "system is not identical with an AMD processor and later versions of some "
  351. "processors may have instructions that are unavailable in earlier versions."
  352. msgstr ""
  353. #. type: Content of: <sect1><sect2><para>
  354. #: /home/xry111/svn-repos/LFS-BOOK/chapter08/pkgmgt.xml:283
  355. msgid ""
  356. "Finally the new system has to be made bootable via <xref "
  357. "linkend=\"ch-bootable-grub\"/>."
  358. msgstr ""