Differences between revisions 1 and 66 (spanning 65 versions)
Revision 1 as of 2006-07-22 22:52:27
Size: 33
Editor: EddyPetrisor
Comment: most popular search term should be occupied
Revision 66 as of 2019-08-18 01:03:11
Size: 8495
Editor: PaulWise
Comment: fix the word
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
#REDIRECT HowToPackageForDebian #language en
~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: English - [[it/Packaging|Italiano]] - [[sv/Packaging|Svenska]] - [[ru/Packaging|Русский]]-~
----

Debian packages are maintained by a community of Debian Developers and volunteers. This page contains 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 [[PackageManagement|package management]] pages instead.

<<TableOfContents()>>

== What is a "package"? ==

A Debian package is a collection of files that allow for applications or libraries to be distributed via the Debian package management system. The aim of packaging is to allow the automation of installing, upgrading, configuring, and removing computer programs for Debian in a consistent manner.

A Debian package consists of one source package component and one or more binary package components. Debian Policy requires that these package files are built with a particular structure and format but there are many methods of arriving at these files.

{{{#!wiki warning
Only packages that are compliant with Debian policy will be accepted into the archive. Manually constructed binary packages (.deb) that are not built from a source package will never be accepted.
}}}

Source packages not only contain the upstream source distribution and options for the Debian package build system but also lists of run-time dependencies and conflicting packages, a machine-readable description of copyright and license information, initial configurations, etc.

While the goal of packaging is to produce these files, for the most part, you will be working with the unpacked source in a directory. The source package (.dsc) and binary packages (.deb) will be built for you by tools such as dpkg-buildpackage.

You can read more about the anatomy of [[DebianPackage|binary packages]] or [[SourcePackage|source packages]] on their wiki pages.

== Introduction to Debian Packaging ==

{{{#!wiki debian
If you're just starting out with Debian packaging, please read the official documentation first:

 * [[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.

}}}

To get a good grounding in 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.
  * if you are new to debian, then [[/Pre-Requisites|setting up debian unstable system]] can help you setup a development environment.

Now that you have seen the basics, it is highly recommended 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.

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.

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.

== Packaging Procedures ==

=== Types / Formats ===

 * [[AndroidTools]] - android tools
 * [[Fonts/PackagingPolicy|Fonts]] - packages
 * [[https://go-team.pages.debian.net/packaging.html|Go]] - libraries and applications
 * [[http://pkg-haskell.alioth.debian.org/haskell-policy/|Haskell]] - libraries (outdated, updating is listed as TODO item on [[Haskell]])
 * [[Java/Packaging|Java]] - libraries and applications
 * [[Javascript/Policy|JavaScript]] - libraries and applications
 * [[http://pkg-lua.alioth.debian.org/policy.html|Lua]] - modules
 * [[Teams/DebianMonoGroup/NewPackage|Mono]] - libraries and applications
 * [[Teams/DebianMozExtTeam#Common_practices|Mozilla Extensions]] - XUL extensions
 * [[http://pkg-ocaml-maint.alioth.debian.org/ocaml_packaging_policy.html/index.html|OCaml]] - libraries
 * [[Python/Packaging|Python]] - modules and applications
 * [[Teams/Ruby/Packaging|Ruby]] - modules and applications
 * [[RPM]] - repackaging RPM packages as .deb packages

=== Tools ===

 * [[UsingQuilt|Quilt]] - patch management
 * [[PackagingWithDarcs|Darcs]] - version control
 * [[PackagingWithGit|Git]] - version control
 * [[Packaging/sbuild|sbuild]] - 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

=== Advanced Procedures ===

 * [[AdvancedBuildingTips|some advanced building tips]]
 * [[Courses2005/BuildingWithoutHelper|How to make a Debian package without using a helper]]
 * [[/HackingDependencies|hacking dependencies]]

=== Useful Pages ===

 * [[PackagingFAQ|Packaging FAQ]]
 * [[Mentors|Mentors]] sponsors/mentors for packages in specific areas of Debian
 * [[Renaming_a_Package|Renaming a Package]]
 * [[PackageTransition|Package Transition]]
 * [[Adding and removing diversions]]
 * BzrBuildpackage/DesignIdeas
 * [[PkgSplit|How to split a package into smaller packages]]
 * [[Repackage_srcrpm]] - creating a proper Debian source package while referencing the src.rpm package
 * [[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]]
 * [[Package]]
 * [[AutomaticPackagingTools|Automatic Packaging Tools]]
 * [[DEX|DEX]] - improving Debian and its derivatives through cross-community teamwork
 * [[Repacking]] - Collecting information about repacking

== Training Sessions ==

=== From Debian Women ===

[[DebianWomen]] organise interesting [[DebianWomen/Projects/Events/TrainingSessions|training sessions]].


== Other Information ==

=== 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]]
 * [[http://feeding.cloud.geek.nz/posts/whats-in-a-debian-directory/|What's in a debian/ directory]] - detailed worked example
 * [[https://github.com/dod38fr/config-model/wiki/Managing-Debian-packages-with-cme|Managing Debian package files with cme]]
 * [[http://packaging.ubuntu.com/|Ubuntu Packaging Guide]]

=== See also: ===
 * 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

 * AutomakeTransition
 * PackageConfigUpgrade : propose a new way to smoothly handle configuration upgrades during package upgrades
 * DataPackages
----
CategoryPackaging
----

Translation(s): English - Italiano - Svenska - Русский


Debian packages are maintained by a community of Debian Developers and volunteers. This page contains 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 pages instead.

What is a "package"?

A Debian package is a collection of files that allow for applications or libraries to be distributed via the Debian package management system. The aim of packaging is to allow the automation of installing, upgrading, configuring, and removing computer programs for Debian in a consistent manner.

A Debian package consists of one source package component and one or more binary package components. Debian Policy requires that these package files are built with a particular structure and format but there are many methods of arriving at these files.

Only packages that are compliant with Debian policy will be accepted into the archive. Manually constructed binary packages (.deb) that are not built from a source package will never be accepted.

Source packages not only contain the upstream source distribution and options for the Debian package build system but also lists of run-time dependencies and conflicting packages, a machine-readable description of copyright and license information, initial configurations, etc.

While the goal of packaging is to produce these files, for the most part, you will be working with the unpacked source in a directory. The source package (.dsc) and binary packages (.deb) will be built for you by tools such as dpkg-buildpackage.

You can read more about the anatomy of binary packages or source packages on their wiki pages.

Introduction to Debian Packaging

If you're just starting out with Debian packaging, please read the official documentation first:

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

Advanced Procedures

Useful Pages

Training Sessions

From Debian Women

DebianWomen organise interesting training sessions.

Other Information

See also:


CategoryPackaging