Documentation/translations/zh_CN/process/license-rules.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_CN/process/license-rules.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_CN/process/license-rules.rst- Extension
.rst- Size
- 14876 bytes
- Lines
- 371
- Domain
- Support Tooling And Documentation
- Bucket
- Documentation
- Inferred role
- Support Tooling And Documentation: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
.. SPDX-License-Identifier: GPL-2.0
.. include:: ../disclaimer-zh_CN.rst
:Original: :ref:`Documentation/process/license-rules.rst <kernel_licensing>`
:Translator: Alex Shi <alex.shi@linux.alibaba.com>
.. _cn_kernel_licensing:
Linux内核许可规则
=================
Linux内核根据LICENSES/preferred/GPL-2.0中提供的GNU通用公共许可证版本2
(GPL-2.0)的条款提供,并在LICENSES/exceptions/Linux-syscall-note中显式
描述了例外的系统调用,如COPYING文件中所述。
此文档文件提供了如何对每个源文件进行注释以使其许可证清晰明确的说明。
它不会取代内核的许可证。
内核源代码作为一个整体适用于COPYING文件中描述的许可证,但是单个源文件可以
具有不同的与GPL-20兼容的许可证::
GPL-1.0+ : GNU通用公共许可证v1.0或更高版本
GPL-2.0+ : GNU通用公共许可证v2.0或更高版本
LGPL-2.0 : 仅限GNU库通用公共许可证v2
LGPL-2.0+: GNU 库通用公共许可证v2或更高版本
LGPL-2.1 : 仅限GNU宽通用公共许可证v2.1
LGPL-2.1+: GNU宽通用公共许可证v2.1或更高版本
除此之外,个人文件可以在双重许可下提供,例如一个兼容的GPL变体,或者BSD,
MIT等许可。
用户空间API(UAPI)头文件描述了用户空间程序与内核的接口,这是一种特殊情况。
根据内核COPYING文件中的注释,syscall接口是一个明确的边界,它不会将GPL要求
扩展到任何使用它与内核通信的软件。由于UAPI头文件必须包含在创建在Linux内核
上运行的可执行文件的任何源文件中,因此此例外必须记录在特别的许可证表述中。
表达源文件许可证的常用方法是将匹配的样板文本添加到文件的顶部注释中。由于
格式,拼写错误等,这些“样板”很难通过那些在上下文中使用的验证许可证合规性
的工具。
样板文本的替代方法是在每个源文件中使用软件包数据交换(SPDX)许可证标识符。
SPDX许可证标识符是机器可解析的,并且是用于提供文件内容的许可证的精确缩写。
SPDX许可证标识符由Linux 基金会的SPDX 工作组管理,并得到了整个行业,工具
供应商和法律团队的合作伙伴的一致同意。有关详细信息,请参阅
https://spdx.org/
Linux内核需要所有源文件中的精确SPDX标识符。内核中使用的有效标识符在
`许可标识符`_ 一节中进行了解释,并且已可以在
https://spdx.org/licenses/ 上的官方SPDX许可证列表中检索,并附带许可证
文本。
许可标识符语法
--------------
1.安置:
内核文件中的SPDX许可证标识符应添加到可包含注释的文件中的第一行。对于大多
数文件,这是第一行,除了那些在第一行中需要'#!PATH_TO_INTERPRETER'的脚本。
对于这些脚本,SPDX标识符进入第二行。
|
2. 风格:
SPDX许可证标识符以注释的形式添加。注释样式取决于文件类型::
C source: // SPDX-License-Identifier: <SPDX License Expression>
C header: /* SPDX-License-Identifier: <SPDX License Expression> */
ASM: /* SPDX-License-Identifier: <SPDX License Expression> */
Annotation
- Atlas domain: Support Tooling And Documentation / Documentation.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.