Tuesday, April 23, 2024
 Popular · Latest · Hot · Upcoming
17
rated 0 times [  17] [ 0]  / answers: 1 / hits: 11923  / 2 Years 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



[...]
libboost-dbg
libboost-dev
libboost-doc
[...]
libboost-all-dev
[...]


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

 Answers
0

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 ddebs.ubuntu.com. (See: Debug Symbol Packages) -dbg packages that do exist are usually simply carried over from Debian.



Instructions



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:



usr/bin/
usr/lib/


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



/usr/share/doc/
/usr/share/icons/
/usr/share/foo/
/usr/share/locale/


And for foo-dev:



/usr/include/
/usr/lib/pkgconfig
/usr/lib/*.so


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
override_dh_strip:
dh_strip --dbg-package=foo-dbg



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

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

Location: New Caledonia
Member since Thu, Mar 23, 2023
1 Year ago
;