简化 Debian 发布流程并添加项目文档系统
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -13s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -6s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in -7s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 7s
Build and Release / release (push) Successful in 21s
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -13s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -6s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in -7s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 7s
Build and Release / release (push) Successful in 21s
- 将 Debian 包仓库从 bookworm/trixie 双发行版改为通用 stable 仓库 - 新增完整的 llmdoc 文档系统,包含架构、指南和参考文档 - 更新 README.md 和部署指南以反映新的仓库配置 - 添加 .gitignore 文件
This commit is contained in:
35
llmdoc/architecture/debian-packaging.md
Normal file
35
llmdoc/architecture/debian-packaging.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Debian 包构建架构
|
||||
|
||||
## 1. 身份
|
||||
|
||||
- **定义:** Debian 打包系统,用于将 xxxigcc-proxy 软件打包为可安装的 Debian 软件包。
|
||||
- **目的:** 提供一个标准化的软件分发和安装机制。
|
||||
|
||||
## 2. 核心组件
|
||||
|
||||
- `debian/build-deb.sh`: 主要构建脚本,负责整个 Debian 包的构建过程
|
||||
- 架构转换
|
||||
- 目录结构创建
|
||||
- 文件复制与权限设置
|
||||
- 包构建
|
||||
|
||||
- `debian/control.template`: 定义包的元数据
|
||||
- 包名、版本、依赖关系
|
||||
- 描述和维护者信息
|
||||
|
||||
## 3. 执行流程
|
||||
|
||||
1. **初始化**:接收架构、版本和源文件作为输入
|
||||
2. **目录准备**:创建临时构建目录
|
||||
3. **二进制文件解压**:将源 tar.gz 文件解压到 `/opt/xxxigcc-proxy`
|
||||
4. **控制文件生成**:使用 `sed` 替换模板变量
|
||||
5. **维护脚本复制**:复制 postinst, prerm, postrm 脚本
|
||||
6. **服务文件安装**:复制 systemd 服务配置文件
|
||||
7. **权限设置**:调整关键文件和目录权限
|
||||
8. **包构建**:使用 `dpkg-deb` 构建最终的 .deb 包
|
||||
|
||||
## 4. 设计原理
|
||||
|
||||
- 使用模板和脚本实现灵活的构建过程
|
||||
- 遵循 Debian 打包规范
|
||||
- 确保软件及其依赖能在目标系统正确安装和运行
|
||||
Reference in New Issue
Block a user