Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
875 changes: 201 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ This is a helper tool for macOS written in Swift and SwiftUI. You can use it to
License
-------

StaticRouteHelper is licensed under the [GPLv3](./LICENSE) license.
StaticRouteHelper is licensed under the [Apache License 2.0](./LICENSE).
Copyright © 2021, Derek Jing

3 changes: 1 addition & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ xattr -cr /path/to/Static\ Router.app
License
-------

StaticRouteHelper is licensed under the [GPLv3](./LICENSE) license.
StaticRouteHelper 基于 [Apache License 2.0](./LICENSE) 协议开源。
Copyright © 2021, Derek Jing

2 changes: 1 addition & 1 deletion Resources/Locale/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,6 @@
/* ── About ── */
"about.app.subtitle" = "Help you manage macOS network routes.";
"about.version" = "Version: %@";
"about.license" = "StaticRouteHelper is licensed under the GPLv3 license.";
"about.license" = "StaticRouteHelper is licensed under the Apache License 2.0.";
"about.copyright" = "Copyright © 2021, Derek Jing";
"about.homepage.button" = "Project Home Page";
2 changes: 1 addition & 1 deletion Resources/Locale/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@
/* ── About ── */
"about.app.subtitle" = "帮助你管理 macOS 网络路由。";
"about.version" = "版本:%@";
"about.license" = "StaticRouteHelper 基于 GPLv3 协议开源。";
"about.license" = "StaticRouteHelper 基于 Apache License 2.0 协议开源。";
"about.copyright" = "版权所有 © 2021,Derek Jing";
"about.homepage.button" = "项目主页";
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
schema: spec-driven
created: 2026-03-24
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
## 上下文

仓库根目录 `LICENSE` 已更新为 Apache 2.0,但 README 与应用内 About 本地化资源仍显示 GPLv3,导致同一版本发布物在不同入口暴露冲突的许可证信息。该问题跨越文档与 UI 资源,需要一次性梳理并统一。

## 目标 / 非目标

**目标:**
- 统一所有面向用户可见的许可证声明为 Apache 2.0。
- 保持现有许可证展示位置不变,仅更新文案内容,避免引入 UI 行为变化。
- 通过文本扫描确认不存在遗留 GPLv3 项目许可证声明。

**非目标:**
- 不变更项目功能逻辑、构建流程或发布流程。
- 不修改第三方文件中自带的历史版权/许可说明(例如上游示例代码注释)。
- 不新增复杂的自动化许可证检测流程(本次以一次性人工校验为主)。

## 决策

1. 保持现有展示结构,仅替换许可证文本。
理由:本次属于合规文案一致性修正,范围应最小化,避免产生无关功能回归。
备选方案:
- 方案 A:同时重构 About 页面文案与布局。未选,超出本次目标。
- 方案 B:仅改 README,不改 UI 文案。未选,无法解决应用内冲突声明。

2. 中英文文案统一采用“Apache License 2.0 / Apache 2.0”表达并保留 `LICENSE` 链接。
理由:与仓库根目录许可证文件保持直接对应,降低歧义。
备选方案:
- 方案 A:中文文案仅写“Apache 协议”。未选,版本信息不完整。

3. 使用仓库级 `rg` 扫描作为验收手段。
理由:成本低、执行快,可覆盖 README 与资源字符串等文本入口。
备选方案:
- 方案 A:引入 CI 规则强校验。未选,本变更聚焦快速修正。

## 风险 / 权衡

- [风险] 仍有遗漏的 GPLv3 文案未被覆盖 → [缓解] 变更后执行全仓库关键词扫描并人工复核结果。
- [风险] 本地化键值替换引发语义不一致 → [缓解] 同步更新中英文对应条目并保持 key 不变,避免代码引用受影响。
- [权衡] 未引入自动化合规检查,未来可能再次出现偏差 → [缓解] 在后续流程改进中再评估是否加入 CI 校验。

## 迁移计划

1. 修改 README 与 README_CN 的许可证段落为 Apache 2.0。
2. 修改 About 页面使用的本地化字符串为 Apache 2.0 描述。
3. 执行关键词扫描,确认不再存在项目许可证层面的 GPLv3 表述。
4. 若发现遗漏,追加修正后再次扫描。

## 开放问题

- 当前无阻塞性开放问题。
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## 为什么

项目仓库的 `LICENSE` 已切换为 Apache 2.0,但代码库中的用户可见文案仍有 GPLv3 表述。许可证声明不一致会造成合规风险与用户理解偏差,因此需要尽快统一。

## 变更内容

- 将项目内所有面向用户/开发者的 GPLv3 声明更新为 Apache 2.0。
- 统一中英文 README 的许可证章节文案与链接。
- 统一应用内 About 页面本地化资源中的许可证描述。
- 对仓库进行一次许可证文案扫描,确保不存在遗留 GPLv3 项目声明。

## 功能 (Capabilities)

### 新增功能
- `project-license-disclosure`: 定义项目许可证对外披露的一致性要求,确保 README 与应用内文案与 `LICENSE` 文件一致。

### 修改功能
- 无

## 影响

- 文档:`README.md`、`README_CN.md`
- 资源:`Resources/Locale/en.lproj/Localizable.strings`、`Resources/Locale/zh-Hans.lproj/Localizable.strings`
- 合规认知:用户与贡献者读取到的许可证信息将与仓库根目录 `LICENSE` 一致
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## 新增需求

### 需求:许可证声明一致性
项目必须确保仓库根目录许可证文件与所有用户可见的许可证声明保持一致;当根目录许可证为 Apache 2.0 时,README 与应用内关于页面的许可证文本必须明确声明 Apache 2.0,且禁止继续声明 GPLv3。

#### 场景:README 许可证声明与 LICENSE 一致
- **当** 维护者检查 `README.md` 与 `README_CN.md` 的许可证章节
- **那么** 两处文本都明确指向 Apache 2.0,并链接到仓库内 `LICENSE` 文件

#### 场景:应用内 About 许可证声明与 LICENSE 一致
- **当** 用户在应用的 About 页面查看许可证信息
- **那么** 显示文本明确为 Apache 2.0,且不包含 GPLv3 声明

## 修改需求

## 移除需求
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## 1. 文档许可证声明统一

- [x] 1.1 更新 `README.md` 的 License 段落为 Apache 2.0 表述
- [x] 1.2 更新 `README_CN.md` 的 License 段落为 Apache 2.0 表述

## 2. 应用内许可证文案统一

- [x] 2.1 更新 `Resources/Locale/en.lproj/Localizable.strings` 中 `about.license` 文案
- [x] 2.2 更新 `Resources/Locale/zh-Hans.lproj/Localizable.strings` 中 `about.license` 文案

## 3. 回归校验

- [x] 3.1 扫描仓库中遗留 GPLv3 项目许可证文案并修正
- [x] 3.2 复核变更结果,确保 README 与 About 文案均与 Apache 2.0 一致
16 changes: 16 additions & 0 deletions openspec/specs/project-license-disclosure/spec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# project-license-disclosure 规范

## 目的
待定 - 由归档变更 migrate-license-to-apache-2-0 创建。归档后请更新目的。
## 需求
### 需求:许可证声明一致性
项目必须确保仓库根目录许可证文件与所有用户可见的许可证声明保持一致;当根目录许可证为 Apache 2.0 时,README 与应用内关于页面的许可证文本必须明确声明 Apache 2.0,且禁止继续声明 GPLv3。

#### 场景:README 许可证声明与 LICENSE 一致
- **当** 维护者检查 `README.md` 与 `README_CN.md` 的许可证章节
- **那么** 两处文本都明确指向 Apache 2.0,并链接到仓库内 `LICENSE` 文件

#### 场景:应用内 About 许可证声明与 LICENSE 一致
- **当** 用户在应用的 About 页面查看许可证信息
- **那么** 显示文本明确为 Apache 2.0,且不包含 GPLv3 声明

Loading