How to build Debian packages


Published on

Talk about Debian, Packaging and more..

Published in: Technology
1 Comment
  • As a management instructor I appreciate viewing the function of others. This is probably the greatest demonstration on planning I've viewed.
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

How to build Debian packages

  1. 1. How to build Debian packages? Talk about Debian, packaging and more... Kartik Mistry Magnet Technologies, Mumbai
  2. 2. What we will learn? <ul><li>About me! </li></ul><ul><li>What is Debian? What are packages? </li></ul><ul><li>Why Debian? Why .deb? </li></ul><ul><li>Building Packages </li></ul><ul><li>Your own packages in Debian aka How to contribute? </li></ul><ul><li>Tips & Tricks </li></ul>
  3. 3. About me! <ul><li>Debian user since 2004 AD </li></ul><ul><li>In NM queue .. </li></ul><ul><li>Leading Gujarati localization team since 2004 </li></ul><ul><li>D-I translator for Gujarati </li></ul>
  4. 4. What is Debian? Why Debian? <ul><li>Debian GNU/Linux is one of the oldest Linux distribution </li></ul><ul><li>Known for stability, security and easy upgrades .. </li></ul><ul><li>Best package management system </li></ul><ul><li>Debian Social Contract, DFSG, Debian Policies </li></ul><ul><li>Most Important: Debian Community ! </li></ul>
  5. 5. Packages .. <ul><li>Package makes life easy! </li></ul><ul><li>Debian packages are .deb </li></ul><ul><li>Package management is the key </li></ul><ul><li>dpkg </li></ul><ul><li>apt-get power </li></ul>
  6. 6. Building Debian Packages The Debian design process is open to ensure that the system is of the higest quality and that it reflects the needs of the user community -- The Debian Linux Manifesto
  7. 7. The basic stuff <ul><li>Binary and source packages </li></ul><ul><li>Debian package is, </li></ul>.dsc .diff .orig.tar.gz
  8. 8. Look inside the package .. <ul><li>All changes made by Debian stays at debian/ directory </li></ul><ul><li>No touch to upstream original! </li></ul><ul><li>Debian patches are in debian/patches </li></ul><ul><li>Use of dpatch or quilt </li></ul>
  9. 9. Starting with dh_make <ul><li>dh_make tool </li></ul><ul><li>Single, Library, Multibinary, Kernel package </li></ul><ul><li>Inspecting debian/ directory </li></ul>
  10. 10. debian/* <ul><li>debian/changelog </li></ul><ul><li>debian/control </li></ul><ul><li>debian/copyright </li></ul><ul><li>debian/compact </li></ul>
  11. 11. debian/rules <ul><li>We know that debian/rules ! </li></ul><ul><li>Basically Makefile </li></ul><ul><li>configure, build, install, binary-indep, binary-arch, binary, clean </li></ul>
  12. 12. cdbs <ul><li>Common Debian Build System </li></ul><ul><li>Magic stuffs! </li></ul>
  13. 13. Building package finally! <ul><li>Extracting the existing package: dpkg-source -X *.dsc </li></ul><ul><li>dpkg-buildpackage -rfakeroot -uc -us -sa </li></ul>
  14. 14. Practical! <ul><li>Small demo of package building .. </li></ul>
  15. 15. pbuilder <ul><li>pbuilder = personal builder </li></ul><ul><li>Your package must build on unstable, and you are running stable/testing version .. </li></ul><ul><li>chroot system, works with Ubuntu/Knoppix </li></ul>
  16. 16. Checking packages <ul><li>Quality matters!! </li></ul><ul><li>Lintian and Linda tools </li></ul><ul><li>Install it, it works? Check on different machines </li></ul><ul><li>Debian Policy </li></ul><ul><li>Small silly things .. </li></ul>
  17. 17. Your own packages in Debian .. <ul><li>Only Debian Developers are allowed to upload packages in Debian FTP </li></ul><ul><li>Any one can maintain packages without being Debian Developer </li></ul><ul><li>But, Where to upload? </li></ul>
  18. 18. <ul><li>Mentoring NM people </li></ul><ul><li>Finding Sponsors </li></ul><ul><li>Sponsors may have different criteria, so look for it .. </li></ul>
  19. 19. GPG Key <ul><li>GPG Key </li></ul><ul><li>Keysigning Party </li></ul><ul><li>Find Developer to sign your key! (Not neccessary) </li></ul>
  20. 20. Tips & Tricks <ul><li>Must lintian and linda error free </li></ul><ul><li>Look for small things </li></ul><ul><li>Your package really works? </li></ul><ul><li>Copyright is important </li></ul><ul><li>Learn from mistakes </li></ul>
  21. 21. Resources <ul><li> contains almost everything! </li></ul><ul><li> </li></ul><ul><li>Debian New Maitainer Guide </li></ul><ul><li>Debian Policy Manual </li></ul><ul><li>Debian Developer Reference </li></ul><ul><li>#debian-mentors, #debian-devel on </li></ul>
  22. 22. Questions ?
  23. 23. Thanks! <ul><li>Kartik Mistry </li></ul><ul><li>Blog : </li></ul><ul><li>Contact : kartik.mistry at </li></ul><ul><li>This Presentation/Notes: </li></ul>