Debian メンテナー用ガイド

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

This guide was made using the following previous documents as its reference:

  • “Making a Debian Package (AKA the Debmake Manual)”, copyright © 1997 Jaldhar Vyas.
  • “The New-Maintainer’s Debian Packaging Howto”, copyright © 1997 Will Lowe.
  • “Debian New Maintainers’ Guide”, copyright © 1998-2002 Josip Rodin, 2005-2017 Osamu Aoki, 2010 Craig Small, and 2010 Raphaël Hertzog.

The latest version of this guide should be available:

概要

This “Guide for Debian Maintainers” (2024-10-01) tutorial guide describes the building of the Debian package to ordinary Debian users and prospective developers using the debmake command.

This guide focuses on the modern packaging style and comes with many simple examples.

  • POSIX シェルスクリプトのパッケージング
  • Python3 スクリプトのパッケージング
  • Makefile/Autotools/CMake を使う C
  • 共有ライブラリー等を含む複数バイナリーパッケージ

This “Guide for Debian Maintainers” can be considered as the successor to the “Debian New Maintainers’ Guide”.


目次

1. 序文
2. Overview
3. Prerequisites
3.1. People around Debian
3.2. How to contribute
3.3. Debianにおける社会ダイナミクス
3.4. Technical reminders
3.5. Debian documentation
3.6. Help resources
3.7. Archive situation
3.8. Contribution approaches
3.9. Novice contributor and maintainer
4. Tool Setups
4.1. Email setup
4.2. mc setup
4.3. git setup
4.4. quilt setup
4.5. devscripts setup
4.6. sbuild setup
4.7. Persistent chroot setup
4.8. gbp setup
4.9. HTTP proxy
4.10. Private Debian repository
4.11. Virtual machines
4.12. Local network with virtual machines
5. Simple packaging
5.1. Packaging tarball
5.2. Big picture
5.3. What is debmake?
5.4. What is debuild?
5.5. Step 1: Get the upstream source
5.6. Step 2: Generate template files with debmake
5.7. Step 3: Modification to the template files
5.8. Step 4: Building package with debuild
5.9. Step 3 (alternatives): Modification to the upstream source
5.10. Patch by diff -u approach
5.11. Patch by dquilt approach
5.12. Patch by dpkg-source --auto-commit approach
6. Basics for packaging
6.1. Packaging workflow
6.2. debhelper package
6.3. パッケージ名とバージョン
6.4. ネイティブ Debian パッケージ
6.5. debian/rules file
6.6. debian/control file
6.7. debian/changelog file
6.8. debian/copyright file
6.9. debian/patches/* files
6.10. debian/source/include-binaries file
6.11. debian/watch file
6.12. debian/upstream/signing-key.asc file
6.13. debian/salsa-ci.yml file
6.14. Other debian/* files
7. Sanitization of the source
7.1. Fix with Files-Excluded
7.2. Fix with debian/rules clean
7.3. Fix with extend-diff-ignore
7.4. Fix with tar-ignore
7.5. Fix with git clean -dfx
8. More on packaging
8.1. Package customization
8.2. Customized debian/rules
8.3. Variables for debian/rules
8.4. アップストリームソフトウェアの新版更新
8.5. Manage patch queue with dquilt
8.6. Build commands
8.7. Note on sbuild
8.8. Special build cases
8.9. Upload orig.tar.gz
8.10. スキップされたアップロード
8.11. Bug reports
9. 上級パッケージング
9.1. Historical perspective
9.2. Current trends
9.3. Note on build system
9.4. Continuous integration
9.5. Bootstrapping
9.6. Compiler hardening
9.7. Reproducible build
9.8. Substvar
9.9. Library package
9.10. マルチアーチ
9.11. Split of a Debian binary package
9.12. Package split scenario and examples
9.13. Multiarch library path
9.14. Multiarch header file path
9.15. Multiarch *.pc file path
9.16. Library symbols
9.17. Library package name
9.18. Library transition
9.19. binNMU safe
9.20. Debugging information
9.21. -dbgsym package
9.22. debconf
10. Packaging with git
10.1. Salsa repository
10.2. Salsa account setup
10.3. Salsa CI service
10.4. Branch names
10.5. Patch unapplied Git repository
10.6. Patch applied Git repository
10.7. Note on gbp
10.8. Note on dgit
10.9. Patch by gbp-pq approach
10.10. Manage patch queue with gbp-pq
10.11. gbp import-dscs --debsnap
10.12. Note on dgit-maint-debrebase workflow
10.13. Quasi-native Debian packaging
11. Tips
11.1. Build under UTF-8
11.2. UTF-8 変換
11.3. Hints for Debugging
12. Tool usages
12.1. debdiff
12.2. dget
12.3. mk-origtargz
12.4. origtargz
12.5. git deborig
12.6. dpkg-source -b
12.7. dpkg-source -x
12.8. debc
12.9. piuparts
12.10. bts
13. More Examples
13.1. Cherry-pick templates
13.2. No Makefile (shell, CLI)
13.3. Makefile (shell, CLI)
13.4. pyproject.toml (Python3, CLI)
13.5. Makefile (shell, GUI)
13.6. pyproject.toml (Python3, GUI)
13.7. Makefile (single-binary package)
13.8. Makefile.in + configure (single-binary package)
13.9. Autotools (single-binary package)
13.10. CMake (single-binary package)
13.11. Autotools (multi-binary package)
13.12. CMake (multi-binary package)
13.13. Internationalization
13.14. Details
14. debmake(1) manpage
14.1. NAME
14.2. SYNOPSIS
14.3. DESCRIPTION
14.3.1. optional arguments:
14.4. EXAMPLES
14.5. HELPER PACKAGES
14.6. CAVEAT
14.7. DEBUG
14.8. AUTHOR
14.9. LICENSE
14.10. SEE ALSO
15. debmake options
15.1. Shortcut options (-a, -i)
15.2. debmake -b
15.3. debmake -cc
15.4. Snapshot upstream tarball (-d, -t)
15.5. debmake -j
15.6. debmake -k
15.7. debmake -P
15.8. debmake -T
15.9. debmake -x