Skip to content

Commit

Permalink
Update to lfs-en @ 016ba17
Browse files Browse the repository at this point in the history
  • Loading branch information
xry111 committed Jan 12, 2025
1 parent 39fde3a commit 72fe0c4
Show file tree
Hide file tree
Showing 14 changed files with 237 additions and 155 deletions.
2 changes: 1 addition & 1 deletion lfs-en
Submodule lfs-en updated from f1a5ce to 016ba1
8 changes: 4 additions & 4 deletions zh_CN/chapter01/changelog.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Linux From Scratch 11.0\n"
"Report-Msgid-Bugs-To: lfs-dev@lists.linuxfromscratch.org\n"
"POT-Creation-Date: 2025-01-01 14:23+0800\n"
"POT-Creation-Date: 2025-01-12 13:24+0800\n"
"PO-Revision-Date: 2022-02-05 22:45+0800\n"
"Last-Translator: Xi Ruoyao <xry111@xry111.site>\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -185,10 +185,10 @@ msgstr ""
#. type: Content of: <sect1><itemizedlist><listitem><itemizedlist><listitem><para>
#: lfs-en/chapter01/changelog.xml
msgid ""
"[bdubbs] - Update to Python-3.13.1. Fixes <ulink url='&lfs-ticket-"
"root;5605'>#5605</ulink>."
"[bdubbs] - Update to Python-3.13.1 (Security Update). Fixes <ulink url='&lfs-"
"ticket-root;5605'>#5605</ulink>."
msgstr ""
"[bdubbs] — 更新到 Python-3.13.1。修复 <ulink url='&lfs-ticket-"
"[bdubbs] — 更新到 Python-3.13.1 (安全更新)。修复 <ulink url='&lfs-ticket-"
"root;5605'>#5605</ulink>。"

#. type: Content of: <sect1><itemizedlist><listitem><itemizedlist><listitem><para>
Expand Down
124 changes: 92 additions & 32 deletions zh_CN/chapter02/aboutlfs.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Linux From Scratch 11.4\n"
"Report-Msgid-Bugs-To: lfs-dev@lists.linuxfromscratch.org\n"
"POT-Creation-Date: 2024-12-03 19:51+0800\n"
"POT-Creation-Date: 2025-01-12 13:22+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Xi Ruoyao <xry111@xry111.site>\n"
"Language-Team: none\n"
Expand All @@ -16,8 +16,8 @@ msgstr ""

#. type: Content of: <sect1><title>
#: lfs-en/chapter02/aboutlfs.xml
msgid "Setting The $LFS Variable"
msgstr "设置 $LFS 环境变量"
msgid "Setting the $LFS Variable and the Umask"
msgstr "设置 $LFS 环境变量和 Umask"

#. type: Content of: <sect1><para>
#: lfs-en/chapter02/aboutlfs.xml
Expand Down Expand Up @@ -56,18 +56,53 @@ msgstr ""
"$LFS/tools</command>。Shell 在解析命令时会自动将 <quote>$LFS</quote> 替换成 "
"<quote>/mnt/lfs</quote> (或是您设置的其他值)。"

#. type: Content of: <sect1><para>
#: lfs-en/chapter02/aboutlfs.xml
msgid ""
"Now setting the file mode creation mask (umask) to <literal>022</literal> in "
"case the host distro uses a different default:"
msgstr ""
"现在设定创建文件时使用的访问权限模式掩码 (umask) 为 <literal>022</literal>,"
"以防个别宿主发行版使用不同的默认值:"

#. type: Content of: <sect1><screen>
#: lfs-en/chapter02/aboutlfs.xml
#, no-wrap
msgid "<userinput>umask 022</userinput>"
msgstr "<userinput>umask 022</userinput>"

#. type: Content of: <sect1><para>
#: lfs-en/chapter02/aboutlfs.xml
msgid ""
"Setting the umask to 022 ensures that newly created files and directories "
"are only writable by their owner, but are readable and searchable (only for "
"directories) by anyone (assuming default modes are used by the <ulink "
"role='man' url='&man;open.2'>open(2)</ulink> system call, new files will end "
"up with permission mode 644 and directories with mode 755). An over-"
"permissive default can leave security holes in the LFS system, and an over-"
"restrictive default can cause strange issues building or using the LFS "
"system."
msgstr ""
"将 umask 设定为 022,保证只有文件所有者可以写新创建的文件和目录,但任何人都可"
"读取或搜索 (仅针对目录) 它们 (如果 <ulink role='man' "
"url='&man;open.2'>open(2)</ulink> 系统调用使用默认模式,则新文件将具有权限模"
"式 644,而新目录具有权限模式 755)。过于宽松的默认值可能在 LFS 系统中遗留安全"
"问题,而过于严格的默认值可能在构建或使用 LFS 时引发奇怪的问题。"

#. type: Content of: <sect1><caution><para>
#: lfs-en/chapter02/aboutlfs.xml
msgid ""
"Do not forget to check that <envar>LFS</envar> is set whenever you leave and "
"reenter the current working environment (such as when doing a <command>su</"
"command> to <systemitem class=\"username\">root</systemitem> or another "
"user). Check that the <envar>LFS</envar> variable is set up properly with:"
"Do not forget to check that <envar>LFS</envar> is set and the umask is set "
"to <literal>022</literal> whenever you leave and reenter the current working "
"environment (such as when doing a <command>su</command> to <systemitem "
"class=\"username\">root</systemitem> or another user). Check that the "
"<envar>LFS</envar> variable is set up properly with:"
msgstr ""
"无论何时,如果您离开并重新进入了工作环境,一定要确认 <envar>LFS</envar> 的设"
"定值和您离开工作环境时相同。(例如,使用 <command>su</command> 切换到 "
"<systemitem class=\"username\">root</systemitem> 或者其他用户时。) 请执行以下"
"命令,检查 <envar>LFS</envar> 的设置是否正确:"
"无论何时,如果您离开并重新进入了工作环境,一定要再次确认 <envar>LFS</envar> "
"已经正确设定,且 umask 被设为 <literal>022</literal> (例如,使用 "
"<command>su</command> 切换到 <systemitem class=\"username\">root</"
"systemitem> 或者其他用户时)。以下命令可用于检查 <envar>LFS</envar> 的设置是否"
"正确:"

#. type: Content of: <sect1><itemizedlist><listitem><screen>
#: lfs-en/chapter02/aboutlfs.xml lfs-en/part3intro/generalinstructions.xml
Expand All @@ -80,48 +115,73 @@ msgstr "<userinput>echo $LFS</userinput>"
msgid ""
"Make sure the output shows the path to your LFS system's build location, "
"which is <filename class=\"directory\">/mnt/lfs</filename> if the provided "
"example was followed. If the output is incorrect, use the command given "
"example was followed."
msgstr ""
"确认上述命令输出用于构建 LFS 系统的位置,如果使用了本书的例子,就是 "
"<filename class=\"directory\">/mnt/lfs</filename>。"

#. type: Content of: <sect1><caution><para>
#: lfs-en/chapter02/aboutlfs.xml
msgid "Check that the umask is set up properly with:"
msgstr "以下命令可用于检查 umask 是否设定正确:"

#. type: Content of: <sect1><caution><screen>
#: lfs-en/chapter02/aboutlfs.xml
#, no-wrap
msgid "<userinput>umask</userinput>"
msgstr "<userinput>umask</userinput>"

#. type: Content of: <sect1><caution><para>
#: lfs-en/chapter02/aboutlfs.xml
msgid "The output should be <computeroutput>022</computeroutput>."
msgstr "该命令应该输出 <computeroutput>022</computeroutput>。"

#. type: Content of: <sect1><caution><para>
#: lfs-en/chapter02/aboutlfs.xml
msgid ""
"If any output of these two commands is incorrect, use the command given "
"earlier on this page to set <envar>$LFS</envar> to the correct directory "
"name."
"name and set umask to <literal>022</literal>."
msgstr ""
"确认该命令的输出是您构建 LFS 的位置,如果您使用本书提供的例子,那么输出应该"
"是 <filename class=\"directory\">/mnt/lfs</filename>。如果输出不正确,使用前"
"文给出的命令,将 <envar>$LFS</envar> 设置成正确的目录名。"
"如果上述两条命令中任意一条的输出不正确,则需要按照本页面之前给出的命令,将 "
"<envar>$LFS</envar> 设为正确的目录名,并将 umask 设为 <literal>022</"
"literal>。"

#. type: Content of: <sect1><note><para>
#: lfs-en/chapter02/aboutlfs.xml
msgid ""
"One way to ensure that the <envar>LFS</envar> variable is always set is to "
"edit the <filename>.bash_profile</filename> file in both your personal home "
"directory and in <filename>/root/.bash_profile</filename> and enter the "
"export command above. In addition, the shell specified in the <filename>/"
"One way to ensure that the <envar>LFS</envar> variable and the umask are "
"always set properly is to edit the <filename>.bash_profile</filename> file "
"in both your personal home directory and in <filename>/root/.bash_profile</"
"filename> and enter the <command>export</command> and <command>umask</"
"command> commands above. In addition, the shell specified in the <filename>/"
"etc/passwd</filename> file for all users that need the <envar>LFS</envar> "
"variable must be bash to ensure that the <filename>/root/.bash_profile</"
"filename> file is incorporated as a part of the login process."
"variable must be bash to ensure that the <filename>.bash_profile</filename> "
"file is incorporated as a part of the login process."
msgstr ""
"确保 <envar>LFS</envar> 始终正确的一种方法是:编辑您的主目录中的 "
"<filename>.bash_profile</filename>,以及<filename>/root/.bash_profile</"
"filename>,为它们加入上述设置并导出 LFS 变量的 export 命令。另外,在 "
"<filename>/etc/passwd</filename> 中,每个需要使用 <envar>LFS</envar> 变量的用"
"户的 shell 都必须是 bash,以保证每次登录时都执行 <filename>.bash_profile</"
"filename> 中的命令。"
"确保 <envar>LFS</envar> 变量和 umask 始终正确的一种方法是:编辑您的主目录中"
"<filename>.bash_profile</filename>,以及<filename>/root/.bash_profile</"
"filename>,为它们加入上述 <command>export</command> 和 <command>umask</"
"command> 命令。另外,在 <filename>/etc/passwd</filename> 中,每个需要使用 "
"<envar>LFS</envar> 变量的用户的 shell 都必须是 bash,以保证每次登录时都执行 "
"<filename>.bash_profile</filename> 中的命令。"

#. type: Content of: <sect1><note><para>
#: lfs-en/chapter02/aboutlfs.xml
msgid ""
"Another consideration is the method that is used to log into the host "
"system. If logging in through a graphical display manager, the user's "
"<filename>.bash_profile</filename> is not normally used when a virtual "
"terminal is started. In this case, add the export command to the "
"terminal is started. In this case, add the commands to the "
"<filename>.bashrc</filename> file for the user and <systemitem "
"class=\"username\">root</systemitem>. In addition, some distributions use "
"an \"if\" test, and do not run the remaining <filename>.bashrc</filename> "
"instructions for a non-interactive bash invocation. Be sure to place the "
"export command ahead of the test for non-interactive use."
"commands ahead of the test for non-interactive use."
msgstr ""
"另外还要考虑登录宿主系统的方式,如果您使用图形显示管理器登录,再启动虚拟终"
"端,那么 <filename>.bash_profile</filename> 一般不会被虚拟终端执行。此时,应"
"该将 export 命令加入到您使用的用户和 <systemitem class=\"username\">root</"
"该将上述命令加入到您使用的用户和 <systemitem class=\"username\">root</"
"systemitem> 用户的 <filename>.bashrc</filename> 文件中。另外,一些发行版的 "
"<filename>.bashrc</filename> 中使用 \"if\" 命令,使其在非交互 bash 的启动过程"
"中不执行其余命令。此时必须将 export 命令添加到交互性检测之前。"
"中不执行其余命令。此时必须将上述命令添加到交互性检测之前。"
24 changes: 12 additions & 12 deletions zh_CN/chapter04/addinguser.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Linux From Scratch 11.4\n"
"Report-Msgid-Bugs-To: lfs-dev@lists.linuxfromscratch.org\n"
"POT-Creation-Date: 2024-07-04 13:21+0800\n"
"POT-Creation-Date: 2025-01-12 13:22+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Xi Ruoyao <xry111@xry111.site>\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -45,11 +45,11 @@ msgstr ""
#: lfs-en/chapter04/addinguser.xml
#, no-wrap
msgid ""
"<userinput>groupadd lfs\n"
"useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput>"
"<userinput>groupadd &lfs-groupname;\n"
"useradd -s /bin/bash -g &lfs-groupname; -m -k /dev/null &lfs-username;</userinput>"
msgstr ""
"<userinput>groupadd lfs\n"
"useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput>"
"useradd -s /bin/bash -g &lfs-groupname; -m -k /dev/null &lfs-username;</userinput>"

#. type: Content of: <sect1><variablelist><title>
#: lfs-en/chapter04/addinguser.xml
Expand Down Expand Up @@ -138,8 +138,8 @@ msgstr ""
#. type: Content of: <sect1><screen>
#: lfs-en/chapter04/addinguser.xml
#, no-wrap
msgid "<userinput>passwd lfs</userinput>"
msgstr "<userinput>passwd lfs</userinput>"
msgid "<userinput>passwd &lfs-username;</userinput>"
msgstr "<userinput>passwd &lfs-username;</userinput>"

#. type: Content of: <sect1><para>
#: lfs-en/chapter04/addinguser.xml
Expand All @@ -156,14 +156,14 @@ msgstr ""
#: lfs-en/chapter04/addinguser.xml
#, no-wrap
msgid ""
"<userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}\n"
"<userinput>chown -v &lfs-username; $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}\n"
"case $(uname -m) in\n"
" x86_64) chown -v lfs $LFS/lib64 ;;\n"
" x86_64) chown -v &lfs-username; $LFS/lib64 ;;\n"
"esac</userinput>"
msgstr ""
"<userinput>chown -v lfs $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}\n"
"<userinput>chown -v &lfs-username; $LFS/{usr{,/*},lib,var,etc,bin,sbin,tools}\n"
"case $(uname -m) in\n"
" x86_64) chown -v lfs $LFS/lib64 ;;\n"
" x86_64) chown -v &lfs-username; $LFS/lib64 ;;\n"
"esac</userinput>"

#. type: Content of: <sect1><note><para>
Expand Down Expand Up @@ -191,8 +191,8 @@ msgstr ""
#. type: Content of: <sect1><screen>
#: lfs-en/chapter04/addinguser.xml
#, no-wrap
msgid "<userinput>su - lfs</userinput>"
msgstr "<userinput>su - lfs</userinput>"
msgid "<userinput>su - &lfs-username;</userinput>"
msgstr "<userinput>su - &lfs-username;</userinput>"

#. type: Content of: <sect1><para>
#: lfs-en/chapter04/addinguser.xml
Expand Down
26 changes: 25 additions & 1 deletion zh_CN/chapter04/creatingminlayout.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Linux From Scratch 11.4\n"
"Report-Msgid-Bugs-To: lfs-dev@lists.linuxfromscratch.org\n"
"POT-Creation-Date: 2022-11-29 19:07+0800\n"
"POT-Creation-Date: 2025-01-12 13:22+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Xi Ruoyao <xry111@xry111.site>\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -35,6 +35,30 @@ msgstr ""
"和 libstdc++) 可以被安装到它们的最终位置。这样,在<xref linkend=\"chapter-"
"building-system\"/>中重新构建它们时,就能直接覆盖这些临时程序。"

#. type: Content of: <sect1><para>
#: lfs-en/chapter04/creatingminlayout.xml
msgid ""
"At first, set the owner and permission mode of the <filename "
"class='directory'>$LFS</filename> directory (i.e. the root directory in the "
"newly created file system for the LFS system) to &root; and <literal>755</"
"literal> in case the host distro has been configured to use a different "
"default for <command>mkfs</command>:"
msgstr ""
"首先,将 <filename class='directory'>$LFS</filename> 目录 (即为 LFS 系统新创"
"建的文件系统的根目录) 的所有者设为 &root;,访问权限设为 <literal>755</"
"literal>,以防个别宿主发行版中 <command>mkfs</command> 被配置为使用与此不同的"
"默认值:"

#. type: Content of: <sect1><screen>
#: lfs-en/chapter04/creatingminlayout.xml
#, no-wrap
msgid ""
"<userinput>chown root:root $LFS\n"
"chmod 755 $LFS</userinput>"
msgstr ""
"<userinput>chown root:root $LFS\n"
"chmod 755 $LFS</userinput>"

#. type: Content of: <sect1><para>
#: lfs-en/chapter04/creatingminlayout.xml
msgid ""
Expand Down
15 changes: 4 additions & 11 deletions zh_CN/chapter04/settingenviron.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Linux From Scratch 11.4\n"
"Report-Msgid-Bugs-To: lfs-dev@lists.linuxfromscratch.org\n"
"POT-Creation-Date: 2024-12-03 19:51+0800\n"
"POT-Creation-Date: 2025-01-12 13:22+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Xi Ruoyao <xry111@xry111.site>\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -158,16 +158,9 @@ msgstr "<parameter>umask 022</parameter>"
#. type: Content of: <sect1><variablelist><varlistentry><listitem><para>
#: lfs-en/chapter04/settingenviron.xml
msgid ""
"Setting the user file-creation mask (umask) to 022 ensures that newly "
"created files and directories are only writable by their owner, but are "
"readable and executable by anyone (assuming default modes are used by the "
"<ulink role='man' url='&man;open.2'>open(2)</ulink> system call, new files "
"will end up with permission mode 644 and directories with mode 755)."
msgstr ""
"将用户的文件创建掩码 (umask) 设定为 022,保证只有文件所有者可以写新创建的文件"
"和目录,但任何人都可读取、执行它们。(如果 <ulink role='man' "
"url='&man;open.2'>open(2)</ulink> 系统调用使用默认模式,则新文件将具有权限模"
"式 644,而新目录具有权限模式 755)。"
"Setting the umask as we've already explained in <xref linkend='ch-"
"partitioning-aboutlfs' role='.'/>"
msgstr "如同<xref linkend='ch-partitioning-aboutlfs'/>解释的那样设置 umask。"

#. type: Content of: <sect1><variablelist><varlistentry><term>
#: lfs-en/chapter04/settingenviron.xml
Expand Down
10 changes: 5 additions & 5 deletions zh_CN/chapter07/changingowner.po
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Linux From Scratch 11.4\n"
"Report-Msgid-Bugs-To: lfs-dev@lists.linuxfromscratch.org\n"
"POT-Creation-Date: 2024-05-01 15:22+0800\n"
"POT-Creation-Date: 2025-01-12 13:22+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Xi Ruoyao <xry111@xry111.site>\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -67,12 +67,12 @@ msgstr ""
#: lfs-en/chapter07/changingowner.xml
#, no-wrap
msgid ""
"<userinput>chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}\n"
"<userinput>chown --from &lfs-username; -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}\n"
"case $(uname -m) in\n"
" x86_64) chown --from lfs -R root:root $LFS/lib64 ;;\n"
" x86_64) chown --from &lfs-username; -R root:root $LFS/lib64 ;;\n"
"esac</userinput>"
msgstr ""
"<userinput>chown --from lfs -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}\n"
"<userinput>chown --from &lfs-username; -R root:root $LFS/{usr,lib,var,etc,bin,sbin,tools}\n"
"case $(uname -m) in\n"
" x86_64) chown --from lfs -R root:root $LFS/lib64 ;;\n"
" x86_64) chown --from &lfs-username; -R root:root $LFS/lib64 ;;\n"
"esac</userinput>"
Loading

0 comments on commit 72fe0c4

Please sign in to comment.