Documentation/translations/zh_TW/process/license-rules.rst
Source file repositories/reference/linux-study-clean/Documentation/translations/zh_TW/process/license-rules.rst
File Facts
- System
- Linux kernel
- Corpus path
Documentation/translations/zh_TW/process/license-rules.rst- Extension
.rst- Size
- 14930 bytes
- Lines
- 373
- 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_TW.rst
:Original: :ref:`Documentation/process/license-rules.rst <kernel_licensing>`
:Translator: Alex Shi <alex.shi@linux.alibaba.com>
Hu Haowen <2023002089@link.tyut.edu.cn>
.. _tw_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> */
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.