/srv/irclogs.ubuntu.com/2008/09/02/#ubuntu-classroom.txt

* hggdh is away: walking the dogs00:53
=== picard_p1ns_kirk is now known as picard_pwns_kirk
=== hggdh is now known as hggdh|away
Socceroos_workdate -u05:00
techno_freakSocceroos_work, in your terminal05:02
Socceroos_work:D05:03
techno_freak:)05:18
techno_freak.05:20
hempaldate -u06:08
=== dholbach changed the topic of #ubuntu-classroom to: Ubuntu Classroom || https://wiki.ubuntu.com/Classroom || https://lists.ubuntu.com/mailman/listinfo/Ubuntu-classroom || Next Event: Ubuntu Developer Week: https://wiki.ubuntu.com/UbuntuDeveloperWeek | Questions about the presentation in #ubuntu-classroom-chat (prefix with QUESTION: ...) | Run date -u (in a terminal) to find out what UTC time is right now
persia:)06:12
Socceroos_workdate -me06:58
=== persia_ is now known as persia
=== ALAY1 is now known as ALAYA
rapshello : )08:18
=== AdiB is now known as adibdimitri
adibdimitri-u09:25
azmodie                                                                                                                                                                                                                                                                                                                                                                                                                               10:53
=== dholbach_ is now known as dholbach
=== hggdh_ is now known as hggdh__
Zentuxsorry, wrong window :-) annd the pw is changed for sure.15:09
=== hggdh__ is now known as hggdh
=== superm1 is now known as superm1|away
sebner~o~ \o/ ~o~16:55
dholbachAre you ready for   Ubuntu Developer Week    - Day 2?16:56
taconeno16:56
techno_freakyes!16:56
sebnerhuhu dholbach :D16:57
dholbachcome on... who's here for another day of Ubuntu Developer action? :-)16:57
taconeuh, well, then16:57
weefredyay!16:57
tacone\o16:57
techno_freak\o/16:57
Bijoyhey16:57
sebner\o/16:57
* balachmar is here16:57
luis_lopezo/16:57
fabian23_I am16:58
flutefluteme too! can we have a beijing olympics opening ceremony style countdown :)16:58
palangome too16:58
* Volans I am too16:58
emefarr_me three?16:58
dholbachwoohoo, excellent - grab something drink a snack, lean back and enjoy16:58
=== superm1|away is now known as superm1
=== fabian23_ is now known as fabia1
* takdir too16:59
=== fabia1 is now known as fabian23_
* mruiz waves17:00
dholbachalright... let's get started - my name is Daniel Holbach, I've been working with the MOTU team since hoary and work for Canonical for quite a while, trying to make developing Ubuntu as fun as possible17:00
dholbachtogether we're going to grab some low-hanging fruit and fix a bug together17:01
dholbachquestions please in #ubuntu-classroom-chat, prefixed with "QUESTION: ..."17:01
dholbachfor those of you who are participating can you please just mention which Ubuntu release you are on and if you have a fast/slow connection to the net?17:02
dholbachin here is fine17:02
Oli``8.10 - 8meg17:02
mazaalaihardy - 8meg17:02
dholbachjust fast/slow is fine :-)17:02
mruiz8.04 fast17:02
tacone8.10 , 10meg17:02
balachmar8.04 fast17:02
mazaalaifast :)17:02
dholbachI don't want you to start measuring now :-)17:02
palango8.04 fast17:02
Bijoyhardy - medium17:02
riot_le8.04 fast17:02
Oli``heh17:02
flutefluteintrepid, medium17:02
takdir8.10 - slow17:02
techno_freakhardy - medium17:03
Volans7.10 + pbuilder-intrepid - 7meg17:03
hempal8.04 Medium (relative)//17:03
gery8.10 - slow17:03
dholbachok.. 8.04, 8.10 and 7.10 should be fine AFAIK - if you run into problems or have questions, please raise it on #ubuntu-classroom-chat17:03
dholbachwe need to do some preparations first17:03
sebner8.10 16mbit :P17:03
dholbachthose of you who have a reasonably fast connection will install pbuilder17:04
dholbachplease do the following:17:04
dholbach   sudo apt-get install pbuilder devscripts17:04
dholbachthen edit    ~/.pbuilderrc17:04
fabian23_hardy slow17:04
dholbachand put17:04
dholbachCOMPONENTS="main universe multiverse restricted"17:04
dholbachinto it17:04
dholbachthen run17:04
dholbach   sudo pbuilder create17:04
dholbachwe'll let that run in the background as it will take some time17:05
dholbacheverybody else please just install devscripts17:05
dholbachpbuilder is a tool with which we can test-build source packages in a minimal environment17:05
dholbachwhat I just mentioned was the short cut, https://wiki.ubuntu.com/PbuilderHowto has more information17:06
dholbachok... while that's running, let's start looking for those low-hanging fruit :-)17:06
dholbacha while ago I started an effort called Harvest - it's basically a webpage that pulls data from various sources and displays that information per package17:07
dholbach  http://daniel.holba.ch/harvest17:07
dholbach<tacone> QUESTION: which distro pbuilder should have created ?17:07
dholbachtacone: the ones that were mentioned before should all be fine17:07
dholbachif you click on the "Sourcepackage list" link it will present you with an awfully long list of "opportunities"17:08
dholbachlet's fast-forward to http://daniel.holba.ch/harvest/handler.py?pkg=djvulibre17:08
dholbach<mazaalai> QUESTION: how I can use local mirror server in pbuilder instead of archive.ubuntu.com17:08
dholbachmazaalai: please check out https://wiki.ubuntu.com/PbuilderHowto - it should have that information17:09
dholbach MIRRORSITE="http://us.archive.ubuntu.com/ubuntu" I think17:09
dholbachok, everybody at   http://daniel.holba.ch/harvest/handler.py?pkg=djvulibre   right now?17:10
dholbachit shows three opportunities17:10
dholbach2 fedora patches17:10
dholbachand one from the "opportunities" list17:10
dholbacherrr17:10
dholbachand one from the "patches" list17:10
dholbachplease click on the  255695  link17:10
dholbachpatches means: this is a bug with a patch attached17:10
dholbachas you can see, Harvest makes it easy to gather all that kind of information about packages that you're interested in17:11
dholbachamont them are: patches in Launchpad, upgrade requests, fedora patches, if the package does not build from source right now, etc etc17:11
dholbachsometimes it takes a bit to find something suitable to work on (because you don't know the package well enough or the bug is too complicated and so on), but Harvest is a good start to find those low hanging fruit17:12
dholbachok... the bug report says something's wrong with the manpage of c44 (which is included in the package)17:12
dholbachlet's see if that's true, please run17:13
dholbach   dget http://daniel.holba.ch/motu/djvulibre_3.5.20-7ubuntu1.dsc17:13
dholbachfor those of you who attended  Packaging 101  yesterday, you already notice which files were downloaded and what they are their for17:13
dholbach<balachmar> QUESTION: do I want to do dget in a seperate folder, or does it put it into the pbuilder stuff?17:14
dholbachbalachmar: as you like it, you can run it from a special directory if you like, no problemo17:14
DarkSyranusls17:14
dholbachit downloaded a .orig.tar.gz a .dsc and a .diff.gz file17:14
dholbachshort version: .orig.tar.gz is the unmodified tarball that the software authors released on their homepage, .diff.gz the compressed set of changes we need to apply to make it build "our way" and become a nice .deb package in the end, the .dsc file contains metadata like md5sum, etc17:15
dholbachalright17:16
dholbachplease run    dpkg-source -x djvulibre_3.5.20-7ubuntu1.dsc17:16
dholbachthis will extract the tarball, then apply the compressed patch17:16
dholbach<mitesh> QUESTION: it says "dscverify: can't find any Debian keyrings "?17:16
dholbachmitesh: it's a warning, you can safely ignore it17:17
dholbach<fluteflute> QUESTION: I get dpkg-source: error: File ./djvulibre_3.5.20.orig.tar.gz has size 1359872 instead of expected 2426487 ?17:18
dholbachfluteflute: sorry for that, I'm just fixing the mistake17:18
dholbachsorry for that everybody, please run the commands again17:19
dholbachthat is:17:19
dholbach  dget http://daniel.holba.ch/motu/djvulibre_3.5.20-7ubuntu1.dsc17:19
dholbach  dpkg-source -x djvulibre_3.5.20-7ubuntu1.dsc17:20
dholbachthanks for bearing with me :)17:20
dholbachOK17:20
mruiz:)17:20
mitesh:)17:21
dholbachlet's try to find out if the problem that Mr Ralph Corderoy describes is still valid17:21
dholbachcd djvulibre-3.5.20/tools17:21
dholbachnroff -man c44.1 | less17:21
dholbachthis will display the manpage17:22
dholbachand since he alread mentions that it's around the "PPM" bit in the text, we can run:17:22
KennethVenkenls17:22
dholbachnroff -man c44.1 | grep -a1 -b1 PPM17:22
dholbachyou should see the ".SM" bit he is referring to in the bug report17:22
dholbacheverybody can see that?17:23
dholbachlet me rephrase: can you guys see that too? :)17:23
riot_leyes17:23
techno_freakyes17:23
miteshyes17:23
swingnjazzyes17:23
Oli``yeehaw17:23
balachmaryes17:24
chombiumyes17:24
dholbachgreat17:24
taconeI get  troff: fatal error: can't open `c44.1': No such file or directory17:24
dholbachjust wanted to make sure I hadn't lost you on the way :)17:24
dholbachtacone: are you in djvulibre-3.5-20/tools ?17:24
dholbachdjvulibre-3.5.20/tools17:24
taconeno ok, my fault, sorry17:24
dholbachalright, let's go on17:24
dholbachlet's all download the patch that Ralph Corderoy is suggesting17:25
dholbachI'll assume you put it into ~ for now :)17:25
dholbachplease run17:25
dholbach  patch -p0 < ~/c44.1.patch17:25
dholbachin my case it safely applied17:26
dholbachanybody got any problems?17:26
mazaalaiit must be in djvulibre-3.5.20/tools, right?17:26
dholbachmazaalai: no, it doesn't matter where you put the patch, it's just important that you are in the directory, when you run the patch command17:26
techno_freakdholbach, successful == .PM shouldn't be there?17:27
dholbachtechno_freak: I'm coming to that :)17:27
dholbach<mitesh> QUESTION : it says bash: /home/mitesh/c44.1.patch: No such file or directory17:27
dholbachmitesh: did you download the patch from the bug report to ~?17:27
chombium<chombium>QUESTION: where can i download the patch from?17:27
dholbachhttps://bugs.launchpad.net/ubuntu/+source/djvulibre/+bug/25569517:27
ubot5Launchpad bug 255695 in djvulibre "c44(1) man page outputs splurious `.SM' macro invocation" [Undecided,New]17:27
dholbachthe patch operation should take a second at best17:28
techno_freak wget -c http://launchpadlibrarian.net/16614829/c44.1.patch17:28
dholbachok... once you've applied the patch please run17:28
dholbach  nroff -man c44.1 | grep -a1 -b1 PPM17:28
dholbachagain17:28
dholbachcan you still the ".SM" bit there?17:28
riot_leno17:29
mazaalainope17:29
okar_no :D17:29
vishrdone...no17:29
chombiumnope17:29
swingnjazzok, it's gone17:29
takdirno17:29
taconegone17:29
dholbachexcellent, seems that Ralph Corderoy has done good work :)17:29
dholbachok... now17:29
dholbachas we want to fix the bug in Ubuntu we need to add a changelog entry to explain what we changed and why17:30
dholbachthis all happens in debian/changelog17:30
dholbachso please run:17:30
dholbach  cd ..17:30
dholbach  dch -i17:30
dholbachthis will fire up an editor with a template changelog entry17:30
dholbachI won't go through all the specifics in it, read the Packaging 101 log from yesterday or check out the videos on http://youtube.com/ubuntudevelopers17:31
dholbachthere's also https://wiki.ubuntu.com/PackagingGuide to find out more about it17:31
dholbachjust make sure that the top entry says "intrepid" in the first line and that your mail address and name is correct17:32
dholbach<Oli``> QUESTION: how do you change the dhc template so it uses the correct email?17:32
fabian23_and for those running hardy and gutsy?17:32
Volansfabian23_:  dch -i -D intrepid17:32
dholbachOli`` is right, I should have explained that before, for now just edit it manually, I'll tell you later how to fix it for the next times you're going to use the tool17:33
dholbachfabian23_ asks an important question: why not hardy, why intrepid?17:33
dholbachbecause we can just make changes in the current development release which is intrepid17:33
dholbachall the other releases have been closed17:33
dholbachthere's the hardy-updates process which works differently, for now the link https://wiki.ubuntu.com/StableReleaseUpdates should be enough17:34
dholbachok, let's document our changes17:34
dholbachthat's the crucial step, because our fellow developers should not have to guess where our ideas came from17:34
dholbachI'll put in something like this:17:34
dholbach  * tools/c44.1: applied patch from Ralph Corderoy to fix the manpage markup. (LP: #255695)17:35
dholbachthree things are worth noting:17:35
dholbach 1) explicitly named the files that were changed in the upload17:35
dholbach 2) I gave credit to the person who provided the fix17:36
dholbach 3) I mentioned which bug report in Launchpad this is all about17:36
dholbachin addition to that (LP: #<bugnumber>) will automatically close the bug once it got uploaded to the build daemons17:36
dholbach<tacone> QUESTION: shouldn't we use a patch system ?17:36
dholbachtacone: good question17:36
dholbachthere's going to be another session on Sep 3rd at 20:00 UTC about patch systems17:37
dholbachthis package does not use a patch system itself and directly applies changes to the source, so we'll do the same17:37
dholbachonce we're done with that, please save the file17:38
dholbachand run     debuild -S17:38
dholbachthis will rebuild the source package (not build the package itself) and refresh the .diff.gz17:39
dholbachif you run17:39
dholbach  ls ..17:39
dholbachyou will notice that there are two .diff.gz files now17:39
dholbachthe one we downloaded and the second one we created ourselves17:39
dholbachsince the question about patch system comes up again in #ubuntu-classroom-chat:17:40
dholbachif the Debian package we're attempting to fix does not add a patch system itself and patches the source inline (as opposed to adding patch files in debian/patches) we will do the same17:40
dholbach<tacone> dholbach:  running debsign failed17:40
dholbach<Coper> QUESTION: why dosen't debuild -S find my private gpg key?17:40
dholbachthat's to be expected, I'll enlighten you about it in a bit - it's safe to ignore right now17:40
chombium<chombium>QUESTION: /bin/bash: dh_testdir: command not found where can i find it? which package?17:40
dholbachchombium: sorry.....    sudo apt-get install debhelper17:41
chombiumtx17:41
dholbachok17:41
dholbachnow please run:17:41
dholbach  cd ..; debdiff djvulibre_3.5.20-7ubuntu{1,2}.dsc > djvulibre.debdiff17:42
dholbachdebdiff is a great utility that will compare the two revisions of debian source packages and print out the diff17:42
dholbachcan you all please go to http://paste.ubuntu.com and paste the contents of your djvulibre.debdiff into it and give the link to your sourcepackage here?17:43
techno_freakfluteflute, ^^17:44
dholbachwho managed to produce a  djvulibre.debdiff ?17:44
Coperdholbach: http://paste.ubuntu.com/42746/17:45
dholbachcan you please post the contents of that file on http://paste.ubuntu.com and give the link here?17:45
taconedholbach: http://paste.ubuntu.com/42747/17:45
riot_lehttp://paste.ubuntu.com/42748/17:45
dholbachCoper: looks good!17:45
vishrhttp://paste.ubuntu.com/42752/17:45
dholbachtacone: looks good17:45
palangohttp://paste.ubuntu.com/42749/17:45
KennethVenkenhttp://paste.ubuntu.com/42750/17:46
balachmarhttp://paste.ubuntu.com/42754/17:46
dholbachriot_le: looks good too17:46
swingnjazzhttp://paste.ubuntu.com/42753/17:46
Oli``http://paste.ubuntu.com/42755/17:46
Bijoyhttp://paste.ubuntu.com/42756/17:46
techno_freakhttp://paste.ubuntu.com/42757/17:46
dholbachvishr: looks good as well, I'd just indent the 2nd line of the changelog entry a bit17:46
dholbachpalango: the same goes for yours17:47
palangook17:47
dholbachbalachmar: yours is OK, I'd just wrap the line in the changelog entry17:47
dholbachKennethVenken: same as balachmar17:47
takdirhttp://paste.ubuntu.com/42758/17:47
chombiumhttp://paste.ubuntu.com/42759/17:47
dholbachswingnjazz: please the contents of the file, not the command line output17:48
dholbachOli``: same as balachmar17:48
balachmar@dholbach the famous 60 characters or something?17:48
dholbachBijoy: was that the whole file?17:48
swingnjazzuuh, sorry for that17:48
dholbachbalachmar: yeah, editors like vi make it easier for you17:48
dholbachtechno_freak: same as balachmar's :)17:48
dholbachtakdir: your changelog entry is a bit short17:49
dholbachchombium: your changelog entry is empty17:49
techno_freakdholbach, ok17:49
dholbachother than that:  W E L L   D O N E17:49
dholbachI mean...17:49
dholbach              _ _       _17:49
dholbach__      _____| | |   __| | ___  _ __   ___17:49
dholbach\ \ /\ / / _ \ | |  / _` |/ _ \| '_ \ / _ \17:49
dholbach \ V  V /  __/ | | | (_| | (_) | | | |  __/17:49
dholbach  \_/\_/ \___|_|_|  \__,_|\___/|_| |_|\___|17:49
dholbach                                           17:49
dholbacheverybody!17:49
dholbach<Volans> QUESTION: I see that in the debdiff there are entries also for autogenerated files, we should leave them or use filterdiff?17:49
dholbachVolans: good question17:50
Bijoysorry, my bad, I'll paste again17:50
dholbachconfig.guess and config.sub are build helpers that were automatically updated and can be filtered out - it makes reviewing a lot easier17:50
dholbach<Oli``> QUESTION: Is there a reason why there's a ~200 line difference in diff size between some of ours?17:50
dholbachOli``: that's due to what I just said above17:50
dholbach<balachmar> REMARK: But the command dch -i started nano not vi17:50
dholbachbalachmar: you're right17:50
dholbachso let's fix all the GPG, Name, Email address, Editor issues you all saw before17:51
dholbachif you all use bash as your shell (the default), then please edit ~/.bashrc17:51
swingnjazzhttp://paste.ubuntu.com/42762/17:51
Bijoyhttp://paste.ubuntu.com/42761/17:51
dholbachand add something like this at the end of it:17:51
dholbachexport DEBFULLNAME='Daniel Holbach'17:51
dholbachexport DEBEMAIL='daniel.holbach@ubuntu.com'17:51
dholbachexport EDITOR=vim17:51
dholbachthen save the file and run:17:51
dholbach  source ~/.bashrc17:52
dholbachswingnjazz: better, I'd just wrap the line of the changelog entry17:52
dholbachBijoy: I'd indent the second line of the changelog entry a bit17:52
dholbachother than that: GREAT17:52
dholbach<balachmar> QUESTION: So what to do now we have patched it?17:52
dholbachthat's the good question :-)17:53
dholbachlet's build the package and see if after our changes it still builds17:53
dholbachif your pbuilder command has finished, please run17:53
dholbach  sudo pbuilder build djvulibre_3.5.20-7ubuntu2.dsc17:53
dholbachthis is going to take a while17:53
dholbachin the meantime, I'm going to explain once you've found that:17:54
dholbach 1) the package still builds17:54
dholbach 2) once you installed the new package, your system still works17:54
dholbach 3) all is good17:54
dholbach(testing is crucial, but we don't do it in the 6 remaining minutes)17:54
dholbachwhat happens once all tests passed and you're happy with everything?17:55
dholbachyou'll follow the sponsoringship process17:55
dholbachSponsoring means: somebody who has upload privileges already will review your debdiff (you'll attach it to the bug in question) and if they're happy with what you've done, sign the source package with their GPG key and upload it17:56
dholbachhttps://wiki.ubuntu.com/SponsorshipProcess has more information about that17:56
dholbach(all the links I mentioned before are on https://wiki.ubuntu.com/MOTU/GettingStarted <- that's the one you should bookmark)17:56
dholbach<balachmar> QUESTION: Is there a way to mark a bug as being worked upon?17:56
dholbachvery important question17:56
dholbachyes, there is17:56
dholbachyou will click on the little arrow on the yellow bar in the middle of the bug report17:57
dholbachand set yourself as the assignee and set it to in progress17:57
dholbachas you can see: fixing Ubuntu is not always rocket science, but more a matter of detective skills and careful testing and asking questions17:58
dholbachthe door to #ubuntu-motu is always open and you can ask questions there17:58
dholbachplease read the sponsorship page carefully when asking for sponsorship17:59
dholbachany more, maybe general questions? :)17:59
dholbachwe have a minute left :)17:59
dholbachOK, we'll have a nother session on thursday17:59
dholbachfixing bugs again :-)17:59
dholbachthanks everybody, you really ROCK18:00
riot_ledo you publish this HowTo in the Wiki too?18:00
sebnerbut important ones since FF is here :P18:00
techno_freakthanks a lot dholbach :)18:00
riot_le+118:00
balachmarthanks!18:00
mazaalaithanks dholbach18:00
tacone\o/18:00
vishrthanks a lot dholbach18:00
dholbachI'll repeat what I said yesterday: I'd like to see your names connected to Ubuntu Development soon, so make me proud! :-)18:00
swingnjazzthanks to you18:00
balachmarI am going to find some fruit straight away!18:00
BijoyThank you Daniel!18:01
dholbachnext up is the unstoppable David Futcher (bobbo) who is going to introduce you to bzr18:01
dholbachthanks everybody!18:01
charliecbthx dholbach18:01
dholbachbobbo: the stage is yours :-)18:01
bobbothanks dholbach !18:01
bobboHey! My name is David Futcher and today I'll be giving you a simple introduction to the Bazaar (BZR) Distributed Version Control system (dont worry if you dont know what that means, we'll get to that a bit later on).18:01
bobboI like to answer questions, so, if you have any, please do not hesitate to ask. Prefix your question with QUESTION: and ask it in #ubuntu-classroom-chat.18:02
bobboI have never done a UDW session before, so this session may be quite short or even run over, but we will cross that bridge when we come to it. If I am going too fast at any point, please shout and #-chat and I'll slow down :)18:02
bobboSo who is all here? Raise your hand in #-chat so I can see it!18:02
sebner\o/18:02
pdragono/18:03
bobbowahey, we have some people!18:03
* palango raises his hand18:03
bobboBefore we get started we need to install some packages. Run sudo apt-get install bzr bzrtools to make sure you have everything we will need. It would also be handy if you have a Launchpad account (I guess most of you do), though its not absolutely necessary, but you might have to skip out some of the session later on.18:03
bobboshout when you have all this installed and we can get started :)18:03
bobboAwesome, everyone seems to be ready, lets get started!18:04
bobbo## What is BZR?18:05
bobbo(This section is a bit heavy on reading, but we will get to some practical examples soon)18:05
bobboazaar is a tool for helping people collaborate on open-source software. It tracks the changes that you and other people make to a group of files - such as software source code - to give you snapshots of each stage of their evolution.18:05
bobboUsing that information, Bazaar can effortlessly merge your work with other people's.18:05
bobboTools like Bazaar are called version control systems (VCS) and have long been popular with software developers.18:06
bobboBazaar's ease of use, flexibility and simple setup make it ideal not only for software developers but also for other groups who work together on files and documents, such as technical writers, web designers and translators. (I used Bzr when writing this session)18:06
bobboMany traditional VCS tools require a central server which provides the change history or repository for a tree of files.18:07
bobboTo work on the files, users need to connect to the server and checkout the files. This gives them a directory or working tree in which a person can make changes.18:07
bobboTo record or commit these changes, the user needs access to the central server and they need to ensure they have merged their work with the latest version stored before trying to commit. This approach is known as the centralized model and its not too great.18:07
bobboThe centralized model has proven useful over time but it can have quite a few drawbacks. It makes it harder for new developer to come to the project and make more than a few small patches, while with Bzr, a developer can easily create a branch that adds large new features or massive code changes.18:08
bobboDistributed VCS tools (like bzr) let users and teams have multiple repositories rather than just a single central one. In Bazaar's case, the history is normally kept in the same place as the code that is being version controlled.18:08
bobboThis allows the user to commit their changes whenever it makes sense, even when offline. Network access is only required when publishing changes or when accessing changes in another location.18:08
bobboEveryone with me so far?18:08
palangoyes18:09
takdiryup18:09
pdragonyep18:09
Tindoryep18:09
swingnjazzyes18:09
bobbogreat!18:09
jpdsANSWER: Yep.18:09
chienchouchenyes18:09
bobboThats the end of the boring reading stuff, now onto some examples18:09
bobboOK, so now you what what BZR is, and what it allows us to do, lets try it out. We are going to create a branch of GNU Hello. We need to grab the programs tarball and extract it:18:10
bobboOpen up a terminal and run:18:10
bobbo    wget http://bobbo.me.uk/ubuntu/udw/hello-2.3.tar.gz18:10
bobbo    tar -xvf hello-2.3.tar.gz18:10
bobbo    cd hello-2.318:10
bobboQUESTION: What are the differences between bzr and git?18:10
bobbonemphis: I am not too sure (I have never used Git), but reading http://bazaar-vcs.org/BzrVsGit should tell you all you need to know :)18:11
bobboRunning 'ls' in your newly extracted hello-2.3 dir should show you the whole source tree for GNU Hello18:11
bobbonow we need to tell bzr to look after this source for us18:12
bobbo    bzr init18:12
bobbo(everything indented with 4 spaces should be run in a terminal :)18:12
bobbo<okar_> QUESTION: what does ubuntu/cannonical use bazaar for?18:12
bobbookar_: Ubuntu/Canonical use it for quite a few things18:13
bobbomainly just for storing source code to applications we maintain18:13
bobbobut it is also used for storing documentation and for application packaging for the MOTU team18:13
bobbobzr init will create all the files and directories that bzr needs to be able to add revisions in ./.bzr. You normally wont need to touch anything in that directory, but its good to know it is there so you dont accidentally hose it and lose all your revision history, which isnt too awesome.18:14
=== arkara is now known as wantilles
bobboOK, now we have told Bzr to setup revision control in the directory, we need to tell it where all out files are:18:15
=== wantilles is now known as arkara
bobbo    bzr add18:16
bobboThis should recurse through all the directories and add all the files it can find to bzr.18:16
bobboYou will need to do this whenever you add a file to your source code (or whatever else you are making).18:16
bobboNow bzr knows where your files are, we are ready to make our first "commit"18:17
bobboThis basically takes a 'snapshot' or 'version' (hence version control system) of the current code:18:18
bobbo    bzr commit -m "Initial commit of GNU Hello"18:18
bobboThe -m flag supplies a little message that you should use to explain what you have changed in this revision. You will see a bit more about that in a second.18:18
bobboNow we are going to make a little edit to the GNU Hello source.18:20
bobbo    cd src18:20
bobbo    sed -i 's/world/universe/g' hello.c18:20
bobbo    cd ..18:20
bobboWe can now use bzr to generate a diff of the changes we just made (note: we dont need to do this all the time, just generating a diff is really useful):18:21
bobbo    bzr diff18:21
bobboThis is handy for creating a patch in order to fix a bug. Just pull the branch down, make the changes and attach the output of bzr diff to the bug.18:21
bobboOli``: QUESTIONS: Do bzr commands always have to be in the same dir as you ran the init? Or can you run them from child dirs?18:22
bobboOli``: They can be run from any child directory :)18:22
Oli``Superawesome18:23
bobboNow we can commit our changes to the branch. We will use the -m flag to describe what we have done to the code: "Replace 'world' with 'universe' in hello.c"18:23
bobbo    bzr commit -m "Replace 'world' with 'universe' in hello.c"18:23
bobboNow we can look at our branches history:18:25
bobbo    bzr log18:25
bobboEach time you commit to a branch an entry is added to the log. This is handy so you can check back and see where and when you might have introduced a bug and what you changed to introduce it. This is obviously much easier than blindly hunting for a way to fix a bug.18:26
bobboEveryone ready to move on?18:27
pdragoni am18:27
Tindorme too18:27
palangoyes18:27
bobbo## Launchpad Integration18:27
bobboBzr integrates with Launchpad.net quite easily (both Bzr and Launchpad are developed or at least sponsored by Canonical). Launchpad provides free code hosting for bazaar branches, which I am going to show you just now.18:27
bobboThis bit will require you to have your LP account setup correctly with SSH keys, which can be fiddly, but I'll try to help you if you get any problems :)18:28
bobboJump onto Launchpad.net and log into your account.18:29
bobboNow you should hit the "Code" tab, which will take you to a page showing all the branches that you have registered before or are watching etc. (If you havent used Launchpad code hosting at all before, this page will be pretty empty).18:31
bobboHit the "Register Branch" button in the top right corner and it should take you to a form where we can setup hosting for a bzr branch.18:32
bobboYou can skip the owners box as this branch is just for demonstration purposes, but in the future you can use this to register branches under team names etc. (Useful for when you need to give more than one person access to branch, you setup a team, get your fellow devs to join and they will automatically be able to push to branches hosted under that team name).18:32
bobboWe dont need to give a project name (Launchpad puts any branch that doesnt belong to a project in a pseudo-project called '+junk'. See the branch location in bold at the very top of the form).18:33
bobbo<tuxmaniac> QUESTION: not really a question. But bzr seems to have svn import facility. How reliable is this? does it import all change histories and every other detail ?18:34
bobboI am not completely sure (I have never used SVN, jumped straight in with bzr), but http://bazaar-vcs.org/BzrForeignBranches/Subversion#limitations should tell you any problems you will have18:35
bobboThe name is just a short name for the branch, so in this case we could use something like 'gnu-hello' or 'bzr-example'.18:35
tuxmaniacthanks bobbo18:35
bobboFor branch type we want "Hosted", so that Launchpad does all the hosting for us (we dont need to setup our own servers to host the code, though this is perfectly possible and very handy if you are using Bzr at work, where you can have a server sitting, controlling your version control).18:35
bobboFor title put something like "GNU Hello Branch to Demonstrate BZR's Awesomeness" and set the description to "UDW Demonstration branch to show how to use BZR".18:36
bobboCheck it all looks ok and hit submit. We should now be on a summary page for your branch.18:36
bobboshout in #-chat when you are there!18:37
bobboIn the right hand bar it will show you who owns the branch (in this case it is you) and who subscribes to the branch (it is possible to subscribe to a branch, so you get emailed everytime someone pushes some new revisions).18:37
bobboOn the top it has the branch name and description you specified, but the really useful part of this page for us is the bit in bold underneath the description. The bzr command next to "Update this branch" (which should look something like "bzr push lp:~bobbo/+junk/bzr-example". This command can just be copied and pasted into a terminal and should upload all your new changes to the branch.18:38
bobbobut dont paste it in just yet!18:39
bobbofirst of all we need to tell bzr we will be working with Launchpad18:39
bobbo    bzr launchpad-login18:40
bobbosorry:18:40
bobbo    bzr launchpad-login <your_lp_id>18:40
bobbo*now* run the command Launchpad just generated for you18:41
bobbo This should ask you for your Launchpad SSH key password and then upload your branch to launchpad.18:41
bobbosorry!18:43
bobbowe need to push with the --use-existing-dir flag because this is the first push we are doing of this branch18:43
bobbobzr push <location_lp_gave_you> --use-existing-dir18:43
bobbotuxmaniac> QUESTION: Is it because no project name was given and everybody is using the same branch or some such?18:44
bobbonope, I dont think so, Launchpad just has hissy fits if you dont do things the way it wants to :P18:44
bobboRight everyone managed to upload their branch?18:45
pdragonworked for me18:46
bobboGreat, seems to have worked for most people18:47
bobboOk now to check on your Launchpad hosted branch. Refresh the page in your browser (or surf back to it if you closed the tab/window).18:47
bobbo<swingnjazz> What is meant by  <your_lp_id> in the bzr launchpad-login?18:48
bobboswingnjazz: Just your normal launchpad username18:48
bobboHas everyone managed to get that to work?18:49
bobboSuccess everybody. Well done!18:50
bobboWe have about ten minutes left, I was going to talk about the concept of branching and merging, but if I start now we will probably run out of time...18:50
bobbo<mok0> QUESTION: how would you go about maintainiing a package in bzr?18:51
bobbomok0: I havent personally done it yet, but james_w (Resident Ubuntu BZR Guru) is hosting a session on Thursday that will cover exactly that18:52
mok0Cool18:52
bobboAnyone that is interested in packaging with bzr, I would highly recommend you go along to that18:52
bobboCorrection: I messed up, James_w's session is on Wednesday18:53
bobbo<ktenney> QUESTION at one time I had the branch revision # in my prompt, how is that done?18:53
mok0... tomorrow18:53
bobboyou can view the current revision number by running "bzr revno"18:54
bobbo<tacone> QUESTION: how can I plug another abbreviation like lp: in bzr ? like work: or dev: or..18:54
bobboI think this is all handled from within Bzr's codebase itself18:54
bobbobut BZR is highly modular, so it probably wouldnt be impossible to plug in other prefixes18:55
bobboHas anyone got any more questions?18:56
tuxmaniacbobbo: you missed mine18:57
bobbotuxmaniac: sorry!18:57
bobbo<tuxmaniac> question: what if i want to use a hosting service other than LP? how do I indicate that to bzr. (like we do bzr launchpad-login <userid>)18:57
bobboBzr servers can be setup fairly easily, but of course (as I said above) you will lose out on being able to use the lp: quick prefixes18:58
bobboso instead of bzr push lp:name/project/branch it would be "bzr push bzr+ssh://server/branch_location" or something similar18:59
bobboktenney> QUESTION can you run bzr commands from outside the checkout tree?18:59
superm1i think time is up on the last talk, bobbo could you wrap up so I would be able to get started?19:00
bobboNo, you have to run bzr commands from within the directory you ran 'bzr init' in, or any of its child directories19:00
bobbosuperm1: sorry!19:00
bobboOK, I'll be happy to answer anymore questions in /msg19:00
bobbonow for Kernel module packaging with DKMS -- MarioLimonciello (superm1)19:00
superm1thanks :)19:01
superm1Hi everyone, my name is Mario Limonciello.  You may know me from things such as Mythbuntu & Ubuntu development.  I'm here today to talk to you a little bit about a project that I maintain called DKMS.19:01
superm1I assume that most of the people here have heard about DKMS, so I'll try to be brief in my overview of it.  DKMS stands for Dynamic Kernel Module System (http://linux.dell.com/dkms/).19:01
superm1It's original purpose was to allow the ability to ship updated versions of kernel modules without necessarily having to rebuild the kernel or needing to rebuild the kernel modules themselves again every time the kernel was upgraded.  Timing of new kernel releases and seeing patches get upstream don't always mesh well with release schedules, so it was intended to be an interim solution, not a substitute for submitting things upstream..19:01
superm1This original purpose has worked very well for Dell and the different distributions shipped on pre-installed laptops (RHEL, SuSE, & Ubuntu).  Fortunately, the way the DKMS framework was assembled, it has gained several other very useful purposes.19:02
superm1Starting with Intrepid, all users of proprietary graphics kernel modules will be using DKMS to maintain the kernel module that ships with the driver.  This means it will be significantly easier to add newer drivers to Ubuntu releases and less of a maintenance overhead for the kernel team that was previously maintaining linux-restricted-modules and it's 150MB+ source package.19:02
superm1Also, it ends up being a useful debug tool.  DKMS allows the creation of packages with both the source and binary modules self contained.  This means that users will be able to install a package and then be able to test it on a variety of kernels other than the original intended kernel.19:03
superm1So, now that you have a pretty basic idea of what DKMS has been used for thus far, I'll give you an example of how to use it.19:03
superm1The first example we're going to go into is the basic updated ethernet driver.  As you may have heard, Dell is going to be shipping Ubuntu on it's Vostro line of laptops.19:04
superm1There unfortunately was a very bad bug that was encountered shortly after 8.04 was released preventing the ethernet adapter from working.  A patch was developed that is now included in 8.04.1.  Users will be able to upgrade to 8.04.1 after receiving their machines, but performing the upgrade without an ethernet driver is a little bit difficult.  Here's an overview of how we got around that issue.19:04
superm1Ideally i'd like people to follow along19:04
superm1i'll try to give the steps as generically as possible so that you can try this on the last few ubuntu releases19:05
superm11) Install DKMS on your machine.  The version in hardy is a little bit old, but the version in Intrepid is up to date.  Until the backport is ready, I'd recommend grabbing the latest version from http://linux.dell.com/dkms/.  This is the same package that is in Intrepid.19:05
superm12) Grab the realtek ethernet driver that shipped with 8.04 from http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-hardy.git;a=blob_plain;f=drivers/net/r8169.c;hb=46d798f10f53bf6814cb6b429f45e660b0a9aee4 .  Save this file as r8169.c19:06
superm13) Grab the patch(es) that needed to be applied to make the card function: http://pastebin.com/m5fed36a7 .  Save this as r8169-8.04.1.patch19:06
superm14) Create two directories, /usr/src/r8169-2.2LK/ and /usr/src/r8169-2.2LK/patches.  I'll explain a little bit later why this naming scheme was chosen.19:06
superm15) Copy r8169.c into /usr/src/r8169-2.2LK19:07
superm16) Copy r8169-8.04.1.patch into /usr/src/r8169-2.2LK/patches19:07
superm17) Create a basic kernel Makefile in /usr/src/r8169-2.2LK/Makefile.  You can grab the one I've made from http://pastebin.com/f2ed728e2 . This Makefile just lists the different objects that get linked together.  Some modules won't have very complex Makefile's (such as this one)19:07
superm16) Now, we'll craft a DKMS control file to explain what to do with these pieces.  This file explains to DKMS exactly what we will be doing, what the packages is called, what the modules are named etc.  Take a look at http://pastebin.com/f5bea78be19:08
superm1so, first the obvious ones:19:08
superm1 a) The PACKAGE_NAME field describes the name of the DKMS package we are making19:08
superm1 b) The PACKAGE_VERSION field describes the version of the package we are making.19:09
superm1 c) the CLEAN line explains exactly what needs to be cleaned up and how to do it19:09
superm1you'll find these 3 in all packages dkms control files19:09
superm1 d) BUILT_MODULE_NAME[0] is for the first kernel module we are creating.19:09
superm1this is listed as a vector because you can build many modules from a single dkms packages19:10
superm1*package19:10
superm1e) PATCH[0] lists the patches that get applied to the pristine module prior to the build19:10
superm1f) DEST_MODULE_LOCATION[0] describes where we will be installing the module to on the system.  By default updates/ is higher priority than the normal kernel driver locations when module dependencies are calculated19:10
superm1 g) AUTOINSTALL describes whether we will automatically rebuild and reinstall on newer kernel releases.  I'll talk more about this later.19:11
superm1There are a lot of other very complicated things you can do with DKMS, so this is a very basic example only listing the above options.19:11
superm1so now that you have an idea of what's in the control file19:11
superm17) Place this DKMS control file in /usr/src/r8169-2.2LK/dkms.conf19:11
superm1well I suppose i should have asked for questions sooner, so i'll interrupt this and answer quickly before carrying on:19:13
superm1QUESTION: what are we doing precisely ?19:13
superm1so what this is doing is replaying how a DKMS package was created a few months ago in a real life situation19:14
superm1this example actually happened, so this is how we (Dell) got around it19:14
superm1okay i'll pick back up then - feel free to interject as necessary as i keep going19:15
superm18) Add the package to the DKMS build system.  All the pieces are ready now, so this registers the package on  the system.19:15
superm1sudo dkms -m r8169 -v 2.2LK add19:15
superm19) Install the headers for your current running kernel so that we can build against it.19:15
superm1sudo apt-get install linux-headers-`uname -r`19:16
superm19) Build the module.  Once you've added a module, bash-completion will allow you to tab complete a lot of these fields.19:16
superm1sudo dkms -m r8169 -v 2.2LK build19:16
superm1the build process should complete without any error19:17
superm1this means that the kernel modules are "available" on your system, but not in use anywhere19:17
superm110) Now our module is built and ready to use.  We can build for additional kernel versions by specifying the -k field.  If we were looking for some widespread testing of this module, we may want to put it on our PPA.  The latest version of DKMS has support to build debian source packages just for this purpose.19:17
superm1sudo dkms -m r8169 -v 2.2LK mkdsc19:18
superm1those familiar with packaging (or at least have attended recent talks), should know that this is the file that describes your package19:18
superm111) You will have a dsc and tar.gz.  You will just need to create a .changes file that you can dput (outside the scope of this howto) and sign it with your GPG key.19:18
superm112) If you wanted to distribute this without a PPA, you could issue this command to build a binary deb for users to use:19:19
superm1sudo dkms -m r8169 -v 2.2LK mkdeb19:19
superm1similar functionality is available for creating driver disks, and packages for other distributions.  of course this is an ubuntu centric talk, so I'll only talk about mkdeb/mkdsc19:19
superm1Either way, you will have files in /var/lib/dkms/r8169/2.2LK that can be distributed.  Now the thing that I didn't talk about here was that AUTOINSTALL directive.19:20
superm1If you know that this is only necessary for a single kernel release, you may want it to not AUTOINSTALL.19:20
superm1If you know exactly when the support is available, there is functionality to indicate when the package is marked OBSOLETE_BY.  This and other advanced features are discussed a bit more in detail on the man page.19:20
superm1For our case we knew that the support was available in the next kernel ABI, so we were able to define OBSOLETE_BY to be 2.6.24-18.  This means that the DKMS package will remain on the system, just dormant.  Users will be able to remove it themselves or let it sit around without doing any harm19:21
superm1Now, For some other examples of how DKMS is used, I'd recommend taking a look at the source for fglrx-installer, nvidia-drivers-*, lirc, and qemu.19:21
superm1the intrepid versions of each of these packages uses DKMS to rebuild kernel modules independently of the running kernel19:22
superm1hey each adapt DKMS into their packaging quite well.19:22
superm1*they19:22
superm1there is also a video and a thorough wiki page describing some more about DKMS usage at https://help.ubuntu.com/community/Kernel/DkmsDriverPackage and http://blog.phunnypharm.org/2008/07/dkms-presentation.html respectively.19:23
superm1That's about what I wanted to walk through.  The biggest take away is that by using DKMS, the hardest part of delivering fixed modules should be coming up with the fixes, not necessarily figuring out the right way to package them and keep them maintained19:24
superm1so, does anyone have any questions?19:24
superm1well then i suppose i'll end up wrapping up a bit early :)  Feel free to send any questions that you may come up with later to the DKMS mailing list or to poke me on IRC if it's something small/quick19:26
mok0thanks, superm119:27
superm1well since there was one more question, "<tacone> giving a little overview on what dmks precisely is"19:28
superm1so i'll try to go a little more in detail19:28
superm1so it's a Dell developed framework for situations just like these.  Before we were dealing with Ubuntu, getting some very large patches into RHEL kernels w/ stable ABIs was very difficult19:29
superm1often to enable things like audio, you would have very invasive patches that would be rolled into the next RHEL release, but the schedule for releases fit well outside the schedule for launching the workstation or laptop19:30
superm1working closely with Ubuntu, this is a lot easier and not necessary for those particular purposes.  Ubuntu does have a stable release update policy, so rather than shipping a lot of DKMS'ified drivers, it's just when the corner cases come about that we really use it19:31
superm1in trying to be good netizens, this is one of the things that we try to contribute outside of simple hardware enablement19:32
superm1<tacone> Q: what's the point of DKMS ? to compile a new driver against a new kernel release automatically ?19:33
superm1yeah, that's the biggest advantage that can get taken away with it19:33
superm1since it's an extendable framework, you can even include patches in your dkms package so that newer kernels that would normally prevent compiling due to ABI changes don't fail.19:34
superm1alberto added a patch to the nvidia-glx 177 package for this purpose on the 2.6.27 kernel19:34
superm1also to my knowledge, Sun has started to use it for virtualbox modules19:34
superm1Q: <tacone> you can prevent a compile from failing ? <tacone> vodoo ?19:35
superm1yes, and yes.  well actually no.  but if you know that this will be used with other kernels, and know where it will be breaking, you can include patches directly in the DKMS patch for those different kernels.  This means that lets say RHEL had 2.6.18 and we had 2.6.24.  If you wanted to use this same package on both systems, you could create a patch that allows it to compile against 2.6.18 that only gets applied when the user tries to u19:36
superm1se it on 2.6.1819:36
superm1<albert23> QUESTION: can I use DKMS to build an i386 deb on amd64?19:36
superm1Hum.  That's an interesting question.  I can't say I've experimented personally on doing this.  I would think so, but you will have to modify your build line and/or Makefile to be sure to choose a 32 bit compiler19:37
superm1i'd be more confident of it finishing properly if you were to do it in an i386 chroot19:38
superm1Q: <tacone> so DKMS allows you to distribute patches for different kernels into just 1 package, right ?19:38
superm1Yes.  Of course if there is a newer kernel that was released needing a new patch, you can't predict the future in the package.  You'll have to release a new package that includes that new patch.  You don't have to worry about breaking earlier kernels though since it's conditionally applied19:39
superm1this is why there are systems like the PPA system available though. you'll just need to publish a newer source package with that patch included19:40
superm1in the cases of the more widespread use (like  fglrx and nvidia), such patches would be done in formal stable release updates19:40
superm1OK, any more questions?19:41
superm1OK, well i'll wrap up once more then.  Thanks again for everyone who listened in!19:43
leonardrtap tap19:58
barryapologies: my wife injured her foot over the weekend and i have to pick up my son from school.  i'm going to miss the first 10-15 minutes of this class19:58
leonardrwe'll see you soon, barry20:00
=== thekorn is now known as thekorn__
=== thekorn_ is now known as thekorn
leonardrhi, everybody20:00
=== thekorn__ is now known as thekorn_
=== emgent`NL is now known as emgent`nl
leonardrMy name is Leonard Richardson. I'm on the Launchpad Foundations team and I'm the co-author of the O'Reilly book "RESTful web Services".20:00
leonardrI'm here to talk about the Launchpad web service API that we released a few weeks ago.20:01
leonardrI'll do a slow infodump and then take some questions. if you have questions in the meantime just put them in #u-c-c20:01
leonardr1. Intro20:01
leonardrFirst, we've got docs talking about the API here: https://help.launchpad.net/API20:02
leonardrPut simply, we've created an easy way for you to integrate Launchpad into your own applications.20:02
leonardrIf you perform the same tasks on Launchpad over and over again, you can now write a script that automates the tasks for you.20:02
leonardrYou don't have to rely on fragile screen-scraping.20:02
leonardrIf you're a developer of an IDE, testing framework, or some other program that has something to do with software development, you can integrate Launchpad into the program to streamline the development processes.20:02
leonardrIf you run a website for a project hosted on Launchpad, you can get project data from Launchpad and publish it on your website.20:03
leonardrAnd so on. You'll eventually be able to use the API to do most of the things you can do through the Launchpad web site.20:03
leonardr2. Tools20:03
Yasumotols20:03
leonardrThe simplest way to integrate is to use launchpadlib, a Python library we've written.20:04
leonardr(see https://help.launchpad.net/API/launchpadlib)20:04
leonardrThis gives you a Pythonic interface to the Launchpad API, so you don't have to know anything about HTTP client programming:20:04
leonardr>>> launchpad.me.name20:04
leonardru'leonardr'20:04
leonardr>>> launchpad.bugs[1].title20:04
leonardru'Microsoft has a majority market share'20:04
leonardrBut it's also easy to learn the API's HTTP-based protocol and write your own client in some other language.20:04
leonardr(see https://help.launchpad.net/API/Hacking for that)20:05
leonardr3. Roadmap20:05
leonardrRight now the web service publishes information about people, bugs, and the Launchpad registry (the projects, milestones, etc.).20:05
leonardrWe've divided up the remaining work by team. The bugs team is in charge of publishing bugs through the web service, the code team is in charge of publishing branches, and so on.20:05
leonardrI got information from the team leads about where this, publication of their data through the web service, fits in their priorities for the next 3-4 months.20:06
leonardrI think it's important to tell you this to set expectations--you might have a cool idea for a program but you won't be able to write it until we publish the objects you need20:07
leonardrBugs: A top priority. Bugs are almost completely published right now. The big thing missing is bug search, which should come online within a few days.20:07
leonardrRegistry (projects, milestones, etc.): A top priority. We're working on this in the Foundations team now.20:07
leonardrCode: Branches will be published soon.20:07
leonardrSoyuz: There will be some basic objects published to help with the Ubuntu workflow.20:08
leonardrThe translations, answers, and blueprints teams don't plan to work on this in the next 3-4 months.20:08
leonardrThat's my infodump, so i'll take questions now.20:08
leonardr<thekorn_> QUESTION: are there plans for 'official' bindings for other languages?20:09
leonardrno, we're only writing an official client in Python20:09
leonardroh, actually20:09
leonardrflacoste reminds me that we'll probably also write a javascript client for use in Ajax applications20:09
leonardrand because we publish the capabilities of our web service in WADL documents, it'll be easier to write a client in some other language than if you were writing the whole client from scratch20:10
=== mcas_away is now known as mcas
leonardr<qense> I couldn't find a good WADL library for PHP...20:11
leonardrthat's a good point. WADL support itself isn't very good in a lot of languages, because it's a new standard20:11
leonardr<charliecb> leonardr: QUESTION: What is WADL ?20:16
leonardrgood question20:16
leonardrfirst, here's the url20:16
leonardrhttps://wadl.dev.java.net/20:17
leonardrit's an XML vocabulary, the name stands for Web Application Description Language20:17
leonardri think of it as a kind of super-enhanced version of HTML forms20:17
leonardrwhen you get an HTML form in your browser, you know that you can send data to a certain URL, formatted a certain way, and something will happen20:18
leonardrWADL is a way of talking about which HTTP requests you can send to URLs. it lets you specify what the data should look like, in more detail than HTML forms allow20:18
leonardrand it also lets you specify what's likely to come back in response to the HTTP request20:19
leonardrif you look at the reference documentation20:19
leonardrhttps://edge.launchpad.net/+apidoc20:19
leonardr(which is out of date, but that'll be fixed soon)20:19
leonardrthat document is generated from the WADL document using an XSLT transform20:19
leonardryou can see that it talks about what kinds of objects there are on the web service, what data they contain, and what you can do to them20:20
leonardryou can use that information to generate docs, or you can use it to go from your mental picture of what you want to do to launchpad, to an HTTP request that will have that effect20:20
leonardr<charliecb> leonardr: QUESTION: How can i delete a branch over the web-api ? and can i delete a project over the web-api ?20:21
leonardri don't think the web service publishes branches yet20:21
leonardrgive me a minute to look into the project question20:22
leonardrwell, there's no way to delete projects right now, but it's likely that there will be something of that kind later, even if it's only to help admins delete unapproved spam projects20:23
leonardrassuming we did publish branches now, and you could delete them20:24
leonardrin launchpadlib, you would probably call a method on the branch object .delete()20:24
leonardrthis would translate into an HTTP request that invoked a POST operation on the branch object20:24
leonardri hope that answers your question--i can come back to it if now20:25
leonardr<qense> QUESTION: Does an API request user more or less bandwidth?20:25
leonardrit depends on what you're doing20:25
leonardrif you want the details of your user account, or a bug, it'll be a lot less bandwidth20:25
* leonardr runs a quick test20:26
leonardryeah, about 2-3k for a bug in the API versus 25k on the website20:26
leonardrit's about the same size for a bug in the API as for the textual representation of a bug at /+bug/[number]/+text20:27
=== leonel_ is now known as leonel
leonardrbut if you get a huge list of bugs it's going to be 75 * the size of a bug20:27
leonardrand you probably wouldn't make that kind of request on the website20:27
leonardrso depending on usage, you could use a lot more, even though individual objects take less data20:28
leonardrto represent20:28
leonardr<qense> QUESTION: Is there a page (or trunk) where you can watch the new API changes in detail?20:28
leonardrAPI changes land on Launchpad trunk, and sometimes on launchpadlib trunk. There's no page listing the changes in detail, but every week i write a summary of the week's progress on the launchpad news blog20:29
leonardrhttp://news.launchpad.net/category/api20:29
leonardrflacoste points out that you can also diff the wadl file to see what's new, because the wadl file gives a complete description of the web service20:30
leonardr<tacone> QUESTIONS: when will attachment sending be implemented ?20:32
leonardr(this is attachments to a bug)20:32
leonardrI'm pretty sure the bugs team is working on that now. I may change the way it works in the future because I think it's a little hacky. But if I'm right it should be in sometime this week.20:32
leonardr<tacone> QUESTION(2): is it possible to delete a comment from your project, using the api ?20:33
leonardrIn general, if it's possible in Launchpad, it's likely that we will eventually add it to the web service.20:34
taconeit's not possible in launchpad, or hidden :)20:34
leonardrNothing will show up in the web service that's not already present in Launchpad first.20:35
leonardrIt sounds like flacoste in #chat is saying that that's a feature the bugs team is working on.20:35
leonardrThey'll get it into Launchpad and then they'll export it through the web service.20:35
leonardr<qense> QUESTION: What are some nifty things the API can do and everyone should know about?20:36
leonardrRight now the coolest thing is probably the scriptable access to bugs20:36
leonardrI think that's the most interesting part of Launchpad that's been exposed to far.20:37
leonardrFor me most of the excitement is behind the scenes. We have a design that makes it very easy for the bugs, code, etc. programmers to publish their objects through the web service without having to learn a lot about how the web service works.20:37
leonardrAnd our design also makes it easy to write a loosely-coupled client like launchpadlib20:38
leonardr<thekorn_> QUESTION: to understand this right, the functionallity of the API will always be a sub-set of the functionallity provided by the web interface?20:38
leonardrI never like to say "always", but it's pretty likely that we won't publish features through the web service that aren't present in the web site20:39
leonardrCertainly not generally useful things like hiding spam comments.20:39
leonardrBut we do have _architectural_ features on the web service, like caching, that aren't on the website.20:39
leonardrAnd in the future the line between the two might blur: we might have some special way of performing batch operations through the API that wouldn't make sense to expose through the website.20:40
leonardr(that's just an example, we're not actually planning that)20:40
leonardr<qense> QUESTION: What are things you should watch out for when using the API?20:40
leonardrIf you're using launchpadlib, make sure you have a cache directory that you reuse between runs of your program. This will save you a huge amount of time.20:41
leonardrBut also note that launchpadlib's cache is not thread-safe. If you're running multiple incarnations at once, you'll need to give each one a separate cache directory.20:41
leonardrBe careful when iterating over lists, because the list might be enormous.20:42
leonardrIt's usually safer to slice a list and iterate over the slice20:42
leonardrIf you're writing your own client you'll need to follow some good HTTP practices so you don't waste time and bandwidth. I talk about most of those in the hacking document.20:43
barryleonardr: isn't launchpadlib's cache based on httplib2?20:43
leonardrhi, barry20:43
leonardryes, launchpadlib is based on httplib2, and httplib2's FileCache is also not thread-safe20:43
barrythx20:44
leonardr<thekorn_> QUESTION: launchpadlib: why is the no default directory set for caching but a temp dir is used20:44
leonardrIf I understand your question correctly, it's because I didn't want to dictate a directory structure to launchpadlib users20:44
leonardr<mok0> QUESTION: how does one develop and test code without doing weird stuff to Launchpads bug database?20:44
leonardrI believe you can make your code run against the staging server, which gets wiped every night. barry, is that right?20:45
barryleonardr: right20:45
flacosteand it's the default20:45
leonardrYou can specify which server to run against when you create a Launchpad object20:45
mok0thx20:45
barryyou also don't need to worry about spamming the world when testing against staging, since it doesn't send emails20:45
leonardrThe example in https://help.launchpad.net/API/launchpadlib shows how to run against staging20:46
leonardr<jpds> QUESTION: Why does running: ./setup.py install on lp:launchpadlib try to download and install a ton of stuff I have installed: http://paste.ubuntu.com/42817/20:50
barryjpds: that's the way setuptools works by default20:51
leonardr<mok0> QUESTION: How does launchpadlib relate to the older launchpadbugs module?20:51
leonardri think that's thekorn's module, and he's working on making it use launchpadlib20:52
leonardrok, any other last-minute questions?20:54
mok0leonardr: thanks, great lesson20:56
leonardrmok0, my pleasure20:56
leonardr<thekorn_> Question: one quick one: is there any update on updating ubuntu's python-httplib220:57
thekorn_thanks leonardr great session, great API and launchpadlib20:57
leonardrno, i don't know any more than you do on that20:57
leonardrthekorn_, thanks for your support and your help20:58
charliecbleonardr: thx for the sesion!!21:00
bdmurrayHi, I'm Brian Murray and Ubuntu's Bugmaster.21:03
bdmurrayAs a member of Ubuntu's QA team I tend to use Launchpad quite a lot and sometimes I want to perform actions or see things that aren't currently available in the user interface.21:03
=== mcas is now known as mcas_away
bdmurrayOr maybe shouldn't be available.21:04
bdmurraySubsequently, I maintain a couple of projects, python-launchpad-bugs and launchpad-gm-scripts, for hacking Launchpad.21:04
bdmurrayI want to start off talking about launchpad-gm-scripts as it is relatively new and there is some exciting stuff going on there.  So much exciting stuff I might not make it to python-launchpad-bugs.21:05
bdmurrayThe launchapd-gm-scripts project, https://launchpad.net/launchpad-gm-scripts, is a collection of Greasemonkey scripts that modify the look and behavior of Launchpad.21:05
bdmurrayIn case you don't know greasemonkey is a Firefox extension that allows scripts to make changes to how HTML web pages are rendered.21:06
bdmurrayIn some cases you can actually see the changes happen as the page will load, the script will run and then the page will change.21:06
bdmurrayGreasemonkey has been available as a package, firefox-greasemonkey, since Feisty.21:06
bdmurrayThe scripts in launchpad-gm-scripts are available via bzr, bzr branch lp:launchpad-gm-scripts, or it is possible to browse the project's code and install scripts without getting the whole project.21:07
bdmurrayFor example, going to http://bazaar.launchpad.net/~gm-dev-launchpad/launchpad-gm-scripts/master/files we can click on the green arrow on the far right of the lp_hide_tags.user.js row and be presented with a Greasemonkey dialog to install the script.21:07
bdmurrayAll the scripts end with 'user.js' and are written in javascript.21:08
bdmurrayAs you can see we have collected quite a few of these scripts!21:08
bdmurrayTherefore, I'll just briefly go over their features.21:08
bdmurrayMore information is available in the README file of the bzr tree.21:08
bdmurrayAre there any questions so far?21:08
bdmurrayI recently added, well it was today, the lp_activity_comments script from Markus Korn.21:10
bdmurrayThis script is incredibly useful as it displays information from a bug's activity log directly on the bug report and avoids your having to click the "Activity log" link and wait for another page to load.21:10
bdmurrayThis allows you to view information about who changed a bug's status or importance and when they changed it.21:10
bdmurrayThe activity shows up either in the comment the change happened in or as a separate pseudo-comment.21:11
bdmurrayA screenshot of the change is visiable at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_activity_comments.png.21:11
bdmurrayNotice in the first comment that Markus changed the bug's status from Confirmed to In Progress and in the last one I changed it from In Progress to Fix Released.21:11
bdmurrayFor quite a while we've had the lp_button_tags script, written by Bryce Harrington, which allows you to add tags to a bug report without loading the "+edit" page for the bug report.21:12
bdmurrayA screenshot is at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_buttontags.png near the cursor there is the text "Add tag:" followed by a list of tags.21:12
bdmurrayThese tags are statically set in the script itself, however they are in a section surrounded by a "User settable data" comment so they are easily modified.21:12
bdmurrayAdditionally, when you mouse over a tag you are presented with a tip regarding when to use the tag.21:13
bdmurrayDoes anyone want to know how to modify that the tags in that script?21:14
chombiumQUESTION: Can the the tags be read/loaded from some global launchpad tag set?21:14
chombiumif there is any21:15
bdmurraychombium: I haven't looked at that.  We do have https://wiki.ubuntu.com/Bugs/Tags, however that list is quite long.21:15
bdmurrayOne thing we'd like to do with this script is have the tags be package specific, so if you were looking at an openoffice bug it would show openoffice tags.21:16
chombiumthat would be great21:17
bdmurrayOkay, I'll look at that again21:17
bdmurray< stefanlsd> QUESTION: What would be the best way to watch bzr  for updates to the scripts?21:17
bdmurraystefanlsd: It is possible to subscribe to the master branch https://code.launchpad.net/~gm-dev-launchpad/launchpad-gm-scripts/master.21:18
bdmurraySo you'd get e-mail announcements when something is committed.21:18
bdmurrayAdditionally, I also try to blog about new scripts.21:18
bdmurrayMoving on we have one of the first greasemonkey scripts in the project was lp_karma_suffix by Kees Cook.21:19
bdmurrayWith this script enabled three things are appened to a Launchpad user's name in various places.  1) Their launchpad id 2) Their current value of their karma and 3) The icons of select teams of which they are a member.21:19
bdmurrayThis infomration is appended to the reporter, assignee and commenters.21:20
bdmurrayin a bug report.21:20
bdmurrayIt is particularly useful when viewing a bug report with lots of comments as guide to distinguish specific comments.21:20
bdmurray You can see what it looks like at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_karma_suffix.png.21:21
bdmurrayIn case you aren't intimately familiar with the team icons you can find out the team name by mousing over the icon.21:21
bdmurrayLooking at the screenshot you'll notice Sebastien Bacher is a member of quite a few teams including ubuntu-dev.21:22
bdmurrayThis script is also modifiable and you can easily change which team's icons appear.21:22
bdmurrayAnother script that modifies bug comments is lp_reporter_comments written by me.21:22
bdmurrayThis script changes the heading of a comment to a light grey color if it is from the bug's reporter.21:23
bdmurrayI also find this quite useful when looking at bug reports with lots of comments.21:23
bdmurrayScreenshot - http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_reporter_comments.png.21:23
bdmurrayNotice how David's comments have a grey header and mine is the standard color.21:23
bdmurrayIt's quite easy to change the color in that too if you want something more obvious.  I went with subtle for the generic script.21:24
bdmurrayA script I think you'll find useful as a developer or potential developer is the lp_patches script which I also wrote.21:24
bdmurrayThis script checks every attachment of a bug report to see whether it is flagged as an attachment.21:25
bdmurrayWithout this script you'd have to click on the "edit" link next to an attachment and look to see if the "This is attachment is a patch" is checked.21:25
bdmurrayThis script will do that for you and modify the icon next to the attachment, normally a green down arrow, to a star.21:25
bdmurrayA screenshot of this change is at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_patches.png.21:25
bdmurrayYou can see both in the first comment and the attachments portlet on the right hand side that add_assignment_counting.diff is flagged as patch.21:26
bdmurraybecause it has the star icon.21:26
bdmurrayOccasionally, people will mark attachments as patches when they are not.21:27
bdmurrayIf you find one of these please help by clicking the "edit" hyperlink next to the attachment and unset the flag.21:27
bdmurrayQuite a few people and workflows rely on Launchpad's ability to search for patches and these false positives are disruptive.21:28
bdmurray< stefanlsd> QUESTION: I love alot of this functionality - but  shouldnt some of it be offered by LP? Does LP plan  on using some of these ideas?21:28
bdmurrayYes, some of these scripts have bug reports about Launchpad associated with them - for example lp_karma_suffix.21:29
bdmurrayHowever, it is hard to determine which teams to display and in which context. We, the launchpad-gm-scripts developers, just made an arbitrary decision based off what was useful to us.21:30
bdmurraySome things like lp_reporter_comments haven't been submitted as bugs about Launchpad but probably should be.21:31
bdmurrayThe launchpad-gm-scripts can be a useful testing ground for some of these features and a way to gauge interest in them.21:31
bdmurrayIf there is a particular script you feel should be implemented in Launchpad please ping me and as I might know if there is already a bug about it.21:32
bdmurrayBack to the scripts21:33
bdmurrayThe first greasemonkey script I'm aware of is lp_stockreplies originally written by Tollef Fog Heen.21:33
bdmurrayThe one in the current branch is Kees's and it  provides a system for storing standard responses and actions to bug reports and reusing those responses.21:33
bdmurrayYou can add as many responses as you want (I think) and by clicking on a pseudo-url have the comment field prefilled, and modify the bug's status, importance, assignment or package.21:34
bdmurrayYou can see what it looks like at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_stockreplies.png.21:34
bdmurrayThis information is presented to you when you click on the downward cheveron next to a bug's package, status, importance or assignment.21:34
bdmurrayIf the bugs you deal with have some patterns to them (where certain actions are repeated) I can't recommend this enough - it is a phenomenal time saver.21:35
bdmurrayIif you look at all the Ubuntu bug reports (https://bugs.launchpad.net/ubuntu/) quite a lot have been used at one point in time or another by very few bugs.21:36
bdmurraySubsequently, the "Tags portlet" on the right hand side may not be that useful.  I have good news though!21:36
bdmurrayMarkus wrote another greasemonkey script that sorts the list by quantity of appearances and limits the number of tags that appear in the portlet.21:36
bdmurrayAgain, this is configurable by directly editing the script and reinstalling it.21:37
bdmurrayA screen shot of what the "Tags portlet" looks like with the script enabled is at http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_hide_tags.png.21:37
bdmurrayYou can see the tags applet near my cursor.21:37
bdmurrayWith it enabled it is much easier to discover that 200! bugs are tagged likely-dup.21:38
bdmurrayWe even have a script that was contributed by a Launchpad developer (Gavin Panella) - lp_highlight_me.21:39
bdmurray This script helps you identify milestones that are assigned to you for a project which is quite useful when you have a project, like Ubuntu, with a lot of bugs milestoned.21:39
bdmurrayScreenshot - http://people.ubuntu.com/~brian/greasemonkey/screenshots/lp_highlight_me.png.21:39
bdmurrayOkay, that covers the majority of the scripts in the launchpad-gm-scripts project.  Are there any questions?21:40
bdmurrayIn addition to subscribing to the bzr branch - I'll also try and use Launchpad's announcement feature, https://launchpad.net/launchpad-gm-scripts/+announcements, to talk about new scripts or features.21:41
bdmurrayIf you have any bugs with these scripts we use Launchpad as our bug tracker so please submit a bug via https://bugs.launchpad.net/launchpad-gm-scripts/+filebug.21:41
bdmurrayAlso feel free to submit a bug if you have an idea of a new greasemonkey script that'd be useful.21:41
bdmurrayQUESTION: How do i add paragraphs to the  stock-replies-script? Escape-Sequences don't seem to  work.21:44
bdmurrayfrom Ampelbein21:44
bdmurrayUh, well you caught me!  I don't actually use that one but will find out for you.21:44
bdmurrayYou might try '\n' though21:45
bdmurraySo I also work on python-launchpad-bugs.21:46
bdmurraypython-launchpad-bugs is a collection of classes for reading and modifying bug reports in Launchpad, it predates the Launchpad API so currently utilizes screenscraping and can be somewhat fragile.21:46
bdmurrayHowever, it has a large user base is quickly updated to deal with changes.21:47
bdmurraypy-lp-b provides some features that don't currently exist in Launchpad.21:47
bdmurrayThe project is hosted on Launchpad, https://launchpad.net/python-launchpad-bugs/, and its code is availabe via a bzr tree and it is packaged for Ubuntu.  There isn't enough time to cover everything you can do with it but I did want to share a couple of features.21:47
bdmurrayI was on holiday the past four days and have a lot of e-mail to deal with, but let's say I'm interested in which xserver-xorg-video-ati bugs were recently set to a status of Confirmed or Triaged.21:48
bdmurrayThere happens to be a script in the examples directory of python-launchpad-bugs that searches for package bugs confirmed since a specific date.21:48
bdmurrayExecuting it via 'python dateconfirmed_filter.py xserver-xorg-video-ati 2008-08-28' I find out that bug 261929 was confirmed while I was away.21:49
bdmurrayThere is also a script for filtering on date triaged.21:49
bdmurrayI think these are both quite handy as Launchpad doesn't provide a way of searching by date yet.21:49
chombiumreally handy indeed21:50
chombiumQUESTION: when can we expect this functionality to be implemented in LP?21:51
bdmurrayWith python-launchpad-bugs you can do a phenomenal number things including filtering on bugs and modifying bugs quickly and easily.  We've recently done some calls for testing via py-lp-b and commented on large quantities of bugs.21:52
bdmurraychombium: The Launchpad team is actively developing there list of goals for 3.0 and I'm not certain where date searching fits in exactly.21:52
bdmurrayHowever, I do belive it is on the list.21:53
bdmurrayAnother project for hacking Launchpad is bughelper.21:53
bdmurrayBughelper  uses python-launchpad-bugs and provides many other types of searches.21:53
bdmurrayUsing 'bugnumbers -p python-launchpad-bugs --branch --parsemode=html' I can find the bug numbers of the py-lp-b bug reports that have a branch attached to them, which can be quite handy.21:53
bdmurrayFor easily identifying bugs to fix and merges to make.21:54
bdmurrayI'm running short on time though...21:55
bdmurrayThis is really just a small sampling of what you can do with bughelper and python-launchpad-bugs though and you can find out from the logs of the last class Markus and I gave on it at https://wiki.ubuntu.com/MeetingLogs/devweek0802/Bughelper.21:55
bdmurrayI've covered some ways that Launchpad is currently being hacked and I hope that you find some of these hacks useful in your day to day usage of Launchpad.21:56
bdmurrayAre there any more questions?21:56
bdmurrayWell, thank you everyone for coming and happy hacking.21:58
thekorn_thanks brian21:58
mok0thanks!!21:59
bobbothanks bdmurray21:59
chombiumthanks brian, very useful tips21:59
MarkopotamusHi peeps. Where'd be a suitable place to find help with a screen resolution problem I'm having in Xubuntu?22:32
AmpelbeinMarkopotamus: if its a bug: #ubuntu-x, otherwise #xubuntu22:46

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!