[06:49] <dholbach> Packaging Training: Fixing small bugs in Ubuntu: in 10 minutes - http://is.gd/bLixO
[06:56] <ajmitch> arg, lernid hates me today :)
[06:56] <imbrandon> heh
[07:00] <dholbach> good morning everybody - who's here for the packaging training session today?
[07:01] <dholbach> I've never used classbot before, so I suppose you need to ask questions in #ubuntu-classroom-chat
[07:02] <dholbach> so if you could please join that, I'd appreciate it
[07:02] <dholbach> so who's here for the packaging training session today? :)
[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?
[07:04] <dholbach> alright, let's do it now then :)
[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
[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
[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 :)
[07:07] <dholbach> alright
[07:07] <dholbach> first of all, let's install a few packages we're going to need:
[07:07] <dholbach>   sudo apt-get install --no-install-recommends libtool ubuntu-dev-tools debhelper cdbs pbuilder build-essential
[07:08] <dholbach>  - build-essential gives you tools to compile packages
[07:09] <dholbach>  - cdbs and debhelper contain scripts that streamline the packaging of applications
[07:09] <dholbach>  - pbuilder is a tool to test-build packages in a sane environment
[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 :-))
[07:10] <dholbach>  - libtool is required by one of the packages we'll work on later on
[07:10] <dholbach> ok... a tiny bit of preparation now - I'll keep this short
[07:11] <dholbach> Please make sure you have "source package entries" enabled in your /etc/apt/sources.list
[07:11] <dholbach> a    grep deb-src /etc/apt/sources.list    will make sure
[07:12] <dholbach> System → Administration → Software Sources → Software → Sources     will work too
[07:12] <dholbach> (I hope that's what it's called in English, I use a German Ubuntu over here.)
[07:13] <dholbach> next please edit ~/.pbuilderrc
[07:13] <dholbach> (if it's not there, create it)
[07:13] <dholbach> and please add this entry
[07:13] <dholbach> COMPONENTS="main universe multiverse restricted"
[07:13] <dholbach> save it
[07:14] <dholbach> next please edit ~/.bashrc (if you use the bash shell - if you use something else, edit the appropriate settings)
[07:14] <dholbach> and add
[07:14] <dholbach> export DEBFULLNAME='Daniel Holbach'
[07:14] <dholbach> export DEBEMAIL='daniel.holbach@ubuntu.com'
[07:14] <dholbach> please use your own name and email address :-)
[07:14] <dholbach> thanks!
[07:15] <dholbach> next please run
[07:15] <dholbach>   source ~/.bashrc
[07:15] <dholbach> (or restart your terminal session)
[07:15] <dholbach> next please run
[07:15] <dholbach>   sudo pbuilder create
[07:15] <dholbach> (this will take a while)
[07:15] <dholbach> now what did we do
[07:16] <dholbach> 1) we enabled a source package entry for apt so we can get the source of all packages very easily
[07:16] <dholbach> 2) told pbuilder that it should use all components by default
[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)
[07:17] <dholbach> all good up until now?
[07:18] <dholbach> rock and roll
[07:18] <dholbach> ok, here's our first bug
[07:18] <dholbach> https://bugs.launchpad.net/ubuntu/+source/mime-support/+bug/567527
[07:19] <dholbach> arand asks "existing gpg-key is assumed? Or not required in this case?"
[07:19] <dholbach> it's not required, but https://help.ubuntu.com/community/GnuPrivacyGuardHowto is a good guide to get it set up
[07:20] <dholbach> awesome, now we can speak in here too :)
[07:20] <dholbach> thanks again pleia2 :)
[07:20] <pleia2> sure thing :)
[07:20] <dholbach> ok, back to our mime-support bug
[07:20] <dholbach> apparently there's a typo in there: "form" should be "from"
[07:20] <dholbach> let's get the source and find out
[07:21] <dholbach>   apt-get source mime-support
[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
[07:22] <dholbach> daniel@miyazaki:~/mime-support-3.48$ find . -name cautious-launcher
[07:22] <dholbach> ./debian/cautious-launcher
[07:22] <dholbach> daniel@miyazaki:~/mime-support-3.48$
[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)
[07:23] <dholbach> so go and edit the file, and change "form" to "from"
 otherwise   grep -r "form an untrused" .  in the source directory would point out the file ;)
[07:23] <dholbach> arand is right :)
[07:24] <dholbach> next we need to document what we just did and update the version number of the package
[07:24] <dholbach> please run
[07:24] <dholbach>   dch -i
[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
[07:25] <dholbach> let's go through the format of the changelog entry real quick
[07:25] <dholbach> first up is the name of the source package
[07:25] <dholbach> then we have the version number, in our case 3.48-1ubuntu2
[07:26] <dholbach> which means: upstream version (released by the software authors) is 3.48, 1st revision in debian, 2nd revision in ubuntu
[07:26] <dholbach> it shows quite well the flow of the software in terms of releases
[07:26] <dholbach> upstream → debian → ubuntu
[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
[07:28] <dholbach> ok, getting back to changelog entry
[07:28] <dholbach> mime-support (3.48-1ubuntu2) lucid; urgency=low
[07:29] <dholbach> next up is the version of ubuntu we want to upload it to (lucid in our case)
[07:29] <dholbach> and the urgency we can ignore for now - while Launchpad now supports urgency (I've been told) it's rarely used
[07:29] <dholbach> my actual changelog entry looks like this
[07:29] <dholbach> * debian/cautious-launcher: "form" → "from" (LP: #567527)
[07:30] <dholbach> it mentions the file we changed, mentions what we changed and also mentions the launchpad bug in a special format
[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
[07:31] <dholbach> this special format will also make sure the bug gets automatically closed when we upload the package
[07:31] <dholbach> next please run:
[07:31] <dholbach>    debuild -S -sa -us -uc
[07:31] <dholbach> and if it asks you about some tarball that's missing, please just say "yes" :)
[07:32] <dholbach> that's a packaging mistake we probably shouldn't get ourselves into right now - not our fault
[07:32] <dholbach> did that pan out alright for everybody?
[07:32] <dholbach> did anybody get lost along the way?
[07:33] <dholbach> excellent
[07:34] <dholbach> if you now would please run:
[07:34] <dholbach>  cd ..
[07:34] <dholbach>  debdiff mime-support_3.48-1ubuntu{1,2}.dsc
[07:34] <dholbach> and paste the output to http://paste.ubuntu.com I'd appreciate it
[07:34] <dholbach> and I'll do a quick review
 what is the significance of the arguments in this command? debuild -S -sa -us -uc
[07:35] <dholbach> good question bbordwell
[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
[07:36] <dholbach> we just do this because we didn't set up the gpg key together
[07:36] <dholbach> (use the link above and you should be fine and can drop -us -uc in the future)
[07:37] <dholbach> "-S" will tell debuild to rebuild the source package as opposed to build the .deb package itself
[07:37] <dholbach> "-sa" is just necessary if you want to upload the source package somewhere
[07:37] <dholbach> so did you post your patches to some pastebin?
[07:37] <dholbach> can I have the links?
[07:38] <dholbach> "debdiff mime-support_3.48-1ubuntu{1,2}.dsc" and paste the output to http://paste.ubuntu.com
[07:39] <dholbach> also: to test-build the package, run    sudo pbuilder build mime-support_3.48-1ubuntu2.dsc
[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
[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
 Is this what you were looking for? http://paste.ubuntu.com/424428/
 http://pastebin.com/dDuWneYc
[07:41] <dholbach> arand: this looks good
[07:42] <dholbach> bbordwell: is that the changes file?
[07:42] <dholbach> bbordwell: can you post the output of the debdiff command?
[07:42] <dholbach>  debdiff mime-support_3.48-1ubuntu{1,2}.dsc
[07:43] <dholbach> (lp:567527) needs to be (LP: #567527) for Launchpad to trigger the closing of the bug
[07:43] <dholbach> but as far as I can see this looks good already
[07:43] <dholbach> so once you have 1) found a fix, 2) test-built the package, 3) tested it you can proceed to
[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
[07:49] <dholbach> ok, let's crack on - bbordwell just had some issues, we hope to have figured them out
[07:49] <dholbach> next bug
[07:49] <dholbach> https://bugs.launchpad.net/ubuntu/+source/app-install-data-ubuntu/+bug/538221
[07:49] <dholbach> ok, this one is a big misleading
[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)
[07:50] <ClassBot> There are are 10 minutes remaining in the current session.
[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
[07:51] <dholbach> to find out which package is actually concerned, I tried this:
[07:51] <dholbach> daniel@miyazaki:~$ apt-cache search wiimote whiteboard
[07:51] <dholbach> gtkwhiteboard - GTK+ Wiimote Whiteboard
[07:51] <dholbach> daniel@miyazaki:~$
[07:51] <dholbach> so we'll do a similar dance as last time again :-)
[07:51] <dholbach>   apt-get source gtkwhiteboard
[07:52] <dholbach>   cd gtkwhiteboard-1.3+dfsg/
[07:52] <dholbach>   grep -ri whitebaord .
[07:52] <dholbach> will show you where the typo turned up
[07:53] <dholbach> luckily, again it's just in files that were added by the packaging (that live in debian/)
[07:54] <dholbach> so please go and fix all of these 3 files
[07:55] <ClassBot> There are are 5 minutes remaining in the current session.
[07:56] <dholbach> ok, when you're done, document it again
[07:56] <dholbach>   dch -i
[07:57] <dholbach> then run
[07:57] <dholbach>   update-maintainer
[07:57] <dholbach> then
[07:57] <dholbach>   debuild -S -us -uc
[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
[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 :)
[07:59] <dholbach> https://wiki.ubuntu.com/DebianMaintainerField for more info :)
[08:00] <dholbach> ok, again send me the output of the debdiff command
[08:00] <dholbach>   cd ..
[08:00] <dholbach>   debdiff gtkwhiteboard_1.3+dfsg-5.2{,ubuntu1}.dsc
[08:00] <dholbach> in the meantime a few links that will probably help you
[08:01] <dholbach> https://wiki.ubuntu.com/MOTU/GettingStarted links to all the bits that are useful along your way
[08:01] <dholbach> https://wiki.ubuntu.com/PackagingGuide for a quick tutorial for the packaging basics
[08:01] <dholbach> https://wiki.ubuntu.com/UbuntuDevelopment for more info about the ubuntu development processes
[08:01] <dholbach> https://wiki.ubuntu.com/SponsorshipProcess for getting changes uploaded into Ubuntu
[08:02] <dholbach> did anyone get the whitebaord debdiff? :)
[08:03] <dholbach> are there any more questions?
 dholbach: If bugs are assigned to the wrong package, they should be reassigned (the one in gtkwhiteboard)
[08:04] <dholbach> aburch: yes, totally
[08:05] <dholbach> whatever new you find out, you should put add as information to the bug report
[08:05] <dholbach> so even if you don't manage to fix the bug completely the next one attempting has that info already :)
 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
[08:06] <dholbach> arand: this looks good - I personally absolutely wouldn't mind listing all the files, but that's a matter of preference :)
[08:07] <dholbach> also... if you found you like working on bugs and getting packages fixed, consider dropping in #ubuntu-packaging or #ubuntu-motu
[08:07] <dholbach> and ask all the questions you have there
[08:08] <dholbach> there are lots of really helpful people in there who will help you get started
[08:08] <dholbach> thanks a lot everybody for attending
[08:08] <dholbach> you ROCK!
[08:08] <ajmitch> thanks dholbach!
[08:08] <dholbach> next week is Ubuntu Open Week and we'll have a bunch of sessions related to development there too
[08:08] <dholbach> it'll be awesome
[20:20] <ubuntu> +
[21:05] <simar> hello ppl isn't a way of attending the study material of today's classroom if somone was absent at that time ??????
[21:08] <joaopinto> simar, check the irc logs, google: ubuntu irc logs
[21:09] <simar> joaopinto, is the classrooms conducted only via chat ??? 2days wad that of danial
[21:09] <simar> ??
[21:09] <joaopinto> yes, only via chat
[21:11] <simar> joaopinto,  ok fne
[21:13] <simar> joaopinto, could you help me about triaging bugs ... i have read how to triage guide ... n i feel it insufficient knowledge to start triaging .....  like i don't know what bugs to triage  ... n many more things???
[21:13] <simar> plz help
[21:13] <joaopinto> simar, this is not a support channel, the best channel to get help with bugs traging is #ubuntu-bugs
[21:13] <joaopinto> triaging
[21:15] <simar> joaopinto,  but nobody replies there ... is it like question should be adressed to someone or????
[21:15] <joaopinto> it means you need to wait for someone to become available
[21:17] <simar> ok