FixSmallBugs

Differences between revisions 1 and 2
Revision 1 as of 2009-08-23 19:48:04
Size: 95
Editor: pool-71-123-23-94
Comment:
Revision 2 as of 2009-09-01 17:58:09
Size: 20884
Editor: correo
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
{{{ }}} {{{
17:00] <dholbach> WELCOME TO ANOTHER GREAT DAY OF UBUNTU DEVELOPER WEEK!
[17:00] <doctormo> Thanks dholbach
[17:00] <bittin`> thx :)
[17:00] <dholbach> Who do we have here for "Fixing small bugs in Ubuntu"? :-)
[17:00] <dutchie> o/
[17:00] <shiki-> :)
[17:00] <arvind_khadri> me
[17:00] <norax> me
[17:00] <jef_> me :)
[17:00] <frandieguez__> me!
[17:00] <sum-it> i am in
[17:01] <syedam> o/
[17:01] <Jonnie_Simpson> me :D
[17:01] <czambran> Hi
[17:01] <James147> :)
[17:01] <Gnome64> ayay!
[17:01] <bptk421> hi!
[17:01] <devin122> me
[17:01] <c_korn> me
[17:01] <wers> :)
[17:01] <mozuku> me
[17:01] <ScottTesterman_> :)
[17:01] <krams> me
[17:01] <ideamonk> :)
[17:01] <HobbleAlong> hi all
[17:01] <slord54> *lurks*
[17:01] <raji> me 2
[17:01] <AntoineLeclair> me
[17:01] <Geep_> me
[17:01] <francesco_m> o/
[17:01] <openweek1_> howdy
[17:01] <ubuntufreak> me
[17:01] <sum-it> dholbach: QUESTION: do we need karmic for that?
[17:01] <abourgeois> me
[17:01] <fromme> hi
[17:01] <dholbach> sum-it: I'll answer that in a sec
[17:01] <ulysses> +m ?
[17:01] <awalton> 'lo
[17:02] <Copernicus1234> +1
[17:02] <Andre_Gondim> me
[17:02] <RainCT> :)
[17:02] * freelancer317 waving
[17:02] <dholbach> OK dear friends of Ubuntu Development, let's get the session started!
[17:02] <dholbach> for those of you who are new to Ubuntu Developer Week - this channel is muted, so please head over to #ubuntu-classroom-chat and ask questions there
[17:03] <dholbach> please make sure you prefix them with QUESTION:
[17:03] <dholbach> If have problems following in English or want to ask a question in your local language, fine people in these channels might help you out:
[17:03] <dholbach> * Catalan: #ubuntu-classroom-chat-ca
[17:03] <dholbach> * Danish: #ubuntu-nordic-dev
[17:03] <dholbach> * Finnish: #ubuntu-fi-devel
[17:03] <dholbach> * German: #ubuntu-classroom-chat-de
[17:03] <dholbach> * Spanish: #ubuntu-classroom-chat-es
[17:03] <dholbach> * French: #u-classroom
[17:04] <dholbach> To answer sum-it's question: no you don't necessarily need karmic for this session, but as I said yesterday, please have a look into https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases
[17:04] <dholbach> if you're interested in developing Ubuntu it's important that you run the devel release in some form
[17:04] <dholbach> some sane form like a virtual machine, etc.
[17:04] <dholbach> alright my friends: quick preparations for those of you who weren't here yesterday
[17:05] <dholbach> sudo apt-get install --no-install-recommends bzr ubuntu-dev-tools devscripts dpkg-dev cdbs
[17:05] <dholbach> also please enable "Sources" in System -> Administration -> Software Sources -> Ubuntu Software
[17:05] <dholbach> also please add something like this to your ~/.bashrc file:
[17:05] <dholbach> export DEBFULLNAME='Daniel Holbach'
[17:05] <dholbach> export DEBEMAIL='daniel.holbach@ubuntu.com'
[17:05] <dholbach> save it and run
[17:06] <dholbach> source ~/.bashrc
[17:06] <dholbach> please don't use MY NAME
[17:06] <dholbach> thanks :-)
[17:06] <dholbach> we covered this in yesterday's session so please either read the logs or ask somebody in #ubuntu-classroom-chat to help you
[17:06] <dholbach> ok... we want to fix simple bugs in Ubuntu
[17:07] <dholbach> I took the liberty of choosing a few that I think we should get done :-)
[17:07] <dholbach> please all take a look at https://bugs.launchpad.net/ubuntu/+source/edubuntu-addon-meta/+bug/404608
[17:07] <dholbach> it talks about a small typo in a package description
[17:08] <dholbach> so to get the source code, please run:
[17:08] <dholbach> apt-get source edubuntu-addon-meta
[17:08] <dholbach> now please
[17:08] <dholbach> cd edubuntu-addon-meta-0.12
[17:08] <dholbach> as explained yesterday you can find things like the package description in debian/control, so please open that file in your favourite editor
[17:09] <dholbach> ah and there the bug is... "form" in the last line
[17:09] <dholbach> please change it to "from"
[17:09] <dholbach> save the file
[17:09] <dholbach> ok... just a bit of background about debian/control:
[17:10] <dholbach> the first stanza is always about the source package (refer to yesterday's log or to https://wiki.ubuntu.com/PackagingGuide)
[17:10] <dholbach> the stanzas afterwards (just one in this case) describe the binary packages (the resulting .deb files)
[17:10] <dholbach> alright, as far as we can see this should fix the bug
[17:10] <dholbach> one thing I mentioned yesterday too is documentation
[17:11] <dholbach> we need to document the change we just did in debian/changelog
[17:11] <dholbach> luckily there's a nice tool in the devscripts package called dch that makes the job of editing the changelog a lot easier
[17:11] <dholbach> so if you set up ~/.bashrc with DEBEMAIL and DEBFULLNAME and ran source ~/.bashrc please now run:
[17:11] <dholbach> dch -i
[17:12] <dholbach> this will create a new changelog entry and increment the version number
[17:12] <dholbach> if you look at the entry closely, you'll see that it always starts with the source package name
[17:12] <dholbach> then there's the version number which I'll get back to in a sec
[17:12] <dholbach> next is the release in which we want to fix it in
[17:13] <dholbach> the urgency is a debian-ism which we can ignore
[17:13] <dholbach> next we have the entry which we still have to write, then our name, email and timestamp
[17:14] <dholbach> ok, I talked about version numbers a bit yesterday
[17:14] <dholbach> normally we'd add "ubuntu1" to indicate that we took a Debian package and modified it
[17:14] <dholbach> in this case it's an Ubuntu only package
[17:14] <dholbach> so instead of 12ubuntu1, we'll use 13
[17:15] <dholbach> now I'll put something like this as the actual changelog entry
[17:15] <dholbach> * debian/control: replaced "form" with "from". (LP: #404608)
[17:15] <dholbach> it's important to use a form like this (or similar)... what did I do?
[17:16] <dholbach> - I described which file I touched
[17:16] <dholbach> - I described what I did
[17:16] <dholbach> - I mentioned the bug number in a special format
[17:16] <dholbach> it's important that you provide as much information as possible
[17:16] <dholbach> the bug report usually has all that information and enables others to revisit the bug and better understand why you did your changes
[17:17] <dholbach> also did I use (LP: #404608) because only in the (LP: #xxxxxxxxxx) format the bug will be automatically closed on upload
[17:17] <dholbach> alright... now save the file
[17:17] <dholbach> now please run debuild -S
[17:18] <dholbach> this will rebuild the source package (the .tar.gz and .dsc file)
[17:18] <dholbach> it might ask you for your gpg key, but it's not necessary to sign it
[17:18] <dholbach> now if you
[17:18] <dholbach> cd ..
[17:18] <dholbach> you should see edubuntu-addon-meta_0.12.dsc edubuntu-addon-meta_0.12.tar.gz edubuntu-addon-meta_0.13.dsc edubuntu-addon-meta_0.13.tar.gz
[17:18] <dholbach> (and a few other files)
[17:19] <dholbach> which means we successfully rebuilt the source package with our changes
[17:19] <dholbach> <arvind_khadri> QUESTION : why shouldnt we use debian/rules here to build the .deb again?
[17:19] <dholbach> arvind_khadri: for this exercise we don't need to build the .deb and you might want to take a look at pbuilder for building packages (https://wiki.ubuntu.com/PbuilderHowto)
[17:20] <dholbach> generally you're right though... if you want to fix a bug, you definitely need to test it too
[17:20] <dholbach> now it'd be a bit much for this session
[17:20] <dholbach> <bananeweizen> QUESTION: how do we know it's an Ubunty only package
[17:20] <dholbach> bananeweizen: edubuntu should be a hint in this case, generally it's a bit harder to tell
[17:21] <dholbach> https://packages.debian.org/src:<packagename> should find the debian package if available
[17:21] <dholbach> <noiz777> QUESTION: i did the debuild -S but it failed: clearsign failed: secret key not available, what do i do there?
[17:21] <dholbach> noiz777: normally you'd sign a source package so you can upload it to a PPA for example
[17:21] <dholbach> for this exercise it's not necessary
[17:21] <dholbach> alright
[17:21] <dholbach> now please run
[17:22] <dholbach> debdiff edubuntu-addon-meta_0.12.dsc edubuntu-addon-meta_0.13.dsc
[17:22] <dholbach> this will show you the diff between the old and the new version
[17:22] <dholbach> if you run
[17:22] <dholbach> debdiff edubuntu-addon-meta_0.12.dsc edubuntu-addon-meta_0.13.dsc > edubuntu-addon-meta.fix
[17:22] <dholbach> it will give you a nice file to attach to the bug report
[17:22] <dholbach> (remember: test it first :-))
[17:22] <dholbach> I'll talk a bit about sponsoring / patch review later on
[17:23] <dholbach> so you know how to get your good fixes reviewed and included
[17:23] <dholbach> first bug fixed :-)
[17:23] <dholbach> ok... up next is https://bugs.launchpad.net/ubuntu/+source/qutim/+bug/346528
[17:23] <dholbach> please run:
[17:23] <dholbach> apt-get source qutim
[17:24] <dholbach> when I prepared the session the bug was still under app-install-data-ubuntu - it took me a bit to realise that the app-install-data is retrieved from lots of .desktop files from various packages
[17:25] <dholbach> so if we fix it in qutim now, it should get fixed in the app-install-data too (for "Add/Remove...")
[17:25] <dholbach> <EagleScreen> QUESTION: I obtained this: gpg: Signature made Thu Mar 19 18:05:37 2009 CET using DSA key ID 92742B33
[17:25] <dholbach> gpg: Can't check signature: public key not found
[17:25] <dholbach> what does it mean?
[17:25] <dholbach> EagleScreen: it means that the package was originally signed by somebody whose public key you don't have in your keyring - that's safe to ignore
[17:25] <dholbach> alright
[17:26] <dholbach> cd qutim-0.1
[17:26] <dholbach> grep -ri massanger *
[17:26] <dholbach> this will search for "massanger" in all files, ignoring if it's upper case or lower case
[17:26] <dholbach> seems like we have two files to fix
[17:26] <dholbach> debian/qutim.desktop:GenericName=Instant Massanger
[17:26] <dholbach> debian/qutim.1:qutIM \- Qt Instant Massanger
[17:27] <dholbach> one of them is the .desktop file (that creates the menu entry) which is mentioned in the bug report
[17:27] <dholbach> and also there's the manpage
[17:28] <dholbach> now please run:
[17:28] <dholbach> sed -i 's/Massanger/Messenger/g' debian/qutim.desktop
[17:28] <dholbach> sed -i 's/Massanger/Messenger/g' debian/qutim.1
[17:28] <dholbach> this will replace Massanger with Messenger in both files
[17:29] <dholbach> ok
[17:29] <dholbach> now let's document our changes
[17:29] <dholbach> please run
[17:29] <dholbach> dch -i
[17:30] <dholbach> 0.1-0ubuntu2 should be fine
[17:30] <dholbach> and as a description of what we did, I chose
[17:30] <dholbach> * debian/qutim.desktop, debian/qutim.1: replaced "Massanger" with
[17:30] <dholbach> "Messenger" (LP: #346528)
[17:30] <dholbach> (it's good practise to wrap lines at 80 characters)
[17:31] <dholbach> bug number two fixed too :-)
[17:31] <dholbach> <roxan> QUESTION: isn't typo fixed a better discription in this case ?
[17:31] <dholbach> roxan: sure, you can do that too - I usually prefer to explicitly mention what was wrong and how I fixed it :)
[17:32] <dholbach> alright... let's talk a bit about sponsoring and patch review
[17:33] <dholbach> once you have a nice patch, you obviously attach it to the bug report so people can check it out
[17:33] <dholbach> but for it to be included in Ubuntu (if you can't upload source packages yourself yet), you need to subscribe the reviewers team
[17:33] <dholbach> https://wiki.ubuntu.com/SponsorshipProcess explains the process in detail
[17:34] <dholbach> essentially you subscribe ubuntu-main-sponsors for packages in main or restricted
[17:34] <dholbach> and subscribe ubuntu-universe-sponsors for packages in universe or multiverse
[17:34] <dholbach> they'll give you feedback and upload the patch once it's ok
[17:35] <dholbach> <EagleScreen> QUESTION: I have a build problem: http://pastebin.ca/1550481
[17:35] <dholbach> <rugby471> EagleScreen: try installing qmake & qmake-dev
[17:35] <dholbach> ^ for those of you wondering why debuild -S doesn't work in the case of qutim
[17:35] <dholbach> thanks rugby471
[17:36] <dholbach> ok... let's move on to our third bug :)
[17:36] <dholbach> some questions first
[17:36] <dholbach> <rugby471> QUESTION: sometimes debdiffs take quite a while to be sponsored, what are the ways that I can make sure it get's uploaded as fast as it can?
[17:36] <dholbach> rugby471: make sure the patch is tip top tested and documented very very well
[17:36] <dholbach> so reviewers don't have to go into a very long feedback loop
[17:36] <dholbach> usually you can ask in #ubuntu-devel or #ubuntu-motu too to get some help
[17:37] <dholbach> <trothigar> QUESTION: can you find out using apt which repository a package comes from?
[17:37] <dholbach> apt-cache showsrc qutim | grep ^Dir
[17:37] <dholbach> <AntoineLeclair> QUESTION: When I want to submit a fix, what do I submit? The debdiff file only?
[17:38] <dholbach> AntoineLeclair: yes in cases where you just submit a simple fix, yes
[17:38] <dholbach> again https://wiki.ubuntu.com/SponsorshipProcess has more info on the topic
[17:38] <dholbach> ok, our third bug is:
[17:38] <dholbach> https://bugs.launchpad.net/ubuntu/+source/quickly/+bug/422212
[17:38] <dholbach> for those of you who attended yesterday's session, you will know what it is about
[17:39] <dholbach> also you'll see that Markus Korn filed the bug after the session because he was interested in it :-)
[17:40] <dholbach> in most cases you can safely use the "apt-get source" command to obtain the source
[17:40] <dholbach> as I know that quickly is maintained in Launchpad's Code hosting (be sure to visit the session later this week!), we'll get the latest trunk of quickly and see if it needs fixing there
[17:41] <dholbach> please run
[17:41] <dholbach> bzr branch lp:quickly
[17:41] <dholbach> this will get the latest trunk of quickly
[17:41] <dholbach> this might take a little bit as it gets the whole history of quickly and its development
[17:41] <dholbach> once it's done, please
[17:41] <dholbach> cd quickly
[17:41] <dholbach> grep -ri arborting *
[17:42] <dholbach> which... again ... will search in all directories and check for upper and lower case alike
[17:42] <dholbach> I get the following output:
[17:42] <dholbach> bin/quickly: print _("Arborting.")
[17:42] <dholbach> bin/quickly: print _("Arborting.")
[17:42] <dholbach> quickly/tools.py: print _("Arborting.")
[17:42] <dholbach> so three occurences we need to fix
[17:43] <dholbach> these commands should get you there:
[17:43] <dholbach> sed -i 's/Arborting/Aborting/g' bin/quickly
[17:43] <dholbach> sed -i 's/Arborting/Aborting/g' quickly/tools.py
[17:43] <dholbach> I don't have enough time to go into the use of the sed command, but "-i" means "replace in place" (so modify the file)
[17:44] <dholbach> and the last "/g" means "fix all occurrences
[17:44] <dholbach> <Johan1> QUESTION : What is a trunk exactly ?
[17:44] <dholbach> Johan1: trunk is the development focus... usually projects use various branches in which small features or bugs are developed indepently of each other
[17:45] <dholbach> once they're deemed ready, they're merged into 'trunk'
[17:45] <dholbach> ... which gets released every now and then when it seems to make sense
[17:45] <dholbach> software projects often work a bit differently because of how they are set up
[17:45] <dholbach> in this case we want trunk
[17:46] <dholbach> alright
[17:46] <dholbach> once that's done, you can run
[17:46] <dholbach> bzr diff
[17:46] <dholbach> to have another look at your changes again
[17:46] <dholbach> instead of documenting in debian/changelog, I'll show you something else this time
[17:47] <dholbach> please run bzr commit --fixes lp:422212 -m "changed 'Arborting.' to 'Aborting.'"
[17:48] <dholbach> this will commit the change (locally) and add the log message "changed 'Arborting.' to 'Aborting.'" to the revision history
[17:48] <dholbach> you will be able to see it this way: bzr log | head
[17:48] <dholbach> the other great thing is that when you push the change to launchpad, it will automatically link your branch to the bug report
[17:49] <dholbach> http://bazaar-vcs.org/Documentation has more information on the topic
[17:49] <dholbach> let's try to see if we manage to fix another bug:
[17:49] <dholbach> https://bugs.launchpad.net/ubuntu/+source/qemulator/+bug/348172
[17:50] <dholbach> another nice typo
[17:50] <dholbach> this time in the qemulator package
[17:50] <dholbach> apt-get source qemulator
[17:50] <dholbach> <EagleScreen> QUESTION: bzr log | head shows wrongly my e-mail, any thing similar to DEBEMAIL var?
[17:50] <dholbach> EagleScreen: you're right... try bzr whoami
[17:51] <dholbach> the qemulator case is a bit different
[17:51] <dholbach> cd qemulator-0.5/; grep -ri snpashot *
[17:52] <dholbach> will show you a few occurences
[17:52] <dholbach> some in binary files (which we can't fix) - they are translation files
[17:53] <dholbach> but before we go ahead and change Qemulator.pot and usr/local/lib/qemulator/qemulator.glade I need to explain something
[17:53] <dholbach> in our qutim and edubuntu-addon-something case we edited files in the debian/ directory
[17:53] <dholbach> these are files supplied by us (or other Ubuntu/Debian maintainers)
[17:54] <dholbach> in the case of quickly we fixed it in trunk (so where the upstream developers work)
[17:54] <dholbach> yesterday I talked a bit about how we make use of a .orig.tar.gz (that contains the source code that we get from the upstream software authors and which we don't change)
[17:54] <dholbach> we merely add the "packaging" in the debian/ directory
[17:55] <dholbach> so some maintainers decide to store patches that fix something in the source code of upstreams in debian/patches/
[17:55] <dholbach> if you
[17:55] <dholbach> ls debian/patches
[17:55] <dholbach> you'll find there's already a patch
[17:56] <dholbach> https://wiki.ubuntu.com/PackagingGuide/PatchSystems goes into more detail about all the "patch systems" that maintainers use
[17:56] <dholbach> we have 4 minutes left, so let's make it quick
[17:56] <dholbach> run
[17:56] <dholbach> what-patch
[17:56] <dholbach> (from the ubuntu-dev-tools package)
[17:56] <dholbach> and it'll tell you that the patch system is CDBS
[17:56] <dholbach> so please run
[17:56] <dholbach> cdbs-edit-patch fix-snapshot-typo
[17:57] <dholbach> this will fire up a "sub shell" in which we fix the issue now
[17:57] <dholbach> now please run
[17:57] <dholbach> sed -i 's/snpashot/snapshot/g' Qemulator.pot usr/local/lib/qemulator/qemulator.glade
[17:57] <dholbach> this should fix the issue in both places
[17:57] <dholbach> now please hit Ctrl-D (or type 'exit')
[17:58] <dholbach> if you now look at ls debian/patches/
[17:58] <dholbach> you'll see our patch file
[17:58] <dholbach> now we'd just do dch -i again to document the change we just did
[17:58] <dholbach> we'd say something like
[17:59] <dholbach> * debian/patches/fix-snapshot-typo.patch: replace 'snpashot' with 'snapshot'. (LP: #348172)
[17:59] <dholbach> done :-)
[17:59] <dholbach> <plumstead21> QUESTION: What's the best way of finding these 'easy' bugs that newbies stand a chance of being able to fix?
[17:59] <dholbach> plumstead21: great one!
[17:59] <dholbach> a few people wrote harvest which is supposed to find those low-hanging fruit
[17:59] <dholbach> its current home is http://daniel.holba.ch/harvest
[17:59] <dholbach> it's not very pretty, so some of us are working on https://wiki.ubuntu.com/Harvest/NewUI
[17:59] <dholbach> if you're a web developer PLEASE help out!
[18:00] <dholbach> dholbach at ubuntu dot com
[18:00] <dholbach> thanks a lot everybody!
[18:00] <syedam> thanks dholbach :)
[18:00] <dholbach> and please check out #ubuntu-motu for more help
[18:00] <ogasawara> thanks dholbach!
[18:00] <c_korn> thanks. great talk
[18:00] <dholbach> https://wiki.ubuntu.com/MOTU/GettingStarted too
[18:00] <jef_> thanks :)
[18:00] <dinxter> thanks!
[18:00] <bittin`> t
[18:00] <lopo1> thanks!
[18:00] <bittin`> thx dholbach
[18:01] <roxan> Thank You
[18:01] <^arky^> thanks dholbach , another great session
[18:01] <antisa> well done
}}}

Dev Week -- Fixing small bugs in Ubuntu -- dholbach -- Tue, Sep 1st, 2009

UTC

17:00] <dholbach> WELCOME TO ANOTHER GREAT DAY OF UBUNTU DEVELOPER WEEK!
[17:00] <doctormo> Thanks dholbach
[17:00] <bittin`>  thx :)
[17:00] <dholbach> Who do we have here for "Fixing small bugs in Ubuntu"? :-)
[17:00] <dutchie> o/
[17:00] <shiki-> :)
[17:00] <arvind_khadri> me
[17:00] <norax> me
[17:00] <jef_> me :)
[17:00] <frandieguez__> me!
[17:00] <sum-it> i am in
[17:01] <syedam> o/
[17:01] <Jonnie_Simpson> me :D
[17:01] <czambran> Hi
[17:01] <James147> :)
[17:01] <Gnome64> ayay!
[17:01] <bptk421> hi!
[17:01] <devin122> me
[17:01] <c_korn> me
[17:01] <wers> :)
[17:01] <mozuku> me
[17:01] <ScottTesterman_> :)
[17:01] <krams> me
[17:01] <ideamonk> :)
[17:01] <HobbleAlong> hi all
[17:01] <slord54> *lurks*
[17:01] <raji> me 2
[17:01] <AntoineLeclair> me
[17:01] <Geep_> me
[17:01] <francesco_m> o/
[17:01] <openweek1_> howdy
[17:01] <ubuntufreak> me
[17:01] <sum-it> dholbach: QUESTION: do we need karmic for that?
[17:01] <abourgeois> me
[17:01] <fromme> hi
[17:01] <dholbach> sum-it: I'll answer that in a sec
[17:01] <ulysses> +m ?
[17:01] <awalton> 'lo
[17:02] <Copernicus1234> +1
[17:02] <Andre_Gondim> me
[17:02] <RainCT> :)
[17:02]  * freelancer317 waving
[17:02] <dholbach> OK dear friends of Ubuntu Development, let's get the session started!
[17:02] <dholbach> for those of you who are new to Ubuntu Developer Week - this channel is muted, so please head over to #ubuntu-classroom-chat and ask questions there
[17:03] <dholbach> please make sure you prefix them with QUESTION:
[17:03] <dholbach> If have problems following in English or want to ask a question in your local language, fine people in these channels might help you out:
[17:03] <dholbach>  * Catalan: #ubuntu-classroom-chat-ca
[17:03] <dholbach>  * Danish: #ubuntu-nordic-dev
[17:03] <dholbach>  * Finnish: #ubuntu-fi-devel
[17:03] <dholbach>  * German: #ubuntu-classroom-chat-de
[17:03] <dholbach>  * Spanish: #ubuntu-classroom-chat-es
[17:03] <dholbach>  * French: #u-classroom
[17:04] <dholbach> To answer sum-it's question: no you don't necessarily need karmic for this session, but as I said yesterday, please have a look into https://wiki.ubuntu.com/UbuntuDevelopment/UsingDevelopmentReleases
[17:04] <dholbach> if you're interested in developing Ubuntu it's important that you run the devel release in some form
[17:04] <dholbach> some sane form like a virtual machine, etc.
[17:04] <dholbach> alright my friends: quick preparations for those of you who weren't here yesterday
[17:05] <dholbach> sudo apt-get install --no-install-recommends bzr ubuntu-dev-tools devscripts dpkg-dev cdbs
[17:05] <dholbach> also please enable "Sources" in System -> Administration -> Software Sources -> Ubuntu Software
[17:05] <dholbach> also please add something like this to your ~/.bashrc file:
[17:05] <dholbach> export DEBFULLNAME='Daniel Holbach'
[17:05] <dholbach> export DEBEMAIL='daniel.holbach@ubuntu.com'
[17:05] <dholbach> save it and run
[17:06] <dholbach>   source ~/.bashrc
[17:06] <dholbach> please don't use MY NAME
[17:06] <dholbach> thanks :-)
[17:06] <dholbach> we covered this in yesterday's session so please either read the logs or ask somebody in #ubuntu-classroom-chat to help you
[17:06] <dholbach> ok... we want to fix simple bugs in Ubuntu
[17:07] <dholbach> I took the liberty of choosing a few that I think we should get done :-)
[17:07] <dholbach> please all take a look at https://bugs.launchpad.net/ubuntu/+source/edubuntu-addon-meta/+bug/404608
[17:07] <dholbach> it talks about a small typo in a package description
[17:08] <dholbach> so to get the source code, please run:
[17:08] <dholbach>   apt-get source edubuntu-addon-meta
[17:08] <dholbach> now please
[17:08] <dholbach>   cd edubuntu-addon-meta-0.12
[17:08] <dholbach> as explained yesterday you can find things like the package description in debian/control, so please open that file in your favourite editor
[17:09] <dholbach> ah and there the bug is... "form" in the last line
[17:09] <dholbach> please change it to "from"
[17:09] <dholbach> save the file
[17:09] <dholbach> ok... just a bit of background about debian/control:
[17:10] <dholbach> the first stanza is always about the source package (refer to yesterday's log or to https://wiki.ubuntu.com/PackagingGuide)
[17:10] <dholbach> the stanzas afterwards (just one in this case) describe the binary packages (the resulting .deb files)
[17:10] <dholbach> alright, as far as we can see this should fix the bug
[17:10] <dholbach> one thing I mentioned yesterday too is documentation
[17:11] <dholbach> we need to document the change we just did in debian/changelog
[17:11] <dholbach> luckily there's a nice tool in the devscripts package called dch that makes the job of editing the changelog a lot easier
[17:11] <dholbach> so if you set up ~/.bashrc with DEBEMAIL and DEBFULLNAME and ran source ~/.bashrc please now run:
[17:11] <dholbach>   dch -i
[17:12] <dholbach> this will create a new changelog entry and increment the version number
[17:12] <dholbach> if you look at the entry closely, you'll see that it always starts with the source package name
[17:12] <dholbach> then there's the version number which I'll get back to in a sec
[17:12] <dholbach> next is the release in which we want to fix it in
[17:13] <dholbach> the urgency is a debian-ism which we can ignore
[17:13] <dholbach> next we have the entry which we still have to write, then our name, email and timestamp
[17:14] <dholbach> ok, I talked about version numbers a bit yesterday
[17:14] <dholbach> normally we'd add "ubuntu1" to indicate that we took a Debian package and modified it
[17:14] <dholbach> in this case it's an Ubuntu only package
[17:14] <dholbach> so instead of 12ubuntu1, we'll use 13
[17:15] <dholbach> now I'll put something like this as the actual changelog entry
[17:15] <dholbach> * debian/control: replaced "form" with "from". (LP: #404608)
[17:15] <dholbach> it's important to use a form like this (or similar)... what did I do?
[17:16] <dholbach>  - I described which file I touched
[17:16] <dholbach>  - I described what I did
[17:16] <dholbach>  - I mentioned the bug number in a special format
[17:16] <dholbach> it's important that you provide as much information as possible
[17:16] <dholbach> the bug report usually has all that information and enables others to revisit the bug and better understand why you did your changes
[17:17] <dholbach> also did I use (LP: #404608) because only in the (LP: #xxxxxxxxxx) format the bug will be automatically closed on upload
[17:17] <dholbach> alright... now save the file
[17:17] <dholbach> now please run     debuild -S
[17:18] <dholbach> this will rebuild the source package (the .tar.gz and .dsc file)
[17:18] <dholbach> it might ask you for your gpg key, but it's not necessary to sign it
[17:18] <dholbach> now if you
[17:18] <dholbach>  cd ..
[17:18] <dholbach> you should see edubuntu-addon-meta_0.12.dsc edubuntu-addon-meta_0.12.tar.gz edubuntu-addon-meta_0.13.dsc edubuntu-addon-meta_0.13.tar.gz
[17:18] <dholbach> (and a few other files)
[17:19] <dholbach> which means we successfully rebuilt the source package with our changes
[17:19] <dholbach> <arvind_khadri> QUESTION : why shouldnt we use debian/rules here to build the .deb again?
[17:19] <dholbach> arvind_khadri: for this exercise we don't need to build the .deb and you might want to take a look at pbuilder for building packages (https://wiki.ubuntu.com/PbuilderHowto)
[17:20] <dholbach> generally you're right though... if you want to fix a bug, you definitely need to test it too
[17:20] <dholbach> now it'd be a bit much for this session
[17:20] <dholbach> <bananeweizen> QUESTION: how do we know it's an Ubunty only package
[17:20] <dholbach> bananeweizen: edubuntu should be a hint in this case, generally it's a bit harder to tell
[17:21] <dholbach> https://packages.debian.org/src:<packagename> should find the debian package if available
[17:21] <dholbach> <noiz777> QUESTION: i did the debuild -S but it failed: clearsign failed: secret key not available, what do i do there?
[17:21] <dholbach> noiz777: normally you'd sign a source package so you can upload it to a PPA for example
[17:21] <dholbach> for this exercise it's not necessary
[17:21] <dholbach> alright
[17:21] <dholbach> now please run
[17:22] <dholbach>   debdiff edubuntu-addon-meta_0.12.dsc edubuntu-addon-meta_0.13.dsc
[17:22] <dholbach> this will show you the diff between the old and the new version
[17:22] <dholbach> if you run
[17:22] <dholbach> debdiff edubuntu-addon-meta_0.12.dsc edubuntu-addon-meta_0.13.dsc > edubuntu-addon-meta.fix
[17:22] <dholbach> it will give you a nice file to attach to the bug report
[17:22] <dholbach> (remember: test it first :-))
[17:22] <dholbach> I'll talk a bit about sponsoring / patch review later on
[17:23] <dholbach> so you know how to get your good fixes reviewed and included
[17:23] <dholbach> first bug fixed :-)
[17:23] <dholbach> ok... up next is https://bugs.launchpad.net/ubuntu/+source/qutim/+bug/346528
[17:23] <dholbach> please run:
[17:23] <dholbach>    apt-get source qutim
[17:24] <dholbach> when I prepared the session the bug was still under app-install-data-ubuntu - it took me a bit to realise that the app-install-data is retrieved from lots of .desktop files from various packages
[17:25] <dholbach> so if we fix it in qutim now, it should get fixed in the app-install-data too (for "Add/Remove...")
[17:25] <dholbach> <EagleScreen> QUESTION: I obtained this: gpg: Signature made Thu Mar 19 18:05:37 2009 CET using DSA key ID 92742B33
[17:25] <dholbach>  gpg: Can't check signature: public key not found
[17:25] <dholbach>  what does it mean?
[17:25] <dholbach> EagleScreen: it means that the package was originally signed by somebody whose public key you don't have in your keyring - that's safe to ignore
[17:25] <dholbach> alright
[17:26] <dholbach> cd qutim-0.1
[17:26] <dholbach> grep -ri massanger *
[17:26] <dholbach> this will search for "massanger" in all files, ignoring if it's upper case or lower case
[17:26] <dholbach> seems like we have two files to fix
[17:26] <dholbach> debian/qutim.desktop:GenericName=Instant Massanger
[17:26] <dholbach> debian/qutim.1:qutIM \- Qt Instant Massanger
[17:27] <dholbach> one of them is the .desktop file (that creates the menu entry) which is mentioned in the bug report
[17:27] <dholbach> and also there's the manpage
[17:28] <dholbach> now please run:
[17:28] <dholbach>   sed -i 's/Massanger/Messenger/g' debian/qutim.desktop
[17:28] <dholbach>   sed -i 's/Massanger/Messenger/g' debian/qutim.1
[17:28] <dholbach> this will replace Massanger with Messenger in both files
[17:29] <dholbach> ok
[17:29] <dholbach> now let's document our changes
[17:29] <dholbach> please run
[17:29] <dholbach>    dch -i
[17:30] <dholbach> 0.1-0ubuntu2 should be fine
[17:30] <dholbach> and as a description of what we did, I chose
[17:30] <dholbach>   * debian/qutim.desktop, debian/qutim.1: replaced "Massanger" with
[17:30] <dholbach>     "Messenger" (LP: #346528)
[17:30] <dholbach> (it's good practise to wrap lines at 80 characters)
[17:31] <dholbach> bug number two fixed too :-)
[17:31] <dholbach> <roxan> QUESTION: isn't typo fixed a better discription in this case ?
[17:31] <dholbach> roxan: sure, you can do that too - I usually prefer to explicitly mention what was wrong and how I fixed it :)
[17:32] <dholbach> alright... let's talk a bit about sponsoring and patch review
[17:33] <dholbach> once you have a nice patch, you obviously attach it to the bug report so people can check it out
[17:33] <dholbach> but for it to be included in Ubuntu (if you can't upload source packages yourself yet), you need to subscribe the reviewers team
[17:33] <dholbach> https://wiki.ubuntu.com/SponsorshipProcess explains the process in detail
[17:34] <dholbach> essentially you subscribe ubuntu-main-sponsors for packages in main or restricted
[17:34] <dholbach> and subscribe ubuntu-universe-sponsors for packages in universe or multiverse
[17:34] <dholbach> they'll give you feedback and upload the patch once it's ok
[17:35] <dholbach> <EagleScreen> QUESTION: I have a build problem: http://pastebin.ca/1550481
[17:35] <dholbach> <rugby471> EagleScreen: try installing qmake & qmake-dev
[17:35] <dholbach> ^ for those of you wondering why   debuild -S   doesn't work in the case of qutim
[17:35] <dholbach> thanks rugby471
[17:36] <dholbach> ok... let's move on to our third bug  :)
[17:36] <dholbach> some questions first
[17:36] <dholbach> <rugby471> QUESTION: sometimes debdiffs take quite a while to be sponsored, what are the ways that I can make sure it get's uploaded as fast as it can?
[17:36] <dholbach> rugby471: make sure the patch is tip top tested and documented very very well
[17:36] <dholbach> so reviewers don't have to go into a very long feedback loop
[17:36] <dholbach> usually you can ask in #ubuntu-devel or #ubuntu-motu too to get some help
[17:37] <dholbach> <trothigar> QUESTION: can you find out using apt which repository a package comes from?
[17:37] <dholbach> apt-cache showsrc qutim | grep ^Dir
[17:37] <dholbach> <AntoineLeclair> QUESTION: When I want to submit a fix, what do I submit? The debdiff file only?
[17:38] <dholbach> AntoineLeclair: yes in cases where you just submit a simple fix, yes
[17:38] <dholbach> again https://wiki.ubuntu.com/SponsorshipProcess has more info on the topic
[17:38] <dholbach> ok, our third bug is:
[17:38] <dholbach> https://bugs.launchpad.net/ubuntu/+source/quickly/+bug/422212
[17:38] <dholbach> for those of you who attended yesterday's session, you will know what it is about
[17:39] <dholbach> also you'll see that Markus Korn filed the bug after the session because he was interested in it :-)
[17:40] <dholbach> in most cases you can safely use the "apt-get source" command to obtain the source
[17:40] <dholbach> as I know that quickly is maintained in Launchpad's Code hosting (be sure to visit the session later this week!), we'll get the latest trunk of quickly and see if it needs fixing there
[17:41] <dholbach> please run
[17:41] <dholbach>   bzr branch lp:quickly
[17:41] <dholbach> this will get the latest trunk of quickly
[17:41] <dholbach> this might take a little bit as it gets the whole history of quickly and its development
[17:41] <dholbach> once it's done, please
[17:41] <dholbach>   cd quickly
[17:41] <dholbach>   grep -ri arborting *
[17:42] <dholbach> which... again ... will search in all directories and check for upper and lower case alike
[17:42] <dholbach> I get the following output:
[17:42] <dholbach> bin/quickly:                print _("Arborting.")
[17:42] <dholbach> bin/quickly:                print _("Arborting.")
[17:42] <dholbach> quickly/tools.py:        print _("Arborting.")
[17:42] <dholbach> so three occurences we need to fix
[17:43] <dholbach> these commands should get you there:
[17:43] <dholbach>   sed -i 's/Arborting/Aborting/g' bin/quickly
[17:43] <dholbach>   sed -i 's/Arborting/Aborting/g' quickly/tools.py
[17:43] <dholbach> I don't have enough time to go into the use of the sed command, but "-i" means "replace in place" (so modify the file)
[17:44] <dholbach> and the last "/g" means "fix all occurrences
[17:44] <dholbach> <Johan1> QUESTION : What is a trunk exactly ?
[17:44] <dholbach> Johan1: trunk is the development focus... usually projects use various branches in which small features or bugs are developed indepently of each other
[17:45] <dholbach> once they're deemed ready, they're merged into 'trunk'
[17:45] <dholbach> ... which gets released every now and then when it seems to make sense
[17:45] <dholbach> software projects often work a bit differently because of how they are set up
[17:45] <dholbach> in this case we want trunk
[17:46] <dholbach> alright
[17:46] <dholbach> once that's done, you can run
[17:46] <dholbach>    bzr diff
[17:46] <dholbach> to have another look at your changes again
[17:46] <dholbach> instead of documenting in debian/changelog, I'll show you something else this time
[17:47] <dholbach> please run        bzr commit --fixes lp:422212 -m "changed 'Arborting.' to 'Aborting.'"
[17:48] <dholbach> this will commit the change (locally) and add the log message  "changed 'Arborting.' to 'Aborting.'"  to the revision history
[17:48] <dholbach> you will be able to see it this way: bzr log | head
[17:48] <dholbach> the other great thing is that when you push the change to launchpad, it will automatically link your branch to the bug report
[17:49] <dholbach> http://bazaar-vcs.org/Documentation has more information on the topic
[17:49] <dholbach> let's try to see if we manage to fix another bug:
[17:49] <dholbach> https://bugs.launchpad.net/ubuntu/+source/qemulator/+bug/348172
[17:50] <dholbach> another nice typo
[17:50] <dholbach> this time in the qemulator package
[17:50] <dholbach>   apt-get source qemulator
[17:50] <dholbach> <EagleScreen> QUESTION: bzr log | head shows wrongly my e-mail, any thing similar to DEBEMAIL var?
[17:50] <dholbach> EagleScreen: you're right... try    bzr whoami
[17:51] <dholbach> the qemulator case is a bit different
[17:51] <dholbach>   cd qemulator-0.5/; grep -ri snpashot *
[17:52] <dholbach> will show you a few occurences
[17:52] <dholbach> some in binary files (which we can't fix) - they are translation files
[17:53] <dholbach> but before we go ahead and change Qemulator.pot and usr/local/lib/qemulator/qemulator.glade I need to explain something
[17:53] <dholbach> in our qutim and edubuntu-addon-something case we edited files in the debian/ directory
[17:53] <dholbach> these are files supplied by us (or other Ubuntu/Debian maintainers)
[17:54] <dholbach> in the case of quickly we fixed it in trunk (so where the upstream developers work)
[17:54] <dholbach> yesterday I talked a bit about how we make use of a .orig.tar.gz (that contains the source code that we get from the upstream software authors and which we don't change)
[17:54] <dholbach> we merely add the "packaging" in the debian/ directory
[17:55] <dholbach> so some maintainers decide to store patches that fix something in the source code of upstreams in debian/patches/
[17:55] <dholbach> if you
[17:55] <dholbach>   ls debian/patches
[17:55] <dholbach> you'll find there's already a patch
[17:56] <dholbach> https://wiki.ubuntu.com/PackagingGuide/PatchSystems goes into more detail about all the "patch systems" that maintainers use
[17:56] <dholbach> we have 4 minutes left, so let's make it quick
[17:56] <dholbach> run
[17:56] <dholbach>   what-patch
[17:56] <dholbach> (from the ubuntu-dev-tools package)
[17:56] <dholbach> and it'll tell you that the patch system is CDBS
[17:56] <dholbach> so please run
[17:56] <dholbach>   cdbs-edit-patch fix-snapshot-typo
[17:57] <dholbach> this will fire up a "sub shell" in which we fix the issue now
[17:57] <dholbach> now please run
[17:57] <dholbach>   sed -i 's/snpashot/snapshot/g' Qemulator.pot usr/local/lib/qemulator/qemulator.glade
[17:57] <dholbach> this should fix the issue in both places
[17:57] <dholbach> now please hit Ctrl-D (or type 'exit')
[17:58] <dholbach> if you now look at ls debian/patches/
[17:58] <dholbach> you'll see our patch file
[17:58] <dholbach> now we'd just do dch -i again to document the change we just did
[17:58] <dholbach> we'd say something like
[17:59] <dholbach>   * debian/patches/fix-snapshot-typo.patch: replace 'snpashot' with 'snapshot'. (LP: #348172)
[17:59] <dholbach> done :-)
[17:59] <dholbach> <plumstead21> QUESTION: What's the best way of finding these 'easy' bugs that newbies stand a chance of being able to fix?
[17:59] <dholbach> plumstead21: great one!
[17:59] <dholbach> a few people wrote harvest which is supposed to find those low-hanging fruit
[17:59] <dholbach> its current home is http://daniel.holba.ch/harvest
[17:59] <dholbach> it's not very pretty, so some of us are working on https://wiki.ubuntu.com/Harvest/NewUI
[17:59] <dholbach> if you're a web developer PLEASE help out!
[18:00] <dholbach> dholbach at ubuntu dot com
[18:00] <dholbach> thanks a lot everybody!
[18:00] <syedam> thanks dholbach :)
[18:00] <dholbach> and please check out #ubuntu-motu for more help
[18:00] <ogasawara> thanks dholbach!
[18:00] <c_korn> thanks. great talk
[18:00] <dholbach> https://wiki.ubuntu.com/MOTU/GettingStarted too
[18:00] <jef_> thanks :)
[18:00] <dinxter> thanks!
[18:00] <bittin`> t
[18:00] <lopo1> thanks!
[18:00] <bittin`> thx dholbach
[18:01] <roxan> Thank You
[18:01] <^arky^> thanks dholbach , another great session
[18:01] <antisa> well done

MeetingLogs/devweek0909/FixSmallBugs (last edited 2009-09-01 17:58:09 by correo)