Debian 维护者指导

青木 修

摘要

本教程文档面向普通 Debian 用户和未来的开发者,描述了使用 debmake 命令构建 Debian 软件包的方法。

它注重描述现代的打包风格,同时提供了许多简单的示例。

  • POSIX shell 脚本打包
  • Python3 脚本打包
  • C 和 Makefile/Autotools/CMake
  • 含有共享库的多个二进制软件包的打包,等等。

本篇“Debian 维护者指导”可看作“Debian 新维护者手册”的继承文档。


目录

前言
1. 概览
2. 预备知识
2.1. Debian 社区的工作者
2.2. 如何做出贡献
2.3. Debian 的社会驱动力
2.4. 技术提醒
2.5. Debian 文档
2.6. 帮助资源
2.7. 仓库状况
2.8. 贡献流程
2.9. Novice contributor and maintainer
3. 工具的配置
3.1. 电子邮件地址
3.2. mc
3.3. git
3.4. quilt
3.5. devscripts
3.6. pbuilder
3.7. git-buildpackage
3.8. HTTP 代理
3.9. 私有 Debian 仓库
4. 简单例子
4.1. 大致流程
4.2. 什么是 debmake?
4.3. 什么是 debuild?
4.4. 第一步:获取上游源代码
4.5. 第二步:使用 debmake 产生模板文件
4.6. 第三步:编辑模板文件
4.7. 第四步:使用 debuild 构建软件包
4.8. 第三步(备选):修改上游源代码
4.8.1. 使用 diff -u 处理补丁
4.8.2. 使用 dquilt 处理补丁
4.8.3. 使用 dpkg-source --commit 处理补丁
5. 基本内容
5.1. 打包工作流
5.1.1. The debhelper package
5.2. 软件包名称和版本
5.3. 本土 Debian 软件包
5.4. debian/rules
5.4.1. dh
5.4.2. 简单的 debian/rules
5.4.3. 自定义 debian/rules
5.4.4. debian/rules 中的变量
5.4.5. Reproducible build
5.5. debian/control
5.5.1. Split of the Debian binary package
5.5.1.1. debmake -b
5.5.1.2. Package split scenario and examples
5.5.1.3. The library package name
5.5.2. Substvar
5.5.3. binNMU safe
5.6. debian/changelog
5.7. debian/copyright
5.8. debian/patches/*
5.8.1. dpkg-source -x
5.8.2. dquilt and dpkg-source
5.9. debian/upstream/signing-key.asc
5.10. debian/watch and DFSG
5.11. Other debian/*
5.12. Customization of the Debian packaging
5.13. Recording in VCS (standard)
5.14. Recording in VCS (alternative)
5.15. Building package without extraneous contents
5.15.1. Fix by debian/rules clean
5.15.2. Fix using VCS
5.15.3. Fix by extend-diff-ignore
5.15.4. Fix by tar-ignore
5.16. 上游构建系统
5.16.1. Autotools
5.16.2. CMake
5.16.3. Python distutils
5.17. Debugging information
5.17.1. New -dbgsym package (Strech 9.0 and after)
5.17.2. Old -dbg package (Jessie 8.0 or before)
5.18. 库软件包
5.18.1. Library symbols
5.18.2. Library transition
5.19. 多体系结构
5.19.1. The multiarch library path
5.19.2. The multiarch header file path
5.19.3. The multiarch *.pc file path
5.20. Compiler hardening
5.21. debconf
5.22. Continuous integration
5.23. Bootstrapping
5.24. Bug report
6. debmake options
6.1. Shortcut options (-a, -i)
6.1.1. Python module
6.2. Upstream snapshot (-d, -t)
6.3. debmake -cc
6.4. debmake -k
6.5. debmake -j
6.6. debmake -x
6.7. debmake -P
6.8. debmake -T
7. Tips
7.1. debdiff
7.2. dget
7.3. debc
7.4. piuparts
7.5. debsign
7.6. dput
7.7. bts
7.8. git-buildpackage
7.8.1. gbp import-dscs --debsnap
7.9. Upstream git repository
7.10. chroot
7.11. 新的 Debian 版本
7.12. 新上游版本
7.12.1. uupdate + tarball
7.12.2. uscan
7.12.3. gbp
7.12.4. gbp + uscan
7.13. 3.0 source format
7.14. CDBS
7.15. Build under UTF-8
7.16. UTF-8 转换
7.17. Upload orig.tar.gz
7.18. 跳过的上传
7.19. 高级打包
7.20. Other distros
7.21. Debug
8. More Examples
8.1. Cherry-pick templates
8.2. No Makefile (shell, CLI)
8.3. Makefile (shell, CLI)
8.4. setup.py (Python3, CLI)
8.5. Makefile (shell, GUI)
8.6. setup.py (Python3, GUI)
8.7. Makefile (single-binary)
8.8. Makefile.in + configure (single-binary)
8.9. Autotools (single-binary)
8.10. CMake (single-binary)
8.11. Autotools (multi-binary)
8.12. CMake (multi-binary)
8.13. Internationalization
8.14. Details
A. debmake(1) manpage
A.1. NAME
A.2. SYNOPSIS
A.3. DESCRIPTION
A.3.1. optional arguments:
A.4. EXAMPLES
A.5. HELPER PACKAGES
A.6. CAVEAT
A.7. DEBUG
A.8. 作者
A.9. LICENSE
A.10. 参见