guix-manual 1.0.1-pre1 - en to zh_CN translation catalogue (710 entries)

note: #-#-#-#-#  contributing.pot (guix manual checkout)  #-#-#-#-# type: chapter #-#-#-#-#  guix.pot (guix manual checkout)  #-#-#-#-# type: menuentry
en: Contributing
zh_CN: 贡献

note: type: Plain text
en: This project is a cooperative effort, and we need your help to make it grow! Please get in touch with us on @email{guix-devel@@gnu.org} and @code{#guix} on the Libera Chat IRC network.  We welcome ideas, bug reports, patches, and anything that may be helpful to the project.  We particularly welcome help on packaging (@pxref{Packaging Guidelines}).
zh_CN: 本项目是团体合作成果，我们需要您的帮助以更好地发展。请通过 @email{guix-devel@@gnu.org} 邮箱和 Libera Chat IRC 网络上的 @code{#guix} 频道联系我们。我们欢迎您的想法、Bug 反馈、补丁和任何可能对项目有帮助的贡献。我们特别欢迎帮助我们打包（@pxref{Packaging Guidelines}）。

note: type: cindex
en: code of conduct, of contributors
zh_CN: 行为准则和贡献者

note: type: cindex
en: contributor covenant
zh_CN: 贡献者契约

note: type: Plain text
en: We want to provide a warm, friendly, and harassment-free environment, so that anyone can contribute to the best of their abilities.  To this end our project uses a ``Contributor Covenant'', which was adapted from @url{https://contributor-covenant.org/}.  You can find a local version in the @file{CODE-OF-CONDUCT} file in the source tree.
zh_CN: 我们希望提供一个温暖、友好，并且没有骚扰的的环境，这样每个人都能尽最大努力贡献。为了这个目的，我们的项目遵循“贡献者契约”，这个契约是根据 @url{https://contributor-covenant.org/} 制定的。你可以在源代码目录里的 @file{CODE-OF-CONDUCT} 文件里找到一份本地版。

note: type: Plain text
en: Contributors are not required to use their legal name in patches and on-line communication; they can use any name or pseudonym of their choice.
zh_CN: 贡献者在提交补丁和网上交流时不需要使用法律认可的名字。他们可以使用任何名字或者假名。

note: type: section
en: Building from Git
zh_CN: 从Git构建

note: type: menuentry
en: The latest and greatest.
zh_CN: 最新的并且最好的。

note: type: section
en: Running Guix Before It Is Installed
zh_CN: 在安装之前运行Guix

note: type: menuentry
en: Hacker tricks.
zh_CN: 黑客技巧。

note: type: section
en: The Perfect Setup
zh_CN: 完美的配置

note: type: menuentry
en: The right tools.
zh_CN: 正确的工具。

note: type: section
en: Packaging Guidelines
zh_CN: 打包指导

note: type: menuentry
en: Growing the distribution.
zh_CN: 帮助发行版成长。

note: type: section
en: Coding Style
zh_CN: 代码风格

note: type: menuentry
en: Hygiene of the contributor.
zh_CN: 出资者的卫生状况。

note: type: section
en: Submitting Patches
zh_CN: 提交补丁

note: type: menuentry
en: Share your work.
zh_CN: 分享你的工作。

note: type: section
en: Tracking Bugs and Patches
zh_CN: 跟踪程序漏洞和补丁

note: type: menuentry
en: Keeping it all organized.
zh_CN: 保持井井有条。

note: type: section
en: Commit Access
zh_CN: 提交权利

note: type: menuentry
en: Pushing to the official repository.
zh_CN: 推送到管方的仓库。

note: type: section
en: Updating the Guix Package
zh_CN: 更新Guix软件包

note: type: menuentry
en: Updating the Guix package definition.
zh_CN: 更新Guix的软件包定义。

note: type: section
en: Writing Documentation
zh_CN: 撰写文档

note: type: menuentry
en: Improving documentation in GNU Guix.
zh_CN: 完善GNU Guix中的文档。

note: type: section
en: Translating Guix
zh_CN: 翻译 Guix

note: type: menuentry
en: Make Guix speak your native language.
zh_CN: 用您的母语翻译 Guix。

note: type: Plain text
en: If you want to hack Guix itself, it is recommended to use the latest version from the Git repository:
zh_CN: 如果你想折腾Guix本身，建议使用Git仓库里最新的版本：

note: type: Plain text
en: How do you ensure that you obtained a genuine copy of the repository? To do that, run @command{guix git authenticate}, passing it the commit and OpenPGP fingerprint of the @dfn{channel introduction} (@pxref{Invoking guix git authenticate}):
zh_CN: 如何确保您获得了存储库的真实副本？为此，运行@command{guix git authenticate}，将@dfn{channel introduction}（@pxref{Invoking guix git authenticate}）的提交和OpenPGP指纹传递给它：

note: type: Plain text
en: This command completes with exit code zero on success; it prints an error message and exits with a non-zero code otherwise.
zh_CN: 此命令完成，若成功退出代码为零；否则打印一条错误消息，以非零代码退出。

note: type: Plain text
en: As you can see, there is a chicken-and-egg problem: you first need to have Guix installed.  Typically you would install Guix System (@pxref{System Installation}) or Guix on top of another distro (@pxref{Binary Installation}); in either case, you would verify the OpenPGP signature on the installation medium.  This ``bootstraps'' the trust chain.
zh_CN: 如你所见，存在一个先有鸡还是蛋的问题：首先你需要安装Guix。更多情况，您将在另一个发行版（@pxref{System Installation}）上安装Guix系统（@pxref{Binary Installation}）或Guix；但无论如何，您都需要在安装介质上验证OpenPGP签名。这“保证”了信任链。

note: type: Plain text
en: The easiest way to set up a development environment for Guix is, of course, by using Guix! The following command starts a new shell where all the dependencies and appropriate environment variables are set up to hack on Guix:
zh_CN: 设置Guix开发环境的最简单的方式当然是使用Guix！下面这些命令启动一个shell，所有的依赖和环境变量都为折腾Guix设置好了：

note: type: Plain text
en: If you are unable to use Guix when building Guix from a checkout, the following are the required packages in addition to those mentioned in the installation instructions (@pxref{Requirements}).
zh_CN: 当从Git检出构建Guix时无法使用Guix，除安装指导（@pxref{Requirements}）里提及的软件包之外还需要这些包。

note: type: item
en: @url{https://www.gnu.org/software/help2man/, GNU Help2man (optional)}.
zh_CN: @url{https://www.gnu.org/software/help2man/, GNU Help2man（可选）}。

note: type: example
en: ./bootstrap
zh_CN: 引导

note: type: Plain text
en: it probably means that Autoconf couldn’t find @file{pkg.m4}, which is provided by pkg-config.  Make sure that @file{pkg.m4} is available.  The same holds for the @file{guile.m4} set of macros provided by Guile.  For instance, if you installed Automake in @file{/usr/local}, it wouldn’t look for @file{.m4} files in @file{/usr/share}.  In that case, you have to invoke the following command:
zh_CN: 它可能意味着Autoconf无法找到由pkg-config提供的@file{pkg.m4}。请确保@file{pkg.m4}可用。由Guile提供的@file{guile.m4}宏也类似。假如你的Automake安装在@file{/usr/local}，那么它不会从@file{/usr/share}里寻找@file{.m4}文件。这种情况下，你必须执行下面这个命令：

note: type: Plain text
en: @xref{Macro Search Path,,, automake, The GNU Automake Manual}, for more information.
zh_CN: 参考@xref{Macro Search Path,,, automake, The GNU Automake Manual}.

note: type: quotation
en: Note
zh_CN: 注

note: type: Plain text
en: In order to keep a sane working environment, you will find it useful to test the changes made in your local source tree checkout without actually installing them.  So that you can distinguish between your ``end-user'' hat and your ``motley'' costume.
zh_CN: 为了保持一个合适的工作环境，你会发现在你的本地代码树里测试修改而不用安装它们会很有用。TODO: So that you can distinguish between your ``end-user'' hat and your ``motley'' costume.

note: type: Plain text
en: Similarly, an example for a Guile session using the Guix modules:
zh_CN: 同样，一个使用 Guix 模块的 Guile 会话的例子：

note: type: Plain text
en: The @command{pre-inst-env} script sets up all the environment variables necessary to support this, including @env{PATH} and @env{GUILE_LOAD_PATH}.
zh_CN: @command{pre-inst-env}脚本设置为此好了所有必要的的环境变量，包括@env{PATH}和@env{GUILE_LOAD_PATH}。

note: type: Plain text
en: Note that @command{./pre-inst-env guix pull} does @emph{not} upgrade the local source tree; it simply updates the @file{~/.config/guix/current} symlink (@pxref{Invoking guix pull}).  Run @command{git pull} instead if you want to upgrade your local source tree.
zh_CN: @command{./pre-inst-env guix pull} @emph{不} 会更新本地源代码树，它只更新符号链接@file{~/.config/guix/current} (@pxref{Invoking guix pull})。如果你想更新本地源代码树，请运行@command{git pull}。

note: type: Plain text
en: The Perfect Setup to hack on Guix is basically the perfect setup used for Guile hacking (@pxref{Using Guile in Emacs,,, guile, Guile Reference Manual}).  First, you need more than an editor, you need @url{https://www.gnu.org/software/emacs, Emacs}, empowered by the wonderful @url{https://nongnu.org/geiser/, Geiser}.  To set that up, run:
zh_CN: 折腾 Guix 的完美配置也是折腾 Guile 的完美配置 @pxref{Using Guile in Emacs,,, guile, Guile Reference Manual})。首先，你需要的不仅是一个编辑器，你需要 @url{https://www.gnu.org/software/emacs, Emacs}，以及美妙的 @url{http://nongnu.org/geiser/, Geiser}。为此，运行：

note: type: Plain text
en: Geiser allows for interactive and incremental development from within Emacs: code compilation and evaluation from within buffers, access to on-line documentation (docstrings), context-sensitive completion, @kbd{M-.} to jump to an object definition, a REPL to try out your code, and more (@pxref{Introduction,,, geiser, Geiser User Manual}).  For convenient Guix development, make sure to augment Guile’s load path so that it finds source files from your checkout:
zh_CN: Geiser 允许在 Emacs 里进行交互式的、增长式的开发：buffer 里的代码补全和执行，获取一行的文档 (docstrings)，上下文敏感的补全，@kbd{M-.} 跳转到对象定义，测试代码的 REPL，及更多（@pxref{Introduction,,, geiser, Geiser User Manual}）。为了方便的 Guix 开发，请确保修改 Guile 的加载路径 (load path) 以使其能从你的项目里找到源代码文件：

note: type: lisp
en: ;; @r{Assuming the Guix checkout is in ~/src/guix.}
    (with-eval-after-load 'geiser-guile
      (add-to-list 'geiser-guile-load-path "~/src/guix"))
zh_CN: ;; @r{假设Guix项目在 ~/src/guix.}
    (with-eval-after-load 'geiser-guile
      (add-to-list 'geiser-guile-load-path "~/src/guix"))

note: type: Plain text
en: To actually edit the code, Emacs already has a neat Scheme mode.  But in addition to that, you must not miss @url{https://www.emacswiki.org/emacs/ParEdit, Paredit}.  It provides facilities to directly operate on the syntax tree, such as raising an s-expression or wrapping it, swallowing or rejecting the following s-expression, etc.
zh_CN: 真正编辑代码时别忘了 Emacs 自带了方便的 Scheme 模式。而且，一定不要错过 @url{https://www.emacswiki.org/emacs/ParEdit, Paredit}。它提供了直接操作语法树的的功能，例如，用 S- 表达式替换父节点，为 S- 表达式添加、删除前后的括号，删除后面的 S- 表达式，等等。

note: type: cindex
en: code snippets
zh_CN: 代码片段

note: type: cindex
en: templates
zh_CN: 模板

note: type: cindex
en: reducing boilerplate
zh_CN: 减少样板

note: type: Plain text
en: The commit message snippets depend on @url{https://magit.vc/, Magit} to display staged files.  When editing a commit message type @code{add} followed by @kbd{TAB} to insert a commit message template for adding a package; type @code{update} followed by @kbd{TAB} to insert a template for updating a package; type @code{https} followed by @kbd{TAB} to insert a template for changing the home page URI of a package to HTTPS.
zh_CN: commit信息片段显示staged文件需要依赖@url{https://magit.vc/, Magit}。编辑commit信息时，输入@code{add}，然后按@kbd{TAB}就可以插入一段用于新增软件包的模板；输入@code{update}，然后按@kbd{TAB}可以插入一段更新软件包的模板；输入@code{https}然后按@kbd{TAB}可以插入一段修改主页URI为HTTPS的模板。

note: type: Plain text
en: The main snippet for @code{scheme-mode} is triggered by typing @code{package...} followed by @kbd{TAB}.  This snippet also inserts the trigger string @code{origin...}, which can be expanded further.  The @code{origin} snippet in turn may insert other trigger strings ending on @code{...}, which also can be expanded further.
zh_CN: @code{scheme-mode}最重要的模板可以通过输入@code{package...}，然后按@kbd{TAB}触发。这个片段还插入了触发字符串@code{origin...}，以进一步展开。@code{origin}片段更进一步的可能插入其它以@code{...}结尾的触发字符串，它们可以被继续展开。

note: type: cindex
en: packages, creating
zh_CN: 软件包, 创建

note: type: Plain text
en: The GNU distribution is nascent and may well lack some of your favorite packages.  This section describes how you can help make the distribution grow.
zh_CN: 这个GNU发行版正在开发的早期阶段，可能缺少一些你喜欢的软件。这个章节介绍你可以怎样帮助这个发行版成长。

note: type: Plain text
en: Free software packages are usually distributed in the form of @dfn{source code tarballs}---typically @file{tar.gz} files that contain all the source files.  Adding a package to the distribution means essentially two things: adding a @dfn{recipe} that describes how to build the package, including a list of other packages required to build it, and adding @dfn{package metadata} along with that recipe, such as a description and licensing information.
zh_CN: 自由软件通常以@dfn{源代码包}的形式分发，通常是包含完整代码的@file{tar.gz}包。添加软件包到这个发行版意味着两件事：添加描述如何构建包的@dfn{配方}和一系列依赖软件，以及添加配方之外的@dfn{软件包元数据}，如一段文字描述和证书信息。

note: type: Plain text
en: In Guix all this information is embodied in @dfn{package definitions}.  Package definitions provide a high-level view of the package.  They are written using the syntax of the Scheme programming language; in fact, for each package we define a variable bound to the package definition, and export that variable from a module (@pxref{Package Modules}).  However, in-depth Scheme knowledge is @emph{not} a prerequisite for creating packages.  For more information on package definitions, @pxref{Defining Packages}.
zh_CN: 在Guix里所有这些信息都包含在@dfn{软件包定义}里。软件包定义提供了软件包的高层视角。它们使用Scheme编程语言编写，事实上，对每个软件包我们都定义一个绑定到软件包定义的的变量，并且从模块（@pxref{Package Modules}）中导出那个变量。然而，深入的Scheme知识@emph{不}是创建软件包的前提条件。若要了解软件包的更多信息，@pxref{Defining Packages}。

note: type: Plain text
en: Once a package definition is in place, stored in a file in the Guix source tree, it can be tested using the @command{guix build} command (@pxref{Invoking guix build}).  For example, assuming the new package is called @code{gnew}, you may run this command from the Guix build tree (@pxref{Running Guix Before It Is Installed}):
zh_CN: 一旦软件包定义准备好了，并且包存在Guix代码树的一个文件里，你可以用@command{guix build} (@pxref{Invoking guix build})命令测试它。假设这个新软件包的名字叫做@code{gnew}，你可以在Guix构建树里运行这个命令(@pxref{Running Guix Before It Is Installed})：

note: type: Plain text
en: Using @code{--keep-failed} makes it easier to debug build failures since it provides access to the failed build tree.  Another useful command-line option when debugging is @code{--log-file}, to access the build log.
zh_CN: 使用@code{--keep-failed}参数会保留失败的构建树，这可以使调试构建错误更容易。@code{--log-file}也是一个调试时很有用的参数，它可以用来访问构建日志。

note: type: Plain text
en: If the package is unknown to the @command{guix} command, it may be that the source file contains a syntax error, or lacks a @code{define-public} clause to export the package variable.  To figure it out, you may load the module from Guile to get more information about the actual error:
zh_CN: 如果@command{guix}命令找不到这个软件包，那可能是因为源文件包含语法错误，或者缺少导出软件包的@code{define-public}语句。为了查找错误，你可以用Guile导入这个模块以了解这个错误的详情：

note: type: cindex
en: substituter
zh_CN: substitutes

note: type: subsection
en: Software Freedom
zh_CN: 软件自由

note: type: menuentry
en: What may go into the distribution.
zh_CN: 什么可以进入这个发行版。

note: type: subsection
en: Package Naming
zh_CN: 软件包命名

note: type: menuentry
en: What's in a name?
zh_CN: 名字里包含什么？

note: type: subsection
en: Version Numbers
zh_CN: 版本号

note: type: menuentry
en: When the name is not enough.
zh_CN: 当名字不够时。

note: type: subsection
en: Synopses and Descriptions
zh_CN: 简介和描述

note: type: menuentry
en: Helping users find the right package.
zh_CN: 帮助用户寻找合适的软件包。

note: type: subsection
en: Python Modules
zh_CN: Python模块

note: type: menuentry
en: A touch of British comedy.
zh_CN: 接触英式的喜剧。

note: type: subsection
en: Perl Modules
zh_CN: Perl模块

note: type: menuentry
en: Little pearls.
zh_CN: 小珍珠。

note: type: subsection
en: Java Packages
zh_CN: Java包

note: type: menuentry
en: Coffee break.
zh_CN: 喝咖啡休息。

note: type: menuentry
en: Beware of oxidation.
zh_CN: 谨防氧化。

note: type: subsection
en: Fonts
zh_CN: 字体

note: type: menuentry
en: Fond of fonts.
zh_CN: 字体的乐趣。

note: type: cindex
en: free software
zh_CN: 自由软件

note: type: Plain text
en: The GNU operating system has been developed so that users can have freedom in their computing.  GNU is @dfn{free software}, meaning that users have the @url{https://www.gnu.org/philosophy/free-sw.html,four essential freedoms}: to run the program, to study and change the program in source code form, to redistribute exact copies, and to distribute modified versions.  Packages found in the GNU distribution provide only software that conveys these four freedoms.
zh_CN: 开发 GNU 操作系统是为了用户拥有计算的自由。GNU是@dfn{自由软件}，这意味着它有@url{https://www.gnu.org/philosophy/free-sw.html,四项重要的自由}：运行程序的自由，以源代码形式学习和修改程序的自由，原样重新分发副本的自由，和分发修改后的版本的自由。GNU 发行版里包含的软件包只提供遵守这四项自由的软件。

note: type: Plain text
en: In addition, the GNU distribution follow the @url{https://www.gnu.org/distros/free-system-distribution-guidelines.html,free software distribution guidelines}.  Among other things, these guidelines reject non-free firmware, recommendations of non-free software, and discuss ways to deal with trademarks and patents.
zh_CN: 此外，GNU 发行版遵循@url{https://www.gnu.org/distros/free-system-distribution-guidelines.html,自由软件发行版准则}。这些准则拒绝非自由的固件和对非自由软件的推荐，并讨论解决商标和专利的方法。

note: type: Plain text
en: Some otherwise free upstream package sources contain a small and optional subset that violates the above guidelines, for instance because this subset is itself non-free code.  When that happens, the offending items are removed with appropriate patches or code snippets in the @code{origin} form of the package (@pxref{Defining Packages}).  This way, @code{guix build --source} returns the ``freed'' source rather than the unmodified upstream source.
zh_CN: 某些上游的软件包源代码包含一小部分违反上述准则的可选的子集，比如这个子集本身就是非自由代码。这时，这些讨厌的代码需要用合适的补丁或者软件包定义（@pxref{Defining Packages}）里的@code{origin}里的代码片段移除。这样，@code{guix build --source}就可以返回自由的源代码而不是未经修改的上游源代码。

note: type: cindex
en: package name
zh_CN: 软件包名字

note: type: Plain text
en: A package actually has two names associated with it.  First, there is the name of the @emph{Scheme variable}, the one following @code{define-public}.  By this name, the package can be made known in the Scheme code, for instance as input to another package.  Second, there is the string in the @code{name} field of a package definition.  This name is used by package management commands such as @command{guix package} and @command{guix build}.
zh_CN: 一个软件包事实上有两个名字：第一个是@emph{Scheme变量}的名字，即用@code{define-public}定义的名字。通过这个名字，软件包可以被Scheme代码找到，如用作其它软件包的输入。第二个名字是软件包定义里的@code{name}属性的字符串值。这个名字用于软件包管理命令，如：@command{guix package}，@command{guix build}。

note: type: Plain text
en: Both are usually the same and correspond to the lowercase conversion of the project name chosen upstream, with underscores replaced with hyphens.  For instance, GNUnet is available as @code{gnunet}, and SDL_net as @code{sdl-net}.
zh_CN: 两个名字通常是相同的，常是上游项目名字转成小写字母并把下划线替换成连字符的结果。比如，GNUnet转成@code{gnunet}，SDL_net转成@code{sdl-net}。

note: type: Plain text
en: We do not add @code{lib} prefixes for library packages, unless these are already part of the official project name.  But @pxref{Python Modules} and @ref{Perl Modules} for special rules concerning modules for the Python and Perl languages.
zh_CN: 我们不给库软件包添加@code{lib}前缀，除非它是项目官方名字的一部分。但是@pxref{Python Modules}和@ref{Perl Modules}有关于Python和Perl语言的特殊规则。

note: type: Plain text
en: Font package names are handled differently, @pxref{Fonts}.
zh_CN: 字体软件包的名字处理起来不同，@pxref{Fonts}.

note: type: cindex
en: package version
zh_CN: 软件包版本

note: type: Plain text
en: We usually package only the latest version of a given free software project.  But sometimes, for instance for incompatible library versions, two (or more) versions of the same package are needed.  These require different Scheme variable names.  We use the name as defined in @ref{Package Naming} for the most recent version; previous versions use the same name, suffixed by @code{-} and the smallest prefix of the version number that may distinguish the two versions.
zh_CN: 我们通常只为每个自由软件的最新版本打包。但是有时候，比如对于版本不兼容的库，需要有同一个软件包的两个或更多版本。它们需要使用不同的Scheme变量名。我们为最新的版本使用@ref{Package Naming}里规定的名字，旧的版本使用加上后缀的名字，后缀是@code{-}和可以区分开版本号的版本号的最小前缀。

note: type: Plain text
en: The name inside the package definition is the same for all versions of a package and does not contain any version number.
zh_CN: 软件包定义里的名字对于同一个软件包的所有版本都是相同的，并且不含有版本号。

note: type: Plain text
en: For instance, the versions 2.24.20 and 3.9.12 of GTK+ may be packaged as follows:
zh_CN: 例如，GTK+的2.24.20和3.9.12两个版本可以这样打包：

note: type: Plain text
en: If we also wanted GTK+ 3.8.2, this would be packaged as
zh_CN: 如果我们还需要GTK+ 3.8.2，就这样打包

note: type: cindex
en: version number, for VCS snapshots
zh_CN: 用于版本控制快照的版本号

note: type: Plain text
en: Occasionally, we package snapshots of upstream's version control system (VCS) instead of formal releases.  This should remain exceptional, because it is up to upstream developers to clarify what the stable release is.  Yet, it is sometimes necessary.  So, what should we put in the @code{version} field?
zh_CN: 有时候，我们为软件包上游的版本控制系统（VCS）的快照而不是正式发布版打包。这是特殊情况，因为决定哪个是稳定版的权力应该属于上游开发者。然而，有时候这是必须的。那么，我们该如何决定写在@code{version}里的版本号呢？

note: type: Plain text
en: Clearly, we need to make the commit identifier of the VCS snapshot visible in the version string, but we also need to make sure that the version string is monotonically increasing so that @command{guix package --upgrade} can determine which version is newer.  Since commit identifiers, notably with Git, are not monotonically increasing, we add a revision number that we increase each time we upgrade to a newer snapshot.  The resulting version string looks like this:
zh_CN: 显然，我们需要让VCS快照的commit ID在版本号中体现出来，但是我们也需要确保版本号单调递增，以便@command{guix package --upgrade}决定哪个版本号更新。由于commit ID，尤其是Git的commit ID，不是单调递增的，我们添加一个每次升级快照时都手动增长的revision数字。最后的版本号字符串看起来是这样：

note: type: example
en: 2.0.11-3.cabba9e
      ^    ^    ^
      |    |    `-- upstream commit ID
      |    |
      |    `--- Guix package revision
      |
    latest upstream version
zh_CN: 2.0.11-3.cabba9e
      ^    ^    ^
      |    |    `-- 上游的commit ID
      |    |
      |    `--- Guix软件包的revision
      |
    最新的上游版本号

note: type: Plain text
en: It is a good idea to strip commit identifiers in the @code{version} field to, say, 7 digits.  It avoids an aesthetic annoyance (assuming aesthetics have a role to play here) as well as problems related to OS limits such as the maximum shebang length (127 bytes for the Linux kernel).  There are helper functions for doing this for packages using @code{git-fetch} or @code{hg-fetch} (see below).  It is best to use the full commit identifiers in @code{origin}s, though, to avoid ambiguities.  A typical package definition may look like this:
zh_CN: 把@code{版本号}里的commit ID截短，比如只取7个数字，是一个好主意。它避免了美学上的烦恼（假设美学在这里很重要），以及操作系统限制引起的问题（比如Linux内核的127字节）。尽管如此，在@code{origin}里最好使用完整的commit ID，以避免混淆。通常一个软件包应该看起来是下面这样：

note: type: lisp
en: (define my-package
      (let ((commit "c3f29bc928d5900971f65965feaae59e1272a3f7")
            (revision "1"))          ;Guix package revision
        (package
          (version (git-version "0.9" revision commit))
          (source (origin
                    (method git-fetch)
                    (uri (git-reference
                          (url "git://example.org/my-package.git")
                          (commit commit)))
                    (sha256 (base32 "1mbikn@dots{}"))
                    (file-name (git-file-name name version))))
          ;; @dots{}
          )))
zh_CN: (define my-package
      (let ((commit "c3f29bc928d5900971f65965feaae59e1272a3f7")
            (revision "1"))          ;Guix软件包的revision
        (package
          (version (git-version "0.9" revision commit))
          (source (origin
                    (method git-fetch)
                    (uri (git-reference
                          (url "git://example.org/my-package.git")
                          (commit commit)))
                    (sha256 (base32 "1mbikn@dots{}"))
                    (file-name (git-file-name name version))))
          ;; @dots{}
          )))

note: type: cindex
en: package description
zh_CN: 软件包描述

note: type: cindex
en: package synopsis
zh_CN: 软件包简介

note: type: Plain text
en: As we have seen before, each package in GNU@tie{}Guix includes a synopsis and a description (@pxref{Defining Packages}).  Synopses and descriptions are important: They are what @command{guix package --search} searches, and a crucial piece of information to help users determine whether a given package suits their needs.  Consequently, packagers should pay attention to what goes into them.
zh_CN: 我们已经看到，GNU@tie{}Guix里的每个软件包都包含一个简介（synopsis）和一个描述（description）（@pxref{Defining Packages}）。简介和描述很重要：它们是@command{guix package --search}搜索的信息，并且是帮助用户决定一个软件包是否符合自己需求的重要信息。因此，打包的人应该关注怎样写它们的内容。

note: type: Plain text
en: Synopses must start with a capital letter and must not end with a period.  They must not start with ``a'' or ``the'', which usually does not bring anything; for instance, prefer ``File-frobbing tool'' over ``A tool that frobs files''.  The synopsis should say what the package is---e.g., ``Core GNU utilities (file, text, shell)''---or what it is used for---e.g., the synopsis for GNU@tie{}grep is ``Print lines matching a pattern''.
zh_CN: 简介必须以大写字母开头，并且不能以句号结尾。它们不能以 ``a'' 或者 ``the'' 等没有意义的词开头。例如 ``File-frobbing tool'' 要比 ``A tool that frobs files'' 更好。简介需要说明软件包是什么－－如 ``Core GNU utilities (file, text, shell)''，或者它的用途－－如 GNU@tie{}grep 的简介是 ``Print lines matching a pattern''。

note: type: Plain text
en: Keep in mind that the synopsis must be meaningful for a very wide audience.  For example, ``Manipulate alignments in the SAM format'' might make sense for a seasoned bioinformatics researcher, but might be fairly unhelpful or even misleading to a non-specialized audience.  It is a good idea to come up with a synopsis that gives an idea of the application domain of the package.  In this example, this might give something like ``Manipulate nucleotide sequence alignments'', which hopefully gives the user a better idea of whether this is what they are looking for.
zh_CN: 记住，简介必须能被广大的听众理解。例如，“以SAM格式修改对齐”可能对经验丰富的生物信息科研工作者来说能理解，但是对普通对听众则是无用的甚至是令人误解的。简介最好说明软件包应用的领域。在这个例子中，应该这样描述“修改核苷酸序列的对齐格式”，这会让用户更容易判断这是不是他们想要的。

note: type: Plain text
en: Descriptions should take between five and ten lines.  Use full sentences, and avoid using acronyms without first introducing them.  Please avoid marketing phrases such as ``world-leading'', ``industrial-strength'', and ``next-generation'', and avoid superlatives like ``the most advanced''---they are not helpful to users looking for a package and may even sound suspicious.  Instead, try to be factual, mentioning use cases and features.
zh_CN: 描述应该在5至10句话之间。使用完整的句子，并且避免在未介绍的情况下使用缩写。请避免推广营销性对词汇，如“世界领先”，“行业最强”，“下一代”，并且避免高级的形容词，如“最先进的”--他们对用户寻找软件包是无用的，甚至是可疑的。相反的，尽量务实，提及用例和功能。

note: type: cindex
en: Texinfo markup, in package descriptions
zh_CN: 软件包描述里的Texinfo标记

note: type: Plain text
en: To allow @command{xgettext} to extract them as translatable strings, synopses and descriptions @emph{must be literal strings}.  This means that you cannot use @code{string-append} or @code{format} to construct these strings:
zh_CN: 为了让@command{xgettext}可以把它们提取成待翻译的字符串，简介和描述@emph{必须是文字字符串}。这意味着你不能使用@code{string-append}或@code{format}来合成字符串：

note: type: lisp
en: (package
      ;; @dots{}
      (synopsis "This is translatable")
      (description (string-append "This is " "*not*" " translatable.")))
zh_CN: (package
      ;; @dots{}
      (synopsis "这是可以翻译的")
      (description (string-append "这是" "*不可以*" "翻译的")))

note: type: Plain text
en: Translation is a lot of work so, as a packager, please pay even more attention to your synopses and descriptions as every change may entail additional work for translators.  In order to help them, it is possible to make recommendations or instructions visible to them by inserting special comments like this (@pxref{xgettext Invocation,,, gettext, GNU Gettext}):
zh_CN: 翻译是很繁重的工作，所以，作为打包者请更加注意你的简介和介绍，每一个改动都会增加翻译的工作量。为了帮助他们，你可以插入这类可以被他们看到的建议和指示（@pxref{xgettext Invocation,,, gettext, GNU Gettext}）：

note: type: lisp
en: ;; TRANSLATORS: "X11 resize-and-rotate" should not be translated.
    (description "ARandR is designed to provide a simple visual front end
    for the X11 resize-and-rotate (RandR) extension. @dots{}")
zh_CN: ;; TRANSLATORS: "X11 resize-and-rotate"不需要翻译。
    (description "ARandR为X11 resize-and-rotate (RandR)扩展提供简单的图形界面。@dots{}")

note: type: Plain text
en: We currently package Python 2 and Python 3, under the Scheme variable names @code{python-2} and @code{python} as explained in @ref{Version Numbers}.  To avoid confusion and naming clashes with other programming languages, it seems desirable that the name of a package for a Python module contains the word @code{python}.
zh_CN: 我们目前为Python 2和Python 3打包，如@ref{Version Numbers}的规则所述，它们的Scheme变量名分别是@code{python-2}和@code{python}。为了避免和其他编程语言的冲突，Python模块的软件包名字最好含有@code{python}。

note: type: Plain text
en: If a project already contains the word @code{python}, we drop this; for instance, the module python-dateutil is packaged under the names @code{python-dateutil} and @code{python2-dateutil}.  If the project name starts with @code{py} (e.g.@: @code{pytz}), we keep it and prefix it as described above.
zh_CN: 如果一个项目的名字已经含有@code{python}这个单词，我们把它丢掉；例如，python-dateutil模块打包后的名字是@code{python-dateutil}和@code{python2-dateutil}。如果项目的名字以@code{py}开头（如@: @code{pytz}），我们把它保留，并且添加上面所述的前缀。

note: type: subsubsection
en: Specifying Dependencies
zh_CN: 指定依赖

note: type: cindex
en: inputs, for Python packages
zh_CN: Python软件包的输入

note: type: Plain text
en: Your mission, when writing a recipe for a Python package, is to map these dependencies to the appropriate type of ``input'' (@pxref{package Reference, inputs}).  Although the @code{pypi} importer normally does a good job (@pxref{Invoking guix import}), you may want to check the following check list to determine which dependency goes where.
zh_CN: 你在写软件包配方时的任务是把这些依赖转换成相应的“输入”（@pxref{package Reference, inputs}）。尽管@code{pypi}导入工具通常可以做得很好（@pxref{Invoking guix import}），你可能想检查下面这个清单，以决定每个依赖放在哪儿。

note: type: itemize
en: Python dependencies required at run time go into @code{propagated-inputs}.  They are typically defined with the @code{install_requires} keyword in @file{setup.py}, or in the @file{requirements.txt} file.
zh_CN: 运行时需要的Python依赖要放进@code{propagated-inputs}。它们通常由@file{setup.py}文件里的@code{install_requires}关键字或@file{requirements.txt}文件定义。

note: type: itemize
en: Examples are the @code{pytest}, @code{mock}, and @code{nose} test frameworks.  Of course if any of these packages is also required at run-time, it needs to go to @code{propagated-inputs}.
zh_CN: 例如@code{pytest}，@code{mock}，@code{nose}测试框架。当然，如果在运行时需要这里的任何一个包，它需要被加进@code{propagated-inputs}。

note: type: itemize
en: Anything that does not fall in the previous categories goes to @code{inputs}, for example programs or C libraries required for building Python packages containing C extensions.
zh_CN: 任何不属于上述类别的包都要被加进@code{inputs}，如，构建含有C语言扩展的Python包所需的程序和C语言库。

note: type: itemize
en: If a Python package has optional dependencies (@code{extras_require}), it is up to you to decide whether to add them or not, based on their usefulness/overhead ratio (@pxref{Submitting Patches, @command{guix size}}).
zh_CN: 如果一个Python软件包由可选的依赖（@code{extras_require}），由你根据它们的性价比（用处/负担）决定是否添加它们（@pxref{Submitting Patches, @command{guix size}}）。

note: type: Plain text
en: Perl programs standing for themselves are named as any other package, using the lowercase upstream name.  For Perl packages containing a single class, we use the lowercase class name, replace all occurrences of @code{::} by dashes and prepend the prefix @code{perl-}.  So the class @code{XML::Parser} becomes @code{perl-xml-parser}.  Modules containing several classes keep their lowercase upstream name and are also prepended by @code{perl-}.  Such modules tend to have the word @code{perl} somewhere in their name, which gets dropped in favor of the prefix.  For instance, @code{libwww-perl} becomes @code{perl-libwww}.
zh_CN: Perl程序和其它软件包的命名规则类似，用小写的上游名字命名。对于仅包含一个类的Perl包，我们使用小写的类名，把所有的@code{::}替换成破折号，并且添加@code{perl-}前缀。所以类@code{XML::Parser}变成@code{perl-xml-parser}。包含多个类的模块保留它们上游的名字，并且添加@code{perl-}前缀。这类模块的名字通常含有@code{perl}，这个单词需要被删掉。例如，@code{libwww-perl}变成@code{perl-libwww}。

note: type: Plain text
en: Java programs standing for themselves are named as any other package, using the lowercase upstream name.
zh_CN: Java程序和其它软件包的命名规则类似，用小写的上游名字命名。

note: type: Plain text
en: To avoid confusion and naming clashes with other programming languages, it is desirable that the name of a package for a Java package is prefixed with @code{java-}.  If a project already contains the word @code{java}, we drop this; for instance, the package @code{ngsjava} is packaged under the name @code{java-ngs}.
zh_CN: 为了避免和其它编程语言混淆和命名冲突，Java软件包的名字最好有@code{java-}前缀。如果一个项目的名字已经含有@code{java}，我们把它删掉；例如，@code{ngsjava}打包后的名字是@code{java-ngs}。

note: type: Plain text
en: For Java packages containing a single class or a small class hierarchy, we use the lowercase class name, replace all occurrences of @code{.} by dashes and prepend the prefix @code{java-}.  So the class @code{apache.commons.cli} becomes package @code{java-apache-commons-cli}.
zh_CN: 对于仅包含一个或很少几个类的Java软件包，我们使用小写的类名，把所有的@code{.}替换成破折号，并且添加@code{java-}前缀。因此，类@code{apache.commons.cli}打包后的名字是@code{java-apache-commons-cli}。

note: type: Plain text
en: Rust programs standing for themselves are named as any other package, using the lowercase upstream name.
zh_CN: Rust 程序和其它软件包的命名规则类似，用小写的上游名字命名。

note: type: cindex
en: fonts
zh_CN: 字体

note: type: Plain text
en: For fonts that are in general not installed by a user for typesetting purposes, or that are distributed as part of a larger software package, we rely on the general packaging rules for software; for instance, this applies to the fonts delivered as part of the X.Org system or fonts that are part of TeX Live.
zh_CN: 对于通常不会被用户安装用于排版的字体，或者随更大的软件包分发的字体，我们使用通常的命名规则。例如，这适用于X.Org系统附带的字体或TeX Live附带的字体。

note: type: Plain text
en: To make it easier for a user to search for fonts, names for other packages containing only fonts are constructed as follows, independently of the upstream package name.
zh_CN: 为了让用户更容易搜索字体，其它仅含有字体的软件包按以下规则命名，不管上游的包名是什么。

note: type: Plain text
en: The name of a package containing only one font family starts with @code{font-}; it is followed by the foundry name and a dash @code{-} if the foundry is known, and the font family name, in which spaces are replaced by dashes (and as usual, all upper case letters are transformed to lower case).  For example, the Gentium font family by SIL is packaged under the name @code{font-sil-gentium}.
zh_CN: 仅含有一个字体家族的软件包需要以@code{font-}开头；如果作者名字已知，则添加作者名字和@code{-}，接着是字体家族名字（把空格替换成破折号），（和通常一样，把所有的大写字母转换成小写字母）。例如，由SIL设计的Gentium字体家族打包后的名字是@code{font-sil-gentium}。

note: type: Plain text
en: For a package containing several font families, the name of the collection is used in the place of the font family name.  For instance, the Liberation fonts consist of three families, Liberation Sans, Liberation Serif and Liberation Mono.  These could be packaged separately under the names @code{font-liberation-sans} and so on; but as they are distributed together under a common name, we prefer to package them together as @code{font-liberation}.
zh_CN: 对于一个含有多个字体家族的软件包，用集合的名字替换字体家族的名字。例如，Liberation字体含有三个家族，Liberation Sans、Liberation Serif和Liberation Mono。它们可以用@code{font-liberation-sans}等名字分开打包；但是由于它们以一个共同的名字分发，我们倾向于以@code{font-liberation}名字统一打包。

note: type: Plain text
en: In the case where several formats of the same font family or font collection are packaged separately, a short form of the format, prepended by a dash, is added to the package name.  We use @code{-ttf} for TrueType fonts, @code{-otf} for OpenType fonts and @code{-type1} for PostScript Type 1 fonts.
zh_CN: 当同一个字体家族或字体集合的不同格式分开打包时，把破折号和格式（缩写）添加在软件包名字后面。我们用@code{-ttf}代表TrueType字体，@code{-otf}代表OpenType字体，@code{-type1}代表PostScript Type 1字体。

note: type: Plain text
en: In general our code follows the GNU Coding Standards (@pxref{Top,,, standards, GNU Coding Standards}).  However, they do not say much about Scheme, so here are some additional rules.
zh_CN: 总的来说，我们的代码遵循GNU代码规范（@pxref{Top,,, standards, GNU代码规范}）。但是，这个规范对Scheme的介绍不多，所以这儿提供一些额外的规则。

note: type: subsection
en: Programming Paradigm
zh_CN: 编程范例

note: type: menuentry
en: How to compose your elements.
zh_CN: 怎样合成元素。

note: type: subsection
en: Modules
zh_CN: 模块

note: type: menuentry
en: Where to store your code?
zh_CN: 在哪里保存代码？

note: type: subsection
en: Data Types and Pattern Matching
zh_CN: 数据类型和模式匹配

note: type: menuentry
en: Implementing data structures.
zh_CN: 实现数据结构。

note: type: subsection
en: Formatting Code
zh_CN: 格式化代码

note: type: menuentry
en: Writing conventions.
zh_CN: 书写规范。

note: type: Plain text
en: Scheme code in Guix is written in a purely functional style.  One exception is code that involves input/output, and procedures that implement low-level concepts, such as the @code{memoize} procedure.
zh_CN: Guix里的Scheme代码是以纯函数的风格写的。一个例外是有关输入/输出的代码，和实现底层概念的过程，如@code{memoize}过程。

note: type: Plain text
en: Guile modules that are meant to be used on the builder side must live in the @code{(guix build @dots{})} name space.  They must not refer to other Guix or GNU modules.  However, it is OK for a ``host-side'' module to use a build-side module.
zh_CN: 用于构建的Guile模块必须放在@code{(guix build @dots{})}命名空间里。它们不允许引用其它Guix或GNU模块。但是，主机端（host-side)模块可以使用构建端（build-side）模块。

note: type: Plain text
en: Modules that deal with the broader GNU system should be in the @code{(gnu @dots{})} name space rather than @code{(guix @dots{})}.
zh_CN: 关于更广的GNU系统的模块应该在@code{(gnu @dots{})}命名空间里而不是@code{(guix @dots{})}。

note: type: Plain text
en: The tendency in classical Lisp is to use lists to represent everything, and then to browse them ``by hand'' using @code{car}, @code{cdr}, @code{cadr}, and co.  There are several problems with that style, notably the fact that it is hard to read, error-prone, and a hindrance to proper type error reports.
zh_CN: 经典的Lisp倾向于用列表表示所有的东西，然后用@code{car}，@code{cdr}，@code{cadr}等手动浏览它们。这种风格有几个问题，特别是难以阅读，易出错，并且妨碍生成合适的类型错误报告。

note: type: cindex
en: formatting code
zh_CN: 格式化代码

note: type: cindex
en: coding style
zh_CN: 代码风格

note: type: Plain text
en: Some special forms introduced in Guix, such as the @code{substitute*} macro, have special indentation rules.  These are defined in the @file{.dir-locals.el} file, which Emacs automatically uses.  Also note that Emacs-Guix provides @code{guix-devel-mode} mode that indents and highlights Guix code properly (@pxref{Development,,, emacs-guix, The Emacs-Guix Reference Manual}).
zh_CN: 一些Guix添加的special form，如@code{substitute*}宏，有特殊的缩进规则。它们的规则在@file{.dir-locals.el}文件里定义，Emacs会自动使用。另外，Emacs-Guix提供的@code{guix-devel-mode}模式可以正确地缩进和高亮Guix代码（@pxref{Development,,, emacs-guix, Emacs-Guix参考手册}）。

note: type: cindex
en: indentation, of code
zh_CN: 代码缩进

note: type: cindex
en: formatting, of code
zh_CN: 代码格式化

note: type: Plain text
en: If you do not use Emacs, please make sure to let your editor knows these rules.  To automatically indent a package definition, you can also run:
zh_CN: 如果你不使用Emacs，请确保让你的编辑器知道这些规则。为了自动地缩进软件包定义，你也可以运行：

note: type: cindex
en: Vim, Scheme code editing
zh_CN: Vim，编辑Scheme代码

note: type: Plain text
en: If you are editing code with Vim, we recommend that you run @code{:set autoindent} so that your code is automatically indented as you type.  Additionally, @uref{https://www.vim.org/scripts/script.php?script_id=3998, @code{paredit.vim}} may help you deal with all these parentheses.
zh_CN: 如果你用Vim编辑代码，我们推荐你运行@code{:set autoindent}，以使你在输入时自动缩进代码。另外，@uref{https://www.vim.org/scripts/script.php?script_id=3998, @code{paredit.vim}}可以帮你处理括号。

note: type: Plain text
en: We require all top-level procedures to carry a docstring.  This requirement can be relaxed for simple private procedures in the @code{(guix build @dots{})} name space, though.
zh_CN: 我们要求所有的顶级过程附带一个docstring。这个要求对@code{(guix build @dots{})}命名空间里的简单的私有过程可以放宽。

note: type: Plain text
en: Procedures should not have more than four positional parameters.  Use keyword parameters for procedures that take more than four parameters.
zh_CN: 过程不应该有多于四个定位参数。对于接收多于四个定位参数的过程应使用关键字参数。

note: type: Plain text
en: Please write commit logs in the ChangeLog format (@pxref{Change Logs,,, standards, GNU Coding Standards}); you can check the commit history for examples.
zh_CN: 请以ChangeLog格式（@pxref{Change Logs,,, standards, GNU代码规范}）写commit日志；你可以浏览commit历史里的例子。

note: type: Plain text
en: Before submitting a patch that adds or modifies a package definition, please run through this check list:
zh_CN: 提交添加或者修改软件包定义的补丁之前，请过一遍这个检查列表：

note: type: enumerate
en: If the authors of the packaged software provide a cryptographic signature for the release tarball, make an effort to verify the authenticity of the archive.  For a detached GPG signature file this would be done with the @code{gpg --verify} command.
zh_CN: 如果软件包的作者为发布的文件包提供了密码学签名，请验证文件的真实性。对于独立的 GPG 签名文件，这可以通过 @code{gpg --verify} 命令完成。

note: type: enumerate
en: Take some time to provide an adequate synopsis and description for the package.  @xref{Synopses and Descriptions}, for some guidelines.
zh_CN: 花些时间为软件包提供一个合适的简介和描述。更多指导，@xref{Synopses and Descriptions}。

note: type: enumerate
en: Run @code{guix lint @var{package}}, where @var{package} is the name of the new or modified package, and fix any errors it reports (@pxref{Invoking guix lint}).
zh_CN: 运行@code{guix lint @var{软件包}}，@var{软件包}是新添加的或修改过的软件包的名字，修复它报告的错误（@pxref{Invoking guix lint}）。

note: type: enumerate
en: Make sure the package builds on your platform, using @code{guix build @var{package}}.
zh_CN: 用@code{guix build @var{软件包}}命令确保这个软件包可以在你的平台上构建。

note: type: enumerate
en: Then reconfigure your system.
zh_CN: 然后重新配置你的系统。

note: type: cindex
en: bundling
zh_CN: 构建

note: type: enumerate
en: Make sure the package does not use bundled copies of software already available as separate packages.
zh_CN: 请确保软件包里不捆绑出现已经被打过包的软件的副本。

note: type: enumerate
en: Sometimes, packages include copies of the source code of their dependencies as a convenience for users.  However, as a distribution, we want to make sure that such packages end up using the copy we already have in the distribution, if there is one.  This improves resource usage (the dependency is built and stored only once), and allows the distribution to make transverse changes such as applying security updates for a given software package in a single place and have them affect the whole system---something that bundled copies prevent.
zh_CN: 有时，软件包为了方便用户，捆绑了依赖库的源代码。然而，当依赖库在发行版里已经存在时，做为一个发行版，我们希望确保这些软件包使用发行版里已有的副本。这提高资源使用率（依赖库只构建一次，存储一份），并且使发行版更容易管理，如仅在一个地方对某个软件包进行安全更新就可以影响整个系统－－捆绑软件会妨碍这么做。

note: type: cindex
en: branching strategy
zh_CN: 分支策略

note: type: cindex
en: rebuild scheduling strategy
zh_CN: 重新构建的调度策略

note: type: enumerate
en: Depending on the number of dependent packages and thus the amount of rebuilding induced, commits go to different branches, along these lines:
zh_CN: 取决于受影响的软件包的数量，即需要重新构建的数量，commit需要被提交到不同的分支，具体如下：

note: type: item
en: 300 dependent packages or less
zh_CN: 300个或更少的受影响的软件包

note: type: table
en: @code{master} branch (non-disruptive changes).
zh_CN: @code{master}分支（非破坏性的更改）。

note: type: item
en: between 300 and 1,800 dependent packages
zh_CN: 300 至 1800 个受影响的软件包

note: type: item
en: more than 1,800 dependent packages
zh_CN: 超过 1800 个受影响的软件包

note: type: cindex
en: determinism, of build processes
zh_CN: 构建过程的确定性

note: type: cindex
en: reproducible builds, checking
zh_CN: 检查可复现的构建

note: type: enumerate
en: Check whether the package's build process is deterministic.  This typically means checking whether an independent build of the package yields the exact same result that you obtained, bit for bit.
zh_CN: 检查软件包的构建过程是不是确定性的。这通常意味着检查对软件包的独立构建是否能得到每一个比特都完全相同的结果。

note: type: enumerate
en: A simple way to do that is by building the same package several times in a row on your machine (@pxref{Invoking guix build}):
zh_CN: 为此，一个简单的做法是在你的机器上多次构建同一个软件包（@pxref{Invoking guix build}）：

note: type: example
en: guix build --rounds=2 my-package
zh_CN: guix build --rounds=2 <我的软件包>

note: type: enumerate
en: This is enough to catch a class of common non-determinism issues, such as timestamps or randomly-generated output in the build result.
zh_CN: 这足以查出一批普通的不确定性问题，如构建结果里存在时间戳或随机生成的输出。

note: type: enumerate
en: When writing documentation, please use gender-neutral wording when referring to people, such as @uref{https://en.wikipedia.org/wiki/Singular_they, singular ``they''@comma{} ``their''@comma{} ``them''}, and so forth.
zh_CN: 在编写文档时，请用性别中立的词语指代人，如@uref{https://en.wikipedia.org/wiki/Singular_they, “他”@comma{} “他的”}，等。

note: type: enumerate
en: Verify that your patch contains only one set of related changes.  Bundling unrelated changes together makes reviewing harder and slower.
zh_CN: 检查你的补丁只包含一些相关的更改。把不相关的更改捆绑在一起会让评审更困难和更慢。

note: type: enumerate
en: Examples of unrelated changes include the addition of several packages, or a package update along with fixes to that package.
zh_CN: 不相关的更改的例子有：同时新增多个软件包，或更新软件包同时修补这个软件包。

note: type: enumerate
en: When possible, use mirrors in the source URL (@pxref{Invoking guix download}).  Use reliable URLs, not generated ones.  For instance, GitHub archives are not necessarily identical from one generation to the next, so in this case it's often better to clone the repository.  Don't use the @command{name} field in the URL: it is not very useful and if the name changes, the URL will probably be wrong.
zh_CN: 当可能时，请在源URL里使用镜像@pxref{Invoking guix download}。使用可靠的而不是生成的URL。例如，GitHub的下载文件每次生成时不一定是相同的，所以这时最好克隆仓库。不要在URL里使用@command{name}变量：这没有什么用，而且如果名字变了，URL很可能就错了。

note: type: subsection
en: Configuring Git
zh_CN: 配置Git

note: type: subsection
en: Sending a Patch Series
zh_CN: 发送补丁系列

note: type: cindex
en: patch series
zh_CN: 补丁系列

note: type: Plain text
en: @xref{Top,,, debbugs-ug, Debbugs User Guide}, for more information on this nifty tool!
zh_CN: @xref{Top,,, debbugs-ug, Debbugs User Guide}，了解更多有关此实用工具的信息！

note: type: title
en: GNU Guix Reference Manual
zh_CN: GNU Guix 参考手册

note: type: include
en: version.texi
zh_CN: version-zh_CN.texi

note: type: dircategory
en: System administration
zh_CN: 系统管理

note: type: menuentry
en: Guix: (guix)
zh_CN: Guix：（guix）

note: type: menuentry
en: Manage installed software and system configuration.
zh_CN: 管理安装的软件和系统配置。

note: type: menuentry
en: guix package: (guix)Invoking guix package
zh_CN: guix package：调用guix package

note: type: menuentry
en: Installing, removing, and upgrading packages.
zh_CN: 安装、删除和升级软件包。

note: type: menuentry
en: guix gc: (guix)Invoking guix gc
zh_CN: guix gc：调用guix gc

note: type: menuentry
en: Reclaiming unused disk space.
zh_CN: 回收不使用的硬盘空间。

note: type: menuentry
en: guix pull: (guix)Invoking guix pull
zh_CN: guix pull：调用guix pull

note: type: menuentry
en: Update the list of available packages.
zh_CN: 更新可用的软件包列表。

note: type: menuentry
en: guix system: (guix)Invoking guix system
zh_CN: guix system：调用guix system

note: type: menuentry
en: Manage the operating system configuration.
zh_CN: 管理操作系统配置。

note: type: dircategory
en: Software development
zh_CN: 软件开发

note: type: menuentry
en: guix environment: (guix)Invoking guix environment
zh_CN: guix environment：调用guix environment

note: type: menuentry
en: Building development environments with Guix.
zh_CN: 用Guix构建开发环境。

note: type: menuentry
en: guix build: (guix)Invoking guix build
zh_CN: guix build：（guix）调用guix build

note: type: menuentry
en: Building packages.
zh_CN: 构建软件包。

note: type: menuentry
en: guix pack: (guix)Invoking guix pack
zh_CN: guix pack：（guix）调用guix pack

note: type: menuentry
en: Creating binary bundles.
zh_CN: 创建二进制bundle。

note: type: subtitle
en: Using the GNU Guix Functional Package Manager
zh_CN: 使用GNU Guix函数式包管理器

note: type: author
en: The GNU Guix Developers
zh_CN: GNU Guix开发者

note: type: titlepage
en: Edition @value{EDITION} @* @value{UPDATED} @*
zh_CN: 版本@value{EDITION} @* @value{UPDATED} @*

note: type: Plain text
en: This document describes GNU Guix version @value{VERSION}, a functional package management tool written for the GNU system.
zh_CN: 这份文档介绍GNU Guix版本@value{VERSION}，一个为GNU系统编写的函数式包管理器。

note: type: chapter
en: Introduction
zh_CN: 介绍

note: type: menuentry
en: What is Guix about?
zh_CN: Guix是关于什么的？

note: type: chapter
en: Installation
zh_CN: 安装

note: type: menuentry
en: Installing Guix.
zh_CN: 安装Guix。

note: type: chapter
en: System Installation
zh_CN: 系统安装

note: type: menuentry
en: Installing the whole operating system.
zh_CN: 安装整个操作系统。

note: type: chapter
en: Getting Started
zh_CN: 入门

note: type: chapter
en: Package Management
zh_CN: 软件包管理

note: type: menuentry
en: Package installation, upgrade, etc.
zh_CN: 软件包安装、升级等。

note: type: chapter
en: Channels
zh_CN: 通道

note: type: menuentry
en: Customizing the package collection.
zh_CN: 定制软件包集合。

note: type: chapter
en: Development
zh_CN: 开发

note: type: menuentry
en: Guix-aided software development.
zh_CN: Guix辅助的软件开发。

note: type: chapter
en: Programming Interface
zh_CN: 编程接口

note: type: menuentry
en: Using Guix in Scheme.
zh_CN: 在Scheme里使用Guix。

note: type: chapter
en: Utilities
zh_CN: 工具

note: type: menuentry
en: Package management commands.
zh_CN: 软件包管理命令。

note: type: chapter
en: System Configuration
zh_CN: 系统配置

note: type: menuentry
en: Configuring the operating system.
zh_CN: 配置操作系统。

note: type: chapter
en: Documentation
zh_CN: 文档

note: type: menuentry
en: Browsing software user manuals.
zh_CN: 浏览软件用户手册。

note: type: chapter
en: Installing Debugging Files
zh_CN: 安装调试文件

note: type: menuentry
en: Feeding the debugger.
zh_CN: 为调试工具提供输入。

note: type: chapter
en: Security Updates
zh_CN: 安全更新

note: type: menuentry
en: Deploying security fixes quickly.
zh_CN: 快速部署安全补丁。

note: type: chapter
en: Bootstrapping
zh_CN: 引导

note: type: menuentry
en: GNU/Linux built from scratch.
zh_CN: 从头开始构建GNU/Linux。

note: type: node
en: Porting
zh_CN: 移植

note: type: menuentry
en: Targeting another platform or kernel.
zh_CN: 以别的平台或内核为目标。

note: type: menuentry
en: Your help needed!
zh_CN: 你需要帮助！

note: type: chapter
en: Acknowledgments
zh_CN: 致谢

note: type: menuentry
en: Thanks!
zh_CN: 感谢！

note: type: appendix
en: GNU Free Documentation License
zh_CN: GNU自由文档许可证

note: type: menuentry
en: The license of this manual.
zh_CN: 这个用户手册的许可证。

note: type: unnumbered
en: Concept Index
zh_CN: 概念索引

note: type: menuentry
en: Concepts.
zh_CN: 概念。

note: type: unnumbered
en: Programming Index
zh_CN: 编程索引

note: type: menuentry
en: Data types, functions, and variables.
zh_CN: 数据类型、函数和变量。

note: type: menuentry
en: --- The Detailed Node Listing ---
zh_CN: －－－详细的章节列表－－－

note: type: section
en: Managing Software the Guix Way
zh_CN: 以Guix的方式管理软件

note: type: menuentry
en: What's special.
zh_CN: 特殊的地方。

note: type: section
en: GNU Distribution
zh_CN: GNU发行版

note: type: menuentry
en: The packages and tools.
zh_CN: 软件包和工具。

note: type: section
en: Binary Installation
zh_CN: 二进制文件安装

note: type: menuentry
en: Getting Guix running in no time!
zh_CN: 立刻运行Guix！

note: type: section
en: Requirements
zh_CN: 需求

note: type: menuentry
en: Software needed to build and run Guix.
zh_CN: 构建和运行Guix需要的软件。

note: type: section
en: Running the Test Suite
zh_CN: 运行测试套件

note: type: menuentry
en: Testing Guix.
zh_CN: 测试Guix。

note: type: section
en: Setting Up the Daemon
zh_CN: 设置后台进程

note: type: menuentry
en: Preparing the build daemon's environment.
zh_CN: 准备“构建后台进程”的环境。

note: type: node
en: Invoking guix-daemon
zh_CN: 调用guix-daemon

note: type: menuentry
en: Running the build daemon.
zh_CN: 运行后台构建进程。

note: type: section
en: Application Setup
zh_CN: 设置应用程序

note: type: menuentry
en: Application-specific setup.
zh_CN: 应用程序相关的设置。

note: type: menuentry
en: Upgrading Guix and its build daemon.
zh_CN: 升级 Guix 及其构建守护进程。

note: type: subsection
en: Build Environment Setup
zh_CN: 设置构建环境

note: type: menuentry
en: Preparing the isolated build environment.
zh_CN: 准备隔离的构建环境。

note: type: node
en: Daemon Offload Setup
zh_CN: 下发工作给后台进程的设置

note: type: menuentry
en: Offloading builds to remote machines.
zh_CN: 下发构建工作给远程的机器。

note: type: subsection
en: SELinux Support
zh_CN: SELinux的支持

note: type: menuentry
en: Using an SELinux policy for the daemon.
zh_CN: 为后台进程使用SELinux规则。

note: type: section
en: Limitations
zh_CN: 限制

note: type: menuentry
en: What you can expect.
zh_CN: 你可以期待什么。

note: type: section
en: Hardware Considerations
zh_CN: 硬件的考虑

note: type: menuentry
en: Supported hardware.
zh_CN: 支持的硬件。

note: type: section
en: USB Stick and DVD Installation
zh_CN: U盘和DVD安装

note: type: menuentry
en: Preparing the installation medium.
zh_CN: 准备安装介质。

note: type: section
en: Preparing for Installation
zh_CN: 准备安装

note: type: menuentry
en: Networking, partitioning, etc.
zh_CN: 网络、分区等。

note: type: section
en: Guided Graphical Installation
zh_CN: 指导的图形安装

note: type: menuentry
en: Easy graphical installation.
zh_CN: 简单的图形安装。

note: type: section
en: Manual Installation
zh_CN: 手动安装

note: type: menuentry
en: Manual installation for wizards.
zh_CN: 适合巫师的手动安装。

note: type: section
en: After System Installation
zh_CN: 系统安装之后

note: type: menuentry
en: When installation succeeded.
zh_CN: 当安装成功后。

note: type: node
en: Installing Guix in a VM
zh_CN: 在虚拟机里安装 Guix

note: type: menuentry
en: Guix System playground.
zh_CN: Guix系统游乐场。

note: type: section
en: Building the Installation Image
zh_CN: 构建安装镜像

note: type: menuentry
en: How this comes to be.
zh_CN: 这是怎样实现的。

note: type: section
en: Chrooting into an existing system
zh_CN: 改变目录进入现有系统

note: type: node
en: Keyboard Layout and Networking and Partitioning
zh_CN: 键盘布局、网络和分区

note: type: menuentry
en: Initial setup.
zh_CN: 初始设置。

note: type: subsection
en: Proceeding with the Installation
zh_CN: 继续安装步骤

note: type: menuentry
en: Installing.
zh_CN: 安装。

note: type: section
en: Features
zh_CN: 功能

note: type: menuentry
en: How Guix will make your life brighter.
zh_CN: Guix怎样让你的生活更美好。

note: type: node
en: Invoking guix package
zh_CN: 调用guix package

note: type: menuentry
en: Package installation, removal, etc.
zh_CN: 软件包安装，移除等。

note: type: section
en: Substitutes
zh_CN: substitutes

note: type: menuentry
en: Downloading pre-built binaries.
zh_CN: 下载构建好的二进制文件。

note: type: section
en: Packages with Multiple Outputs
zh_CN: 有多个输出的软件包

note: type: menuentry
en: Single source package, multiple outputs.
zh_CN: 单个输入多个输出的软件包。

note: type: node
en: Invoking guix gc
zh_CN: 调用guix gc

note: type: menuentry
en: Running the garbage collector.
zh_CN: 运行垃圾回收器。

note: type: node
en: Invoking guix pull
zh_CN: 调用guix pull

note: type: menuentry
en: Fetching the latest Guix and distribution.
zh_CN: 获取最新的Guix和发行版。

note: type: menuentry
en: Interacting with another revision of Guix.
zh_CN: 和其它版本的Guix交互。

note: type: node
en: Invoking guix describe
zh_CN: 调用guix describe

note: type: menuentry
en: Display information about your Guix revision.
zh_CN: 显示你的Guix版本信息。

note: type: node
en: Invoking guix archive
zh_CN: 调用guix archive

note: type: menuentry
en: Exporting and importing store files.
zh_CN: 导出和导入仓库文件。

note: type: menuentry
en: One particular source of substitutes.
zh_CN: substitute的一个特殊来源。

note: type: subsection
en: Substitute Server Authorization
zh_CN: substitute服务器授权

note: type: menuentry
en: How to enable or disable substitutes.
zh_CN: 怎么开启或关闭substitute。

note: type: menuentry
en: Substitute diversity.
zh_CN: substitutes多样化。

note: type: subsection
en: Substitute Authentication
zh_CN: 验证substitute

note: type: menuentry
en: How Guix verifies substitutes.
zh_CN: Guix怎样验证substitute。

note: type: subsection
en: Proxy Settings
zh_CN: 代理设置

note: type: menuentry
en: How to get substitutes via proxy.
zh_CN: 怎样通过代理获取substitute。

note: type: subsection
en: Substitution Failure
zh_CN: substitute失败

note: type: menuentry
en: What happens when substitution fails.
zh_CN: 当substitute失败时会发生什么。

note: type: subsection
en: On Trusting Binaries
zh_CN: 关于信任二进制文件

note: type: menuentry
en: How can you trust that binary blob?
zh_CN: 你怎么能信任二进制的 blob 呢？

note: type: menuentry
en: Extending the package collection.
zh_CN: 拓展软件包集合。

note: type: section
en: Creating a Channel
zh_CN: 创建一个频道

note: type: node
en: Invoking guix environment
zh_CN: 调用guix environment

note: type: menuentry
en: Setting up development environments.
zh_CN: 设置开发环境。

note: type: node
en: Invoking guix pack
zh_CN: 调用guix pack

note: type: menuentry
en: Creating software bundles.
zh_CN: 创建软件bundle。

note: type: node
en: Invoking guix git authenticate
zh_CN: 调用guix git授权

note: type: section
en: Package Modules
zh_CN: 软件包模块

note: type: menuentry
en: Packages from the programmer's viewpoint.
zh_CN: 从程序员的角度看软件包。

note: type: section
en: Defining Packages
zh_CN: 定义软件包

note: type: menuentry
en: Defining new packages.
zh_CN: 定义新软件包。

note: type: section
en: Writing Manifests
zh_CN: 书写清单

note: type: section
en: Build Systems
zh_CN: 构建系统

note: type: menuentry
en: Specifying how packages are built.
zh_CN: 指定如何构建软件包。

note: type: section
en: The Store
zh_CN: 仓库

note: type: menuentry
en: Manipulating the package store.
zh_CN: 操纵软件包仓库。

note: type: menuentry
en: Low-level interface to package derivations.
zh_CN: 软件包derivation的底层接口。

note: type: section
en: The Store Monad
zh_CN: 仓库monad

note: type: menuentry
en: Purely functional interface to the store.
zh_CN: 仓库的纯函数式接口。

note: type: section
en: G-Expressions
zh_CN: G-表达式

note: type: menuentry
en: Manipulating build expressions.
zh_CN: 操纵构建表达式。

note: type: node
en: Invoking guix repl
zh_CN: 调用guix repl

note: type: menuentry
en: Programming Guix in Guile.
zh_CN: 在Guile中为Guix编程

note: type: node
en: package Reference
zh_CN: 软件包引用

note: type: menuentry
en: The package data type.
zh_CN: 软件包数据类型。

note: type: node
en: origin Reference
zh_CN: origin参考手册

note: type: menuentry
en: The origin data type.
zh_CN: origin数据类型。

note: type: node
en: Invoking guix build
zh_CN: 调用guix build

note: type: menuentry
en: Building packages from the command line.
zh_CN: 用命令行构建软件包。

note: type: node
en: Invoking guix edit
zh_CN: 调用guix edit。

note: type: menuentry
en: Editing package definitions.
zh_CN: 编辑软件包定义。

note: type: node
en: Invoking guix download
zh_CN: 调用guix download

note: type: menuentry
en: Downloading a file and printing its hash.
zh_CN: 下载一个文件并打印它的hash。

note: type: node
en: Invoking guix hash
zh_CN: 调用guix hash

note: type: menuentry
en: Computing the cryptographic hash of a file.
zh_CN: 计算一个文件的密码学hash。

note: type: node
en: Invoking guix import
zh_CN: 调用guix import

note: type: menuentry
en: Importing package definitions.
zh_CN: 导入软件包定义。

note: type: node
en: Invoking guix refresh
zh_CN: 调用guix refresh

note: type: menuentry
en: Updating package definitions.
zh_CN: 更新软件包定义。

note: type: node
en: Invoking guix lint
zh_CN: 调用guix lint

note: type: menuentry
en: Finding errors in package definitions.
zh_CN: 从软件包定义里寻找错误。

note: type: node
en: Invoking guix size
zh_CN: 调用guix size

note: type: menuentry
en: Profiling disk usage.
zh_CN: 分析硬盘使用情况。

note: type: node
en: Invoking guix graph
zh_CN: 调用guix graph

note: type: menuentry
en: Visualizing the graph of packages.
zh_CN: 展示软件包的关系图。

note: type: node
en: Invoking guix publish
zh_CN: 调用guix publish

note: type: menuentry
en: Sharing substitutes.
zh_CN: 分享substitute。

note: type: node
en: Invoking guix challenge
zh_CN: 调用guix challenge

note: type: menuentry
en: Challenging substitute servers.
zh_CN: 挑战subtitute服务器。

note: type: node
en: Invoking guix copy
zh_CN: 调用guix copy

note: type: menuentry
en: Copying to and from a remote store.
zh_CN: 复制到远程的仓库，或从远程的仓库复制。

note: type: node
en: Invoking guix container
zh_CN: 调用guix container

note: type: menuentry
en: Process isolation.
zh_CN: 进程隔离。

note: type: node
en: Invoking guix weather
zh_CN: 调用guix weather

note: type: menuentry
en: Assessing substitute availability.
zh_CN: 评估substitute的可用性。

note: type: node
en: Invoking guix processes
zh_CN: 调用guix processes

note: type: menuentry
en: Listing client processes.
zh_CN: 列出客户端进程。

note: type: section
en: Invoking @command{guix build}
zh_CN: 调用@command{guix build}

note: type: subsection
en: Common Build Options
zh_CN: 普通的构建选项

note: type: menuentry
en: Build options for most commands.
zh_CN: 大部分命令的构建选项。

note: type: subsection
en: Package Transformation Options
zh_CN: 软件包转换选项

note: type: menuentry
en: Creating variants of packages.
zh_CN: 创建软件包的变体。

note: type: subsection
en: Additional Build Options
zh_CN: 额外的构建选项

note: type: menuentry
en: Options specific to 'guix build'.
zh_CN: 只属于'guix build'的选项。

note: type: subsection
en: Debugging Build Failures
zh_CN: 调试构建错误

note: type: menuentry
en: Real life packaging experience.
zh_CN: 真实的打包经验。

note: type: section
en: Cross-Compilation
zh_CN: 交叉编译

note: type: section
en: Using the Configuration System
zh_CN: 使用配置系统

note: type: menuentry
en: Customizing your GNU system.
zh_CN: 定制你的GNU系统。

note: type: node
en: operating-system Reference
zh_CN: 操作系统参考

note: type: menuentry
en: Detail of operating-system declarations.
zh_CN: 操作系统声明详情。

note: type: section
en: File Systems
zh_CN: 文件系统

note: type: menuentry
en: Configuring file system mounts.
zh_CN: 设置文件系统挂载。

note: type: section
en: Mapped Devices
zh_CN: 映射的设备

note: type: menuentry
en: Block device extra processing.
zh_CN: 块设备额外的处理。

note: type: section
en: User Accounts
zh_CN: 用户帐号

note: type: menuentry
en: Specifying user accounts.
zh_CN: 指定用户帐号。

note: type: section
en: Keyboard Layout
zh_CN: 键盘布局

note: type: menuentry
en: How the system interprets key strokes.
zh_CN: 系统怎样理解按键。

note: type: section
en: Locales
zh_CN: 区域

note: type: menuentry
en: Language and cultural convention settings.
zh_CN: 语言和文化惯例设置。

note: type: node
en: Services
zh_CN: 服务

note: type: menuentry
en: Specifying system services.
zh_CN: 指定系统服务。

note: type: section
en: Setuid Programs
zh_CN: setuid程序

note: type: section
en: X.509 Certificates
zh_CN: X.509证书

note: type: menuentry
en: Authenticating HTTPS servers.
zh_CN: 认证HTTPS服务器。

note: type: menuentry
en: Configuring libc's name service switch.
zh_CN: 设置libc的name service switch。

note: type: section
en: Initial RAM Disk
zh_CN: 初始的内存虚拟硬盘

note: type: menuentry
en: Linux-Libre bootstrapping.
zh_CN: Linux-Libre引导。

note: type: section
en: Bootloader Configuration
zh_CN: 引导设置

note: type: menuentry
en: Configuring the boot loader.
zh_CN: 设置引导程序。

note: type: node
en: Invoking guix system
zh_CN: 调用guix system

note: type: menuentry
en: Instantiating a system configuration.
zh_CN: 实例化一个系统配置。

note: type: node
en: Invoking guix deploy
zh_CN: 调用 guix deploy

note: type: node
en: Running Guix in a VM
zh_CN: 在虚拟机里运行Guix

note: type: menuentry
en: How to run Guix System in a virtual machine.
zh_CN: 怎样在虚拟机里运行Guix。

note: type: section
en: Defining Services
zh_CN: 定义服务

note: type: menuentry
en: Adding new service definitions.
zh_CN: 添加新的服务定义。

note: type: subsection
en: Base Services
zh_CN: 基础服务

note: type: menuentry
en: Essential system services.
zh_CN: 必要的系统服务。

note: type: subsection
en: Scheduled Job Execution
zh_CN: 执行计划任务

note: type: menuentry
en: The mcron service.
zh_CN: mcron服务。

note: type: subsection
en: Log Rotation
zh_CN: 日志轮替

note: type: menuentry
en: The rottlog service.
zh_CN: rottlog服务。

note: type: menuentry
en: Setting up network interfaces.
zh_CN: 配置网络接口。

note: type: subsection
en: Networking Services
zh_CN: 网络服务

note: type: menuentry
en: Firewall, SSH daemon, etc.
zh_CN: 防火墙，SSH后台进程等。

note: type: subsection
en: X Window
zh_CN: X窗口

note: type: menuentry
en: Graphical display.
zh_CN: 图形显示器。

note: type: subsection
en: Printing Services
zh_CN: 打印服务

note: type: menuentry
en: Local and remote printer support.
zh_CN: 本地和远程打印机的支持。

note: type: subsection
en: Desktop Services
zh_CN: 桌面服务

note: type: menuentry
en: D-Bus and desktop services.
zh_CN: D-Bus和桌面服务。

note: type: subsection
en: Sound Services
zh_CN: 声音服务

note: type: menuentry
en: ALSA and Pulseaudio services.
zh_CN: ALSA和Pulseaudio服务。

note: type: subsection
en: Database Services
zh_CN: 数据库服务

note: type: menuentry
en: SQL databases, key-value stores, etc.
zh_CN: SQL数据库，键值仓库等。

note: type: subsection
en: Mail Services
zh_CN: 邮件服务

note: type: menuentry
en: IMAP, POP3, SMTP, and all that.
zh_CN: IMAP，POP3，SMTP等。

note: type: subsection
en: Messaging Services
zh_CN: 消息服务

note: type: menuentry
en: Messaging services.
zh_CN: 消息服务。

note: type: subsection
en: Telephony Services
zh_CN: 电话服务

note: type: menuentry
en: Telephony services.
zh_CN: 电话服务。

note: type: subsection
en: Monitoring Services
zh_CN: 监控服务

note: type: menuentry
en: Monitoring services.
zh_CN: 监控服务。

note: type: subsection
en: Kerberos Services
zh_CN: Kerberos服务

note: type: menuentry
en: Kerberos services.
zh_CN: Kerberos服务。

note: type: subsection
en: Web Services
zh_CN: Web服务

note: type: menuentry
en: Web servers.
zh_CN: Web服务。

note: type: subsection
en: Certificate Services
zh_CN: 证书服务

note: type: menuentry
en: TLS certificates via Let's Encrypt.
zh_CN: Let's Encrypt TLS证书。

note: type: subsection
en: DNS Services
zh_CN: DNS服务

note: type: menuentry
en: DNS daemons.
zh_CN: DNS后台进程。

note: type: subsection
en: VPN Services
zh_CN: VPN服务

note: type: menuentry
en: VPN daemons.
zh_CN: VPN后台进程。

note: type: node
en: Network File System
zh_CN: 网络文件系统

note: type: menuentry
en: NFS related services.
zh_CN: 网络文件系统相关的服务。

note: type: subsection
en: Continuous Integration
zh_CN: 持续集成

note: type: subsection
en: Power Management Services
zh_CN: 电源管理服务

note: type: menuentry
en: Extending battery life.
zh_CN: 延长电池寿命。

note: type: subsection
en: Audio Services
zh_CN: 音频服务

note: type: menuentry
en: The MPD.
zh_CN: MPD。

note: type: subsection
en: Virtualization Services
zh_CN: 虚拟化服务

note: type: menuentry
en: Virtualization services.
zh_CN: 虚拟化服务。

note: type: subsection
en: Version Control Services
zh_CN: 版本控制服务

note: type: menuentry
en: Providing remote access to Git repositories.
zh_CN: 远程访问Git仓库。

note: type: subsection
en: Game Services
zh_CN: 游戏服务

note: type: menuentry
en: Game servers.
zh_CN: 游戏服务器。

note: type: subsection
en: Miscellaneous Services
zh_CN: 其它各种服务

note: type: menuentry
en: Other services.
zh_CN: 其它服务。

note: type: subsection
en: Service Composition
zh_CN: 合成服务

note: type: menuentry
en: The model for composing services.
zh_CN: 服务合成的模型。

note: type: subsection
en: Service Types and Services
zh_CN: 服务类型和服务

note: type: menuentry
en: Types and services.
zh_CN: 类型和服务。

note: type: subsection
en: Service Reference
zh_CN: 服务参考

note: type: menuentry
en: API reference.
zh_CN: API参考。

note: type: subsection
en: Shepherd Services
zh_CN: Shepherd服务

note: type: menuentry
en: A particular type of service.
zh_CN: 一种特别的服务。

note: type: menuentry
en: Installing 'debug' outputs.
zh_CN: 安装“调试”输出

note: type: cindex
en: purpose
zh_CN: 目的

note: type: Plain text
en: GNU Guix@footnote{``Guix'' is pronounced like ``geeks'', or ``ɡiːks'' using the international phonetic alphabet (IPA).} is a package management tool for and distribution of the GNU system.  Guix makes it easy for unprivileged users to install, upgrade, or remove software packages, to roll back to a previous package set, to build packages from source, and generally assists with the creation and maintenance of software environments.
zh_CN: GNU Guix@footnote{``Guix''读做``geeks''，或``ɡiːks''（国际音标）}是GNU系统的包管理器和发行版。Guix让无特权的用户可以轻松地安装，升级，或删除软件包，回滚到前一个软件包集合，从源代码构建软件包，及辅助软件环境的创建和维护。

note: type: cindex
en: Guix System
zh_CN: Guix系统

note: type: cindex
en: GuixSD, now Guix System
zh_CN: GuixSD，现在称为Guix系统

note: type: cindex
en: Guix System Distribution, now Guix System
zh_CN: Guix系统发行版，现在称为Guix系统

note: type: Plain text
en: You can install GNU@tie{}Guix on top of an existing GNU/Linux system where it complements the available tools without interference (@pxref{Installation}), or you can use it as a standalone operating system distribution, @dfn{Guix@tie{}System}@footnote{We used to refer to Guix System as ``Guix System Distribution'' or ``GuixSD''.  We now consider it makes more sense to group everything under the ``Guix'' banner since, after all, Guix System is readily available through the @command{guix system} command, even if you're using a different distro underneath!}.  @xref{GNU Distribution}.
zh_CN: 你可以在现有的GNU/Linux发行版上安装GNU@tie{}Guix（@pxref{Installation}），Guix可以补充已有的工具，并且不会和它们产生冲突。或者你可以把它当作独立的操作系统发行版（@dfn{Guix@tie{}系统}@footnote{我们以前把Guix系统称为``Guix系统发行版''或``GuixSD''。我们现在觉得把一切都统一在``Guix''的旗帜下更合理，因为，毕竟即使在别的发行版上你也可以随时通过@command{guix system}命令获得Guix系统}）。@xref{GNU Distribution}.

note: type: cindex
en: user interfaces
zh_CN: 用户界面

note: type: cindex
en: build daemon
zh_CN: 构建后台进程

note: type: Plain text
en: Its @dfn{build daemon} is responsible for building packages on behalf of users (@pxref{Setting Up the Daemon}) and for downloading pre-built binaries from authorized sources (@pxref{Substitutes}).
zh_CN: @dfn{构建后台进程}为用户构建软件包（@pxref{Setting Up the Daemon}），及从授权的源（@pxref{Substitutes}）下载预构建的二进制文件。

note: type: cindex
en: extensibility of the distribution
zh_CN: 发行版的扩展性

note: type: cindex
en: customization, of packages
zh_CN: 定制软件包

note: type: Plain text
en: Guix includes package definitions for many GNU and non-GNU packages, all of which @uref{https://www.gnu.org/philosophy/free-sw.html, respect the user's computing freedom}.  It is @emph{extensible}: users can write their own package definitions (@pxref{Defining Packages}) and make them available as independent package modules (@pxref{Package Modules}).  It is also @emph{customizable}: users can @emph{derive} specialized package definitions from existing ones, including from the command line (@pxref{Package Transformation Options}).
zh_CN: Guix包含很多GNU和非GNU的软件包定义，所有的这些软件包都@uref{https://www.gnu.org/philosophy/free-sw.html, 尊重用户的自由}。它是@emph{可扩展的}：用户可以编写自己的软件包定义（@pxref{Defining Packages}），并且把它们作为独立的软件包模块@pxref{Package Modules}。它也是@emph{可定制的}：用户可以从现有的软件包定义衍生出特殊的软件包，包括从命令行（@pxref{Package Transformation Options}）。

note: type: cindex
en: functional package management
zh_CN: 函数式包管理器

note: type: cindex
en: isolation
zh_CN: 隔离

note: type: Plain text
en: Under the hood, Guix implements the @dfn{functional package management} discipline pioneered by Nix (@pxref{Acknowledgments}).  In Guix, the package build and installation process is seen as a @emph{function}, in the mathematical sense.  That function takes inputs, such as build scripts, a compiler, and libraries, and returns an installed package.  As a pure function, its result depends solely on its inputs---for instance, it cannot refer to software or scripts that were not explicitly passed as inputs.  A build function always produces the same result when passed a given set of inputs.  It cannot alter the environment of the running system in any way; for instance, it cannot create, modify, or delete files outside of its build and installation directories.  This is achieved by running build processes in isolated environments (or @dfn{containers}), where only their explicit inputs are visible.
zh_CN: 在底层，Guix实现了由Nix（@pxref{Acknowledgments}）开创的@dfn{函数式包管理器}。在Guix里，软件包构建和安装过程被视为数学意义上的@emph{函数}。函数获取输入，如构建脚本、编译器和库，并且返回一个安装好的软件包。作为一个纯函数，它的结果只取决于它的输入－－例如，它不能引用没有作为显式输入传入的软件和脚本。当传入特定的输入时，一个构建函数总是得到相同的结果。它不能以任何方式修改运行系统的环境，例如，它不能创建，修改，或删除构建和安装环境之外的文件夹。这是通过在隔离的环境（@dfn{容器}）里运行构建进程实现的，在这个环境里只能访问到显式的输入。

note: type: cindex
en: store
zh_CN: 仓库

note: type: Plain text
en: The result of package build functions is @dfn{cached} in the file system, in a special directory called @dfn{the store} (@pxref{The Store}).  Each package is installed in a directory of its own in the store---by default under @file{/gnu/store}.  The directory name contains a hash of all the inputs used to build that package; thus, changing an input yields a different directory name.
zh_CN: 软件包构建函数的结果被@dfn{缓存}在文件系统里的一个叫做@dfn{仓库}（@pxref{The Store}）的特殊文件夹内。每个软件包都被安装在仓库（默认在@file{/gnu/store}）里的一个独立的文件夹内。这个文件夹的名字含有用于构建这个软件包的所有输入的hash，所以，修改输入会得到一个不同的文件夹名。

note: type: Plain text
en: This approach is the foundation for the salient features of Guix: support for transactional package upgrade and rollback, per-user installation, and garbage collection of packages (@pxref{Features}).
zh_CN: 这种手段是实现Guix的突出功能的基础：对事务型软件包升级和回滚的支持，每个用户独立的安装，软件包垃圾回收@pxref{Features}。

note: type: Plain text
en: Guix comes with a distribution of the GNU system consisting entirely of free software@footnote{The term ``free'' here refers to the @url{https://www.gnu.org/philosophy/free-sw.html,freedom provided to users of that software}.}.  The distribution can be installed on its own (@pxref{System Installation}), but it is also possible to install Guix as a package manager on top of an installed GNU/Linux system (@pxref{Installation}).  When we need to distinguish between the two, we refer to the standalone distribution as Guix@tie{}System.
zh_CN: Guix提供了一个GNU系统发行版，这个发新版只包含自由软件@footnote{这里的“自由”指的是@url{https://www.gnu.org/philosophy/free-sw.html,软件提供给用户的自由}。}。这个发行版可以独立安装（@pxref{System Installation}），但是把Guix安装为一个已经安装好的GNU/Linux系统的包管理器也是可行的（@pxref{Installation}）。当我们需要区分这两者时，我们把独立的发行版称为“Guix系统”。

note: type: Plain text
en: The distribution provides core GNU packages such as GNU libc, GCC, and Binutils, as well as many GNU and non-GNU applications.  The complete list of available packages can be browsed @url{https://www.gnu.org/software/guix/packages,on-line} or by running @command{guix package} (@pxref{Invoking guix package}):
zh_CN: 这个发行版提供了GNU核心软件包，如libc、gcc和Binutils，以及很多GNU和非GNU应用程序。可用的软件包的完整列表可以在@url{https://www.gnu.org/software/guix/packages,on-line}浏览，或者通过运行@command{guix package}（@pxref{Invoking guix package}）获得：

note: type: Plain text
en: Our goal is to provide a practical 100% free software distribution of Linux-based and other variants of GNU, with a focus on the promotion and tight integration of GNU components, and an emphasis on programs and tools that help users exert that freedom.
zh_CN: 我们的目标是提供一个基于Linux和其它GNU变体的可用的100%自由的软件发行版，我们的重点是推广和紧密集成GNU组件，以及强调帮助用户行使那些自由的程序和工具。

note: type: Plain text
en: Packages are currently available on the following platforms:
zh_CN: 目前这些平台提供软件包：

note: type: table
en: Intel/AMD @code{x86_64} architecture, Linux-Libre kernel.
zh_CN: Intel/AMD @code{x86_64} 架构，Linux-Libre 内核。

note: type: table
en: Intel 32-bit architecture (IA32), Linux-Libre kernel.
zh_CN: Intel 32 位架构（IA32)，Linux-Libre 内核。

note: type: table
en: ARMv7-A architecture with hard float, Thumb-2 and NEON, using the EABI hard-float application binary interface (ABI), and Linux-Libre kernel.
zh_CN: ARMv7-A架构，带硬件浮点数、Thumb-2和NEON扩展，EABI硬件浮点数应用二进制接口（ABI），和Linux-Libre内核。

note: type: table
en: little-endian 64-bit RISC-V processors, specifically RV64GC, and Linux-Libre kernel. This platform is available as a "technology preview": although it is supported, substitutes are not yet available from the build farm (@pxref{Substitutes}), and some packages may fail to build (@pxref{Tracking Bugs and Patches}).  That said, the Guix community is actively working on improving this support, and now is a great time to try it and get involved!
zh_CN: 小端64位RISC-V处理器，特别是RV64GC和Linux Libre内核。该平台可作为“技术预览”使用：尽管支持该平台，但构建场(@pxref{Substitutes})中尚未提供substitutes，并且某些包可能无法构建 (@pxref{Tracking Bugs and Patches})。这就是说，Guix社区正在积极完善这种支持，现在是探索和加入它的好时机！

note: type: Plain text
en: With Guix@tie{}System, you @emph{declare} all aspects of the operating system configuration and Guix takes care of instantiating the configuration in a transactional, reproducible, and stateless fashion (@pxref{System Configuration}).  Guix System uses the Linux-libre kernel, the Shepherd initialization system (@pxref{Introduction,,, shepherd, The GNU Shepherd Manual}), the well-known GNU utilities and tool chain, as well as the graphical environment or system services of your choice.
zh_CN: 在Guix系统里，你@emph{声明}操作系统所有方面的配置，然后Guix以事务型的，可重复的，和无状态的方式解决实例化配置的问题（@pxref{System Configuration}）。Guix系统使用Linux-Libre内核，Shepherd初始化系统@pxref{Introduction,,, shepherd, GNU Shepherd用户手册}，知名的GNU工具和工具链，以及你可选的图形界面环境和系统服务。

note: type: Plain text
en: Guix System is available on all the above platforms except @code{mips64el-linux}, @code{powerpc-linux}, @code{powerpc64le-linux} and @code{riscv64-linux}.
zh_CN: Guix系统在上面所有的平台上都可用，但@code{mips64el-linux}, @code{powerpc-linux}, @code{powerpc64le-linux} 和 @code{riscv64-linux}除外。

note: type: Plain text
en: For information on porting to other architectures or kernels, @pxref{Porting}.
zh_CN: 关于移植到其它架构或内核的信息，@pxref{Porting}。

note: type: Plain text
en: Building this distribution is a cooperative effort, and you are invited to join! @xref{Contributing}, for information about how you can help.
zh_CN: 构建这个发行版需要努力合作，欢迎你加入！关于你可以怎样提供帮助的信息，@xref{Contributing}。

note: type: cindex
en: installing Guix
zh_CN: 安装Guix

note: type: quotation
en: We recommend the use of this @uref{https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh, shell installer script} to install Guix on top of a running GNU/Linux system, thereafter called a @dfn{foreign distro}.@footnote{This section is concerned with the installation of the package manager, which can be done on top of a running GNU/Linux system.  If, instead, you want to install the complete GNU operating system, @pxref{System Installation}.} The script automates the download, installation, and initial configuration of Guix.  It should be run as the root user.
zh_CN: 我们推荐使用@uref{https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh, shell安装脚本}在已有的GNU/Linux系统（即@dfn{foreign distro}）上安装Guix。@footnote{这个小节是关于安装包管理器的，可以在GNU/Linux系统上完成。如果你想安装完整的GNU操作系统，@pxref{System Installation}。}这个脚本自动下载、安装并且初始化Guix，它需要以root用户身份运行。

note: type: cindex
en: foreign distro
zh_CN: 别的发行版

note: type: cindex
en: directories related to foreign distro
zh_CN: 和foreign distro相关的文件夹

note: type: Plain text
en: When installed on a foreign distro, GNU@tie{}Guix complements the available tools without interference.  Its data lives exclusively in two directories, usually @file{/gnu/store} and @file{/var/guix}; other files on your system, such as @file{/etc}, are left untouched.
zh_CN: 在foreign distro上安装时，GNU@tie{}Guix可以在不引起冲突的前提下补充现有的工具。它的数据只存放在两个文件夹里，通常是@file{/gnu/store}和@file{/var/guix}；系统上的其它文件，如@file{/etc}，不会被修改。

note: type: Plain text
en: Once installed, Guix can be updated by running @command{guix pull} (@pxref{Invoking guix pull}).
zh_CN: 一旦安装好了，可以通过运行@command{guix pull}升级Guix（@pxref{Invoking guix pull}）。

note: type: Plain text
en: If you prefer to perform the installation steps manually or want to tweak them, you may find the following subsections useful.  They describe the software requirements of Guix, as well as how to install it manually and get ready to use it.
zh_CN: 如果你希望手动执行安装步骤，或者想改变安装步骤，接下来这些小节会很有用。它们介绍Guix的软件依赖，以及如何手动安装和使用Guix。

note: type: cindex
en: installing Guix from binaries
zh_CN: 用二进制文件安装Guix

note: type: cindex
en: installer script
zh_CN: 安装脚本

note: type: Plain text
en: This section describes how to install Guix on an arbitrary system from a self-contained tarball providing binaries for Guix and for all its dependencies.  This is often quicker than installing from source, which is described in the next sections.  The only requirement is to have GNU@tie{}tar and Xz.
zh_CN: 这个小节介绍如何在任意的系统上用独立的Guix二进制文件包安装Guix和它的依赖。这通常比从源代码安装更快，下一小节会介绍如何从源代码安装。唯一的需求是有GNU@tie{}tar和Xz。

note: type: quotation
en: We recommend the use of this @uref{https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh, shell installer script}.  The script automates the download, installation, and initial configuration steps described below.  It should be run as the root user.  As root, you can thus run this:
zh_CN: 我们推荐使用这个@uref{https://git.savannah.gnu.org/cgit/guix.git/plain/etc/guix-install.sh, shell安装脚本}。这个脚本自动执行下述的下载、安装并且初始化Guix的过程。它需要以root用户身份运行。作为root用户，因此你可以运行这个：

note: type: Plain text
en: Installing goes along these lines:
zh_CN: 安装步骤如下：

note: type: cindex
en: downloading Guix binary
zh_CN: 下载Guix二进制文件

note: type: enumerate
en: Make sure to download the associated @file{.sig} file and to verify the authenticity of the tarball against it, along these lines:
zh_CN: 请确保下载相关的@file{.sig}文件，并且用它验证文件包的可靠性，方法如下：

note: type: Plain text
en: If that command fails because you do not have the required public key, then run this command to import it:
zh_CN: 如果那个命令因为缺少所需的公钥而失败了，那么用这个命令导入它：

note: type: Plain text
en: and rerun the @code{gpg --verify} command.
zh_CN: 再次运行@code{gpg --verify}命令。

note: type: enumerate
en: Now, you need to become the @code{root} user.  Depending on your distribution, you may have to run @code{su -} or @code{sudo -i}.  As @code{root}, run:
zh_CN: 现在你需要成为@code{root}用户。基于你的发行版，你可能需要执行@code{su -}或@code{sudo -i}。以@code{root}用户身份，执行：

note: type: enumerate
en: Do @emph{not} unpack the tarball on a working Guix system since that would overwrite its own essential files.
zh_CN: @emph{不要}在一个正常的Guix系统上解压这个文件包，因为那会把现有的重要的文件覆盖。

note: type: enumerate
en: Make the profile available under @file{~root/.config/guix/current}, which is where @command{guix pull} will install updates (@pxref{Invoking guix pull}):
zh_CN: 使profile出现在@file{~root/.config/guix/current}，这是@command{guix pull}安装更新的位置（@pxref{Invoking guix pull}）：

note: type: enumerate
en: Create the group and user accounts for build users as explained below (@pxref{Build Environment Setup}).
zh_CN: 像下面解释的那样为“构建用户”创建用户组和用户（@pxref{Build Environment Setup}）。

note: type: enumerate
en: Run the daemon, and set it to automatically start on boot.
zh_CN: 运行后台进程，并设置为开机自启动。

note: type: enumerate
en: If your host distro uses the systemd init system, this can be achieved with these commands:
zh_CN: 如果你的主机的发行版使用systemd init系统，可以用这些命令：

note: type: itemize
en: If your host distro uses the Upstart init system:
zh_CN: 如果你的主机的发行版使用Upstart init系统：

note: type: enumerate
en: Otherwise, you can still start the daemon manually with:
zh_CN: 此外，你可以手动启动后台进程：

note: type: enumerate
en: Make the @command{guix} command available to other users on the machine, for instance with:
zh_CN: 使机器上的其他用户也可以使用@command{guix}命令：

note: type: enumerate
en: It is also a good idea to make the Info version of this manual available there:
zh_CN: 最好让这个用户手册的Info版也可以被访问：

note: type: cindex
en: substitutes, authorization thereof
zh_CN: substitutes，对其授权

note: type: enumerate
en: Each user may need to perform a few additional steps to make their Guix environment ready for use, @pxref{Application Setup}.
zh_CN: 每个用户可能需要执行一些额外的步骤以使各自的Guix环境可用，@pxref{Application Setup}。

note: type: Plain text
en: Voilà, the installation is complete!
zh_CN: 瞧，安装完成了！

note: type: Plain text
en: You can confirm that Guix is working by installing a sample package into the root profile:
zh_CN: 你可以通过给root profile安装一个软件包来确认Guix可以正常工作。

note: type: Plain text
en: The binary installation tarball can be (re)produced and verified simply by running the following command in the Guix source tree:
zh_CN: 二进制安装包可以通过在Guix源代码树里运行下面这些命令来重现和验证：

note: type: example
en: make guix-binary.@var{system}.tar.xz
zh_CN: make guix-binary.@var{系统}.tar.xz

note: type: Plain text
en: ...@: which, in turn, runs:
zh_CN: ...@: 这个命令会执行：

note: type: example
en: guix pack -s @var{system} --localstatedir \
      --profile-name=current-guix guix
zh_CN: guix pack -s @var{系统} --localstatedir \
      --profile-name=current-guix guix

note: type: Plain text
en: @xref{Invoking guix pack}, for more info on this handy tool.
zh_CN: @xref{Invoking guix pack}，了解这个方便的工具。

note: type: Plain text
en: This section lists requirements when building Guix from source.  The build procedure for Guix is the same as for other GNU software, and is not covered here.  Please see the files @file{README} and @file{INSTALL} in the Guix source tree for additional details.
zh_CN: 这个小节列举了从源代码构建Guix的需求。构建Guix的步骤和其它GNU软件相同，这里不介绍。请阅读Guix源代码树里的@file{README}和@file{INSTALL}文件以了解更多的信息。

note: type: cindex
en: official website
zh_CN: 官方网站

note: type: Plain text
en: GNU Guix is available for download from its website at @url{https://www.gnu.org/software/guix/}.
zh_CN: GNU Guix可以从它的网站下载@url{https://www.gnu.org/software/guix/}。

note: type: Plain text
en: GNU Guix depends on the following packages:
zh_CN: GNU Guix依赖这些软件包：

note: type: item
en: @url{https://notabug.org/cwebber/guile-gcrypt, Guile-Gcrypt}, version
zh_CN: @url{https://notabug.org/cwebber/guile-gcrypt, Guile-Gcrypt}，版本

note: type: itemize
en: 0.1.0 or later;
zh_CN: 0.1.0或更新；

note: type: itemize
en: @uref{https://notabug.org/guile-sqlite3/guile-sqlite3, Guile-SQLite3}, version 0.1.0 or later;
zh_CN: @uref{https://notabug.org/guile-sqlite3/guile-sqlite3, Guile-SQLite3}，版本0.1.0或更新；

note: type: item
en: @url{https://www.gnu.org/software/make/, GNU Make}.
zh_CN: @url{https://www.gnu.org/software/make/, GNU Make}。

note: type: Plain text
en: The following dependencies are optional:
zh_CN: 这些依赖是可选的：

note: type: itemize
en: When @url{http://www.bzip.org, libbz2} is available, @command{guix-daemon} can use it to compress build logs.
zh_CN: 当@url{http://www.bzip.org, libbz2}存在时，@command{guix-daemon}可以用它压缩构建日志。

note: type: item
en: @url{https://gnupg.org/, GNU libgcrypt};
zh_CN: @url{https://gnupg.org/, GNU libgcrypt}；

note: type: item
en: @url{https://sqlite.org, SQLite 3};
zh_CN: @url{https://sqlite.org, SQLite 3}；

note: type: item
en: @url{https://gcc.gnu.org, GCC's g++}, with support for the
zh_CN: @url{https://gcc.gnu.org, GCC's g++}，支持

note: type: itemize
en: C++11 standard.
zh_CN: C++11标准。

note: type: cindex
en: state directory
zh_CN: 状态文件夹

note: type: cindex
en: test suite
zh_CN: 测试套件

note: type: Plain text
en: After a successful @command{configure} and @code{make} run, it is a good idea to run the test suite.  It can help catch issues with the setup or environment, or bugs in Guix itself---and really, reporting test failures is a good way to help improve the software.  To run the test suite, type:
zh_CN: 成功执行@command{configure}和@code{make}之后，最好运行测试套件。它可以帮助查找设置和环境的错误，或者是Guix自身的bug－－并且，报告测试错误是帮助改进软件的好方法。输入下面的命令以执行测试套件。

note: type: Plain text
en: Test cases can run in parallel: you can use the @code{-j} option of GNU@tie{}make to speed things up.  The first run may take a few minutes on a recent machine; subsequent runs will be faster because the store that is created for test purposes will already have various things in cache.
zh_CN: 测试用例可以并行运行：你可以用GNU@tie{}make的@code{-j}参数来加速运行。才一台较新的机器上第一次运行可能会花几分钟，后续的运行会更快，因为为测试创建的仓库已经包含了各种缓存。

note: type: Plain text
en: It is also possible to run a subset of the tests by defining the @code{TESTS} makefile variable as in this example:
zh_CN: 你还可以通过定义makefile的@code{TESTS}变量只运行测试的一个子集：

note: type: Plain text
en: By default, tests results are displayed at a file level.  In order to see the details of every individual test cases, it is possible to define the @code{SCM_LOG_DRIVER_FLAGS} makefile variable as in this example:
zh_CN: 默认情况下，测试结果只展示到文件层级。为了看每个独立的测试用例的详情，可以像这样定义@code{SCM_LOG_DRIVER_FLAGS} makefile变量：

note: type: Plain text
en: Upon failure, please email @email{bug-guix@@gnu.org} and attach the @file{test-suite.log} file.  Please specify the Guix version being used as well as version numbers of the dependencies (@pxref{Requirements}) in your message.
zh_CN: 遇到错误时，请给@email{bug-guix@@gnu.org}发邮件，并附带@file{test-suite.log}文件。请在消息里说明使用的Guix的版本信息和依赖（@pxref{Requirements}）的版本信息。

note: type: Plain text
en: Guix also comes with a whole-system test suite that tests complete Guix System instances.  It can only run on systems where Guix is already installed, using:
zh_CN: Guix还附带了一个可以测试整个Guix系统实例的全系统测试套件。它只能在已经安装Guix的系统上运行：

note: type: Plain text
en: or, again, by defining @code{TESTS} to select a subset of tests to run:
zh_CN: 或者，同样的，通过定义@code{TESTS}只运行测试的一个子集：

note: type: Plain text
en: These system tests are defined in the @code{(gnu tests @dots{})} modules.  They work by running the operating systems under test with lightweight instrumentation in a virtual machine (VM).  They can be computationally intensive or rather cheap, depending on whether substitutes are available for their dependencies (@pxref{Substitutes}).  Some of them require a lot of storage space to hold VM images.
zh_CN: 这些系统测试是在@code{(gnu tests @dots{})}模块里定义的。它们在虚拟机（VM）里运行轻量的指令。它们的计算量可能很多也可能很少，这取决于它们依赖的substitute（@pxref{Substitutes}）是否已经存在。它们之中有些需要很多存储空间以保存虚拟机硬盘。

note: type: Plain text
en: Again in case of test failures, please send @email{bug-guix@@gnu.org} all the details.
zh_CN: 再重复一遍，如果遇到测试错误，请给@email{bug-guix@@gnu.org}发邮件，并附带详细的说明。

note: type: cindex
en: daemon
zh_CN: 后台进程

note: type: Plain text
en: Operations such as building a package or running the garbage collector are all performed by a specialized process, the @dfn{build daemon}, on behalf of clients.  Only the daemon may access the store and its associated database.  Thus, any operation that manipulates the store goes through the daemon.  For instance, command-line tools such as @command{guix package} and @command{guix build} communicate with the daemon (@i{via} remote procedure calls) to instruct it what to do.
zh_CN: 构建软件包或运行垃圾回收器之类的操作都是由一个特殊的进程代替客户执行的，即@dfn{构建后台进程}。只有这个进程可以访问仓库和相关的数据库。因此，所有修改仓库的操作都通过这个后台进程执行。例如，@command{guix package}和@command{guix build}之类的命令行工具通过和这个后台进程通信（@i{通过}远程过程调用）来指示它该做什么。

note: type: Plain text
en: The following sections explain how to prepare the build daemon's environment.  See also @ref{Substitutes}, for information on how to allow the daemon to download pre-built binaries.
zh_CN: 接下来的几个小节介绍如何准备“构建后台进程”的环境。参考@ref{Substitutes}，了解怎样允许这个后台进程下载预构建好的二进制文件。

note: type: cindex
en: build environment
zh_CN: 构建环境

note: type: Plain text
en: In a standard multi-user setup, Guix and its daemon---the @command{guix-daemon} program---are installed by the system administrator; @file{/gnu/store} is owned by @code{root} and @command{guix-daemon} runs as @code{root}.  Unprivileged users may use Guix tools to build packages or otherwise access the store, and the daemon will do it on their behalf, ensuring that the store is kept in a consistent state, and allowing built packages to be shared among users.
zh_CN: 在一个标准的多用户设置里，Guix和它的后台进程--@command{guix-daemon}程序--是由@code{root}用户安装的，并且@command{guix-daemon}以@code{root}用户身份运行。无特权的用户可以用Guix的工具构建软件包或访问仓库，这个后台进程会代替用户进行这些操作，以确保仓库保持一致的状态，并且允许构建好的软件包可以在不同用户间共享。

note: type: cindex
en: build users
zh_CN: 构建用户

note: type: Plain text
en: When @command{guix-daemon} runs as @code{root}, you may not want package build processes themselves to run as @code{root} too, for obvious security reasons.  To avoid that, a special pool of @dfn{build users} should be created for use by build processes started by the daemon.  These build users need not have a shell and a home directory: they will just be used when the daemon drops @code{root} privileges in build processes.  Having several such users allows the daemon to launch distinct build processes under separate UIDs, which guarantees that they do not interfere with each other---an essential feature since builds are regarded as pure functions (@pxref{Introduction}).
zh_CN: 当@command{guix-daemon}以@code{root}用户身份运行时，由于安全方面的考虑，你可能不希望软件包构建进程也以@code{root}用户身份运行。为了避免那样，我们需要创建一个@dfn{构建用户}池，以供后台进程启动的构建进程使用。这些构建用户不需要拥有shell和家目录：他们只会在后台进程为构建进程剥夺@code{root}特权时使用。拥有多个这类用户使后台进程可以以不同的UID启动不同的构建进程，这保证它们不会互相干扰--这是一个重要的功能，因为构建被视为纯函数（@pxref{Introduction}）。

note: type: Plain text
en: On a GNU/Linux system, a build user pool may be created like this (using Bash syntax and the @code{shadow} commands):
zh_CN: 在一个GNU/Linux系统上，可以这样创建一个构建用户池（用bash语法和@code{shadow}命令）：

note: type: Plain text
en: The number of build users determines how many build jobs may run in parallel, as specified by the @option{--max-jobs} option (@pxref{Invoking guix-daemon, @option{--max-jobs}}).  To use @command{guix system vm} and related commands, you may need to add the build users to the @code{kvm} group so they can access @file{/dev/kvm}, using @code{-G guixbuild,kvm} instead of @code{-G guixbuild} (@pxref{Invoking guix system}).
zh_CN: 构建用户的数量决定了有多少个构建任务可以并行执行，即@option{--max-jobs}参数(@pxref{Invoking guix-daemon, @option{--max-jobs}})。为了使用@command{guix system vm}和相关的命令，你需要把构建用户添加到@code{kvm}用户组，以使它们访问@file{/dev/kvm}。为此，把@code{-G guixbuild}替换成@code{-G guixbuild,kvm}（@pxref{Invoking guix system}）。

note: type: Plain text
en: This way, the daemon starts build processes in a chroot, under one of the @code{guixbuilder} users.  On GNU/Linux, by default, the chroot environment contains nothing but:
zh_CN: 这样，后台进程在一个chroot环境里，以一个@code{guixbuilder}用户组成员的身份启动构建进程。在GNU/Linux上，默认的，这个chroot环境仅包含这些东西：

note: type: itemize
en: a minimal @code{/dev} directory, created mostly independently from the host @code{/dev}@footnote{``Mostly'', because while the set of files that appear in the chroot's @code{/dev} is fixed, most of these files can only be created if the host has them.};
zh_CN: 一个和主机@code{/dev}独立的@footnote{大致这样，因为虽然chroot环境里的@code{/dev}包含的文件是固定的，大部分这些文件只有在主机有对应的文件时才能创建。}，最小的@code{/dev}文件夹；

note: type: itemize
en: the @code{/proc} directory; it only shows the processes of the container since a separate PID name space is used;
zh_CN: @code{/proc}文件夹；它只含有当前容器的进程，因为用了一个独立的进程PID命名空间；

note: type: itemize
en: @file{/etc/passwd} with an entry for the current user and an entry for user @file{nobody};
zh_CN: @file{/etc/passwd}，仅包含当前用户和@file{nobody}；

note: type: itemize
en: @file{/etc/group} with an entry for the user's group;
zh_CN: @file{/etc/group}，包含用户的组；

note: type: itemize
en: @file{/etc/hosts} with an entry that maps @code{localhost} to @code{127.0.0.1};
zh_CN: @file{/etc/hosts}，包含@code{localhost}映射到@code{127.0.0.1}的条目；

note: type: itemize
en: a writable @file{/tmp} directory.
zh_CN: 一个可写的@file{/tmp}文件夹。

note: type: subsection
en: Using the Offload Facility
zh_CN: 使用任务下发设施

note: type: cindex
en: offloading
zh_CN: 下发

note: type: cindex
en: build hook
zh_CN: 构建钩子

note: type: Plain text
en: The @file{/etc/guix/machines.scm} file typically looks like this:
zh_CN: @file{/etc/guix/machines.scm}文件通常是这样的：

note: type: Plain text
en: In fact, this file is---not surprisingly!---a Scheme file that is evaluated when the @code{offload} hook is started.  Its return value must be a list of @code{build-machine} objects.  While this example shows a fixed list of build machines, one could imagine, say, using DNS-SD to return a list of potential build machines discovered in the local network (@pxref{Introduction, Guile-Avahi,, guile-avahi, Using Avahi in Guile Scheme Programs}).  The @code{build-machine} data type is detailed below.
zh_CN: 事实上，这个文件--并不意外地--是一个Scheme文件，当@code{下发}钩子被启动时执行。它的返回值必须是一个包含@code{build-machine}对象的列表。虽然这个例子展示的是一个固定的列表，你可以想象，使用DNS-SD来返回一个包含从局域网内发现的构建机器的列表，@pxref{Introduction, Guile-Avahi,, guile-avahi, 在Guile Scheme程序里使用Avahi}。@code{build-machine}数据类型的详细信息如下。

note: type: deftp
en: {Data Type} build-machine
zh_CN: {数据类型} build-machine

note: type: deftp
en: This data type represents build machines to which the daemon may offload builds.  The important fields are:
zh_CN: 这个数据类型表示后台进程可以下发构建任务的构建机器。重要的项有：

note: type: code{#1}
en: name
zh_CN: 名字

note: type: table
en: The host name of the remote machine.
zh_CN: 远程机器的主机名。

note: type: code{#1}
en: user
zh_CN: 用户

note: type: table
en: The user account to use when connecting to the remote machine over SSH.  Note that the SSH key pair must @emph{not} be passphrase-protected, to allow non-interactive logins.
zh_CN: 通过SSH连接远程机器时使用的用户帐号。注意，SSH密钥@emph{不}能被密码保护，以支持无交互的登录。

note: type: item
en: host-key
zh_CN: 主机公钥

note: type: table
en: This must be the machine's SSH @dfn{public host key} in OpenSSH format.  This is used to authenticate the machine when we connect to it.  It is a long string that looks like this:
zh_CN: 这必须是机器的OpenSSH格式的SSH@dfn{公钥}。这是用来在连接机器时认证身份的。它是一个像这样的长字符串：

note: type: table
en: If the machine is running the OpenSSH daemon, @command{sshd}, the host key can be found in a file such as @file{/etc/ssh/ssh_host_ed25519_key.pub}.
zh_CN: 如果这个机器正在运行OpenSSH后台进程，@command{sshd}，那么主机公钥可以在@file{/etc/ssh/ssh_host_ed25519_key.pub}找到。

note: type: table
en: If the machine is running the SSH daemon of GNU@tie{}lsh, @command{lshd}, the host key is in @file{/etc/lsh/host-key.pub} or a similar file.  It can be converted to the OpenSSH format using @command{lsh-export-key} (@pxref{Converting keys,,, lsh, LSH Manual}):
zh_CN: 如果这个机器正在运行GNU@tie{}lsh，@command{lshd}，那么主机公钥可以在@file{/etc/lsh/host-key.pub}或类似的位置找到。它可以通过@command{lsh-export-key}命令转换成OpenSSH格式（@pxref{Converting keys,,, lsh, LSH用户手册}）：

note: type: deftp
en: A number of optional fields may be specified:
zh_CN: 一些可选的项：

note: type: item
en: @code{port} (default: @code{22})
zh_CN: @code{port}（默认值：@code{22}）

note: type: table
en: Port number of SSH server on the machine.
zh_CN: 机器上的SSH服务器的端口号。

note: type: item
en: @code{private-key} (default: @file{~root/.ssh/id_rsa})
zh_CN: @code{private-key}（默认值：@file{~root/.ssh/id_rsa}）

note: type: table
en: The SSH private key file to use when connecting to the machine, in OpenSSH format.  This key must not be protected with a passphrase.
zh_CN: 连接机器时使用的SSH私钥，OpenSSH格式。这个私钥不能被密码保护。

note: type: table
en: Note that the default value is the private key @emph{of the root account}.  Make sure it exists if you use the default.
zh_CN: 注意，默认值是@emph{root帐号}的私钥。使用默认值时请确保它存在。

note: type: item
en: @code{compression} (default: @code{"zlib@@openssh.com,zlib"})
zh_CN: @code{compression}（默认值：@code{"zlib@@openssh.com,zlib"}）

note: type: itemx
en: @code{compression-level} (default: @code{3})
zh_CN: @code{compression-level}（默认值：@code{3}）

note: type: table
en: The SSH-level compression methods and compression level requested.
zh_CN: SSH压缩算法和压缩级别。

note: type: table
en: Note that offloading relies on SSH compression to reduce bandwidth usage when transferring files to and from build machines.
zh_CN: 下发任务依赖SSH压缩来减少传输文件到构建机器时使用的带宽。

note: type: item
en: @code{daemon-socket} (default: @code{"/var/guix/daemon-socket/socket"})
zh_CN: @code{daemon-socket}（默认值：@code{"/var/guix/daemon-socket/socket"}）

note: type: table
en: File name of the Unix-domain socket @command{guix-daemon} is listening to on that machine.
zh_CN: 那台机器上的@command{guix-daemon}监听的Unix套接字文件名。

note: type: item
en: @code{parallel-builds} (default: @code{1})
zh_CN: @code{parallel-builds}（默认值：@code{1}）

note: type: table
en: The number of builds that may run in parallel on the machine.
zh_CN: 那台机器上可以并行运行的构建任务数量。

note: type: item
en: @code{speed} (default: @code{1.0})
zh_CN: @code{speed}（默认值：@code{1.0}）

note: type: table
en: A ``relative speed factor''.  The offload scheduler will tend to prefer machines with a higher speed factor.
zh_CN: 一个相对的速度值。下发调度器会偏好速度更快的机器。

note: type: item
en: @code{features} (default: @code{'()})
zh_CN: @code{features} （@code{'()}）

note: type: table
en: A list of strings denoting specific features supported by the machine.  An example is @code{"kvm"} for machines that have the KVM Linux modules and corresponding hardware support.  Derivations can request features by name, and they will be scheduled on matching build machines.
zh_CN: 一个表示机器支持的功能的字符串列表。例如，@code{"kvm"}表示机器有KVM Linux模块和相关的硬件支持。Derivation可以通过名字请求需要的功能，然后被分发到匹配的机器的任务队列里。

note: type: Plain text
en: The @command{guix} command must be in the search path on the build machines.  You can check whether this is the case by running:
zh_CN: @command{guix}命令必须在构建机器的搜素路径里。你可以通过这个命令检查：

note: type: Plain text
en: There is one last thing to do once @file{machines.scm} is in place.  As explained above, when offloading, files are transferred back and forth between the machine stores.  For this to work, you first need to generate a key pair on each machine to allow the daemon to export signed archives of files from the store (@pxref{Invoking guix archive}):
zh_CN: @file{machines.scm}到位后，还有一件要做的事。如上所述，下发任务时会在机器的仓库之间传输文件。为此，你需要在每台机器上生成一个密钥对，以使后台进程可以从仓库导出签名后的文件包（@pxref{Invoking guix archive}）：

note: type: Plain text
en: Each build machine must authorize the key of the master machine so that it accepts store items it receives from the master:
zh_CN: 每台构建机器都必须认证主机器的公钥，从而接收从主机器接收的仓库文件：

note: type: Plain text
en: Likewise, the master machine must authorize the key of each build machine.
zh_CN: 类似的，主机器必须认证每台构建机器的公钥：

note: type: Plain text
en: All the fuss with keys is here to express pairwise mutual trust relations between the master and the build machines.  Concretely, when the master receives files from a build machine (and @i{vice versa}), its build daemon can make sure they are genuine, have not been tampered with, and that they are signed by an authorized key.
zh_CN: 所有这些有关公钥的繁琐事宜都是为了表达主服务器和构建服务器之间成对的互相信任关系。具体地，当主机器从构建机器接收文件时（反之亦然），它的构建后台进程可以确保文件是原样的，没有被篡改，并且被认证的公钥签名过。

note: type: cindex
en: offload test
zh_CN: 下发测试

note: type: Plain text
en: To test whether your setup is operational, run this command on the master node:
zh_CN: 为了测试你的设置是否能正常工作，在主节点上运行这个命令：

note: type: Plain text
en: If you want to test a different machine file, just specify it on the command line:
zh_CN: 如果你希望用别的文件测试，只需要在命令行指定它：

note: type: Plain text
en: Last, you can test the subset of the machines whose name matches a regular expression like this:
zh_CN: 最后，你可以像这样只测试机器列表里名字匹配某个正则表达式的子集：

note: type: cindex
en: offload status
zh_CN: 下发状态

note: type: Plain text
en: To display the current load of all build hosts, run this command on the main node:
zh_CN: 若想展示所有构建主机的当前负载，在主节点上运行这个命令：

note: type: cindex
en: SELinux, daemon policy
zh_CN: SELinux，后台进程策略

note: type: cindex
en: mandatory access control, SELinux
zh_CN: 强制访问控制，SELinux

note: type: cindex
en: security, guix-daemon
zh_CN: 安全，guix-daemon

note: type: Plain text
en: Guix includes an SELinux policy file at @file{etc/guix-daemon.cil} that can be installed on a system where SELinux is enabled, in order to label Guix files and to specify the expected behavior of the daemon.  Since Guix System does not provide an SELinux base policy, the daemon policy cannot be used on Guix System.
zh_CN: Guix附带一个SELinux策略文件，位置在@file{etc/guix-daemon.cil}，它可以在启用SELinux的系统上安装，为Guix的文件添加标签及指定后台进程的期望行为。由于Guix系统不提供SELinux基础策略，这个后台进程策略不能在Guix系统上使用。

note: type: subsubsection
en: Installing the SELinux policy
zh_CN: 安装SELinux策略

note: type: cindex
en: SELinux, policy installation
zh_CN: SELinux，安装策略

note: type: Plain text
en: To install the policy run this command as root:
zh_CN: 用root用户执行这个命令以安装策略：

note: type: Plain text
en: Then relabel the file system with @code{restorecon} or by a different mechanism provided by your system.
zh_CN: 用@code{restorecon}或者你的系统提供的其它机制重新给文件系统打标签。

note: type: Plain text
en: Once the policy is installed, the file system has been relabeled, and the daemon has been restarted, it should be running in the @code{guix_daemon_t} context.  You can confirm this with the following command:
zh_CN: 一旦安装好策略，为文件系统重新打好标签，并且重启了后台进程，它应该在@code{guix_daemon_t}环境里运行。你可以用下面这个命令确认：

note: type: Plain text
en: Monitor the SELinux log files as you run a command like @code{guix build hello} to convince yourself that SELinux permits all necessary operations.
zh_CN: 运行@code{guix build hello}之类的命令并监控SELinux日志以说服你自己SELinux允许所有的操作。

note: type: cindex
en: SELinux, limitations
zh_CN: SELinux，限制

note: type: Plain text
en: This policy is not perfect.  Here is a list of limitations or quirks that should be considered when deploying the provided SELinux policy for the Guix daemon.
zh_CN: 这个策略不是完美的。这里有一个关于限制和缺陷的列表，当为Guix后台进程部署提供的SELinux策略时该认真考虑。

note: type: enumerate
en: @code{guix gc} cannot access arbitrary links to profiles.  By design, the file label of the destination of a symlink is independent of the file label of the link itself.  Although all profiles under $localstatedir are labelled, the links to these profiles inherit the label of the directory they are in.  For links in the user’s home directory this will be @code{user_home_t}.  But for links from the root user’s home directory, or @file{/tmp}, or the HTTP server’s working directory, etc, this won’t work.  @code{guix gc} would be prevented from reading and following these links.
zh_CN: @code{guix gc}不可以任意访问指向profile的链接。由于设计的原因，符号链接的目标的文件标签和符号链接本身的文件标签是不同的。尽管$localstatedir里的所有profile都被打上了标签，指向这些profile的符号链接继承它们所在的文件夹的标签。对于普通用户的家目录里的链接，标签是@code{user_home_t}。但是对于root用户的家目录，或@file{/tmp}，或HTTP服务器的工作目录等文件夹里的链接不是这样。@code{guix gc}会被阻止读取和跟随这些链接。

note: type: enumerate
en: The daemon’s feature to listen for TCP connections might no longer work.  This might require extra rules, because SELinux treats network sockets differently from files.
zh_CN: 后台进程监听TCP连接的功能不再可用。这可能需要额外的规则，因为SELinux区别对待网络套接字和文件。

note: type: enumerate
en: Currently all files with a name matching the regular expression @code{/gnu/store/.+-(guix-.+|profile)/bin/guix-daemon} are assigned the label @code{guix_daemon_exec_t}; this means that @emph{any} file with that name in any profile would be permitted to run in the @code{guix_daemon_t} domain.  This is not ideal.  An attacker could build a package that provides this executable and convince a user to install and run it, which lifts it into the @code{guix_daemon_t} domain.  At that point SELinux could not prevent it from accessing files that are allowed for processes in that domain.
zh_CN: 目前，所有匹配正则表达式@code{/gnu/store/.+-(guix-.+|profile)/bin/guix-daemon}的文件都被赋予@code{guix_daemon_exec_t}标签；这意味着@emph{任何}profile里的任何有这样名字的的文件都会被允许在@code{guix_daemon_t}域里执行。这不够理想。一个攻击者可以构建提供这个可执行程序的软件包，并说服一个用户安装、运行它，以此进入@code{guix_daemon_t}域。那时，SELinux无法阻止它访问所在域的进程可以访问的文件。

note: type: enumerate
en: We could generate a much more restrictive policy at installation time, so that only the @emph{exact} file name of the currently installed @code{guix-daemon} executable would be labelled with @code{guix_daemon_exec_t}, instead of using a broad regular expression.  The downside is that root would have to install or upgrade the policy at installation time whenever the Guix package that provides the effectively running @code{guix-daemon} executable is upgraded.
zh_CN: 我们可以在安装时生成一个更严格的策略，仅当前安装的@code{guix-daemon}的@emph{精确的}的文件名会被打上@code{guix_daemon_exec_t}标签，而不是用一个宽泛的正则表达式。这样的缺点是root必须在每次安装提供@code{guix-daemon}的Guix软件包时安装或升级策略。

note: type: section
en: Invoking @command{guix-daemon}
zh_CN: 调用@command{guix-daemon}

note: type: Plain text
en: The @command{guix-daemon} program implements all the functionality to access the store.  This includes launching build processes, running the garbage collector, querying the availability of a build result, etc.  It is normally run as @code{root} like this:
zh_CN: @command{guix-daemon}程序实现了所有访问仓库的功能。包括启动构建进程，运行垃圾回收器，查询构建结果，等。它通常以@code{root}身份运行：

note: type: Plain text
en: For details on how to set it up, @pxref{Setting Up the Daemon}.
zh_CN: 关于如何设置它，@pxref{Setting Up the Daemon}。

note: type: cindex
en: container, build environment
zh_CN: 容器，构建环境

note: type: cindex
en: reproducible builds
zh_CN: 可复现的构建

note: type: Plain text
en: The following command-line options are supported:
zh_CN: 下面这些命令行选项受支持：

note: type: item
en: --build-users-group=@var{group}
zh_CN: --build-users-group=@var{用户组}

note: type: table
en: Take users from @var{group} to run build processes (@pxref{Setting Up the Daemon, build users}).
zh_CN: 这会从@var{用户组}里选取用户，以运行构建进程（@pxref{Setting Up the Daemon,构建用户}）。

note: type: table
en: Do not use substitutes for build products.  That is, always build things locally instead of allowing downloads of pre-built binaries (@pxref{Substitutes}).
zh_CN: 不要为构建商品使用substitute。即，总是在本地构建，而不是下载预构建的二进制文件（@pxref{Substitutes}）。

note: type: table
en: This means that substitutes may be downloaded from @var{urls}, as long as they are signed by a trusted signature (@pxref{Substitutes}).
zh_CN: 这意味着可以从@var{urls}下载substitute，只要它们的签名可信（@pxref{Substitutes}）。

note: type: table
en: Cache build failures.  By default, only successful builds are cached.
zh_CN: 缓存失败的构建。默认地，只缓存成功的构建。

note: type: table
en: When this option is used, @command{guix gc --list-failures} can be used to query the set of store items marked as failed; @command{guix gc --clear-failures} removes store items from the set of cached failures.  @xref{Invoking guix gc}.
zh_CN: 当这个选项被使用时，可以用@command{guix gc --list-failures}查询被标记为失败的仓库文件；@command{guix gc --clear-failures}从仓库里删除失败的缓存。@xref{Invoking guix gc}。

note: type: table
en: Use @var{n} CPU cores to build each derivation; @code{0} means as many as available.
zh_CN: 用@var{n}个CPU核来构建每个derivation；@code{0}表示有多少就用多少。

note: type: table
en: Allow at most @var{n} build jobs in parallel.  The default value is @code{1}.  Setting it to @code{0} means that no builds will be performed locally; instead, the daemon will offload builds (@pxref{Daemon Offload Setup}), or simply fail.
zh_CN: 最多允许@var{n}个并行的构建任务。默认值是@code{1}。设置为@code{0}表示不在本地执行构建；而是下发构建任务（@pxref{Daemon Offload Setup}），或者直接失败。

note: type: table
en: When the build or substitution process remains silent for more than @var{seconds}, terminate it and report a build failure.
zh_CN: 当构建或substitution进程超过@var{seconds}秒仍然保持静默，就把它结束掉并报告构建失败。

note: type: table
en: The default value is @code{0}, which disables the timeout.
zh_CN: 默认值是@code{0}，表示关闭超时。

note: type: table
en: Likewise, when the build or substitution process lasts for more than @var{seconds}, terminate it and report a build failure.
zh_CN: 类似地，当构建或substitution进程执行超过@var{seconds}秒，就把它结束掉并报告构建失败。

note: type: table
en: Build each derivation @var{n} times in a row, and raise an error if consecutive build results are not bit-for-bit identical.  Note that this setting can be overridden by clients such as @command{guix build} (@pxref{Invoking guix build}).
zh_CN: 为每个derivation构建@var{n}次，如果连续的构建结果不是每个比特都相同就报告错误。这个设置可以被@command{guix build}之类的客户端覆盖（@pxref{Invoking guix build}）。

note: type: table
en: When used in conjunction with @option{--keep-failed}, the differing output is kept in the store, under @file{/gnu/store/@dots{}-check}.  This makes it easy to look for differences between the two results.
zh_CN: 当和@option{--keep-failed}一起使用时，不同的输出保存在@file{/gnu/store/@dots{}-check}。这让检查两个结果的区别更容易。

note: type: table
en: Produce debugging output.
zh_CN: 生成调试输出。

note: type: table
en: Add @var{dir} to the build chroot.
zh_CN: 把@var{dir}添加到构建的chroot。

note: type: table
en: Doing this may change the result of build processes---for instance if they use optional dependencies found in @var{dir} when it is available, and not otherwise.  For that reason, it is not recommended to do so.  Instead, make sure that each derivation declares all the inputs that it needs.
zh_CN: 这么做可能会改变构建进程的结果--例如，如果它们使用了在@var{dir}里发现的可选依赖。因此，建议不要这么做，而是确保每个derivation声明所需的全部输入。

note: type: table
en: Disable chroot builds.
zh_CN: 关闭chroot构建。

note: type: table
en: Using this option is not recommended since, again, it would allow build processes to gain access to undeclared dependencies.  It is necessary, though, when @command{guix-daemon} is running under an unprivileged user account.
zh_CN: 不建议使用这个选项，因为它会允许构建进程访问到没被声明的依赖。但是，当@command{guix-daemon}以没有特权的用户身份运行时，这个选项是必须的。

note: type: table
en: Compress build logs according to @var{type}, one of @code{gzip}, @code{bzip2}, or @code{none}.
zh_CN: 以@var{type}方式压缩构建日志，可选的值：@code{gzip}，@code{bzip2}，@code{none}。

note: type: cindex
en: deduplication
zh_CN: 去重

note: type: table
en: Disable automatic file ``deduplication'' in the store.
zh_CN: 关闭自动对仓库文件“去重”。

note: type: table
en: By default, files added to the store are automatically ``deduplicated'': if a newly added file is identical to another one found in the store, the daemon makes the new file a hard link to the other file.  This can noticeably reduce disk usage, at the expense of slightly increased input/output load at the end of a build process.  This option disables this optimization.
zh_CN: 默认地，添加到仓库的文件会被自动“去重”：如果新添加的文件和仓库里找到的某个文件完全相同，后台进程把这个新文件变成另一个文件的硬链接。这可以明显地减少硬盘使用，代价是构建结束后轻微地增加输入／输出负载。这个选项关闭这个优化。

note: type: table
en: Tell whether the garbage collector (GC) must keep outputs of live derivations.
zh_CN: 垃圾收集器（GC）是否必须保留存活的derivation的输出。

note: type: cindex
en: GC roots
zh_CN: GC根

note: type: cindex
en: garbage collector roots
zh_CN: 垃圾收集的根

note: type: table
en: Tell whether the garbage collector (GC) must keep derivations corresponding to live outputs.
zh_CN: 垃圾收集器（GC）是否必须保留和存活的输出相关的derivation。

note: type: table
en: This might be helpful to build programs that (usually wrongfully) depend on the kernel version number.
zh_CN: 这可能会有助于构建那些（通常是错误地）依赖内核版本号的程序。

note: type: table
en: Assume @var{system} as the current system type.  By default it is the architecture/kernel pair found at configure time, such as @code{x86_64-linux}.
zh_CN: 假设@var{system}是当前的系统类型。默认值是configure时发现的架构／内核元组，如@code{x86_64-linux}。

note: type: example
en: $ wget @value{BASE-URL}/guix-system-install-@value{VERSION}.x86_64-linux.iso.sig
    $ gpg --verify guix-system-install-@value{VERSION}.x86_64-linux.iso.sig
zh_CN: $ wget @value{BASE-URL}/guix-system-install-@value{VERSION}.@var{系统}.iso.sig
    $ gpg --verify guix-system-install-@value{VERSION}.@var{系统}.iso.sig

note: type: Plain text
en: The installation image uses the US qwerty keyboard layout.  If you want to change it, you can use the @command{loadkeys} command.  For example, the following command selects the Dvorak keyboard layout:
zh_CN: 安装镜像使用的是美国的 qwerty 键盘布局，如果想更改，可以使用 @command{loadkeys} 命令。 例如，用以下命令选择 Dvorak 键盘布局：

note: type: Plain text
en: Run the following command to see what your network interfaces are called:
zh_CN: 运行以下命令查看你的网络接口的名称：

note: type: table
en: @dots{} or, using the GNU/Linux-specific @command{ip} command:
zh_CN: @dots{} 或者，使用 GNU/Linux 特有的 @command{ip} 命令：

note: type: item
en: Wired connection
zh_CN: 有线连接

note: type: item
en: Wireless connection
zh_CN: 无线连接

note: type: subsubsection
en: Disk Partitioning
zh_CN: 磁盘分区

note: type: Plain text
en: Now you know the basics of package management!
zh_CN: 现在你知道包管理的基本知识了吧！

note: type: cindex
en: archive
zh_CN: 归档

note: type: item
en: container
zh_CN: 容器

note: type: item
en: module
zh_CN: 模块

note: type: item
en: @code{display} (default @code{":0"})
zh_CN: @code{display}（默认值：@code{":0"}）

note: type: item
en: @code{vt} (default @code{"vt7"})
zh_CN: @code{vt}（默认值：@code{"vt7"}）

note: type: item
en: @code{gnome} (default: @code{gnome})
zh_CN: @code{gnome}（默认值：@code{gnome}）

note: type: item
en: @code{xfce} (default: @code{xfce})
zh_CN: @code{xfce}（默认值：@code{xfce}）

note: type: item
en: @code{mate} (default: @code{mate})
zh_CN: @code{mate}（默认值：@code{mate}）

note: type: item
en: @code{enlightenment} (default: @code{enlightenment})
zh_CN: @code{enlightenment}（默认值：@code{enlightenment}）

note: type: item
en: @code{challenge} (default: @code{#f})
zh_CN: @code{challenge}（默认值：@code{#f}）

note: type: item
en: @code{authentication-hook} (default: @code{#f})
zh_CN: @code{authentication-hook}（默认值：@code{#f}）

note: type: item
en: @code{cleanup-hook} (default: @code{#f})
zh_CN: @code{cleanup-hook}（默认值：@code{#f}）

note: type: item
en: @code{zonefile-load} (default: @code{#f})
zh_CN: @code{zonefile-load}（默认值：@code{#f}）

note: type: item
en: @code{journal-content} (default: @code{#f})
zh_CN: @code{journal-content}（默认值：@code{#f}）

note: type: item
en: @code{max-journal-usage} (default: @code{#f})
zh_CN: @code{max-journal-usage}（默认值：@code{#f}）

note: type: item
en: @code{max-journal-depth} (default: @code{#f})
zh_CN: @code{max-journal-depth}（默认值：@code{#f}）

note: type: item
en: @code{max-zone-size} (default: @code{#f})
zh_CN: @code{max-zone-size}（默认值：@code{#f}）

note: type: item
en: @code{dnssec-policy} (default: @code{#f})
zh_CN: @code{dnssec-policy}（默认值：@code{#f}）

note: type: item
en: @code{includes} (default: @code{'()})
zh_CN: @code{includes}（默认值：@code{'()}）

note: type: cindex
en: secrets, Knot service
zh_CN: 秘密，Knot服务。

note: type: code{#1}
en: system
zh_CN: 系统

note: type: include
en: contributing.texi
zh_CN: contributing.zh_CN.texi

note: type: Plain text
en: The Nix-based software distributions, Nixpkgs and NixOS, have also been an inspiration for Guix.
zh_CN: 基于 Nix 的软件发行版 Nixpkgs 和 NixOS 也给 Guix 带来了灵感。
