From 242f0b847ac49eca1c7e8b8b812fa4c5a0fbb11b Mon Sep 17 00:00:00 2001 From: handsome_feng Date: Sat, 15 Oct 2022 14:29:26 +0800 Subject: [PATCH 1/2] Update license tutorial --- ...45\345\205\205\346\214\207\345\215\227.md" | 128 +++++++----------- 1 file changed, 48 insertions(+), 80 deletions(-) diff --git "a/\345\274\200\345\247\213\350\264\241\347\214\256/openKylin\350\275\257\344\273\266\345\214\205\347\211\210\346\235\203\345\215\217\350\256\256\350\241\245\345\205\205\346\214\207\345\215\227.md" "b/\345\274\200\345\247\213\350\264\241\347\214\256/openKylin\350\275\257\344\273\266\345\214\205\347\211\210\346\235\203\345\215\217\350\256\256\350\241\245\345\205\205\346\214\207\345\215\227.md" index 361862c..9ff7e54 100644 --- "a/\345\274\200\345\247\213\350\264\241\347\214\256/openKylin\350\275\257\344\273\266\345\214\205\347\211\210\346\235\203\345\215\217\350\256\256\350\241\245\345\205\205\346\214\207\345\215\227.md" +++ "b/\345\274\200\345\247\213\350\264\241\347\214\256/openKylin\350\275\257\344\273\266\345\214\205\347\211\210\346\235\203\345\215\217\350\256\256\350\241\245\345\205\205\346\214\207\345\215\227.md" @@ -4,41 +4,65 @@ date: 2022-09-16 14:36:45 tags: --- -## openKylin软件包版权协议补充指南 +# openKylin软件包版权协议补充指南 -openKylin 对待软件包版权和许可证信息的态度十分严格。在 openKylin 中的所有软件包必须包含 debian/copyright 文件且在该文件中需要提供相关信息的摘要。 +openKylin 对待软件包版权和许可证信息的态度十分严格,在 openKylin 中的所有软件包都应包含相应的版权信息,一般包括如下三步: +1. 将相应的版权声明文件放入每个源文件的头部注释中; +2. 在软件包的一级目录下创建以“LICENSE”或“COPYING”为名的文件,放入整个项目的许可证信息; +3. 在debian/copyright 文件中提供项目所有源文件版权信息的摘要; -该文件通常需要包含软件包版权信息的逐字副本;有关详细信息以及与软件包版权相关的进一步注意事项。 -### 文件语法 - -debian/copyright 文件必须是机器可理解的,但又是人类可读的,同时需要传达所有规定的上游信息、版权声明和许可细节。 - -该文件的语法与其他 Debian 控制文件的语法相同,在 Debian 政策手册中有所规定。 +## 头部注释 -该文件由两个或更多段落组成。至少,该文件必须包括一个标题段和一个文件段。 +针对项目内的.c/.cpp/.h/.py/.java 文件,在头部注释添加相应版权声明,相应的声明可在许可证文本信息中找到,也可以参考遵循相同许可证的项目: -每个字段的值都是下面列出的四种类型之一。本文件中每个字段的定义指出了它的值的类型。 +以项目ukui-foo,许可证“木兰宽松许可证,第2版”,copyright主体 Zhang Three 为例,需要在每个源文件头部注释中插入: -1. 单行值 Single-line values - -一个字段的一个值必须在同一行上,不可分段。 +``` +Copyright (c) 2022 Zhang Three +ukui-foo is licensed under Mulan PSL v2. +You can use this software according to the terms and conditions of the Mulan PSL v2. +You may obtain a copy of Mulan PSL v2 at: + http://license.coscl.org.cn/MulanPSL2 +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, +MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. +``` -2. 空格分隔的列表 Whitespace-separated lists +以项目ukui-foo,许可证GPL-3.0+,copyright主体 Zhang Three 为例: +``` +Copyright (C) 2022 Zhang Three -定义为空格分隔的列表的字段值可以在一行或多行上。列表中的值由一个或多个空白字符(空格或换行符)分隔。例如,Files 字段包含一个用换行的文件名模式的列表。 +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 3, or (at your option) +any later version. -3. 基于行的列表 Line-based lists +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. -另一种列表值每行有一个值。例如,Copyright 字段可以列出许多版权声明,每行一个。 +You should have received a copy of the GNU General Public License +along with this program; if not, see . - * - */ -``` - -### 开源软件包修改 - -``` -/* - * dpkg - main program for package management - * archives.c - actions that process archive files, mainly unpack - * - * Copyright © 1994,1995 Ian Jackson - * Copyright © 2000 Wichert Akkerman - * Copyright © 2007-2015 Guillem Jover - * Copyright © 2011 Linaro Limited - * Copyright © 2011 Raphaël Hertzog - * - * This is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -``` -- Gitee From aee055f9d067b25e80589943e250d60c5df2fcbe Mon Sep 17 00:00:00 2001 From: handsome_feng Date: Sat, 15 Oct 2022 14:36:02 +0800 Subject: [PATCH 2/2] update some details about license --- ...56\350\241\245\345\205\205\346\214\207\345\215\227.md" | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git "a/\345\274\200\345\247\213\350\264\241\347\214\256/openKylin\350\275\257\344\273\266\345\214\205\347\211\210\346\235\203\345\215\217\350\256\256\350\241\245\345\205\205\346\214\207\345\215\227.md" "b/\345\274\200\345\247\213\350\264\241\347\214\256/openKylin\350\275\257\344\273\266\345\214\205\347\211\210\346\235\203\345\215\217\350\256\256\350\241\245\345\205\205\346\214\207\345\215\227.md" index 9ff7e54..45568a4 100644 --- "a/\345\274\200\345\247\213\350\264\241\347\214\256/openKylin\350\275\257\344\273\266\345\214\205\347\211\210\346\235\203\345\215\217\350\256\256\350\241\245\345\205\205\346\214\207\345\215\227.md" +++ "b/\345\274\200\345\247\213\350\264\241\347\214\256/openKylin\350\275\257\344\273\266\345\214\205\347\211\210\346\235\203\345\215\217\350\256\256\350\241\245\345\205\205\346\214\207\345\215\227.md" @@ -14,7 +14,7 @@ openKylin 对待软件包版权和许可证信息的态度十分严格,在 ope ## 头部注释 -针对项目内的.c/.cpp/.h/.py/.java 文件,在头部注释添加相应版权声明,相应的声明可在许可证文本信息中找到,也可以参考遵循相同许可证的项目: +针对项目内的.c/.cpp/.h/.py/.java 等源文件,在头部注释添加相应版权声明,相应的声明可在许可证文本信息中找到,也可以参考遵循相同许可证的项目: 以项目ukui-foo,许可证“木兰宽松许可证,第2版”,copyright主体 Zhang Three 为例,需要在每个源文件头部注释中插入: @@ -49,7 +49,7 @@ along with this program; if not, see