Sunday, September 24, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  17] [ 0]  / answers: 1 / hits: 11836  / 1 Year ago, mon, august 29, 2022, 4:03:53

I'm writing an Ubuntu package for a package which essentially provides a number of libraries and headers which then be used to build other software. The package also breaks up in smaller subpackages which are interdependent; in this sense the package is quite similar to boost.

I noticed that packages like boost provide


but nothing that goes by the name boost or libboost.

  • What is the idea behind this?

  • What are the purposes of the -dbg, -dev, and -doc packages?

  • Are there any instructions provided on how to write build files for those packages?

More From » packaging


Idea & Purpose

The main reason for separating out these different packages has to do with disk space and download speed. In particular, it is a big concern for mirror space since it means distributing multiple copies of the data. By making the foo-common, foo-data, or foo-doc packages Architecture: all, we only keep one copy of of the data in the archive instead of having it copied with each architecture (e.g. i386, amd64, ect...). Debugging symbols are not needed by most users and just end up making the package download take longer.

For packages in the official Ubuntu archives, there is actually no reason to create -dbg packages manually. The build machines automatically strip out the debugging symbols and put them into -dbgsym packages hosted on (See: Debug Symbol Packages) -dbg packages that do exist are usually simply carried over from Debian.


As for implementation, take a look at this question:

Briefly, new stanzas need to be created in debian/control for each package. Then debian/foo-*.install files need to be created as well. This will allow dh_install to put the right contents into the right packages.

The foo.install for the main binary package might look like:


foo-common.install, foo-data.install, foo-doc.install, or whatever:


And for foo-dev:


Creating the foo-dbg package requires editing debian/rules as normally dh_strip will strip out debugging symbols. So we need to override that behavior:

.PHONY: override_dh_strip
dh_strip --dbg-package=foo-dbg

[#35822] Tuesday, August 30, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 291
Total Questions: 135
Total Answers: 117

Location: New Caledonia
Member since Thu, Mar 23, 2023
7 Months ago