Advertisement
cc11rocks

Ubuntu Developer Week 8/28/12 - 8/29/12 : Getting started

Aug 29th, 2012
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.57 KB | None | 0 0
  1. http://irclogs.ubuntu.com/2012/08/28/%23ubuntu-classroom.html
  2.  
  3. More specifically: To fix a bug in Ubuntu, you would first get the source code for the package, then work on the fix, document it so it is easy to understand for other developers and users, then build the package to test it.
  4.  
  5. apt-get source <package> `or` bzr branch ubuntu:<package>
  6.  
  7. apport-retrace is a very nice tool - what it does for us is that if a program crashes and it saves a core dump with the current state of the program's used memory, apport-retrace can get us a human-readable output of the crash stacktrace, so the functions which were called in which part of the code, which line, which variables and so on
  8.  
  9. https://wiki.ubuntu.com/DebuggingProgramCrash
  10.  
  11. sudo apt-get install packaging-dev
  12.  
  13. - gnupg – GNU Privacy Guard contains tools you will need to create a cryptographic key with which you will sign files you want to upload to Launchpad.
  14.  
  15. - pbuilder – a tool to do a reproducible builds of a package in a clean and isolated environment.
  16.  
  17. - ubuntu-dev-tools (and devscripts, a direct dependency) – a collection of tools that make many packaging tasks easier.
  18.  
  19. - bzr-builddeb (and bzr, a dependency) – distributed version control with Bazaar, a new way of working with packages for Ubuntu that will make it easy for many developers to collaborate and work on the same code while keeping it trivial to merge each others work.
  20.  
  21. - apt-file provides an easy way to find the binary package that contains a given file.
  22.  
  23. Open ~/.bashrc
  24. add following to end :
  25. export DEBFULLNAME="Clayton Casciato"
  26. export DEBEMAIL="cc11rocks@yahoo.com"
  27.  
  28. gpg --gen-key //GPG stands for GNU Privacy Guard and it implements the OpenPGP standard which allows you to sign and encrypt messages and files. you can sign files with your key so they can be identified as something that you worked on. If you upload a source package to Launchpad, it will only accept the package if it can absolutely determine who uploaded the package. 2048 okay, 4096 best
  29.  
  30. ssh-keygen -t rsa
  31.  
  32. pbuilder allows you to build packages locally on your machine. - The build will be done in a minimal and clean environment. This helps you make sure your builds succeed in a reproducible way, but without modifying your local system. - There is no need to install all necessary build dependencies locally - You can set up multiple instances for various Ubuntu and Debian releases.
  33.  
  34. to set up pbuilder, run "pbuilder-dist <release> create" for quantal : "pbuilder-dist quantal create"
  35.  
  36. https://wiki.ubuntu.com/PbuilderHowto
  37.  
  38. pub 4096R/43CDE61D 2010-12-06
  39. Key fingerprint = 5C28 0144 FB08 91C0 2CF3 37AC 6F0B F90F 43CD E61D
  40. uid Daniel Holbach <dh@mailempfang.de>
  41. sub 4096R/51FBE68C 2010-12-06
  42.  
  43. KEY-ID would be "43CDE61D"
  44. gpg --send-keys <KEY ID>
  45.  
  46. gpg --fingerprint <email@address.com>
  47. Go to https://launchpad.net/~/+editpgpkeys and copy "Key fingerprint" to text box, "Import key"
  48.  
  49. https://help.launchpad.net/YourAccount/ImportingYourPGPKey
  50.  
  51. open https://launchpad.net/~/+editsshkeys open ~/.ssh/id_rsa.pub
  52. copy contents, "Add an SSH key", "import public key"
  53.  
  54. https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair
  55.  
  56. Backup ~/.pnupg dir, copy back if have to reinstall, etc
  57.  
  58. Bazaar is the tool to store code changes in a logical way, to exchange proposed changes and merge them, even if development is done concurrently. It is used for the new Ubuntu Distributed Development method of working with Ubuntu packages.
  59.  
  60. bzr whoami "Clayton Casciato <cc11rocks@yahoo.com>"
  61. bzr launchpad-login cc11rocks
  62.  
  63. https://launchpad.net/~ << Where is redirects you is Lauchpad ID
  64.  
  65. Open "software properties", check "Sources"
  66.  
  67. Run this to check working :
  68. bzr branch ubuntu:hello
  69. cd hello
  70. bzr bd -- -S //build source package from branch the "Debian/Ubuntu way"
  71. ls //Output similiar to "hello_2.8-2.debian.tar.gz hello_2.8-2_source.changes \n hello_2.8-2.dsc hello_2.8.orig.tar.gz"
  72. pbuilder-dist quantal build ../hello_2.8.2.dsc
  73. package available in ~/pbuilder/quantal_result/
  74.  
  75. http://developer.ubuntu.com/packaging/html/
  76.  
  77. Grab source of Ubuntu packages : "pull-lp-source <PackageName>"
  78. what-patch //How package represents patches
  79. if "what-patch" returns "quilt", run "quilt new <MyPatchName>"
  80. quilt edit <FileName>
  81. quilt refresh //Builds patch
  82.  
  83. http://packages.qa.debian.org/$PackageName
  84. http://packages.qa.debian.org/hello #Example for package "hello"
  85.  
  86. PTS - Package Tracking System
  87.  
  88. http://developer.ubuntu.com/packaging/html/
  89. https://wiki.ubuntu.com/UbuntuDevelopment/BugFixingInitiative
  90.  
  91. on PTS, find list of debian bugs in top right corner. See maintainer in top left. Upload history in middle. If find something related to bug working on, see progress and see if there is a patch and if it has been forwarded upstream
  92.  
  93. Two other patch systems (fading out) : dpatch and cdbs-simple-patch
  94.  
  95. Make change, add new changelog entry with dch, build source package
  96.  
  97. debdiff foobar_0.1-1.dsc foobar_0.1-1ubuntu1.dsc //Get pactch that shows the difference between them
  98.  
  99. if it's debian packaging bug, forward it to debian. If affecting debian stable release, forward to Debian. If don't have reason to forward to debian, forward to upstream authors. Can file bug with them and give them created patch
  100.  
  101. If Debian/upstream dev doesn't respond, fix issue directly in Ubuntu
  102. If devs stop responding and/or producing new packages, eventually remove it from Debian/Ubuntu unless someone takes over it
  103.  
  104. Add changelog entry, patch with quilt, generate new source with "debuild -us -us -S", then "debdiff" //-S builds source package only, no binary packages
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement