Differences between revisions 41 and 122 (spanning 81 versions)
Revision 41 as of 2013-12-24 19:44:11
Size: 6164
Editor: ?SteveLangasek
Comment: packagingtutorial was bad practice and has been removed.
Revision 122 as of 2022-06-29 10:11:29
Size: 11298
Editor: nodiscc
Comment: update link to redirected page
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[it/Packaging|Italiano]] - [[sv/Packaging|Svenska]] -~ ##For Translators - to have a constantly up to date translation header in you page, you can just add a line like the following (with the comment's character at the start of the line removed)
## <<Include(Packaging, ,from="^##TAG:TRANSLATION-HEADER-START",to="^##TAG:TRANSLATION-HEADER-END")>>
##TAG:TRANSLATION-HEADER-START
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[Packaging|English]] - [[es/Packaging|Español]] - [[pt_BR/Packaging|Português (Brasil)]] - [[it/Packaging|Italiano]] - [[sv/Packaging|Svenska]] - [[ru/Packaging|Русский]]-~
##TAG:TRANSLATION-HEADER-END
Line 4: Line 8:
{{attachment:Portal/IDB/icon-wiki-portal.png}}

Welcome to [[Debian]]'s '''packaging portal'''.

{{attachment:Portal/IDB/icon-template-32x32.png}} This portal is about ''' information relevant to developers wishing to package [[Software|software]] for Debian.''' If you were looking for information on installing and removing packages from your Debian system, see the [[PackageManagement|package management]] page.

Debian [[Software|packages]] are maintained by a community of Debian Developers and volunteers.
Line 6: Line 18:
When you seriously think about packaging as a newcomer to Debian, please read the official documentation:

 * [[http://www.debian.org/doc/manuals/maint-guide/index.en.html|the Debian New Maintainers' Guide]] -- tutorial for simple package
 * [[http://www.debian.org/doc/devel-manuals#packaging-tutorial|Debian Packaging Tutorial]] -- slides-based overview of Debian packaging
 * [[http://www.debian.org/doc/debian-policy/|Debian Policy]] -- guiding rules
 * [[http://www.debian.org/doc/manuals/developers-reference/|Developers Reference]] -- advanced guide etc.
If you're just starting out with Debian packaging, please read the official documentation first:<<BR>>
[[https://www.debian.org/doc/manuals/debmake-doc/index.en.html|Guide for Debian Maintainers]] -- describes the building of a Debian package with many examples <<BR>>
[[https://www.debian.org/doc/devel-manuals#packaging-tutorial|Debian Packaging Tutorial]] -- slides-based overview of Debian packaging<<BR>>
[[https://www.debian.org/doc/debian-policy/|Debian Policy]] -- guiding rules<<BR>>
[[https://www.debian.org/doc/manuals/developers-reference/|Developers Reference]] -- advanced guide etc.<<BR>>
[[https://mentors.debian.net/intro-maintainers/| Introduction for maintainers: How will my package get into Debian?]]<<BR>>
Line 14: Line 25:

----
Line 20: Line 29:
== Why Packaging == ----
Line 22: Line 31:
Whether you want
 * to install some programs or data on several computers
 * to have consistent and deterministic versioning
 * the packaging system to take care of updates
 * to help the Debian project. (see [[http://www.debian.org/devel/wnpp/|Work-Needing and Prospective Packages]])

== What is a "package"? ==

There are two kinds of packages: "binary" (.deb) and "source" (.dsc) packages. There are tools (e.g. cpack) that are able to generate "binary" packages but such packaging is ad-hoc (build-system specific) and fragile. Such packages are more likely to fail to operate when the target system diverges from the original environment they were built in.

"source" packages in turn can be built to produce "binary" packages on any other machine and architecture. In a standardized, language and underlying build-system (make vs cmake) agnostic form they provide all the necessary information about build and run-time dependencies and conflicts, a standardized description of copyright and license information, an initial configuration, etc. That is why "binary" packages alone, without the "source" packages originating them, can not be submitted for inclusion into an official Debian distribution.

Therefore ''Packaging'' in the Debian world is primarily concerned with "source" packages. "binary" packages are just a product of such work.
Line 38: Line 34:
If you need to create rapidly a package, use [[DebianPkg:equivs]]:
  * read first [[CreateDummyPackage|how to create an empty package]]
  * then read how to create a [[/Files|package with some files]]
To get a good grounding in Debian packaging:
  * first read the excellent [[Packaging/Intro|introduction to Debian Packaging]] to build a package from scratch,
  * you can also look at the [[BuildingTutorial|building tutorial]] to apply changes to an existing package.
  * if you are new to debian, then [[/Pre-Requisites|setting up debian unstable system]] can help you setup a development environment.
  * [[/Learn|Learn Debian Packaging in steps]] for new to advanced packaging levels (by JavaScript team).
Line 42: Line 40:
If you prefer to gain real knowledge about Debian packaging:
  * first read the excellent [[IntroDebianPackaging|introduction to Debian Packaging]] to build a package from scratch,
  * you can also look at the [[BuildingTutorial|building tutorial]] to apply changes to an existing package.
Now that you have seen the basics, it is highly recommended that you read some real stuff:
Line 46: Line 42:
Now that you have seen the basics, it is highly recomanded that you read some real stuff:
* [[http://www.debian.org/doc/manuals/maint-guide/index.en.html|the Debian New Maintainers' Guide]] describes the building of a Debian package to ordinary Debian users.
 * [[http://www.debian.org/doc/debian-policy/|the Debian Policy]] includes technical requirements that each package must satisfy.
 * [[https://www.debian.org/doc/manuals/debmake-doc/index.en.html|Guide for Debian Maintainers]] describes the building of a Debian package with many examples
 (This replaces outdated [[https://www.debian.org/doc/manuals/maint-guide/index.en.html|the Debian New Maintainers' Guide]] )
 * [[https
://www.debian.org/doc/debian-policy/|the Debian Policy]] includes technical requirements that each package must satisfy.
 * More than anything, please also check the source code of existing recently updated packages of similar kinds.
Line 50: Line 47:
Then, if you are looking for answers, you can come back here or read: 
  * the interesting pdf file included in the package [[DebianPkg:packaging-tutorial|packaging-tutorial]].
  * [[http://www.debian.org/doc/manuals/developers-reference/|The Developers Reference]] provides an overview of the recommended procedures and the available resources for Debian developers.
Then, if you are looking for answers, you can come back here or read:
  * the interesting pdf file included in the package [[DebianPkg:packaging-tutorial|packaging-tutorial]] or you can read it [[https://www.debian.org/doc/manuals/packaging-tutorial/|here]].
  * [[https://www.debian.org/doc/manuals/developers-reference/|The Developers Reference]] provides an overview of the recommended procedures and the available resources for Debian developers.
Line 54: Line 51:
== Debian Derivatives ==

Please note that some Debian Derivatives resources may be quite useful too.
 * the [[http://developer.ubuntu.com/packaging/html/|Ubuntu Packaging Guide]]

Learn more about the [[DEX|DEX project]]
What not to do:
  * There are no shortcuts to learning good packaging practices. Avoid [[DebianPkg:equivs]] which is only useful for building trivial metapackages and does not teach you anything about packaging.
Line 62: Line 55:
== Advanced Packaging Procedures == == Packaging Procedures ==
Line 64: Line 57:
=== from Debian Women === === Types / Formats ===
Line 66: Line 59:
[[DebianWomen]] organise interesting [[DebianWomen/Projects/Events/TrainingSessions|training sessions]].
Those are about packaging :
 * [[AndroidTools]] - Android tools
 * [[Fonts/PackagingPolicy]] - Fonts
 * [[https://go-team.pages.debian.net/packaging.html]] - Golang libraries and applications
 * [[Teams/DebianHaskellGroup]] - Haskell environment and libraries
 * [[Java/Packaging]] - Java libraries and applications
 * [[Javascript/Policy]] - JavaScript libraries and applications
 * [[https://salsa.debian.org/lua-team]] - Lua modules
 * [[Teams/DebianMonoGroup/NewPackage]] - Mono libraries and applications
 * [[Teams/DebianMozExtTeam]] - Mozilla extensions
 * [[Teams/OCamlTaskForce]] - OCaml libraries
 * [[Python/Packaging]] - Python modules and applications
 * [[Teams/Ruby/Packaging]] - Ruby modules and applications
 * [[Teams/RustPackaging]] - Rust crates and applications
 * [[RPM]] - repackaging RPM packages as .deb packages
Line 69: Line 74:
 * [[AdvancedBuildingTips|some advanced building tips]]
 * [[Courses2005/BuildingWithoutHelper|How to make a Debian package without using a helper]]
 * [[/HackingDependencies|hacking dependencies]]
Line 73: Line 75:
=== See also ===
 * [[UsingQuilt]]
 * [[PackagingFAQ]]
 * [[Renaming_a_Package]]
 * PackageTransition
 * [[Adding and removing diversions]]
=== Tools ===

 * [[PackagingWithDarcs]] - Darcs version control
 * [[Packaging/debspawn]] - debspawn clean build tool
 * [[PbuilderTricks]] - Pbuilder clean build tool
 * [[SecurePbuilder]] - Secure Pbuilder builder tool
 * [[Packaging/ruby-team-meta-build]] - build scripts used by ruby team, helps testing reverse dependencies easily

=== Suggested tools to create an environment for packaging ===

To create a packaging environment, you will need to install and learn how to use the following tools:

 * [[Packaging/sbuild]], clean build tool; install the DebianPkg:sbuild package.

 sbuild is used in the Debian build service ([[buildd]]). See also [[sbuild]].

 * [[UsingQuilt|Quilt]], for patches management; install the DebianPkg:quilt package.

 * [[PackagingWithGit]], for Git management packaging; install the DebianPkg:git-buildpackage package.

 * [[piuparts]], for .deb package installation, upgrading, and removal testing tool; install the DebianPkg:piuparts package.

 * [[Lintian]], a comprehensive package checker for Debian packages; install the DebianPkg:lintian package.

 * Devscripts - scripts to make the life of a Debian Package maintainer easier; install the DebianPkg:devscripts package.

 * [[https://people.debian.org/~eriberto/README.package-tests.html|Autopkgtest]] - run tests found in Debian source packages; install the DebianPkg:autopkgtest package.

 * blhc - search for missing hardening flags; install the DebianPkg:blhc package. See [[https://eriberto.pro.br/blog/2015/09/07/debian-how-to-use-blhc-to-solve-hardening-issues-when-packaging/|Debian: how to use blhc to solve hardening issues when packaging]].

 * dh-make - converts source archives into Debian package source; install the DebianPkg:dh-make package.

 * [[cowbuilder]] - really handy to build your project for many distributions at once; install the DebianPkg:cowbuilder package.

Okay, now you have an environment ready to start learning how to package for Debian!

=== Advanced Procedures ===

 * [[AdvancedBuildingTips]] - Advanced building tips
 * [[Courses2005/BuildingWithoutHelper]] - How to make a Debian package without using a helper
 * [[/HackingDependencies]] - hacking dependencies
 * [[/ComplexWebApps]] - Create debian packages for complex web applications

=== Useful Pages ===

 * [[PackagingFAQ]] - Packaging FAQ
 * [[Mentors]] - sponsors/mentors for packages in specific areas of Debian
 * [[Renaming_a_Package]] - Renaming a Package
 * [[PackageTransition]] - Package Transition
 * [[DpkgDiversions]]
Line 80: Line 126:
 * PackagingWithDarcs
 * PackagingWithGit
 * PbuilderTricks
* [[PkgSplit|How to split a package into smaller packages]]
 * [[PkgSplit]] - How to split a package into smaller packages
Line 85: Line 128:
 * [[RPM]] - Converting a .RPM into .DEB with alien - generally leads to bad results
 * DebugPackage
 * [[PackageArchitectureAlmostAny|Creating package without some particular architectures]] - for easy porting
 * [[Python/Packaging]]
 * ConfigPackages
 * EditingBinaryPackageMetadata
 * [[DebugPackage]] - Debug Package
 * [[PackageArchitectureAlmostAny]] - Creating package without some particular architectures for easy porting
 * [[ConfigPackages]] - Config Package
 * [[DpkgConffileHandling]] - Gracefully Handling conffiles
 * [[EditingBinaryPackageMetadata]] - Editing Binary Package Metadata
 * [[SoftwarePackaging]] - Software Packaging
 * [[SponsorChecklist]] - Sponsor Checklist
 * [[HowToPackageForDebian]] - How to package for Debian
 * [[AutomaticPackagingTools]] - Automatic Packaging Tools
 * [[DEX]] - improving Debian and its derivatives through cross-community teamwork
 * [[Repacking]] - Collecting information about repacking
 * AutomakeTransition
 * [[PackageConfigUpgrade]] - propose a new way to smoothly handle configuration upgrades during package upgrades
 * DataPackages
 * [[Diagrams]] - packaging related diagrams and sketches
 * [[WNPP]] - ''Work-Needing and Prospective Packages'' list packages that have been requested for packaging, or need a new maintainer
 * [[Salsa]] - collaborative development server for Debian based on the GitLab software
 * [[CheckInstall]] - Build binary .deb packages from installation scripts (`make install`...)
 * [[SimpleBackportCreation]] - Backport a DebianUnstable package to DebianStable
 * [[SourceOnlyUpload]] - Source-only are uploads to the [[Services/Debian Archive|Debian archive]] that do not include a binary build of the Debian package
Line 92: Line 149:
=== Useful pages ===
 * SoftwarePackaging
 * SponsorChecklist
 * SecurePbuilder
 * [[HowToPackageForDebian|how to package for Debian]]
 * [[Package]]
== Training Sessions ==
Line 99: Line 151:
== other informations == === From Debian Women ===
Line 101: Line 153:
=== External useful links ===
 * http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Debian-Binary-Package-Building-HOWTO.html
 * http://qref.sourceforge.net/Debian/reference/ch-package.en.html
 * http://www.debian.org/doc/manuals/apt-howto/ and package apt-howto
 * http://www.debian.org/devel/wnpp/prospective : requested packages, and packages being worked on.
 * [[http://people.connexer.com/~roberto/howtos/debcustomize|Debian Package Customization HOWTO]]
 
[[DebianWomen]] organise [[DebianWomen/Projects/Events/TrainingSessions|training sessions]].


== External links ==

 * https://feeding.cloud.geek.nz/posts/whats-in-a-debian-directory/ - What's in a debian/ directory
 * https://github.com/dod38fr/config-model/wiki/Managing-Debian-packages-with-cme - Managing Debian package files with cme
 * https://packaging.ubuntu.com/ - Ubuntu Packaging Guide
 * https://www.debian.org/doc/manuals/apt-howto/ - APT HOWTO (Obsolete Documentation)
 * https://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/Debian-Binary-Package-Building-HOWTO.html Debian Binary Package Building HOWTO (2005)
 * [[https://about.gitlab.com/blog/2016/10/12/automated-debian-package-build-with-gitlab-ci/|How to build and deploy a Debian Package with GitLab CI]]
 * [[https://github.com/jordansissel/fpm|fpm]] can build .deb packages from various other package formats ([[https://github.com/jordansissel/fpm/wiki/ConvertingGems|rubygems]], [[https://github.com/jordansissel/fpm/wiki/ConvertingPython|pip]], pear, tar, npm, pacman...)
 * [[https://wiki.ubuntu.com/Packaging|Packaging - Ubuntu Wiki]]
 * [[https://www.eyrie.org/~eagle/notes/debian/build-tools.html|Debian build tools - Russ's Debian Notes]]
 * [[https://www.eyrie.org/~eagle/notes/debian/scripts.html|Packaging Scripts for Debian - Russ's Debian Notes]]
Line 110: Line 170:
 * http://www-128.ibm.com/developerworks/linux/library/l-debpkg.html : creating debian packages - high-level description of debian packaging .
 * WikiPedia:List_of_open-source_software_packages
 * [[http://www.debian-administration.org/articles/336]] Rolling your own debian packages.
 * [[http://vcs-pkg.org/|VCSPackaging]]
 * Autobuilding non-free packages: http://article.gmane.org/gmane.linux.debian.devel.announce/997
Line 116: Line 171:
 * AutomakeTransition
 * PackageConfigUpgrade : propose a new way to smoothly handle configuration upgrades during package upgrades
 * DataPackages
 * [[https://www.debian-administration.org/articles/336|Debian adminstration - Rolling your own Debian packages (part 1)]]
 * [[https://lists.debian.org/msgid-search/20061129152824.GT2560@mails.so.argh.org|Autobuilding non-free packages]]
 * [[https://www.strangeparty.com/2010/06/17/a-debian-packaging-howto/|A Debian packaging howto (2010)]]
 * [[https://raphaelhertzog.com/2010/12/17/do-not-build-a-debian-package-with-dpkg-b/|Avoid a newbie packager mistake: don’t build your Debian packages with dpkg -b]]
 * [[Debuginfod|Debuginfod]] eliminates the need for users to install debuginfo packages in order to debug programs using GDB, systemtap or other tools
 * [[https://sources.debian.org|Browse through the source code of the Debian operating system]]

== Wiki pages ==

All pages related to packaging in Debian:

<<FullSearch(language:en category:CategoryPackaging)>>

Line 120: Line 186:
CategoryPackageManagement CategoryPackaging
----

CategoryPackaging | CategoryPortal

Translation(s): English - Español - Português (Brasil) - Italiano - Svenska - Русский


Portal/IDB/icon-wiki-portal.png

Welcome to Debian's packaging portal.

Portal/IDB/icon-template-32x32.png This portal is about information relevant to developers wishing to package software for Debian. If you were looking for information on installing and removing packages from your Debian system, see the package management page.

Debian packages are maintained by a community of Debian Developers and volunteers.

If you're just starting out with Debian packaging, please read the official documentation first:
Guide for Debian Maintainers -- describes the building of a Debian package with many examples
Debian Packaging Tutorial -- slides-based overview of Debian packaging
Debian Policy -- guiding rules
Developers Reference -- advanced guide etc.
Introduction for maintainers: How will my package get into Debian?


Introduction to Debian Packaging

To get a good grounding in Debian packaging:

Now that you have seen the basics, it is highly recommended that you read some real stuff:

Then, if you are looking for answers, you can come back here or read:

What not to do:

  • There are no shortcuts to learning good packaging practices. Avoid equivs which is only useful for building trivial metapackages and does not teach you anything about packaging.

Packaging Procedures

Types / Formats

Tools

Suggested tools to create an environment for packaging

To create a packaging environment, you will need to install and learn how to use the following tools:

Okay, now you have an environment ready to start learning how to package for Debian!

Advanced Procedures

Useful Pages

Training Sessions

From Debian Women

DebianWomen organise training sessions.

See also:

Wiki pages

All pages related to packaging in Debian:

  1. AdvancedBuildingTips
  2. Alioth
  3. AndroidTools
  4. AutomakeTransition
  5. AutomaticPackagingTools
  6. BuildingFormalBackports
  7. BzrBuildpackage/DesignIdeas
  8. CheckInstall
  9. ConfigPackages
  10. CopyrightReviewTools
  11. Courses2005/BuildingWithoutHelper
  12. CreatePackageFromPPA
  13. DEX
  14. DataPackages
  15. DebianAstro/AstropyPackagingTutorial/Packaging
  16. DebianAstro/AstropyPackagingTutorial/Preparation
  17. DebianDevelopment
  18. DebianMentorsFaq
  19. DebianPackageManagement
  20. DebianPackaging-FAQs
  21. DebugPackage
  22. DevelopersCorner
  23. Diagrams
  24. Distcc
  25. DpkgConffileHandling
  26. DpkgDiversions
  27. EditingBinaryPackageMetadata
  28. EmacspeakTestingGuide
  29. FTBFS
  30. Fonts/PackagingPolicy
  31. Games
  32. Games/Sponsors/Queue
  33. GettingPorted
  34. GitPackaging
  35. GitPackagingSurvey
  36. GitPackagingSurvey/bare debian
  37. GitPackagingSurvey/bare debian monorepo
  38. GitPackagingSurvey/bare template
  39. GitPackagingSurvey/git-debcherry
  40. GitPackagingSurvey/git-debrebase
  41. GitPackagingSurvey/git-dpm
  42. GitPackagingSurvey/manually maintained applied
  43. GitPackagingSurvey/merging
  44. GitPackagingSurvey/modified orig plus further unapplied patches
  45. GitPackagingSurvey/rebasing
  46. GitPackagingSurvey/unapplied
  47. GitPackagingWorkflow
  48. GitPackagingWorkflow/DebConf11BOF
  49. GitSrc
  50. HardeningWalkthrough
  51. HowToPackageForDebian
  52. Java/Packaging
  53. Javascript/Policy
  54. Maintainers
  55. MediaWiki
  56. Mentors
  57. Mingw-W64
  58. NonMaintainerUpload
  59. PackageArchitectureAlmostAny
  60. PackageConfigUpgrade
  61. PackageTransition
  62. Packaging
  63. Packaging/BinaryPackage
  64. Packaging/HackingDependencies
  65. Packaging/Intro
  66. Packaging/Pre-Requisites
  67. Packaging/ruby-team-meta-build
  68. Packaging/sbuild
  69. PackagingFAQ
  70. PackagingWithDarcs
  71. PackagingWithDocker
  72. PackagingWithGit
  73. PbuilderTricks
  74. PkgExim4UserFAQ
  75. Projects/DebSrc3.0
  76. Python/DbgBuilds
  77. Python/LibraryStyleGuide
  78. Python/Policy
  79. RPM
  80. RenamingPackages
  81. Repackage_srcrpm
  82. Repacking
  83. ReproducibleBuilds
  84. Salsa
  85. SecurePbuilder
  86. SimpleBackportCreation
  87. SimplePackagingTutorial
  88. SoftwarePackaging
  89. SponsorChecklist
  90. SystemBuildTools
  91. Teams
  92. Teams/CUPS
  93. Teams/DebianHaskellGroup
  94. Teams/DebianMonoGroup/NewPackage
  95. Teams/DebianMozExtTeam
  96. Teams/Foo2zjs
  97. Teams/MySQL
  98. Teams/MySQL/MySQL-wsrep
  99. Teams/OCamlTaskForce
  100. Teams/Printing
  101. Teams/Ruby/Packaging
  102. UsingQuilt
  103. WNPP
  104. binNMU
  105. debian/patches
  106. debian/watch
  107. piuparts
  108. pt_PT/Teams
  109. sbuild
  110. udeb


CategoryPackaging | CategoryPortal