2010-04-29

   1 [07:01] <dholbach> I've never used classbot before, so I suppose you need to ask questions in #ubuntu-classroom-chat
   2 [07:02] <dholbach> so if you could please join that, I'd appreciate it
   3 [07:02] <dholbach> so who's here for the packaging training session today? :)
   4 [07:03] <dholbach> hum, ajmitch and imbrandon are sure going to know all of this already - maybe we should move back the session by 2h or something?
   5 [07:04] <dholbach> alright, let's do it now then :)
   6 [07:05] <dholbach> so I picked a few "easier" bugs that weren't solved yet, and we'll have a look at them and see what we can do about them
   7 [07:06] <dholbach> while we investigate them I'll try to explain a bit more about the processes in ubuntu, the tools, etc. so the next time you hit a somewhat similar (but different) situation you know what to do, who to talk to, etc
   8 [07:06] <dholbach> if you have any questions, or if I'm wrong or I don't make sense or go to fast or slow, please speak up in #ubuntu-classroom-chat :)
   9 [07:07] <dholbach> alright
  10 [07:07] <dholbach> first of all, let's install a few packages we're going to need:
  11 [07:07] <dholbach>   sudo apt-get install --no-install-recommends libtool ubuntu-dev-tools debhelper cdbs pbuilder build-essential
  12 [07:08] <dholbach>  - build-essential gives you tools to compile packages
  13 [07:09] <dholbach>  - cdbs and debhelper contain scripts that streamline the packaging of applications
  14 [07:09] <dholbach>  - pbuilder is a tool to test-build packages in a sane environment
  15 [07:10] <dholbach>  - ubuntu-dev-tools contains a few useful scripts for developing on Ubuntu (and will pull in devscripts that contains even more useful scripts for developing and packaging :-))
  16 [07:10] <dholbach>  - libtool is required by one of the packages we'll work on later on
  17 [07:10] <dholbach> ok... a tiny bit of preparation now - I'll keep this short
  18 [07:11] <dholbach> Please make sure you have "source package entries" enabled in your /etc/apt/sources.list
  19 [07:11] <dholbach> a    grep deb-src /etc/apt/sources.list    will make sure
  20 [07:12] <dholbach> System → Administration → Software Sources → Software → Sources     will work too
  21 [07:12] <dholbach> (I hope that's what it's called in English, I use a German Ubuntu over here.)
  22 [07:13] <dholbach> next please edit ~/.pbuilderrc
  23 [07:13] <dholbach> (if it's not there, create it)
  24 [07:13] <dholbach> and please add this entry
  25 [07:13] <dholbach> COMPONENTS="main universe multiverse restricted"
  26 [07:13] <dholbach> save it
  27 [07:14] <dholbach> next please edit ~/.bashrc (if you use the bash shell - if you use something else, edit the appropriate settings)
  28 [07:14] <dholbach> and add
  29 [07:14] <dholbach> export DEBFULLNAME='Daniel Holbach'
  30 [07:14] <dholbach> export DEBEMAIL='daniel.holbach@ubuntu.com'
  31 [07:14] <dholbach> please use your own name and email address :-)
  32 [07:14] <dholbach> thanks!
  33 [07:15] <dholbach> next please run
  34 [07:15] <dholbach>   source ~/.bashrc
  35 [07:15] <dholbach> (or restart your terminal session)
  36 [07:15] <dholbach> next please run
  37 [07:15] <dholbach>   sudo pbuilder create
  38 [07:15] <dholbach> (this will take a while)
  39 [07:15] <dholbach> now what did we do
  40 [07:16] <dholbach> 1) we enabled a source package entry for apt so we can get the source of all packages very easily
  41 [07:16] <dholbach> 2) told pbuilder that it should use all components by default
  42 [07:17] <dholbach> 3) gave a lot of packaging tools a bit more information about ourselves (so we don't need to type in our name and email manually all the time)
  43 [07:17] <dholbach> all good up until now?
  44 [07:18] <dholbach> rock and roll
  45 [07:18] <dholbach> ok, here's our first bug
  46 [07:18] <dholbach> https://bugs.launchpad.net/ubuntu/+source/mime-support/+bug/567527
  47 [07:19] <dholbach> arand asks "existing gpg-key is assumed? Or not required in this case?"
  48 [07:19] <dholbach> it's not required, but https://help.ubuntu.com/community/GnuPrivacyGuardHowto is a good guide to get it set up
  49 [07:20] <dholbach> awesome, now we can speak in here too :)
  50 [07:20] <dholbach> thanks again pleia2 :)
  51 [07:20] <pleia2> sure thing :)
  52 [07:20] <dholbach> ok, back to our mime-support bug
  53 [07:20] <dholbach> apparently there's a typo in there: "form" should be "from"
  54 [07:20] <dholbach> let's get the source and find out
  55 [07:21] <dholbach>   apt-get source mime-support
  56 [07:21] <dholbach> it's always good to read and understand the whole bug report before you start... Scott Ritchie found out that it's a problem in cautious-launcher
  57 [07:22] <dholbach> daniel@miyazaki:~/mime-support-3.48$ find . -name cautious-launcher
  58 [07:22] <dholbach> ./debian/cautious-launcher
  59 [07:22] <dholbach> daniel@miyazaki:~/mime-support-3.48$
  60 [07:22] <dholbach> so cautious-launcher is a script that lives in the debian directory of the source, it should be safe for us to just go and edit it and fix the bug (we'll hit a different case later on where it's not that straight-forward)
  61 [07:23] <dholbach> so go and edit the file, and change "form" to "from"
  62 [07:23] <dholbach> <arand> otherwise   grep -r "form an untrused" .  in the source directory would point out the file ;)
  63 [07:23] <dholbach> arand is right :)
  64 [07:24] <dholbach> next we need to document what we just did and update the version number of the package
  65 [07:24] <dholbach> please run
  66 [07:24] <dholbach>   dch -i
  67 [07:24] <dholbach> dch is a very useful script from devscripts that deals with editing debian/changelog - it should have added a new entry for you and added your name and email
  68 [07:25] <dholbach> let's go through the format of the changelog entry real quick
  69 [07:25] <dholbach> first up is the name of the source package
  70 [07:25] <dholbach> then we have the version number, in our case 3.48-1ubuntu2
  71 [07:26] <dholbach> which means: upstream version (released by the software authors) is 3.48, 1st revision in debian, 2nd revision in ubuntu
  72 [07:26] <dholbach> it shows quite well the flow of the software in terms of releases
  73 [07:26] <dholbach> upstream → debian → ubuntu
  74 [07:27] <dholbach> that's something we care about a lot, which is why James Westby's comment in the bug report is important too, he says that it's an ubuntu-specific script, so in this case we don't necessarily need to forward the change to debian or upstream, but maybe we want to send the whole script to them at some stage
  75 [07:28] <dholbach> ok, getting back to changelog entry
  76 [07:28] <dholbach> mime-support (3.48-1ubuntu2) lucid; urgency=low
  77 [07:29] <dholbach> next up is the version of ubuntu we want to upload it to (lucid in our case)
  78 [07:29] <dholbach> and the urgency we can ignore for now - while Launchpad now supports urgency (I've been told) it's rarely used
  79 [07:29] <dholbach> my actual changelog entry looks like this
  80 [07:29] <dholbach> * debian/cautious-launcher: "form" → "from" (LP: #567527)
  81 [07:29] <ubottu> Launchpad bug 567527 in mime-support "Typo in warning dialog" [Low,Triaged] https://launchpad.net/bugs/567527
  82 [07:30] <dholbach> it mentions the file we changed, mentions what we changed and also mentions the launchpad bug in a special format
  83 [07:30] <dholbach> it's important to refer to some kind of discussion of the problem in the changelog, so it's clearer to others later on
  84 [07:31] <dholbach> this special format will also make sure the bug gets automatically closed when we upload the package
  85 [07:31] <dholbach> next please run:
  86 [07:31] <dholbach>    debuild -S -sa -us -uc
  87 [07:31] <dholbach> and if it asks you about some tarball that's missing, please just say "yes" :)
  88 [07:32] <dholbach> that's a packaging mistake we probably shouldn't get ourselves into right now - not our fault
  89 [07:32] <dholbach> did that pan out alright for everybody?
  90 [07:32] <dholbach> did anybody get lost along the way?
  91 [07:33] <dholbach> excellent
  92 [07:34] <dholbach> if you now would please run:
  93 [07:34] <dholbach>  cd ..
  94 [07:34] <dholbach>  debdiff mime-support_3.48-1ubuntu{1,2}.dsc
  95 [07:34] <dholbach> and paste the output to http://paste.ubuntu.com I'd appreciate it
  96 [07:34] <dholbach> and I'll do a quick review
  97 [07:35] <dholbach> <bbordwell> what is the significance of the arguments in this command? debuild -S -sa -us -uc
  98 [07:35] <dholbach> good question bbordwell
  99 [07:36] <dholbach> "-us -uc" will tell debuild (which will pass this on to dpkg-buildpackage) to not try to sign the source package or changes file with your gpg key later on
 100 [07:36] <dholbach> we just do this because we didn't set up the gpg key together
 101 [07:36] <dholbach> (use the link above and you should be fine and can drop -us -uc in the future)
 102 [07:37] <dholbach> "-S" will tell debuild to rebuild the source package as opposed to build the .deb package itself
 103 [07:37] <dholbach> "-sa" is just necessary if you want to upload the source package somewhere
 104 [07:37] <dholbach> so did you post your patches to some pastebin?
 105 [07:37] <dholbach> can I have the links?
 106 [07:38] <dholbach> "debdiff mime-support_3.48-1ubuntu{1,2}.dsc" and paste the output to http://paste.ubuntu.com
 107 [07:39] <dholbach> also: to test-build the package, run    sudo pbuilder build mime-support_3.48-1ubuntu2.dsc
 108 [07:40] <dholbach> a note on pbuilder: it will set up a chrooted environment which will just contain a bare base system, then install all the necessary packages to build that source package, then tear it down again
 109 [07:41] <dholbach> the obvious advantages of this are: the package will be built in a clean and sane environment as opposed to your probably quite modified system and you don't have to install 43217139513 of -dev packages and build-dependencies
 110 [07:41] <dholbach> <bbordwell> Is this what you were looking for? http://paste.ubuntu.com/424428/
 111 [07:41] <dholbach> <arand> http://pastebin.com/dDuWneYc
 112 [07:41] <dholbach> arand: this looks good
 113 [07:42] <dholbach> bbordwell: is that the changes file?
 114 [07:42] <dholbach> bbordwell: can you post the output of the debdiff command?
 115 [07:42] <dholbach>  debdiff mime-support_3.48-1ubuntu{1,2}.dsc
 116 [07:43] <dholbach> (lp:567527) needs to be (LP: #567527) for Launchpad to trigger the closing of the bug
 117 [07:43] <ubottu> Launchpad bug 567527 in mime-support "Typo in warning dialog" [Low,Triaged] https://launchpad.net/bugs/567527
 118 [07:43] <dholbach> but as far as I can see this looks good already
 119 [07:43] <dholbach> so once you have 1) found a fix, 2) test-built the package, 3) tested it you can proceed to
 120 [07:44] <dholbach> https://wiki.ubuntu.com/SponsorshipProcess (I'll give you some links later on again) which explains how to get a patch uploaded to Ubuntu
 121 [07:49] <dholbach> ok, let's crack on - bbordwell just had some issues, we hope to have figured them out
 122 [07:49] <dholbach> next bug
 123 [07:49] <dholbach> https://bugs.launchpad.net/ubuntu/+source/app-install-data-ubuntu/+bug/538221
 124 [07:49] <ubottu> Launchpad bug 538221 in app-install-data-ubuntu "typo in GTK wiimote whiteboard (whitebaord)" [Undecided,New]
 125 [07:49] <dholbach> ok, this one is a big misleading
 126 [07:50] <dholbach> it says that the bug is in app-install-data-ubuntu which is the package that contains all the package descriptions for software-center (and gnome-app-install)
 127 [07:50] <ClassBot> There are are 10 minutes remaining in the current session.
 128 [07:50] <dholbach> you need to know that app-install-data-ubuntu is generated from lots and lots of other packages, so very rarely the bug will be in app-install-data-ubuntu itself
 129 [07:51] <dholbach> to find out which package is actually concerned, I tried this:
 130 [07:51] <dholbach> daniel@miyazaki:~$ apt-cache search wiimote whiteboard
 131 [07:51] <dholbach> gtkwhiteboard - GTK+ Wiimote Whiteboard
 132 [07:51] <dholbach> daniel@miyazaki:~$
 133 [07:51] <dholbach> so we'll do a similar dance as last time again :-)
 134 [07:51] <dholbach>   apt-get source gtkwhiteboard
 135 [07:52] <dholbach>   cd gtkwhiteboard-1.3+dfsg/
 136 [07:52] <dholbach>   grep -ri whitebaord .
 137 [07:52] <dholbach> will show you where the typo turned up
 138 [07:53] <dholbach> luckily, again it's just in files that were added by the packaging (that live in debian/)
 139 [07:54] <dholbach> so please go and fix all of these 3 files
 140 [07:55] <ClassBot> There are are 5 minutes remaining in the current session.
 141 [07:56] <dholbach> ok, when you're done, document it again
 142 [07:56] <dholbach>   dch -i
 143 [07:57] <dholbach> then run
 144 [07:57] <dholbach>   update-maintainer
 145 [07:57] <dholbach> then
 146 [07:57] <dholbach>   debuild -S -us -uc
 147 [07:58] <dholbach> what update-maintainer does is: change the Maintainer name/email in debian/control to preserver the debian maintainer in a different variable and set an ubuntu mailing list as maintainer
 148 [07:59] <dholbach> that's something our friends at debian asked us to do so they don't get bug mail for changes that were introduced in Ubuntu, etc :)
 149 [07:59] <dholbach> https://wiki.ubuntu.com/DebianMaintainerField for more info :)
 150 [08:00] <dholbach> ok, again send me the output of the debdiff command
 151 [08:00] <dholbach>   cd ..
 152 [08:00] <dholbach>   debdiff gtkwhiteboard_1.3+dfsg-5.2{,ubuntu1}.dsc
 153 === ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - http://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi
 154 [08:00] <dholbach> in the meantime a few links that will probably help you
 155 [08:01] <dholbach> https://wiki.ubuntu.com/MOTU/GettingStarted links to all the bits that are useful along your way
 156 [08:01] <dholbach> https://wiki.ubuntu.com/PackagingGuide for a quick tutorial for the packaging basics
 157 [08:01] <dholbach> https://wiki.ubuntu.com/UbuntuDevelopment for more info about the ubuntu development processes
 158 [08:01] <dholbach> https://wiki.ubuntu.com/SponsorshipProcess for getting changes uploaded into Ubuntu
 159 [08:02] <dholbach> did anyone get the whitebaord debdiff? :)
 160 [08:03] <dholbach> are there any more questions?
 161 [08:04] <dholbach> <aburch> dholbach: If bugs are assigned to the wrong package, they should be reassigned (the one in gtkwhiteboard)
 162 [08:04] <dholbach> aburch: yes, totally
 163 [08:05] <dholbach> whatever new you find out, you should put add as information to the bug report
 164 [08:05] <dholbach> so even if you don't manage to fix the bug completely the next one attempting has that info already :)
 165 [08:06] <dholbach> <arand> I'm not sure really how to do the changelog on this one, it seems a bit much stating all the files cahnged, and a bit little to omit it completely..: http://pastebin.com/aGiMBSYg
 166 [08:06] <dholbach> arand: this looks good - I personally absolutely wouldn't mind listing all the files, but that's a matter of preference :)
 167 [08:07] <dholbach> also... if you found you like working on bugs and getting packages fixed, consider dropping in #ubuntu-packaging or #ubuntu-motu
 168 [08:07] <dholbach> and ask all the questions you have there
 169 [08:08] <dholbach> there are lots of really helpful people in there who will help you get started
 170 [08:08] <dholbach> thanks a lot everybody for attending
 171 [08:08] <dholbach> you ROCK!
 172 [08:08] <ajmitch> thanks dholbach!
 173 [08:08] <dholbach> next week is Ubuntu Open Week and we'll have a bunch of sessions related to development there too
 174 [08:08] <dholbach> it'll be awesome


CategoryPackaging

Packaging/Training/Logs/2010-04-29 (last edited 2010-04-29 17:53:57 by 99-21-107-94)